From ef79bbde537d6b9c745a7d86cb9df1d04c35590d Mon Sep 17 00:00:00 2001 From: PCSX* teams Date: Tue, 16 Nov 2010 14:15:22 +0200 Subject: [PATCH 1/1] pcsxr-1.9.92 --- ABOUT-NLS | 2 + AUTHORS | 39 + COPYING | 353 + ChangeLog | 2078 ++ ChangeLog.df | 486 + INSTALL | 291 + Makefile.am | 4 + Makefile.in | 682 + NEWS | 5 + README | 20 + aclocal.m4 | 11427 +++++++++ autogen.sh | 12 + compile | 142 + config.guess | 1526 ++ config.rpath | 666 + config.sub | 1658 ++ configure | 19356 ++++++++++++++++ configure.ac | 214 + data/Makefile.am | 7 + data/Makefile.in | 424 + data/pcsx.desktop | 14 + data/pcsx.glade2 | 3376 +++ debian/changelog | 5 + debian/compat | 1 + debian/control | 20 + debian/copyright | 61 + debian/docs | 5 + debian/pcsxr.menu | 5 + debian/rules | 75 + depcomp | 589 + doc/Makefile.am | 3 + doc/Makefile.in | 426 + doc/keys.txt | 19 + doc/pcsx.1 | 35 + doc/tweaks.txt | 25 + gui/AboutDlg.c | 109 + gui/AboutDlg.h | 24 + gui/Cheat.c | 1176 + gui/Cheat.h | 25 + gui/ConfDlg.c | 889 + gui/ConfDlg.h | 50 + gui/Config.c | 180 + gui/DebugMemory.c | 312 + gui/DebugMemory.h | 24 + gui/Gtk2Gui.c | 944 + gui/Linux.h | 67 + gui/LnxMain.c | 568 + gui/Makefile.am | 24 + gui/Makefile.in | 538 + gui/MemcardDlg.c | 755 + gui/MemcardDlg.h | 24 + gui/Plugin.c | 390 + gui/nopic.h | 1345 ++ include/config.h.in | 120 + install-sh | 519 + libpcsxcore/Makefile.am | 84 + libpcsxcore/Makefile.in | 1174 + libpcsxcore/cdriso.c | 881 + libpcsxcore/cdriso.h | 34 + libpcsxcore/cdrom.c | 1138 + libpcsxcore/cdrom.h | 110 + libpcsxcore/cheat.c | 1024 + libpcsxcore/cheat.h | 117 + libpcsxcore/coff.h | 38 + libpcsxcore/debug.c | 1145 + libpcsxcore/debug.h | 72 + libpcsxcore/decode_xa.c | 367 + libpcsxcore/decode_xa.h | 49 + libpcsxcore/disr3000a.c | 323 + libpcsxcore/gte.c | 904 + libpcsxcore/gte.h | 65 + libpcsxcore/gte_divider.h | 4133 ++++ libpcsxcore/ix86/iGte.h | 79 + libpcsxcore/ix86/iR3000A.c | 2899 +++ libpcsxcore/ix86/ix86.c | 1723 ++ libpcsxcore/ix86/ix86.h | 673 + libpcsxcore/ix86_64/README | 2 + libpcsxcore/ix86_64/iGte.h | 79 + libpcsxcore/ix86_64/iR3000A-64.c | 2963 +++ libpcsxcore/ix86_64/ix86-64.c | 3139 +++ libpcsxcore/ix86_64/ix86-64.h | 1776 ++ libpcsxcore/ix86_64/ix86_3dnow.c | 178 + libpcsxcore/ix86_64/ix86_cpudetect.c | 487 + libpcsxcore/ix86_64/ix86_fpu.c | 248 + libpcsxcore/ix86_64/ix86_mmx.c | 646 + libpcsxcore/ix86_64/ix86_sse.c | 1455 ++ libpcsxcore/mdec.c | 565 + libpcsxcore/mdec.h | 45 + libpcsxcore/misc.c | 706 + libpcsxcore/misc.h | 77 + libpcsxcore/plugins.c | 815 + libpcsxcore/plugins.h | 411 + libpcsxcore/ppc/pGte.h | 91 + libpcsxcore/ppc/pR3000A.c | 3540 +++ libpcsxcore/ppc/pasm.s | 124 + libpcsxcore/ppc/ppc.c | 32 + libpcsxcore/ppc/ppc.h | 60 + libpcsxcore/ppc/ppc_mnemonics.h | 529 + libpcsxcore/ppc/reguse.c | 419 + libpcsxcore/ppc/reguse.h | 83 + libpcsxcore/ppf.c | 332 + libpcsxcore/ppf.h | 33 + libpcsxcore/psemu_plugin_defs.h | 285 + libpcsxcore/psxbios.c | 2810 +++ libpcsxcore/psxbios.h | 51 + libpcsxcore/psxcommon.c | 76 + libpcsxcore/psxcommon.h | 169 + libpcsxcore/psxcounters.c | 480 + libpcsxcore/psxcounters.h | 50 + libpcsxcore/psxdma.c | 174 + libpcsxcore/psxdma.h | 60 + libpcsxcore/psxhle.c | 96 + libpcsxcore/psxhle.h | 36 + libpcsxcore/psxhw.c | 741 + libpcsxcore/psxhw.h | 78 + libpcsxcore/psxinterpreter.c | 804 + libpcsxcore/psxmem.c | 348 + libpcsxcore/psxmem.h | 144 + libpcsxcore/r3000a.c | 202 + libpcsxcore/r3000a.h | 246 + libpcsxcore/sio.c | 775 + libpcsxcore/sio.h | 76 + libpcsxcore/sjisfont.h | 6956 ++++++ libpcsxcore/socket.c | 254 + libpcsxcore/socket.h | 43 + libpcsxcore/spu.c | 28 + libpcsxcore/spu.h | 47 + libpcsxcore/system.h | 42 + ltmain.sh | 8412 +++++++ macosx/ConfigurationController.h | 41 + macosx/ConfigurationController.m | 203 + macosx/EmuThread.h | 40 + macosx/EmuThread.m | 398 + .../AddPluginSheet.nib/classes.nib | 14 + .../English.lproj/AddPluginSheet.nib/info.nib | 16 + .../AddPluginSheet.nib/keyedobjects.nib | Bin 0 -> 5605 bytes .../Configuration.nib/classes.nib | 49 + .../English.lproj/Configuration.nib/info.nib | 22 + .../Configuration.nib/objects.nib | Bin 0 -> 15263 bytes macosx/English.lproj/Credits.rtf | 28 + macosx/English.lproj/InfoPlist.strings | 6 + macosx/English.lproj/PCSX.nib/classes.nib | 25 + macosx/English.lproj/PCSX.nib/info.nib | 21 + macosx/English.lproj/PCSX.nib/objects.nib | Bin 0 -> 3850 bytes macosx/ExtendedKeys.h | 23 + macosx/Info.plist | 107 + macosx/Pcsx.xcodeproj/project.pbxproj | 934 + macosx/PcsxController.h | 34 + macosx/PcsxController.m | 425 + macosx/PcsxPlugin.h | 41 + macosx/PcsxPlugin.m | 303 + macosx/PcsxPluginDocument.h | 20 + macosx/PcsxPluginDocument.m | 95 + macosx/Plugin.c | 150 + macosx/PluginController.h | 22 + macosx/PluginController.m | 81 + macosx/PluginList.h | 36 + macosx/PluginList.m | 324 + macosx/config.h | 31 + macosx/icons/PCSX.icns | Bin 0 -> 50301 bytes macosx/icons/pcsxfreeze.icns | Bin 0 -> 49422 bytes macosx/icons/pcsxmemcard.icns | Bin 0 -> 49442 bytes macosx/icons/psxbios.icns | Bin 0 -> 47845 bytes macosx/icons/psxplugin.icns | Bin 0 -> 38009 bytes macosx/main.m | 156 + .../DFCdrom/DFCdrom.xcodeproj/project.pbxproj | 360 + .../plugins/DFCdrom/English.lproj/Credits.rtf | 13 + .../DFCdromPluginConfig.nib/classes.nib | 18 + .../DFCdromPluginConfig.nib/info.nib | 16 + .../DFCdromPluginConfig.nib/keyedobjects.nib | Bin 0 -> 8896 bytes .../DFCdrom/English.lproj/InfoPlist.strings | Bin 0 -> 486 bytes macosx/plugins/DFCdrom/Info.plist | 22 + .../DFCdrom/macsrc/PluginConfigController.h | 18 + .../DFCdrom/macsrc/PluginConfigController.m | 158 + macosx/plugins/DFCdrom/macsrc/cdr-macosx.c | 250 + macosx/plugins/DFCdrom/macsrc/cfg.c | 53 + macosx/plugins/DFCdrom/version.plist | 16 + .../DFInput/DFInput.xcodeproj/project.pbxproj | 569 + .../plugins/DFInput/English.lproj/Credits.rtf | 17 + .../DFInput/English.lproj/InfoPlist.strings | Bin 0 -> 612 bytes .../NetPcsxHIDInputPluginMain.nib/classes.nib | 33 + .../NetPcsxHIDInputPluginMain.nib/info.nib | 21 + .../keyedobjects.nib | Bin 0 -> 12060 bytes macosx/plugins/DFInput/Info.plist | 40 + macosx/plugins/DFInput/SDL/include/SDL.h | 151 + .../plugins/DFInput/SDL/include/SDL_config.h | 313 + .../plugins/DFInput/SDL/include/SDL_endian.h | 258 + .../plugins/DFInput/SDL/include/SDL_error.h | 78 + .../plugins/DFInput/SDL/include/SDL_haptic.h | 1123 + .../DFInput/SDL/include/SDL_joystick.h | 209 + macosx/plugins/DFInput/SDL/include/SDL_main.h | 96 + .../DFInput/SDL/include/SDL_platform.h | 154 + .../plugins/DFInput/SDL/include/SDL_stdinc.h | 792 + .../plugins/DFInput/SDL/include/begin_code.h | 136 + .../plugins/DFInput/SDL/include/close_code.h | 38 + macosx/plugins/DFInput/SDL/src/SDL.c | 101 + macosx/plugins/DFInput/SDL/src/SDL_error.c | 259 + macosx/plugins/DFInput/SDL/src/SDL_error_c.h | 62 + .../DFInput/SDL/src/haptic/SDL_haptic.c | 708 + .../DFInput/SDL/src/haptic/SDL_haptic_c.h | 26 + .../DFInput/SDL/src/haptic/SDL_syshaptic.h | 201 + .../SDL/src/haptic/darwin/SDL_syshaptic.c | 1321 ++ .../DFInput/SDL/src/joystick/SDL_joystick.c | 503 + .../DFInput/SDL/src/joystick/SDL_joystick_c.h | 47 + .../SDL/src/joystick/SDL_sysjoystick.h | 85 + .../SDL/src/joystick/darwin/SDL_sysjoystick.c | 847 + .../src/joystick/darwin/SDL_sysjoystick_c.h | 88 + .../plugins/DFInput/macsrc/ControllerList.h | 42 + .../plugins/DFInput/macsrc/ControllerList.m | 143 + macosx/plugins/DFInput/macsrc/MappingCell.h | 29 + macosx/plugins/DFInput/macsrc/MappingCell.m | 89 + macosx/plugins/DFInput/macsrc/PadController.h | 38 + macosx/plugins/DFInput/macsrc/PadController.m | 138 + macosx/plugins/DFInput/macsrc/PadView.h | 42 + macosx/plugins/DFInput/macsrc/PadView.m | 110 + macosx/plugins/DFInput/macsrc/cfg.c | 748 + macosx/plugins/DFInput/macsrc/cfg.h | 30 + macosx/plugins/DFInput/macsrc/xkb.c | 65 + .../plugins/DFSound/English.lproj/Credits.rtf | 14 + .../DFSound/English.lproj/InfoPlist.strings | Bin 0 -> 538 bytes .../NetSfPeopsSpuPluginMain.nib/classes.nib | 25 + .../NetSfPeopsSpuPluginMain.nib/info.nib | 16 + .../keyedobjects.nib | Bin 0 -> 10993 bytes macosx/plugins/DFSound/Info.plist | 22 + .../PeopsSPU.xcodeproj/project.pbxproj | 343 + macosx/plugins/DFSound/macsrc/NamedSlider.h | 13 + macosx/plugins/DFSound/macsrc/NamedSlider.m | 33 + .../plugins/DFSound/macsrc/PluginController.h | 29 + .../plugins/DFSound/macsrc/PluginController.m | 160 + macosx/plugins/DFSound/src/macosx.c | 203 + .../DFXVideo/English.lproj/Credits.rtf | 13 + .../DFXVideo/English.lproj/InfoPlist.strings | Bin 0 -> 518 bytes .../NetSfPeopsSoftGPUConfig.nib/classes.nib | 26 + .../NetSfPeopsSoftGPUConfig.nib/info.nib | 16 + .../keyedobjects.nib | Bin 0 -> 15019 bytes macosx/plugins/DFXVideo/Info.plist | 20 + .../classes.nib | 22 + .../NetSfPeopsSoftGPUInterface.nib/info.nib | 16 + .../keyedobjects.nib | Bin 0 -> 2247 bytes .../PeopsSoftGPU.xcodeproj/project.pbxproj | 416 + macosx/plugins/DFXVideo/macsrc/ExtendedKeys.h | 23 + .../DFXVideo/macsrc/PluginConfigController.h | 26 + .../DFXVideo/macsrc/PluginConfigController.m | 216 + macosx/plugins/DFXVideo/macsrc/PluginGLView.h | 63 + macosx/plugins/DFXVideo/macsrc/PluginGLView.m | 692 + macosx/plugins/DFXVideo/macsrc/PluginWindow.h | 24 + macosx/plugins/DFXVideo/macsrc/PluginWindow.m | 46 + .../DFXVideo/macsrc/PluginWindowController.h | 41 + .../DFXVideo/macsrc/PluginWindowController.m | 227 + macosx/plugins/DFXVideo/macsrc/drawgl.m | 181 + missing | 367 + mkinstalldirs | 161 + pcsx.anjuta | 44 + pixmaps/Makefile.am | 7 + pixmaps/Makefile.in | 424 + pixmaps/pcsx-icon.png | Bin 0 -> 15923 bytes pixmaps/pcsx.jpg | Bin 0 -> 46736 bytes plugins/dfcdrom/Makefile.am | 35 + plugins/dfcdrom/Makefile.in | 665 + plugins/dfcdrom/cdr-libcdio.c | 257 + plugins/dfcdrom/cdr-linux.c | 407 + plugins/dfcdrom/cdr-null.c | 72 + plugins/dfcdrom/cdr.c | 515 + plugins/dfcdrom/cdr.h | 215 + plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2 | 324 + plugins/dfcdrom/cdrcfg-0.1df/main.c | 290 + plugins/dfcdrom/cfg.c | 99 + plugins/dfcdrom/util.c | 95 + plugins/dfinput/Makefile.am | 23 + plugins/dfinput/Makefile.in | 600 + plugins/dfinput/analog.c | 183 + plugins/dfinput/cfg-gtk2.c | 738 + plugins/dfinput/cfg.c | 346 + plugins/dfinput/dfinput.glade2 | 489 + plugins/dfinput/pad.c | 392 + plugins/dfinput/pad.h | 193 + plugins/dfinput/sdljoy.c | 111 + plugins/dfinput/xkb.c | 88 + plugins/dfnet/Makefile.am | 21 + plugins/dfnet/Makefile.in | 592 + plugins/dfnet/cfg.c | 37 + plugins/dfnet/dfnet.c | 274 + plugins/dfnet/dfnet.glade2 | 265 + plugins/dfnet/dfnet.h | 80 + plugins/dfnet/gui.c | 233 + plugins/dfnet/unix.c | 125 + plugins/dfsound/Makefile.am | 51 + plugins/dfsound/Makefile.in | 711 + plugins/dfsound/adsr.c | 641 + plugins/dfsound/adsr.h | 19 + plugins/dfsound/alsa.c | 158 + plugins/dfsound/cfg.c | 167 + plugins/dfsound/cfg.h | 19 + plugins/dfsound/dma.c | 97 + plugins/dfsound/dma.h | 31 + plugins/dfsound/dsoundoss.h | 22 + plugins/dfsound/externals.h | 286 + plugins/dfsound/freeze.c | 214 + plugins/dfsound/gauss_i.h | 150 + plugins/dfsound/nullsnd.c | 24 + plugins/dfsound/oss.c | 159 + plugins/dfsound/psemuxa.h | 28 + plugins/dfsound/pulseaudio.c | 354 + plugins/dfsound/registers.c | 589 + plugins/dfsound/registers.h | 144 + plugins/dfsound/regs.h | 27 + plugins/dfsound/reverb.c | 462 + plugins/dfsound/reverb.h | 21 + plugins/dfsound/sdl.c | 135 + plugins/dfsound/spu.c | 1029 + plugins/dfsound/spu.h | 21 + plugins/dfsound/spucfg-0.1df/dfsound.glade2 | 308 + plugins/dfsound/spucfg-0.1df/main.c | 258 + plugins/dfsound/stdafx.h | 46 + plugins/dfsound/xa.c | 410 + plugins/dfsound/xa.h | 20 + plugins/dfxvideo/Makefile.am | 36 + plugins/dfxvideo/Makefile.in | 626 + plugins/dfxvideo/cfg.c | 318 + plugins/dfxvideo/cfg.h | 28 + plugins/dfxvideo/draw.c | 2047 ++ plugins/dfxvideo/draw.h | 46 + plugins/dfxvideo/externals.h | 315 + plugins/dfxvideo/fps.c | 357 + plugins/dfxvideo/fps.h | 31 + plugins/dfxvideo/gpu.c | 1952 ++ plugins/dfxvideo/gpu.h | 60 + plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 | 625 + plugins/dfxvideo/gpucfg-0.1df/main.c | 464 + plugins/dfxvideo/hq2x.h | 1870 ++ plugins/dfxvideo/hq3x.h | 2970 +++ plugins/dfxvideo/i386.asm | 67 + plugins/dfxvideo/interp.h | 298 + plugins/dfxvideo/key.c | 95 + plugins/dfxvideo/key.h | 24 + plugins/dfxvideo/macros.inc | 40 + plugins/dfxvideo/menu.c | 167 + plugins/dfxvideo/menu.h | 27 + plugins/dfxvideo/prim.c | 1661 ++ plugins/dfxvideo/prim.h | 24 + plugins/dfxvideo/soft.c | 8483 +++++++ plugins/dfxvideo/soft.h | 42 + plugins/dfxvideo/swap.h | 71 + plugins/dfxvideo/zn.c | 255 + plugins/peopsxgl/Makefile.am | 24 + plugins/peopsxgl/Makefile.in | 643 + plugins/peopsxgl/cfg.c | 249 + plugins/peopsxgl/cfg.h | 20 + plugins/peopsxgl/draw.c | 1517 ++ plugins/peopsxgl/draw.h | 51 + plugins/peopsxgl/externals.h | 413 + plugins/peopsxgl/fps.c | 396 + plugins/peopsxgl/fps.h | 28 + plugins/peopsxgl/gl_ext.h | 37 + plugins/peopsxgl/gpu.c | 3196 +++ plugins/peopsxgl/gpu.h | 40 + plugins/peopsxgl/gpucfg/callbacks.c | 51 + plugins/peopsxgl/gpucfg/callbacks.h | 24 + plugins/peopsxgl/gpucfg/interface.c | 896 + plugins/peopsxgl/gpucfg/interface.h | 6 + plugins/peopsxgl/gpucfg/main.c | 548 + plugins/peopsxgl/gpucfg/support.c | 155 + plugins/peopsxgl/gpucfg/support.h | 38 + plugins/peopsxgl/key.c | 173 + plugins/peopsxgl/key.h | 21 + plugins/peopsxgl/menu.c | 1443 ++ plugins/peopsxgl/menu.h | 41 + plugins/peopsxgl/prim.c | 4661 ++++ plugins/peopsxgl/prim.h | 34 + plugins/peopsxgl/soft.c | 8385 +++++++ plugins/peopsxgl/soft.h | 58 + plugins/peopsxgl/stdafx.h | 45 + plugins/peopsxgl/texture.c | 4909 ++++ plugins/peopsxgl/texture.h | 68 + po/LINGUAS | 5 + po/Makefile.in.in | 272 + po/Makevars | 41 + po/POTFILES.in | 107 + po/Rules-quot | 47 + po/boldquot.sed | 10 + po/en@boldquot.header | 25 + po/en@quot.header | 22 + po/insert-header.sin | 23 + po/it.gmo | Bin 0 -> 43913 bytes po/it.po | 3143 +++ po/pcsx.pot | 2950 +++ po/pt_BR.gmo | Bin 0 -> 38731 bytes po/pt_BR.po | 3090 +++ po/quot.sed | 6 + po/remove-potcdate.sin | 19 + po/ru_RU.gmo | Bin 0 -> 47921 bytes po/ru_RU.po | 3052 +++ po/zh_CN.gmo | Bin 0 -> 45315 bytes po/zh_CN.po | 3190 +++ po/zh_TW.gmo | Bin 0 -> 43245 bytes po/zh_TW.po | 3189 +++ strip_fPIC.sh | 15 + win32/config.h | 50 + win32/glue/stdint.h | 42 + win32/glue/sys/mman.h | 20 + win32/gui/AboutDlg.c | 68 + win32/gui/AboutDlg.h | 24 + win32/gui/CheatDlg.c | 1021 + win32/gui/ConfigurePlugins.c | 649 + win32/gui/NoPic.h | 1345 ++ win32/gui/Win32.h | 69 + win32/gui/WndMain.c | 1802 ++ win32/gui/about.bmp | Bin 0 -> 105270 bytes win32/gui/cdrom02.ico | Bin 0 -> 9662 bytes win32/gui/pcsx.bmp | Bin 0 -> 185190 bytes win32/gui/pcsx.exe.manifest | 22 + win32/gui/plugin.c | 351 + win32/gui/plugin.h | 27 + win32/intl/bindtextdom.c | 245 + win32/intl/dcgettext.c | 622 + win32/intl/dgettext.c | 57 + win32/intl/explodename.c | 186 + win32/intl/finddomain.c | 214 + win32/intl/gettext.c | 86 + win32/intl/gettext.h | 105 + win32/intl/gettextP.h | 89 + win32/intl/hash-string.h | 59 + win32/intl/intl-compat.c | 74 + win32/intl/intlconfig.h | 248 + win32/intl/l10nflist.c | 408 + win32/intl/libgettext.h | 182 + win32/intl/libintl.h | 112 + win32/intl/loadinfo.h | 76 + win32/intl/loadmsgcat.c | 227 + win32/intl/localealias.c | 426 + win32/intl/textdomain.c | 106 + win32/pcsx.dev | 1189 + win32/pcsx.dsp | 575 + win32/pcsx.rc | 440 + win32/pcsx.sln | 20 + win32/pcsx.vcproj | 1709 ++ win32/resource.h | 344 + win32/zlib/adler32.c | 48 + win32/zlib/compress.c | 68 + win32/zlib/crc32.c | 162 + win32/zlib/deflate.c | 1350 ++ win32/zlib/deflate.h | 318 + win32/zlib/gzio.c | 879 + win32/zlib/infblock.c | 403 + win32/zlib/infblock.h | 39 + win32/zlib/infcodes.c | 251 + win32/zlib/infcodes.h | 27 + win32/zlib/inffast.c | 183 + win32/zlib/inffast.h | 17 + win32/zlib/inffixed.h | 151 + win32/zlib/inflate.c | 366 + win32/zlib/inftrees.c | 454 + win32/zlib/inftrees.h | 58 + win32/zlib/infutil.c | 87 + win32/zlib/infutil.h | 98 + win32/zlib/trees.c | 1214 + win32/zlib/trees.h | 128 + win32/zlib/uncompr.c | 58 + win32/zlib/zconf.h | 279 + win32/zlib/zlib.h | 893 + win32/zlib/zutil.c | 225 + win32/zlib/zutil.h | 220 + 462 files changed, 235737 insertions(+) create mode 100644 ABOUT-NLS create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 ChangeLog.df create mode 100644 INSTALL create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 README create mode 100644 aclocal.m4 create mode 100755 autogen.sh create mode 100755 compile create mode 100755 config.guess create mode 100755 config.rpath create mode 100755 config.sub create mode 100755 configure create mode 100644 configure.ac create mode 100644 data/Makefile.am create mode 100644 data/Makefile.in create mode 100644 data/pcsx.desktop create mode 100644 data/pcsx.glade2 create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/pcsxr.menu create mode 100755 debian/rules create mode 100755 depcomp create mode 100644 doc/Makefile.am create mode 100644 doc/Makefile.in create mode 100644 doc/keys.txt create mode 100644 doc/pcsx.1 create mode 100644 doc/tweaks.txt create mode 100644 gui/AboutDlg.c create mode 100644 gui/AboutDlg.h create mode 100644 gui/Cheat.c create mode 100644 gui/Cheat.h create mode 100644 gui/ConfDlg.c create mode 100644 gui/ConfDlg.h create mode 100644 gui/Config.c create mode 100644 gui/DebugMemory.c create mode 100644 gui/DebugMemory.h create mode 100644 gui/Gtk2Gui.c create mode 100644 gui/Linux.h create mode 100644 gui/LnxMain.c create mode 100644 gui/Makefile.am create mode 100644 gui/Makefile.in create mode 100644 gui/MemcardDlg.c create mode 100644 gui/MemcardDlg.h create mode 100644 gui/Plugin.c create mode 100644 gui/nopic.h create mode 100644 include/config.h.in create mode 100755 install-sh create mode 100644 libpcsxcore/Makefile.am create mode 100644 libpcsxcore/Makefile.in create mode 100644 libpcsxcore/cdriso.c create mode 100644 libpcsxcore/cdriso.h create mode 100644 libpcsxcore/cdrom.c create mode 100644 libpcsxcore/cdrom.h create mode 100644 libpcsxcore/cheat.c create mode 100644 libpcsxcore/cheat.h create mode 100644 libpcsxcore/coff.h create mode 100644 libpcsxcore/debug.c create mode 100644 libpcsxcore/debug.h create mode 100644 libpcsxcore/decode_xa.c create mode 100644 libpcsxcore/decode_xa.h create mode 100644 libpcsxcore/disr3000a.c create mode 100644 libpcsxcore/gte.c create mode 100644 libpcsxcore/gte.h create mode 100644 libpcsxcore/gte_divider.h create mode 100644 libpcsxcore/ix86/iGte.h create mode 100644 libpcsxcore/ix86/iR3000A.c create mode 100644 libpcsxcore/ix86/ix86.c create mode 100644 libpcsxcore/ix86/ix86.h create mode 100644 libpcsxcore/ix86_64/README create mode 100644 libpcsxcore/ix86_64/iGte.h create mode 100644 libpcsxcore/ix86_64/iR3000A-64.c create mode 100644 libpcsxcore/ix86_64/ix86-64.c create mode 100644 libpcsxcore/ix86_64/ix86-64.h create mode 100644 libpcsxcore/ix86_64/ix86_3dnow.c create mode 100644 libpcsxcore/ix86_64/ix86_cpudetect.c create mode 100644 libpcsxcore/ix86_64/ix86_fpu.c create mode 100644 libpcsxcore/ix86_64/ix86_mmx.c create mode 100644 libpcsxcore/ix86_64/ix86_sse.c create mode 100644 libpcsxcore/mdec.c create mode 100644 libpcsxcore/mdec.h create mode 100644 libpcsxcore/misc.c create mode 100644 libpcsxcore/misc.h create mode 100644 libpcsxcore/plugins.c create mode 100644 libpcsxcore/plugins.h create mode 100644 libpcsxcore/ppc/pGte.h create mode 100644 libpcsxcore/ppc/pR3000A.c create mode 100644 libpcsxcore/ppc/pasm.s create mode 100644 libpcsxcore/ppc/ppc.c create mode 100644 libpcsxcore/ppc/ppc.h create mode 100644 libpcsxcore/ppc/ppc_mnemonics.h create mode 100644 libpcsxcore/ppc/reguse.c create mode 100644 libpcsxcore/ppc/reguse.h create mode 100644 libpcsxcore/ppf.c create mode 100644 libpcsxcore/ppf.h create mode 100644 libpcsxcore/psemu_plugin_defs.h create mode 100644 libpcsxcore/psxbios.c create mode 100644 libpcsxcore/psxbios.h create mode 100644 libpcsxcore/psxcommon.c create mode 100644 libpcsxcore/psxcommon.h create mode 100644 libpcsxcore/psxcounters.c create mode 100644 libpcsxcore/psxcounters.h create mode 100644 libpcsxcore/psxdma.c create mode 100644 libpcsxcore/psxdma.h create mode 100644 libpcsxcore/psxhle.c create mode 100644 libpcsxcore/psxhle.h create mode 100644 libpcsxcore/psxhw.c create mode 100644 libpcsxcore/psxhw.h create mode 100644 libpcsxcore/psxinterpreter.c create mode 100644 libpcsxcore/psxmem.c create mode 100644 libpcsxcore/psxmem.h create mode 100644 libpcsxcore/r3000a.c create mode 100644 libpcsxcore/r3000a.h create mode 100644 libpcsxcore/sio.c create mode 100644 libpcsxcore/sio.h create mode 100644 libpcsxcore/sjisfont.h create mode 100644 libpcsxcore/socket.c create mode 100644 libpcsxcore/socket.h create mode 100644 libpcsxcore/spu.c create mode 100644 libpcsxcore/spu.h create mode 100644 libpcsxcore/system.h create mode 100755 ltmain.sh create mode 100644 macosx/ConfigurationController.h create mode 100644 macosx/ConfigurationController.m create mode 100644 macosx/EmuThread.h create mode 100644 macosx/EmuThread.m create mode 100644 macosx/English.lproj/AddPluginSheet.nib/classes.nib create mode 100644 macosx/English.lproj/AddPluginSheet.nib/info.nib create mode 100644 macosx/English.lproj/AddPluginSheet.nib/keyedobjects.nib create mode 100644 macosx/English.lproj/Configuration.nib/classes.nib create mode 100644 macosx/English.lproj/Configuration.nib/info.nib create mode 100644 macosx/English.lproj/Configuration.nib/objects.nib create mode 100644 macosx/English.lproj/Credits.rtf create mode 100644 macosx/English.lproj/InfoPlist.strings create mode 100644 macosx/English.lproj/PCSX.nib/classes.nib create mode 100644 macosx/English.lproj/PCSX.nib/info.nib create mode 100644 macosx/English.lproj/PCSX.nib/objects.nib create mode 100644 macosx/ExtendedKeys.h create mode 100644 macosx/Info.plist create mode 100644 macosx/Pcsx.xcodeproj/project.pbxproj create mode 100644 macosx/PcsxController.h create mode 100644 macosx/PcsxController.m create mode 100644 macosx/PcsxPlugin.h create mode 100644 macosx/PcsxPlugin.m create mode 100644 macosx/PcsxPluginDocument.h create mode 100644 macosx/PcsxPluginDocument.m create mode 100644 macosx/Plugin.c create mode 100644 macosx/PluginController.h create mode 100644 macosx/PluginController.m create mode 100644 macosx/PluginList.h create mode 100644 macosx/PluginList.m create mode 100644 macosx/config.h create mode 100644 macosx/icons/PCSX.icns create mode 100644 macosx/icons/pcsxfreeze.icns create mode 100644 macosx/icons/pcsxmemcard.icns create mode 100644 macosx/icons/psxbios.icns create mode 100644 macosx/icons/psxplugin.icns create mode 100644 macosx/main.m create mode 100644 macosx/plugins/DFCdrom/DFCdrom.xcodeproj/project.pbxproj create mode 100644 macosx/plugins/DFCdrom/English.lproj/Credits.rtf create mode 100644 macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.nib/classes.nib create mode 100644 macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.nib/info.nib create mode 100644 macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.nib/keyedobjects.nib create mode 100755 macosx/plugins/DFCdrom/English.lproj/InfoPlist.strings create mode 100644 macosx/plugins/DFCdrom/Info.plist create mode 100644 macosx/plugins/DFCdrom/macsrc/PluginConfigController.h create mode 100644 macosx/plugins/DFCdrom/macsrc/PluginConfigController.m create mode 100644 macosx/plugins/DFCdrom/macsrc/cdr-macosx.c create mode 100644 macosx/plugins/DFCdrom/macsrc/cfg.c create mode 100644 macosx/plugins/DFCdrom/version.plist create mode 100644 macosx/plugins/DFInput/DFInput.xcodeproj/project.pbxproj create mode 100644 macosx/plugins/DFInput/English.lproj/Credits.rtf create mode 100755 macosx/plugins/DFInput/English.lproj/InfoPlist.strings create mode 100644 macosx/plugins/DFInput/English.lproj/NetPcsxHIDInputPluginMain.nib/classes.nib create mode 100644 macosx/plugins/DFInput/English.lproj/NetPcsxHIDInputPluginMain.nib/info.nib create mode 100644 macosx/plugins/DFInput/English.lproj/NetPcsxHIDInputPluginMain.nib/keyedobjects.nib create mode 100644 macosx/plugins/DFInput/Info.plist create mode 100644 macosx/plugins/DFInput/SDL/include/SDL.h create mode 100644 macosx/plugins/DFInput/SDL/include/SDL_config.h create mode 100644 macosx/plugins/DFInput/SDL/include/SDL_endian.h create mode 100644 macosx/plugins/DFInput/SDL/include/SDL_error.h create mode 100644 macosx/plugins/DFInput/SDL/include/SDL_haptic.h create mode 100644 macosx/plugins/DFInput/SDL/include/SDL_joystick.h create mode 100644 macosx/plugins/DFInput/SDL/include/SDL_main.h create mode 100644 macosx/plugins/DFInput/SDL/include/SDL_platform.h create mode 100644 macosx/plugins/DFInput/SDL/include/SDL_stdinc.h create mode 100644 macosx/plugins/DFInput/SDL/include/begin_code.h create mode 100644 macosx/plugins/DFInput/SDL/include/close_code.h create mode 100644 macosx/plugins/DFInput/SDL/src/SDL.c create mode 100644 macosx/plugins/DFInput/SDL/src/SDL_error.c create mode 100644 macosx/plugins/DFInput/SDL/src/SDL_error_c.h create mode 100644 macosx/plugins/DFInput/SDL/src/haptic/SDL_haptic.c create mode 100644 macosx/plugins/DFInput/SDL/src/haptic/SDL_haptic_c.h create mode 100644 macosx/plugins/DFInput/SDL/src/haptic/SDL_syshaptic.h create mode 100644 macosx/plugins/DFInput/SDL/src/haptic/darwin/SDL_syshaptic.c create mode 100644 macosx/plugins/DFInput/SDL/src/joystick/SDL_joystick.c create mode 100644 macosx/plugins/DFInput/SDL/src/joystick/SDL_joystick_c.h create mode 100644 macosx/plugins/DFInput/SDL/src/joystick/SDL_sysjoystick.h create mode 100644 macosx/plugins/DFInput/SDL/src/joystick/darwin/SDL_sysjoystick.c create mode 100644 macosx/plugins/DFInput/SDL/src/joystick/darwin/SDL_sysjoystick_c.h create mode 100644 macosx/plugins/DFInput/macsrc/ControllerList.h create mode 100644 macosx/plugins/DFInput/macsrc/ControllerList.m create mode 100644 macosx/plugins/DFInput/macsrc/MappingCell.h create mode 100644 macosx/plugins/DFInput/macsrc/MappingCell.m create mode 100644 macosx/plugins/DFInput/macsrc/PadController.h create mode 100644 macosx/plugins/DFInput/macsrc/PadController.m create mode 100644 macosx/plugins/DFInput/macsrc/PadView.h create mode 100644 macosx/plugins/DFInput/macsrc/PadView.m create mode 100644 macosx/plugins/DFInput/macsrc/cfg.c create mode 100644 macosx/plugins/DFInput/macsrc/cfg.h create mode 100644 macosx/plugins/DFInput/macsrc/xkb.c create mode 100644 macosx/plugins/DFSound/English.lproj/Credits.rtf create mode 100755 macosx/plugins/DFSound/English.lproj/InfoPlist.strings create mode 100644 macosx/plugins/DFSound/English.lproj/NetSfPeopsSpuPluginMain.nib/classes.nib create mode 100644 macosx/plugins/DFSound/English.lproj/NetSfPeopsSpuPluginMain.nib/info.nib create mode 100755 macosx/plugins/DFSound/English.lproj/NetSfPeopsSpuPluginMain.nib/keyedobjects.nib create mode 100644 macosx/plugins/DFSound/Info.plist create mode 100644 macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj create mode 100644 macosx/plugins/DFSound/macsrc/NamedSlider.h create mode 100644 macosx/plugins/DFSound/macsrc/NamedSlider.m create mode 100644 macosx/plugins/DFSound/macsrc/PluginController.h create mode 100644 macosx/plugins/DFSound/macsrc/PluginController.m create mode 100755 macosx/plugins/DFSound/src/macosx.c create mode 100644 macosx/plugins/DFXVideo/English.lproj/Credits.rtf create mode 100644 macosx/plugins/DFXVideo/English.lproj/InfoPlist.strings create mode 100644 macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.nib/classes.nib create mode 100644 macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.nib/info.nib create mode 100644 macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.nib/keyedobjects.nib create mode 100644 macosx/plugins/DFXVideo/Info.plist create mode 100644 macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.nib/classes.nib create mode 100644 macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.nib/info.nib create mode 100644 macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.nib/keyedobjects.nib create mode 100644 macosx/plugins/DFXVideo/PeopsSoftGPU.xcodeproj/project.pbxproj create mode 100644 macosx/plugins/DFXVideo/macsrc/ExtendedKeys.h create mode 100644 macosx/plugins/DFXVideo/macsrc/PluginConfigController.h create mode 100644 macosx/plugins/DFXVideo/macsrc/PluginConfigController.m create mode 100644 macosx/plugins/DFXVideo/macsrc/PluginGLView.h create mode 100644 macosx/plugins/DFXVideo/macsrc/PluginGLView.m create mode 100644 macosx/plugins/DFXVideo/macsrc/PluginWindow.h create mode 100644 macosx/plugins/DFXVideo/macsrc/PluginWindow.m create mode 100644 macosx/plugins/DFXVideo/macsrc/PluginWindowController.h create mode 100644 macosx/plugins/DFXVideo/macsrc/PluginWindowController.m create mode 100644 macosx/plugins/DFXVideo/macsrc/drawgl.m create mode 100755 missing create mode 100755 mkinstalldirs create mode 100644 pcsx.anjuta create mode 100644 pixmaps/Makefile.am create mode 100644 pixmaps/Makefile.in create mode 100755 pixmaps/pcsx-icon.png create mode 100755 pixmaps/pcsx.jpg create mode 100644 plugins/dfcdrom/Makefile.am create mode 100644 plugins/dfcdrom/Makefile.in create mode 100644 plugins/dfcdrom/cdr-libcdio.c create mode 100644 plugins/dfcdrom/cdr-linux.c create mode 100644 plugins/dfcdrom/cdr-null.c create mode 100644 plugins/dfcdrom/cdr.c create mode 100644 plugins/dfcdrom/cdr.h create mode 100644 plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2 create mode 100644 plugins/dfcdrom/cdrcfg-0.1df/main.c create mode 100644 plugins/dfcdrom/cfg.c create mode 100644 plugins/dfcdrom/util.c create mode 100644 plugins/dfinput/Makefile.am create mode 100644 plugins/dfinput/Makefile.in create mode 100644 plugins/dfinput/analog.c create mode 100644 plugins/dfinput/cfg-gtk2.c create mode 100644 plugins/dfinput/cfg.c create mode 100644 plugins/dfinput/dfinput.glade2 create mode 100644 plugins/dfinput/pad.c create mode 100644 plugins/dfinput/pad.h create mode 100644 plugins/dfinput/sdljoy.c create mode 100644 plugins/dfinput/xkb.c create mode 100644 plugins/dfnet/Makefile.am create mode 100644 plugins/dfnet/Makefile.in create mode 100644 plugins/dfnet/cfg.c create mode 100644 plugins/dfnet/dfnet.c create mode 100644 plugins/dfnet/dfnet.glade2 create mode 100644 plugins/dfnet/dfnet.h create mode 100644 plugins/dfnet/gui.c create mode 100644 plugins/dfnet/unix.c create mode 100644 plugins/dfsound/Makefile.am create mode 100644 plugins/dfsound/Makefile.in create mode 100644 plugins/dfsound/adsr.c create mode 100644 plugins/dfsound/adsr.h create mode 100644 plugins/dfsound/alsa.c create mode 100644 plugins/dfsound/cfg.c create mode 100644 plugins/dfsound/cfg.h create mode 100644 plugins/dfsound/dma.c create mode 100644 plugins/dfsound/dma.h create mode 100644 plugins/dfsound/dsoundoss.h create mode 100644 plugins/dfsound/externals.h create mode 100644 plugins/dfsound/freeze.c create mode 100644 plugins/dfsound/gauss_i.h create mode 100644 plugins/dfsound/nullsnd.c create mode 100644 plugins/dfsound/oss.c create mode 100644 plugins/dfsound/psemuxa.h create mode 100644 plugins/dfsound/pulseaudio.c create mode 100644 plugins/dfsound/registers.c create mode 100644 plugins/dfsound/registers.h create mode 100644 plugins/dfsound/regs.h create mode 100644 plugins/dfsound/reverb.c create mode 100644 plugins/dfsound/reverb.h create mode 100644 plugins/dfsound/sdl.c create mode 100644 plugins/dfsound/spu.c create mode 100644 plugins/dfsound/spu.h create mode 100644 plugins/dfsound/spucfg-0.1df/dfsound.glade2 create mode 100644 plugins/dfsound/spucfg-0.1df/main.c create mode 100644 plugins/dfsound/stdafx.h create mode 100644 plugins/dfsound/xa.c create mode 100644 plugins/dfsound/xa.h create mode 100644 plugins/dfxvideo/Makefile.am create mode 100644 plugins/dfxvideo/Makefile.in create mode 100644 plugins/dfxvideo/cfg.c create mode 100644 plugins/dfxvideo/cfg.h create mode 100644 plugins/dfxvideo/draw.c create mode 100644 plugins/dfxvideo/draw.h create mode 100644 plugins/dfxvideo/externals.h create mode 100644 plugins/dfxvideo/fps.c create mode 100644 plugins/dfxvideo/fps.h create mode 100644 plugins/dfxvideo/gpu.c create mode 100644 plugins/dfxvideo/gpu.h create mode 100644 plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 create mode 100644 plugins/dfxvideo/gpucfg-0.1df/main.c create mode 100644 plugins/dfxvideo/hq2x.h create mode 100644 plugins/dfxvideo/hq3x.h create mode 100644 plugins/dfxvideo/i386.asm create mode 100644 plugins/dfxvideo/interp.h create mode 100644 plugins/dfxvideo/key.c create mode 100644 plugins/dfxvideo/key.h create mode 100644 plugins/dfxvideo/macros.inc create mode 100644 plugins/dfxvideo/menu.c create mode 100644 plugins/dfxvideo/menu.h create mode 100644 plugins/dfxvideo/prim.c create mode 100644 plugins/dfxvideo/prim.h create mode 100644 plugins/dfxvideo/soft.c create mode 100644 plugins/dfxvideo/soft.h create mode 100644 plugins/dfxvideo/swap.h create mode 100644 plugins/dfxvideo/zn.c create mode 100644 plugins/peopsxgl/Makefile.am create mode 100644 plugins/peopsxgl/Makefile.in create mode 100644 plugins/peopsxgl/cfg.c create mode 100644 plugins/peopsxgl/cfg.h create mode 100644 plugins/peopsxgl/draw.c create mode 100644 plugins/peopsxgl/draw.h create mode 100644 plugins/peopsxgl/externals.h create mode 100644 plugins/peopsxgl/fps.c create mode 100644 plugins/peopsxgl/fps.h create mode 100644 plugins/peopsxgl/gl_ext.h create mode 100644 plugins/peopsxgl/gpu.c create mode 100644 plugins/peopsxgl/gpu.h create mode 100644 plugins/peopsxgl/gpucfg/callbacks.c create mode 100644 plugins/peopsxgl/gpucfg/callbacks.h create mode 100644 plugins/peopsxgl/gpucfg/interface.c create mode 100644 plugins/peopsxgl/gpucfg/interface.h create mode 100644 plugins/peopsxgl/gpucfg/main.c create mode 100644 plugins/peopsxgl/gpucfg/support.c create mode 100644 plugins/peopsxgl/gpucfg/support.h create mode 100644 plugins/peopsxgl/key.c create mode 100644 plugins/peopsxgl/key.h create mode 100644 plugins/peopsxgl/menu.c create mode 100644 plugins/peopsxgl/menu.h create mode 100644 plugins/peopsxgl/prim.c create mode 100644 plugins/peopsxgl/prim.h create mode 100644 plugins/peopsxgl/soft.c create mode 100644 plugins/peopsxgl/soft.h create mode 100644 plugins/peopsxgl/stdafx.h create mode 100644 plugins/peopsxgl/texture.c create mode 100644 plugins/peopsxgl/texture.h create mode 100644 po/LINGUAS create mode 100644 po/Makefile.in.in create mode 100644 po/Makevars create mode 100644 po/POTFILES.in create mode 100644 po/Rules-quot create mode 100644 po/boldquot.sed create mode 100644 po/en@boldquot.header create mode 100644 po/en@quot.header create mode 100644 po/insert-header.sin create mode 100644 po/it.gmo create mode 100644 po/it.po create mode 100644 po/pcsx.pot create mode 100644 po/pt_BR.gmo create mode 100644 po/pt_BR.po create mode 100644 po/quot.sed create mode 100644 po/remove-potcdate.sin create mode 100644 po/ru_RU.gmo create mode 100644 po/ru_RU.po create mode 100644 po/zh_CN.gmo create mode 100644 po/zh_CN.po create mode 100644 po/zh_TW.gmo create mode 100644 po/zh_TW.po create mode 100644 strip_fPIC.sh create mode 100644 win32/config.h create mode 100644 win32/glue/stdint.h create mode 100644 win32/glue/sys/mman.h create mode 100644 win32/gui/AboutDlg.c create mode 100644 win32/gui/AboutDlg.h create mode 100644 win32/gui/CheatDlg.c create mode 100644 win32/gui/ConfigurePlugins.c create mode 100644 win32/gui/NoPic.h create mode 100644 win32/gui/Win32.h create mode 100644 win32/gui/WndMain.c create mode 100755 win32/gui/about.bmp create mode 100755 win32/gui/cdrom02.ico create mode 100755 win32/gui/pcsx.bmp create mode 100644 win32/gui/pcsx.exe.manifest create mode 100644 win32/gui/plugin.c create mode 100644 win32/gui/plugin.h create mode 100644 win32/intl/bindtextdom.c create mode 100644 win32/intl/dcgettext.c create mode 100644 win32/intl/dgettext.c create mode 100644 win32/intl/explodename.c create mode 100644 win32/intl/finddomain.c create mode 100644 win32/intl/gettext.c create mode 100644 win32/intl/gettext.h create mode 100644 win32/intl/gettextP.h create mode 100644 win32/intl/hash-string.h create mode 100644 win32/intl/intl-compat.c create mode 100644 win32/intl/intlconfig.h create mode 100644 win32/intl/l10nflist.c create mode 100644 win32/intl/libgettext.h create mode 100644 win32/intl/libintl.h create mode 100644 win32/intl/loadinfo.h create mode 100644 win32/intl/loadmsgcat.c create mode 100644 win32/intl/localealias.c create mode 100644 win32/intl/textdomain.c create mode 100644 win32/pcsx.dev create mode 100644 win32/pcsx.dsp create mode 100644 win32/pcsx.rc create mode 100644 win32/pcsx.sln create mode 100644 win32/pcsx.vcproj create mode 100644 win32/resource.h create mode 100644 win32/zlib/adler32.c create mode 100644 win32/zlib/compress.c create mode 100644 win32/zlib/crc32.c create mode 100644 win32/zlib/deflate.c create mode 100644 win32/zlib/deflate.h create mode 100644 win32/zlib/gzio.c create mode 100644 win32/zlib/infblock.c create mode 100644 win32/zlib/infblock.h create mode 100644 win32/zlib/infcodes.c create mode 100644 win32/zlib/infcodes.h create mode 100644 win32/zlib/inffast.c create mode 100644 win32/zlib/inffast.h create mode 100644 win32/zlib/inffixed.h create mode 100644 win32/zlib/inflate.c create mode 100644 win32/zlib/inftrees.c create mode 100644 win32/zlib/inftrees.h create mode 100644 win32/zlib/infutil.c create mode 100644 win32/zlib/infutil.h create mode 100644 win32/zlib/trees.c create mode 100644 win32/zlib/trees.h create mode 100644 win32/zlib/uncompr.c create mode 100644 win32/zlib/zconf.h create mode 100644 win32/zlib/zlib.h create mode 100644 win32/zlib/zutil.c create mode 100644 win32/zlib/zutil.h diff --git a/ABOUT-NLS b/ABOUT-NLS new file mode 100644 index 00000000..8d18e819 --- /dev/null +++ b/ABOUT-NLS @@ -0,0 +1,2 @@ +PCSX-df uses gettext internally, but can be configured without it. +The gettext library is not included with PCSX-df. diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..1300bdee --- /dev/null +++ b/AUTHORS @@ -0,0 +1,39 @@ +PCSX Upstream Authors: Linuzappz + Shadow + Pete Bernett + NoComp + Nik3d + Akumax + +PCSX Copyright: (c) 1999-2003 Pcsx Team + (c) 1998 Vision Thing + +df Upstream Authors: Ryan Schultz + Andrew Burton + Stephen Chao + Marcus Comstedt + Stefan Sikora + +df Copyright: (c) 2005 Ryan Schultz + (c) 2005 Andrew Burton + (c) 2007 Stephen Chao + (c) 2006 Marcus Comstedt + +PCSX-Reloaded Authors/Contributors: avlex (Help on xcode project) + Dario (Various bugfixes) + edgbla (Root counters, various core/plugin fixes) + Firnis (GTE code from PCSX-Revolution Project) + Gabriele Gorla (MDEC decoder) + maggix (Snow Leopard compile fix) + NeToU (Bugfix) + Peter Collingbourne (Various core/psxbios fixes) + siveritas (Bugfix) + shalma (GTE Divider, various core fixes) + Tristin Celestin (PulseAudio support) + Wei Mingzhi (Maintainer, input plugin, iso/cheat support, misc stuff) + +PCSX-Reloaded Translators: edgbla (Russian) + Giovanni Scafora (Italian) + Tibério Vítor (Brazilian Portuguese) + Wei Mingzhi (Simplified & Traditional Chinese) + diff --git a/COPYING b/COPYING new file mode 100644 index 00000000..abacb829 --- /dev/null +++ b/COPYING @@ -0,0 +1,353 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. + +--------------------------------------------------- + +The file 'PSEmu_Plugin_Defs.h' is released to the public domain, contrary +to its headers. This is an excerpt from a forum, by Pete Bernert (who wrote +many of the plugins and was a PCSX contributor): + +"The "PSEmu Plugin Def.h" header file is very old (1998) and (as you +have noticed) contains just a few basic defines. When PSemu Pro died in +early 1999, and new psx emus showed up, the Vision Thing crew allowed +free usage/enhancements of the interface. Sure, nobody ever updated the +header file to state something new, but Duddie gave his agreement, as +well as Kazz with his XA audio defines (used in the spu plugin +interface). So, there is nothing to worry about using the headers." diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 00000000..0c169576 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,2078 @@ +August 2, 2010 Wei Mingzhi + + * macosx/Pcsx.xcodeproj/project.pbxproj: Added some more optimizations + parameters for the Deployment build. + +August 1, 2010 Wei Mingzhi + + * plugins/dfinput/cfg-gtk2.c: Only accept axis input if the current axis + position is off enough from the previous position or initial position. + * macosx/plugins/DFInput/macsrc/cfg.c: Likewise. + * macosx/plugins/DFInput/macsrc/cfg.h: Likewise. + * macosx/plugins/DFInput/macsrc/MappingCell.m: Likewise. + * macosx/plugins/DFInput/DFInput.xcodeproj/project.pbxproj: Fixed compile + error. + +July 31, 2010 Wei Mingzhi + + * plugins/dfsound/spu.c: Silenced warning on Mac OS X and FreeBSD. + * macosx/plugins/DFInput/SDL/include/SDL_haptic.h: Upgraded to SDL 1.3 Beta. + * macosx/plugins/DFInput/SDL/include/SDL_error.h: Likewise. + * macosx/plugins/DFInput/SDL/include/begin_code.h: Likewise. + * macosx/plugins/DFInput/SDL/include/close_code.h: Likewise. + * macosx/plugins/DFInput/SDL/include/SDL_endian.h: Likewise. + * macosx/plugins/DFInput/SDL/include/SDL_joystick.h: Likewise. + * macosx/plugins/DFInput/SDL/include/SDL.h: Likewise. + * macosx/plugins/DFInput/SDL/include/SDL_main.h: Likewise. + * macosx/plugins/DFInput/SDL/include/SDL_stdinc.h: Likewise. + * macosx/plugins/DFInput/SDL/include/SDL_platform.h: Likewise. + * macosx/plugins/DFInput/SDL/include/SDL_config.h: Likewise. + * macosx/plugins/DFInput/SDL/src/joystick/SDL_joystick.c: Likewise. + * macosx/plugins/DFInput/SDL/src/joystick/darwin/SDL_sysjoystick.c: Likewise. + * macosx/plugins/DFInput/SDL/src/joystick/darwin/SDL_sysjoystick_c.h: Likewise. + * macosx/plugins/DFInput/SDL/src/joystick/SDL_sysjoystick.h: Likewise. + * macosx/plugins/DFInput/SDL/src/joystick/SDL_joystick_c.h: Likewise. + * macosx/plugins/DFInput/SDL/src/SDL.c: Likewise. + * macosx/plugins/DFInput/SDL/src/SDL_error_c.h: Likewise. + * macosx/plugins/DFInput/SDL/src/haptic/SDL_syshaptic.h: Likewise. + * macosx/plugins/DFInput/SDL/src/haptic/SDL_haptic_c.h: Likewise. + * macosx/plugins/DFInput/SDL/src/haptic/darwin/SDL_syshaptic.c: Likewise. + * macosx/plugins/DFInput/SDL/src/haptic/SDL_haptic.c: Likewise. + * macosx/plugins/DFInput/SDL/src/SDL_error.c: Likewise. + * macosx/plugins/DFInput/SDL/include/SDL_name.h: Deleted. + * macosx/plugins/DFInput/SDL/include/SDL_version.h: Likewise. + * macosx/plugins/DFInput/DFInput.xcodeproj/project.pbxproj: Updated. + * macosx/plugins/DFInput/macsrc/cfg.h: Include SDL_joystick.h. + * plugins/dfinput/pad.h: Likewise. + * macosx/PcsxController.h: Removed some useless stuff. + * macosx/PcsxController.m: Likewise. + * macosx/English.lproj/PCSX.nib/objects.nib: Likewise. + * macosx/English.lproj/PCSX.nib/classes.nib: Likewise. + * macosx/Pcsx.xcodeproj/project.pbxproj: Added some optimizations for + Deployment build. + +July 29, 2010 Wei Mingzhi + + * macosx/plugins/DFInput/DFInput.xcodeproj/project.pbxproj: Implemented + config dialog box. + * macosx/plugins/DFInput/macsrc/cfg.c: Likewise. + * macosx/plugins/DFInput/macsrc/MappingCell.h: Likewise. + * macosx/plugins/DFInput/macsrc/PadController.m: Likewise. + * macosx/plugins/DFInput/macsrc/cfg.h: Likewise. + * macosx/plugins/DFInput/macsrc/ControllerList.h: Likewise. + * macosx/plugins/DFInput/macsrc/PadView.h: Likewise. + * macosx/plugins/DFInput/macsrc/MappingCell.m: Likewise. + * macosx/plugins/DFInput/macsrc/ControllerList.m: Likewise. + * macosx/plugins/DFInput/macsrc/PadView.m: Likewise. + * macosx/plugins/DFInput/macsrc/PadController.h: Likewise. + * macosx/plugins/DFInput/English.lproj/NetPcsxHIDInputPluginMain.nib: + Likewise. + * macosx/plugins/DFInput/English.lproj/NetPcsxHIDInputPluginMain.nib/ + info.nib: Likewise. + * macosx/plugins/DFInput/English.lproj/NetPcsxHIDInputPluginMain.nib/ + keyedobjects.nib: Likewise. + * macosx/plugins/DFInput/English.lproj/NetPcsxHIDInputPluginMain.nib/ + classes.nib: Likewise. + * macosx/plugins/DFInput/English.lproj/Credits.rtf: Likewise. + * macosx/plugins/DFCdrom/macsrc/cdr-macosx.c: Add check for whether the + disc is really a PSX CD or not. + * macosx/Pcsx.xcodeproj/project.pbxproj: Added DFInput to project. + * macosx/plugins/HIDInput: Removed. + * plugins/peopsxgl/draw.c: Replaced global symbols with glXGetProcAddress + call (courtesy of siveritas). + * AUTHORS: Updated info. + +July 25, 2010 Wei Mingzhi + + * plugins/dfcdrom/cdr.c: Wait for reading thread to complete for all + operations. + * plugins/dfcdrom/cdr.h: Don't define USE_NULL under Mac OS X. + * macosx/plugins/DFCdrom: Added Mac OS X port of DFCdrom. + * macosx/plugins/CDDeviceInterface: Removed old CDDeviceInterface plugin. + * macosx/Pcsx.xcodeproj/project.pbxproj: Added DFCdrom into project. + * plugins/dfinput/pad.c: Minor change for Mac OS X. + * plugins/dfinput/pad.h: Likewise. + * macosx/plugins/DFInput: Added Mac OS X port of DFInput (prelimiary, no + config dialog yet). + +July 18, 2010 Wei Mingzhi + + * plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2: Tweaked the config dialog + to make it less confusing. + * plugins/dfxvideo/gpucfg-0.1df/main.c: Likewise. + +July 17, 2010 Wei Mingzhi + + * plugins/dfcdrom/cdr-libcdio.c: Include libcdio headers before cdr.h. + * macosx/plugins/CDDeviceInterface/src/PlugCD.c: Check for kIODVDMediaClass + as well (MIGHT fix the "Can't check CD-ROM" issue, cannot test). + +July 15, 2010 Wei Mingzhi + + * plugins/dfcdrom/cdr-libcdio.c: Force CAM access mode on FreeBSD. + * plugins/dfcdrom/cdrcfg-0.1df/main.c: Use /dev/cd? instead on /dev/acd? on + FreeBSD. + * plugins/dfcdrom/cdr.h: Likewise. + * plugins/dfxvideo/cfg.c: Don't use 2xSai when no config file exists. + * autogen.sh: Use autoreconf. + +July 14, 2010 Wei Mingzhi + + * plugins/dfcdrom/cdr.h: Silenced warning on macro redefination when using + libcdio with some special configuration. + * plugins/dfsound/spucfg-0.1df/main.c: Set volume to High by default. + +July 13, 2010 Wei Mingzhi + + * libpcsxcore/socket.c: Fixed FTBFS on Windows. + * po/zh_CN.po: Updated. + +July 12, 2010 Wei Mingzhi + + * configure.ac: Use pkgconfig to detect libcdio. + * plugins/dfcdrom/Makefile.am: Likewise. + +July 11, 2010 Wei Mingzhi + + * plugins/dfcdrom/cfg.c: Pick default cdrom device automatically on Solaris. + * plugins/dfsound/spu.c: Reverted the previous change. + +July 10, 2010 Wei Mingzhi + + * configure.ac: Added --enable-libcdio parameter. + * libpcsxcore/cdriso.c: Moved CRC check into... + * libpcsxcore/cdrom.c: ...here. + * libpcsxcore/misc.c: Moved calcCrc() to misc.c. + * libpcsxcore/misc.h: Likewise. + * libpcsxcore/plugins.h: Added CRC field to SubQ struct. + * plugins/dfcdrom/cdr-freebsd.c: Removed. + * plugins/dfcdrom/cdr-solaris.c: Likewise. + * plugins/dfcdrom/cdr-linux.c: Added raw MMC command support. + * plugins/dfcdrom/cdr-null.c: Return 0 for PlayCDDA()/StopCDDA(). + * plugins/dfcdrom/cdr.c: Moved several utility functions to util.c. + * plugins/dfcdrom/util.c: Added. + * plugins/dfcdrom/cfg.c: Removed unnecessary includes. + * plugins/dfcdrom/cdr-libcdio.c: Added libcdio support. + * plugins/dfcdrom/Makefile.am: Added util.c and cdr-libcdio.c, removed + cdr-freebsd.c and cdr-solaris.c. + * plugins/dfsound/cfg.c: Store config file into plugins dir by default. + * plugins/dfsound/spu.c: Made volume louder. + * po/POTFILES.in: Added files in plugins/bladesio1. + * po/update-pot.sh: Likewise. + * po/pcsx.pot, po/*.po: Updated. + +July 9, 2010 Wei Mingzhi + + * plugins/dfcdrom/cdr-solaris.c: Added (not implemented for now). + * plugins/dfcdrom/Makefile.am: Added cdr-solaris.c. + * plugins/dfcdrom/cdr-freebsd.c: Return 0 for PlayCDDA()/StopCDDA(). + * gui/ConfDlg.c: Don't use dlerror() to check for symbol load failure. + * plugins/dfcdrom/cdr.c: Make cdHandle singleton as it could be different + type on some OS and we don't need to open multiple handles. + * plugins/dfcdrom/cdr.h: Likewise. + * plugins/dfcdrom/cdr-linux.c: Likewise. + * plugins/dfcdrom/cdrcfg-0.1df/main.c: Added device listing for Solaris. + * configure.ac: Fixed FTBFS on Solaris. + * plugins/peopsxgl/draw.c: Don't use glColorTableEXT on Solaris. + * libpcsxcore/socket.c: Silenced warning on Solaris. + * plugins/dfinput/cfg.c: Renamed LoadConfig()/SaveConfig() to avoid problems + with some OSes like Solaris. + * plugins/dfinput/cfg-gtk2.c: Likewise. + * plugins/dfinput/pad.c: Likewise. + * plugins/dfinput/pad.h: Likewise. + * gui/AboutDlg.c: Minor text change. + +July 8, 2010 Wei Mingzhi + + * plugins/dfcdrom/cdr.c: Refactored for better portability. + * plugins/dfcdrom/cdr.h: Likewise. + * plugins/dfcdrom/cfg.c: Likewise. + * plugins/dfcdrom/cdr-linux.c: Likewise. + * plugins/dfcdrom/cdr-null.c: Likewise. + * plugins/dfcdrom/cdrcfg-0.1df/main.c: Likewise. + * plugins/dfcdrom/cdr-freebsd.c: Added prelimiary FreeBSD port (not working + yet). + * plugins/dfcdrom/Makefile.am: Added cdr-linux.c, cdr-null.c, cdr-freebsd.c. + * configure.ac: Added bladesio1. + * Makefile.am: Likewise. + +July 7, 2010 edgbla + + * plugins/bladesio1/gui.c: Sio1 plugin (dummy). + * plugins/bladesio1/Makefile.am: Likewise. + * plugins/bladesio1/settings.c: Likewise. + * plugins/bladesio1/settings.h: Likewise. + * plugins/bladesio1/sio1.c: Likewise. + * plugins/bladesio1/sio1.h: Likewise. + * plugins/bladesio1/sio1.glade2: Likewise. + +July 7, 2010 Wei Mingzhi + + * libpcsxcore/plugins.c: #ifdef'ed out the currently unused Sio1 API. + * libpcsxcore/plugins.h: Likewise. + * libpcsxcore/psxhw.c: Likewise. + * win32/gui/AboutDlg.c: Minor text change. + * po/pcsx.pot, po/*.po: Updated. + * libpcsxcore/socket.c: Fixed FTBFS on FreeBSD. + * configure.ac: Likewise. + * gui/Makefile.am: Likewise. + * plugins/dfcdrom/cdr-null.c: Likewise. + * libpcsxcore/plugins.c: Fixed plugin loading with FreeBSD. + +July 4, 2010 edgbla + + * libpcsxcore/plugins.c: GPUvBlank (for gpuBladeSoft now, experimental). + * libpcsxcore/plugins.h: Likewise. + * libpcsxcore/psxcounters.c: Likewise. + +July 3, 2010 edgbla + + * libpcsxcore/psxhw.c: Sio1 interface (link cable). + * libpcsxcore/plugins.c: Likewise. + * libpcsxcore/plugins.h: Likewise. + * libpcsxcore/psxcommon.h: Likewise. + +July 2, 2010 Wei Mingzhi + + * libpcsxcore/cdriso.c: Fixed subchannel data handling with images ripped + with cdrdao. Removed support for AcetoneISO. Parse .cue file as .toc file + when needed to satisfy some stupid tutorials which tell users to use cdrdao + to rip a "bin/cue" image which is in fact a "bin/toc" image. + +July 2, 2010 edgbla + + * po/ru_RU.po: Updated. + +July 1, 2010 Wei Mingzhi + + * libpcsxcore/cdriso.c: Added support for images ripped with cdrdao with + "--read-subchan rw_raw" for subchannel data. + * po/pcsx.pot, po/*.po: Updated. + +Jun 30, 2010 Wei Mingzhi + + * macosx/PcsxController.m: Default dynarec to off until it's actually working + for Mac OS X :( + +Jun 29, 2010 Wei Mingzhi + + * win32/gui/plugin.c: Close PAD plugins before other plugins and don't check + return value for PADclose(), which should fix issues with LilyPad. + * plugins/dfxvideo/gpu.c: Added 'fake gpu busy' hack and GPUsetFix() API + from P.E.Op.S Soft GPU 1.18. + * plugins/dfxvideo/externals.h: Likewise. + * plugins/dfxvideo/prim.c: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/main.c: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2: Likewise. + * macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.nib/classes.nib: + Likewise. + * macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.nib/keyedobjects.nib: + Likewise. + * po/pcsx.pot, po/*.po: Updated. + +Jun 26, 2010 Wei Mingzhi + + * libpcsxcore/psxbios.c: Fixed bcopy() (FF9 battle crash with HLE BIOS - my + mistake :( ). + * libpcsxcore/misc.c: Added check for HLE BIOS in savestate, bumped savestate + version, don't byteswap savestate version as part of savestate data is not + endianness clean. + +Jun 24, 2010 Wei Mingzhi + + * plugins/dfsound/spu.c: Reset lastch to -1 in SPUinit(). + * plugins/dfsound/psemu.c: Removed support for obsoleted ancient API. + * plugins/dfsound/Makefile.am: Removed psemu.c. + * macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj: Likewise. + +Jun 23, 2010 Wei Mingzhi + + * libpcsxcore/sio.c: Convert more ASCII characters to half-width. + +Jun 21, 2010 Wei Mingzhi + + * libpcsxcore/psxbios.c: Use a separate flag to identify whether we are + inside a softcall or not, as ra might be modified inside the interrupt + handler. + * libpcsxcore/psxbios.h: Likewise. + * libpcsxcore/psxcommon.c: Likewise. + * plugins/dfsound/spu.c: Moved initialization routine from SPUopen() into + SPUinit(). + * plugins/dfsound/freeze.c: Save spuAddr as well. + * po/Makefile.in.in: Silenced warning. + +Jun 20, 2010 Wei Mingzhi + + * plugins/dfsound/freeze.c: Reset lastch when loading state, which fixes + occasionally crash after state loading. + * plugins/dfsound/spu.c: Likewise. + +Jun 19, 2010 Wei Mingzhi + + * macosx/PcsxController.m: Do not simulate CD case open if user clicked + Cancel in switch ISO dialog. + +Jun 16, 2010 Wei Mingzhi + + * libpcsxcore/psxcommon.c: Do not allow hotkeys inside a softcall from HLE + BIOS. + * configure.ac: Removed -fno-dse, which is no longer necessary. + +Jun 9, 2010 Wei Mingzhi + + * win32/pcsx.rc: Embed manifest properly under MSVC6. + +Jun 8, 2010 Wei Mingzhi + + * plugins/dfcdrom/cdr-linux.c: Implemented CDRgetTE() and CDRreadCDDA() (not + tested). + * plugins/dfcdrom/cdr-null.c: Added CDRgetBufferSub(). + * libpcsxcore/plugins.c: CDRgetBufferSub() is now mandatory (again) :) + +Jun 7, 2010 Wei Mingzhi + + * libpcsxcore/cdrom.c: Use boolean/TRUE/FALSE for where it should, don't use + "long" type for cdrStruct which is to be saved in savestates. + * libpcsxcore/cdrom.h: Likewise. + * libpcsxcore/misc.c: Bumped savestate version. + * libpcsxcore/plugins.c: Added support for CDRreadCDDA()/CDRgetTE() (not used + for now). + * libpcsxcore/plugins.h: Likewise. + +Jun 6, 2010 Wei Mingzhi + + * libpcsxcore/sio.c: Fixed: 'y' and 'z' not converted to half-width. + +Jun 4, 2010 Wei Mingzhi + + * gui/Plugin.c: Hack-fixed the bug which causes crash when loading state + with dynarec CPU core. A large amount of refactor is needed for a proper + fix. + * win32/gui/WndMain.c: Changed language code corresponding to the ones in + source tree. + * libpcsxcore/psxmem.c: Minor comment fix. + +Jun 3, 2010 Wei Mingzhi + + * libpcsxcore/cheat.c: Fixed endianness issue (not tested). + * libpcsxcore/cdrom.c: Changed CDR interrupt timing value so that it behaves + the same as old revisions. Not sure if it breaks or unbreaks anything. + * libpcsxcore/psxbios.c: Silenced some GCC warnings. + * libpcsxcore/psxcounters.c: Likewise. + * libpcsxcore/misc.c: Bumped savestate version. + * libpcsxcore/ix86/iR3000A.c: Use %x instead of %lx. + * libpcsxcore/ix86_64/iR3000A-64.c: Likewise. + * po/zh_CN.po, po/zh_TW.po: Updated ("PS" seems to be more common than "PSX" + in Asian regions). + +Jun 2, 2010 Wei Mingzhi + + * gui/MemcardDlg.c: Use unsigned for currentIcon. + * libpcsxcore/cdrom.c: Use %x instead of %lx. + * libpcsxcore/psxbios.c: Likewise. + * libpcsxcore/psxdma.c: Likewise. + * libpcsxcore/psxhw.c: Likewise. + * gui/Makefile.am: Added -ldl. + * plugins/dfinput/Makefile.am: Added -lX11 to cfgDFInput_LDFLAGS. + +Jun 1, 2010 Wei Mingzhi + + * gui/MemcardDlg.c: Fixed icon animation. + * gui/ConfDlg.c: Minor text change. + * win32/gui/ConfigurePlugins.c: Likewise. + * po/pcsx.pot, po/zh_CN.po, po/zh_TW.po, po/ru_RU.po, po/it.po, po/pt_BR.po: + Updated. + * win32/pcsx.dev: Added sjisfont.h. + +May 31, 2010 Wei Mingzhi + + * libpcsxcore/psxbios.c: Implemented Krom2RawAdd(). + * libpcsxcore/sjisfont.h: Added font data. + * macosx/Pcsx.xcodeproj/project.pbxproj: Added sjisfont.h. + * win32/pcsx.vcproj: Likewise. + * win32/pcsx.dsp: Likewise. + * libpcsxcore/Makefile.am: Likewise. + +May 30, 2010 Wei Mingzhi + + * libpcsxcore/psxbios.c: Fixed memcpy(), create new stack for interrupt + handlers. + +May 29, 2010 Wei Mingzhi + + * libpcsxcore/psxbios.c: Implemented more functions without standard C library + calls. + +May 28, 2010 Wei Mingzhi + + * macosx/Pcsx.xcodeproj/project.pbxproj: Fixed Xcode Project. + * macosx/English.lproj/InfoPlist.strings: Updated info. + * autogen.sh: Removed autoreconf. + * libpcsxcore/psxbios.c: Implemented more functions by hand (qsort() is not + tested). + +May 25, 2010 Wei Mingzhi + + * po/pt_BR.po, po/it.po, po/zh_TW.po, po/ru_RU.po, po/pcsx.pot, po/zh_CN.po: + Updated. + * win32/gui/WndMain.c: Do not make temporary buffer static. + * win32/intl/gettext.c: Likewise. + +May 24, 2010 Wei Mingzhi + + * win32/gui/WndMain.c: Also show Japanese titles properly for Windows + (need to set ACP to east-asian languages). + * win32/intl/gettext.c: Added a hack for UTF-8 support. + * win32/gui/AboutDlg.c: Updated info. + * win32/config.h: Silenced MSVC6 warnings. + * libpcsxcore/psxbios.c: Implemented more functions. RNG should behave + exactly the same as real BIOS now. + * libpcsxcore/psxcounters.c: Fixed freeze bug when launching an NTSC game + when Config.PsxAuto is enabled and Config.PsxType is set to PAL. + +May 23, 2010 Wei Mingzhi + + * AUTHORS: Updated info. + * gui/AboutDlg.c: Likewise, and fixed FTBFS on SLED 10. + * gui/MemcardDlg.c: Show Japanese titles properly. + * libpcsxcore/sio.h: Likewise. + * libpcsxcore/sio.c: Likewise. + +May 22, 2010 Wei Mingzhi + + * plugins/dfsound/pulseaudio.c: Use Native Endian instead of Little Endian. + +May 21, 2010 Wei Mingzhi + + * plugins/dfsound/oss.c: Readded OSS, PulseAudio, ALSA & NULL backends. + * plugins/dfsound/pulseaudio.c: Likewise. + * plugins/dfsound/nullsnd.c: Likewise. + * plugins/dfsound/alsa.c: Likewise. + * plugins/dfsound/spu.c: Likewise. + * configure.ac: Added an option --enable-sound to specify the sound backend. + * plugins/dfsound/Makefile.am: Likewise. + * po/pt_BR.po, po/it.po, po/zh_TW.po, po/ru_RU.po, po/pcsx.pot, po/zh_CN.po: + Updated. + * libpcsxcore/psxbios.c: Implemented several HLE BIOS functions inside the + core instead of calling the standard C functions. (Not done yet) + * plugins/dfsound/sdl.c: Changed buffer size. + * libpcsxcore/psxinterpreter.c: Revert the previous revert (why the problem + on amd64 disappeared?). + * libpcsxcore/ppc/pR3000A.c: Likewise. + * libpcsxcore/cdrom.c: Likewise. + * libpcsxcore/ix86_64/iR3000A-64.c: Likewise. + * libpcsxcore/ix86/iR3000A.c: Likewise. + * libpcsxcore/sio.c: Likewise. + * libpcsxcore/psxdma.c: Likewise. + * libpcsxcore/psxcounters.c: Likewise. + * libpcsxcore/mdec.c: Likewise, and fixed the cycle value in mdec1Interrupt(). + +May 20, 2010 Wei Mingzhi + + * macosx/main.m: Removed obsolete code, added const to function definations. + * libpcsxcore/plugins.c: Added brackets around the use of CheckErr(). + * libpcsxcore/psxcommon.h: Added brackets around gzfreeze(). + * plugins/dfinput/Makefile.am: Use $(SDL_CFLAGS) and $(SDL_LIBS). + * plugins/dfsound/Makefile.am: Likewise. + * libpcsxcore/psxmem.c: Map 1fc00000-1fc7ffff and 9fc00000-9fc7ffff to BIOS + as well. + +May 19, 2010 Wei Mingzhi + + * plugins/dfsound/sdl.c: Use SDL for Sound Plugin. + * plugins/dfsound/oss.c: Removed OSS, PulseAudio, ALSA & NULL sound code. If + these are ever needed in the future we still have the thing called version + control. + * plugins/dfsound/pulseaudio.c: Likewise. + * plugins/dfsound/nullsnd.c: Likewise. + * plugins/dfsound/alsa.c: Likewise. + * plugins/dfsound/spu.c: Removed OSS/PulseAudio/ALSA/NULL plugin names, + added SDL plugin name. + * debian/control: Removed libasound2-dev. + * debian/rules: Removed --enable-alsa. + * configure.ac: Removed ALSA, PulseAudio & OSS stuff. + * plugins/dfsound/Makefile.am: Likewise. + * po/pt_BR.po, po/it.po, po/zh_TW.po, po/ru_RU.po, po/pcsx.pot, po/zh_CN.po: + Updated. + * libpcsxcore/psxinterpreter.c: Reverted the change to how BIAS was handled in + r48024, which was causing problems with x64 dynarec core. + * libpcsxcore/ppc/pR3000A.c: Likewise. + * libpcsxcore/cdrom.c: Likewise. + * libpcsxcore/ix86_64/iR3000A-64.c: Likewise. + * libpcsxcore/r3000a.c: Likewise. + * libpcsxcore/mdec.c: Likewise. + * libpcsxcore/ix86/iR3000A.c: Likewise. + * libpcsxcore/sio.c: Likewise. + * libpcsxcore/psxdma.c: Likewise. + * libpcsxcore/psxcounters.c: Likewise. + +May 16, 2010 Wei Mingzhi + + * libpcsxcore/plugins.c: Added brackets around CheckErr() and LoadSym(). + +May 15, 2010 edgbla + + * libpcsxcore/psxdma.h: spu dma was fixed. + * libpcsxcore/r3000a.c: Likewise. + * libpcsxcore/psxdma.c: Likewise. + +May 14, 2010 Wei Mingzhi + + * libpcsxcore/plugins.c: Fixed crash when launching another game if netplay + plugin is selected but not used during the previously running game. + * gui/Plugin.c: Use TRUE/FALSE for Config.UseNet. + * win32/gui/plugin.c: Likewise. + * libpcsxcore/psxbios.c: Minor cleanup. + +May 14, 2010 edgbla + + * libpcsxcore/psxinterpreter.c: Bias was moved into rec/int. + * libpcsxcore/ppc/pR3000A.c: Likewise. + * libpcsxcore/cdrom.c: Likewise. + * libpcsxcore/ix86_64/iR3000A-64.c: Likewise. + * libpcsxcore/mdec.c: Likewise. + * libpcsxcore/ix86/iR3000A.c: Likewise. + * libpcsxcore/psxcommon.h: Likewise. + * libpcsxcore/sio.c: Likewise. + * libpcsxcore/psxdma.c: Likewise. + * libpcsxcore/psxcounters.c: Likewise. + * po/ru_RU.po: Updated. + +May 14, 2010 Wei Mingzhi + + * data/pcsx.glade2: Moved About dialog box out of glade2 file. + * gui/AboutDlg.c: Added. + * gui/AboutDlg.h: Likewise. + * gui/Gtk2Gui.c: Call RunAboutDialog() instead of showing about dialog from + glade2 file. + * po/pcsx.pot, po/pt_BR.po, po/it.po, po/zh_TW.po, po/ru_RU.po, po/zh_CN.po: + Updated. + * gui/Makefile.am: Added AboutDlg.c. + * po/POTFILES.in: Added all current files. + +May 13, 2010 edgbla + + * libpcsxcore/plugins.h: CDRgetBufferSub for internal cdr plugin. + * libpcsxcore/plugins.c: Likewise. + +May 13, 2010 Wei Mingzhi + + * plugins/dfnet/gui.c: Get the correct address under GNU/Linux. + * plugins/dfnet/dfnet.c: Removed sockGetIP(), which is unused in plugin. + * plugins/dfnet/dfnet.h: Likewise. + * plugins/dfnet/dfnet.glade2: Fixed max length of IP address entry. + * libpcsxcore/gte.c: Improved accuracy (or 'inaccuracy') of the divider + (courtesy of shalma). + * libpcsxcore/gte_divider.h: Added. + * win32/pcsx.dsp: Added gte_divider.h. + * win32/pcsx.vcproj: Likewise. + * win32/pcsx.dev: Likewise. + +May 13, 2010 edgbla + + * libpcsxcore/plugins.h: PADreadPort1/2 for NRage pad plugin (windows). + * libpcsxcore/plugins.c: Likewise. + * po/ru_RU.po: Updated. + +May 13, 2010 Wei Mingzhi + + * configure.ac: Added plugins/dfnet/Makefile.am. + * Makefile.am: Added plugins/dfnet. + * plugins/dfnet/dfnet.c: Added NetPlay plugin (based on netSock). + * plugins/dfnet/unix.c: Likewise. + * plugins/dfnet/cfg.c: Likewise. + * plugins/dfnet/gui.c: Likewise. + * plugins/dfnet/dfnet.h: Likewise. + * plugins/dfnet/Makefile.am: Likewise. + * plugins/dfnet/dfnet.glade2: Likewise. + * plugins/dfinput/cfg-gtk2.c: Use gtk_dialog_run() for about dialog. + * plugins/dfcdrom/cdrcfg-0.1df/main.c: Likewise. + * po/pt_BR.po, po/it.po, po/zh_CN.po, po/zh_TW.po, po/ru_RU.po, po/pcsx.pot: + Updated. + * po/update-pot.sh: Added files in plugins/dfnet. + +May 12, 2010 Wei Mingzhi + + * libpcsxcore/sio.c: Erase CdromId and CdromLabel when net connection closed. + * libpcsxcore/psxcommon.h: Use boolean type for config values, byte for enum + values. + * gui/Config.c: Use TRUE/FALSE for boolean values, enums for byte values in + config. + * gui/ConfDlg.c: Likewise. + * macosx/PcsxController.m: Likewise. + * win32/gui/ConfigurePlugins.c: Likewise. + * win32/gui/WndMain.c: Likewise. + * libpcsxcore/psxmem.c: Likewise. + * libpcsxcore/r3000a.c: Likewise. + * libpcsxcore/plugins.c: Likewise. + * libpcsxcore/misc.c: Likewise. + * AUTHORS: Updated info. + +May 11, 2010 Wei Mingzhi + + * gui/Gtk2Gui.c: Use TRUE/FALSE instead of 0/1 for NetOpened. + * gui/Plugin.c: Likewise. + * win32/gui/plugin.c: Likewise. + * macosx/Plugin.c: Removed obsolete code. + +May 10, 2010 edgbla + + * data/pcsx.glade2: Memory cards dialog is now resizable, icons were + enlarged and animated. (experimental,gtk) + * gui/MemcardDlg.c: Likewise. + +May 10, 2010 Wei Mingzhi + + * libpcsxcore/psxcommon.c: Include ppf.h. + * libpcsxcore/misc.c: Silenced MSVC warning. + +May 10, 2010 Wei Mingzhi + + * libpcsxcore/plugins.c: Use functions instead of using global variables, + other minor cleanups. + * gui/Plugin.c: Likewise. + * gui/LnxMain.c: Likewise. + * gui/Gtk2Gui.c: Likewise. + * win32/gui/plugin.c: Likewise. + * win32/gui/WndMain.c: Likewise. + * libpcsxcore/cdriso.c: Likewise. + * libpcsxcore/psxcommon.c: Likewise. + * libpcsxcore/plugins.h: Likewise. + * libpcsxcore/psxcommon.h: Likewise. + * libpcsxcore/sio.c: Likewise. + * libpcsxcore/psxhw.c: Likewise. + * libpcsxcore/psxbios.c: Moved declaration of netError() into ... + * libpcsxcore/sio.h: Here. + +May 10, 2010 Wei Mingzhi + + * libpcsxcore/cdrom.c: Got rid of gzfreezel. + * libpcsxcore/mdec.c: Likewise. + * libpcsxcore/psxcommon.h: Likewise. + * libpcsxcore/sio.c: Likewise. + * libpcsxcore/psxcounters.c: Likewise. + * libpcsxcore/misc.c: Added savestate versioning support. + * gui/Gtk2Gui.c: Don't reset when loading from savestate unless loading + succeeded. + +May 10, 2010 edgbla + + * libpcsxcore/sio.h: Some code (regs,macro) was moved to the 'c' file. + * libpcsxcore/sio.c: Likewise. + +May 10, 2010 Wei Mingzhi + + * configure.ac: libbz2 is no longer needed. + * debian/control: Likewise. + * libpcsxcore/plugins.c: CDRgetBufferSub() is now mandatory. + * libpcsxcore/cdrom.h: Savestate compatibility is already broken, so no need + to stuff garbage into saved files :) + * libpcsxcore/mdec.c: Likewise. + * libpcsxcore/psxhw.c: Likewise. + * libpcsxcore/sio.c: Likewise. + * libpcsxcore/psxcounters.c: Likewise. + +May 9, 2010 edgbla + + * libpcsxcore/psxcounters.c: psxRcntFreeze was fixed. + * plugins/dfxvideo/prim.c: Returned some code (iGPUHeight=1024), IMO, it's + wrong, can't perform the tests. + +May 9, 2010 Wei Mingzhi + + * libpcsxcore/plugins.c: Removed support for ancient GPU/SPU plugin APIs. + * libpcsxcore/plugins.h: Likewise. + +May 8, 2010 edgbla + + * plugins/dfxvideo/prim.c: Dithering logic was fixed. + * plugins/dfxvideo/gpucfg-0.1df/main.c: Likewise. + +May 8, 2010 Wei Mingzhi + + * libpcsxcore/misc.c: Use const for input strings. + * libpcsxcore/misc.h: Likewise. + * libpcsxcore/spu.c: Got rid of 0x80000000 flag of psxRegs.interrupt. + * libpcsxcore/psxinterpreter.c: Likewise. + * libpcsxcore/cdrom.c: Likewise. + * libpcsxcore/ix86_64/iR3000A-64.c: Likewise. + * libpcsxcore/r3000a.c: Likewise. + * libpcsxcore/psxhw.c: Likewise. + * libpcsxcore/r3000a.h: Likewise. + * libpcsxcore/ix86/iR3000A.c: Likewise. + * libpcsxcore/psxhw.h: Likewise. + * libpcsxcore/sio.c: Likewise. + * libpcsxcore/psxcounters.c: Likewise. + +May 8, 2010 Wei Mingzhi + + * libpcsxcore/sio.h: Added extern "C" to all headers. + * libpcsxcore/misc.h: Likewise. + * libpcsxcore/ppc/reguse.h: Likewise. + * libpcsxcore/ppc/pGte.h: Likewise. + * libpcsxcore/ppc/ppc.h: Likewise. + * libpcsxcore/psxdma.h: Likewise. + * libpcsxcore/psxcounters.h: Likewise. + * libpcsxcore/cdrom.h: Likewise. + * libpcsxcore/psxmem.h: Likewise. + * libpcsxcore/decode_xa.h: Likewise. + * libpcsxcore/coff.h: Likewise. + * libpcsxcore/gte.h: Likewise. + * libpcsxcore/ix86_64/iGte.h: Likewise. + * libpcsxcore/cdriso.h: Likewise. + * libpcsxcore/system.h: Likewise. + * libpcsxcore/ppf.h: Likewise. + * libpcsxcore/debug.h: Likewise. + * libpcsxcore/psxbios.h: Likewise. + * libpcsxcore/psxhle.h: Likewise. + * libpcsxcore/r3000a.h: Likewise. + * libpcsxcore/spu.h: Likewise. + * libpcsxcore/psemu_plugin_defs.h: Likewise. + * libpcsxcore/mdec.h: Likewise. + * libpcsxcore/plugins.h: Likewise. + * libpcsxcore/ix86/iGte.h: Likewise. + * libpcsxcore/psxhw.h: Likewise. + * libpcsxcore/cheat.h: Likewise. + * libpcsxcore/socket.h: Likewise. + * libpcsxcore/r3000a.c: Separated cheat related stuff out of the r3000a code. + * libpcsxcore/psxcounters.c: Likewise. + * libpcsxcore/psxcommon.h: Added EmuInit, EmuReset, EmuShutdown & EmuReset. + * libpcsxcore/misc.c: Moved logging stuff to psxcommon.c. + * libpcsxcore/psxcommon.c: Added EmuInit, EmuReset, EmuShutdown & EmuReset, + moved logging stuff from misc.c to here. + * gui/LnxMain.c: Call Emu* instead of psx*. + * macosx/main.m: Likewise. + * macosx/EmuThread.m: Likewise. + * win32/gui/WndMain.c: Likewise. + * libpcsxcore/ix86/ix86.c: Moved definations in ix86.h to source file. + * libpcsxcore/ix86/ix86.h: Likewise. + +May 7, 2010 Wei Mingzhi + + * libpcsxcore/r3000a.c: Removed unneeded declarations, other minor cleanups. + * libpcsxcore/plugins.c: Likewise. + * libpcsxcore/plugins.h: Likewise. + * libpcsxcore/psxcommon.h: Added definations for boolean type, as well as + TRUE and FALSE (not used for now). + * gui/Linux.h: Declares StatesC here. + +May 7, 2010 Wei Mingzhi + + * libpcsxcore/misc.h: Preparing for refactor/cleanup, moved all definations + into .c files, other minor cleanups. (Breaks Mac OS X and maybe Windows as + well for now, will fix later) + * libpcsxcore/psxdma.h: Likewise. + * libpcsxcore/psxcounters.h: Likewise. + * libpcsxcore/cdrom.c: Likewise. + * libpcsxcore/cdrom.h: Likewise. + * libpcsxcore/psxmem.c: Likewise. + * libpcsxcore/psxmem.h: Likewise. + * libpcsxcore/cdriso.c: Likewise. + * libpcsxcore/ppf.c: Likewise. + * libpcsxcore/cdriso.h: Likewise. + * libpcsxcore/system.h: Likewise. + * libpcsxcore/debug.h: Likewise. + * libpcsxcore/r3000a.c: Likewise. + * libpcsxcore/psxhle.h: Likewise. + * libpcsxcore/spu.h: Likewise. + * libpcsxcore/mdec.h: Likewise. + * libpcsxcore/psxhw.h: Likewise. + * libpcsxcore/plugins.c: Likewise. + * libpcsxcore/plugins.h: Likewise. + * libpcsxcore/psxcommon.h: Likewise. + * libpcsxcore/sio.c: Likewise. + * libpcsxcore/misc.c: Likewise. + * libpcsxcore/psxcounters.c: Likewise. + * libpcsxcore/ix86_64/iR3000A-64.c: Likewise. + * libpcsxcore/ix86_64/ix86-64.c: Likewise. + * gui/LnxMain.c: Likewise. + * gui/Gtk2Gui.c: Likewise. + * win32/WndMain.c: Likewise. + * libpcsxcore/psxcommon.c: Added. + * win32/pcsx.dsp: Added psxcommon.c. + * win32/pcsx.dev: Likewise. + * win32/pcsx.vcproj: Likewise. + * libpcsxcore/Makefile.am: Likewise. + * autogen.sh: Run autoreconf as well. + * AUTHORS: Updated info. + +May 5, 2010 edgbla + + * libpcsxcore/psxcounters.c: Updated (Rc2Disable). + +May 5, 2010 Wei Mingzhi + + * gui/DebugMemory.c: Show 0x7f as dots. + * libpcsxcore/plugins.c: Got rid of old PAD_readPort1()/PAD_readPort2() APIs. + PAD_startPoll() and PAD_poll() are now required. + * libpcsxcore/plugins.h: Likewise. + * libpcsxcore/sio.c: Likewise. + * libpcsxcore/psemu_plugin_defs.h: Updated info. + +May 2, 2010 edgbla + + * libpcsxcore/psxcounters.h: Root counters code was written from scratch. + * libpcsxcore/psxcounters.c: Likewise. + * libpcsxcore/psxhw.c: Likewise. + * libpcsxcore/misc.c: Likewise. + * libpcsxcore/ix86/iR3000A.c: Likewise. + * libpcsxcore/ix86_64/iR3000A-64.c: Likewise. + * libpcsxcore/ppc/pR3000A.c: Likewise. + +April 30, 2010 Wei Mingzhi + + * Mass update to the copyright headers. Fixed typo in FSF's address, + Removed obsolete URL. (No real change :) ) + +April 24, 2010 Wei Mingzhi + + * win32/pcsx.rc: Don't include afxres.h, which doesn't exist in MSVC + 2010 Express. + +April 18, 2010 edgbla + + * po/ru_RU.po: Updated. + +April 17, 2010 Wei Mingzhi + + * po/ru_RU.po: Added Russian translation by edgbla. + * po/update-pot.sh: Added ru_RU.po. + * po/LINGUAS: Likewise. + * AUTHORS: Updated info. + +April 16, 2010 Wei Mingzhi + + * plugins/peopsxgl/soft.c: Applied the same fix by edgbla as dfxvideo. + * libpcsxcore/gte.c: Use integer math for division operations. + +April 15, 2010 Wei Mingzhi + + * plugins/dfsound/freeze.c: Fixed the sound doesn't always play properly + after loading the state. (Thanks edgbla) + * libpcsxcore/psxmem.c: Fixed KKND freeze at startup. (edgbla) + * libpcsxcore/gte.c: Fixed gteDCPL. (edgbla) + * AUTHORS: Updated info. + +April 14, 2010 Wei Mingzhi + + * libpcsxcore/gte.c: Use u32 instead of unsigned long. + * COPYING: Fixed a typo in FSF's address. + * plugins/dfxvideo/soft.c: Army Man invisible bullets fix (courtesy of + edgbla). + * AUTHORS: Updated info. + * data/pcsx.glade2: Likewise. + +April 13, 2010 Wei Mingzhi + + * libpcsxcore/gte.c: Backported the new GTE code from PCSX-Revolution project + (http://code.google.com/p/pcsx-revolution), which is more accurate & fixes + at least graphic corruption problems with Mat Hoffman's Pro BMX. + * libpcsxcore/gte.h: Likewise. + * libpcsxcore/r3000a.h: Likewise. + * libpcsxcore/ppc/pGte.h: Call functions in gte.c instead of generating + machine code directly for now. + * libpcsxcore/ix86_64/iGte.h: Likewise. + * libpcsxcore/ix86/iGte.h: Likewise. + * libpcsxcore/debug.h: Removed GTE_DUMP. + * gui/LnxMain.c: Likewise. + * macosx/main.m: Likewise. + * win32/gui/WndMain.c: Likewise. + +April 11, 2010 Wei Mingzhi + + * libpcsxcore/cdriso.c: Check the CRC value of subchannel after reading. + * gui/DebugMemory.c: Allow using a hexa string instead of one value for + Memory Patch. + * po/zh_CN.po, po/zh_TW.po, po/it.po, po/pt_BR.po, po/pcsx.pot: Updated. + +April 10, 2010 Wei Mingzhi + + * data/pcsx.glade2: Added "Memory Dump" to menu item. Added Memory Viewer + dialog box. Added more info to About dialog box. + * gui/Gtk2Gui.c: Likewise. + * gui/DebugMemory.c: Implemented memory viewer/dumper. + * gui/DebugMemory.h: Likewise. + * gui/Makefile.am: Added DebugMemory.c. + * gui/Cheat.c: Changed the order of OK/Cancel buttons for consistency with + GNOME UI standards. + * libpcsxcore/psxmem.c: Minor cleanup (thanks Sebun). + * libpcsxcore/spu.c: Likewise. + * libpcsxcore/cdrom.c: Check case open/close in CdlStop (courtesy of shalma). + * plugins/peopsxgl/gpucfg/callbacks.c: Fixed warnings. + * po/zh_CN.po, po/zh_TW.po, po/it.po, po/pt_BR.po, po/pcsx.pot: Updated. + +March 21, 2010 Wei Mingzhi + + * libpcsxcore/mdec.c: Minor cleanup. + +March 18, 2010 Wei Mingzhi + + * macosx/plugins/HIDInput/src/PlugPAD.c: Commented out calls to + HIDCalibrateValue(), which caused problem in some cases. + +March 17, 2010 Wei Mingzhi + + * macosx/plugins/HIDInput/HIDInput.xcodeproj/project.pbxproj: Fixed build + issue. + +March 16, 2010 Wei Mingzhi + + * po/it.po: Updated Italian translation by Giovanni Scafora. + +March 15, 2010 Wei Mingzhi + + * libpcsxcore/mdec.c: 0x1f should be 31 rather than 15 (stupid /me). + * po/it.po: Added Italian translation (Thanks Giovanni Scafora). + * AUTHORS, po/LINGUAS, po/update-pot.sh: Updated. + +March 14, 2010 Wei Mingzhi + + * libpcsxcore/mdec.c: Rewritten MDEC decoder to replace non-free code, also + fixes image quality issues and improves decoding speed. (Thanks gorlik) + * AUTHORS: Updated info. + +March 12, 2010 Wei Mingzhi + + * gui/LnxMain.c: Fixed -cdfile switch (Thanks NeToU). + * AUTHORS: Updated info. + +March 6, 2010 Wei Mingzhi + + * libpcsxcore/ppf.c: Speeded up the PPF loading routine when the PPF file + is "in order". + +February 23, 2010 Wei Mingzhi + + * plugins/dfinput/analog.c: Confirmed center value should be 127 instead of + 128, removed obsolete comments. + (http://code.google.com/p/pcsx2/source/detail?r=2587) + +February 18, 2010 Wei Mingzhi + + * AUTHORS: Updated info. + +February 17, 2010 Tristin Celestin + + * configure.ac: Removed PulseAudio Simple API support. + * plugins/dfsound/Makefile.am: Likewise. + * plugins/dfsound/nullsnd.c: Likewise. + * plugins/dfsound/spu.c: Likewise. + * plugins/dfsound/pulseaudiosimple.c: Removed. + * plugins/dfsound/pulseaudio.c: Fixed high-compatibility (SPUasync) mode. + +February 15, 2010 Wei Mingzhi + + * libpcsxcore/psxhw.c: Don't skip calls to psxDman() when TR flag of CHCR is + true, which fixes the menu problem in Dragon Quest 7. + * plugins/dfcdrom/cdr-linux.c: Fixed subchannel reading in threaded mode. + +February 14, 2010 Wei Mingzhi + + * libpcsxcore/cdrom.c: Fixed GetlocP, which solves the problem with libcrypt + copy protected games. (Thanks shalma) + +February 13, 2010 Wei Mingzhi + + * libpcsxcore/cdrom.c: Clear the 0x20 flag when stop reading, which fixes the + problem with Syphon Filter. + * libpcsxcore/psxhw.c: Always update HW_DMAx_CHCR in DmaExec(), which fixes + the problem with Harvest Moon. + (Thanks shalma: http://forums.ngemu.com/pcsx-discussion/116599-developers-wanted-pcsx-revival-2.html) + +February 10, 2010 Tristin Celestin + + * plugins/dfsound/pulseaudio.c: PulseAudio Normal API support is now working + in threaded non-SPUasync() mode. + +February 7, 2010 Tristin Celestin + + * plugins/dfsound/pulseaudio.c: Added PulseAudio support (not working yet). + * plugins/dfsound/pulseaudiosimple.c: Added PulseAudio Simple API support + (not working with SPUasync). + * plugins/dfsound/alsa.c: Fixed the alsa plugin so that it produces cleaner + audio through PulseAudio. + * plugins/dfsound/nullsnd.c: Don't compile when PulseAudio or PulseAudio + Simple API support is enabled. + * plugins/dfsound/spu.c: Added strings for PulseAudio plugin. + * plugins/dfsound/Makefile.am: Added pulseaudio.c and pulseaudiosimple.c. + * configure.ac: Added PulseAudio-related stuff. + * po/zh_CN.po, po/zh_TW.po, po/pt_BR.po, po/pcsx.pot: Updated. + +February 1, 2010 Wei Mingzhi + + * macosx/plugins/HIDInput/src/HID_Utilities.h: Removed duplicate file. + * macosx/plugins/HIDInput/src/PlugPAD.c: #include HID_Utilities_External.h + instead of HID_Utilities.h. + * macosx/plugins/HIDInput/src/PadController.m: Likewise. + * macosx/plugins/HIDInput/src/KeyConfig.h: Likewise. + +January 31, 2010 Wei Mingzhi + + * macosx/EmuThread.m: Use setjmp()/longjmp() for resetting to avoid nasty + plugin issues. + * libpcsxcore/mdec.c: Minor cleanup. + +January 24, 2010 Wei Mingzhi + + * gui/LnxMain.c: Don't always move the mouse to the right for screensaver + disabling. + * win32/pcsx.sln, win32/pcsx.vcproj: Added VC8 Project File. + +January 23, 2010 Wei Mingzhi + + * libpcsxcore/cdriso.c: Moved several definations into cdriso.h. + * libpcsxcore/cdriso.h: Likewise. + * libpcsxcore/ppf.c: Added PPF patch support. + * libpcsxcore/ppf.h: Likewise. + * libpcsxcore/cdrom.c: Likewise. + * libpcsxcore/cdrom.h: Likewise. + * libpcsxcore/misc.c: Likewise. + * libpcsxcore/r3000a.c: Likewise. + * libpcsxcore/psxcommon.h: Likewise. + * gui/LnxMain.c: Likewise. + * gui/Linux.h: Likewise. + * win32/gui/WndMain.c: Likewise. + * macosx/main.m: Likewise. + * macosx/PcsxController.m: Likewise. + * libpcsxcore/Makefile.am: Added ppf.c and ppf.h. + * win32/pcsx.dsp: Likewise. + * win32/pcsx.dev: Likewise. + * macosx/Pcsx.xcodeproj/project.pbxproj: Likewise. + * po/zh_CN.po, po/zh_TW.po, po/pt_BR.po, po/pcsx.pot: Updated. + +January 7, 2010 Wei Mingzhi + + * plugins/dfxvideo/draw.c: MaintainAspect() now only depends on screen + resolution. + +December 28, 2009 Wei Mingzhi + + * data/pcsx.glade2: Reverted to "Close" button instead of "OK/Cancel" for + consistency with GNOME UI standards. + * plugins/dfsound/spucfg-0.1df/dfsound.glade2: Likewise. + * plugins/dfsound/spucfg-0.1df/main.c: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/main.c: Likewise. + * plugins/dfinput/cfg-gtk2.c: Likewise. + * plugins/dfinput/dfinput.glade2: Likewise. + * plugins/dfcdrom/cdrcfg-0.1df/main.c: Likewise. + * plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2: Likewise. + * gui/ConfDlg.c: Likewise. + * po/zh_TW.po: Updated. + * README, NEWS: Updated. + +December 19, 2009 Wei Mingzhi + + * win32/gui/WndMain.c: Added Portuguese (Brazilian) to the language list. + * po/pt_BR.po, po/zh_CN.po, po/zh_TW.po, po/pcsx.pot: Updated. + +December 8, 2009 Wei Mingzhi + + * plugins/peopsxgl/gpu.c: Hide the panels in fullscreen mode. + +December 4, 2009 Wei Mingzhi + + * plugins/dfinput/analog.c: Allow analog sticks to be mapped to non-axis + events (keyboard & joystick buttons) as well. + * plugins/dfinput/cfg.c: Likewise. + * plugins/dfinput/cfg-gtk2.c: Likewise. + * plugins/dfinput/xkb.c: Likewise. + * plugins/dfinput/pad.h: Likewise. + * po/zh_CN.po, po/zh_TW.po, po/pt_BR.po, po/pcsx.pot: Updated. + * libpcsxcore/psxbios.c: Don't touch the stack pointer if pointed to the + hardware area, which fixes FF7 chocobo racing problem. Don't always + allocate stack spaces before softcall. + +December 3, 2009 Wei Mingzhi + + * plugins/dfinput/pad.c: Changed the value of center position to 127 instead + of 128, which fixes the FF8 problem. Still need further confirmation about + this, as all of the protocol docs I've read as well as psemu_plugin_defs.h + say 128 is the center position. + * libpcsxcore/r3000a.c: Minor cleanup. + +December 2, 2009 Wei Mingzhi + + * plugins/dfinput/pad.c: Removed DualShock2-specific stuff in PADpoll(). + * macosx/plugins/HIDInput/src/PlugPAD.c: Likewise. + +December 1, 2009 Wei Mingzhi + + * plugins/dfcdrom/cdr-linux.c: Fixed crash bug when resuming emulation in + Threaded mode. + * gui/MemcardDlg.c: Don't keep previous selection after creating a new + memcard or changing a memcard. + * gui/Gtk2Gui.c: Minor cleanup. + +November 30, 2009 Wei Mingzhi + + * macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj: Changed build + directory into ../../build. + * macosx/plugins/HIDInput/HIDInput.xcodeproj/project.pbxproj: Likewise. + * macosx/plugins/CDDeviceInterface/CDDeviceInterfacePlugin.xcodeproj/ + project.pbxproj: Likewise. + * macosx/plugins/DFXVideo/PeopsSoftGPU.xcodeproj/project.pbxproj: Likewise. + * macosx/Pcsx.xcodeproj/project.pbxproj: Include building and copying plugins + to the bundle (thanks avlex). + +November 29, 2009 Wei Mingzhi + + * data/pcsx.glade2: Got rid of GtkFileChooserButton, which is buggy. Added + a Toolbar which contains several most-used functions. + * gui/MemcardDlg.c: Got rid of GtkFileChooserButton. + * gui/Gtk2Gui.c: Moved configuration-related stuff into ConfDlg.c. Added + Toolbar support. + * gui/ConfDlg.c: Added. + * gui/ConfDlg.h: Added. + * gui/Linux.h: Removed unnecessary prototypes. Moved some stuff into + ConfDlg.h. + * libpcsxcore/psxcommon.h: Use MAXPATHLEN for string lengths. + * po/pt_BR.po, po/zh_CN.po, po/zh_TW.po, po/pcsx.pot: Updated. + * po/update-pot.sh: Also run msgmerge automatically. + * doc/pcsx.1: Don't say "PCSX-df". + * macosx/main.m: Minor cleanup. + * macosx/PluginController.m: Likewise. + * macosx/PcsxController.m: Made the memory card files configurable. + * macosx/ConfigurationController.m: Likewise. + * macosx/ConfigurationController.h: Likewise. + * macosx/English.lproj/Configuration.nib/info.nib: Likewise. + * macosx/English.lproj/Configuration.nib/classes.nib: Likewise. + +November 28, 2009 Wei Mingzhi + + * data/pcsx.glade2: Adjusted Memcard dialog. + * po/pt_BR.po, po/zh_CN.po, po/zh_TW.po, po/pcsx.pot: Updated. + * gui/Cheat.c: Fixed memory leaks. + * plugins/dfinput/cfg-gtk2.c: Likewise. + * gui/Gtk2Gui.c: Moved memcard dialog stuff into MemcardDlg.c. + * gui/MemcardDlg.c: Added. + * gui/MemcardDlg.h: Likewise. + * gui/Makefile.am: Added MemcardDlg.c. + * gui/LnxMain.c: Minor cleanup. + * gui/Linux.h: Likewise. + +November 27, 2009 Wei Mingzhi + + * plugins/dfcdrom/cdrcfg-0.1df/main.c: Rewritten the configuration utility + with libglade. + * plugins/dfcdrom/Makefile.am: Fixed compiling. + * plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2: Added. + * plugins/dfcdrom/cdrcfg-0.1df/callbacks.c: Removed Glade-generated code. + * plugins/dfcdrom/cdrcfg-0.1df/callbacks.h: Likewise. + * plugins/dfcdrom/cdrcfg-0.1df/support.c: Likewise. + * plugins/dfcdrom/cdrcfg-0.1df/support.h: Likewise. + * plugins/dfcdrom/cdrcfg-0.1df/interface.c: Likewise. + * plugins/dfcdrom/cdrcfg-0.1df/interface.h: Likewise. + * plugins/dfcdrom/cdrcfg-0.1df/cfgCdr.glade: Likewise. + * plugins/dfcdrom/cdrcfg-0.1df/cfg-gtk2: Likewise. + * plugins/dfcdrom/cdr-linux.c: Added selection of spin-down time. + Don't return NULL when CDRgetBuffer() is called more than once without + another CDRreadTrack() call in threaded mode, which solves the problem + with Final Fantasy 6 (maybe other games too). + * plugins/dfcdrom/cfg.c: Likewise. + * plugins/dfcdrom/cfg.h: Likewise. + * po/update-pot.sh: Include files from plugins/dfcdrom/cdrcfg-0.1df. + * po/pcsx.pot, po/zh_CN.po, po/zh_TW.po, po/pt_BR.po: Updated. + * plugins/dfcdrom/cdr.h: Moved global variables into cdr-linux.c. + * plugins/dfxvideo/draw.c: Removed the screensaver disabling code. + * plugins/dfxvideo/Makefile.am: Don't link against Xtst. + * gui/LnxMain.c: Disable screensaver in the main emu, so that it will be + effective in all of the plugins. + * gui/Makefile.am: Added -lXext -lXtst. + +November 26, 2009 Wei Mingzhi + + * plugins/dfcdrom/cdr.c: Separated GNU/Linux-specific code and NULL code + into separate files (cdr-linux.c and cdr-null.c). + * plugins/dfcdrom/cdr-linux.c: Added. + * plugins/dfcdrom/cdr-null.c: Likewise. + * plugins/dfcdrom/cdrcfg-0.1df: Moved configuration utility into a subdir. + * plugins/dfcdrom/interface.c: Moved into cdrcfg-0.1df directory. + * plugins/dfcdrom/interface.h: Likewise. + * plugins/dfcdrom/cfg-gtk2.c: Likewise. + * plugins/dfcdrom/support.c: Likewise. + * plugins/dfcdrom/support.h: Likewise. + * plugins/dfcdrom/main.c: Likewise. + * plugins/dfcdrom/callbacks.c: Likewise. + * plugins/dfcdrom/callbacks.h: Likewise. + * plugins/dfcdrom/cfgCdr.glade: Likewise. + * plugins/dfcdrom/Makefile.am: Likewise. + * libpcsxcore/psxbios.c: Fixed MSVC6 errors when psxbios logging is enabled. + * debian/changelog: Changed version number. + * libpcsxcore/cdriso.c: Added support for reporting current CDDA play time. + +November 25, 2009 Wei Mingzhi + + * po/zh_CN.po, po/zh_TW.po: Updated. + +November 13, 2009 Wei Mingzhi + + * libpcsxcore/misc.c: Fixed CheckCdrom() and LoadCdrom() so that format like + "cdrom:\\FILENAME" and "cdrom:/FILENAME" in SYSTEM.CNF can be accepted. + * libpcsxcore/ix86_64/README: Removed obsolete information. + * macosx/plugins/CDDeviceInterface/src/PlugCD.c: Changed the include path + to SCSITaskLib.h for compatibility with Mac OS X 10.6 SDK (Thanks magiix). + * macosx/English.lproj/PCSX.nib/objects.nib: Added 2 more savestate slots. + * macosx/English.lproj/PCSX.nib/info.nib: Likewise. + +November 9, 2009 Wei Mingzhi + + * plugins/dfxvideo/draw.c: Fixed green edge in YUV mode. + +November 8, 2009 Wei Mingzhi + + * libpcsxcore/r3000a.c: Commented out the check for psxRegs.interrupt + before checking for hardware interrupts, which fixes the issue with I.Q. + Final (maybe other games too). + +November 7, 2009 Wei Mingzhi + + * plugins/dfxvideo/draw.c: Don't bail out if the color depth is not set to 32. + +November 5, 2009 Wei Mingzhi + + * plugins/dfxvideo/draw.c: Check for centering during blits. + +November 4, 2009 Wei Mingzhi + + * libpcsxcore/sio.c: Fixed the format of new memory card file, which solves + the saving problem with Final Fantasy 6. + * macosx/EmuThread.h: Added "Run BIOS" menu item. + * macosx/PcsxController.h: Likewise. + * macosx/EmuThread.m: Likewise. + * macosx/PcsxController.m: Likewise. + * macosx/English.lproj/PCSX.nib/objects.nib: Likewise. + * macosx/English.lproj/PCSX.nib/info.nib: Likewise. + * macosx/English.lproj/PCSX.nib/classes.nib: Likewise. + * macosx/main.m: Reload plugins at each time emulation starts. + * macosx/Info.plist: Changed version number. + +November 3, 2009 Wei Mingzhi + + * macosx/plugins/HIDInput/src/PlugPAD.c: Implemented PADstartPoll() and + PADpoll(). + * plugins/dfxvideo/key.c: Handle Fullscreen toggle message for Mac OS X. + * macosx/plugins/DFXVideo/macsrc/PluginGLView.m: Fixed one byte-order issue. + +November 2, 2009 Wei Mingzhi + + * macosx/plugins/DFXVideo: Added project file and necessary codes for + building existing dfxvideo sources for Mac OS X. (NOT bug-free yet!!!) + * dfxvideo/gpu.c: Made necessary changes for Mac OS X build. + * dfxvideo/externals.h: Likewise. + * macosx/plugins/HIDInput/HIDInput.xcodeproj/project.pbxproj: Use + psemu_plugin_defs.h from libpcsxcore. + * macosx/plugins/HIDInput/src/PlugPAD.c: Likewise. + * macosx/plugins/CDDeviceInterface/CDDeviceInterfacePlugin.xcodeproj/ + project.pbxproj: Likewise. + * macosx/plugins/CDDeviceInterface/src/PlugCD.c: Likewise. + * macosx/plugins/HIDInput/src/PSEmu_Plugin_Defs.h: Removed. + * macosx/plugins/CDDeviceInterface/src/PSEmu_Plugin_Defs.h: Removed. + * macosx/PcsxController.m: Don't allow starting game when Preferences dialog + box is opened. Don't allow opening the Preferences dialog when game is + running. + +November 1, 2009 Wei Mingzhi + + * macosx/plugins/PeopsSpu109: Removed. + * macosx/plugins/DFSound: Added project file and necessary platform-dependant + files for building existing dfsound sources for Mac OS X. + * plugins/dfsound/stdafx.h: Made necessary changes for Mac OS X build. + * plugins/dfsound/spu.c: Likewise. + * plugins/dfsound/xa.c: Likewise. + +October 31, 2009 Wei Mingzhi + + * libpcsxcore/cdriso.c: Declare thread controlling variable as volatile. + * plugins/dfinput/pad.c: Likewise. + * macosx/plugins/PeopsSpu109: Added SPU plugin for Mac OS X. + +October 30, 2009 Wei Mingzhi + + * data/pcsx.glade2: Do not allow resizing for dialog boxes. + * plugins/dfsound/spucfg-0.1df/dfsound.glade2: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2: Likewise. + * plugins/dfinput/pad.h: Declare several variables as volatile. + * plugins/dfinput/Makefile.am: Use $(SDL_CONFIG) instead of "sdl-config". + +October 29, 2009 Wei Mingzhi + + * data/pcsx.glade2: Replaced the "Close" button on many dialog boxes to + "OK/Cancel" buttons. + * gui/Gtk2Gui.c: Likewise. + * plugins/dfsound/spucfg-0.1df/dfsound.glade2: Likewise. + * plugins/dfsound/spucfg-0.1df/main.c: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/main.c: Likewise. + * plugins/dfinput/dfinput.glade2: Likewise. + * plugins/dfinput/cfg-gtk2.c: Likewise. + +October 27, 2009 Wei Mingzhi + + * plugins/dfinput/xkb.c: Use XkbSetDetectableAutoRepeat() instead of + disabling autorepeat globally. + * po/zh_CN.po: Updated. + * plugins/peopsxgl/gpu.c: Allow clicking close button to return to the main + UI instead of bailing out. + +October 26, 2009 Wei Mingzhi + + * plugins/dfinput/cfg.c: Fixed a bug which caused the settings for analog + pad not correctly read from the config file. + +October 25, 2009 Wei Mingzhi + + * plugins/dfinput/cfg.c: Replaced dfinput with new SDL/Xkb-based input plugin. + * plugins/dfinput/analog.c: Likewise. + * plugins/dfinput/Makefile.in: Likewise. + * plugins/dfinput/cfg-gtk2.c: Likewise. + * plugins/dfinput/pad.c: Likewise. + * plugins/dfinput/sdljoy.c: Likewise. + * plugins/dfinput/xkb.c: Likewise. + * plugins/dfinput/dfinput.glade2: Likewise. + * plugins/dfinput/Makefile.am: Likewise. + * plugins/dfinput/pad.h: Likewise. + * plugins/dfinput/padjoy.h: Removed. + * configure.ac: Check for SDL on configure. + * debian/control: Added libsdl1.2-dev to Build-Depends. + * po/pt_BR.po, po/zh_TW.po, po/zh_CN.po, po/pcsx.pot: Updated. + +October 24, 2009 Wei Mingzhi + + * macosx/Pcsx.xcodeproj/project.pbxproj: Fixed Mac OS X build. + * macosx/plugins: Added CDR and PAD plugins for Mac OS X.. + +October 9, 2009 Wei Mingzhi + + * gui/hdebug.c: Removed PCSX-df debugger, which is incompleted and buggy. + * gui/hdebug.h: Likewise. + * gui/Makefile.am: Likewise. + * libpcsxcore/debug.c: Added telnet-based debugger from PCSX CVS. GUI-based + debugger should be worked on for better usability. + * libpcsxcore/debug.h: Likewise. + * libpcsxcore/socket.c: Likewise. + * libpcsxcore/socket.h: Likewise. + * libpcsxcore/psxinterpreter.c: Likewise. + * libpcsxcore/psxmem.c: Likewise. + * libpcsxcore/r3000a.c: Likewise. + * libpcsxcore/r3000a.h: Likewise. + * libpcsxcore/psxcommon.h: Likewise. + * libpcsxcore/psxcounters.c: Likewise. + * libpcsxcore/Makefile.am: Likewise. + * gui/Config.c: Likewise. + * gui/LnxMain.c: Likewise. + * gui/Gtk2Gui.c: Likewise. + * win32/pcsx.rc: Likewise. + * win32/pcsx.dsp: Likewise. + * win32/gui/ConfigurePlugins.c: Likewise. + * win32/gui/WndMain.c: Likewise. + * win32/pcsx.dev: Likewise. + * win32/resource.h: Likewise. + +October 4, 2009 Wei Mingzhi + + * plugins/dfxvideo/gpucfg-0.1df/main.c: Fixed: when trying to choose + resolution for dfxvideo, values>1024x768 doesn't save. + * plugins/peopsxgl/cfg.c: Minor cleanup. + * plugins/peopsxgl/gpu.c: Use fork()/execl() instead of system() to launch + the configuration utility. + * plugins/dfsound/cfg.c: Likewise. + * plugins/dfxvideo/cfg.c: Likewise. + * plugins/dfinput/pad.c: Likewise. + * plugins/dfcdrom/cdr.c: Likewise. + * plugins/dfsound/spucfg-0.1df/dfsound.glade2: Display the dialog box at + the center of the screen. Removed unused About dialog box. + * plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2: Likewise. + * plugins/dfsound/spucfg-0.1df/main.c: Minor cleanup. + * plugins/dfinput/dfinput.glade2: Fixed problem with new version of glade-3. + * plugins/dfcdrom/cfgCdr.glade: Likewise. + * libpcsxcore/cdriso.c: Fixed crash bug when the .toc/.cue file contains + empty lines. + +October 3, 2009 Wei Mingzhi + + * plugins/dfsound/spucfg-0.1df/dfsound.glade2: Removed the "Enable XA" option + as we already have such an option in the main emu. + * plugins/dfsound/spucfg-0.1df/main.c: Likewise. + * plugins/dfsound/cfg.c: Likewise. + * plugins/dfsound/spu.c: Likewise. + * plugins/dfsound/externals.h: Likewise. + * plugins/dfsound/psemu.c: Likewise. + +October 1, 2009 Wei Mingzhi + + * gui/Gtk2Gui.c: Disable the "Graphics/Sound/CD-ROM/Controller" menuitems + when the emu is already running. + * data/pcsx.glade2: Merged the "Controller 1" and "Controller 2" menuitems. + +September 26, 2009 Wei Mingzhi + + * data/pcsx.glade2: Re-added the "Graphics/Sound/CD-ROM/Controller" menuitems + in the configuration menu, which are more self-explanative than a "Plugins + and BIOS". + * gui/Gtk2Gui.c: Likewise. + * po/pcsx.pot, po/zh_CN.po, po/zh_TW.po, po/pt_BR.po: Updated. + * libpcsxcore/cdriso.c: Implemented MDS parsing. MDF files with interleaved + subchannel data is now supported. + * win32/gui/WndMain.c: Moved States submenu from File menu to Emulator menu. + +September 24, 2009 Wei Mingzhi + + * libpcsxcore/cdriso.c: Fixed filenames with spaces when loading .toc file + (Thanks dario86). Force byteswap if .toc file is loaded as cdrdao uses + Big-Endian for CD Audio. Fixed skipping of the first 2 seconds when playing + CDDA Track #2. Check for image.toc if image.toc.bin is loaded. + +September 22, 2009 Wei Mingzhi + + * win32/gui/CheatDlg.c: Always enable the value inputbox when "New Search" is + clicked. + +September 21, 2009 Wei Mingzhi + + * libpcsxcore/cdrom.c: Reverted the previous change as the CD change problem + can be fixed in the cdrSapu plugin. + +September 20, 2009 Wei Mingzhi + + * win32/glue/sys/mman.h: Use VirtualAlloc() and VirtualFree() instead of + malloc() and free(). + * libpcsxcore/ix86/iR3000A.c: Minor cleanup. + * po/zh_TW.po: Updated. + * libpcsxcore/cdrom.c: Close & reopen the CDR plugin after switching discs. + +September 18, 2009 Wei Mingzhi + + * win32/gui/CheatDlg.c: Disable "Search Type" combo box if search results + already exist. + +September 16, 2009 Wei Mingzhi + + * po/pt_BR.po, po/pt_BR.gmo: Added Portuguese (Brazil) translation. Thanks + to Tibério Vítor . + * po/LINGUAS: Added pt_BR.po. + * po/pcsx.pot: Updated. + * gui/Cheat.c: Use checkboxes for toggling cheats. + * data/pcsx.glade2: Likewise. + +September 15, 2009 Wei Mingzhi + + * debian/changelog: Bumped version. + +September 12, 2009 Wei Mingzhi + + * libpcsxcore/cdriso.c: Disregard the synchronization information and header + data when playing CDDA music. + +September 8, 2009 Wei Mingzhi + + * win32/gui/ConfigurePlugins.c: Select a real BIOS instead of the Internal + HLE BIOS by default at the first run. + * gui/Gtk2Gui.c: Likewise. + * gui/LnxMain.c: Scan BIOSes in certain system-wide directories and place + symlinks in ~/.pcsx/bios. + * gui/Makefile.am, gui/Makefile.in: Added PSEMU_DATA_DIR. + * po/pcsx.pot, po/zh_CN.po, po/zh_TW.po: Updated. + +September 7, 2009 Wei Mingzhi + + * plugins/dfsound/alsa.c: Removed ALSA-specific CDDA stuff, which causes + problems with some versions of PulseAudio. + * plugins/dfsound/spu.c: Implemented CDDA support in a more "general" way. + * plugins/dfsound/xa.c: Likewise. + * plugins/dfsound/externals.h: Likewise. + * plugins/dfsound/spu.h: Likewise. + * plugins/dfsound/xa.h: Likewise. + * plugins/dfsound/cfg.c: Removed NOTHREADLIB. + * plugins/dfsound/spu.c: Likewise. + * plugins/dfsound/stdafx.h: Likewise. + * libpcsxcore/cdriso.c: Reverted to the method which feeds the CDDA data to + the SPU plugin at an interval instead of continuously, otherwise it's still + broken with spuEternal in SPUasync mode. + +September 6, 2009 Wei Mingzhi + + * plugins/dfsound/spu.c: Fixed frequency modulation emulation. Handle IRQs + in the decoded sound buffer areas. (sync'ed from the P.E.Op.S SPU 1.09) + * plugins/dfsound/dma.c: Likewise. + * plugins/dfsound/registers.c: Likewise. + * plugins/dfsound/xa.c: Likewise. + * plugins/dfsound/externals.h: Likewise. + +September 5, 2009 Wei Mingzhi + + * libpcsxcore/cdriso.c: Don't feed CDDA data to the SPU plugin when CDDA + is muted, which fixes the "noise" in Final Fantasy 8. Also check for + image.bin.toc in addition to image.toc. + * plugins/dfsound/alsa.c: Added support for CDDA volume. + +September 4, 2009 Wei Mingzhi + + * libpcsxcore/cdriso.c: Don't delay before feeding CDDA data to the SPU + plugin. + * plugins/dfsound/alsa.c: Don't try initializing CDDA sound handle over + and over and over again if failed. + +September 3, 2009 Wei Mingzhi + + * libpcsxcore/cdriso.c: Fixed time overflow on 32-bit GNU/Linux system. + +September 1, 2009 Wei Mingzhi + + * libpcsxcore/cdrom.c: Added the definations of some missing commands. + +August 30, 2009 Wei Mingzhi + + * libpcsxcore/cdriso.c: Implemented CDDA playing via SPUplayCDDAchannel(). + Now CD tracks can be played directly via a SPU plugin which implements the + SPUplayCDDAchannel() function, e.g., spuEternal. + * libpcsxcore/cdriso.h: Removed unused prototypes. + * doc/tweaks.txt: Removed obsolete information. + * win32/pcsx.dsp: Use Multithreaded instead of Singlethreaded. + * plugins/dfsound/alsa.c: Set the buffer_time and period_time manually, + hopefully the "lagging" issue can be fixed. Implemented + SPUplayCDDAchannel() in the ALSA driver. + +August 29, 2009 Wei Mingzhi + + * plugins/dfcdrom/cdr.c: Don't restart the track if play was called with + the same time as the previous call. + * libpcsxcore/cdriso.c: Added playCDDA() and stopCDDA() functions. (still + not implemented) + +August 27, 2009 Wei Mingzhi + + * libpcsxcore/plugins.h: Added prototype and interface for + SPUplayCDDAchannel(). + * libpcsxcore/plugins.c: Likewise. + +August 26, 2009 Wei Mingzhi + + * win32/pcsx.rc: Completed the Cheat Search dialog. + * win32/resource.h: Likewise. + * win32/gui/CheatDlg.c: Implemented the Cheat Search dialog. Fixed MinGW + compilation issue. + * win32/gui/pcsx.dev: Fixed Dev-C++ build. + * win32/WndMain.c: Moved Language menu into the Config menu. + * gui/Cheat.c: Clamp values when editing value in Cheat Search dialog. + * doc/tweaks.txt: Added instructions to allow CD-DA playing when using + image files (as suggested by dario86). + +August 24, 2009 Wei Mingzhi + + * win32/gui/WndMain.c: Set the language to the OS language by default. + * win32/gui/ConfigurePlugins.c: Made some strings translatable. + * win32/gui/CheatDlg.c: Fixed incorrect usage of SysMessage(). + * win32/pcsx.rc, win32/resource.h: Fixed manifest. + +August 23, 2009 Wei Mingzhi + + * data/pcsx.glade2: Added "..." in menu items which will popup a dialog. + * po/pcsx.pot, po/zh_CN.po, po/zh_TW.po: Updated. + +August 22, 2009 dario86 + + * libpcsxcore/cdrom.c: Demute the CD-DA by default, which fixes the music + problem with Tekken 1. + +August 22, 2009 Wei Mingzhi + + * libpcsxcore/misc.c: Also check for PSX.EXE in CheckCdrom(). Added support + for CPE binaries. Returns -1 in Load() if EXE is not found. Print the + EXE loading error messages in console instead of a message box. + * gui/Gtk2Gui.c: Show files with .cpe extension in the Load EXE dialog box. + * debian/rules: Removed dh_desktop. + +August 17, 2009 Wei Mingzhi + + * plugins/peopsxgl/gpu.c: Made the name of the plugin translatable. + * plugins/dfsound/spu.c: Likewise. + * plugins/dfxvideo/gpu.c: Likewise. + * plugins/dfinput/pad.c: Likewise. + * plugins/dfcdrom/cdr.c: Likewise. + * plugins/dfcdrom/interface.c: #include locale.h. + * po/update-pot.sh: Also check plugins' source files. + * plugins/dfxvideo/Makefile.am: Removed VERSION and NUMBER defination. + * po/zh_CN.po, po/zh_TW.po, po/pcsx.pot: Updated. + +August 9, 2009 Wei Mingzhi + + * win32/cdrom02.ico: Reworked the icon. + * win32/pcsx.rc: Added cheat-related dialogs. + * win32/resource.h: Likewise. + * win32/gui/CheatDlg.c: Added, implemented Cheat Dialog. + * win32/pcsx.dsp: Added CheatDlg.c. + * win32/pcsx.dev: Likewise. + * win32/gui/plugin.c: Use lowercase for #include's. + * win32/gui/AboutDlg.c: Likewise. + * win32/gui/ConfigurePlugins.c: Likewise. + * win32/gui/Win32.h: Added prototype from CheatDlg.c. + * win32/gui/WndMain.c: Added Cheat functions to the menu. + * win32/glue/stdint.h: Added a "no warranty" disclaimer. + * win32/glue/sys/mman.h: Likewise. + +August 5, 2009 Wei Mingzhi + + * plugins/dfxvideo/prim.c: Reverted the previous change, which is wrong. + +July 27, 2009 Wei Mingzhi + + * plugins/dfxvideo/prim.c: Clamp the offsets before performing + blkfill. + +July 24, 2009 Wei Mingzhi + + * libpcsxcore/cdriso.c: Implemented CCD parsing. + * libpcsxcore/cheat.c: Optimized Cheat Applying a bit. + +July 15, 2009 Wei Mingzhi + + * libpcsxcore/psxbios.c: Allocate more stack spaces to fix crash at FF7 + minigames. + * libpcsxcore/cdriso.c: Implemented CUE parsing. + +July 7, 2009 Wei Mingzhi + + * libpcsxcore/psxbios.c: Use u32 instead of native pointer for + DIRENTRY::next. It's a pointer in PSX subsystem and not in native system. + +July 4, 2009 Wei Mingzhi + + * debian/control: Added libasound2-dev to Build-Depends. + * libpcsxcore/plugins.h: Fixed SubQ struct. + * plugins/dfcdrom/cdr.c: Likewise. + * libpcsxcore/cdriso.c: Implemented subchannel reading from CloneCD + .sub file. + +July 1, 2009 Wei Mingzhi + + * libpcsxcore/psxbios.c: Use s32 instead of long in DIRENTRY struct for + compatibility with x86_64. Fixed error in MSVC6. + +June 30, 2009 Peter Collingbourne + + * libpcsxcore/psxbios.c: Implemented psxBios_rename(). Interpret a file + path of the form buX0: as buX0:* in firstfile() and nextfile(). Ensure + that memory card data is saved when deleting a file. Advance the file + offset when a write or synchronous read occurs. + +June 30, 2009 Wei Mingzhi + + * plugins/peopsxgl/gpu.c: Changed a format string from %08lx to %08x. + +June 30, 2009 Peter Collingbourne + + * plugins/dfcdrom/main.c: #include locale.h as well as libintl.h to allow + the code to compile in unoptimized mode. + * plugins/dfinput/cfg.c: Likewise. + * plugins/dfsound/spucfg-0.1df/main.c: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/main.c: Likewise. + * plugins/peopsxgl/gpucfg/main.c: Likewise. + * plugins/peopsxgl/gpucfg/interface.c: Likewise. + * libpcsxcore/psxbios.c: Fixed a cast that may cause problems on x86_64. + Allocate stack space for programs which store data below the stack pointer + when an interrupt occurs. + +June 29, 2009 Wei Mingzhi + + * libpcsxcore/cheat.c: Implemented Cheat Search. + * libpcsxcore/cheat.h: Likewise. + * gui/Cheat.c: Likewise. + * gui/Gtk2Gui.c: Backup the memory for cheat search when continuing emulation. + * data/pcsx.glade2: Tweaked the cheat search dialog for implemention. Fixed + the main menu under newer version of Glade. + * libpcsxcore/r3000a.c: Free cheat search results on exit. + * libpcsxcore/psxmem.h: Fixed a typo in psxMu8(). Removed check for __sh__ + macro. + * win32/gui/WndMain.c: Restarting is no longer needed at first run. + * po/zh_CN.po, po/zh_TW.po: Updated. + +June 20, 2009 Wei Mingzhi + + * libpcsxcore/misc.c: Fixed a bug which prevented files in a subdirectory + from being located correctly in GetCdromFile(). + +June 19, 2009 Wei Mingzhi + + * gui/Gtk2Gui.c: Also allow extensions with capital letters in the open + file dialog. + * plugins/dfsound/alsa.c: Don't include alsa.h, which is useless. Don't + set the buffer time and period time manually. + * plugins/dfsound/alsa.h: Deleted. + * plugins/dfsound/oss.c: Moved the definations from oss.h to oss.c. + * plugins/dfsound/oss.h: Deleted. + * debian/rules: Added --enable-alsa to configure parameters. + +June 18, 2009 Wei Mingzhi + + * plugins/peopsxgl/soft.c: Fixed crash with full-software (FVP) enabled + on x86_64. + * macosx/main.m: Removed LoadCdBios. + +June 16, 2009 Wei Mingzhi + + * plugins/dfOpenGL: Removed experimental dfOpenGL plugin. + * configure.ac: OpenGL plugin is only built with --enable-opengl. + * Makefile.am: Likewise. + * debian/rules: Added --enable-opengl to configure parameters. + * plugins/peopsxgl/draw.c: Don't enable OpenGL Extension by default, which + may be unsupported or slow with some old cards. + * plugins/peopsxgl/gpucfg/main.c: Likewise. + +June 11, 2009 Wei Mingzhi + + * macosx/English.lproj/PCSX.nib/objects.nib: Added "Run ISO" function. + * macosx/English.lproj/PCSX.nib/info.nib: Likewise. + * macosx/English.lproj/PCSX.nib/classes.nib: Likewise. + * macosx/PcsxController.h: Likewise. + * macosx/PcsxController.m: Likewise. + +June 10, 2009 Wei Mingzhi + + * libpcsxcore/plugins.c: Don't add "_" to function name for Mac OS X. + * macosx/Info.plist: Modified software information. + * macosx/English.lproj/InfoPlist.strings: Likewise. + * macosx/Pcsx.xcodeproj/project.pbxproj: Tweaked parameter. + * macosx/English.lproj/PCSX.nib/objects.nib: Removed Edit menu. + * macosx/English.lproj/PCSX.nib/info.nib: Likewise. + +June 9, 2009 Wei Mingzhi + + * macosx/*: Added preliminary Mac OS X port. Code copied from PCSX Mac + Project (Still not working). + +June 4, 2009 Wei Mingzhi + + * po/zh_CN.po, po/zh_TW.po: Don't use UTF-8. + * debian/changelog: Bumped version. + +June 2, 2009 Wei Mingzhi + + * plugins/peopsxgl/interface.c: Tweaked UI. + +June 1, 2009 Wei Mingzhi + + * plugins/peopsxgl/Makefile.am: Added config utility. + * plugins/peopsxgl/gpucfg/callbacks.c: Added. + * plugins/peopsxgl/gpucfg/callbacks.h: Added. + * plugins/peopsxgl/gpucfg/interface.c: Added. + * plugins/peopsxgl/gpucfg/interface.h: Added. + * plugins/peopsxgl/gpucfg/main.c: Added. + * plugins/peopsxgl/gpucfg/support.c: Added. + * plugins/peopsxgl/gpucfg/support.h: Added. + * plugins/peopsxgl/cfg.c: Reverted the filename of config file. + * plugins/dfcdrom/interface.c: Supported translation. + * po/pcsx.pot, po/zh_CN.po, po/zh_TW.po: Updated. + +May 31, 2009 Wei Mingzhi + + * gui/Config.c, plugins/dfxvideo/cfg.c: Fixed invalid memory access. + * debian/control: Added libxxf86vm-dev to Build-Depend. + * plugins/dfOpenGL/cfg.c: Don't use sprintf(). + +May 30, 2009 Wei Mingzhi + + * plugins/peopsxgl/draw.c: Modified for compatiability with x86_64. + * plugins/peopsxgl/draw.h: Likewise. + * plugins/peopsxgl/externals.h: Likewise. + * plugins/peopsxgl/fps.c: Likewise. + * plugins/peopsxgl/fps.h: Likewise. + * plugins/peopsxgl/gpu.c: Likewise. + * plugins/peopsxgl/key.c: Likewise. + * plugins/peopsxgl/menu.c: Likewise. + * plugins/peopsxgl/prim.c: Likewise. + * plugins/peopsxgl/prim.h: Likewise. + * plugins/peopsxgl/soft.c: Likewise. + * plugins/peopsxgl/soft.h: Likewise. + * plugins/peopsxgl/texture.c: Likewise. + * plugins/peopsxgl/texture.h: Likewise. + +Apr 26, 2009 Wei Mingzhi + + * plugins/peopsxgl/cfg.c: Integrated P.E.Op.S OpenGL GPU into the build tree. + Cleaned up the sources, removed Windows-specific stuff. + * plugins/peopsxgl/cfg.h: Likewise. + * plugins/peopsxgl/draw.c: Likewise. + * plugins/peopsxgl/draw.h: Likewise. + * plugins/peopsxgl/externals.h: Likewise. + * plugins/peopsxgl/fps.c: Likewise. + * plugins/peopsxgl/fps.h: Likewise. + * plugins/peopsxgl/gl_ext.h: Likewise. + * plugins/peopsxgl/gpu.c: Likewise. + * plugins/peopsxgl/gpu.h: Likewise. + * plugins/peopsxgl/key.c: Likewise. + * plugins/peopsxgl/key.h: Likewise. + * plugins/peopsxgl/menu.c: Likewise. + * plugins/peopsxgl/menu.h: Likewise. + * plugins/peopsxgl/prim.c: Likewise. + * plugins/peopsxgl/prim.h: Likewise. + * plugins/peopsxgl/soft.c: Likewise. + * plugins/peopsxgl/soft.h: Likewise. + * plugins/peopsxgl/stdafx.h: Likewise. + * plugins/peopsxgl/texture.c: Likewise. + * plugins/peopsxgl/texture.h: Likewise. + * plugins/peopsxgl/zn.c: Likewise. + * plugins/peopsxgl/Makefile.am: Likewise. + * plugins/dfOpenGL/GPU.c: Changed the name of the plugin into "PCSX-df OpenGL + Driver" to avoid confusion. + +Apr 23, 2009 Wei Mingzhi + + * gui/LnxMain.c: use BIOS_DIR instead of "/.pcsx/bios/". Always set the + default memcard when config file does not exist. + +Mar 25, 2009 Wei Mingzhi + + * data/pcsx.glade2: Reorganized the menu a bit. Added Cheat Search + dialog. + +Mar 22, 2009 Wei Mingzhi + + * plugins/dfxvideo/gpu.c: Capture screenshots correctly in RGB24 + mode. + +Mar 11, 2009 Wei Mingzhi + + * gui/Gtk2Gui.c, win32/gui/WndMain.c: Don't call CheckCdrom() and + LoadCdrom() when switching ISO. + +Mar 6, 2009 Wei Mingzhi + + * data/pcsx.glade2: Reorganized menu. + * po/zh_CN.po, po/zh_TW.po, po/pcsx.pot: Updated. + +Mar 2, 2009 Wei Mingzhi + + * gui/Gtk2Gui.c: Remember last used directory in the Open Image dialog. + +Feb 27, 2009 Wei Mingzhi + + * libpcsxcore/plugins.c, win32/gui/WndMain.c, gui/Plugin.c: Moved + cdOpenCase to libpcsxcore. + * data/pcsx.glade2, gui/Gtk2Gui.c: Added "Switch ISO" function. + * win32/gui/WndMain.c, win32/resource.h: Likewise. + * libpcsxcore/mdec.c: Don't use precalculated table in ROUND(), which + may cause crashes due to subscript out of the bound in some cases. + * libpcsxcore/psxinterpreter.c: Silenced GCC warnings. + +Feb 20, 2009 Wei Mingzhi + + * configure.ac, Makefile.am: dfOpenGL is now only built when specified + with --enable-dfopengl during configure. + +Feb 19, 2009 Wei Mingzhi + + * configure.ac: Allow changing plugins install directory with --libdir. + * plugins/dfinput/Makefile.am: Likewise. + * plugins/dfcdrom/Makefile.am: Likewise. + * plugins/dfxvideo/Makefile.am: Likewise. + * plugins/dfsound/Makefile.am: Likewise. + * plugins/dfOpenGL/Makefile.am: Likewise. + * gui/Cheat.c, libpcsxcore/cheat.c: Moved platform-indepandent stuff + to libpcsxcore. Use dynamic memory allocation. + * libpcsxcore/cheat.h: Added. + * libpcsxcore/r3000a.c: Free all cheats on shutdown. + * gui/LnxMain.c, libpcsxcore/psxcounters.c: Moved cheat applying to + psxcounters.c from SysUpdate(). + +Feb 13, 2009 Wei Mingzhi + + * plugins/dfOpenGL/gpu_i.h: include stdint.h. + * plugins/dfOpenGL/cfg.c: Use frame limit by default. + * libpcsxcore/ix86/iR3000A.c: Don't execute x86Init(), which causes crash + in certain computers. + +Feb 12, 2009 Wei Mingzhi + + * gui/Cheat.c, data/pcsx.glade2: Implemented the Cheat List dialog. + * data/pcsx.glade2: Tweaked the About Dialog. + * plugins/dfsound/cfg.c: The Volume value in config file should now be + handled correctly as 0 (lowest) to 3 (loudest). + +Feb 11, 2009 Wei Mingzhi + + * gui/Cheat.c, gui/Cheat.h: Added cheat support. + * gui/Plugin.c: Apply cheats in SysUpdate(). + +Feb 10, 2009 Wei Mingzhi + + * gui/Config.c, gui/LnxMain.c: Moved the dotdir creation routine into + LnxMain.c. Check the directories and symlinks to plugins each time + the program starts. + * gui/Gtk2Gui.c, gui/LnxMain.c, gui/Plugin.c: Load the plugins at + emulation start instead of program start. + +Feb 9, 2009 Wei Mingzhi + + * libpcsxcore/psxmem.c: Define MAP_ANONYMOUS into MAP_ANON if it's not + defined. + * libpcsxcore/ix86/iR3000A.c: Likewise. + * libpcsxcore/ix86_64/iR3000A-64.c: Likewise. + * libpcsxcore/ppc/pR3000A.c: Likewise. + * pixmaps/pcsx-icon.png: Replaced the icon with a better one from PCSX + Mac OS X Port project. + * win32/gui/cdrom02.ico: Likewise. + * configure.ac: Only enable NASM in GNU/Linux. + * plugins/dfOpenGL/Makefile.am: Added /usr/X11R6 search path. + * plugins/dfxvideo/Makefile.am: Likewise. + * plugins/dfinput/Makefile.am: Likewise. + * plugins/dfinput/pad.c: Only enable joystick support in GNU/Linux. + * plugins/dfinput/cfg.c: Likewise. + * configure.ac: Add detection for sys/soundcard.h. + * plugins/dfsound/Makefile.am: Use NULL sound input if sys/soundcard.h + cannot be found. + * plugins/dfsound/nullsnd.c: Added. + * plugins/dfsound/spuPeopsSound.c: Removed unused files. + * plugins/dfsound/spuPeopsSound.def: Likewise. + * plugins/dfsound/stdafx.c: Likewise. + +Feb 8, 2009 Wei Mingzhi + + * data/pcsx.glade2, gui/Gtk2Gui.c: Changed "btn_ConfAbout" to + "btn_AboutNet" in the netplay config dialog. + +Feb 7, 2009 Wei Mingzhi + + * plugins/dfinput/cfg.c, plugins/dfinput/pad.c: Use Keyboard instead of + Joystick by default when no config file exists. + * plugins/dfinput/cfg.c: Update the UI when user switches the current pad. + Removed the useless "Device File" label. + * plugins/dfcdrom/interface.c: Fixed the behavior when closing the dfcdrom + config dialog box directly. + * gui/Gtk2Gui.c: Don't enable the "Use Debugger" checkbox when interpreter + core is not selected in CPU Config dialog box. Always enable the "Use + Interpreter CPU" when dynarec is not enabled during compilation. + * configure.ac: --disable-dynarec can now correctly disable the compilation + of dynamic recompiler core. + * plugins/dfxvideo/gpucfg-0.1df/main.c: Disable the checkboxes for game + fixes initially if the "Enable Special Game Fixes" is not checked. + +Feb 6, 2009 Wei Mingzhi + + * data/pcsx.glade2, gui/Gtk2Gui.c: Enable the GtkFileChooserButton in + memcard config dialog only when ready. + * win32/pcsx.dsp, win32/pcsx.dev: Added cdriso.c, cdriso.h. + * win32/gui/WndMain.c, win32/gui/Win32.h, win32/gui/plugin.c, + win32/resource.h: Make use of the internal image reader. + * libpcsxcore/cdriso.c: Cast the return value of ISOgetBuffer into + unsigned char * instead of char *. + * plugins/dfinput/pad.c: Removed usage of pcsx_style. + * plugins/dfinput/cfg.c, plugins/dfinput/dfinput.glade2: Likewise. + +Feb 5, 2009 Wei Mingzhi + + * libpcsxcore/plugins.h, win32/gui/plugin.h: Moved definations of GPUopen, + SPUopen, PADopen and NETopen to libpcsxcore. + * libpcsxcore/plugins.c: Check for each type of plugins in ReleasePlugins(). + * gui/Plugin.h: Removed useless file. + * libpcsxcore/cdriso.c, libpcsxcore/cdriso.h: Added internal image reader. + * libpcsxcore/plugins.c, gui/Gtk2Gui.c, gui/LnxMain.c: Make use of the + internal image reader. + * data/pcsx.glade2: Added "Run ISO" menu item. + * libpcsxcore/plugins.c: Initialize handles to plugins with NULL. + * plugins/dfiso, plugins/dfbinimage: Removed. + * plugins/dfxvideo/gpucfg-0.1df/callbacks.c: Removed unused files. + * plugins/dfxvideo/gpucfg-0.1df/callbacks.h: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/interface.c: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/interface.h: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/support.c: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/support.h: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/HACKING: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/gpucfg.gladep: Likewise. + * plugins/dfxvideo/callbacks.c: Likewise. + * plugins/dfxvideo/callbacks.h: Likewise. + * plugins/dfxvideo/interface.c: Likewise. + * plugins/dfxvideo/interface.h: Likewise. + * plugins/dfxvideo/support.c: Likewise. + * plugins/dfxvideo/support.h: Likewise. + * plugins/dfxvideo/gpucfg-0.1df/main.c: Removed support.h, interface.h. + * plugins/dfsound/cfg.c: Removed Windows-specific code. + * plugins/dfsound/spu.c: Likewise. + * plugins/dfsound/stdafx.c: Likewise. + * plugins/dfsound/alsa.c: Likewise. + * plugins/dfsound/oss.c: Likewise. + * plugins/dfsound/cfg.h: Likewise. + * plugins/dfsound/externals.h: Likewise. + * plugins/dfsound/freeze.c: Likewise. + * plugins/dfsound/debug.c: Removed unused files. + * plugins/dfsound/debug.h: Likewise. + * plugins/dfsound/resource.h: Likewise. + * plugins/dfsound/record.c: Likewise. + * plugins/dfsound/record.h: Likewise. + * gui/LnxMain.c: Fixed EXE loading in command line. + * plugins/dfsound/spucfg-0.1df/main.c: Added default values. + +Feb 4, 2009 Wei Mingzhi + + * gui/Makefile.am, libpcsxcore/Makefile.am: Now libpcsxcore is always + statically linked. + * INSTALL: Updated. + * gui/Gtk2Gui.c, gui/LnxMain.c: Moved ScanPlugins() and + check_symlink_in_path() to LnxMain.c. + * win32/gui/WndMain.c: Tweaked GUI behaviors. + * win32/gui/WndMain.c: Fixed Save/Load state. + +Feb 3, 2009 Wei Mingzhi + + * gui/Gtk2Gui.c, gui/Linux.h, gui/LnxMain.c: Tweaked some of the behaviors + of GUI. + * gui/Gtk2Gui.c: Removed some unnecessary debug messages. + +Feb 2, 2009 Wei Mingzhi + + * plugins/dfsound/spucfg-0.1df/interface.c: Removed unused files. + * plugins/dfsound/spucfg-0.1df/interface.h: Likewise. + * plugins/dfsound/spucfg-0.1df/support.c: Likewise. + * plugins/dfsound/spucfg-0.1df/support.h: Likewise. + * plugins/dfsound/spucfg-0.1df/callbacks.h: Likewise. + * plugins/dfsound/spucfg-0.1df/callbacks.h: Likewise. + * plugins/dfsound/spucfg-0.1df/Makefile: Likewise. + * plugins/dfsound/spucfg-0.1df/HACKING: Likewise. + * plugins/dfsound/spucfg-0.1df/spucfg2.gladep: Likewise. + * plugins/dfinput/Makefile.noautoconf: Likewise. + * plugins/dfcdrom/PSEmu Plugin Defs.h: Removed duplicate files. + * plugins/dfcdrom/Makefile.am: Added -I../../libpcsxcore. + * plugins/dfcdrom/cdr.h: Changed "PSEmu Plugin Defs.h" into + "psemu_plugin_defs.h". Added #include . + * gui/Makefile.am: Added DEF_PLUGIN_DIR defination. + * gui/LnxMain.c, gui/Gtk2Gui.c: Also scan for plugins in DEF_PLUGIN_DIR, + so that the program can be installed to any path. + * libpcsxcore/psxmem.c, libpcsxcore/plugins.c: Don't use GLIB in libpcsxcore. + * win32/glue/glib.h: Removed. + * win32/pcsx.dsp, win32/pcsx.dev: Removed glib.h. + * win32/plugin.c, win32/WndMain.c: Unified the save state naming convention + with the GTK port. + * win32/WndMain.c: Fixed OpenFile Dialog usage. + * data/pcsx.glade2: Changed hotkey for save state into Ctrl+1~5, as Shift + key is not working. Changed hotkey for Load Other/Save Other into Alt+0 + and Ctrl+0. + * doc/tweaks.txt, doc/keys.txt: Updated. + * debian/docs: Added ChangeLog.df file. + * debian/control: This package should be in otherosfs section according + to Debian policy. + * gui/Gtk2Gui.c: Disable state save/load in menu if no CD is loaded. + +Feb 1, 2009 Wei Mingzhi + + * win32/gui/WndMain.c: Don't paint the logo when the emu is running. + * win32/intl/intlconfig.h: Silented MSVC2005 warnings. + * Applied x86_64 patch by Dylan Simon (not tested). + +Jan 31, 2009 Wei Mingzhi + + * po/pcsx.pot: Regenerated. + * po/zh_CN.po, po/zh_TW.po: Updated. + * win32/pcsx.dev: Added Dev-C++ project file. + * win32/pcsx.rc: Adjusted some dialog boxes. + * Updated FSF's snail address in source files. + * data/pcsx.glade2: Fixed shortcut keys for "Save State" menu items. + +Jan 30, 2009 Wei Mingzhi + + * First alpha release of PCSX Reloaded. + - Backported to Windows. + - PCSX-df XVideo Plugin: Don't allow screen saver in fullscreen mode. + - PCSX-df XVideo Plugin: Don't show the GNOME panels in fullscreen mode. + - Minor bugfixes for UI. + - Fixed a bug which caused crash in FF8 Final Boss Fight. + - GCC 4.3 support. diff --git a/ChangeLog.df b/ChangeLog.df new file mode 100644 index 00000000..b5b6112a --- /dev/null +++ b/ChangeLog.df @@ -0,0 +1,486 @@ +2008-05-06 + - mdec: improvement for FF9, maybe other games run better, too + +2008-05-04 + - hdebug: supress multiple debugger-instances when using savestates, patch by Benoit Gschwind + +2008-05-02 + - dfiso: cleanup, rewrite and relicensing + +2008-03-16 + - dfOpenGL: configuration for window-resolution added + +2008-03-09 + - some uses of psxHu32() as an lvalue fixed + +2008-03-07 + - dfiso: several improvements of the new functions + +2008-03-04 + - dfiso: CDDA-playback and .toc-parsing implemented, minor source cleanups + +2008-02-25 + - HLE-Bios: initheap, malloc, free rewritten + - HLE-Bios: experimental patch in EnterCriticalSection, this one replaces the one in OpenEvent + - Interpreter: bug fix for HLE-jumptable + +2008-01-22 + - HLE-Bios: SetMem(size) added + - HLE-Bios: bugfix in OpenEvent(), several games work now with HLE, others do not, needs more investigation + - dfbinimage: modifications for compilation with recent portaudio + - dfbinimage: cleanup directory + +2008-01-17 + - minor debugger improvement + +2008-01-16 + - dfiso: conditional use of libnautilus for easy usage + - dfiso: additional default drives + - dfOpenGL included in autobuild-process + - HLE-Bios: bugfixes malloc() and free() + - HLE-Bios: bugfix for loading files, lots of games should start now with emulated Bios! + +2008-01-12 + - speed up for interpreter without debugger + - minor debugger improvements + +2008-01-11 + - integrated game debugger + +2008-01-09 + - dfiso: multiple bug fixes, not needed files removed + - dfiso: dependency to libnautilus deleted, instead function for cd-drive scanning in /sys/block + +2008-01-08 + - libpcsxcore: segfault in loadcdrom() fixed + - gui: segfaults on closing memory-card-dialog fixed + +2007-12-13 + - dfxvideo: bugfixes yuv-adaptor + +Please consult the darcs changelog for the latest. + +Sun Apr 23 11:39:31 EDT 2006 Ryan Schultz + * disable building of peops-video config + +Sun Apr 23 11:38:53 EDT 2006 Ryan Schultz + * add partial config file write/read to gpucfg (doesn't have fixes support yet) + +Sat Apr 22 23:22:49 EDT 2006 Ryan Schultz + * add the start of a peops-video reworking + +Sat Apr 22 23:21:08 EDT 2006 Ryan Schultz + * save sound config on close + +Fri Apr 14 23:51:22 EDT 2006 Ryan Schultz + * move plugins/sound to plugins/dfsound + +Fri Apr 14 23:50:28 EDT 2006 Ryan Schultz + * fix segfault when a library changes between PCSX's startup and the loading of a CD + +Fri Apr 14 23:48:41 EDT 2006 Ryan Schultz + * name tweaking on DFSound + +Fri Apr 14 23:31:39 EDT 2006 Ryan Schultz + * update spu to use GTK2 with a new glade interface + +Fri Apr 14 22:54:37 EDT 2006 Ryan Schultz + * cleanup binaries + +Fri Apr 14 22:47:35 EDT 2006 Ryan Schultz + * reactivate autorepeat on dfinput PADclose + +Fri Apr 14 22:44:25 EDT 2006 Ryan Schultz + * fix dfinput config program + +Fri Apr 14 22:14:12 EDT 2006 Ryan Schultz + * fix dumbness in sound plugin that caused config file name to be prefixed with garbage + +Fri Apr 14 22:12:35 EDT 2006 Ryan Schultz + * drop omnijoy + +Fri Apr 14 22:12:06 EDT 2006 Ryan Schultz + * move padjoy to dfinput folder + +Fri Apr 14 22:11:07 EDT 2006 Ryan Schultz + * move padjoy around and rename it to DFInput (Gamepad/Keyboard Input) + +Fri Apr 14 21:54:30 EDT 2006 Ryan Schultz + * add plugins which i apparently forgot about... + +Fri Apr 14 21:52:37 EDT 2006 Ryan Schultz + * add a tweaked padjoy, which will probably be the new default input; this one supports the keyboard and is gtk2 + +Fri Apr 14 21:49:51 EDT 2006 Ryan Schultz + * extend CheckPlugins testing and use it in more places; fixes segfault when a plugin symlink disappears + +Fri Apr 14 21:49:22 EDT 2006 Ryan Schultz + * fix short path lengths for BiosDir and PluginsDir + +Fri Apr 14 14:46:31 EDT 2006 Ryan Schultz + * fix nogui support + +Fri Apr 14 14:32:35 EDT 2006 Ryan Schultz + * build mooby with debug + +Fri Apr 14 14:29:32 EDT 2006 Ryan Schultz + * prevent segfault on Escape press in-game by forcing exit + This is a tragedy, but I see no way to restart the GUI without completely reworking PCSX + to use functions with actual return values (PCSX team sure loved void, even when the functions + can fail disastrously!). The explanation is in the source; basically the SysUpdate call + that catches Escape presses is deep within the emulation code itself, so it tries to StartGui + after closing the plugins and the psx core... then the emulation that was in progress tries to + continue, since it returns no indication of a stop! + +Fri Apr 14 14:29:03 EDT 2006 Ryan Schultz + * remove some more path length limits + +Thu Apr 6 17:40:56 EDT 2006 Ryan Schultz + UNDO: remove redundant RunGui, SysRunGui functions for StartGui + +Thu Apr 13 19:17:56 EDT 2006 Ryan Schultz + * fix save/load state functionality + +Wed Apr 12 21:00:11 EDT 2006 Ryan Schultz + * remove files that shouldn't be in repo + +Wed Apr 12 20:57:46 EDT 2006 Ryan Schultz + * add AM_PO_SUBDIRS + +Wed Apr 12 20:49:01 EDT 2006 Ryan Schultz + * docs and support files tinkering + +Wed Apr 12 20:17:01 EDT 2006 Ryan Schultz + * update interface for PSX Input plugin + +Tue Apr 11 19:34:25 EDT 2006 Ryan Schultz + * set window icon + +Tue Apr 11 19:23:52 EDT 2006 Ryan Schultz + * move a bunch of files around in plugins/ + +Tue Apr 11 19:22:55 EDT 2006 Ryan Schultz + * fix segfault in PSX input, possibly breaking other things -- untested + +Tue Apr 11 16:02:45 EDT 2006 Ryan Schultz + * heh, switch was more needed than i thought, revert that + +Tue Apr 11 15:57:16 EDT 2006 Ryan Schultz + * remove unneeded switch to dotdir + +Tue Apr 11 15:56:51 EDT 2006 Ryan Schultz + * some string fixes + +Tue Apr 11 15:54:44 EDT 2006 Ryan Schultz + * make certain that plugin functions only happen when plugins are available, and prevent the emulator core from attempting to start without having all plugins loaded + +Fri Apr 7 17:41:33 EDT 2006 Ryan Schultz + * choose default plugins if none are set when a new directory is scanned + +Thu Apr 6 17:40:56 EDT 2006 Ryan Schultz + * remove redundant RunGui, SysRunGui functions for StartGui + +Thu Apr 6 17:37:40 EDT 2006 Ryan Schultz + * autoconf bigendian check + +Thu Apr 6 17:24:50 EDT 2006 Ryan Schultz + * merge Debian patch from Marcus Comstedt to fix bigendian compiles + +Thu Apr 6 17:19:05 EDT 2006 Ryan Schultz + * switch __MACOSX__ define to __BIGENDIAN__ + +Tue Apr 4 06:24:39 EDT 2006 adb@iinet.net.au + * GStrings_and_MiscCleanups + Converted a number of C string utility functions to use the GLib string functions, miscellaneous clean ups of redundant code + +Fri Mar 24 05:24:14 EST 2006 adb@iinet.net.au + * BIOS_Path_and_CDROM_Plugin + +Sun Apr 2 13:35:39 EDT 2006 Ryan Schultz + * add new sound plugin, adapted from PEOpS OSS + +Tue Mar 28 15:19:34 EST 2006 Ryan Schultz + * add plugins, some small changes in misc. places; plugins include a nicer omnijoy + +Wed Mar 22 16:17:10 EST 2006 Ryan Schultz + * autotools version note + +Wed Mar 22 16:11:37 EST 2006 Ryan Schultz + * fix manpage + +Sun Feb 26 14:33:38 EST 2006 Ryan Schultz + * add keyboard accelerators for main interface + +Sat Jan 28 19:40:19 EST 2006 Ryan Schultz + * adjust main window size slightly + +Sun Jan 22 14:18:13 EST 2006 Ryan Schultz + * add trivial autogen.sh script + +Sun Jan 22 14:14:39 EST 2006 Ryan Schultz + * add support for instant autoconfiguration on first launch if plugins are available + +Sun Jan 22 14:13:37 EST 2006 Ryan Schultz + * split UpdatePluginsBIOS into two functions, one for GUI and one for not + +Sun Jan 22 14:12:40 EST 2006 Ryan Schultz + * fix splash install directory + +Sun Jan 22 13:51:03 EST 2006 Ryan Schultz + * remove some more Glade cruft + +Sun Jan 22 13:47:04 EST 2006 Ryan Schultz + * kill Glade in Makefile.am + +Sat Jan 21 18:29:22 EST 2006 Ryan Schultz + * beginnings of quiet autoconfiguration + +Sat Jan 21 18:28:31 EST 2006 Ryan Schultz + * build fix on non-x86 arches + +Sat Jan 21 05:09:54 EST 2006 adb@iinet.net.au + * Die-Glade-Generated-Code + +Fri Jan 20 23:31:02 EST 2006 Ryan Schultz + * add desktop file + +Sun Jan 15 15:47:39 EST 2006 Ryan Schultz + * more woo for the po makefile :- ) + +Wed Jan 11 20:56:41 EST 2006 Ryan Schultz + * add a desktop file, add automagic for icons and desktop file + +Mon Jan 9 12:11:35 EST 2006 Ryan Schultz + * add include/config.h.in *duh* + +Sun Jan 8 11:23:54 EST 2006 Ryan Schultz + * add config.rpath to quiet an error in configure + +Sun Jan 8 11:03:04 EST 2006 Ryan Schultz + * minor changes to the style of the memcard dialog + +Sun Jan 8 10:52:14 EST 2006 Ryan Schultz + * merge fixes for patch conflicts + +Sun Jan 8 05:26:09 EST 2006 adb@iinet.net.au + * MemCards + +Sun Jan 8 02:53:13 EST 2006 adb@iinet.net.au + * Automake + +Sun Jan 8 02:31:03 EST 2006 Ryan Schultz + * replace crummy icon with more colorful one + +Sun Jan 8 02:10:12 EST 2006 Ryan Schultz + * add fake rules to temp po/Makefile to stop senseless msgmerges + +Sun Jan 8 02:07:24 EST 2006 Ryan Schultz + * add autoheader magic, cleanup autotools structure a little + +Sat Jan 7 02:14:42 EST 2006 Ryan Schultz + * fixes to automake/autoconf setup, update some docs + +Sat Jan 7 01:10:34 EST 2006 adb@iinet.net.au + * Automake2 + +Fri Jan 6 21:20:47 EST 2006 Ryan Schultz + * automatically create default memcards during startup config + +Fri Jan 6 17:54:26 EST 2006 Ryan Schultz + * add ScanPlugins to OnPluginsPath_Changed + +Thu Jan 5 22:38:30 EST 2006 adb@iinet.net.au + * Config + +Wed Jan 4 18:23:05 EST 2006 Ryan Schultz + * add Swedish translation by Daniel Nylander along with Makefile rules + +Tue Jan 3 19:55:34 EST 2006 Ryan Schultz + * slight tweak to icons, install the really ugly one only now + +Tue Jan 3 19:52:15 EST 2006 Ryan Schultz + * add crappy preliminary icons and install rules for them + +Mon Jan 2 21:20:20 EST 2006 adb@iinet.net.au + * UseExistingDialogs + +Thu Dec 29 23:16:29 EST 2005 Ryan Schultz + * add little image to netplay dialog + +Thu Dec 29 23:12:02 EST 2005 Ryan Schultz + * add desktop file and associated install rules + +Thu Dec 29 23:05:56 EST 2005 Ryan Schultz + * add install/uninstall support to makefile + +Thu Dec 29 22:39:31 EST 2005 Ryan Schultz + * update some of the path variables to MAXPATHLEN + +Wed Dec 28 04:00:25 EST 2005 Ryan Schultz + * set current folder to home before calling file choosers + +Tue Dec 27 17:34:03 EST 2005 Ryan Schultz + * fix conflicts + +Tue Dec 27 17:15:17 EST 2005 Ryan Schultz + * try to get archives synced + +Tue Dec 27 17:09:43 EST 2005 Ryan Schultz + * touch up new configure, cpu, and net dialogs + +Tue Dec 27 17:14:19 EST 2005 Ryan Schultz + * merge fixes for PATCHConfDlg etc + +Mon Dec 26 18:11:48 EST 2005 adb@iinet.net.au + * PATCHConfDlgNetDlg + +Mon Dec 26 15:28:50 EST 2005 Ryan Schultz + * remove unnecessary signal + +Mon Dec 26 15:21:39 EST 2005 Ryan Schultz + * small modifications to CpuDlg patch + +Mon Dec 26 03:20:06 EST 2005 adb@iinet.net.au + * PATCHCpuDlg + +Sat Dec 24 01:19:32 EST 2005 Ryan Schultz + * remove window sensitivity switching, set children dialogs to die with parent + +Sat Dec 24 00:45:42 EST 2005 Ryan Schultz + * add broken symlink handling to scan code + +Fri Dec 23 23:38:26 EST 2005 Ryan Schultz + * make gtk2 check have teeth (error when not found) + +Fri Dec 23 23:15:04 EST 2005 Ryan Schultz + * pixmaps search change + +Fri Dec 23 23:12:51 EST 2005 Ryan Schultz + * add autoconf/makefile crossbreed... PCSX does not get along with automake + +Fri Dec 23 18:28:52 EST 2005 Ryan Schultz + * fix silly mistakes with file chooser + +Fri Dec 23 17:27:30 EST 2005 Ryan Schultz + * more glade updates + +Fri Dec 23 17:26:34 EST 2005 Ryan Schultz + * add new splash + +Fri Dec 23 16:07:44 EST 2005 Ryan Schultz + * more gui tweaking, move buttons around in glade + +Fri Dec 23 15:48:36 EST 2005 Ryan Schultz + * more cleanup, remove unneeded files and strings + +Fri Dec 23 15:08:34 EST 2005 Ryan Schultz + * update all file selectors to file choosers + +Fri Dec 23 14:33:07 EST 2005 Ryan Schultz + * modern GTK about dialog + +Fri Dec 23 13:24:08 EST 2005 Ryan Schultz + * revert CPU config dialog changes (the more advanced glade stuff) + +Fri Dec 23 12:46:08 EST 2005 Ryan Schultz + * completely rework how plugins are handled, initial commit, needs cleanup + The new plugin handling system uses symlinks to store plugins in ~/.pcsx/plugins, along with their config tools. This way, plugins can be in multiple directories. Config.PluginsDir is removed. The Plugins & BIOS configuring interface now has an option to choose the directory to scan. Much cleanup is needed, though, as FindPlugins vs ScanPlugins, etc. cruft abounds. + +Fri Dec 23 00:36:45 EST 2005 Ryan Schultz + * add start of unified makefile for plugins + +Fri Dec 23 00:21:04 EST 2005 Ryan Schultz + * remove some old/invalid docs + +Fri Dec 23 00:16:38 EST 2005 Ryan Schultz + * add stub README + +Fri Dec 23 00:14:41 EST 2005 Ryan Schultz + * add some common files (INSTALL, COPYING, AUTHORS, etc) + +Thu Dec 22 23:43:26 EST 2005 Ryan Schultz + * add file that were missed + +Thu Dec 22 23:21:29 EST 2005 Ryan Schultz + * fix NLS and gettext support!! WOO + +Thu Dec 22 23:20:36 EST 2005 Ryan Schultz + * some defines in the makefile for temporary prefix support + +Thu Dec 22 23:20:11 EST 2005 Ryan Schultz + * remove more + +Thu Dec 22 23:19:42 EST 2005 Ryan Schultz + * remove empty files + +Thu Dec 22 21:55:59 EST 2005 Ryan Schultz + * completely refactor directory layout, remove imaginary autotooling + +Thu Dec 22 21:37:49 EST 2005 Ryan Schultz + * more string cleanups, path to sane languages begins + +Thu Dec 22 21:14:32 EST 2005 Ryan Schultz + * remove broken lang support from base code + +Thu Dec 22 21:10:47 EST 2005 Ryan Schultz + * remove broken language support from GUI, GUI cleanup, fix pixmap location routine, revert pcsx.glade + +Thu Dec 22 20:28:29 EST 2005 Ryan Schultz + * turn off emuLog debug recording + +Thu Dec 22 20:24:21 EST 2005 Ryan Schultz + * incorporate free plugins into pcsx-df source + I think this is a good idea. It makes my life easier, for sure, and + will let me keep the PCSX-df modified plugins with pcsx-df. + +Thu Dec 22 11:53:46 EST 2005 Ryan Schultz + * incorporate patches for file chooser, glade + +Sun Oct 16 16:30:40 EDT 2005 Ryan Schultz + * change mind about splash, add install/uninstall routines + +Sun Oct 16 15:30:58 EDT 2005 Ryan Schultz + * new splash screen, small changes towards release + +Sun Oct 16 14:37:30 EDT 2005 Ryan Schultz + * remove dreamcast support, less retarded sed + I forgot to remove the sh4 dir for the Dreamcast. I also did the sed in the Makefile in a very dumb way. Small changelog update too. + +Sun Oct 16 14:19:09 EDT 2005 Ryan Schultz + * remove hardcoded directories + +Sat Oct 15 22:16:32 EDT 2005 Ryan Schultz + * fix dumb gcc4 mistake + +Sat Oct 15 21:17:48 EDT 2005 Ryan Schultz + * gcc 4 compatibility!! + This patch adds gcc 4.0 compatibility at last! The fix was to mangle the lvalue casts into a form gcc would accept. It's ugly, but it works. + example: + (u8*)ptr = (u8*)(psxM + psxRu32(base)); + becomes + *(u8*)&ptr = (u8*)(psxM + psxRu32(base)); + + gcc is perfectly fine with this. For now. + There are also some minor Makefile updates, removing gcc-3.4 specifics. + +Mon Oct 3 22:25:07 EDT 2005 Ryan Schultz + * add slightly better install routine, temp hack until I reautotool + +Mon Oct 3 22:07:19 EDT 2005 Ryan Schultz + * remove Gtk1 GUI code and support, rewrite makefiles and configure.in to use more user opts + +Sun Oct 2 21:26:31 EDT 2005 Ryan Schultz + * fix potential crash (strcpy vs strncpy) + +Sun Oct 2 21:19:13 EDT 2005 Ryan Schultz + * finish up dotfile support for everything but cfg + Dotfile support is now complete, except for running the cfg programs. This + is hardcoded into the plugins, and cannot be fixed in PCSX proper. + +Sun Oct 2 15:55:34 EDT 2005 Ryan Schultz + * memcard note + +Sun Oct 2 14:18:40 EDT 2005 Ryan Schultz + * intial revision + +From PCSX 1.6 beta diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..8b82ade0 --- /dev/null +++ b/INSTALL @@ -0,0 +1,291 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008 Free Software Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 6. Often, you can also type `make uninstall' to remove the installed + files again. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *Note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..9affdf8b --- /dev/null +++ b/Makefile.am @@ -0,0 +1,4 @@ +SUBDIRS = data doc po libpcsxcore gui pixmaps plugins/dfinput plugins/dfsound plugins/dfxvideo plugins/dfcdrom plugins/dfnet +SUBDIRS += $(PEOPSXGL) + +EXTRA_DIST = AUTHORS COPYING INSTALL NEWS README ChangeLog ChangeLog.df diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 00000000..19700e08 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,682 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/configure \ + $(top_srcdir)/include/config.h.in ABOUT-NLS AUTHORS COPYING \ + ChangeLog INSTALL NEWS compile config.guess config.rpath \ + config.sub depcomp install-sh ltmain.sh missing mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = data doc po libpcsxcore gui pixmaps plugins/dfinput \ + plugins/dfsound plugins/dfxvideo plugins/dfcdrom plugins/dfnet \ + $(PEOPSXGL) +EXTRA_DIST = AUTHORS COPYING INSTALL NEWS README ChangeLog ChangeLog.df +all: all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +include/config.h: include/stamp-h1 + @if test ! -f $@; then \ + rm -f include/stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) include/stamp-h1; \ + else :; fi + +include/stamp-h1: $(top_srcdir)/include/config.h.in $(top_builddir)/config.status + @rm -f include/stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status include/config.h +$(top_srcdir)/include/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f include/stamp-h1 + touch $@ + +distclean-hdr: + -rm -f include/config.h include/stamp-h1 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/NEWS b/NEWS new file mode 100644 index 00000000..eb5a4787 --- /dev/null +++ b/NEWS @@ -0,0 +1,5 @@ +PCSX-Reloaded: Bringing clarity, joy, and a nice GUI to PCSX. + +You should remove your old ~/.pcsx directory before using PCSX-Reloaded, to +avoid any possible compatibility issues, such as missing folders. Remember +that memcards and savestates are kept there, so be sure to copy them out first! diff --git a/README b/README new file mode 100644 index 00000000..50713d2a --- /dev/null +++ b/README @@ -0,0 +1,20 @@ +PCSX-Reloaded +------------------------------- + +PCSX-Reloaded is a forked version of the dead PCSX emulator, with a nicer +interface and several improvements to stability and functionality. + +PCSX-Reloaded uses the PSEMU plugin interface to provide most functionality; +without them, you will not be able to use it to play games. PCSX-Reloaded +provides a number of plugins to provide basic functionality out of the box. + +PCSX-Reloaded has a very capable Internal HLE BIOS that can run many games +without problems. It is recommended that you use it. However, if you own a +real PlayStation, you may be able to use your own BIOS image. PCSX-Reloaded +will find it in ~/.pcsx/bios/ or /usr/share/psemu/bios/ if you place it there. +This can improve compatibility, especially with certain games and with the +use of memory cards. + +See the doc/ folder in the source, or /usr/share/doc/pcsx/ on Debian systems, +for more detailed information on PCSX-Reloaded. A UNIX manpage is also +available. diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 00000000..7aa5c329 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,11427 @@ +# generated automatically by aclocal 1.10.2 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, +[m4_warning([this file was generated for autoconf 2.63. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# gettext.m4 serial 60 (gettext-0.17) +dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2006. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value `$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define([gt_included_intl], + ifelse([$1], [external], + ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), + [yes])) + define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + gt_NEEDS_INIT + AM_GNU_GETTEXT_NEED([$2]) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. + gt_INTL_MACOSX + + dnl Set USE_NLS. + AC_REQUIRE([AM_NLS]) + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl Add a version number to the cache macros. + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], + [AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings;], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], + [eval "$gt_func_gnugettext_libc=yes"], + [eval "$gt_func_gnugettext_libc=no"])]) + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + [$gt_func_gnugettext_libintl], + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *);], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], + [eval "$gt_func_gnugettext_libintl=yes"], + [eval "$gt_func_gnugettext_libintl=no"]) + dnl Now see whether libintl exists and depends on libiconv. + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *);], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Some extra flags are needed during linking. + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + AC_MSG_CHECKING([whether to use NLS]) + AC_MSG_RESULT([$USE_NLS]) + if test "$USE_NLS" = "yes"; then + AC_MSG_CHECKING([where the gettext function comes from]) + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + AC_MSG_RESULT([$gt_source]) + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE(HAVE_GETTEXT, 1, + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE(HAVE_DCGETTEXT, 1, + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST(BUILD_INCLUDED_LIBINTL) + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATOBJEXT) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST(DATADIRNAME) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST(INSTOBJEXT) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST(GENCAT) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLOBJS= + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + AC_SUBST(INTLOBJS) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST(INTLLIBS) + + dnl Make all documented variables known to autoconf. + AC_SUBST(LIBINTL) + AC_SUBST(LTLIBINTL) + AC_SUBST(POSUB) +]) + + +dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. +m4_define([gt_NEEDS_INIT], +[ + m4_divert_text([DEFAULTS], [gt_needs=]) + m4_define([gt_NEEDS_INIT], []) +]) + + +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) +AC_DEFUN([AM_GNU_GETTEXT_NEED], +[ + m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) + +# iconv.m4 serial AM6 (gettext-0.17) +dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ + dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + AC_TRY_RUN([ +#include +#include +int main () +{ + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + return 1; + return 0; +}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST(LIBICONV) + AC_SUBST(LTLIBICONV) +]) + +AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi +]) + +# intlmacosx.m4 serial 1 (gettext-0.17) +dnl Copyright (C) 2004-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Checks for special options needed on MacOS X. +dnl Defines INTL_MACOSX_LIBS. +AC_DEFUN([gt_INTL_MACOSX], +[ + dnl Check for API introduced in MacOS X 10.2. + AC_CACHE_CHECK([for CFPreferencesCopyAppValue], + gt_cv_func_CFPreferencesCopyAppValue, + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], + [CFPreferencesCopyAppValue(NULL, NULL)], + [gt_cv_func_CFPreferencesCopyAppValue=yes], + [gt_cv_func_CFPreferencesCopyAppValue=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, + [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + fi + dnl Check for API introduced in MacOS X 10.3. + AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], + [gt_cv_func_CFLocaleCopyCurrent=yes], + [gt_cv_func_CFLocaleCopyCurrent=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, + [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + AC_SUBST([INTL_MACOSX_LIBS]) +]) + +# lib-ld.m4 serial 3 (gettext-0.13) +dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(acl_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) + +# lib-link.m4 serial 13 (gettext-0.17) +dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ(2.54) + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. If found, it +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + LIB[]NAME[]_PREFIX= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + undefine([Name]) + undefine([NAME]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl acl_libext, +dnl acl_shlibext, +dnl acl_hardcode_libdir_flag_spec, +dnl acl_hardcode_libdir_separator, +dnl acl_hardcode_direct, +dnl acl_hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + dnl Tell automake >= 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl Autoconf >= 2.61 supports dots in --with options. + define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], +[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIB[]NAME[]_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) + +# lib-prefix.m4 serial 5 (gettext-0.15) +dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing +dnl the basename of the libdir, either "lib" or "lib64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi +]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_SHELL_INIT + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +[$]* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +AC_PROG_CXX +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} + +_LT_EOF + ;; + esac +]) + +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) + +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) + +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# Generated from ltversion.in. + +# serial 3012 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6]) +m4_define([LT_PACKAGE_REVISION], [1.3012]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6' +macro_revision='1.3012' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) + +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) + +# nls.m4 serial 3 (gettext-0.15) +dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ(2.50) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) +]) + +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi + +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure to call +# PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_ifval([$2], [$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$PKG_CONFIG"; then + if test -n "$$1"; then + pkg_cv_[]$1="$$1" + else + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + fi +else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + ifelse([$4], , [AC_MSG_ERROR(dnl +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) +elif test $pkg_failed = untried; then + ifelse([$4], , [AC_MSG_FAILURE(dnl +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])], + [$4]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + ifelse([$3], , :, [$3]) +fi[]dnl +])# PKG_CHECK_MODULES + +# po.m4 serial 15 (gettext-0.17) +dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ(2.50) + +dnl Checks for all prerequisites of the po subdirectory. +AC_DEFUN([AM_PO_SUBDIRS], +[ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + AC_REQUIRE([AM_NLS])dnl + + dnl Release version of the gettext macros. This is used to ensure that + dnl the gettext macros and po/Makefile.in.in are in sync. + AC_SUBST([GETTEXT_MACRO_VERSION], [0.17]) + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + + dnl Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([MSGFMT_015]) +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + + dnl Search for GNU xgettext 0.12 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) + + dnl Installation directories. + dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we + dnl have to define it here, so that it can be used in po/Makefile. + test -n "$localedir" || localedir='${datadir}/locale' + AC_SUBST([localedir]) + + dnl Support for AM_XGETTEXT_OPTION. + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) + + AC_CONFIG_COMMANDS([po-directories], [[ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done]], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + +dnl Postprocesses a Makefile in a directory containing PO files. +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], +[ + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + +changequote(,)dnl + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1996. + +AC_PREREQ(2.50) + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[ +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + +# Configure paths for SDL +# Sam Lantinga 9/21/99 +# stolen from Manish Singh +# stolen back from Frank Belew +# stolen from Manish Singh +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS +dnl +AC_DEFUN([AM_PATH_SDL], +[dnl +dnl Get the cflags and libraries from the sdl-config script +dnl +AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], + sdl_prefix="$withval", sdl_prefix="") +AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], + sdl_exec_prefix="$withval", sdl_exec_prefix="") +AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], + , enable_sdltest=yes) + + if test x$sdl_exec_prefix != x ; then + sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config + fi + fi + if test x$sdl_prefix != x ; then + sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_prefix/bin/sdl-config + fi + fi + + if test "x$prefix" != xNONE; then + PATH="$prefix/bin:$prefix/usr/bin:$PATH" + fi + AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) + min_sdl_version=ifelse([$1], ,0.11.0,$1) + AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) + no_sdl="" + if test "$SDL_CONFIG" = "no" ; then + no_sdl=yes + else + SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` + SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` + + sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_sdltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" +dnl +dnl Now check if the installed SDL is sufficiently new. (Also sanity +dnl checks the results of sdl-config to some extent +dnl + rm -f conf.sdltest + AC_TRY_RUN([ +#include +#include +#include +#include "SDL.h" + +char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main (int argc, char *argv[]) +{ + int major, minor, micro; + char *tmp_version; + + /* This hangs on some systems (?) + system ("touch conf.sdltest"); + */ + { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_sdl_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_sdl_version"); + exit(1); + } + + if (($sdl_major_version > major) || + (($sdl_major_version == major) && ($sdl_minor_version > minor)) || + (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); + printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); + printf("*** to point to the correct copy of sdl-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + +],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_sdl" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$SDL_CONFIG" = "no" ; then + echo "*** The sdl-config script installed by SDL could not be found" + echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the SDL_CONFIG environment variable to the" + echo "*** full path to sdl-config." + else + if test -f conf.sdltest ; then + : + else + echo "*** Could not run SDL test program, checking why..." + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + AC_TRY_LINK([ +#include +#include "SDL.h" + +int main(int argc, char *argv[]) +{ return 0; } +#undef main +#define main K_and_R_C_main +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding SDL or finding the wrong" + echo "*** version of SDL. If it is not finding SDL, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means SDL was incorrectly installed" + echo "*** or that you have moved SDL since it was installed. In the latter case, you" + echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + SDL_CFLAGS="" + SDL_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(SDL_CFLAGS) + AC_SUBST(SDL_LIBS) + rm -f conf.sdltest +]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10.2], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10.2])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_PROG_AS +# ---------- +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 4 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[# Autoconf 2.62 quotes --file arguments for eval, but not when files +# are listed without --file. Let's play safe and only enable the eval +# if we detect the quoting. +case $CONFIG_FILES in +*\'*) eval set x "$CONFIG_FILES" ;; +*) set x $CONFIG_FILES ;; +esac +shift +for mf +do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 13 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 00000000..5158e8eb --- /dev/null +++ b/autogen.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. +# Additional options go to configure. + +echo "Rebuilding ./configure with autoreconf..." +autoreconf -f -i +if [ $? -ne 0 ]; then + echo "autoreconf failed" + exit $? +fi + +./configure --enable-maintainer-mode "$@" diff --git a/compile b/compile new file mode 100755 index 00000000..1b1d2321 --- /dev/null +++ b/compile @@ -0,0 +1,142 @@ +#! /bin/sh +# Wrapper for compilers which do not understand `-c -o'. + +scriptversion=2005-05-14.22 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand `-c -o'. +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file `INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; +esac + +ofile= +cfile= +eat= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + # So we strip `-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no `-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # `.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` + +# Create the lock directory. +# Note: use `[/.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/config.guess b/config.guess new file mode 100755 index 00000000..f32079ab --- /dev/null +++ b/config.guess @@ -0,0 +1,1526 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. + +timestamp='2008-01-23' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.rpath b/config.rpath new file mode 100755 index 00000000..c547c688 --- /dev/null +++ b/config.rpath @@ -0,0 +1,666 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2007 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + darwin*) + case $cc_basename in + xlc*) + wl='-Wl,' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + newsos6) + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + wl='-Wl,' + ;; + pgcc | pgf77 | pgf90) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + rdos*) + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we cannot use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + bsdi[45]*) + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if test "$GCC" = yes ; then + : + else + case $cc_basename in + xlc*) + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix4* | aix5*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + library_names_spec='$libname.a' + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | mingw* | pw32*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd1*) + ;; + freebsd* | dragonfly*) + case "$host_os" in + freebsd[123]*) + library_names_spec='$libname$shrext$versuffix' ;; + *) + library_names_spec='$libname$shrext' ;; + esac + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix[3-9]*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux* | k*bsd*-gnu) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + nto-qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + rdos*) + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure new file mode 100755 index 00000000..476a4c6b --- /dev/null +++ b/configure @@ -0,0 +1,19356 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.63 for pcsx 1.9. +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +$* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='pcsx' +PACKAGE_TARNAME='pcsx' +PACKAGE_VERSION='1.9' +PACKAGE_STRING='pcsx 1.9' +PACKAGE_BUGREPORT='' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +gt_needs= +ac_subst_vars='LTLIBOBJS +LIBOBJS +ARCH_PPC_FALSE +ARCH_PPC_TRUE +ARCH_X86_64_FALSE +ARCH_X86_64_TRUE +ARCH_X86_FALSE +ARCH_X86_TRUE +NASM +X86_NASM_FALSE +X86_NASM_TRUE +PEOPSXGL +LIBCDIO_LIBS +LIBCDIO_CFLAGS +USE_LIBCDIO_FALSE +USE_LIBCDIO_TRUE +SOUND_PULSEAUDIO_FALSE +SOUND_PULSEAUDIO_TRUE +SOUND_ALSA_FALSE +SOUND_ALSA_TRUE +PULSEAUDIO_LIBS +PULSEAUDIO_CFLAGS +ALSA_LIBS +ALSA_CFLAGS +SOUND_NULL_FALSE +SOUND_NULL_TRUE +SOUND_SDL_FALSE +SOUND_SDL_TRUE +SOUND_OSS_FALSE +SOUND_OSS_TRUE +SDL_LIBS +SDL_CFLAGS +SDL_CONFIG +GLADE2_LIBS +GLADE2_CFLAGS +GTK2_LIBS +GTK2_CFLAGS +GLIB2_LIBS +GLIB2_CFLAGS +PKG_CONFIG +GETTEXT_PACKAGE +POSUB +LTLIBINTL +LIBINTL +INTLLIBS +LTLIBICONV +LIBICONV +INTL_MACOSX_LIBS +XGETTEXT_EXTRA_OPTIONS +MSGMERGE +XGETTEXT_015 +XGETTEXT +GMSGFMT_015 +MSGFMT_015 +GMSGFMT +MSGFMT +GETTEXT_MACRO_VERSION +USE_NLS +am__fastdepCCAS_FALSE +am__fastdepCCAS_TRUE +CCASDEPMODE +CCASFLAGS +CCAS +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO +AR +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +LIBTOOL +RANLIB +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_dependency_tracking +enable_static +enable_shared +with_pic +enable_fast_install +with_gnu_ld +enable_libtool_lock +enable_nls +enable_rpath +with_libiconv_prefix +with_libintl_prefix +with_sdl_prefix +with_sdl_exec_prefix +enable_sdltest +enable_sound +enable_libcdio +enable_opengl +enable_dynarec +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CCAS +CCASFLAGS +PKG_CONFIG +GLIB2_CFLAGS +GLIB2_LIBS +GTK2_CFLAGS +GTK2_LIBS +GLADE2_CFLAGS +GLADE2_LIBS +ALSA_CFLAGS +ALSA_LIBS +PULSEAUDIO_CFLAGS +PULSEAUDIO_LIBS +LIBCDIO_CFLAGS +LIBCDIO_LIBS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures pcsx 1.9 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/pcsx] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of pcsx 1.9:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-static[=PKGS] build static libraries [default=no] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-nls do not use Native Language Support + --disable-rpath do not hardcode runtime library paths + --disable-sdltest Do not try to compile and run a test SDL program + --enable-sound=... force selection of sound backend (alsa/null/oss/pulseaudio/sdl) (default: sdl) + --enable-libcdio use GNU libcdio for CD-ROM support (default=no) + --enable-opengl build OpenGL plugin (default=no) + --enable-dynarec=... force selection of dynamic recompiler platform (auto/no/x86/x86_64/ppc) (default: auto) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib + --without-libintl-prefix don't search for libintl in includedir and libdir + --with-sdl-prefix=PFX Prefix where SDL is installed (optional) + --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional) + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + PKG_CONFIG path to pkg-config utility + GLIB2_CFLAGS + C compiler flags for GLIB2, overriding pkg-config + GLIB2_LIBS linker flags for GLIB2, overriding pkg-config + GTK2_CFLAGS C compiler flags for GTK2, overriding pkg-config + GTK2_LIBS linker flags for GTK2, overriding pkg-config + GLADE2_CFLAGS + C compiler flags for GLADE2, overriding pkg-config + GLADE2_LIBS linker flags for GLADE2, overriding pkg-config + ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config + ALSA_LIBS linker flags for ALSA, overriding pkg-config + PULSEAUDIO_CFLAGS + C compiler flags for PULSEAUDIO, overriding pkg-config + PULSEAUDIO_LIBS + linker flags for PULSEAUDIO, overriding pkg-config + LIBCDIO_CFLAGS + C compiler flags for LIBCDIO, overriding pkg-config + LIBCDIO_LIBS + linker flags for LIBCDIO, overriding pkg-config + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +pcsx configure 1.9 +generated by GNU Autoconf 2.63 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by pcsx $as_me 1.9, which was +generated by GNU Autoconf 2.63. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +gt_needs="$gt_needs " +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if test "${ac_cv_target+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +$as_echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +am__api_version='1.10' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +$as_echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=pcsx + VERSION=1.9 + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +ac_config_headers="$ac_config_headers include/config.h:include/config.h.in" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + fi + fi +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest$ac_cv_exeext +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi + + + + + + + + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.2.6' +macro_revision='1.3012' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + $as_unset ac_script || ac_script= + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if test "${ac_cv_path_FGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test "${lt_cv_path_NM+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$ac_tool_prefix"; then + for ac_prog in "dumpbin -symbols" "link -dump -symbols" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in "dumpbin -symbols" "link -dump -symbols" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if test "${lt_cv_nm_interface+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:4637: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:4640: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:4643: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:$LINENO: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:$LINENO: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "ok" >&6; } +fi + + + + + + + + + + + + + + + + + + + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 5849 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_cc_needs_belf=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_ld_exported_symbols_list=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_ld_exported_symbols_list=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if test "${lt_cv_objdir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + + + + + + + + + + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:$LINENO: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7672: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7676: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } + + + + + + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8011: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8015: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8116: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8120: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8171: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8175: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + link_all_deplibs=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat >conftest.$ac_ext <<_ACEOF +int foo(void) {} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then + shlibpath_overrides_runpath=yes +fi + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 +$as_echo_n "checking for shl_load... " >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +$as_echo "$ac_cv_func_shl_load" >&6; } +if test "x$ac_cv_func_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 +$as_echo_n "checking for dlopen... " >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +$as_echo "$ac_cv_func_dlopen" >&6; } +if test "x$ac_cv_func_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_svld_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_dld_link=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10984 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 11080 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + +depcc="$CCAS" am_compiler_list= + +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CCAS_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } +CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then + am__fastdepCCAS_TRUE= + am__fastdepCCAS_FALSE='#' +else + am__fastdepCCAS_TRUE='#' + am__fastdepCCAS_FALSE= +fi + + + + + { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi + + { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + + + + + GETTEXT_MACRO_VERSION=0.17 + + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGFMT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case "$MSGFMT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GMSGFMT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac + + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XGETTEXT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case "$XGETTEXT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + rm -f messages.po + + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGMERGE+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case "$MSGMERGE" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$localedir" || localedir='${datadir}/locale' + + + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + + + ac_config_commands="$ac_config_commands po-directories" + + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +$as_echo_n "checking for ld used by GCC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${acl_cv_path_LD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:$LINENO: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${acl_cv_prog_gnu_ld+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + + { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if test "${acl_cv_rpath+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +{ $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval=$enable_rpath; : +else + enable_rpath=yes +fi + + + + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi + +fi + + LIBICONV= + LTLIBICONV= + INCICONV= + LIBICONV_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIBICONV_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 +$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } +if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + gt_cv_func_CFPreferencesCopyAppValue=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_func_CFPreferencesCopyAppValue=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CFPREFERENCESCOPYAPPVALUE 1 +_ACEOF + + fi + { $as_echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 +$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } +if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +CFLocaleCopyCurrent(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + gt_cv_func_CFLocaleCopyCurrent=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_func_CFLocaleCopyCurrent=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CFLOCALECOPYCURRENT 1 +_ACEOF + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + + + + LIBINTL= + LTLIBINTL= + POSUB= + + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + { $as_echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 +$as_echo_n "checking for GNU gettext in libc... " >&6; } +if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$gt_func_gnugettext_libc=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$gt_func_gnugettext_libc=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$gt_func_gnugettext_libc'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { $as_echo "$as_me:$LINENO: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if test "${am_cv_func_iconv+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + am_cv_func_iconv=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + { $as_echo "$as_me:$LINENO: checking for working iconv" >&5 +$as_echo_n "checking for working iconv... " >&6; } +if test "${am_cv_func_iconv_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + if test "$cross_compiling" = yes; then + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main () +{ + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + return 1; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + am_cv_func_iconv_works=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +am_cv_func_iconv_works=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + LIBS="$am_save_LIBS" + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 +$as_echo "$am_cv_func_iconv_works" >&6; } + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ICONV 1 +_ACEOF + + fi + if test "$am_cv_lib_iconv" = yes; then + { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then + withval=$with_libintl_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi + +fi + + LIBINTL= + LTLIBINTL= + INCINTL= + LIBINTL_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIBINTL_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi + + { $as_echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 +$as_echo_n "checking for GNU gettext in libintl... " >&6; } +if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$gt_func_gnugettext_libintl=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$gt_func_gnugettext_libintl=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +ac_res=`eval 'as_val=${'$gt_func_gnugettext_libintl'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + fi + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_NLS 1 +_ACEOF + + else + USE_NLS=no + fi + fi + + { $as_echo "$as_me:$LINENO: checking whether to use NLS" >&5 +$as_echo_n "checking whether to use NLS... " >&6; } + { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then + { $as_echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 +$as_echo_n "checking where the gettext function comes from... " >&6; } + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + { $as_echo "$as_me:$LINENO: result: $gt_source" >&5 +$as_echo "$gt_source" >&6; } + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + { $as_echo "$as_me:$LINENO: checking how to link with libintl" >&5 +$as_echo_n "checking how to link with libintl... " >&6; } + { $as_echo "$as_me:$LINENO: result: $LIBINTL" >&5 +$as_echo "$LIBINTL" >&6; } + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + fi + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETTEXT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DCGETTEXT 1 +_ACEOF + + fi + + POSUB=po + fi + + + + INTLLIBS="$LIBINTL" + + + + + + + +GETTEXT_PACKAGE=pcsx + + +cat >>confdefs.h <<_ACEOF +#define GETTEXT_PACKAGE "${GETTEXT_PACKAGE}" +_ACEOF + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi + +fi + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GLIB2" >&5 +$as_echo_n "checking for GLIB2... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB2_CFLAGS"; then + pkg_cv_GLIB2_CFLAGS="$GLIB2_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB2_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB2_LIBS"; then + pkg_cv_GLIB2_LIBS="$GLIB2_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLIB2_LIBS=`$PKG_CONFIG --libs "glib-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GLIB2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0"` + else + GLIB2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLIB2_PKG_ERRORS" >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** glib2 not found!" >&5 +$as_echo "$as_me: error: *** glib2 not found!" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: *** glib2 not found!" >&5 +$as_echo "$as_me: error: *** glib2 not found!" >&2;} + { (exit 1); exit 1; }; } +else + GLIB2_CFLAGS=$pkg_cv_GLIB2_CFLAGS + GLIB2_LIBS=$pkg_cv_GLIB2_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GTK2" >&5 +$as_echo_n "checking for GTK2... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GTK2_CFLAGS"; then + pkg_cv_GTK2_CFLAGS="$GTK2_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GTK2_LIBS"; then + pkg_cv_GTK2_LIBS="$GTK2_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GTK2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0"` + else + GTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTK2_PKG_ERRORS" >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** libgtk2 not found!" >&5 +$as_echo "$as_me: error: *** libgtk2 not found!" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: *** libgtk2 not found!" >&5 +$as_echo "$as_me: error: *** libgtk2 not found!" >&2;} + { (exit 1); exit 1; }; } +else + GTK2_CFLAGS=$pkg_cv_GTK2_CFLAGS + GTK2_LIBS=$pkg_cv_GTK2_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for GLADE2" >&5 +$as_echo_n "checking for GLADE2... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GLADE2_CFLAGS"; then + pkg_cv_GLADE2_CFLAGS="$GLADE2_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libglade-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libglade-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLADE2_CFLAGS=`$PKG_CONFIG --cflags "libglade-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GLADE2_LIBS"; then + pkg_cv_GLADE2_LIBS="$GLADE2_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libglade-2.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libglade-2.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLADE2_LIBS=`$PKG_CONFIG --libs "libglade-2.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GLADE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libglade-2.0"` + else + GLADE2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libglade-2.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLADE2_PKG_ERRORS" >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** libglade2 not found!" >&5 +$as_echo "$as_me: error: *** libglade2 not found!" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: *** libglade2 not found!" >&5 +$as_echo "$as_me: error: *** libglade2 not found!" >&2;} + { (exit 1); exit 1; }; } +else + GLADE2_CFLAGS=$pkg_cv_GLADE2_CFLAGS + GLADE2_LIBS=$pkg_cv_GLADE2_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi + + +# Check whether --with-sdl-prefix was given. +if test "${with_sdl_prefix+set}" = set; then + withval=$with_sdl_prefix; sdl_prefix="$withval" +else + sdl_prefix="" +fi + + +# Check whether --with-sdl-exec-prefix was given. +if test "${with_sdl_exec_prefix+set}" = set; then + withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval" +else + sdl_exec_prefix="" +fi + +# Check whether --enable-sdltest was given. +if test "${enable_sdltest+set}" = set; then + enableval=$enable_sdltest; +else + enable_sdltest=yes +fi + + + if test x$sdl_exec_prefix != x ; then + sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config + fi + fi + if test x$sdl_prefix != x ; then + sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_prefix/bin/sdl-config + fi + fi + + if test "x$prefix" != xNONE; then + PATH="$prefix/bin:$prefix/usr/bin:$PATH" + fi + # Extract the first word of "sdl-config", so it can be a program name with args. +set dummy sdl-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_SDL_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $SDL_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no" + ;; +esac +fi +SDL_CONFIG=$ac_cv_path_SDL_CONFIG +if test -n "$SDL_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5 +$as_echo "$SDL_CONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + min_sdl_version=1.2.0 + { $as_echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5 +$as_echo_n "checking for SDL - version >= $min_sdl_version... " >&6; } + no_sdl="" + if test "$SDL_CONFIG" = "no" ; then + no_sdl=yes + else + SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` + SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` + + sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_sdltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + rm -f conf.sdltest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +#include "SDL.h" + +char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main (int argc, char *argv[]) +{ + int major, minor, micro; + char *tmp_version; + + /* This hangs on some systems (?) + system ("touch conf.sdltest"); + */ + { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_sdl_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_sdl_version"); + exit(1); + } + + if (($sdl_major_version > major) || + (($sdl_major_version == major) && ($sdl_minor_version > minor)) || + (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); + printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); + printf("*** to point to the correct copy of sdl-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +no_sdl=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_sdl" = x ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + if test "$SDL_CONFIG" = "no" ; then + echo "*** The sdl-config script installed by SDL could not be found" + echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the SDL_CONFIG environment variable to the" + echo "*** full path to sdl-config." + else + if test -f conf.sdltest ; then + : + else + echo "*** Could not run SDL test program, checking why..." + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include "SDL.h" + +int main(int argc, char *argv[]) +{ return 0; } +#undef main +#define main K_and_R_C_main + +int +main () +{ + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding SDL or finding the wrong" + echo "*** version of SDL. If it is not finding SDL, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means SDL was incorrectly installed" + echo "*** or that you have moved SDL since it was installed. In the latter case, you" + echo "*** may want to edit the sdl-config script: $SDL_CONFIG" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + SDL_CFLAGS="" + SDL_LIBS="" + { { $as_echo "$as_me:$LINENO: error: *** SDL not found!" >&5 +$as_echo "$as_me: error: *** SDL not found!" >&2;} + { (exit 1); exit 1; }; } + fi + + + rm -f conf.sdltest + + + + + + + + + +ac_config_files="$ac_config_files Makefile data/Makefile doc/Makefile libpcsxcore/Makefile gui/Makefile plugins/dfinput/Makefile plugins/dfsound/Makefile plugins/dfxvideo/Makefile plugins/dfcdrom/Makefile plugins/dfnet/Makefile pixmaps/Makefile po/Makefile.in" + + +{ $as_echo "$as_me:$LINENO: checking for dlsym in -ldl" >&5 +$as_echo_n "checking for dlsym in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlsym+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlsym (); +int +main () +{ +return dlsym (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlsym=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlsym=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlsym" >&5 +$as_echo "$ac_cv_lib_dl_dlsym" >&6; } +if test "x$ac_cv_lib_dl_dlsym" = x""yes; then + LDFLAGS="$LDFLAGS -ldl" +fi + +{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +$as_echo_n "checking for socket in -lsocket... " >&6; } +if test "${ac_cv_lib_socket_socket+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_socket_socket=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_socket_socket=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +$as_echo "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = x""yes; then + LDFLAGS="$LDFLAGS -lsocket" +fi + +{ $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_nsl_gethostbyname=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nsl_gethostbyname=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then + LDFLAGS="$LDFLAGS -lnsl" +fi + +{ $as_echo "$as_me:$LINENO: checking for umem_alloc in -lumem" >&5 +$as_echo_n "checking for umem_alloc in -lumem... " >&6; } +if test "${ac_cv_lib_umem_umem_alloc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lumem $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char umem_alloc (); +int +main () +{ +return umem_alloc (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_umem_umem_alloc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_umem_umem_alloc=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_umem_umem_alloc" >&5 +$as_echo "$ac_cv_lib_umem_umem_alloc" >&6; } +if test "x$ac_cv_lib_umem_umem_alloc" = x""yes; then + LDFLAGS="$LDFLAGS -lumem" +fi + + + if false; then + SOUND_OSS_TRUE= + SOUND_OSS_FALSE='#' +else + SOUND_OSS_TRUE='#' + SOUND_OSS_FALSE= +fi + + if false; then + SOUND_SDL_TRUE= + SOUND_SDL_FALSE='#' +else + SOUND_SDL_TRUE='#' + SOUND_SDL_FALSE= +fi + + if false; then + SOUND_NULL_TRUE= + SOUND_NULL_FALSE='#' +else + SOUND_NULL_TRUE='#' + SOUND_NULL_FALSE= +fi + + + +# Check whether --enable-sound was given. +if test "${enable_sound+set}" = set; then + enableval=$enable_sound; SOUND="$enableval" +else + SOUND="sdl" +fi + + +if test "x$SOUND" = xalsa; then + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for ALSA" >&5 +$as_echo_n "checking for ALSA... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$ALSA_CFLAGS"; then + pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa >= 1.0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "alsa >= 1.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa >= 1.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$ALSA_LIBS"; then + pkg_cv_ALSA_LIBS="$ALSA_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa >= 1.0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "alsa >= 1.0.0") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa >= 1.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "alsa >= 1.0.0"` + else + ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "alsa >= 1.0.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$ALSA_PKG_ERRORS" >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + have_alsa=no +elif test $pkg_failed = untried; then + have_alsa=no +else + ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS + ALSA_LIBS=$pkg_cv_ALSA_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + have_alsa=yes +fi +elif test "x$SOUND" = xpulseaudio; then + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for PULSEAUDIO" >&5 +$as_echo_n "checking for PULSEAUDIO... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$PULSEAUDIO_CFLAGS"; then + pkg_cv_PULSEAUDIO_CFLAGS="$PULSEAUDIO_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpulse >= 0.9.16\"") >&5 + ($PKG_CONFIG --exists --print-errors "libpulse >= 0.9.16") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags "libpulse >= 0.9.16" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$PULSEAUDIO_LIBS"; then + pkg_cv_PULSEAUDIO_LIBS="$PULSEAUDIO_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpulse >= 0.9.16\"") >&5 + ($PKG_CONFIG --exists --print-errors "libpulse >= 0.9.16") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PULSEAUDIO_LIBS=`$PKG_CONFIG --libs "libpulse >= 0.9.16" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpulse >= 0.9.16"` + else + PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpulse >= 0.9.16"` + fi + # Put the nasty error message in config.log where it belongs + echo "$PULSEAUDIO_PKG_ERRORS" >&5 + + { { $as_echo "$as_me:$LINENO: error: Package requirements (libpulse >= 0.9.16) were not met: + +$PULSEAUDIO_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables PULSEAUDIO_CFLAGS +and PULSEAUDIO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (libpulse >= 0.9.16) were not met: + +$PULSEAUDIO_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables PULSEAUDIO_CFLAGS +and PULSEAUDIO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables PULSEAUDIO_CFLAGS +and PULSEAUDIO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables PULSEAUDIO_CFLAGS +and PULSEAUDIO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + PULSEAUDIO_CFLAGS=$pkg_cv_PULSEAUDIO_CFLAGS + PULSEAUDIO_LIBS=$pkg_cv_PULSEAUDIO_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + have_pulseaudio=yes +fi +elif test "x$SOUND" = xoss; then + if test "${ac_cv_header_sys_soundcard_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 +$as_echo_n "checking for sys/soundcard.h... " >&6; } +if test "${ac_cv_header_sys_soundcard_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5 +$as_echo "$ac_cv_header_sys_soundcard_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/soundcard.h usability" >&5 +$as_echo_n "checking sys/soundcard.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/soundcard.h presence" >&5 +$as_echo_n "checking sys/soundcard.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/soundcard.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/soundcard.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 +$as_echo_n "checking for sys/soundcard.h... " >&6; } +if test "${ac_cv_header_sys_soundcard_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_sys_soundcard_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5 +$as_echo "$ac_cv_header_sys_soundcard_h" >&6; } + +fi +if test "x$ac_cv_header_sys_soundcard_h" = x""yes; then + have_oss=yes +else + have_oss=no +fi + + + if test "x$have_oss" = xno; then + { { $as_echo "$as_me:$LINENO: error: sys/soundcard.h not found!" >&5 +$as_echo "$as_me: error: sys/soundcard.h not found!" >&2;} + { (exit 1); exit 1; }; } + else + if true; then + SOUND_OSS_TRUE= + SOUND_OSS_FALSE='#' +else + SOUND_OSS_TRUE='#' + SOUND_OSS_FALSE= +fi + + fi +elif test "x$SOUND" = xno; then + if true; then + SOUND_NULL_TRUE= + SOUND_NULL_FALSE='#' +else + SOUND_NULL_TRUE='#' + SOUND_NULL_FALSE= +fi + +elif test "x$SOUND" = xnull; then + if true; then + SOUND_NULL_TRUE= + SOUND_NULL_FALSE='#' +else + SOUND_NULL_TRUE='#' + SOUND_NULL_FALSE= +fi + +else + if true; then + SOUND_SDL_TRUE= + SOUND_SDL_FALSE='#' +else + SOUND_SDL_TRUE='#' + SOUND_SDL_FALSE= +fi + +fi + + if test "x$have_alsa" = xyes; then + SOUND_ALSA_TRUE= + SOUND_ALSA_FALSE='#' +else + SOUND_ALSA_TRUE='#' + SOUND_ALSA_FALSE= +fi + + + if test "x$have_pulseaudio" = xyes; then + SOUND_PULSEAUDIO_TRUE= + SOUND_PULSEAUDIO_FALSE='#' +else + SOUND_PULSEAUDIO_TRUE='#' + SOUND_PULSEAUDIO_FALSE= +fi + + + + +if test "${ac_cv_header_zlib_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 +$as_echo_n "checking for zlib.h... " >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +$as_echo "$ac_cv_header_zlib_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5 +$as_echo_n "checking zlib.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5 +$as_echo_n "checking zlib.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 +$as_echo_n "checking for zlib.h... " >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_zlib_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +$as_echo "$ac_cv_header_zlib_h" >&6; } + +fi +if test "x$ac_cv_header_zlib_h" = x""yes; then + have_zlib=yes +else + have_zlib=no +fi + + +if test "x$have_zlib" = xno; then + { { $as_echo "$as_me:$LINENO: error: unable to find libz headers" >&5 +$as_echo "$as_me: error: unable to find libz headers" >&2;} + { (exit 1); exit 1; }; } +fi +if test "${ac_cv_header_X11_extensions_Xv_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xv.h" >&5 +$as_echo_n "checking for X11/extensions/Xv.h... " >&6; } +if test "${ac_cv_header_X11_extensions_Xv_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xv_h" >&5 +$as_echo "$ac_cv_header_X11_extensions_Xv_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xv.h usability" >&5 +$as_echo_n "checking X11/extensions/Xv.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xv.h presence" >&5 +$as_echo_n "checking X11/extensions/Xv.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xv.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xv.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xv.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xv.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xv.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xv.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xv.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xv.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xv.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xv.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xv.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xv.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xv.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xv.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xv.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: X11/extensions/Xv.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for X11/extensions/Xv.h" >&5 +$as_echo_n "checking for X11/extensions/Xv.h... " >&6; } +if test "${ac_cv_header_X11_extensions_Xv_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_X11_extensions_Xv_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xv_h" >&5 +$as_echo "$ac_cv_header_X11_extensions_Xv_h" >&6; } + +fi +if test "x$ac_cv_header_X11_extensions_Xv_h" = x""yes; then + have_xv=yes +else + have_xv=no +fi + + +if test "x$have_xv" = xno; then + { { $as_echo "$as_me:$LINENO: error: unable to find xv headers" >&5 +$as_echo "$as_me: error: unable to find xv headers" >&2;} + { (exit 1); exit 1; }; } +fi +if test "${ac_cv_header_X11_extensions_XTest_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for X11/extensions/XTest.h" >&5 +$as_echo_n "checking for X11/extensions/XTest.h... " >&6; } +if test "${ac_cv_header_X11_extensions_XTest_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XTest_h" >&5 +$as_echo "$ac_cv_header_X11_extensions_XTest_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking X11/extensions/XTest.h usability" >&5 +$as_echo_n "checking X11/extensions/XTest.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking X11/extensions/XTest.h presence" >&5 +$as_echo_n "checking X11/extensions/XTest.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/XTest.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: X11/extensions/XTest.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/XTest.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: X11/extensions/XTest.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/XTest.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: X11/extensions/XTest.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/XTest.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: X11/extensions/XTest.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/XTest.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: X11/extensions/XTest.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/XTest.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: X11/extensions/XTest.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/XTest.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: X11/extensions/XTest.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/XTest.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: X11/extensions/XTest.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for X11/extensions/XTest.h" >&5 +$as_echo_n "checking for X11/extensions/XTest.h... " >&6; } +if test "${ac_cv_header_X11_extensions_XTest_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_X11_extensions_XTest_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XTest_h" >&5 +$as_echo "$ac_cv_header_X11_extensions_XTest_h" >&6; } + +fi +if test "x$ac_cv_header_X11_extensions_XTest_h" = x""yes; then + have_xtest=yes +else + have_xtest=no +fi + + +if test "x$have_xtest" = xno; then + { { $as_echo "$as_me:$LINENO: error: unable to find xtest headers" >&5 +$as_echo "$as_me: error: unable to find xtest headers" >&2;} + { (exit 1); exit 1; }; } +fi + + if false; then + USE_LIBCDIO_TRUE= + USE_LIBCDIO_FALSE='#' +else + USE_LIBCDIO_TRUE='#' + USE_LIBCDIO_FALSE= +fi + + +# Check whether --enable-libcdio was given. +if test "${enable_libcdio+set}" = set; then + enableval=$enable_libcdio; BUILD_LIBCDIO="$enableval" +else + BUILD_LIBCDIO="no" +fi + + +if test "$BUILD_LIBCDIO" = "yes"; then + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for LIBCDIO" >&5 +$as_echo_n "checking for LIBCDIO... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$LIBCDIO_CFLAGS"; then + pkg_cv_LIBCDIO_CFLAGS="$LIBCDIO_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcdio\"") >&5 + ($PKG_CONFIG --exists --print-errors "libcdio") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBCDIO_CFLAGS=`$PKG_CONFIG --cflags "libcdio" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$LIBCDIO_LIBS"; then + pkg_cv_LIBCDIO_LIBS="$LIBCDIO_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcdio\"") >&5 + ($PKG_CONFIG --exists --print-errors "libcdio") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBCDIO_LIBS=`$PKG_CONFIG --libs "libcdio" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBCDIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcdio"` + else + LIBCDIO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcdio"` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBCDIO_PKG_ERRORS" >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** libcdio not found!" >&5 +$as_echo "$as_me: error: *** libcdio not found!" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: *** libcdio not found!" >&5 +$as_echo "$as_me: error: *** libcdio not found!" >&2;} + { (exit 1); exit 1; }; } +else + LIBCDIO_CFLAGS=$pkg_cv_LIBCDIO_CFLAGS + LIBCDIO_LIBS=$pkg_cv_LIBCDIO_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi + if true; then + USE_LIBCDIO_TRUE= + USE_LIBCDIO_FALSE='#' +else + USE_LIBCDIO_TRUE='#' + USE_LIBCDIO_FALSE= +fi + +fi + + + + +# Check whether --enable-opengl was given. +if test "${enable_opengl+set}" = set; then + enableval=$enable_opengl; BUILD_OPENGL="$enableval" +else + BUILD_OPENGL="no" +fi + + +PEOPSXGL="" + +if test "$BUILD_OPENGL" = "yes"; then + if test "${ac_cv_header_GL_gl_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5 +$as_echo_n "checking for GL/gl.h... " >&6; } +if test "${ac_cv_header_GL_gl_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 +$as_echo "$ac_cv_header_GL_gl_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking GL/gl.h usability" >&5 +$as_echo_n "checking GL/gl.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking GL/gl.h presence" >&5 +$as_echo_n "checking GL/gl.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5 +$as_echo_n "checking for GL/gl.h... " >&6; } +if test "${ac_cv_header_GL_gl_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_GL_gl_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 +$as_echo "$ac_cv_header_GL_gl_h" >&6; } + +fi +if test "x$ac_cv_header_GL_gl_h" = x""yes; then + have_gl=yes +else + have_gl=no +fi + + + if test "x$have_gl" = xno; then + { { $as_echo "$as_me:$LINENO: error: unable to find OpenGL headers" >&5 +$as_echo "$as_me: error: unable to find OpenGL headers" >&2;} + { (exit 1); exit 1; }; } + fi + if test "${ac_cv_header_GL_glx_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for GL/glx.h" >&5 +$as_echo_n "checking for GL/glx.h... " >&6; } +if test "${ac_cv_header_GL_glx_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5 +$as_echo "$ac_cv_header_GL_glx_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking GL/glx.h usability" >&5 +$as_echo_n "checking GL/glx.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking GL/glx.h presence" >&5 +$as_echo_n "checking GL/glx.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: GL/glx.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: GL/glx.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/glx.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: GL/glx.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: GL/glx.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: GL/glx.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/glx.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: GL/glx.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/glx.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: GL/glx.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/glx.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: GL/glx.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/glx.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: GL/glx.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: GL/glx.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: GL/glx.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for GL/glx.h" >&5 +$as_echo_n "checking for GL/glx.h... " >&6; } +if test "${ac_cv_header_GL_glx_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_GL_glx_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5 +$as_echo "$ac_cv_header_GL_glx_h" >&6; } + +fi +if test "x$ac_cv_header_GL_glx_h" = x""yes; then + have_glx=yes +else + have_glx=no +fi + + + if test "x$have_glx" = xno; then + { { $as_echo "$as_me:$LINENO: error: unable to find GLX headers" >&5 +$as_echo "$as_me: error: unable to find GLX headers" >&2;} + { (exit 1); exit 1; }; } + fi + { $as_echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5 +$as_echo_n "checking for X11/extensions/xf86vmode.h... " >&6; } +if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + + +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_X11_extensions_xf86vmode_h=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_X11_extensions_xf86vmode_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5 +$as_echo "$ac_cv_header_X11_extensions_xf86vmode_h" >&6; } +if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = x""yes; then + have_vmode=yes +else + have_vmode=no +fi + + + if test "x$have_vmode" = xno; then + { { $as_echo "$as_me:$LINENO: error: unable to find xf86vmode headers" >&5 +$as_echo "$as_me: error: unable to find xf86vmode headers" >&2;} + { (exit 1); exit 1; }; } + fi + PEOPSXGL="plugins/peopsxgl" + + ac_config_files="$ac_config_files plugins/peopsxgl/Makefile" + +fi + + if false; then + X86_NASM_TRUE= + X86_NASM_FALSE='#' +else + X86_NASM_TRUE='#' + X86_NASM_FALSE= +fi + + +if expr x"$target_cpu" : 'xi.86' > /dev/null; then + if expr x"$target_os" : 'x.*linux.*' > /dev/null; then + # Extract the first word of "nasm", so it can be a program name with args. +set dummy nasm; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_NASM+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $NASM in + [\\/]* | ?:[\\/]*) + ac_cv_path_NASM="$NASM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_NASM="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_NASM" && ac_cv_path_NASM="missing" + ;; +esac +fi +NASM=$ac_cv_path_NASM +if test -n "$NASM"; then + { $as_echo "$as_me:$LINENO: result: $NASM" >&5 +$as_echo "$NASM" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "$NASM" = "missing"; then + { $as_echo "$as_me:$LINENO: WARNING: unable to find nasm, needed to build dfx11video" >&5 +$as_echo "$as_me: WARNING: unable to find nasm, needed to build dfx11video" >&2;} + if false; then + X86_NASM_TRUE= + X86_NASM_FALSE='#' +else + X86_NASM_TRUE='#' + X86_NASM_FALSE= +fi + + else + if true; then + X86_NASM_TRUE= + X86_NASM_FALSE='#' +else + X86_NASM_TRUE='#' + X86_NASM_FALSE= +fi + + fi + fi +fi + + if false; then + ARCH_X86_TRUE= + ARCH_X86_FALSE='#' +else + ARCH_X86_TRUE='#' + ARCH_X86_FALSE= +fi + + if false; then + ARCH_X86_64_TRUE= + ARCH_X86_64_FALSE='#' +else + ARCH_X86_64_TRUE='#' + ARCH_X86_64_FALSE= +fi + + if false; then + ARCH_PPC_TRUE= + ARCH_PPC_FALSE='#' +else + ARCH_PPC_TRUE='#' + ARCH_PPC_FALSE= +fi + + +# Check whether --enable-dynarec was given. +if test "${enable_dynarec+set}" = set; then + enableval=$enable_dynarec; DYNAREC="$enableval" +else + DYNAREC="auto" +fi + + +if test "x$DYNAREC" = xauto; then + DYNARECSEL="auto" +else if test "x$DYNAREC" = xx86; then + DYNARECSEL="x86" +else if test "x$DYNAREC" = xx86_64; then + DYNARECSEL="x86_64" +else if test "x$DYNAREC" = xppc; then + DYNARECSEL="ppc" +else if test "x$DYNAREC" = xno; then + DYNARECSEL="no" +else + { $as_echo "$as_me:$LINENO: WARNING: Dynamic Recompiler \"$DYNAREC\" not found. Autodetecting..." >&5 +$as_echo "$as_me: WARNING: Dynamic Recompiler \"$DYNAREC\" not found. Autodetecting..." >&2;} + DYNARECSEL="auto" +fi +fi +fi +fi +fi + +if test "x$DYNARECSEL" = xauto; then + if expr x"$target_cpu" : 'xi.86' > /dev/null; then + DYNARECSEL="x86" + fi + + if expr x"$target_cpu" : 'xx86_64' > /dev/null; then + DYNARECSEL="x86_64" + fi + + if expr x"$target_cpu" : 'xpowerpc' > /dev/null; then + DYNARECSEL="ppc" + fi +fi + +if test "x$DYNARECSEL" = xno; then + +cat >>confdefs.h <<\_ACEOF +#define NOPSXREC 1 +_ACEOF + +fi + +if test "x$DYNARECSEL" = xx86; then + +cat >>confdefs.h <<\_ACEOF +#define __i386__ 1 +_ACEOF + + if true; then + ARCH_X86_TRUE= + ARCH_X86_FALSE='#' +else + ARCH_X86_TRUE='#' + ARCH_X86_FALSE= +fi + + + { $as_echo "$as_me:$LINENO: result: Dynamic Recompiler selected: x86" >&5 +$as_echo "Dynamic Recompiler selected: x86" >&6; } +fi + +if test "x$DYNARECSEL" = xx86_64; then + +cat >>confdefs.h <<\_ACEOF +#define __x86_64__ 1 +_ACEOF + + if true; then + ARCH_X86_64_TRUE= + ARCH_X86_64_FALSE='#' +else + ARCH_X86_64_TRUE='#' + ARCH_X86_64_FALSE= +fi + + { $as_echo "$as_me:$LINENO: result: Dynamic Recompiler selected: x86_64" >&5 +$as_echo "Dynamic Recompiler selected: x86_64" >&6; } +fi + +if test "x$DYNARECSEL" = xppc; then + +cat >>confdefs.h <<\_ACEOF +#define __ppc__ 1 +_ACEOF + + if true; then + ARCH_PPC_TRUE= + ARCH_PPC_FALSE='#' +else + ARCH_PPC_TRUE='#' + ARCH_PPC_FALSE= +fi + + { $as_echo "$as_me:$LINENO: result: Dynamic Recompiler selected: ppc" >&5 +$as_echo "Dynamic Recompiler selected: ppc" >&6; } +fi + + + { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + # Check for potential -arch flags. It is not universal unless + # there are some -arch flags. Note that *ppc* also matches + # ppc64. This check is also rather less than ideal. + case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( + *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; + esac +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then + # Try to guess by grepping values from an object file. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + +cat >>confdefs.h <<\_ACEOF +#define __BIGENDIAN__ /**/ +_ACEOF +;; #( + no) + ;; #( + universal) + +cat >>confdefs.h <<\_ACEOF +#define AC_APPLE_UNIVERSAL_BUILD 1 +_ACEOF + + ;; #( + *) + { { $as_echo "$as_me:$LINENO: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +$as_echo "$as_me: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; + esac + + + +cat >>confdefs.h <<\_ACEOF +#define __LINUX__ 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define MAXPATHLEN 4096 +_ACEOF + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOUND_OSS_TRUE}" && test -z "${SOUND_OSS_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"SOUND_OSS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SOUND_OSS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOUND_SDL_TRUE}" && test -z "${SOUND_SDL_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"SOUND_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SOUND_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOUND_NULL_TRUE}" && test -z "${SOUND_NULL_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"SOUND_NULL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SOUND_NULL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOUND_OSS_TRUE}" && test -z "${SOUND_OSS_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"SOUND_OSS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SOUND_OSS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOUND_NULL_TRUE}" && test -z "${SOUND_NULL_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"SOUND_NULL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SOUND_NULL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOUND_NULL_TRUE}" && test -z "${SOUND_NULL_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"SOUND_NULL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SOUND_NULL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOUND_SDL_TRUE}" && test -z "${SOUND_SDL_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"SOUND_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SOUND_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOUND_ALSA_TRUE}" && test -z "${SOUND_ALSA_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"SOUND_ALSA\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SOUND_ALSA\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${SOUND_PULSEAUDIO_TRUE}" && test -z "${SOUND_PULSEAUDIO_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"SOUND_PULSEAUDIO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"SOUND_PULSEAUDIO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_LIBCDIO_TRUE}" && test -z "${USE_LIBCDIO_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"USE_LIBCDIO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"USE_LIBCDIO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_LIBCDIO_TRUE}" && test -z "${USE_LIBCDIO_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"USE_LIBCDIO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"USE_LIBCDIO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${X86_NASM_TRUE}" && test -z "${X86_NASM_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"X86_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"X86_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${X86_NASM_TRUE}" && test -z "${X86_NASM_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"X86_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"X86_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${X86_NASM_TRUE}" && test -z "${X86_NASM_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"X86_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"X86_NASM\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_X86_TRUE}" && test -z "${ARCH_X86_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_X86_64_TRUE}" && test -z "${ARCH_X86_64_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"ARCH_X86_64\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"ARCH_X86_64\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_PPC_TRUE}" && test -z "${ARCH_PPC_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_X86_TRUE}" && test -z "${ARCH_X86_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"ARCH_X86\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_X86_64_TRUE}" && test -z "${ARCH_X86_64_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"ARCH_X86_64\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"ARCH_X86_64\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ARCH_PPC_TRUE}" && test -z "${ARCH_PPC_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"ARCH_PPC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by pcsx $as_me 1.9, which was +generated by GNU Autoconf 2.63. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTION]... [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_version="\\ +pcsx config.status 1.9 +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' +macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' +macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' +host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' +host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' +host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' +build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' +build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' +build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' +SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' +Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' +GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' +EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' +FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' +LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' +LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' +ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' +exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' +lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' +reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' +AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' +STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' +RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' +compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' +GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' +SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' +ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' +need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' +LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' +libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' +version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' +runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' +libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' +soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' +old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' +striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +SHELL \ +ECHO \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` + ;; +esac + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h:include/config.h.in" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "libpcsxcore/Makefile") CONFIG_FILES="$CONFIG_FILES libpcsxcore/Makefile" ;; + "gui/Makefile") CONFIG_FILES="$CONFIG_FILES gui/Makefile" ;; + "plugins/dfinput/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/dfinput/Makefile" ;; + "plugins/dfsound/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/dfsound/Makefile" ;; + "plugins/dfxvideo/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/dfxvideo/Makefile" ;; + "plugins/dfcdrom/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/dfcdrom/Makefile" ;; + "plugins/dfnet/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/dfnet/Makefile" ;; + "pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;; + "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "plugins/peopsxgl/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/peopsxgl/Makefile" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files +# are listed without --file. Let's play safe and only enable the eval +# if we detect the quoting. +case $CONFIG_FILES in +*\'*) eval set x "$CONFIG_FILES" ;; +*) set x $CONFIG_FILES ;; +esac +shift +for mf +do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} + +_LT_EOF + ;; + esac + + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + "po-directories":C) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000..42de1b3a --- /dev/null +++ b/configure.ac @@ -0,0 +1,214 @@ +AC_INIT(pcsx, 1.9) + +AC_CANONICAL_HOST +AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE(pcsx, 1.9) +AM_MAINTAINER_MODE + +AC_CONFIG_HEADERS([include/config.h:include/config.h.in]) + +AC_PROG_CC +AC_PROG_RANLIB +AC_DISABLE_STATIC +AC_PROG_LIBTOOL +AC_PROG_INSTALL +AC_STDC_HEADERS +AM_PROG_AS + +AM_GNU_GETTEXT([external]) + +GETTEXT_PACKAGE=pcsx +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [gettext domain]) + +PKG_CHECK_MODULES(GLIB2, glib-2.0, [], AC_MSG_ERROR([*** glib2 not found!])) +PKG_CHECK_MODULES(GTK2, gtk+-2.0, [], AC_MSG_ERROR([*** libgtk2 not found!])) +PKG_CHECK_MODULES(GLADE2, libglade-2.0, [], AC_MSG_ERROR([*** libglade2 not found!])) + +AM_PATH_SDL(1.2.0, :, AC_MSG_ERROR([*** SDL not found!])) + +AC_SUBST(GLIB2_CFLAGS) +AC_SUBST(GLIB2_LIBS) +AC_SUBST(GTK2_CFLAGS) +AC_SUBST(GTK2_LIBS) +AC_SUBST(GLADE2_CFLAGS) +AC_SUBST(GLADE2_LIBS) + +AC_CONFIG_FILES([Makefile data/Makefile doc/Makefile libpcsxcore/Makefile gui/Makefile plugins/dfinput/Makefile plugins/dfsound/Makefile plugins/dfxvideo/Makefile plugins/dfcdrom/Makefile plugins/dfnet/Makefile pixmaps/Makefile po/Makefile.in]) + +AC_CHECK_LIB(dl, dlsym, [LDFLAGS="$LDFLAGS -ldl"], []) +AC_CHECK_LIB(socket, socket, [LDFLAGS="$LDFLAGS -lsocket"], []) +AC_CHECK_LIB(nsl, gethostbyname, [LDFLAGS="$LDFLAGS -lnsl"], []) +AC_CHECK_LIB(umem, umem_alloc, [LDFLAGS="$LDFLAGS -lumem"], []) + +AM_CONDITIONAL(SOUND_OSS, false) +AM_CONDITIONAL(SOUND_SDL, false) +AM_CONDITIONAL(SOUND_NULL, false) + +dnl Check for ALSA 1.x, OSS, or PulseAudio + +AC_ARG_ENABLE(sound, [ --enable-sound=... force selection of sound backend (alsa/null/oss/pulseaudio/sdl) (default: sdl)], +[ SOUND="$enableval" ],[ SOUND="sdl" ]) + +if test "x$SOUND" = xalsa; then + PKG_CHECK_MODULES(ALSA, alsa >= 1.0.0, have_alsa=yes, have_alsa=no) +elif test "x$SOUND" = xpulseaudio; then + PKG_CHECK_MODULES(PULSEAUDIO, libpulse >= 0.9.16, have_pulseaudio=yes) +elif test "x$SOUND" = xoss; then + AC_CHECK_HEADER(sys/soundcard.h, have_oss=yes, have_oss=no) + if test "x$have_oss" = xno; then + AC_MSG_ERROR([sys/soundcard.h not found!]) + else + AM_CONDITIONAL(SOUND_OSS, true) + fi +elif test "x$SOUND" = xno; then + AM_CONDITIONAL(SOUND_NULL, true) +elif test "x$SOUND" = xnull; then + AM_CONDITIONAL(SOUND_NULL, true) +else + AM_CONDITIONAL(SOUND_SDL, true) +fi + +AM_CONDITIONAL(SOUND_ALSA, test "x$have_alsa" = xyes) +AC_SUBST(ALSA_LIBS) +AM_CONDITIONAL(SOUND_PULSEAUDIO, test "x$have_pulseaudio" = xyes) +AC_SUBST(PULSEAUDIO_CFLAGS) +AC_SUBST(PULSEAUDIO_LIBS) + +AC_CHECK_HEADER(zlib.h, have_zlib=yes, have_zlib=no) +if test "x$have_zlib" = xno; then + AC_MSG_ERROR([unable to find libz headers]) +fi +AC_CHECK_HEADER(X11/extensions/Xv.h, have_xv=yes, have_xv=no) +if test "x$have_xv" = xno; then + AC_MSG_ERROR([unable to find xv headers]) +fi +AC_CHECK_HEADER(X11/extensions/XTest.h, have_xtest=yes, have_xtest=no) +if test "x$have_xtest" = xno; then + AC_MSG_ERROR([unable to find xtest headers]) +fi + +AM_CONDITIONAL(USE_LIBCDIO, false) + +AC_ARG_ENABLE(libcdio, [ --enable-libcdio use GNU libcdio for CD-ROM support (default=no)], +[ BUILD_LIBCDIO="$enableval" ],[ BUILD_LIBCDIO="no" ]) + +if test "$BUILD_LIBCDIO" = "yes"; then + PKG_CHECK_MODULES(LIBCDIO, libcdio, [], AC_MSG_ERROR([*** libcdio not found!])) + AM_CONDITIONAL(USE_LIBCDIO, true) +fi + +AC_SUBST(LIBCDIO_CFLAGS) +AC_SUBST(LIBCDIO_LIBS) + +AC_ARG_ENABLE(opengl, [ --enable-opengl build OpenGL plugin (default=no)], +[ BUILD_OPENGL="$enableval" ],[ BUILD_OPENGL="no" ]) + +PEOPSXGL="" + +if test "$BUILD_OPENGL" = "yes"; then + AC_CHECK_HEADER(GL/gl.h, have_gl=yes, have_gl=no) + if test "x$have_gl" = xno; then + AC_MSG_ERROR([unable to find OpenGL headers]) + fi + AC_CHECK_HEADER(GL/glx.h, have_glx=yes, have_glx=no) + if test "x$have_glx" = xno; then + AC_MSG_ERROR([unable to find GLX headers]) + fi + AC_CHECK_HEADER(X11/extensions/xf86vmode.h, have_vmode=yes, have_vmode=no, + [[#include + #include + ]]) + if test "x$have_vmode" = xno; then + AC_MSG_ERROR([unable to find xf86vmode headers]) + fi + PEOPSXGL="plugins/peopsxgl" + AC_SUBST(PEOPSXGL) + AC_CONFIG_FILES([plugins/peopsxgl/Makefile]) +fi + +AM_CONDITIONAL(X86_NASM, false) + +if expr x"$target_cpu" : 'xi.86' > /dev/null; then + if expr x"$target_os" : 'x.*linux.*' > /dev/null; then + AC_PATH_PROG([NASM],[nasm],[missing]) + if test "$NASM" = "missing"; then + AC_MSG_WARN([unable to find nasm, needed to build dfx11video]) + AM_CONDITIONAL(X86_NASM, false) + else + AM_CONDITIONAL(X86_NASM, true) + fi + fi +fi + +AM_CONDITIONAL(ARCH_X86, false) +AM_CONDITIONAL(ARCH_X86_64, false) +AM_CONDITIONAL(ARCH_PPC, false) + +AC_ARG_ENABLE(dynarec, [ --enable-dynarec=... force selection of dynamic recompiler platform (auto/no/x86/x86_64/ppc) (default: auto)], +[ DYNAREC="$enableval" ],[ DYNAREC="auto" ]) + +if test "x$DYNAREC" = xauto; then + DYNARECSEL="auto" +else if test "x$DYNAREC" = xx86; then + DYNARECSEL="x86" +else if test "x$DYNAREC" = xx86_64; then + DYNARECSEL="x86_64" +else if test "x$DYNAREC" = xppc; then + DYNARECSEL="ppc" +else if test "x$DYNAREC" = xno; then + DYNARECSEL="no" +else + AC_MSG_WARN([Dynamic Recompiler "$DYNAREC" not found. Autodetecting...]) + DYNARECSEL="auto" +fi +fi +fi +fi +fi + +if test "x$DYNARECSEL" = xauto; then + if expr x"$target_cpu" : 'xi.86' > /dev/null; then + DYNARECSEL="x86" + fi + + if expr x"$target_cpu" : 'xx86_64' > /dev/null; then + DYNARECSEL="x86_64" + fi + + if expr x"$target_cpu" : 'xpowerpc' > /dev/null; then + DYNARECSEL="ppc" + fi +fi + +if test "x$DYNARECSEL" = xno; then + AC_DEFINE([NOPSXREC], [1], [Define if we are compiling without dynamic recompiler.]) +fi + +if test "x$DYNARECSEL" = xx86; then + AC_DEFINE([__i386__], [1], [Define if we are compiling for x86 architectures.]) + AM_CONDITIONAL(ARCH_X86, true) + + AC_MSG_RESULT([Dynamic Recompiler selected: x86]) +fi + +if test "x$DYNARECSEL" = xx86_64; then + AC_DEFINE([__x86_64__], [1], [Define if we are compiling for x86_64 architectures.]) + AM_CONDITIONAL(ARCH_X86_64, true) + dnl CFLAGS+=" -m64 " + dnl AC_COMPILE_IFELSE(AC_LANG_PROGRAM,,AC_MSG_ERROR([Cannot compile with -m64])) + AC_MSG_RESULT([Dynamic Recompiler selected: x86_64]) +fi + +if test "x$DYNARECSEL" = xppc; then + AC_DEFINE([__ppc__], [1], [Define if we are compiling for powerpc architectures.]) + AM_CONDITIONAL(ARCH_PPC, true) + AC_MSG_RESULT([Dynamic Recompiler selected: ppc]) +fi + +AC_C_BIGENDIAN(AC_DEFINE([__BIGENDIAN__],[],[define on a big endian system])) + +AC_DEFINE([__LINUX__], [1], [Define if building on a GNU/Linux system.]) +AC_DEFINE([MAXPATHLEN], [4096], [Define to the maximum length of any path.]) + +AC_OUTPUT diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 00000000..99303203 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,7 @@ +glade_DATA = pcsx.glade2 +gladedir = $(datadir)/pcsx + +desktopdir = $(datadir)/applications +desktop_DATA = pcsx.desktop + +EXTRA_DIST = $(glade_DATA) pcsx.desktop diff --git a/data/Makefile.in b/data/Makefile.in new file mode 100644 index 00000000..f4fe63db --- /dev/null +++ b/data/Makefile.in @@ -0,0 +1,424 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = data +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(gladedir)" +desktopDATA_INSTALL = $(INSTALL_DATA) +gladeDATA_INSTALL = $(INSTALL_DATA) +DATA = $(desktop_DATA) $(glade_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +glade_DATA = pcsx.glade2 +gladedir = $(datadir)/pcsx +desktopdir = $(datadir)/applications +desktop_DATA = pcsx.desktop +EXTRA_DIST = $(glade_DATA) pcsx.desktop +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu data/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-desktopDATA: $(desktop_DATA) + @$(NORMAL_INSTALL) + test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" + @list='$(desktop_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \ + $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \ + done + +uninstall-desktopDATA: + @$(NORMAL_UNINSTALL) + @list='$(desktop_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \ + rm -f "$(DESTDIR)$(desktopdir)/$$f"; \ + done +install-gladeDATA: $(glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(glade_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \ + $(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \ + done + +uninstall-gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(glade_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \ + rm -f "$(DESTDIR)$(gladedir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-desktopDATA install-gladeDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-desktopDATA uninstall-gladeDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-desktopDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-gladeDATA \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am uninstall-desktopDATA \ + uninstall-gladeDATA + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/data/pcsx.desktop b/data/pcsx.desktop new file mode 100644 index 00000000..7fb8688b --- /dev/null +++ b/data/pcsx.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +Type=Application +Name=PCSX +GenericName=PlayStation Emulator +GenericName[zh_CN]=PlayStation 模拟器 +GenericName[zh_TW]=PlayStation 模擬器 +Comment=Sony PlayStation emulator +Comment[zh_CN]=Sony PlayStation 模拟器 +Comment[zh_TW]=Sony PlayStation 模擬器 +Exec=pcsx +Icon=pcsx-icon +Categories=Game; diff --git a/data/pcsx.glade2 b/data/pcsx.glade2 new file mode 100644 index 00000000..f2967f2d --- /dev/null +++ b/data/pcsx.glade2 @@ -0,0 +1,3376 @@ + + + + + + True + PCSX + False + center + pcsx-icon.png + + + + True + + + True + + + True + _File + True + + + + + Run _CD + True + True + False + + + + + True + 0.49000000953674316 + gtk-cdrom + 1 + + + + + + + Run _ISO... + True + True + False + + + + + True + gtk-open + 1 + + + + + + + Run _BIOS + True + True + False + + + + + True + gtk-convert + 1 + + + + + + + Run _EXE... + True + True + False + + + + + True + gtk-execute + 1 + + + + + + + True + + + + + E_xit + True + True + False + + + + + True + gtk-quit + 1 + + + + + + + + + + + True + _Emulator + True + + + + + _Continue + True + True + False + + + + + True + gtk-go-forward + 1 + + + + + + + _Reset + True + True + False + + + + + True + gtk-refresh + 1 + + + + + + + True + + + + + S_witch ISO... + True + True + False + + + + + True + gtk-open + 1 + + + + + + + True + + + + + _Save State + True + True + False + + + + + True + Slot _1 + True + + + + + + + True + Slot _2 + True + + + + + + + True + Slot _3 + True + + + + + + + True + Slot _4 + True + + + + + + + True + Slot _5 + True + + + + + + + _Other... + True + True + False + + + + + True + gtk-save-as + 1 + + + + + + + + + True + gtk-save-as + 1 + + + + + + + _Load State + True + True + False + + + + + True + Slot _1 + True + + + + + + + True + Slot _2 + True + + + + + + + True + Slot _3 + True + + + + + + + True + Slot _4 + True + + + + + + + True + Slot _5 + True + + + + + + + _Other... + True + True + False + + + + + True + gtk-open + 1 + + + + + + + + + True + gtk-revert-to-saved + 1 + + + + + + + + + + + True + _Configuration + True + + + + + _Plugins & BIOS... + True + True + False + + + + + True + gtk-preferences + 1 + + + + + + + True + + + + + _Graphics... + True + True + False + + + True + gtk-select-color + 1 + + + + + + + _Sound... + True + True + False + + + True + gtk-convert + 1 + + + + + + + CD-_ROM... + True + True + False + + + True + gtk-cdrom + 1 + + + + + + + C_ontrollers... + True + True + False + + + True + gtk-execute + 1 + + + + + + + True + + + + + _CPU... + True + True + False + + + + True + gtk-properties + 1 + + + + + + + _Memory Cards... + True + True + False + + + + + True + gtk-floppy + 1 + + + + + + + _Netplay... + True + True + False + + + + True + gtk-properties + 1 + + + + + + + True + + + + + Chea_t + True + True + False + + + True + + + _Browse... + True + True + False + + + True + gtk-index + 1 + + + + + + + _Search... + True + True + False + + + True + gtk-find + 1 + + + + + + + + + True + gtk-indent + 1 + + + + + + + Memory _Dump + True + True + False + + + True + gtk-revert-to-saved + 1 + + + + + + + + + + + True + _Help + True + + + + + _About PCSX... + True + True + False + + + + True + gtk-about + 1 + + + + + + + + + + + False + False + 0 + + + + + True + icons + True + + + True + Run CD + Run CD + True + gtk-cdrom + + + False + True + + + + + True + Run ISO Image + Run ISO... + True + gtk-open + + + False + True + + + + + True + + + False + True + + + + + True + Continue Emulation + Continue... + True + gtk-go-forward + + + False + True + + + + + True + Switch ISO Image + Switch ISO... + True + gtk-undo + + + False + True + + + + + True + + + False + True + + + + + True + Configure Memory Cards + Memcards... + True + gtk-floppy + + + False + True + + + + + True + Configure Graphics + Graphics... + True + gtk-select-color + + + False + True + + + + + True + Configure Sound + Sound... + True + gtk-convert + + + False + True + + + + + True + Configure CD-ROM + CD-ROM... + True + gtk-cdrom + + + False + True + + + + + True + Configure Controllers + Controllers... + True + gtk-execute + + + False + True + + + + + False + 1 + + + + + 354 + 174 + True + pcsx.jpg + + + 2 + + + + + True + 2 + False + + + False + 3 + + + + + + + True + Configure PCSX + False + True + dialog + + + True + + + True + 4 + 3 + + + True + 0 + + + True + 7 + + + True + 6 + 5 + 3 + 3 + + + True + gtk-select-color + + + GTK_FILL + GTK_FILL + + + + + True + gtk-find + + + 5 + 6 + GTK_FILL + GTK_FILL + + + + + True + gtk-cdrom + + + 4 + 5 + GTK_FILL + GTK_FILL + + + + + True + gtk-connect + + + 3 + 4 + GTK_FILL + GTK_FILL + + + + + True + gtk-connect + + + 2 + 3 + GTK_FILL + GTK_FILL + + + + + True + gtk-convert + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + select-folder + Select Folder to Search + + + + 2 + 5 + 5 + 6 + GTK_FILL + GTK_FILL + + + + + True + 0 + Search in: + + + 1 + 2 + 5 + 6 + GTK_FILL + + + + + + True + True + False + + + + True + gtk-preferences + + + + + 3 + 4 + GTK_FILL + + + + + + True + + + 2 + 3 + 4 + 5 + GTK_FILL + + + + + True + + + 2 + 3 + 3 + 4 + GTK_FILL + + + + + True + + + + + + + 2 + 3 + 2 + 3 + GTK_FILL + + + + + True + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + True + + + 2 + 3 + GTK_FILL + + + + + True + True + False + + + + True + gtk-info + + + + + 4 + 5 + 1 + 2 + + + + + + + True + True + False + + + + True + gtk-info + + + + + 4 + 5 + 2 + 3 + + + + + + + True + True + False + + + + True + gtk-info + + + + + 4 + 5 + 3 + 4 + + + + + + + True + True + False + + + + True + gtk-info + + + + + 4 + 5 + 4 + 5 + + + + + + + True + True + False + + + + True + gtk-preferences + + + + + 3 + 4 + 4 + 5 + + + + + + + True + True + False + + + + True + gtk-preferences + + + + + 3 + 4 + 3 + 4 + + + + + + + True + True + False + + + + True + gtk-preferences + + + + + 3 + 4 + 2 + 3 + + + + + + + True + True + False + + + + True + gtk-preferences + + + + + 3 + 4 + 1 + 2 + + + + + + + True + 0 + Graphics: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Sound: + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + True + 0 + Controller 1: + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + + True + 0 + Controller 2: + + + 1 + 2 + 3 + 4 + GTK_FILL + + + + + + True + 0 + CD-ROM: + + + 1 + 2 + 4 + 5 + GTK_FILL + + + + + + True + True + False + + + + True + gtk-info + + + + + 4 + 5 + + + + + + + + + + + True + <b>Plugins</b> + True + + + label_item + + + + + False + False + 0 + + + + + True + 0 + + + True + 7 + + + True + 3 + + + True + gtk-execute + + + False + 0 + + + + + True + + + 1 + + + + + True + select-folder + + + False + 2 + + + + + + + + + True + <b>BIOS</b> + True + + + label_item + + + + + False + 1 + + + + + 6 + 2 + + + + + True + end + + + gtk-close + -6 + True + True + True + True + + + False + False + 0 + + + + + False + end + 0 + + + + + + + True + Configure CPU + False + True + dialog + + + True + + + True + + + True + 5 + 0 + + + True + 5 + + + True + 4 + 2 + + + Enable Debugger + True + True + False + True + True + + + 1 + 2 + 3 + 4 + GTK_FILL + + + + + + SPU IRQ Always Enabled + True + True + False + True + True + + + 2 + 3 + GTK_FILL + + + + + + Black & White Movies + True + True + False + True + True + + + 3 + 4 + GTK_FILL + + + + + + Enable Console Output + True + True + False + True + True + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + + Enable Interpreter CPU + True + True + False + True + True + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + SIO IRQ Always Enabled + True + True + False + True + True + + + 1 + 2 + GTK_FILL + + + + + + Disable CD Audio + True + True + False + True + True + + + 1 + 2 + GTK_FILL + + + + + + Disable XA Decoding + True + True + False + True + True + + + GTK_FILL + + + + + + 0 + + + + + Parasite Eve 2, Vandal Hearts 1/2 Fix + True + True + False + True + True + + + False + False + 1 + + + + + InuYasha Sengoku Battle Fix + True + True + False + True + True + + + False + False + 2 + + + + + + + True + <b>Options</b> + True + + + label_item + + + + + 0 + + + + + True + 5 + 0 + + + True + 5 + 83 + + + Autodetect + True + True + False + True + True + + + + False + False + 0 + + + + + True + NTSC +PAL + + + False + False + 1 + + + + + + + True + <b>System Type</b> + True + + + label_item + + + + + 1 + + + + + 2 + + + + + True + end + + + gtk-close + -6 + True + True + True + True + + + False + False + 0 + + + + + False + end + 0 + + + + + + + True + Configure NetPlay + False + True + dialog + + + + True + + + True + + + True + 5 + 0 + + + True + 5 + + + True + 3 + + + True + gtk-network + + + 0 + + + + + True + + + 1 + + + + + True + True + False + + + + True + gtk-preferences + + + + + False + False + 2 + + + + + True + True + False + + + + True + gtk-info + + + + + False + False + 3 + + + + + + + + + True + <b>NetPlay</b> + True + + + label_item + + + + + False + False + 0 + + + + + 2 + + + + + True + end + + + gtk-close + -6 + True + True + True + True + + + False + False + 0 + + + + + False + end + 0 + + + + + + + True + Configure Memory Cards + True + 688 + 400 + dialog + + + True + + + True + + + True + 5 + 0 + + + True + 6 + 6 + + + True + False + automatic + automatic + in + + + 265 + 400 + True + True + + + + + 0 + + + + + True + 5 + 5 + + + True + True + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-new + + + False + False + 0 + + + + + True + New + True + + + False + False + 1 + + + + + + + + + False + False + 0 + + + + + True + True + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-clear + + + False + False + 0 + + + + + True + Format + True + + + False + False + 1 + + + + + + + + + False + False + 1 + + + + + True + True + True + True + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-delete + + + False + False + 0 + + + + + True + Un/Delete + True + + + False + False + 1 + + + + + + + + + False + False + 2 + + + + + False + 1 + + + + + True + True + True + + + True + 3 + + + True + gtk-floppy + + + False + False + 0 + + + + + True + Loading... + middle + True + + + 1 + + + + + True + + + False + 2 + + + + + True + gtk-open + + + False + False + 3 + + + + + + + False + 2 + + + + + + + True + + + True + <b>Memory Card 1</b> + True + + + False + False + 4 + 0 + + + + + label_item + + + + + 0 + + + + + True + 27 + 132 + + + True + 6 + spread + + + True + True + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-go-forward + + + False + False + 0 + + + + + True + Copy + True + + + False + False + 1 + + + + + + + + + False + False + 0 + + + + + True + True + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-go-back + + + False + False + 0 + + + + + True + Copy + True + + + False + False + 1 + + + + + + + + + False + False + 1 + + + + + + + False + False + 1 + + + + + True + 5 + 0 + + + True + 6 + 6 + + + True + False + automatic + automatic + in + + + 265 + 400 + True + True + + + + + 0 + + + + + True + 5 + 5 + + + True + True + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-new + + + False + False + 0 + + + + + True + New + True + + + False + False + 1 + + + + + + + + + False + False + 0 + + + + + True + True + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-clear + + + False + False + 0 + + + + + True + Format + True + + + False + False + 1 + + + + + + + + + False + False + 1 + + + + + True + True + True + True + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-delete + + + False + False + 0 + + + + + True + Un/Delete + True + + + False + False + 1 + + + + + + + + + False + False + 2 + + + + + False + 1 + + + + + True + True + True + + + True + 3 + + + True + gtk-floppy + + + False + False + 0 + + + + + True + Loading... + middle + True + + + 1 + + + + + True + + + False + 2 + + + + + True + gtk-open + + + False + False + 3 + + + + + + + False + 2 + + + + + + + True + + + True + <b>Memory Card 2</b> + True + + + False + False + 4 + 0 + + + + + label_item + + + + + 2 + + + + + 2 + + + + + True + end + + + gtk-close + -5 + True + True + True + False + True + + + False + False + 0 + + + + + False + end + 0 + + + + + + + True + 5 + Edit Cheat Codes + False + True + center + dialog + + + True + + + True + 15 + + + True + 0 + + + True + True + 5 + automatic + automatic + True + etched-in + + + 500 + 255 + True + True + + + + + + + True + <b>Cheat Codes</b> + True + + + label_item + + + + + 0 + + + + + True + 10 + + + gtk-edit + True + True + True + True + + + False + False + 2 + + + + + gtk-delete + True + True + True + True + + + False + False + 3 + + + + + gtk-add + True + True + True + True + + + False + False + 4 + + + + + gtk-open + True + True + True + True + + + False + False + end + 1 + + + + + gtk-save-as + True + True + True + True + + + False + False + end + 0 + + + + + False + 1 + + + + + 10 + 2 + + + + + True + end + + + gtk-close + True + True + True + True + + + False + False + 0 + + + + + False + end + 0 + + + + + + + True + 5 + Cheat Search + False + True + center + dialog + + + True + 2 + + + True + 0 + + + True + 12 + 12 + 12 + + + True + 6 + + + True + 3 + 4 + 10 + 10 + + + True + 8-bit +16-bit +32-bit + + + 1 + 2 + 1 + 2 + + + + + + True + Search For: + + + + + + + + + True + Data Type: + + + 1 + 2 + + + + + + + True + Value: + + + 2 + 3 + + + + + + + True + Data Base: + + + 2 + 3 + 1 + 2 + + + + + + + True + Equal Value +Not Equal Value +Range +Increased By +Decreased By +Increased +Decreased +Different +No Change + + + 1 + 2 + + + + + + True + True + + + 1 + 2 + 2 + 3 + + + + + + True + Decimal +Hexadecimal + + + 3 + 4 + 1 + 2 + + + + + + True + To: + + + 2 + 3 + 2 + 3 + + + + + True + True + + + 3 + 4 + 2 + 3 + + + + + + + + + + + False + False + 0 + + + + + True + + + True + True + never + etched-in + + + 450 + 250 + True + True + False + False + vertical + + + + + 0 + + + + + True + 20 + start + + + True + True + True + + + True + + + True + gtk-ok + 1 + + + 0 + + + + + True + Freeze + + + 1 + + + + + + + False + False + 0 + + + + + True + True + True + + + True + + + True + gtk-edit + 1 + + + 0 + + + + + True + Modify + + + 1 + + + + + + + False + False + 1 + + + + + True + True + True + + + True + + + True + gtk-paste + 1 + + + 0 + + + + + True + Copy + + + 1 + + + + + + + False + False + 2 + + + + + False + False + 10 + 1 + + + + + 1 + + + + + True + 0 + 0 + label_resultsfound + True + + + False + False + 2 + + + + + True + 20 + center + + + True + True + True + + + True + + + True + gtk-ok + 1 + + + 0 + + + + + True + Search + + + 1 + + + + + + + False + False + 0 + + + + + True + True + True + + + True + + + True + gtk-undo + 1 + + + 0 + + + + + True + Restart + + + 1 + + + + + + + False + False + 1 + + + + + False + False + 3 + + + + + + + + + True + <b>Cheat Search</b> + True + + + label_item + + + + + 1 + + + + + True + end + + + gtk-close + True + True + True + True + + + False + False + 0 + + + + + False + end + 0 + + + + + + + True + 5 + Memory Dump + False + True + center + dialog + False + + + True + 5 + + + True + 13 + + + True + 10 + + + True + Address (Hexadecimal): + + + False + False + 0 + + + + + True + True + + + + 1 + + + + + 5 + 0 + + + + + gtk-jump-to + True + True + True + True + + + False + False + 1 + + + + + False + False + 5 + 1 + + + + + True + True + never + etched-in + + + 580 + 380 + True + True + True + horizontal + + + + + 2 + + + + + True + 20 + center + + + True + True + True + + + True + + + True + gtk-save-as + + + 0 + + + + + True + Raw Dump... + + + 1 + + + + + + + False + False + 0 + + + + + True + True + True + + + True + + + True + gtk-edit + + + 0 + + + + + True + Patch Memory... + + + 1 + + + + + + + False + False + 1 + + + + + False + False + 3 + + + + + True + end + + + gtk-close + True + True + True + True + + + False + False + 0 + + + + + False + end + 0 + + + + + + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..4f9c95c0 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +pcsxr (2:1.9.92-1) unstable; urgency=low + + * Initial Release. + + -- Wei Mingzhi Fri, 15 Sep 2009 21:15:32 +0800 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..7ed6ff82 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..840611b3 --- /dev/null +++ b/debian/control @@ -0,0 +1,20 @@ +Source: pcsxr +Section: otherosfs +Priority: extra +Maintainer: Wei Mingzhi +Build-Depends: debhelper (>= 5), libgtk2.0-dev, libglade2-dev, zlib1g-dev | libz-dev, libxv-dev, libxtst-dev, nasm, libgl1-mesa-dev, libxxf86vm-dev, libsdl1.2-dev +Standards-Version: 3.7.3 + +Package: pcsxr +Architecture: any +Depends: ${shlibs:Depends} +Replaces: pcsx, pcsx-bin, pcsx-i18n, psemu-drive-cdrmooby, psemu-input-omnijoy, psemu-input-padjoy, psemu-sound-alsa, psemu-sound-oss, psemu-video-x11, pcsx-df +Conflicts: pcsx (<= 1:1.699df-rc3-1), pcsx-bin (<= 1:1.699df-rc3-1), pcsx-i18n (<= 1:1.699df-rc3-1), pcsx-df (<= 1:1.999) +Description: Sony PlayStation emulator -- binary + PCSX is an advanced PlayStation (PSX) emulator, which uses a plugin + architecture to provide full support for all components of the PSX. + It has full emulation support for gamepads, videos, sound, memory cards, + and other important PSX components, and is able to play many games + without problems. + . + This package provides the main PCSX binary, library, and support files. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..411fcbdf --- /dev/null +++ b/debian/copyright @@ -0,0 +1,61 @@ +This package was debianized by Wei Mingzhi on +Fri, 16 Jan 2009 13:32:52 +0800. + +It was downloaded from + +Upstream Authors: + PCSX-Reloaded: + Wei Mingzhi + PCSX-df: + Stephen Chao + Ryan Schultz + Andrew Burton + Stefan Sikora + Marcus Comstedt + PCSX Team + Linuzappz + Shadow + Pete Bernett + NoComp + Nik3d + Akumax + +Copyright: (C) 2008-2009 Wei Mingzhi + (C) 2005-2007 Ryan Schultz + (C) 2005-2007 Andrew Burton + (C) 2007 Stephen Chao + (C) 2007 Stefan Sikora + (C) 1999-2003 Pcsx Team + (C) 1998 Vision Thing + +License: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA + 02111-1307 USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The file 'PSEmu_Plugin_Defs.h' is released to the public domain, contrary +to its headers. This is an excerpt from a forum, by Pete Bernert (who wrote +many of the plugins and was a PCSX contributor): + +"The "PSEmu Plugin Def.h" header file is very old (1998) and (as you +have noticed) contains just a few basic defines. When PSemu Pro died in +early 1999, and new psx emus showed up, the Vision Thing crew allowed +free usage/enhancements of the interface. Sure, nobody ever updated the +header file to state something new, but Duddie gave his agreement, as +well as Kazz with his XA audio defines (used in the spu plugin +interface). So, there is nothing to worry about using the headers." diff --git a/debian/docs b/debian/docs new file mode 100644 index 00000000..cdd049d2 --- /dev/null +++ b/debian/docs @@ -0,0 +1,5 @@ +doc/keys.txt +doc/tweaks.txt +README +NEWS +ChangeLog.df diff --git a/debian/pcsxr.menu b/debian/pcsxr.menu new file mode 100644 index 00000000..7fccc89b --- /dev/null +++ b/debian/pcsxr.menu @@ -0,0 +1,5 @@ +?package(pcsxr): \ + needs="X11" \ + section="Applications/Emulators" \ + title="PCSX PlayStation Emulator" \ + command="/usr/games/pcsx" diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..8645846a --- /dev/null +++ b/debian/rules @@ -0,0 +1,75 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +#export DH_VERBOSE=1 + +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 -fomit-frame-pointer +endif + +CONFIGURE_PARAM = \ + --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr \ + --bindir=/usr/games \ + --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info \ + --enable-opengl + +config.status: configure + dh_testdir + CFLAGS="$(CFLAGS)" ./configure $(CONFIGURE_PARAM) + +build: build-stamp + +build-stamp: config.status + dh_testdir + $(MAKE) + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + [ ! -f Makefile ] || make distclean + + dh_clean config.status config.log po/stamp-po + +install: build + dh_testdir + dh_testroot + dh_installdirs + $(MAKE) install DESTDIR=$(CURDIR)/debian/pcsxr + # Remove useless files + rm -f $(CURDIR)/debian/pcsxr/usr/lib/games/psemu/*.la + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installmenu + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_makeshlibs + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/depcomp b/depcomp new file mode 100755 index 00000000..e5f9736c --- /dev/null +++ b/depcomp @@ -0,0 +1,589 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2007-03-29.01 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software +# Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 00000000..f2baf277 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,3 @@ +EXTRA_DIST = keys.txt tweaks.txt + +man_MANS = pcsx.1 diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 00000000..43b19ac6 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,426 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" +NROFF = nroff +MANS = $(man_MANS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = keys.txt tweaks.txt +man_MANS = pcsx.1 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $$i; then file=$$i; \ + else file=$(srcdir)/$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(MANS) +installdirs: + for dir in "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: install-man1 + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-man1 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-man uninstall-man1 + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/doc/keys.txt b/doc/keys.txt new file mode 100644 index 00000000..b4105cb1 --- /dev/null +++ b/doc/keys.txt @@ -0,0 +1,19 @@ +You should configure the PSX Input plugin -- it supports gamepads, joysticks, +and keyboards, and will work with any of those that are recognized as input +devices by your OS. + +There are also some quick keyboard commands to access emulator functions: + +F1: Save state +F2: Switch to next save slot +F3: Load state +F4: Display state screenshot +F5: Toggle SIO IRQ +F6: Toggle Black & White decoders +F7: Toggle XA +F8: Take a game screenshot +ESC: Return to the main window + +Ctrl 1 to 5: Save state 1 to 5 +Alt 1 to 5: Load state 1 to 5 +Alt 0: Load state from last ESC quit diff --git a/doc/pcsx.1 b/doc/pcsx.1 new file mode 100644 index 00000000..25d9cc50 --- /dev/null +++ b/doc/pcsx.1 @@ -0,0 +1,35 @@ +.\" Hey, EMACS: -*- nroff -*- +.TH PCSX 1 "October 01, 2005" +.SH NAME +pcsx - Playstation emulator +.SH SYPNOSIS +.B pcsx +.I [options] [file] +.SH DESCRIPTION +PCSX is a plugin-based Playstation emulator able to play most PSX games. It provides CPU, BIOS, and basic system emulation and relies on plugins for sound, input, and graphics emulation. +.PP +.SH OPTIONS +.B -runcd +Runs CD-ROM from drive +.TP +.B -cdfile FILE +Runs a CD image file +.TP +.B -nogui +Don't load the GUI +.TP +.B -cfg FILE +Specify a different config file +.TP +.B -psxout +Enable PSX output +.TP +.B -load STATENUM +Loads savestate STATENUM +.TP +.B -help (-h) +Display help message +.TP +.SH AUTHOR +pcsx was written by Linuzappz . PCSX-df was written by Ryan Schultz and Andrew Burton . +This manual page was written by Ryan Schultz for the Debian Project. diff --git a/doc/tweaks.txt b/doc/tweaks.txt new file mode 100644 index 00000000..0788302f --- /dev/null +++ b/doc/tweaks.txt @@ -0,0 +1,25 @@ +There are several toggles in PCSX to allow you to modify emulation +behavior; this may allow certain games to work that would not otherwise +function. These can all be found at Configuration -> CPU. + +* Disable XA Decoding: + Disables XA sound, which can improve game speed. + +* SIO IRQ Always Enabled: + This should be enabled for certain memcards/gamepads. + +* SPU IRQ Always Enabled: + Compatibility tweak; should probably be left off. + +* Black & White Movies: + Allows movies to be shown faster on slower systems. + +* Disable CD Audio: + Disable CD Audio for a performance boost. + +* Enable Console Output: + Dumps the PSX emulator output to the console. + +* Enable Interpreter CPU: + Enables interpretive emulation. + This is often more compatible, but at the price of emulation speed. diff --git a/gui/AboutDlg.c b/gui/AboutDlg.c new file mode 100644 index 00000000..88979cf5 --- /dev/null +++ b/gui/AboutDlg.c @@ -0,0 +1,109 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include "Linux.h" +#include + +#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 12 +#define gtk_about_dialog_set_program_name gtk_about_dialog_set_name +#endif + +#define ABOUT_VERSION "1.9.92" + +void RunAboutDialog(void) { + GtkWidget *AboutDlg; + + const gchar *authors[] = { + "PCSX-Reloaded Team:", + "edgbla ", + "Wei Mingzhi ", + "", + "Contributors:", + "Dario", + "Firnis", + "Gabriele Gorla", + "Peter Collingbourne", + "shalma", + "Tristin Celestin", + "(See the included AUTHORS file for more details.)", + "", + "PCSX-df Team:", + "Ryan Schultz ", + "Andrew Burton ", + "Stephen Chao ", + "Stefan Sikora ", + "", + "PCSX Team:", + "Linuzappz ", + "Shadow", + "Pete Bernert", + "NoComp", + "Nik3d", + NULL + }; + + const gchar *artists[] = { + "Ryan Schultz ", + "", + "Icon Design:", + "Romain Lafourcade", + NULL + }; + + const gchar *documenters[] = { + "Ryan Schultz ", + NULL + }; + + const gchar *copyright = N_( + "(C) 1999-2003 PCSX Team\n" + "(C) 2005-2009 PCSX-df Team\n" + "(C) 2009-2010 PCSX-Reloaded Team"); + + const gchar *license = N_( + "This program is free software; you can redistribute it and/or modify " + "it under the terms of the GNU General Public License as published by " + "the Free Software Foundation; either version 2 of the License, or " + "(at your option) any later version.\n" + "\n" + "This program is distributed in the hope that it will be useful, " + "but WITHOUT ANY WARRANTY; without even the implied warranty of " + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " + "GNU General Public License for more details.\n" + "\n" + "You should have received a copy of the GNU General Public License " + "along with this program; if not, write to the Free Software " + "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA."); + + AboutDlg = gtk_about_dialog_new(); + gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(AboutDlg), "PCSX-Reloaded"); + gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(AboutDlg), ABOUT_VERSION); + gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(AboutDlg), "http://pcsxr.codeplex.com/"); + gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(AboutDlg), "http://pcsxr.codeplex.com/"); + gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(AboutDlg), authors); + gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(AboutDlg), _(copyright)); + gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(AboutDlg), documenters); + gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(AboutDlg), artists); + gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(AboutDlg), _("translator-credits")); + gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG (AboutDlg), _("A PlayStation emulator.")); + gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(AboutDlg), _(license)); + gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG(AboutDlg), TRUE); + + gtk_dialog_run(GTK_DIALOG(AboutDlg)); + gtk_widget_destroy(AboutDlg); +} diff --git a/gui/AboutDlg.h b/gui/AboutDlg.h new file mode 100644 index 00000000..e8b82aff --- /dev/null +++ b/gui/AboutDlg.h @@ -0,0 +1,24 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifndef ABOUTDLG_H +#define ABOUTDLG_H + +void RunAboutDialog(void); + +#endif diff --git a/gui/Cheat.c b/gui/Cheat.c new file mode 100644 index 00000000..4047e2f2 --- /dev/null +++ b/gui/Cheat.c @@ -0,0 +1,1176 @@ +/* Cheat Support for PCSX-Reloaded + * Copyright (C) 2009, Wei Mingzhi . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "Linux.h" + +#include "../libpcsxcore/cheat.h" +#include "../libpcsxcore/psxmem.h" + +GtkWidget *CheatListDlg = NULL; +GtkWidget *CheatSearchDlg = NULL; + +static void LoadCheatListItems(int index) { + GtkListStore *store = gtk_list_store_new(2, G_TYPE_BOOLEAN, G_TYPE_STRING); + GtkTreeIter iter; + GtkWidget *widget; + GladeXML *xml; + + int i; + + xml = glade_get_widget_tree(CheatListDlg); + widget = glade_xml_get_widget(xml, "GtkCList_Cheat"); + + for (i = 0; i < NumCheats; i++) { + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, Cheats[i].Enabled, 1, Cheats[i].Descr, -1); + } + + gtk_tree_view_set_model(GTK_TREE_VIEW(widget), GTK_TREE_MODEL(store)); + g_object_unref(G_OBJECT(store)); + gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widget), TRUE); + gtk_widget_show(widget); + + if (index >= NumCheats) { + index = NumCheats - 1; + } + + if (index >= 0) { + GtkTreePath *path; + GtkTreeSelection *sel; + + path = gtk_tree_path_new_from_indices(index, -1); + sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); + + gtk_tree_selection_select_path(sel, path); + gtk_tree_path_free(path); + } +} + +static void CheatList_TreeSelectionChanged(GtkTreeSelection *selection, gpointer user_data) { + GladeXML *xml; + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + + gboolean selected; + int i; + + selected = gtk_tree_selection_get_selected(selection, &model, &iter); + + if (selected) { + path = gtk_tree_model_get_path(model, &iter); + i = *gtk_tree_path_get_indices(path); + gtk_tree_path_free(path); + + // If a row was selected, and the row is not blank, we can now enable + // some of the disabled widgets + xml = glade_get_widget_tree(CheatListDlg); + + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "editbutton1")), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "delbutton1")), TRUE); + } else { + xml = glade_get_widget_tree(CheatListDlg); + + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "editbutton1")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "delbutton1")), FALSE); + } + + gtk_widget_set_sensitive (GTK_WIDGET(glade_xml_get_widget(xml, "savebutton1")), NumCheats); +} + +static void OnCheatListDlg_AddClicked(GtkWidget *widget, gpointer user_data) { + GtkWidget *dlg; + GtkWidget *box, *scroll, *label, *descr_edit, *code_edit; + + dlg = gtk_dialog_new_with_buttons(_("Add New Cheat"), GTK_WINDOW(CheatListDlg), + GTK_DIALOG_MODAL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); + + gtk_window_set_default_size(GTK_WINDOW(dlg), 350, 350); + + box = GTK_WIDGET(GTK_DIALOG(dlg)->vbox); + + label = gtk_label_new(_("Cheat Description:")); + gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + descr_edit = gtk_entry_new(); + gtk_box_pack_start(GTK_BOX(box), descr_edit, FALSE, FALSE, 5); + gtk_widget_show(descr_edit); + + label = gtk_label_new(_("Cheat Code:")); + gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + code_edit = gtk_text_view_new(); + gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(code_edit), GTK_WRAP_CHAR); + + scroll = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scroll), code_edit); + gtk_widget_show(code_edit); + + gtk_box_pack_start(GTK_BOX(box), scroll, TRUE, TRUE, 5); + gtk_widget_show(scroll); + + gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER); + + gtk_widget_show_all(dlg); + + if (gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_ACCEPT) { + GtkTextBuffer *b = gtk_text_view_get_buffer(GTK_TEXT_VIEW(code_edit)); + GtkTextIter s, e; + char *codetext; + + gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(b), &s, &e); + codetext = strdup(gtk_text_buffer_get_text(GTK_TEXT_BUFFER(b), &s, &e, FALSE)); + + if (AddCheat(gtk_entry_get_text(GTK_ENTRY(descr_edit)), codetext) != 0) { + SysErrorMessage(_("Error"), _("Invalid cheat code!")); + } + + LoadCheatListItems(NumCheats - 1); + + free(codetext); + } + + gtk_widget_destroy(dlg); +} + +static void OnCheatListDlg_EditClicked(GtkWidget *widget, gpointer user_data) { + GtkWidget *dlg; + GtkWidget *box, *scroll, *label, *descr_edit, *code_edit; + GladeXML *xml; + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + + gboolean selected; + int index, i; + char buf[8192]; + char *p = buf; + + xml = glade_get_widget_tree(CheatListDlg); + widget = glade_xml_get_widget(xml, "GtkCList_Cheat"); + + selected = gtk_tree_selection_get_selected( + gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)), + &model, &iter); + + if (!selected) { + return; + } + + path = gtk_tree_model_get_path(model, &iter); + index = *gtk_tree_path_get_indices(path); + gtk_tree_path_free(path); + + dlg = gtk_dialog_new_with_buttons(_("Edit Cheat"), GTK_WINDOW(CheatListDlg), + GTK_DIALOG_MODAL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); + + gtk_window_set_default_size(GTK_WINDOW(dlg), 350, 350); + + box = GTK_WIDGET(GTK_DIALOG(dlg)->vbox); + + label = gtk_label_new(_("Cheat Description:")); + gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + descr_edit = gtk_entry_new(); + gtk_entry_set_text(GTK_ENTRY(descr_edit), Cheats[index].Descr); + gtk_box_pack_start(GTK_BOX(box), descr_edit, FALSE, FALSE, 5); + gtk_widget_show(descr_edit); + + label = gtk_label_new(_("Cheat Code:")); + gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + code_edit = gtk_text_view_new(); + + for (i = Cheats[index].First; i < Cheats[index].First + Cheats[index].n; i++) { + sprintf(p, "%.8X %.4X\n", CheatCodes[i].Addr, CheatCodes[i].Val); + p += 14; + *p = '\0'; + } + + gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(code_edit)), + buf, -1); + + gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(code_edit), GTK_WRAP_CHAR); + + scroll = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scroll), code_edit); + gtk_widget_show(code_edit); + + gtk_box_pack_start(GTK_BOX(box), scroll, TRUE, TRUE, 5); + gtk_widget_show(scroll); + + gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER); + + gtk_widget_show_all(dlg); + + if (gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_ACCEPT) { + GtkTextBuffer *b = gtk_text_view_get_buffer(GTK_TEXT_VIEW(code_edit)); + GtkTextIter s, e; + char *codetext; + + gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(b), &s, &e); + codetext = strdup(gtk_text_buffer_get_text(GTK_TEXT_BUFFER(b), &s, &e, FALSE)); + + if (EditCheat(index, gtk_entry_get_text(GTK_ENTRY(descr_edit)), codetext) != 0) { + SysErrorMessage(_("Error"), _("Invalid cheat code!")); + } + + LoadCheatListItems(index); + + free(codetext); + } + + gtk_widget_destroy(dlg); +} + +static void OnCheatListDlg_DelClicked(GtkWidget *widget, gpointer user_data) { + GladeXML *xml; + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + + gboolean selected; + int i = -1; + + xml = glade_get_widget_tree(CheatListDlg); + widget = glade_xml_get_widget(xml, "GtkCList_Cheat"); + + selected = gtk_tree_selection_get_selected( + gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)), + &model, &iter); + + if (selected) { + path = gtk_tree_model_get_path(model, &iter); + i = *gtk_tree_path_get_indices(path); + gtk_tree_path_free(path); + + RemoveCheat(i); + } + + LoadCheatListItems(i); // FIXME: should remove it from the list directly + // rather than regenerating the whole list +} + +static void OnCheatListDlg_EnableToggled(GtkWidget *widget, gchar *path, gpointer user_data) { + int i = atoi(path); + + assert(i >= 0 && i < NumCheats); + Cheats[i].Enabled ^= 1; + + LoadCheatListItems(i); // FIXME: should modify it in the list directly + // rather than regenerating the whole list +} + +static void OnCheatListDlg_OpenClicked(GtkWidget *widget, gpointer user_data) { + GtkWidget *chooser; + gchar *filename; + + GtkFileFilter *filter; + + chooser = gtk_file_chooser_dialog_new (_("Open Cheat File"), + NULL, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + + filename = g_build_filename(getenv("HOME"), CHEATS_DIR, NULL); + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser), filename); + g_free(filename); + + filter = gtk_file_filter_new (); + gtk_file_filter_add_pattern (filter, "*.cht"); + gtk_file_filter_set_name (filter, _("PCSX Cheat Code Files (*.cht)")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter); + + filter = gtk_file_filter_new (); + gtk_file_filter_add_pattern (filter, "*"); + gtk_file_filter_set_name (filter, _("All Files")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter); + + if (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_OK) { + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser)); + gtk_widget_destroy (GTK_WIDGET (chooser)); + while (gtk_events_pending()) gtk_main_iteration(); + } else { + gtk_widget_destroy (GTK_WIDGET (chooser)); + while (gtk_events_pending()) gtk_main_iteration(); + return; + } + + LoadCheats(filename); + + g_free(filename); + + LoadCheatListItems(-1); +} + +static void OnCheatListDlg_SaveClicked(GtkWidget *widget, gpointer user_data) { + GtkWidget *chooser; + gchar *filename; + GtkFileFilter *filter; + + chooser = gtk_file_chooser_dialog_new(_("Save Cheat File"), + NULL, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + + filename = g_build_filename(getenv("HOME"), CHEATS_DIR, NULL); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), filename); + g_free(filename); + + filter = gtk_file_filter_new(); + gtk_file_filter_add_pattern(filter, "*.cht"); + gtk_file_filter_set_name(filter, _("PCSX Cheat Code Files (*.cht)")); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(chooser), filter); + + filter = gtk_file_filter_new(); + gtk_file_filter_add_pattern(filter, "*"); + gtk_file_filter_set_name(filter, _("All Files (*.*)")); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(chooser), filter); + + if (gtk_dialog_run(GTK_DIALOG(chooser)) == GTK_RESPONSE_OK) { + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser)); + gtk_widget_destroy (GTK_WIDGET(chooser)); + while (gtk_events_pending()) gtk_main_iteration(); + } else { + gtk_widget_destroy (GTK_WIDGET(chooser)); + while (gtk_events_pending()) gtk_main_iteration(); + return; + } + + SaveCheats(filename); + + g_free(filename); +} + +static void OnCheatListDlg_CloseClicked() { + gtk_widget_destroy(CheatListDlg); + CheatListDlg = NULL; +} + +// run the cheat list dialog +void RunCheatListDialog() { + GladeXML *xml; + GtkWidget *widget; + GtkTreeSelection *treesel; + GtkTreeViewColumn *column; + GtkCellRenderer *renderer; + + xml = glade_xml_new(PACKAGE_DATA_DIR "pcsx.glade2", "CheatListDlg", NULL); + if (!xml) { + g_warning(_("Error: Glade interface could not be loaded!")); + return; + } + + CheatListDlg = glade_xml_get_widget(xml, "CheatListDlg"); + gtk_window_set_title(GTK_WINDOW(CheatListDlg), _("Cheat Codes")); + + widget = glade_xml_get_widget(xml, "GtkCList_Cheat"); + + // column for enable + renderer = gtk_cell_renderer_toggle_new(); + column = gtk_tree_view_column_new_with_attributes(_("Enable"), + renderer, "active", 0, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + g_signal_connect(G_OBJECT(renderer), "toggled", G_CALLBACK(OnCheatListDlg_EnableToggled), 0); + + // column for description + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Description"), + renderer, "text", 1, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + LoadCheatListItems(-1); + + treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); + gtk_tree_selection_set_mode(treesel, GTK_SELECTION_SINGLE); + g_signal_connect_data(G_OBJECT (treesel), "changed", + G_CALLBACK (CheatList_TreeSelectionChanged), + NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "addbutton1"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnCheatListDlg_AddClicked), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "editbutton1"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnCheatListDlg_EditClicked), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "delbutton1"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnCheatListDlg_DelClicked), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "loadbutton1"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnCheatListDlg_OpenClicked), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "savebutton1"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnCheatListDlg_SaveClicked), xml, NULL, G_CONNECT_AFTER); + + // Setup a handler for when Close or Cancel is clicked + g_signal_connect_data(GTK_OBJECT(CheatListDlg), "response", + GTK_SIGNAL_FUNC(OnCheatListDlg_CloseClicked), xml, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); + + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "savebutton1")), NumCheats); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "editbutton1")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "delbutton1")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "editbutton1")), FALSE); +} + +/////////////////////////////////////////////////////////////////////////////// + +#define SEARCH_EQUALVAL 0 +#define SEARCH_NOTEQUALVAL 1 +#define SEARCH_RANGE 2 +#define SEARCH_INCBY 3 +#define SEARCH_DECBY 4 +#define SEARCH_INC 5 +#define SEARCH_DEC 6 +#define SEARCH_DIFFERENT 7 +#define SEARCH_NOCHANGE 8 + +#define SEARCHTYPE_8BIT 0 +#define SEARCHTYPE_16BIT 1 +#define SEARCHTYPE_32BIT 2 + +#define SEARCHBASE_DEC 0 +#define SEARCHBASE_HEX 1 + +static char current_search = SEARCH_EQUALVAL; +static char current_searchtype = SEARCHTYPE_8BIT; +static char current_searchbase = SEARCHBASE_DEC; +static uint32_t current_valuefrom = 0; +static uint32_t current_valueto = 0; + +// update the cheat search dialog +static void UpdateCheatSearchDialog() { + GladeXML *xml; + char buf[256]; + int i; + u32 addr; + GtkListStore *store = gtk_list_store_new(1, G_TYPE_STRING); + GtkTreeIter iter; + GtkWidget *widget; + + xml = glade_get_widget_tree(CheatSearchDlg); + widget = glade_xml_get_widget(xml, "GtkCList_Result"); + + gtk_combo_box_set_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "combo_searchfor")), current_search); + gtk_combo_box_set_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "combo_datatype")), current_searchtype); + gtk_combo_box_set_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "combo_database")), current_searchbase); + + if (current_searchbase == SEARCHBASE_DEC) { + sprintf(buf, "%u", current_valuefrom); + gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_value")), buf); + sprintf(buf, "%u", current_valueto); + gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_valueto")), buf); + } + else { + sprintf(buf, "%X", current_valuefrom); + gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_value")), buf); + sprintf(buf, "%X", current_valueto); + gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_valueto")), buf); + } + + if (current_search == SEARCH_RANGE) { + gtk_widget_show(GTK_WIDGET(glade_xml_get_widget(xml, "label_valueto"))); + gtk_widget_show(GTK_WIDGET(glade_xml_get_widget(xml, "entry_valueto"))); + } + else { + gtk_widget_hide(GTK_WIDGET(glade_xml_get_widget(xml, "label_valueto"))); + gtk_widget_hide(GTK_WIDGET(glade_xml_get_widget(xml, "entry_valueto"))); + } + + if (current_search >= SEARCH_INC) { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "entry_value")), FALSE); + } + else { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "entry_value")), TRUE); + } + + if (current_search >= SEARCH_INCBY && prevM == NULL) { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_start")), FALSE); + } + else { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_start")), TRUE); + } + + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_freeze")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_modify")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_copy")), FALSE); + + if (prevM != NULL) { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "combo_datatype")), FALSE); + + if (NumSearchResults > 100) { + // too many results to be shown + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, _("Too many addresses found."), -1); + gtk_widget_set_sensitive(widget, FALSE); + } + else { + for (i = 0; i < NumSearchResults; i++) { + addr = SearchResults[i]; + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + sprintf(buf, _("%.8X Current: %u (%.2X), Previous: %u (%.2X)"), + addr, PSXMu8(addr), PSXMu8(addr), PrevMu8(addr), PrevMu8(addr)); + break; + + case SEARCHTYPE_16BIT: + sprintf(buf, _("%.8X Current: %u (%.4X), Previous: %u (%.4X)"), + addr, PSXMu16(addr), PSXMu16(addr), PrevMu16(addr), PrevMu16(addr)); + break; + + case SEARCHTYPE_32BIT: + sprintf(buf, _("%.8X Current: %u (%.8X), Previous: %u (%.8X)"), + addr, PSXMu32(addr), PSXMu32(addr), PrevMu32(addr), PrevMu32(addr)); + break; + + default: + assert(FALSE); // impossible + break; + } + + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, buf, -1); + } + gtk_widget_set_sensitive(widget, TRUE); + } + + sprintf(buf, _("Founded Addresses: %d"), NumSearchResults); + gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(xml, "label_resultsfound")), buf); + } + else { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "combo_datatype")), TRUE); + gtk_widget_set_sensitive(widget, FALSE); + + gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(xml, "label_resultsfound")), + _("Enter the values and start your search.")); + } + + gtk_tree_view_set_model(GTK_TREE_VIEW(widget), GTK_TREE_MODEL(store)); + g_object_unref(G_OBJECT(store)); + gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widget), TRUE); + gtk_widget_show(widget); +} + +// get the current selected result index in the list +static int GetSelectedResultIndex() { + GladeXML *xml; + GtkTreeSelection *selection; + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + gboolean selected; + int i; + + xml = glade_get_widget_tree(CheatSearchDlg); + + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(glade_xml_get_widget(xml, "GtkCList_Result"))); + selected = gtk_tree_selection_get_selected(selection, &model, &iter); + + if (!selected) { + return -1; + } + + path = gtk_tree_model_get_path(model, &iter); + i = *gtk_tree_path_get_indices(path); + gtk_tree_path_free(path); + + assert(i < NumSearchResults); + return i; +} + +// add cheat code to freeze the value +static void OnCheatSearchDlg_FreezeClicked(GtkWidget *widget, gpointer user_data) { + GtkWidget *dlg; + GtkWidget *box, *hbox, *label, *descr_edit, *value_edit; + char buf[256]; + u32 addr, val = 0; + + addr = SearchResults[GetSelectedResultIndex()]; + + dlg = gtk_dialog_new_with_buttons(_("Freeze value"), GTK_WINDOW(CheatListDlg), + GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); + + box = GTK_WIDGET(GTK_DIALOG(dlg)->vbox); + + label = gtk_label_new(_("Description:")); + gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + descr_edit = gtk_entry_new(); + gtk_box_pack_start(GTK_BOX(box), descr_edit, FALSE, FALSE, 10); + gtk_widget_show(descr_edit); + + hbox = gtk_hbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 15); + + label = gtk_label_new(_("Value:")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + value_edit = gtk_entry_new(); + gtk_box_pack_start(GTK_BOX(hbox), value_edit, FALSE, FALSE, 10); + gtk_widget_show(value_edit); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + val = PSXMu8(addr); + break; + + case SEARCHTYPE_16BIT: + val = PSXMu16(addr); + break; + + case SEARCHTYPE_32BIT: + val = PSXMu32(addr); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + sprintf(buf, "%u", val); + gtk_entry_set_text(GTK_ENTRY(value_edit), buf); + + sprintf(buf, "%.8X", addr); + gtk_entry_set_text(GTK_ENTRY(descr_edit), buf); + + gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER); + gtk_widget_show_all(dlg); + + if (gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_ACCEPT) { + val = 0; + sscanf(gtk_entry_get_text(GTK_ENTRY(value_edit)), "%u", &val); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + if (val > (u32)0xFF) { + val = 0xFF; + } + sprintf(buf, "%.8X %.4X", (addr & 0x1FFFFF) | (CHEAT_CONST8 << 24), val); + break; + + case SEARCHTYPE_16BIT: + if (val > (u32)0xFFFF) { + val = 0xFFFF; + } + sprintf(buf, "%.8X %.4X", (addr & 0x1FFFFF) | (CHEAT_CONST16 << 24), val); + break; + + case SEARCHTYPE_32BIT: + sprintf(buf, "%.8X %.4X\n%.8X %.4X", + (addr & 0x1FFFFF) | (CHEAT_CONST16 << 24), val & 0xFFFF, + ((addr + 2) & 0x1FFFFF) | (CHEAT_CONST16 << 24), ((val & 0xFFFF0000) >> 16) & 0xFFFF); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + if (AddCheat(gtk_entry_get_text(GTK_ENTRY(descr_edit)), buf) == 0) { + Cheats[NumCheats - 1].Enabled = 1; + } + } + + gtk_widget_destroy(dlg); +} + +// modify the value on the fly +static void OnCheatSearchDlg_ModifyClicked(GtkWidget *widget, gpointer user_data) { + GtkWidget *dlg; + GtkWidget *box, *hbox, *label, *value_edit; + char buf[256]; + u32 addr, val = 0; + + addr = SearchResults[GetSelectedResultIndex()]; + + dlg = gtk_dialog_new_with_buttons(_("Modify value"), GTK_WINDOW(CheatListDlg), + GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); + + box = GTK_WIDGET(GTK_DIALOG(dlg)->vbox); + hbox = gtk_hbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); + + label = gtk_label_new(_("New value:")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + value_edit = gtk_entry_new(); + gtk_box_pack_start(GTK_BOX(hbox), value_edit, FALSE, FALSE, 10); + gtk_widget_show(value_edit); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + val = PSXMu8(addr); + break; + + case SEARCHTYPE_16BIT: + val = PSXMu16(addr); + break; + + case SEARCHTYPE_32BIT: + val = PSXMu32(addr); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + sprintf(buf, "%u", val); + gtk_entry_set_text(GTK_ENTRY(value_edit), buf); + + gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER); + gtk_widget_show_all(dlg); + + if (gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_ACCEPT) { + val = 0; + sscanf(gtk_entry_get_text(GTK_ENTRY(value_edit)), "%u", &val); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + if (val > 0xFF) { + val = 0xFF; + } + psxMemWrite8(addr, (u8)val); + break; + + case SEARCHTYPE_16BIT: + if (val > 0xFFFF) { + val = 0xFFFF; + } + psxMemWrite16(addr, (u16)val); + break; + + case SEARCHTYPE_32BIT: + psxMemWrite32(addr, (u32)val); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + UpdateCheatSearchDialog(); + } + + gtk_widget_destroy(dlg); +} + +// copy the selected address to clipboard +static void OnCheatSearchDlg_CopyClicked(GtkWidget *widget, gpointer user_data) { + int i; + char buf[9]; + + i = GetSelectedResultIndex(); + assert(i != -1); + + sprintf(buf, "%8X", SearchResults[i]); + buf[8] = '\0'; + + gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), buf, 8); +} + +// preform the search +static void OnCheatSearchDlg_SearchClicked(GtkWidget *widget, gpointer user_data) { + GladeXML *xml; + + xml = glade_get_widget_tree(CheatSearchDlg); + + current_search = gtk_combo_box_get_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "combo_searchfor"))); + current_searchtype = gtk_combo_box_get_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "combo_datatype"))); + current_searchbase = gtk_combo_box_get_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "combo_database"))); + current_valuefrom = 0; + current_valueto = 0; + + if (current_searchbase == SEARCHBASE_DEC) { + sscanf(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_value"))), "%u", ¤t_valuefrom); + sscanf(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_valueto"))), "%u", ¤t_valueto); + } + else { + sscanf(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_value"))), "%x", ¤t_valuefrom); + sscanf(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_valueto"))), "%x", ¤t_valueto); + } + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + if (current_valuefrom > (u32)0xFF) { + current_valuefrom = 0xFF; + } + if (current_valueto > (u32)0xFF) { + current_valueto = 0xFF; + } + break; + + case SEARCHTYPE_16BIT: + if (current_valuefrom > (u32)0xFFFF) { + current_valuefrom = 0xFFFF; + } + if (current_valueto > (u32)0xFFFF) { + current_valueto = 0xFFFF; + } + break; + } + + if (current_search == SEARCH_RANGE && current_valuefrom > current_valueto) { + u32 t = current_valuefrom; + current_valuefrom = current_valueto; + current_valueto = t; + } + + switch (current_search) { + case SEARCH_EQUALVAL: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchEqual8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchEqual16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchEqual32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_NOTEQUALVAL: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchNotEqual8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchNotEqual16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchNotEqual32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_RANGE: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchRange8((u8)current_valuefrom, (u8)current_valueto); + break; + + case SEARCHTYPE_16BIT: + CheatSearchRange16((u16)current_valuefrom, (u16)current_valueto); + break; + + case SEARCHTYPE_32BIT: + CheatSearchRange32((u32)current_valuefrom, (u32)current_valueto); + break; + } + break; + + case SEARCH_INCBY: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchIncreasedBy8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchIncreasedBy16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchIncreasedBy32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_DECBY: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchDecreasedBy8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchDecreasedBy16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchDecreasedBy32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_INC: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchIncreased8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchIncreased16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchIncreased32(); + break; + } + break; + + case SEARCH_DEC: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchDecreased8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchDecreased16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchDecreased32(); + break; + } + break; + + case SEARCH_DIFFERENT: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchDifferent8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchDifferent16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchDifferent32(); + break; + } + break; + + case SEARCH_NOCHANGE: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchNoChange8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchNoChange16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchNoChange32(); + break; + } + break; + + default: + assert(FALSE); // not possible + break; + } + + UpdateCheatSearchDialog(); +} + +// restart the search +static void OnCheatSearchDlg_RestartClicked(GtkWidget *widget, gpointer user_data) { + FreeCheatSearchResults(); + FreeCheatSearchMem(); + + current_search = SEARCH_EQUALVAL; + current_searchtype = SEARCHTYPE_8BIT; + current_searchbase = SEARCHBASE_DEC; + current_valuefrom = 0; + current_valueto = 0; + + UpdateCheatSearchDialog(); +} + +// close the cheat search window +static void OnCheatSearchDlg_CloseClicked(GtkWidget *widget, gpointer user_data) { + gtk_widget_destroy(CheatSearchDlg); + CheatSearchDlg = NULL; +} + +static void OnCheatSearchDlg_SearchForChanged(GtkWidget *widget, gpointer user_data) { + GladeXML *xml; + + xml = glade_get_widget_tree(CheatSearchDlg); + + if (gtk_combo_box_get_active(GTK_COMBO_BOX(widget)) == SEARCH_RANGE) { + gtk_widget_show(GTK_WIDGET(glade_xml_get_widget(xml, "label_valueto"))); + gtk_widget_show(GTK_WIDGET(glade_xml_get_widget(xml, "entry_valueto"))); + } + else { + gtk_widget_hide(GTK_WIDGET(glade_xml_get_widget(xml, "label_valueto"))); + gtk_widget_hide(GTK_WIDGET(glade_xml_get_widget(xml, "entry_valueto"))); + } + + if (gtk_combo_box_get_active(GTK_COMBO_BOX(widget)) >= SEARCH_INC) { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "entry_value")), FALSE); + } + else { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "entry_value")), TRUE); + } + + if (gtk_combo_box_get_active(GTK_COMBO_BOX(widget)) >= SEARCH_INCBY && prevM == NULL) { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_start")), FALSE); + } + else { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_start")), TRUE); + } +} + +static void OnCheatSearchDlg_DataBaseChanged(GtkWidget *widget, gpointer user_data) { + u32 val; + char buf[256]; + GladeXML *xml; + + xml = glade_get_widget_tree(CheatSearchDlg); + + if (gtk_combo_box_get_active(GTK_COMBO_BOX(widget)) == SEARCHBASE_DEC) { + val = 0; + sscanf(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_value"))), "%x", &val); + sprintf(buf, "%u", val); + gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_value")), buf); + + val = 0; + sscanf(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_valueto"))), "%x", &val); + sprintf(buf, "%u", val); + gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_valueto")), buf); + } + else { + val = 0; + sscanf(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_value"))), "%u", &val); + sprintf(buf, "%X", val); + gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_value")), buf); + + val = 0; + sscanf(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_valueto"))), "%u", &val); + sprintf(buf, "%X", val); + gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(xml, "entry_valueto")), buf); + } +} + +static void CheatSearch_TreeSelectionChanged(GtkTreeSelection *selection, gpointer user_data) { + GladeXML *xml; + + xml = glade_get_widget_tree(CheatSearchDlg); + + if (GetSelectedResultIndex() != -1) { + // If a row was selected, we can now enable some of the disabled widgets + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_freeze")), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_modify")), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_copy")), TRUE); + } else { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_freeze")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_modify")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btn_copy")), FALSE); + } +} + +// run the cheat search dialog +void RunCheatSearchDialog() { + GladeXML *xml; + GtkWidget *widget; + GtkCellRenderer *renderer; + GtkTreeSelection *treesel; + GtkTreeViewColumn *column; + + xml = glade_xml_new(PACKAGE_DATA_DIR "pcsx.glade2", "CheatSearchDlg", NULL); + if (!xml) { + g_warning(_("Error: Glade interface could not be loaded!")); + return; + } + + CheatSearchDlg = glade_xml_get_widget(xml, "CheatSearchDlg"); + gtk_window_set_title(GTK_WINDOW(CheatSearchDlg), _("Cheat Search")); + + widget = glade_xml_get_widget(xml, "GtkCList_Result"); + + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes(_("Search Results"), + renderer, "text", 0, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); + gtk_tree_selection_set_mode (treesel, GTK_SELECTION_SINGLE); + g_signal_connect_data(G_OBJECT(treesel), "changed", + G_CALLBACK(CheatSearch_TreeSelectionChanged), + NULL, NULL, G_CONNECT_AFTER); + + UpdateCheatSearchDialog(); + + widget = glade_xml_get_widget(xml, "btn_freeze"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnCheatSearchDlg_FreezeClicked), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_modify"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnCheatSearchDlg_ModifyClicked), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_copy"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnCheatSearchDlg_CopyClicked), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_start"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnCheatSearchDlg_SearchClicked), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_restart"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnCheatSearchDlg_RestartClicked), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "combo_searchfor"); + g_signal_connect_data(GTK_OBJECT(widget), "changed", + GTK_SIGNAL_FUNC(OnCheatSearchDlg_SearchForChanged), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "combo_database"); + g_signal_connect_data(GTK_OBJECT(widget), "changed", + GTK_SIGNAL_FUNC(OnCheatSearchDlg_DataBaseChanged), xml, NULL, G_CONNECT_AFTER); + + g_signal_connect_data(GTK_OBJECT(CheatSearchDlg), "response", + GTK_SIGNAL_FUNC(OnCheatSearchDlg_CloseClicked), xml, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); +} diff --git a/gui/Cheat.h b/gui/Cheat.h new file mode 100644 index 00000000..f0990af1 --- /dev/null +++ b/gui/Cheat.h @@ -0,0 +1,25 @@ +/* Cheat Support for PCSX-Reloaded + * Copyright (C) 2009, Wei Mingzhi . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifndef GUI_CHEAT_H +#define GUI_CHEAT_H + +void RunCheatListDialog(); +void RunCheatSearchDialog(); + +#endif diff --git a/gui/ConfDlg.c b/gui/ConfDlg.c new file mode 100644 index 00000000..6b2aee4f --- /dev/null +++ b/gui/ConfDlg.c @@ -0,0 +1,889 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "Linux.h" +#include "ConfDlg.h" + +#include "../libpcsxcore/plugins.h" + +static void OnBiosPath_Changed(GtkWidget *wdg, gpointer data); +static void OnConf_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data); +static void OnPluginPath_Changed(GtkWidget *wdg, gpointer data); +static void OnConfConf_Pad1About(GtkWidget *widget, gpointer user_data); +static void OnConfConf_Pad2About(GtkWidget *widget, gpointer user_data); +static void OnConfConf_Pad1Conf(GtkWidget *widget, gpointer user_data); +static void OnConfConf_Pad2Conf(GtkWidget *widget, gpointer user_data); +static void OnNet_Conf(GtkWidget *widget, gpointer user_data); +static void OnNet_About(GtkWidget *widget, gpointer user_data); +static void on_configure_plugin(GtkWidget *widget, gpointer user_data); +static void on_about_plugin(GtkWidget *widget, gpointer user_data); +static void UpdatePluginsBIOS_UpdateGUI(GladeXML *xml); +static void FindNetPlugin(GladeXML *xml); + +PSEgetLibType PSE_getLibType = NULL; +PSEgetLibVersion PSE_getLibVersion = NULL; +PSEgetLibName PSE_getLibName = NULL; + +GtkWidget *ConfDlg = NULL; +GtkWidget *NetDlg = NULL; +GtkWidget *controlwidget = NULL; + +PluginConf GpuConfS; +PluginConf SpuConfS; +PluginConf CdrConfS; +PluginConf Pad1ConfS; +PluginConf Pad2ConfS; +PluginConf NetConfS; +PluginConf BiosConfS; + +#define FindComboText(combo, list, conf) \ + if (strlen(conf) > 0) { \ + int i; \ + for (i = 2; i < 255; i += 2) { \ + if (!strcmp(conf, list[i - 2])) { \ + gtk_combo_box_set_active(GTK_COMBO_BOX(combo), i / 2 - 1); \ + break; \ + } \ + } \ + } + +#define GetComboText(combo, list, conf) \ + { \ + int row; \ + row = gtk_combo_box_get_active(GTK_COMBO_BOX(combo)); \ + strcpy(conf, (char *)list[row * 2]); \ + } + +void ConfigurePlugins() { + if (!UseGui) { + /* How do we get here if we're not running the GUI? */ + /* Ryan: we're going to imagine that someday, there will be a way + * to configure plugins from the commandline */ + printf("ERROR: Plugins cannot be configured without the GUI."); + return; + } + + GladeXML *xml; + GtkWidget *widget; + + gchar *path; + + UpdatePluginsBIOS(); + + xml = glade_xml_new(PACKAGE_DATA_DIR "pcsx.glade2", "ConfDlg", NULL); + + if (!xml) { + g_warning(_("Error: Glade interface could not be loaded!")); + return; + } + + UpdatePluginsBIOS_UpdateGUI(xml); + + ConfDlg = glade_xml_get_widget(xml, "ConfDlg"); + + gtk_window_set_title(GTK_WINDOW(ConfDlg), _("Configure PCSX")); + + /* Set the paths in the file choosers to be based on the saved configurations */ + widget = glade_xml_get_widget(xml, "GtkFileChooser_Bios"); + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (widget), Config.BiosDir); + + widget = glade_xml_get_widget(xml, "GtkFileChooser_Plugin"); + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (widget), Config.PluginsDir); + + if (strlen(Config.PluginsDir) == 0) { + if((path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (widget))) != NULL) { + strcpy(Config.PluginsDir, path); + g_free(path); + } + } + + widget = glade_xml_get_widget(xml, "btn_ConfGpu"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_configure_plugin), (gpointer) PSE_LT_GPU, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_ConfSpu"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_configure_plugin), (gpointer) PSE_LT_SPU, NULL, G_CONNECT_AFTER); + + /* ADB TODO Does pad 1 and 2 need to be different? */ + widget = glade_xml_get_widget(xml, "btn_ConfPad1"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConfConf_Pad1Conf), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_ConfPad2"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConfConf_Pad2Conf), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_ConfCdr"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_configure_plugin), (gpointer) PSE_LT_CDR, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_AboutGpu"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_about_plugin), (gpointer) PSE_LT_GPU, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_AboutSpu"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_about_plugin), (gpointer) PSE_LT_SPU, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_AboutPad1"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConfConf_Pad1About), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_AboutPad2"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConfConf_Pad2About), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_AboutCdr"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_about_plugin), (gpointer) PSE_LT_CDR, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "GtkFileChooser_Bios"); + g_signal_connect_data(GTK_OBJECT(widget), "current_folder_changed", + GTK_SIGNAL_FUNC(OnBiosPath_Changed), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "GtkFileChooser_Plugin"); + g_signal_connect_data(GTK_OBJECT(widget), "current_folder_changed", + GTK_SIGNAL_FUNC(OnPluginPath_Changed), xml, NULL, G_CONNECT_AFTER); + + g_signal_connect_data(GTK_OBJECT(ConfDlg), "response", + GTK_SIGNAL_FUNC(OnConf_Clicked), xml, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); +} + +void OnNet_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) { + GetComboText(NetConfS.Combo, NetConfS.plist, Config.Net); + SaveConfig(); + gtk_widget_destroy(GTK_WIDGET(dialog)); + NetDlg = NULL; +} + +void OnConf_Net() { + GladeXML *xml; + GtkWidget *widget; + + if (NetDlg != NULL) { + gtk_window_present (GTK_WINDOW (NetDlg)); + return; + } + + xml = glade_xml_new(PACKAGE_DATA_DIR "pcsx.glade2", "NetDlg", NULL); + + if (!xml) { + g_warning(_("Error: Glade interface could not be loaded!")); + return; + } + + NetDlg = glade_xml_get_widget(xml, "NetDlg"); + + FindNetPlugin(xml); + + /* Setup a handler for when Close or Cancel is clicked */ + g_signal_connect_data(GTK_OBJECT(NetDlg), "response", + GTK_SIGNAL_FUNC(OnNet_Clicked), xml, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_ConfNet"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnNet_Conf), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_AboutNet"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnNet_About), xml, NULL, G_CONNECT_AFTER); +} + +void OnConf_Graphics() { + void *drv; + GPUconfigure conf; + char Plugin[MAXPATHLEN]; + + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Gpu); + drv = SysLoadLibrary(Plugin); + if (drv == NULL) { printf("Error with file %s\n", Plugin); return; } + + while (gtk_events_pending()) gtk_main_iteration(); + + conf = (GPUconfigure)SysLoadSym(drv, "GPUconfigure"); + if (conf != NULL) { + conf(); + } + else + SysInfoMessage (_("No configuration required"), _("This plugin doesn't need to be configured.")); + + SysCloseLibrary(drv); +} + +void OnConf_Sound() { + void *drv; + SPUconfigure conf; + char Plugin[MAXPATHLEN]; + + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Spu); + drv = SysLoadLibrary(Plugin); + if (drv == NULL) { printf("Error with file %s\n", Plugin); return; } + + while (gtk_events_pending()) gtk_main_iteration(); + + conf = (GPUconfigure)SysLoadSym(drv, "SPUconfigure"); + if (conf != NULL) { + conf(); + } + else + SysInfoMessage (_("No configuration required"), _("This plugin doesn't need to be configured.")); + + SysCloseLibrary(drv); +} + +void OnConf_CdRom() { + void *drv; + CDRconfigure conf; + char Plugin[MAXPATHLEN]; + + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Cdr); + drv = SysLoadLibrary(Plugin); + if (drv == NULL) { printf("Error with file %s\n", Plugin); return; } + + while (gtk_events_pending()) gtk_main_iteration(); + + conf = (GPUconfigure)SysLoadSym(drv, "CDRconfigure"); + if (conf != NULL) { + conf(); + } + else + SysInfoMessage (_("No configuration required"), _("This plugin doesn't need to be configured.")); + + SysCloseLibrary(drv); +} + +void OnConf_Pad() { + void *drv; + PADconfigure conf; + char Plugin[MAXPATHLEN]; + + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Pad1); + drv = SysLoadLibrary(Plugin); + if (drv == NULL) { printf("Error with file %s\n", Plugin); return; } + + while (gtk_events_pending()) gtk_main_iteration(); + + conf = (GPUconfigure)SysLoadSym(drv, "PADconfigure"); + if (conf != NULL) { + conf(); + } + else + SysInfoMessage (_("No configuration required"), _("This plugin doesn't need to be configured.")); + + SysCloseLibrary(drv); + + if (strcmp(Config.Pad1, Config.Pad2) != 0) { + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Pad2); + drv = SysLoadLibrary(Plugin); + if (drv == NULL) { printf("Error with file %s\n", Plugin); return; } + + while (gtk_events_pending()) gtk_main_iteration(); + + conf = (GPUconfigure)SysLoadSym(drv, "PADconfigure"); + if (conf != NULL) { + conf(); + } + + SysCloseLibrary(drv); + } +} + +static int all_config_set() { + int retval; + + if ((strlen(Config.Gpu) != 0) && + (strlen(Config.Spu) != 0) && + (strlen(Config.Cdr) != 0) && + (strlen(Config.Pad1) != 0) && + (strlen(Config.Pad2) != 0)) + retval = TRUE; + else + retval = FALSE; + + return retval; +} + +/* TODO Check whether configuration is required when we choose the plugin, and set the state of the + button appropriately. New gtk tooltip API should allow us to put a tooltip explanation for + disabled widgets */ +/* TODO If combo screen hasn't been opened and the user chooses the menu config option, confs.Combo will be null and cause a segfault */ +#define ConfPlugin(src, confs, plugin, name, parent) { \ + void *drv; \ + src conf; \ + gchar *filename; \ + \ + GetComboText(confs.Combo, confs.plist, plugin); \ + filename = g_build_filename (getenv("HOME"), PLUGINS_DIR, plugin, NULL); \ + /*printf("Configuring plugin %s\n", filename);*/ \ + drv = SysLoadLibrary(filename); \ + if (drv == NULL) {printf("Error with file %s\n", filename);return; } \ +\ + while (gtk_events_pending()) gtk_main_iteration(); \ + conf = (src) SysLoadSym(drv, name); \ + if (conf) { \ + conf(); \ + } else \ + SysInfoMessage (_("No configuration required"), _("This plugin doesn't need to be configured.")); \ + SysCloseLibrary(drv); \ + g_free (filename); \ +} + +static void on_configure_plugin(GtkWidget *widget, gpointer user_data) { + gint plugin_type = (int) user_data; + + while (gtk_events_pending()) + gtk_main_iteration(); + if (all_config_set() == TRUE) { + switch (plugin_type) { + case PSE_LT_GPU: + ConfPlugin(GPUconfigure, GpuConfS, Config.Gpu, "GPUconfigure", ConfDlg); + break; + case PSE_LT_SPU: + ConfPlugin(SPUconfigure, SpuConfS, Config.Spu, "SPUconfigure", ConfDlg); + break; + case PSE_LT_CDR: + ConfPlugin(CDRconfigure, CdrConfS, Config.Cdr, "CDRconfigure", ConfDlg); + break; + } + } else + ConfigurePlugins(); +} + +static void on_about_plugin(GtkWidget *widget, gpointer user_data) { + gint plugin_type = (int) user_data; + + while (gtk_events_pending()) + gtk_main_iteration(); + if (all_config_set() == TRUE) { + switch (plugin_type) { + case PSE_LT_GPU: + ConfPlugin(GPUconfigure, GpuConfS, Config.Gpu, "GPUabout", ConfDlg); + break; + case PSE_LT_SPU: + ConfPlugin(SPUconfigure, SpuConfS, Config.Spu, "SPUabout", ConfDlg); + break; + case PSE_LT_CDR: + ConfPlugin(CDRconfigure, CdrConfS, Config.Cdr, "CDRabout", ConfDlg); + break; + } + } else + ConfigurePlugins(); +} + +static void OnConfConf_Pad1About(GtkWidget *widget, gpointer user_data) { + ConfPlugin(PADabout, Pad1ConfS, Config.Pad1, "PADabout", ConfDlg); +} + +static void OnConfConf_Pad2About(GtkWidget *widget, gpointer user_data) { + ConfPlugin(PADabout, Pad2ConfS, Config.Pad2, "PADabout", ConfDlg); +} + +static void OnConfConf_Pad1Conf(GtkWidget *widget, gpointer user_data) { + ConfPlugin(PADabout, Pad1ConfS, Config.Pad1, "PADconfigure", ConfDlg); +} + +static void OnConfConf_Pad2Conf(GtkWidget *widget, gpointer user_data) { + ConfPlugin(PADabout, Pad2ConfS, Config.Pad2, "PADconfigure", ConfDlg); +} + +static void OnNet_Conf(GtkWidget *widget, gpointer user_data) { + ConfPlugin(NETconfigure, NetConfS, Config.Net, "NETconfigure", NetDlg); +} + +static void OnNet_About(GtkWidget *widget, gpointer user_data) { + ConfPlugin(NETabout, NetConfS, Config.Net, "NETabout", NetDlg); +} + +static void OnPluginPath_Changed(GtkWidget *wdg, gpointer data) { + gchar *path; + + path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (wdg)); + strcpy(Config.PluginsDir, path); + UpdatePluginsBIOS(); + UpdatePluginsBIOS_UpdateGUI(data); + + g_free(path); +} + +static void OnBiosPath_Changed(GtkWidget *wdg, gpointer data) { + gchar *foldername; + + foldername = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (wdg)); + strcpy(Config.BiosDir, foldername); + + UpdatePluginsBIOS(); + UpdatePluginsBIOS_UpdateGUI(data); + + g_free(foldername); +} + +void OnConf_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) { + GetComboText(GpuConfS.Combo, GpuConfS.plist, Config.Gpu); + GetComboText(SpuConfS.Combo, SpuConfS.plist, Config.Spu); + GetComboText(CdrConfS.Combo, CdrConfS.plist, Config.Cdr); + GetComboText(Pad1ConfS.Combo, Pad1ConfS.plist, Config.Pad1); + GetComboText(Pad2ConfS.Combo, Pad2ConfS.plist, Config.Pad2); + GetComboText(BiosConfS.Combo, BiosConfS.plist, Config.Bios); + + SaveConfig(); + + gtk_widget_destroy(ConfDlg); + ConfDlg = NULL; +} + +#define ComboAddPlugin(type) { \ + type##ConfS.plugins += 2; \ + strcpy(type##ConfS.plist[type##ConfS.plugins - 1], name); \ + strcpy(type##ConfS.plist[type##ConfS.plugins - 2], ent->d_name); \ + type##ConfS.glist = g_list_append(type##ConfS.glist, type##ConfS.plist[type##ConfS.plugins-1]); \ +} + +void populate_combo_box(GtkWidget *widget, GList *list) { + GtkListStore *store; + GtkCellRenderer *renderer; + store = gtk_list_store_new(1, G_TYPE_STRING); + + // Clear existing data from combo box + gtk_cell_layout_clear(GTK_CELL_LAYOUT(widget)); + + renderer = gtk_cell_renderer_text_new(); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(widget), renderer, FALSE); + gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(widget), renderer, "text", 0); + + while (list != NULL) { + GtkTreeIter iter; + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, (char *)list->data, -1); + list = list->next; + } + + gtk_combo_box_set_model(GTK_COMBO_BOX(widget), GTK_TREE_MODEL(store)); +} + +#define ConfCreatePConf(name, type) \ + /* Populate the relevant combo widget with the list of plugins. \ + If no plugins available, disable the combo and its controls. \ + Note that the Bios plugin has no About/Conf control. */ \ + type##ConfS.Combo = glade_xml_get_widget(xml, "GtkCombo_" name); \ + if (type##ConfS.glist != NULL) { \ + populate_combo_box (type##ConfS.Combo, type##ConfS.glist); \ + FindComboText(type##ConfS.Combo, type##ConfS.plist, Config.type); \ + gtk_widget_set_sensitive (type##ConfS.Combo, TRUE); \ + if (g_ascii_strcasecmp (name, "Bios") != 0) { \ + controlwidget = glade_xml_get_widget(xml, "btn_Conf" name); \ + gtk_widget_set_sensitive (controlwidget, TRUE); \ + controlwidget = glade_xml_get_widget(xml, "btn_About" name); \ + gtk_widget_set_sensitive (controlwidget, TRUE); \ + } \ + } else { \ + if (g_ascii_strcasecmp (name, "Bios") != 0) { \ + gtk_cell_layout_clear (GTK_CELL_LAYOUT (type##ConfS.Combo)); \ + gtk_widget_set_sensitive (type##ConfS.Combo, FALSE); \ + controlwidget = glade_xml_get_widget(xml, "btn_Conf" name); \ + gtk_widget_set_sensitive (controlwidget, FALSE); \ + controlwidget = glade_xml_get_widget(xml, "btn_About" name); \ + gtk_widget_set_sensitive (controlwidget, FALSE); \ + } \ + } + +int plugin_is_available(gchar *plugin) { + int retval; + gchar *pluginfile; + struct stat stbuf; + + pluginfile = g_strconcat(getenv("HOME"), PLUGINS_DIR, plugin, NULL); + + if (stat(pluginfile, &stbuf) == -1) + retval = FALSE; + else + retval = TRUE; + + g_free(pluginfile); + + return retval; +} + +int plugins_configured() { + // make sure there are choices for all of the plugins!! + if (all_config_set() == FALSE) + return FALSE; + + // and make sure they can all be accessed + // if they can't be, wipe the variable and return FALSE + if (plugin_is_available (Config.Gpu) == FALSE) { Config.Gpu[0] = '\0'; return FALSE; } + if (plugin_is_available (Config.Spu) == FALSE) { Config.Spu[0] = '\0'; return FALSE; } + if (plugin_is_available (Config.Cdr) == FALSE) { Config.Cdr[0] = '\0'; return FALSE; } + if (plugin_is_available (Config.Pad1) == FALSE) { Config.Pad1[0] = '\0'; return FALSE; } + if (plugin_is_available (Config.Pad2) == FALSE) { Config.Pad2[0] = '\0'; return FALSE; } + + // if everything is happy, return TRUE + return TRUE; +} + +int is_valid_bios_file(gchar *filename) { + int valid; + struct stat buf; + + if ((stat(filename, &buf) == -1) || (buf.st_size != (1024*512))) + valid = FALSE; + else { + valid = TRUE; + } + + return valid; +} + +// Add the name of the BIOS file to the drop-down list. This will +// be the filename, not the full path to the file +void add_bios_to_list(gchar *bios_name, gchar *internal_name) { + BiosConfS.plugins += 2; + strcpy(BiosConfS.plist[BiosConfS.plugins - 1], bios_name); + strcpy(BiosConfS.plist[BiosConfS.plugins - 2], internal_name); + BiosConfS.glist = g_list_append(BiosConfS.glist, BiosConfS.plist[BiosConfS.plugins - 1]); +} + +void scan_bios_dir(gchar *dirname) { + DIR *dir; + struct dirent *ent; + gchar *filename; + + dir = opendir(dirname); + if (dir == NULL) { + SysMessage(_("Could not open BIOS directory: '%s'\n"), dirname); + return; + } + + while ((ent = readdir(dir)) != NULL) { + filename = g_build_filename(dirname, ent->d_name, NULL); + if (is_valid_bios_file(filename)) + add_bios_to_list(g_path_get_basename(filename), g_path_get_basename (filename)); + g_free(filename); + } + closedir(dir); +} + +void UpdatePluginsBIOS() { + DIR *dir; + struct dirent *ent; + void *Handle; + char name[256]; + gchar *linkname; + + GpuConfS.plugins = 0; SpuConfS.plugins = 0; CdrConfS.plugins = 0; + Pad1ConfS.plugins = 0; Pad2ConfS.plugins = 0; BiosConfS.plugins = 0; + GpuConfS.glist = NULL; SpuConfS.glist = NULL; CdrConfS.glist = NULL; + Pad1ConfS.glist = NULL; Pad2ConfS.glist = NULL; BiosConfS.glist = NULL; + GpuConfS.plist[0][0] = '\0'; SpuConfS.plist[0][0] = '\0'; CdrConfS.plist[0][0] = '\0'; + Pad1ConfS.plist[0][0] = '\0'; Pad2ConfS.plist[0][0] = '\0'; BiosConfS.plist[0][0] = '\0'; + + // Load and get plugin info + dir = opendir(Config.PluginsDir); + if (dir == NULL) { + printf(_("Could not open directory: '%s'\n"), Config.PluginsDir); + return; + } + while ((ent = readdir(dir)) != NULL) { + long type, v; + linkname = g_build_filename(Config.PluginsDir, ent->d_name, NULL); + + // only libraries past this point, not config tools + if (strstr(linkname, ".so") == NULL && strstr(linkname, ".dylib") == NULL) + continue; + + Handle = dlopen(linkname, RTLD_NOW); + if (Handle == NULL) { + printf("%s\n", dlerror()); + g_free(linkname); + continue; + } + + PSE_getLibType = (PSEgetLibType)dlsym(Handle, "PSEgetLibType"); + if (PSE_getLibType == NULL) { + if (strstr(linkname, "gpu") != NULL) type = PSE_LT_GPU; + else if (strstr(linkname, "cdr") != NULL) type = PSE_LT_CDR; + else if (strstr(linkname, "spu") != NULL) type = PSE_LT_SPU; + else if (strstr(linkname, "pad") != NULL) type = PSE_LT_PAD; + else { g_free(linkname); continue; } + } + else type = PSE_getLibType(); + + PSE_getLibName = (PSEgetLibName) dlsym(Handle, "PSEgetLibName"); + if (PSE_getLibName != NULL) { + sprintf(name, "%s", PSE_getLibName()); + PSE_getLibVersion = (PSEgetLibVersion) dlsym(Handle, "PSEgetLibVersion"); + if (PSE_getLibVersion != NULL) { + char ver[32]; + + v = PSE_getLibVersion(); + sprintf(ver, " %ld.%ld.%ld", v >> 16, (v >> 8) & 0xff, v & 0xff); + strcat(name, ver); + } + } + else strcpy(name, ent->d_name); + + if (type & PSE_LT_CDR) + ComboAddPlugin(Cdr); + if (type & PSE_LT_GPU) + ComboAddPlugin(Gpu); + if (type & PSE_LT_SPU) + ComboAddPlugin(Spu); + if (type & PSE_LT_PAD) { + PADquery query = (PADquery)dlsym(Handle, "PADquery"); + if (query() & 0x1) { + ComboAddPlugin(Pad1); + } + if (query() & 0x2) { + ComboAddPlugin(Pad2); + } + } + g_free(linkname); + } + closedir(dir); + + scan_bios_dir(Config.BiosDir); + + // The BIOS list always contains the PCSX internal BIOS + add_bios_to_list(_("Simulate PSX BIOS"), "HLE"); +} + +static void UpdatePluginsBIOS_UpdateGUI(GladeXML *xml) { + // Populate the plugin combo boxes + ConfCreatePConf("Gpu", Gpu); + ConfCreatePConf("Spu", Spu); + ConfCreatePConf("Pad1", Pad1); + ConfCreatePConf("Pad2", Pad2); + ConfCreatePConf("Cdr", Cdr); + ConfCreatePConf("Bios", Bios); +} + +static void FindNetPlugin(GladeXML *xml) { + DIR *dir; + struct dirent *ent; + void *Handle; + char plugin[MAXPATHLEN],name[MAXPATHLEN]; + + NetConfS.plugins = 0; + NetConfS.glist = NULL; + + NetConfS.plugins += 2; + strcpy(NetConfS.plist[NetConfS.plugins - 1], "Disabled"); + strcpy(NetConfS.plist[NetConfS.plugins - 2], "Disabled"); + NetConfS.glist = g_list_append(NetConfS.glist, NetConfS.plist[NetConfS.plugins - 1]); + + dir = opendir(Config.PluginsDir); + if (dir == NULL) + SysMessage(_("Could not open directory: '%s'\n"), Config.PluginsDir); + else { + /* ADB TODO Replace the following with a function */ + while ((ent = readdir(dir)) != NULL) { + long type, v; + + sprintf(plugin, "%s/%s", Config.PluginsDir, ent->d_name); + + if (strstr(plugin, ".so") == NULL && strstr(plugin, ".dylib") == NULL) + continue; + Handle = dlopen(plugin, RTLD_NOW); + if (Handle == NULL) continue; + + PSE_getLibType = (PSEgetLibType) dlsym(Handle, "PSEgetLibType"); + if (PSE_getLibType == NULL) { + if (strstr(plugin, "net") != NULL) type = PSE_LT_NET; + else continue; + } + else type = PSE_getLibType(); + + PSE_getLibName = (PSEgetLibName) dlsym(Handle, "PSEgetLibName"); + if (PSE_getLibName != NULL) { + sprintf(name, "%s", PSE_getLibName()); + PSE_getLibVersion = (PSEgetLibVersion) dlsym(Handle, "PSEgetLibVersion"); + if (PSE_getLibVersion != NULL) { + char ver[32]; + + v = PSE_getLibVersion(); + sprintf(ver, " %ld.%ld.%ld",v>>16,(v>>8)&0xff,v&0xff); + strcat(name, ver); + } + } + else strcpy(name, ent->d_name); + + if (type & PSE_LT_NET) { + ComboAddPlugin(Net); + } + } + closedir(dir); + + ConfCreatePConf("Net", Net); + } +} + +GtkWidget *CpuDlg; +GtkWidget *PsxCombo; +GList *psxglist; +char *psxtypes[] = { + "NTSC", + "PAL" +}; + +// When the auto-detect CPU type is selected, disable the NTSC/PAL selection +static void OnCpu_PsxAutoClicked (GtkWidget *widget, gpointer user_data) { + GtkWidget *combo; + GladeXML *xml = user_data; + combo = glade_xml_get_widget(xml, "GtkCombo_PsxType"); + + gtk_widget_set_sensitive (combo, + !(gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))); +} + +// When the interpreter core is deselected, disable the debugger checkbox +static void OnCpu_CpuClicked(GtkWidget *widget, gpointer user_data) { + GtkWidget *check; + GladeXML *xml = user_data; + check = glade_xml_get_widget(xml, "GtkCheckButton_Dbg"); + + // Debugger is only working with interpreter not recompiler, so let's set it + if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), FALSE); + + gtk_widget_set_sensitive (check, + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))); +} + +void OnCpu_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) { + GtkWidget *widget; + GladeXML *xml = user_data; + int tmp; + long t; + + widget = glade_xml_get_widget(xml, "GtkCombo_PsxType"); + + // If nothing chosen, default to NTSC + tmp = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); + if (tmp == -1) + tmp = PSX_TYPE_NTSC; + + if (!strcmp("NTSC", psxtypes[tmp])) + Config.PsxType = PSX_TYPE_NTSC; + else + Config.PsxType = PSX_TYPE_PAL; + + Config.Xa = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Xa"))); + Config.Sio = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Sio"))); + Config.Mdec = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Mdec"))); + Config.Cdda = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_CDDA"))); + Config.PsxAuto = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_PsxAuto"))); + + t = Config.Debug; + Config.Debug = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Dbg"))); + if (t != Config.Debug) { + if (Config.Debug) StartDebugger(); + else StopDebugger(); + } + + t = Config.Cpu; + Config.Cpu = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Cpu"))); + if (t != Config.Cpu) { + psxCpu->Shutdown(); +#ifdef PSXREC + if (Config.Cpu == CPU_INTERPRETER) { + psxCpu = &psxInt; + } + else psxCpu = &psxRec; +#else + psxCpu = &psxInt; +#endif + if (psxCpu->Init() == -1) { + SysClose(); + exit(1); + } + psxCpu->Reset(); + } + + Config.PsxOut = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_PsxOut"))); + Config.SpuIrq = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_SpuIrq"))); + Config.RCntFix = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_RCntFix"))); + Config.VSyncWA = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_VSyncWA"))); + + SaveConfig(); + + gtk_widget_destroy(CpuDlg); + CpuDlg = NULL; +} + +void OnConf_Cpu() { + GladeXML *xml; + + xml = glade_xml_new(PACKAGE_DATA_DIR "pcsx.glade2", "CpuDlg", NULL); + + if (!xml) { + g_warning("We could not load the interface!"); + return; + } + + CpuDlg = glade_xml_get_widget(xml, "CpuDlg"); + + PsxCombo = glade_xml_get_widget(xml, "GtkCombo_PsxType"); + gtk_combo_box_set_active(GTK_COMBO_BOX (PsxCombo), Config.PsxType); + gtk_widget_set_sensitive(GTK_WIDGET (PsxCombo), !Config.PsxAuto); + + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Xa")), Config.Xa); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Sio")), Config.Sio); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Mdec")), Config.Mdec); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_CDDA")), Config.Cdda); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_PsxAuto")), Config.PsxAuto); + + g_signal_connect_data(GTK_OBJECT(glade_xml_get_widget(xml, "GtkCheckButton_PsxAuto")), "toggled", + GTK_SIGNAL_FUNC(OnCpu_PsxAutoClicked), xml, NULL, G_CONNECT_AFTER); + +#ifdef PSXREC + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "GtkCheckButton_Cpu")), Config.Cpu); + + g_signal_connect_data(GTK_OBJECT(glade_xml_get_widget(xml, "GtkCheckButton_Cpu")), "toggled", + GTK_SIGNAL_FUNC(OnCpu_CpuClicked), xml, NULL, G_CONNECT_AFTER); +#else + Config.Cpu = CPU_INTERPRETER; + + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "GtkCheckButton_Cpu")), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET (glade_xml_get_widget(xml, "GtkCheckButton_Cpu")), FALSE); +#endif + + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "GtkCheckButton_Dbg")), Config.Cpu && Config.Debug); + gtk_widget_set_sensitive(GTK_WIDGET (glade_xml_get_widget(xml, "GtkCheckButton_Dbg")), Config.Cpu); + + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_PsxOut")), Config.PsxOut); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_SpuIrq")), Config.SpuIrq); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_RCntFix")), Config.RCntFix); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_VSyncWA")), Config.VSyncWA); + + // Setup a handler for when Close or Cancel is clicked + g_signal_connect_data(GTK_OBJECT(CpuDlg), "response", + GTK_SIGNAL_FUNC(OnCpu_Clicked), xml, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); +} diff --git a/gui/ConfDlg.h b/gui/ConfDlg.h new file mode 100644 index 00000000..56afc28c --- /dev/null +++ b/gui/ConfDlg.h @@ -0,0 +1,50 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifndef CONFDLG_H +#define CONFDLG_H + +// Helper Functions +void UpdatePluginsBIOS(); + +// Functions Callbacks +void OnConf_Graphics(); +void OnConf_Sound(); +void OnConf_CdRom(); +void OnConf_Pad(); +void OnConf_Cpu(); +void OnConf_Net(); + +void ConfigurePlugins(); + +typedef struct { + GtkWidget *Combo; + GList *glist; + char plist[255][255]; /* TODO Comment this out */ + int plugins; /* TODO Comment this out and replace with glist count */ +} PluginConf; + +extern PluginConf GpuConfS; +extern PluginConf SpuConfS; +extern PluginConf CdrConfS; +extern PluginConf Pad1ConfS; +extern PluginConf Pad2ConfS; +extern PluginConf NetConfS; +extern PluginConf BiosConfS; + +#endif diff --git a/gui/Config.c b/gui/Config.c new file mode 100644 index 00000000..aff4f1ef --- /dev/null +++ b/gui/Config.c @@ -0,0 +1,180 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include + +#include "Linux.h" + +/* TODO escaping/unescaping would be nice, as would maxchars */ +static void GetValue(char *src, char *name, char *outvar) { + char *tmp; + + *outvar = 0; + tmp = strstr(src, name); + if (tmp == NULL) return; + + tmp += strlen(name); + while ((*tmp == ' ') || (*tmp == '=')) tmp++; + + while (*tmp != '\n' && *tmp != 0) + *outvar++ = *tmp++; + + *outvar = 0; + return; +} + +static long GetValuel(char *src, char *name) { + char *tmp = strstr(src, name); + if (tmp != NULL) { + tmp += strlen(name); + while ((*tmp == ' ') || (*tmp == '=')) tmp++; + if (*tmp != '\n') return atol(tmp); + } + return 0; +} + +static boolean GetValueb(char *src, char *name) { + char *tmp = strstr(src, name); + if (tmp != NULL) { + tmp += strlen(name); + while ((*tmp == ' ') || (*tmp == '=')) tmp++; + if (*tmp != '\n') return (atoi(tmp) != 0); + } + return FALSE; +} + +#define SetValue(name, var) \ + fprintf(f, "%s = %s\n", name, var); + +#define SetValuel(name, var) \ + fprintf(f, "%s = %x\n", name, var); + +#define SetValueb(name, var) \ + fprintf(f, "%s = %d\n", name, (var) ? 1 : 0); + +int LoadConfig(PcsxConfig *Conf) { + struct stat buf; + FILE *f; + int size; + char *data; + + /* TODO local var called cfgfile */ + + // Ryan says: use dotdir, dotdir is GOOD + // No giant homedir names + strncpy(cfgfile, getenv("HOME"), 200); + strcat(cfgfile, PCSX_DOT_DIR); + + // proceed to load the cfg file + // append its name + strcat(cfgfile, cfgfile_basename); + + // file is now ~/.pcsx/pcsx.cfg (or whatever cfgfile_basename is) + if (stat(cfgfile, &buf) == -1) { + // the config file doesn't exist! + /* TODO Error checking? */ + printf("Configuration file %s couldn't be found\n", cfgfile); + return -1; + } + + size = buf.st_size; + + /* TODO Error checking for the next two lines, and at least log failures */ + f = fopen(cfgfile, "r"); + if (f == NULL) return -1; + + data = (char *)malloc(size + 1); + if (data == NULL) return -1; + + fread(data, 1, buf.st_size, f); + fclose(f); + + data[size] = '\0'; + + GetValue(data, "Bios", Config.Bios); + GetValue(data, "Gpu", Config.Gpu); + GetValue(data, "Spu", Config.Spu); + GetValue(data, "Cdr", Config.Cdr); + GetValue(data, "Pad1", Config.Pad1); + GetValue(data, "Pad2", Config.Pad2); + GetValue(data, "Net", Config.Net); + GetValue(data, "Mcd1", Config.Mcd1); + GetValue(data, "Mcd2", Config.Mcd2); + GetValue(data, "BiosDir", Config.BiosDir); + GetValue(data, "PluginsDir", Config.PluginsDir); + + Config.Xa = GetValueb(data, "Xa"); + Config.Sio = GetValueb(data, "Sio"); + Config.Mdec = GetValueb(data, "Mdec"); + Config.PsxAuto = GetValueb(data, "PsxAuto"); + Config.Cdda = GetValueb(data, "Cdda"); + Config.Debug = GetValueb(data, "Dbg"); + Config.PsxOut = GetValueb(data, "PsxOut"); + Config.SpuIrq = GetValueb(data, "SpuIrq"); + Config.RCntFix = GetValueb(data, "RCntFix"); + Config.VSyncWA = GetValueb(data, "VSyncWA"); + + Config.Cpu = GetValuel(data, "Cpu"); + Config.PsxType = GetValuel(data, "PsxType"); + + free(data); + + return 0; +} + +void SaveConfig() { + FILE *f; + + /* TODO Error checking for the next two lines, and at least log + failures - suggest a file dialog to specify a new file or + create a new file */ + f = fopen(cfgfile, "w"); + if (f == NULL) return; + + SetValue("Bios", Config.Bios); + SetValue("Gpu", Config.Gpu); + SetValue("Spu", Config.Spu); + SetValue("Cdr", Config.Cdr); + SetValue("Net", Config.Net); + SetValue("Pad1", Config.Pad1); + SetValue("Pad2", Config.Pad2); + SetValue("Mcd1", Config.Mcd1); + SetValue("Mcd2", Config.Mcd2); + SetValue("BiosDir", Config.BiosDir); + SetValue("PluginsDir", Config.PluginsDir); + + SetValueb("Xa", Config.Xa); + SetValueb("Sio", Config.Sio); + SetValueb("Mdec", Config.Mdec); + SetValueb("PsxAuto", Config.PsxAuto); + SetValueb("Cdda", Config.Cdda); + SetValueb("Dbg", Config.Debug); + SetValueb("PsxOut", Config.PsxOut); + SetValueb("SpuIrq", Config.SpuIrq); + SetValueb("RCntFix", Config.RCntFix); + SetValueb("VSyncWA", Config.VSyncWA); + + SetValuel("Cpu", Config.Cpu); + SetValuel("PsxType", Config.PsxType); + + fclose(f); +} diff --git a/gui/DebugMemory.c b/gui/DebugMemory.c new file mode 100644 index 00000000..e001057b --- /dev/null +++ b/gui/DebugMemory.c @@ -0,0 +1,312 @@ +/* Memory Viewer/Dumper for PCSX-Reloaded + * Copyright (C) 2010, Wei Mingzhi . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include "Linux.h" +#include "../libpcsxcore/psxmem.h" +#include + +#define MEMVIEW_MAX_LINES 256 + +static GtkWidget *MemViewDlg = NULL; +static u32 MemViewAddress = 0; + +static void UpdateMemViewDlg() { + s32 start, end; + int i; + char bufaddr[9], bufdata[16][3], buftext[17]; + + GtkListStore *store = gtk_list_store_new(18, G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING); + + GtkTreeIter iter; + GtkWidget *widget; + GladeXML *xml; + + xml = glade_get_widget_tree(MemViewDlg); + + MemViewAddress &= 0x1fffff; + + sprintf(buftext, "%.8X", MemViewAddress | 0x80000000); + widget = glade_xml_get_widget(xml, "entry_address"); + gtk_entry_set_text(GTK_ENTRY(widget), buftext); + + start = MemViewAddress & 0x1ffff0; + end = start + MEMVIEW_MAX_LINES * 16; + + if (end > 0x1fffff) end = 0x1fffff; + + widget = glade_xml_get_widget(xml, "GtkCList_MemView"); + + buftext[16] = '\0'; + + while (start < end) { + sprintf(bufaddr, "%.8X", start | 0x80000000); + + for (i = 0; i < 16; i++) { + buftext[i] = psxMs8(start + i); + sprintf(bufdata[i], "%.2X", (u8)buftext[i]); + if ((u8)buftext[i] < 32 || (u8)buftext[i] >= 127) + buftext[i] = '.'; + } + + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, bufaddr, 1, bufdata[0], + 2, bufdata[1], 3, bufdata[2], 4, bufdata[3], 5, bufdata[4], + 6, bufdata[5], 7, bufdata[6], 8, bufdata[7], 9, bufdata[8], + 10, bufdata[9], 11, bufdata[10], 12, bufdata[11], 13, bufdata[12], + 14, bufdata[13], 15, bufdata[14], 16, bufdata[15], 17, buftext, -1); + + start += 16; + } + + gtk_tree_view_set_model(GTK_TREE_VIEW(widget), GTK_TREE_MODEL(store)); + g_object_unref(G_OBJECT(store)); + gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widget), TRUE); + gtk_widget_show(widget); +} + +static void MemView_Go() { + GtkWidget *widget; + GladeXML *xml; + + xml = glade_get_widget_tree(MemViewDlg); + widget = glade_xml_get_widget(xml, "entry_address"); + + sscanf(gtk_entry_get_text(GTK_ENTRY(widget)), "%x", &MemViewAddress); + + UpdateMemViewDlg(); +} + +static void MemView_Dump() { + GtkWidget *dlg; + GtkWidget *box, *table, *label, *start_edit, *length_edit; + char buf[10]; + + dlg = gtk_dialog_new_with_buttons(_("Memory Dump"), GTK_WINDOW(MemViewDlg), + GTK_DIALOG_MODAL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); + + box = GTK_WIDGET(GTK_DIALOG(dlg)->vbox); + + table = gtk_table_new(2, 2, FALSE); + + label = gtk_label_new(_("Start Address (Hexadecimal):")); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, 0, 0, 5, 5); + gtk_widget_show(label); + + start_edit = gtk_entry_new_with_max_length(8); + sprintf(buf, "%.8X", MemViewAddress | 0x80000000); + gtk_entry_set_text(GTK_ENTRY(start_edit), buf); + gtk_table_attach(GTK_TABLE(table), start_edit, 1, 2, 0, 1, 0, 0, 5, 5); + gtk_widget_show(start_edit); + + label = gtk_label_new(_("Length (Decimal):")); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, 0, 0, 5, 5); + gtk_widget_show(label); + + length_edit = gtk_entry_new(); + gtk_table_attach(GTK_TABLE(table), length_edit, 1, 2, 1, 2, 0, 0, 5, 5); + gtk_widget_show(length_edit); + + gtk_box_pack_start(GTK_BOX(box), table, FALSE, FALSE, 5); + + gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER); + gtk_widget_show_all(dlg); + + if (gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_ACCEPT) { + s32 start = 0, length = 0; + + sscanf(gtk_entry_get_text(GTK_ENTRY(start_edit)), "%x", &start); + sscanf(gtk_entry_get_text(GTK_ENTRY(length_edit)), "%d", &length); + + start &= 0x1fffff; + + if (start + length > 0x1fffff) { + length = 0x1fffff - start; + } + + if (length > 0) { + GtkWidget *file_chooser = gtk_file_chooser_dialog_new(_("Dump to File"), + NULL, GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); + + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser), getenv("HOME")); + + if (gtk_dialog_run(GTK_DIALOG(file_chooser)) == GTK_RESPONSE_ACCEPT) { + gchar *file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser)); + FILE *fp = fopen(file, "wb"); + + if (fp != NULL) { + fwrite(&psxM[start], 1, length, fp); + fclose(fp); + } else { + SysMessage(_("Error writing to %s!"), file); + } + + g_free(file); + } + + gtk_widget_destroy(file_chooser); + } + } + + gtk_widget_destroy(dlg); +} + +static void MemView_Patch() { + GtkWidget *dlg; + GtkWidget *box, *table, *label, *addr_edit, *val_edit; + char buf[10]; + + dlg = gtk_dialog_new_with_buttons(_("Memory Patch"), GTK_WINDOW(MemViewDlg), + GTK_DIALOG_MODAL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); + + box = GTK_WIDGET(GTK_DIALOG(dlg)->vbox); + + table = gtk_table_new(2, 2, FALSE); + + label = gtk_label_new(_("Address (Hexadecimal):")); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, 0, 0, 5, 5); + gtk_widget_show(label); + + addr_edit = gtk_entry_new_with_max_length(8); + sprintf(buf, "%.8X", MemViewAddress | 0x80000000); + gtk_entry_set_text(GTK_ENTRY(addr_edit), buf); + gtk_table_attach(GTK_TABLE(table), addr_edit, 1, 2, 0, 1, 0, 0, 5, 5); + gtk_widget_show(addr_edit); + + label = gtk_label_new(_("Value (Hexa string):")); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, 0, 0, 5, 5); + gtk_widget_show(label); + + val_edit = gtk_entry_new(); + gtk_table_attach(GTK_TABLE(table), val_edit, 1, 2, 1, 2, 0, 0, 5, 5); + gtk_widget_show(val_edit); + + gtk_box_pack_start(GTK_BOX(box), table, FALSE, FALSE, 5); + + gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER); + gtk_widget_show_all(dlg); + + if (gtk_dialog_run(GTK_DIALOG(dlg)) == GTK_RESPONSE_ACCEPT) { + u32 addr = 0xffffffff, val = 0; + const char *p = gtk_entry_get_text(GTK_ENTRY(val_edit)); + int r = strlen(p); + + sscanf(gtk_entry_get_text(GTK_ENTRY(addr_edit)), "%x", &addr); + + if (r > 0 && addr != 0xffffffff) { + addr &= 0x1fffff; + MemViewAddress = addr; + + while (r > 0 && addr <= 0x1fffff) { + sscanf(p, "%2x", &val); + p += 2; + r -= 2; + + while (r > 0 && (*p == '\t' || *p == ' ')) { + p++; + r--; + } + + psxMemWrite8(addr, (u8)val); + addr++; + } + + UpdateMemViewDlg(); + } + } + + gtk_widget_destroy(dlg); +} + +// close the memory viewer window +static void MemView_Close(GtkWidget *widget, gpointer user_data) { + gtk_widget_destroy(MemViewDlg); + MemViewDlg = NULL; +} + +void RunDebugMemoryDialog() { + GladeXML *xml; + GtkWidget *widget; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + PangoFontDescription *pfd; + int i; + + xml = glade_xml_new(PACKAGE_DATA_DIR "pcsx.glade2", "MemViewDlg", NULL); + if (!xml) { + g_warning(_("Error: Glade interface could not be loaded!")); + return; + } + + MemViewDlg = glade_xml_get_widget(xml, "MemViewDlg"); + gtk_window_set_title(GTK_WINDOW(MemViewDlg), _("Memory Viewer")); + + widget = glade_xml_get_widget(xml, "GtkCList_MemView"); + + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Address"), + renderer, "text", 0, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + for (i = 0; i < 16; i++) { + const char *p = "0123456789ABCDEF"; + char buf[2]; + + buf[0] = p[i]; + buf[1] = '\0'; + + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(buf, + renderer, "text", i + 1, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + } + + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Text"), + renderer, "text", 17, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + pfd = pango_font_description_from_string("Bitstream Vera Sans Mono, " + "DejaVu Sans Mono, Liberation Mono, FreeMono, Sans Mono 9"); + gtk_widget_modify_font(widget, pfd); + pango_font_description_free(pfd); + + UpdateMemViewDlg(); + + widget = glade_xml_get_widget(xml, "btn_dump"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(MemView_Dump), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_patch"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(MemView_Patch), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btn_go"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(MemView_Go), xml, NULL, G_CONNECT_AFTER); + + g_signal_connect_data(GTK_OBJECT(MemViewDlg), "response", + GTK_SIGNAL_FUNC(MemView_Close), xml, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); +} diff --git a/gui/DebugMemory.h b/gui/DebugMemory.h new file mode 100644 index 00000000..49673731 --- /dev/null +++ b/gui/DebugMemory.h @@ -0,0 +1,24 @@ +/* Memory Viewer/Dumper for PCSX-Reloaded + * Copyright (C) 2010, Wei Mingzhi . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifndef DEBUGMEMORY_H +#define DEBUGMEMORY_H + +void RunDebugMemoryDialog(); + +#endif diff --git a/gui/Gtk2Gui.c b/gui/Gtk2Gui.c new file mode 100644 index 00000000..89da504f --- /dev/null +++ b/gui/Gtk2Gui.c @@ -0,0 +1,944 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Linux.h" + +#include "../libpcsxcore/plugins.h" +#include "../libpcsxcore/cheat.h" + +#include "MemcardDlg.h" +#include "ConfDlg.h" +#include "DebugMemory.h" +#include "AboutDlg.h" + +// Functions Callbacks +void OnFile_RunCd(); +void OnFile_RunBios(); +void OnFile_RunExe(); +void OnFile_RunImage(); +void OnEmu_Run(); +void OnEmu_Reset(); +void OnEmu_SwitchImage(); +void OnHelp_Help(); +void OnHelp_About(); +void OnDestroy(); +void OnFile_Exit(); + +void on_states_load(GtkWidget *widget, gpointer user_data); +void on_states_load_other(); +void on_states_save(GtkWidget *widget, gpointer user_data); +void on_states_save_other(); + +GtkWidget *Window = NULL; + +int destroy = 0; + +#define MAX_SLOTS 5 + +/* TODO - If MAX_SLOTS changes, need to find a way to automatically set all positions */ +int Slots[MAX_SLOTS] = { -1, -1, -1, -1, -1 }; + +void ResetMenuSlots(GladeXML *xml) { + GtkWidget *widget; + gchar *str; + int i; + + if (CdromId[0] == '\0') { + // disable state saving/loading if no CD is loaded + for (i = 0; i < MAX_SLOTS; i++) { + str = g_strdup_printf("GtkMenuItem_SaveSlot%d", i+1); + widget = glade_xml_get_widget(xml, str); + g_free(str); + + gtk_widget_set_sensitive(widget, FALSE); + + str = g_strdup_printf("GtkMenuItem_LoadSlot%d", i+1); + widget = glade_xml_get_widget(xml, str); + g_free(str); + + gtk_widget_set_sensitive(widget, FALSE); + } + + // also disable certain menu/toolbar items + widget = glade_xml_get_widget(xml, "other1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "other2"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "run1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "reset1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "search1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "SwitchImage"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "memorydump1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "toolbutton_run"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "toolbutton_switchimage"); + gtk_widget_set_sensitive(widget, FALSE); + + widget = glade_xml_get_widget(xml, "statusbar"); + gtk_statusbar_pop(GTK_STATUSBAR(widget), 1); + gtk_statusbar_push(GTK_STATUSBAR(widget), 1, _("Ready")); + } + else { + for (i = 0; i < MAX_SLOTS; i++) { + str = g_strdup_printf("GtkMenuItem_LoadSlot%d", i+1); + widget = glade_xml_get_widget (xml, str); + g_free (str); + + if (Slots[i] == -1) + gtk_widget_set_sensitive(widget, FALSE); + else + gtk_widget_set_sensitive(widget, TRUE); + } + + widget = glade_xml_get_widget(xml, "plugins_bios"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "graphics1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "sound1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "cdrom1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "pad1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "net1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "SwitchImage"); + gtk_widget_set_sensitive(widget, UsingIso()); + widget = glade_xml_get_widget(xml, "toolbutton_switchimage"); + gtk_widget_set_sensitive(widget, UsingIso()); + widget = glade_xml_get_widget(xml, "toolbutton_graphics"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "toolbutton_sound"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "toolbutton_cdrom"); + gtk_widget_set_sensitive(widget, FALSE); + widget = glade_xml_get_widget(xml, "toolbutton_controllers"); + gtk_widget_set_sensitive(widget, FALSE); + + widget = glade_xml_get_widget(xml, "statusbar"); + gtk_statusbar_pop(GTK_STATUSBAR(widget), 1); + gtk_statusbar_push(GTK_STATUSBAR(widget), 1, _("Emulation Paused.")); + } +} + +int match(const char *string, char *pattern) { + int status; + regex_t re; + + if (regcomp(&re, pattern, REG_EXTENDED | REG_NOSUB) != 0) { + return 0; + } + status = regexec(&re, string, (size_t) 0, NULL, 0); + regfree(&re); + if (status != 0) { + return 0; + } + + return 1; +} + +gchar* get_state_filename(int i) { + gchar *state_filename; + char SStateFile[64]; + char trimlabel[33]; + int j; + + strncpy(trimlabel, CdromLabel, 32); + trimlabel[32] = 0; + for (j = 31; j >= 0; j--) + if (trimlabel[j] == ' ') + trimlabel[j] = 0; + else + continue; + + sprintf(SStateFile, "%.32s-%.9s.%3.3d", trimlabel, CdromId, i); + state_filename = g_build_filename (getenv("HOME"), STATES_DIR, SStateFile, NULL); + + return state_filename; +} + +void UpdateMenuSlots() { + gchar *str; + int i; + + for (i = 0; i < MAX_SLOTS; i++) { + str = get_state_filename (i); + Slots[i] = CheckState(str); + g_free (str); + } +} + +void StartGui() { + GladeXML *xml; + GtkWidget *widget; + + /* If a plugin fails, the Window is not NULL, but is not initialised, + so the following causes a segfault + if (Window != NULL) { + gtk_window_present (GTK_WINDOW (Window)); + return; + }*/ + + xml = glade_xml_new(PACKAGE_DATA_DIR "pcsx.glade2", "MainWindow", NULL); + + if (!xml) { + g_warning("We could not load the interface!"); + return; + } + + Window = glade_xml_get_widget(xml, "MainWindow"); + gtk_window_set_title(GTK_WINDOW(Window), "PCSX"); + gtk_window_set_icon_from_file(GTK_WINDOW(Window), PIXMAPDIR "pcsx-icon.png", NULL); + gtk_window_set_default_icon_from_file(PIXMAPDIR "pcsx-icon.png", NULL); + ResetMenuSlots(xml); + + // Set up callbacks + g_signal_connect_data(GTK_OBJECT(Window), "delete-event", + GTK_SIGNAL_FUNC(OnDestroy), xml, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); + + // File menu + widget = glade_xml_get_widget(xml, "RunCd"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnFile_RunCd), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "RunBios"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnFile_RunBios), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "RunExe"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnFile_RunExe), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "RunImage"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnFile_RunImage), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "exit2"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnFile_Exit), NULL, NULL, G_CONNECT_AFTER); + + // States + widget = glade_xml_get_widget(xml, "GtkMenuItem_LoadSlot1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_load), (gpointer) 0, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "GtkMenuItem_LoadSlot2"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_load), (gpointer) 1, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "GtkMenuItem_LoadSlot3"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_load), (gpointer) 2, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "GtkMenuItem_LoadSlot4"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_load), (gpointer) 3, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "GtkMenuItem_LoadSlot5"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_load), (gpointer) 4, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "other1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_load_other), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "GtkMenuItem_SaveSlot1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_save), (gpointer) 0, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "GtkMenuItem_SaveSlot2"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_save), (gpointer) 1, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "GtkMenuItem_SaveSlot3"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_save), (gpointer) 2, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "GtkMenuItem_SaveSlot4"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_save), (gpointer) 3, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "GtkMenuItem_SaveSlot5"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_save), (gpointer) 4, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "other2"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(on_states_save_other), NULL, NULL, G_CONNECT_AFTER); + + // Emulation menu + widget = glade_xml_get_widget(xml, "run1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnEmu_Run), NULL, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "reset1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnEmu_Reset), NULL, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "SwitchImage"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnEmu_SwitchImage), NULL, NULL, G_CONNECT_AFTER); + + // Configuration menu + widget = glade_xml_get_widget(xml, "plugins_bios"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(ConfigurePlugins), NULL, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "graphics1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnConf_Graphics), NULL, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "sound1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnConf_Sound), NULL, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "cdrom1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnConf_CdRom), NULL, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "pad1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnConf_Pad), NULL, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "cpu1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnConf_Cpu), NULL, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "memory_cards1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnConf_Mcds), NULL, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "net1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnConf_Net), NULL, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "memorydump1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(RunDebugMemoryDialog), NULL, NULL, G_CONNECT_AFTER); + + // Cheat menu + widget = glade_xml_get_widget(xml, "browse1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(RunCheatListDialog), NULL, NULL, G_CONNECT_AFTER); + widget = glade_xml_get_widget(xml, "search1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(RunCheatSearchDialog), NULL, NULL, G_CONNECT_AFTER); + + // Help menu + widget = glade_xml_get_widget(xml, "about_pcsx1"); + g_signal_connect_data(GTK_OBJECT(widget), "activate", + GTK_SIGNAL_FUNC(OnHelp_About), NULL, NULL, G_CONNECT_AFTER); + + // Toolbar + widget = glade_xml_get_widget(xml, "toolbutton_runcd"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnFile_RunCd), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "toolbutton_runimage"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnFile_RunImage), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "toolbutton_run"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnEmu_Run), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "toolbutton_switchimage"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnEmu_SwitchImage), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "toolbutton_memcards"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConf_Mcds), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "toolbutton_graphics"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConf_Graphics), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "toolbutton_sound"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConf_Sound), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "toolbutton_cdrom"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConf_CdRom), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "toolbutton_controllers"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConf_Pad), NULL, NULL, G_CONNECT_AFTER); + + gtk_main(); +} + +void OnDestroy() { + if (!destroy) OnFile_Exit(); +} + +void destroy_main_window () { + destroy = 1; + gtk_widget_destroy(Window); + Window = NULL; + destroy = 0; + gtk_main_quit(); + while (gtk_events_pending()) gtk_main_iteration(); +} + +void OnFile_RunExe() { + GtkWidget *file_chooser; + + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + } else { + file_chooser = gtk_file_chooser_dialog_new(_("Select PSX EXE File"), + NULL, GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); + + // Add file filters + GtkFileFilter *exefilter = gtk_file_filter_new (); + gtk_file_filter_add_pattern (exefilter, "*.exe"); + gtk_file_filter_add_pattern (exefilter, "*.psx"); + gtk_file_filter_add_pattern (exefilter, "*.cpe"); + gtk_file_filter_add_pattern (exefilter, "*.EXE"); + gtk_file_filter_add_pattern (exefilter, "*.PSX"); + gtk_file_filter_add_pattern (exefilter, "*.CPE"); + gtk_file_filter_set_name (exefilter, _("PlayStation Executable Files")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_chooser), exefilter); + GtkFileFilter *allfilter = gtk_file_filter_new (); + gtk_file_filter_add_pattern (allfilter, "*"); + gtk_file_filter_set_name (allfilter, _("All Files")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_chooser), allfilter); + + // Set this to the config object and retain it - maybe LastUsedDir + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser), getenv("HOME")); + + if (gtk_dialog_run(GTK_DIALOG(file_chooser)) == GTK_RESPONSE_ACCEPT) { + gchar *file; + + /* TODO Need to validate the file */ + + file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser)); + + gtk_widget_destroy (file_chooser); + destroy_main_window(); + + SetIsoFile(NULL); + LoadPlugins(); + NetOpened = FALSE; + + if (OpenPlugins() == -1) { + g_free(file); + SysRunGui(); + } else { + SysReset(); + + if (Load(file) == 0) { + g_free(file); + psxCpu->Execute(); + } else { + g_free(file); + ClosePlugins(); + SysErrorMessage(_("Not a valid PSX file"), _("The file does not appear to be a valid Playstation executable")); + SysRunGui(); + } + } + } else + gtk_widget_destroy(file_chooser); + } +} + +void OnFile_RunCd() { + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + destroy_main_window(); + + SetIsoFile(NULL); + LoadPlugins(); + NetOpened = FALSE; + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + SysReset(); + + if (CheckCdrom() == -1) { + /* Only check the CD if we are starting the console with a CD */ + ClosePlugins(); + SysErrorMessage (_("CD ROM failed"), _("The CD does not appear to be a valid Playstation CD")); + SysRunGui(); + return; + } + + // Read main executable directly from CDRom and start it + if (LoadCdrom() == -1) { + ClosePlugins(); + SysErrorMessage(_("Could not load CD-ROM!"), _("The CD-ROM could not be loaded")); + SysRunGui(); + } + + psxCpu->Execute(); +} + +void OnFile_RunBios() { + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + if (strcmp(Config.Bios, "HLE") == 0) { + SysErrorMessage (_("Could not run BIOS"), _("Running BIOS is not supported with Internal HLE BIOS.")); + return; + } + + destroy_main_window(); + + SetIsoFile(NULL); + LoadPlugins(); + NetOpened = FALSE; + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + SysReset(); + + CdromId[0] = '\0'; + CdromLabel[0] = '\0'; + + psxCpu->Execute(); +} + +static gchar *Open_Iso_Proc() { + GtkWidget *chooser; + gchar *filename; + GtkFileFilter *psxfilter, *allfilter; + static char current_folder[MAXPATHLEN] = ""; + + chooser = gtk_file_chooser_dialog_new (_("Open PSX Disc Image File"), + NULL, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_OK, + NULL); + + if (current_folder[0] == '\0') { + strcpy(current_folder, getenv("HOME")); + } + + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (chooser), current_folder); + + psxfilter = gtk_file_filter_new(); + gtk_file_filter_add_pattern(psxfilter, "*.bin"); + gtk_file_filter_add_pattern(psxfilter, "*.img"); + gtk_file_filter_add_pattern(psxfilter, "*.mdf"); + gtk_file_filter_add_pattern(psxfilter, "*.iso"); + gtk_file_filter_add_pattern(psxfilter, "*.BIN"); + gtk_file_filter_add_pattern(psxfilter, "*.IMG"); + gtk_file_filter_add_pattern(psxfilter, "*.MDF"); + gtk_file_filter_add_pattern(psxfilter, "*.ISO"); + gtk_file_filter_set_name(psxfilter, _("PSX Image Files (*.bin, *.img, *.mdf, *.iso)")); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (chooser), psxfilter); + + allfilter = gtk_file_filter_new(); + gtk_file_filter_add_pattern(allfilter, "*"); + gtk_file_filter_set_name(allfilter, _("All Files")); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (chooser), allfilter); + + if (gtk_dialog_run(GTK_DIALOG(chooser)) == GTK_RESPONSE_OK) { + gchar *path = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(chooser)); + strcpy(current_folder, path); + g_free(path); + filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (chooser)); + gtk_widget_destroy(GTK_WIDGET(chooser)); + while (gtk_events_pending()) gtk_main_iteration(); + return filename; + } else { + gtk_widget_destroy (GTK_WIDGET(chooser)); + while (gtk_events_pending()) gtk_main_iteration(); + return NULL; + } +} + +void OnFile_RunImage() { + gchar *filename; + + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + filename = Open_Iso_Proc(); + if (filename == NULL) { + return; + } + + destroy_main_window(); + + SetIsoFile(filename); + g_free(filename); + + LoadPlugins(); + NetOpened = FALSE; + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + SysReset(); + + if (CheckCdrom() == -1) { + // Only check the CD if we are starting the console with a CD + ClosePlugins(); + SysErrorMessage (_("CD ROM failed"), _("The CD does not appear to be a valid Playstation CD")); + SysRunGui(); + return; + } + + // Read main executable directly from CDRom and start it + if (LoadCdrom() == -1) { + ClosePlugins(); + SysErrorMessage(_("Could not load CD-ROM!"), _("The CD-ROM could not be loaded")); + SysRunGui(); + } + + psxCpu->Execute(); +} + +void OnEmu_Run() { + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + destroy_main_window(); + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + CheatSearchBackupMemory(); + psxCpu->Execute(); +} + +void OnEmu_Reset() { + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + destroy_main_window(); + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + SysReset(); + + if (CheckCdrom() != -1) { + LoadCdrom(); + } + + psxCpu->Execute(); +} + +void OnEmu_SwitchImage() { + gchar *filename; + + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + filename = Open_Iso_Proc(); + if (filename == NULL) { + return; + } + + destroy_main_window(); + + SetIsoFile(filename); + g_free(filename); + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + SetCdOpenCaseTime(time(NULL) + 2); + + CheatSearchBackupMemory(); + psxCpu->Execute(); +} + +void OnFile_Exit() { + DIR *dir; + struct dirent *ent; + void *Handle; + gchar *plugin = NULL; + gchar *dotdir; + + dotdir = g_build_filename(getenv("HOME"), PLUGINS_DIR, NULL); + + // with this the problem with plugins that are linked with the pthread + // library is solved + + dir = opendir(dotdir); + if (dir != NULL) { + while ((ent = readdir(dir)) != NULL) { + plugin = g_build_filename(dotdir, ent->d_name, NULL); + + if (strstr(plugin, ".so") == NULL && strstr(plugin, ".dylib") == NULL) + continue; + Handle = dlopen(plugin, RTLD_NOW); + if (Handle == NULL) + continue; + + g_free(plugin); + } + } + g_free(dotdir); + + bind_textdomain_codeset(PACKAGE_NAME, ""); + if (UseGui) + gtk_main_quit(); + SysClose(); + if (UseGui) + gtk_exit (0); + else + exit(0); +} + +void state_load(gchar *state_filename) { + int ret; + char Text[MAXPATHLEN + 20]; + FILE *fp; + + // check if the state file actually exists + fp = fopen(state_filename, "rb"); + if (fp == NULL) { + // file does not exist + return; + } + + fclose(fp); + + // If the window exists, then we are loading the state from within + // within the PCSX GUI. We need to initialise the plugins first + if (Window) { + destroy_main_window(); + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + } + + ret = CheckState(state_filename); + + if (ret == 0) { + SysReset(); + ret = LoadState(state_filename); + } + + if (ret == 0) { + // Check the CD-ROM is valid + if (CheckCdrom() == -1) { + ClosePlugins(); + SysRunGui(); + return; + } + + sprintf(Text, _("Loaded state %s."), state_filename); + GPU_displayText(Text); + } else { + sprintf(Text, _("Error loading state %s!"), state_filename); + GPU_displayText(Text); + } +} + +void state_save(gchar *state_filename) { + char Text[MAXPATHLEN + 20]; + + GPU_updateLace(); + + if (SaveState(state_filename) == 0) + sprintf(Text, _("Saved state %s."), state_filename); + else + sprintf(Text, _("Error saving state %s!"), state_filename); + + GPU_displayText(Text); +} + +void on_states_load (GtkWidget *widget, gpointer user_data) { + gchar *state_filename; + gint state = (int)user_data; + + state_filename = get_state_filename(state); + + state_load(state_filename); + + g_free(state_filename); + + psxCpu->Execute(); +} + +void on_states_save (GtkWidget *widget, gpointer user_data) { + gchar *state_filename; + gint state = (int)user_data; + + state_filename = get_state_filename(state); + + state_save(state_filename); + + g_free(state_filename); +} + +void on_states_load_other() { + GtkWidget *file_chooser; + gchar *SStateFile; + + SStateFile = g_strconcat(getenv("HOME"), STATES_DIR, NULL); + + file_chooser = gtk_file_chooser_dialog_new(_("Select State File"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (file_chooser), SStateFile); + g_free(SStateFile); + + if (gtk_dialog_run(GTK_DIALOG(file_chooser)) == GTK_RESPONSE_ACCEPT) { + gchar *filename; + + filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser)); + gtk_widget_destroy(file_chooser); + + state_load(filename); + + g_free(filename); + + psxCpu->Execute(); + } else + gtk_widget_destroy(file_chooser); +} + +void on_states_save_other() { + GtkWidget *file_chooser; + gchar *SStateFile; + + SStateFile = g_strconcat (getenv("HOME"), STATES_DIR, NULL); + + file_chooser = gtk_file_chooser_dialog_new(_("Select State File"), + NULL, GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_SAVE, GTK_RESPONSE_OK, + NULL); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser), SStateFile); + g_free(SStateFile); + + if (gtk_dialog_run (GTK_DIALOG(file_chooser)) == GTK_RESPONSE_OK) { + gchar *filename; + + filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (file_chooser)); + gtk_widget_destroy(file_chooser); + + state_save(filename); + + g_free(filename); + } + else + gtk_widget_destroy(file_chooser); +} + +void OnHelp_About(GtkWidget *widget, gpointer user_data) { + RunAboutDialog(); +} + +void SysMessage(const char *fmt, ...) { + GtkWidget *Txt, *MsgDlg; + va_list list; + char msg[512]; + + va_start(list, fmt); + vsprintf(msg, fmt, list); + va_end(list); + + if (msg[strlen(msg) - 1] == '\n') + msg[strlen(msg) - 1] = 0; + + if (!UseGui) { + fprintf(stderr, "%s\n", msg); + return; + } + + MsgDlg = gtk_dialog_new_with_buttons(_("Notice"), NULL, + GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_NONE, NULL); + + gtk_window_set_position (GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER); + + Txt = gtk_label_new (msg); + gtk_label_set_line_wrap(GTK_LABEL(Txt), TRUE); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG(MsgDlg)->vbox), Txt); + + gtk_widget_show (Txt); + gtk_widget_show_all (MsgDlg); + gtk_dialog_run (GTK_DIALOG(MsgDlg)); + gtk_widget_destroy (MsgDlg); +} + +void SysErrorMessage(gchar *primary, gchar *secondary) { + GtkWidget *message_dialog; + if (!UseGui) + printf ("%s - %s\n", primary, secondary); + else { + message_dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + primary, + NULL); + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(message_dialog), + secondary); + + gtk_dialog_run(GTK_DIALOG(message_dialog)); + gtk_widget_destroy(message_dialog); + } +} + +void SysInfoMessage(gchar *primary, gchar *secondary) { + GtkWidget *message_dialog; + if (!UseGui) + printf ("%s - %s\n", primary, secondary); + else { + message_dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE, + primary, + NULL); + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(message_dialog), + secondary); + + gtk_dialog_run(GTK_DIALOG(message_dialog)); + gtk_widget_destroy(message_dialog); + } +} diff --git a/gui/Linux.h b/gui/Linux.h new file mode 100644 index 00000000..6f0e0c09 --- /dev/null +++ b/gui/Linux.h @@ -0,0 +1,67 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifndef __LINUX_H__ +#define __LINUX_H__ + +#include "config.h" + +#include "../libpcsxcore/psxcommon.h" +#include + +#include "Cheat.h" + +#define DEFAULT_MEM_CARD_1 "/.pcsx/memcards/card1.mcd" +#define DEFAULT_MEM_CARD_2 "/.pcsx/memcards/card2.mcd" +#define MEMCARD_DIR "/.pcsx/memcards/" +#define PLUGINS_DIR "/.pcsx/plugins/" +#define PLUGINS_CFG_DIR "/.pcsx/plugins/cfg/" +#define PCSX_DOT_DIR "/.pcsx/" +#define BIOS_DIR "/.pcsx/bios/" +#define STATES_DIR "/.pcsx/sstates/" +#define CHEATS_DIR "/.pcsx/cheats/" +#define PATCHES_DIR "/.pcsx/patches/" + +extern gboolean UseGui; +extern int StatesC; +char cfgfile[MAXPATHLEN]; /* ADB Comment this out - make a local var, or at least use gchar funcs */ +char cfgfile_basename[MAXPATHLEN]; /* ADB Comment this out - make a local var, or at least use gchar funcs */ + +int LoadConfig(); +void SaveConfig(); + +void StartGui(); + +void PADhandleKey(int key); + +void UpdateMenuSlots(); + +gchar* get_state_filename(int i); + +void state_save(gchar *state_filename); +void state_load(gchar *state_filename); + +int match(const char* string, char* pattern); +int plugins_configured(); + +void UpdatePluginsBIOS(); + +void SysErrorMessage(gchar *primary, gchar *secondary); +void SysInfoMessage(gchar *primary, gchar *secondary); + +#endif /* __LINUX_H__ */ diff --git a/gui/LnxMain.c b/gui/LnxMain.c new file mode 100644 index 00000000..8297a917 --- /dev/null +++ b/gui/LnxMain.c @@ -0,0 +1,568 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../libpcsxcore/sio.h" + +#include "Linux.h" +#include "ConfDlg.h" + +#ifdef ENABLE_NLS +#include +#endif + +#include + +enum { + RUN = 0, + RUN_CD, +}; + +gboolean UseGui = TRUE; + +static void CreateMemcard(char *filename, char *conf_mcd) { + gchar *mcd; + struct stat buf; + + mcd = g_build_filename(getenv("HOME"), MEMCARD_DIR, filename, NULL); + + strcpy(conf_mcd, mcd); + + /* Only create a memory card if an existing one does not exist */ + if (stat(mcd, &buf) == -1) { + SysPrintf(_("Creating memory card: %s\n"), mcd); + CreateMcd(mcd); + } + + g_free (mcd); +} + +/* Create a directory under the $HOME directory, if that directory doesn't already exist */ +static void CreateHomeConfigDir(char *directory) { + struct stat buf; + + if (stat(directory, &buf) == -1) { + gchar *dir_name = g_build_filename (getenv("HOME"), directory, NULL); + mkdir(dir_name, S_IRWXU | S_IRWXG); + g_free (dir_name); + } +} + +static void CheckSubDir() { + // make sure that ~/.pcsx exists + CreateHomeConfigDir(PCSX_DOT_DIR); + + CreateHomeConfigDir(BIOS_DIR); + CreateHomeConfigDir(MEMCARD_DIR); + CreateHomeConfigDir(STATES_DIR); + CreateHomeConfigDir(PLUGINS_DIR); + CreateHomeConfigDir(PLUGINS_CFG_DIR); + CreateHomeConfigDir(CHEATS_DIR); + CreateHomeConfigDir(PATCHES_DIR); +} + +static void ScanPlugins(gchar* scandir) { + // scan for plugins and configuration tools + DIR *dir; + struct dirent *ent; + + gchar *linkname; + gchar *filename; + + /* Any plugins found will be symlinked to the following directory */ + dir = opendir(scandir); + if (dir != NULL) { + while ((ent = readdir(dir)) != NULL) { + filename = g_build_filename (scandir, ent->d_name, NULL); + + if (match(filename, ".*\\.so$") == 0 && + match(filename, ".*\\.dylib$") == 0 && + match(filename, "cfg.*") == 0) { + continue; /* Skip this file */ + } else { + /* Create a symlink from this file to the directory ~/.pcsx/plugin */ + linkname = g_build_filename (getenv("HOME"), PLUGINS_DIR, ent->d_name, NULL); + symlink(filename, linkname); + + /* If it's a config tool, make one in the cfg dir as well. + This allows plugins with retarded cfg finding to work :- ) */ + if (match(filename, "cfg.*") == 1) { + linkname = g_build_filename (getenv("HOME"), PLUGINS_CFG_DIR, ent->d_name, NULL); + symlink(filename, linkname); + } + g_free (linkname); + } + g_free (filename); + } + closedir(dir); + } +} + +static void ScanBios(gchar* scandir) { + // scan for bioses + DIR *dir; + struct dirent *ent; + + gchar *linkname; + gchar *filename; + + /* Any bioses found will be symlinked to the following directory */ + dir = opendir(scandir); + if (dir != NULL) { + while ((ent = readdir(dir)) != NULL) { + filename = g_build_filename(scandir, ent->d_name, NULL); + + if (match(filename, ".*\\.bin$") == 0 && + match(filename, ".*\\.BIN$") == 0) { + continue; /* Skip this file */ + } else { + /* Create a symlink from this file to the directory ~/.pcsx/plugin */ + linkname = g_build_filename(getenv("HOME"), BIOS_DIR, ent->d_name, NULL); + symlink(filename, linkname); + + g_free(linkname); + } + g_free(filename); + } + closedir(dir); + } +} + +static void CheckSymlinksInPath(char* dotdir) { + DIR *dir; + struct dirent *ent; + struct stat stbuf; + gchar *linkname; + + dir = opendir(dotdir); + if (dir == NULL) { + SysMessage(_("Could not open directory: '%s'\n"), dotdir); + return; + } + + /* Check for any bad links in the directory. If the remote + file no longer exists, remove the link */ + while ((ent = readdir(dir)) != NULL) { + linkname = g_strconcat (dotdir, ent->d_name, NULL); + + if (stat(linkname, &stbuf) == -1) { + /* File link is bad, remove it */ + unlink(linkname); + } + g_free (linkname); + } + closedir(dir); +} + +static void ScanAllPlugins (void) { + gchar *currentdir; + + // scan some default locations to find plugins + ScanPlugins("/usr/lib/games/psemu/"); + ScanPlugins("/usr/lib/games/psemu/lib/"); + ScanPlugins("/usr/lib/games/psemu/config/"); + ScanPlugins("/usr/local/lib/games/psemu/lib/"); + ScanPlugins("/usr/local/lib/games/psemu/config/"); + ScanPlugins("/usr/local/lib/games/psemu/"); + ScanPlugins("/usr/lib64/games/psemu/"); + ScanPlugins("/usr/lib64/games/psemu/lib/"); + ScanPlugins("/usr/lib64/games/psemu/config/"); + ScanPlugins("/usr/local/lib64/games/psemu/lib/"); + ScanPlugins("/usr/local/lib64/games/psemu/config/"); + ScanPlugins("/usr/local/lib64/games/psemu/"); + ScanPlugins("/usr/lib32/games/psemu/"); + ScanPlugins("/usr/lib32/games/psemu/lib/"); + ScanPlugins("/usr/lib32/games/psemu/config/"); + ScanPlugins("/usr/local/lib32/games/psemu/lib/"); + ScanPlugins("/usr/local/lib32/games/psemu/config/"); + ScanPlugins("/usr/local/lib32/games/psemu/"); + ScanPlugins(DEF_PLUGIN_DIR); + ScanPlugins(DEF_PLUGIN_DIR "/lib"); + ScanPlugins(DEF_PLUGIN_DIR "/lib64"); + ScanPlugins(DEF_PLUGIN_DIR "/lib32"); + ScanPlugins(DEF_PLUGIN_DIR "/config"); + + // scan some default locations to find bioses + ScanBios("/usr/lib/games/psemu"); + ScanBios("/usr/lib/games/psemu/bios"); + ScanBios("/usr/lib64/games/psemu"); + ScanBios("/usr/lib64/games/psemu/bios"); + ScanBios("/usr/lib32/games/psemu"); + ScanBios("/usr/lib32/games/psemu/bios"); + ScanBios("/usr/share/psemu"); + ScanBios("/usr/share/psemu/bios"); + ScanBios("/usr/share/pcsx"); + ScanBios("/usr/share/pcsx/bios"); + ScanBios("/usr/local/lib/games/psemu"); + ScanBios("/usr/local/lib/games/psemu/bios"); + ScanBios("/usr/local/lib64/games/psemu"); + ScanBios("/usr/local/lib64/games/psemu/bios"); + ScanBios("/usr/local/lib32/games/psemu"); + ScanBios("/usr/local/lib32/games/psemu/bios"); + ScanBios("/usr/local/share/psemu"); + ScanBios("/usr/local/share/psemu/bios"); + ScanBios("/usr/local/share/pcsx"); + ScanBios("/usr/local/share/pcsx/bios"); + ScanBios(PACKAGE_DATA_DIR); + ScanBios(PSEMU_DATA_DIR); + ScanBios(PACKAGE_DATA_DIR "/bios"); + ScanBios(PSEMU_DATA_DIR "/bios"); + + currentdir = g_strconcat(getenv("HOME"), "/.psemu-plugins/", NULL); + ScanPlugins(currentdir); + g_free(currentdir); + + currentdir = g_strconcat(getenv("HOME"), "/.psemu/", NULL); + ScanPlugins(currentdir); + g_free(currentdir); + + // Check for bad links in ~/.pcsx/plugins/ + currentdir = g_build_filename(getenv("HOME"), PLUGINS_DIR, NULL); + CheckSymlinksInPath(currentdir); + g_free(currentdir); + + // Check for bad links in ~/.pcsx/plugins/cfg + currentdir = g_build_filename(getenv("HOME"), PLUGINS_CFG_DIR, NULL); + CheckSymlinksInPath(currentdir); + g_free(currentdir); + + // Check for bad links in ~/.pcsx/bios + currentdir = g_build_filename(getenv("HOME"), BIOS_DIR, NULL); + CheckSymlinksInPath(currentdir); + g_free(currentdir); +} + +// Set the default plugin name +void set_default_plugin(char *plugin_name, char *conf_plugin_name) { + if (strlen(plugin_name) != 0) { + strcpy(conf_plugin_name, plugin_name); + printf("Picking default plugin: %s\n", plugin_name); + } else + printf("No default plugin could be found for %s\n", conf_plugin_name); +} + +int main(int argc, char *argv[]) { + char file[MAXPATHLEN] = ""; + char path[MAXPATHLEN]; + int runcd = RUN; + int loadst = 0; + int i; + +#ifdef ENABLE_NLS + setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + + // what is the name of the config file? + // it may be redefined by -cfg on the command line + strcpy(cfgfile_basename, "pcsx.cfg"); + + // read command line options + for (i = 1; i < argc; i++) { + if (!strcmp(argv[i], "-runcd")) runcd = RUN_CD; + else if (!strcmp(argv[i], "-nogui")) UseGui = FALSE; + else if (!strcmp(argv[i], "-psxout")) Config.PsxOut = 1; + else if (!strcmp(argv[i], "-load")) loadst = atol(argv[++i]); + else if (!strcmp(argv[i], "-cfg")) { + if (i+1 >= argc) break; + strncpy(cfgfile_basename, argv[++i], MAXPATHLEN-100); /* TODO buffer overruns */ + printf("Using config file %s.\n", cfgfile_basename); + } + else if (!strcmp(argv[i], "-cdfile")) { + char isofilename[MAXPATHLEN]; + + if (i+1 >= argc) break; + strncpy(isofilename, argv[++i], MAXPATHLEN); + if (isofilename[0] != '/') { + getcwd(path, MAXPATHLEN); + if (strlen(path) + strlen(isofilename) + 1 < MAXPATHLEN) { + strcat(path, "/"); + strcat(path, isofilename); + strcpy(isofilename, path); + } else + isofilename[0] = 0; + } + + SetIsoFile(isofilename); + runcd = RUN_CD; + } + else if (!strcmp(argv[i], "-h") || + !strcmp(argv[i], "-help") || + !strcmp(argv[i], "--help")) { + printf(PACKAGE_STRING "\n"); + printf("%s\n", _( + " pcsx [options] [file]\n" + "\toptions:\n" + "\t-runcd\t\tRuns CD-ROM\n" + "\t-cdfile FILE\tRuns a CD image file\n" + "\t-nogui\t\tDon't open the GTK GUI\n" + "\t-cfg FILE\tLoads desired configuration file (default: ~/.pcsx/pcsx.cfg)\n" + "\t-psxout\t\tEnable PSX output\n" + "\t-load STATENUM\tLoads savestate STATENUM (1-5)\n" + "\t-h -help\tDisplay this message\n" + "\tfile\t\tLoads file\n")); + return 0; + } else { + strncpy(file, argv[i], MAXPATHLEN); + if (file[0] != '/') { + getcwd(path, MAXPATHLEN); + if (strlen(path) + strlen(file) + 1 < MAXPATHLEN) { + strcat(path, "/"); + strcat(path, file); + strcpy(file, path); + } else + file[0] = 0; + } + } + } + + memset(&Config, 0, sizeof(PcsxConfig)); + strcpy(Config.Net, "Disabled"); + + if (UseGui) gtk_init(NULL, NULL); + + CheckSubDir(); + ScanAllPlugins(); + + // try to load config + // if the config file doesn't exist + if (LoadConfig() == -1) { + if (!UseGui) { + printf(_("PCSX cannot be configured without using the GUI -- you should restart without -nogui.\n")); + return 1; + } + + // Uh oh, no config file found, use some defaults + Config.PsxAuto = 1; + + gchar *str_bios_dir = g_strconcat(getenv("HOME"), BIOS_DIR, NULL); + strcpy(Config.BiosDir, str_bios_dir); + g_free(str_bios_dir); + + gchar *str_plugin_dir = g_strconcat(getenv("HOME"), PLUGINS_DIR, NULL); + strcpy(Config.PluginsDir, str_plugin_dir); + g_free(str_plugin_dir); + + gtk_init(NULL, NULL); + + // Update available plugins, but not GUI + UpdatePluginsBIOS(); + + // Pick some defaults, if they're available + set_default_plugin(GpuConfS.plist[0], Config.Gpu); + set_default_plugin(SpuConfS.plist[0], Config.Spu); + set_default_plugin(CdrConfS.plist[0], Config.Cdr); + set_default_plugin(Pad1ConfS.plist[0], Config.Pad1); + set_default_plugin(Pad2ConfS.plist[0], Config.Pad2); + set_default_plugin(BiosConfS.plist[0], Config.Bios); + + // create & load default memcards if they don't exist + CreateMemcard("card1.mcd", Config.Mcd1); + CreateMemcard("card2.mcd", Config.Mcd2); + + LoadMcds(Config.Mcd1, Config.Mcd2); + + SaveConfig(); + } + + gchar *str_patches_dir = g_strconcat(getenv("HOME"), PATCHES_DIR, NULL); + strcpy(Config.PatchesDir, str_patches_dir); + g_free(str_patches_dir); + + // switch to plugin dotdir + // this lets plugins work without modification! + gchar *plugin_default_dir = g_build_filename(getenv("HOME"), PLUGINS_DIR, NULL); + chdir(plugin_default_dir); + g_free(plugin_default_dir); + + if (UseGui) SetIsoFile(NULL); + + if (SysInit() == -1) return 1; + + if (UseGui) { + StartGui(); + } else { + // the following only occurs if the gui isn't started + if (LoadPlugins() == -1) { + SysErrorMessage(_("Error"), _("Failed loading plugins!")); + return 1; + } + + if (OpenPlugins() == -1 || plugins_configured() == FALSE) { + return 1; + } + + SysReset(); + CheckCdrom(); + + if (file[0] != '\0') { + Load(file); + } else { + if (runcd == RUN_CD) { + if (LoadCdrom() == -1) { + ClosePlugins(); + printf(_("Could not load CD-ROM!\n")); + return -1; + } + } + } + + // If a state has been specified, then load that + if (loadst) { + StatesC = loadst - 1; + gchar *state_filename = get_state_filename(StatesC); + LoadState(state_filename); + g_free(state_filename); + } + + psxCpu->Execute(); + } + + return 0; +} + +int SysInit() { +#ifdef EMU_LOG +#ifndef LOG_STDOUT + emuLog = fopen("emuLog.txt","wb"); +#else + emuLog = stdout; +#endif + setvbuf(emuLog, NULL, _IONBF, 0); +#endif + + if (EmuInit() == -1) { + printf(_("PSX emulator couldn't be initialized.\n")); + return -1; + } + + LoadMcds(Config.Mcd1, Config.Mcd2); /* TODO Do we need to have this here, or in the calling main() function?? */ + + if (Config.Debug) { + StartDebugger(); + } + + return 0; +} + +void SysReset() { + EmuReset(); +} + +void SysClose() { + EmuShutdown(); + ReleasePlugins(); + + StopDebugger(); + + if (emuLog != NULL) fclose(emuLog); +} + +void SysPrintf(const char *fmt, ...) { + va_list list; + char msg[512]; + + va_start(list, fmt); + vsprintf(msg, fmt, list); + va_end(list); + + if (Config.PsxOut) { + static char linestart = 1; + int l = strlen(msg); + + printf(linestart ? " * %s" : "%s", msg); + + if (l > 0 && msg[l - 1] == '\n') { + linestart = 1; + } else { + linestart = 0; + } + } + +#ifdef EMU_LOG +#ifndef LOG_STDOUT + fprintf(emuLog, "%s", msg); +#endif +#endif +} + +void *SysLoadLibrary(const char *lib) { + return dlopen(lib, RTLD_NOW); +} + +void *SysLoadSym(void *lib, const char *sym) { + return dlsym(lib, sym); +} + +const char *SysLibError() { + return dlerror(); +} + +void SysCloseLibrary(void *lib) { + dlclose(lib); +} + +static void SysDisableScreenSaver() { + static time_t fake_key_timer = 0; + static char first_time = 1, has_test_ext = 0, t = 1; + Display *display; + extern unsigned long gpuDisp; + + display = (Display *)gpuDisp; + + if (first_time) { + // check if xtest is available + int a, b, c, d; + has_test_ext = XTestQueryExtension(display, &a, &b, &c, &d); + + first_time = 0; + } + + if (has_test_ext && fake_key_timer < time(NULL)) { + XTestFakeRelativeMotionEvent(display, t *= -1, 0, 0); + fake_key_timer = time(NULL) + 55; + } +} + +void SysUpdate() { + PADhandleKey(PAD1_keypressed()); + PADhandleKey(PAD2_keypressed()); + + SysDisableScreenSaver(); +} + +/* ADB TODO Replace RunGui() with StartGui ()*/ +void SysRunGui() { + StartGui(); +} diff --git a/gui/Makefile.am b/gui/Makefile.am new file mode 100644 index 00000000..50e9e8f3 --- /dev/null +++ b/gui/Makefile.am @@ -0,0 +1,24 @@ +INCLUDES = -DPACKAGE_DATA_DIR=\"${datadir}/pcsx/\" \ + -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) \ + -I$(top_srcdir)/libpcsxcore -I$(top_srcdir)/include \ + -DPSEMU_DATA_DIR=\"${datadir}/psemu\" \ + -DDEF_PLUGIN_DIR=\"${libdir}/games/psemu\" + +bin_PROGRAMS = pcsx + +pcsx_SOURCES = \ + LnxMain.c \ + Plugin.c \ + Config.c \ + Gtk2Gui.c \ + MemcardDlg.c \ + ConfDlg.c \ + Cheat.c \ + DebugMemory.c \ + AboutDlg.c + +pcsx_LDADD = \ + $(GTK2_LIBS) $(GLADE2_LIBS) -lpthread -lz -lm -lXext -lXtst \ + ../libpcsxcore/libpcsxcore.a diff --git a/gui/Makefile.in b/gui/Makefile.in new file mode 100644 index 00000000..53ee8c08 --- /dev/null +++ b/gui/Makefile.in @@ -0,0 +1,538 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = pcsx$(EXEEXT) +subdir = gui +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_pcsx_OBJECTS = LnxMain.$(OBJEXT) Plugin.$(OBJEXT) Config.$(OBJEXT) \ + Gtk2Gui.$(OBJEXT) MemcardDlg.$(OBJEXT) ConfDlg.$(OBJEXT) \ + Cheat.$(OBJEXT) DebugMemory.$(OBJEXT) AboutDlg.$(OBJEXT) +pcsx_OBJECTS = $(am_pcsx_OBJECTS) +am__DEPENDENCIES_1 = +pcsx_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + ../libpcsxcore/libpcsxcore.a +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(pcsx_SOURCES) +DIST_SOURCES = $(pcsx_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -DPACKAGE_DATA_DIR=\"${datadir}/pcsx/\" \ + -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) \ + -I$(top_srcdir)/libpcsxcore -I$(top_srcdir)/include \ + -DPSEMU_DATA_DIR=\"${datadir}/psemu\" \ + -DDEF_PLUGIN_DIR=\"${libdir}/games/psemu\" + +pcsx_SOURCES = \ + LnxMain.c \ + Plugin.c \ + Config.c \ + Gtk2Gui.c \ + MemcardDlg.c \ + ConfDlg.c \ + Cheat.c \ + DebugMemory.c \ + AboutDlg.c + +pcsx_LDADD = \ + $(GTK2_LIBS) $(GLADE2_LIBS) -lpthread -lz -lm -lXext -lXtst \ + ../libpcsxcore/libpcsxcore.a + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gui/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu gui/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +pcsx$(EXEEXT): $(pcsx_OBJECTS) $(pcsx_DEPENDENCIES) + @rm -f pcsx$(EXEEXT) + $(LINK) $(pcsx_OBJECTS) $(pcsx_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AboutDlg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cheat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ConfDlg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Config.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DebugMemory.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Gtk2Gui.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LnxMain.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MemcardDlg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Plugin.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gui/MemcardDlg.c b/gui/MemcardDlg.c new file mode 100644 index 00000000..31ec6922 --- /dev/null +++ b/gui/MemcardDlg.c @@ -0,0 +1,755 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Linux.h" +#include "../libpcsxcore/sio.h" + +#define MAX_MEMCARD_BLOCKS 15 + +static gboolean quit; +static unsigned int currentIcon; + +McdBlock Blocks[2][MAX_MEMCARD_BLOCKS]; // Assuming 2 cards, 15 blocks? +int IconC[2][MAX_MEMCARD_BLOCKS]; +enum { + CL_ICON, + CL_TITLE, + CL_STAT, + CL_ID, + CL_NAME, + NUM_CL +}; + +GtkWidget *GtkCList_McdList1, *GtkCList_McdList2; + +static void AddColumns(GtkTreeView *treeview) { + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + + // column for icon + renderer = gtk_cell_renderer_pixbuf_new (); + column = gtk_tree_view_column_new_with_attributes(_("Icon"), + renderer, "pixbuf", CL_ICON, NULL); + gtk_tree_view_append_column(treeview, column); + + // column for title + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Title"), + renderer, "text", CL_TITLE, NULL); + gtk_tree_view_append_column(treeview, column); + + // column for status + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Status"), + renderer, "text", CL_STAT, NULL); + gtk_tree_view_append_column(treeview, column); + + // column for id + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("ID"), + renderer, "text", CL_ID, NULL); + gtk_tree_view_append_column(treeview, column); + + // column for Name + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Name"), + renderer, "text", CL_NAME, NULL); + gtk_tree_view_append_column(treeview, column); +} + +static GdkPixbuf *SetIcon(GtkWidget *dialog, short *icon, int i) { + GdkPixmap *pixmap; + GdkImage *image; + GdkVisual *visual; + GdkPixbuf *pixbuf; + GdkGC *gc; + int x, y, c; + + visual = gdk_window_get_visual(dialog->window); + + if (visual->depth == 8) return NULL; + + image = gdk_image_new(GDK_IMAGE_NORMAL, visual, 32, 32); + + for (y = 0; y < 32; y++) { + for (x = 0; x < 32; x++) { + c = icon[(y>>1) * 16 + (x>>1)]; + c = ((c & 0x001f) << 10) | ((c & 0x7c00) >> 10) | (c & 0x03e0); + if (visual->depth == 16) + c = (c & 0x001f) | ((c & 0x7c00) << 1) | ((c & 0x03e0) << 1); + else if (visual->depth == 24 || visual->depth == 32) + c = ((c & 0x001f) << 3) | ((c & 0x03e0) << 6) | ((c & 0x7c00) << 9); + + gdk_image_put_pixel(image, x, y, c); + } + } + + pixmap = gdk_pixmap_new(dialog->window, 32, 32, visual->depth); + + gc = gdk_gc_new(pixmap); + gdk_draw_image(pixmap, gc, image, 0, 0, 0, 0, 32, 32); + gdk_gc_destroy(gc); + gdk_image_destroy(image); + + pixbuf = gdk_pixbuf_get_from_drawable(NULL, GDK_PIXMAP (pixmap), NULL, + 0, 0, 0, 0, -1, -1); + g_object_unref(pixmap); + + return pixbuf; +} + +static void LoadListItems(int mcd, GtkWidget *widget) { + int i; + GladeXML *xml; + GtkWidget *List; + GtkWidget *dialog; + GtkListStore *store; + GtkTreeIter iter; + GdkPixbuf *pixbuf; + gchar *title; + + store = gtk_list_store_new(NUM_CL, GDK_TYPE_PIXBUF, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); + + xml = glade_get_widget_tree(widget); + dialog = glade_xml_get_widget(xml, "McdsDlg"); + + if (mcd == 1) List = glade_xml_get_widget(xml, "GtkCList_McdList1"); + else List = glade_xml_get_widget(xml, "GtkCList_McdList2"); + + for (i = 0; i < MAX_MEMCARD_BLOCKS; i++) { + McdBlock *Info; + gchar *state; + + Info = &Blocks[mcd - 1][i]; + IconC[mcd - 1][i] = 0; + + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { + state = _("Deleted"); + } else + state = _("Free"); + } else if ((Info->Flags & 0xF0) == 0x50) + state = _("Used"); + else + state = _("Free"); + + pixbuf = SetIcon(dialog, Info->Icon, i + 1); + + gtk_list_store_append(store, &iter); + + title = g_convert(Info->sTitle, strlen(Info->sTitle), "UTF-8", + "Shift-JIS", NULL, NULL, NULL); + + gtk_list_store_set(store, &iter, + CL_ICON, pixbuf, + CL_TITLE, title, + CL_STAT, state, + CL_NAME, Info->Name, + CL_ID, Info->ID, + -1); + + g_free(title); + + g_object_unref(pixbuf); + } + + gtk_tree_view_set_model(GTK_TREE_VIEW(List), GTK_TREE_MODEL(store)); + g_object_unref(G_OBJECT(store)); + gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(List), TRUE); + gtk_widget_show(List); +} + +static void UpdateFilenameButtons(GtkWidget *widget) { + int i; + GladeXML *xml; + GtkWidget *dialog; + const char *filename; + gchar *p; + + xml = glade_get_widget_tree(widget); + dialog = glade_xml_get_widget(xml, "McdsDlg"); + + for (i = 0; i < 2; i++) { + if (i == 0) { + widget = glade_xml_get_widget(xml, "Mcd1Label"); + filename = Config.Mcd1; + } else { + widget = glade_xml_get_widget(xml, "Mcd2Label"); + filename = Config.Mcd2; + } + + p = g_path_get_basename(filename); + gtk_label_set_text(GTK_LABEL(widget), p); + g_free(p); + } +} + +static void LoadMcdDlg(GtkWidget *widget) { + int i; + + for (i = 0; i < MAX_MEMCARD_BLOCKS; i++) { + GetMcdBlockInfo(1, i + 1, &Blocks[0][i]); + GetMcdBlockInfo(2, i + 1, &Blocks[1][i]); + } + + LoadListItems(1, widget); + LoadListItems(2, widget); + + UpdateFilenameButtons(widget); +} + +static void OnTreeSelectionChanged(GtkTreeSelection *selection, gpointer user_data); + +static void UpdateListItems(int mcd, GtkWidget *widget) { + GladeXML *xml; + GtkWidget *List; + GtkWidget *dialog; + GtkListStore *store; + GtkTreeIter iter; + GdkPixbuf *pixbuf; + short *pIcon; + int i; + gchar *title; + + xml = glade_get_widget_tree(widget); + dialog = glade_xml_get_widget(xml, "McdsDlg"); + + if (mcd == 1) List = glade_xml_get_widget(xml, "GtkCList_McdList1"); + else List = glade_xml_get_widget(xml, "GtkCList_McdList2"); + + store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(List))); + gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter); + + for (i = 0; i < MAX_MEMCARD_BLOCKS; i++) { + McdBlock *Info; + gchar *state; + + Info = &Blocks[mcd - 1][i]; + IconC[mcd - 1][i] = 0; + + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { + state = _("Deleted"); + } else + state = _("Free"); + } else if ((Info->Flags & 0xF0) == 0x50) + state = _("Used"); + else + state = _("Free"); + + if (Info->IconCount > 0) { + pIcon = &Info->Icon[(currentIcon % Info->IconCount) * 16 * 16]; + } else { + pIcon = Info->Icon; + } + + pixbuf = SetIcon(dialog, pIcon, i + 1); + title = g_convert(Info->sTitle, strlen(Info->sTitle), "UTF-8", + "Shift-JIS", NULL, NULL, NULL); + + gtk_list_store_set(store, &iter, + CL_ICON, pixbuf, + CL_TITLE, title, + CL_STAT, state, + CL_NAME, Info->Name, + CL_ID, Info->ID, + -1); + + g_free(title); + + g_object_unref(pixbuf); + gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter); + } + + gtk_widget_show(List); + + OnTreeSelectionChanged(gtk_tree_view_get_selection(GTK_TREE_VIEW(List)), (gpointer)mcd); +} + +static void UpdateMcdDlg(GtkWidget *widget) { + int i; + + for (i = 0; i < MAX_MEMCARD_BLOCKS; i++) { + GetMcdBlockInfo(1, i + 1, &Blocks[0][i]); + GetMcdBlockInfo(2, i + 1, &Blocks[1][i]); + } + + UpdateListItems(1, widget); + UpdateListItems(2, widget); + + UpdateFilenameButtons(widget); +} + +static void OnMcd_Close(GtkDialog *dialog, gint arg1, gpointer user_data) { + quit = TRUE; + SaveConfig(); + gtk_widget_destroy(GTK_WIDGET(dialog)); +} + +static void OnMcd_FileChange(GtkWidget *widget, gpointer user_data) { + gint memcard = (int)user_data; + gchar *filename; + GtkWidget *chooser; + + // Ask for name of memory card + chooser = gtk_file_chooser_dialog_new(_("Select A File"), + NULL, GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_OK, + NULL); + + if (memcard == 1) + gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(chooser), Config.Mcd1); + else + gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(chooser), Config.Mcd2); + + if (gtk_dialog_run(GTK_DIALOG(chooser)) == GTK_RESPONSE_OK) { + gtk_widget_hide(chooser); + + filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(chooser)); + + if (filename != NULL) { + if (memcard == 1) strncpy(Config.Mcd1, filename, MAXPATHLEN); + else strncpy(Config.Mcd2, filename, MAXPATHLEN); + + LoadMcd(memcard, filename); + LoadMcdDlg(widget); + + g_free(filename); + } + } + + gtk_widget_destroy(chooser); +} + +// format a memory card +static void OnMcd_Format(GtkWidget *widget, gpointer user_data) { + GladeXML *xml; + GtkWidget *message_dialog; + gint result; + char *str; + + gint memcard = (int)user_data; + + message_dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, + GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, + _("Format this Memory Card?")); + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(message_dialog), + _("If you format the memory card, the card will be empty, and any existing data overwritten.")); + gtk_dialog_add_buttons(GTK_DIALOG(message_dialog), + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + _("Format card"), GTK_RESPONSE_YES, NULL); + + result = gtk_dialog_run(GTK_DIALOG(message_dialog)); + gtk_widget_destroy(message_dialog); + + if (result == GTK_RESPONSE_YES) { + xml = glade_get_widget_tree(widget); + + if (memcard == 1) str = Config.Mcd1; + else str = Config.Mcd2; + + CreateMcd(str); + LoadMcd(memcard, str); + + UpdateMcdDlg(widget); + } +} + +// create a new, formatted memory card +static void OnMcd_New(GtkWidget *widget, gpointer user_data) { + GtkWidget *chooser; + gchar *path; + + // Ask for name of new memory card + chooser = gtk_file_chooser_dialog_new(_("Create a new Memory Card"), + NULL, GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_SAVE, GTK_RESPONSE_OK, + NULL); + + // Card should be put into $HOME/.pcsx/memcards + path = g_build_filename(g_get_home_dir(), ".pcsx", "memcards", NULL); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), path); + gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(chooser), _("New Memory Card.mcd")); + gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(chooser), TRUE); + + if (gtk_dialog_run(GTK_DIALOG(chooser)) == GTK_RESPONSE_OK) { + gchar *name; + + gtk_widget_hide(chooser); + name = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(chooser)); + + CreateMcd(name); + + if ((int)user_data == 1) strncpy(Config.Mcd1, name, MAXPATHLEN); + else strncpy(Config.Mcd2, name, MAXPATHLEN); + + LoadMcd((int)user_data, name); + LoadMcdDlg(widget); + + g_free(name); + } + + gtk_widget_destroy(chooser); + g_free(path); +} + +static int copy = 0, copymcd = 0; + +static int GetFreeMemcardSlot(int target_card) { + McdBlock *Info; + gboolean found = FALSE; + + int i = 0; + while (i < 15 && found == FALSE) { + Info = &Blocks[target_card][i]; + if (g_ascii_strcasecmp(Info->Title, "") == 0) { + found = TRUE; + } else { + i++; + } + } + + if (found == TRUE) + return i; + + // no free slots, try to find a deleted one + i = 0; + while (i < 15 && found == FALSE) { + Info = &Blocks[target_card][i]; + if ((Info->Flags & 0xF0) != 0x50) { + found = TRUE; + } else { + i++; + } + } + + if (found == TRUE) + return i; + + return -1; +} + +static void CopyMemcardData(char *from, char *to, gint *i, gchar *str) { + memcpy(to + (*i + 1) * 128, from + (copy + 1) * 128, 128); + SaveMcd((char *)str, to, (*i + 1) * 128, 128); + memcpy(to + (*i + 1) * 1024 * 8, from + (copy+1) * 1024 * 8, 1024 * 8); + SaveMcd((char *)str, to, (*i + 1) * 1024 * 8, 1024 * 8); +} + +static void OnMcd_CopyTo(GtkWidget *widget, gpointer user_data) { + gint mcd = (gint)user_data; + + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + gint *i; + GladeXML *xml; + GtkTreeSelection *treesel; + gchar *str; + char *source, *destination; + + int first_free_slot; + + xml = glade_get_widget_tree(widget); + + if (mcd == 1) + treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(GtkCList_McdList2)); + else + treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(GtkCList_McdList1)); + + // If the item selected is not reported as a 'Free' slot + if (gtk_tree_selection_get_selected(treesel, &model, &iter)) { + path = gtk_tree_model_get_path(model, &iter); + i = gtk_tree_path_get_indices(path); + copy = *i; + copymcd = mcd; + gtk_tree_path_free(path); + } + + // Determine the first free slot in the target memory card + first_free_slot = GetFreeMemcardSlot(mcd - 1); + if (first_free_slot == -1) { + // No free slots available on the destination card + SysErrorMessage(_("No free space on memory card"), + _("There are no free slots available on the target memory card. Please delete a slot first.")); + return; + } + + xml = glade_get_widget_tree(GtkCList_McdList1); + + if (mcd == 1) { + str = Config.Mcd1; + source = Mcd2Data; + destination = Mcd1Data; + } else { + str = Config.Mcd2; + source = Mcd1Data; + destination = Mcd2Data; + } + + CopyMemcardData(source, destination, &first_free_slot, str); + UpdateMcdDlg(widget); +} + +static void OnMemcardDelete(GtkWidget *widget, gpointer user_data) { + McdBlock *Info; + int i, xor = 0, j; + char *data, *ptr; + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + gchar *filename; + GladeXML *xml; + gboolean selected; + GtkWidget *tree; + GtkTreeSelection *sel; + + gint memcard = (int)user_data; + + xml = glade_get_widget_tree(widget); + + if (memcard == 1) { + tree = glade_xml_get_widget(xml, "GtkCList_McdList1"); + sel = gtk_tree_view_get_selection(GTK_TREE_VIEW (tree)); + selected = gtk_tree_selection_get_selected (sel, &model, &iter); + data = Mcd1Data; + filename = Config.Mcd1; + } else { + tree = glade_xml_get_widget(xml, "GtkCList_McdList2"); + sel = gtk_tree_view_get_selection(GTK_TREE_VIEW (tree)); + selected = gtk_tree_selection_get_selected(sel, &model, &iter); + data = Mcd2Data; + filename = Config.Mcd2; + } + + if (selected) { + path = gtk_tree_model_get_path(model, &iter); + i = *gtk_tree_path_get_indices(path); + + i++; + ptr = data + i * 128; + Info = &Blocks[memcard - 1][i - 1]; + + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { // deleted + *ptr = 0x50 | (Info->Flags & 0xF); + } else return; + } else if ((Info->Flags & 0xF0) == 0x50) { // used + *ptr = 0xA0 | (Info->Flags & 0xF); + } else { return; } + + for (j = 0; j < 127; j++) xor ^= *ptr++; + *ptr = xor; + + SaveMcd((char *)filename, data, i * 128, 128); + UpdateMcdDlg(widget); + } +} + +static void OnTreeSelectionChanged(GtkTreeSelection *selection, gpointer user_data) { + GladeXML *xml; + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + + gboolean selected; + int i; + McdBlock b; + + gint memcard = (int)user_data; + + xml = glade_get_widget_tree(GtkCList_McdList1); + selected = gtk_tree_selection_get_selected(selection, &model, &iter); + + if (selected) { + path = gtk_tree_model_get_path(model, &iter); + i = *gtk_tree_path_get_indices(path); + gtk_tree_path_free(path); + + // If a row was selected, and the row is not blank, we can now enable + // some of the disabled widgets + if (memcard == 1) { + GetMcdBlockInfo(1, i + 1, &b); + + if ((b.Flags >= 0xA1 && b.Flags <= 0xA3) || ((b.Flags & 0xF0) == 0x50)) { + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_Delete1"), TRUE); + } else { + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_Delete1"), FALSE); + } + + if ((b.Flags & 0xF0) == 0x50) { + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_CopyTo2"), TRUE); + } else { + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_CopyTo2"), FALSE); + } + } else { + GetMcdBlockInfo(2, i + 1, &b); + + if ((b.Flags >= 0xA1 && b.Flags <= 0xA3) || ((b.Flags & 0xF0) == 0x50)) { + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_Delete2"), TRUE); + } else { + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_Delete2"), FALSE); + } + + if ((b.Flags & 0xF0) == 0x50) { + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_CopyTo1"), TRUE); + } else { + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_CopyTo1"), FALSE); + } + } + } else { + if (memcard == 1) { + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_CopyTo2"), FALSE); + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_Delete1"), FALSE); + } else { + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_CopyTo1"), FALSE); + gtk_widget_set_sensitive(glade_xml_get_widget(xml, "GtkButton_Delete2"), FALSE); + } + } +} + +gboolean updateFunc(gpointer data) { + if (quit) return FALSE; + currentIcon++; + UpdateListItems(1, GtkCList_McdList1); + UpdateListItems(2, GtkCList_McdList2); + g_timeout_add(333, updateFunc, 0); + return FALSE; +} + +void OnConf_Mcds() { + GladeXML *xml; + GtkWidget *dialog; + GtkWidget *widget; + GtkTreeSelection *treesel1, *treesel2; + gchar *str; + + xml = glade_xml_new(PACKAGE_DATA_DIR "pcsx.glade2", "McdsDlg", NULL); + + if (!xml) { + g_warning("We could not load the interface!"); + return; + } + + dialog = glade_xml_get_widget(xml, "McdsDlg"); + + gtk_window_set_title(GTK_WINDOW(dialog), _("Memory Card Manager")); + + // Assign default memory cards + if (!strlen(Config.Mcd1)) { + str = g_strconcat(getenv("HOME"), DEFAULT_MEM_CARD_1, NULL); + strcpy(Config.Mcd1, str); + g_free(str); + } + + if (!strlen(Config.Mcd2)) { + str = g_strconcat(getenv("HOME"), DEFAULT_MEM_CARD_2, NULL); + strcpy(Config.Mcd2, str); + g_free(str); + } + + GtkCList_McdList1 = glade_xml_get_widget(xml, "GtkCList_McdList1"); + AddColumns(GTK_TREE_VIEW(GtkCList_McdList1)); + GtkCList_McdList2 = glade_xml_get_widget(xml, "GtkCList_McdList2"); + AddColumns(GTK_TREE_VIEW(GtkCList_McdList2)); + + treesel1 = gtk_tree_view_get_selection(GTK_TREE_VIEW (GtkCList_McdList1)); + gtk_tree_selection_set_mode(treesel1, GTK_SELECTION_SINGLE); + g_signal_connect_data(G_OBJECT(treesel1), "changed", + G_CALLBACK(OnTreeSelectionChanged), + (gpointer)1, NULL, G_CONNECT_AFTER); + + treesel2 = gtk_tree_view_get_selection(GTK_TREE_VIEW (GtkCList_McdList2)); + gtk_tree_selection_set_mode(treesel2, GTK_SELECTION_SINGLE); + g_signal_connect_data(G_OBJECT(treesel2), "changed", + G_CALLBACK(OnTreeSelectionChanged), + (gpointer)2, NULL, G_CONNECT_AFTER); + + LoadMcdDlg(dialog); + + // Setup a handler for when Close or Cancel is clicked + g_signal_connect_data(GTK_OBJECT(dialog), "response", + GTK_SIGNAL_FUNC(OnMcd_Close), xml, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "GtkButton_Format1"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnMcd_Format), (gpointer)1, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "GtkButton_Format2"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnMcd_Format), (gpointer)2, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "Mcd1Button"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnMcd_FileChange), (gpointer)1, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "Mcd2Button"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnMcd_FileChange), (gpointer)2, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "GtkButton_New1"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnMcd_New), (gpointer)1, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "GtkButton_New2"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnMcd_New), (gpointer)2, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "GtkButton_CopyTo1"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnMcd_CopyTo), (gpointer)1, NULL, G_CONNECT_AFTER); + gtk_widget_set_sensitive(GTK_WIDGET(widget), FALSE); + + widget = glade_xml_get_widget(xml, "GtkButton_CopyTo2"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnMcd_CopyTo), (gpointer)2, NULL, G_CONNECT_AFTER); + gtk_widget_set_sensitive(GTK_WIDGET(widget), FALSE); + + widget = glade_xml_get_widget(xml, "GtkButton_Delete1"); + g_signal_connect_data (GTK_OBJECT (widget), "clicked", + GTK_SIGNAL_FUNC(OnMemcardDelete), (gpointer)1, NULL, G_CONNECT_AFTER); + gtk_widget_set_sensitive(GTK_WIDGET(widget), FALSE); + + widget = glade_xml_get_widget(xml, "GtkButton_Delete2"); + g_signal_connect_data (GTK_OBJECT (widget), "clicked", + GTK_SIGNAL_FUNC(OnMemcardDelete), (gpointer)2, NULL, G_CONNECT_AFTER); + gtk_widget_set_sensitive(GTK_WIDGET(widget), FALSE); + + quit = FALSE; + currentIcon = 0; + + g_timeout_add(1, updateFunc, 0); + + while (gtk_events_pending()) { gtk_main_iteration(); } +} diff --git a/gui/MemcardDlg.h b/gui/MemcardDlg.h new file mode 100644 index 00000000..519283a2 --- /dev/null +++ b/gui/MemcardDlg.h @@ -0,0 +1,24 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifndef MEMCARDDLG_H +#define MEMCARDDLG_H + +void OnConf_Mcds(); + +#endif diff --git a/gui/Plugin.c b/gui/Plugin.c new file mode 100644 index 00000000..867fce03 --- /dev/null +++ b/gui/Plugin.c @@ -0,0 +1,390 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include + +#include "Linux.h" + +#include "../libpcsxcore/plugins.h" +#include "../libpcsxcore/spu.h" +#include "../libpcsxcore/cdriso.h" + +#include "nopic.h" + +#define MAX_SLOTS 5 /* ADB TODO Same as Gtk2Gui.c */ + +void OnFile_Exit(); + +unsigned long gpuDisp; + +int StatesC = 0; +extern int UseGui; +int ShowPic = 0; + +void gpuShowPic() { + gchar *state_filename; + gzFile f; + + if (!ShowPic) { + unsigned char *pMem; + + pMem = (unsigned char *) malloc(128*96*3); + if (pMem == NULL) return; + + state_filename = get_state_filename (StatesC); + + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + + f = gzopen(state_filename, "rb"); + if (f != NULL) { + gzseek(f, 32, SEEK_SET); // skip header + gzread(f, pMem, 128*96*3); + gzclose(f); + } else { + memcpy(pMem, NoPic_Image.pixel_data, 128*96*3); + DrawNumBorPic(pMem, StatesC+1); + } + GPU_showScreenPic(pMem); + + free(pMem); + ShowPic = 1; + g_free (state_filename); + } else { + GPU_showScreenPic(NULL); + ShowPic = 0; + } +} + +void KeyStateSave(int i) { + gchar *state_filename; + + state_filename = get_state_filename (i); + state_save (state_filename); + + g_free (state_filename); +} + +void KeyStateLoad(int i) { + gchar *state_filename; + + state_filename = get_state_filename (i); + state_load (state_filename); + + g_free (state_filename); + + // HACKHACK: prevent crash when using recompiler due to execution not + // returned from compiled code. This WILL cause memory leak, however a + // large amount of refactor is needed for a proper fix. + if (Config.Cpu == CPU_DYNAREC) psxCpu->Execute(); +} + +static short modctrl = 0, modalt = 0; + +/* Handle keyboard keystrokes */ +void PADhandleKey(int key) { + char Text[MAXPATHLEN]; + gchar *state_filename; + + short rel = 0; //released key flag + + if (key == 0) + return; + + if ((key >> 30) & 1) //specific to dfinput (padJoy) + rel = 1; + + if (rel) { + switch (key & ~0x40000000) { + case XK_Alt_L: + case XK_Alt_R: + modalt=0; + break; + case XK_Control_L: + case XK_Control_R: + modctrl=0; + break; + } + return; + } + + switch (key) { + case XK_Alt_L: + case XK_Alt_R: + modalt=1; + break; + case XK_Control_L: + case XK_Control_R: + modctrl=1; + break; + + case XK_0: + if (modalt && modctrl) + return; + if (modalt) KeyStateLoad(10); + break; + + case XK_1: + if (modalt && modctrl) + return; + if (modalt) KeyStateLoad(0); + if (modctrl) KeyStateSave(0); + break; + case XK_2: + if (modalt && modctrl) + return; + if (modalt) KeyStateLoad(1); + if (modctrl) KeyStateSave(1); + break; + case XK_3: + if (modalt && modctrl) + return; + if (modalt) KeyStateLoad(2); + if (modctrl) KeyStateSave(2); + break; + case XK_4: + if (modalt && modctrl) + return; + if (modalt) KeyStateLoad(3); + if (modctrl) KeyStateSave(3); + break; + case XK_5: + if (modalt && modctrl) + return; + if (modalt) KeyStateLoad(4); + if (modctrl) KeyStateSave(4); + break; + + case XK_F1: + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + state_filename = get_state_filename (StatesC); + state_save (state_filename); + + g_free (state_filename); + + if (ShowPic) { ShowPic = 0; gpuShowPic(); } + + break; + case XK_F2: + if (StatesC < (MAX_SLOTS - 1)) StatesC++; + else StatesC = 0; + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + if (ShowPic) { ShowPic = 0; gpuShowPic(); } + break; + case XK_F3: + state_filename = get_state_filename (StatesC); + state_load (state_filename); + + g_free (state_filename); + + // HACKHACK: prevent crash when using recompiler due to execution not + // returned from compiled code. This WILL cause memory leak, however a + // large amount of refactor is needed for a proper fix. + if (Config.Cpu == CPU_DYNAREC) psxCpu->Execute(); + + break; + case XK_F4: + gpuShowPic(); + break; + case XK_F5: + Config.Sio ^= 0x1; + if (Config.Sio) + sprintf(Text, _("SIO IRQ Always Enabled")); + else sprintf(Text, _("SIO IRQ Not Always Enabled")); + GPU_displayText(Text); + break; + case XK_F6: + Config.Mdec ^= 0x1; + if (Config.Mdec) + sprintf(Text, _("Black & White Mdecs Only Enabled")); + else sprintf(Text, _("Black & White Mdecs Only Disabled")); + GPU_displayText(Text); + break; + case XK_F7: + Config.Xa ^= 0x1; + if (Config.Xa == 0) + sprintf (Text, _("XA Enabled")); + else sprintf (Text, _("XA Disabled")); + GPU_displayText(Text); + break; + case XK_F8: + GPU_makeSnapshot(); + break; + case XK_F9: + SetCdOpenCaseTime(-1); + break; + case XK_F10: + SetCdOpenCaseTime(0); + break; + case XK_Escape: + // TODO + // the architecture is too broken to actually restart the GUI + // because SysUpdate is called from deep within the actual + // execution of the emulation code + // Fixing this would probably require a complete reworking of + // all functions, so that they return 0 or 1 for success + // that way, execution wouldn't continue + if (CdromId[0] != '\0') + KeyStateSave(10); + ClosePlugins(); + UpdateMenuSlots(); + if (!UseGui) OnFile_Exit(); + StartGui(); + break; + case XK_Return: //0xff0d + if (modalt) //alt-return + //I just made this up: a special sym for fullscreen because the current interface can't handle key mods + //though it can be used in the future as a convention...eg bit 29 for alt, bit 28 for cntl, etc. + GPU_keypressed( (1<<29) | 0xFF0D ); + break; + default: + GPU_keypressed(key); + if (Config.UseNet) NET_keypressed(key); + } +} + +void OnFile_Exit(); + +void SignalExit(int sig) { + ClosePlugins(); + OnFile_Exit(); +} + +#define PARSEPATH(dst, src) \ + ptr = src + strlen(src); \ + while (*ptr != '\\' && ptr != src) ptr--; \ + if (ptr != src) { \ + strcpy(dst, ptr+1); \ + } + +int _OpenPlugins() { + int ret; + + signal(SIGINT, SignalExit); + signal(SIGPIPE, SignalExit); + + GPU_clearDynarec(clearDynarec); + + ret = CDR_open(); + if (ret < 0) { SysMessage(_("Error opening CD-ROM plugin!")); return -1; } + ret = SPU_open(); + if (ret < 0) { SysMessage(_("Error opening SPU plugin!")); return -1; } + SPU_registerCallback(SPUirq); + ret = GPU_open(&gpuDisp, "PCSX", NULL); + if (ret < 0) { SysMessage(_("Error opening GPU plugin!")); return -1; } + ret = PAD1_open(&gpuDisp); + if (ret < 0) { SysMessage(_("Error opening Controller 1 plugin!")); return -1; } + ret = PAD2_open(&gpuDisp); + if (ret < 0) { SysMessage(_("Error opening Controller 2 plugin!")); return -1; } + + if (Config.UseNet && !NetOpened) { + netInfo info; + char path[MAXPATHLEN]; + char dotdir[MAXPATHLEN]; + + strncpy(dotdir, getenv("HOME"), MAXPATHLEN-100); + strcat(dotdir, "/.pcsx/plugins/"); + + strcpy(info.EmuName, "PCSX " PACKAGE_VERSION); + strncpy(info.CdromID, CdromId, 9); + strncpy(info.CdromLabel, CdromLabel, 9); + info.psxMem = psxM; + info.GPU_showScreenPic = GPU_showScreenPic; + info.GPU_displayText = GPU_displayText; + info.GPU_showScreenPic = GPU_showScreenPic; + info.PAD_setSensitive = PAD1_setSensitive; + sprintf(path, "%s%s", Config.BiosDir, Config.Bios); + strcpy(info.BIOSpath, path); + strcpy(info.MCD1path, Config.Mcd1); + strcpy(info.MCD2path, Config.Mcd2); + sprintf(path, "%s%s", dotdir, Config.Gpu); + strcpy(info.GPUpath, path); + sprintf(path, "%s%s", dotdir, Config.Spu); + strcpy(info.SPUpath, path); + sprintf(path, "%s%s", dotdir, Config.Cdr); + strcpy(info.CDRpath, path); + NET_setInfo(&info); + + ret = NET_open(&gpuDisp); + if (ret < 0) { + if (ret == -2) { + // -2 is returned when something in the info + // changed and needs to be synced + char *ptr; + + PARSEPATH(Config.Bios, info.BIOSpath); + PARSEPATH(Config.Gpu, info.GPUpath); + PARSEPATH(Config.Spu, info.SPUpath); + PARSEPATH(Config.Cdr, info.CDRpath); + + strcpy(Config.Mcd1, info.MCD1path); + strcpy(Config.Mcd2, info.MCD2path); + return -2; + } else { + Config.UseNet = FALSE; + } + } else { + if (NET_queryPlayer() == 1) { + if (SendPcsxInfo() == -1) Config.UseNet = FALSE; + } else { + if (RecvPcsxInfo() == -1) Config.UseNet = FALSE; + } + } + NetOpened = TRUE; + } else if (Config.UseNet) { + NET_resume(); + } + + return 0; +} + +int OpenPlugins() { + int ret; + + while ((ret = _OpenPlugins()) == -2) { + ReleasePlugins(); + LoadMcds(Config.Mcd1, Config.Mcd2); + if (LoadPlugins() == -1) return -1; + } + return ret; +} + +void ClosePlugins() { + int ret; + + signal(SIGINT, SIG_DFL); + signal(SIGPIPE, SIG_DFL); + ret = CDR_close(); + if (ret < 0) { SysMessage(_("Error closing CD-ROM plugin!")); return; } + ret = SPU_close(); + if (ret < 0) { SysMessage(_("Error closing SPU plugin!")); return; } + ret = PAD1_close(); + if (ret < 0) { SysMessage(_("Error closing Controller 1 Plugin!")); return; } + ret = PAD2_close(); + if (ret < 0) { SysMessage(_("Error closing Controller 2 plugin!")); return; } + ret = GPU_close(); + if (ret < 0) { SysMessage(_("Error closing GPU plugin!")); return; } + + if (Config.UseNet) { + NET_pause(); + } +} diff --git a/gui/nopic.h b/gui/nopic.h new file mode 100644 index 00000000..553cede5 --- /dev/null +++ b/gui/nopic.h @@ -0,0 +1,1345 @@ +//////////////////////////////////////////////////////////////////////// +// following code taken from the gpuPeopsSoft +//////////////////////////////////////////////////////////////////////// + +// font 0-9, 24x20 pixels, 1 byte = 4 dots +// 00 = black +// 01 = white +// 10 = red +// 11 = transparent + +unsigned char cFont[10][120]= +{ +// 0 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 1 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 2 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 3 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 4 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x14,0x00,0x00, + 0x80,0x00,0x14,0x14,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 5 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 6 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x15,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 7 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 8 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 9 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x15,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +} +}; + +//////////////////////////////////////////////////////////////////////// + +void PaintPicDot(unsigned char * p,unsigned char c) +{ + + if(c==0) {*p++=0x00;*p++=0x00;*p=0x00;return;} // black + if(c==1) {*p++=0xff;*p++=0xff;*p=0xff;return;} // white + if(c==2) {*p++=0x00;*p++=0x00;*p=0xff;return;} // red + // transparent +} + + ///////////////////////////////////////////////////////////////////// + // generic number/border painter + +void DrawNumBorPic(unsigned char *pMem, int lSelectedSlot) +{ + unsigned char *pf; + int x,y; + int c,v; + + pf=pMem+(103*3); // offset to number rect + + for(y=0;y<20;y++) // loop the number rect pixel + { + for(x=0;x<6;x++) + { + c=cFont[lSelectedSlot][x+y*6]; // get 4 char dot infos at once (number depends on selected slot) + v=(c&0xc0)>>6; + PaintPicDot(pf,(unsigned char)v);pf+=3; // paint the dots into the rect + v=(c&0x30)>>4; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=(c&0x0c)>>2; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=c&0x03; + PaintPicDot(pf,(unsigned char)v);pf+=3; + } + pf+=104*3; // next rect y line + } + + pf=pMem; // ptr to first pos in 128x96 pic + for(x=0;x<128;x++) // loop top/bottom line + { + *(pf+(95*128*3))=0x00;*pf++=0x00; + *(pf+(95*128*3))=0x00;*pf++=0x00; // paint it red + *(pf+(95*128*3))=0xff;*pf++=0xff; + } + pf=pMem; // ptr to first pos + for(y=0;y<96;y++) // loop left/right line + { + *(pf+(127*3))=0x00;*pf++=0x00; + *(pf+(127*3))=0x00;*pf++=0x00; // paint it red + *(pf+(127*3))=0xff;*pf++=0xff; + pf+=127*3; // offset to next line + } +} + +//////////////////////////////////////////////////////////////////////// + + +/* GIMP RGB C-Source image dump (NoPic.h) */ + +static const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ + unsigned char pixel_data[128 * 96 * 3 + 1]; +} NoPic_Image = { + 128, 96, 3, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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0\0\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8" + "\0\0\305\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\251" + "\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\251\0" + "\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\305" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0\214\0\0\34\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\305\0\0\376\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\305\0\0\34\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0""8\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0U\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0\0\305\0\0q\0\0U\0\0U\0" + "\0U\0\0\214\0\0\341\0\0\376\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\341\0\0\251\0\0\251\0\0\251\0\0\251\0\0\251" + "\0\0\251\0\0\251\0\0\341\0\0\376\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0\0\251\0\0U\0\0U\0\0" + "U\0\0q\0\0\251\0\0\376\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0" + "\0\376\0\0\376\0\0\341\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0U\0\0\341\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\341\0\0" + "\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\305" + "\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376" + "\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\341\0\0\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\305\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214" + "\0\0\376\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0U\0\0\376\0\0\376" + "\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\376\0\0\34" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34" + "\0\0\376\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\341\0\0\376\0\0" + "\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\251\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0" + "\376\0\0\0\0\0\251\0\0\376\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0" + "\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376" + "\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\251\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376" + "\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\214\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0" + "\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0\0" + "\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0U\0\0U\0\0U\0\0\0\0\0\0\0\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0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0" + "\0\376\0\0\305\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0\214\0\0\341\0\0\376" + "\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\34" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\251\0" + "\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\251\0\0\0\0\0\0\0\0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"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\341\0\0\34\0\0\376\0\0\376\0\0U\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0" + "\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0q\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\341\0\0\376\0\0\376\0\0\251" + "\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0" + "\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\305" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376" + "\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\214\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0\376\0\0\214\0\0\34\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\251\0\0\376\0\0\376\0\0\376\0\0\251\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\305\0\0\376\0\0\376\0\0\376\0\0\214\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\341\0\0\376\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\251\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\305\0\0\251\0\0\251\0\0\251\0\0\341\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0" + "U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0" + "\376\0\0\376\0\0\251\0\0\251\0\0\251\0\0\251\0\0\376\0\0\376\0\0\376\0\0" + "\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0q\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\34\0\0\251\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\251\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0U\0\0U\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0U\0" + "\0U\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0q\0\0\251\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\251\0\0q\0\0\0\0" + "\0\0\0\0\0\0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0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0", +}; + diff --git a/include/config.h.in b/include/config.h.in new file mode 100644 index 00000000..41d74c58 --- /dev/null +++ b/include/config.h.in @@ -0,0 +1,120 @@ +/* include/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + +/* gettext domain */ +#undef GETTEXT_PACKAGE + +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +#undef HAVE_CFLOCALECOPYCURRENT + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +#undef HAVE_CFPREFERENCESCOPYAPPVALUE + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#undef HAVE_DCGETTEXT + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + +/* Define if you have the iconv() function and it works. */ +#undef HAVE_ICONV + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Define to the maximum length of any path. */ +#undef MAXPATHLEN + +/* Define if we are compiling without dynamic recompiler. */ +#undef NOPSXREC + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* define on a big endian system */ +#undef __BIGENDIAN__ + +/* Define if building on a GNU/Linux system. */ +#undef __LINUX__ + +/* Define if we are compiling for x86 architectures. */ +#undef __i386__ + +/* Define if we are compiling for powerpc architectures. */ +#undef __ppc__ + +/* Define if we are compiling for x86_64 architectures. */ +#undef __x86_64__ diff --git a/install-sh b/install-sh new file mode 100755 index 00000000..a5897de6 --- /dev/null +++ b/install-sh @@ -0,0 +1,519 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-12-25.00 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libpcsxcore/Makefile.am b/libpcsxcore/Makefile.am new file mode 100644 index 00000000..6c0dae81 --- /dev/null +++ b/libpcsxcore/Makefile.am @@ -0,0 +1,84 @@ +INCLUDES = -DLOCALE_DIR=\"${datadir}/locale/\" \ + -I$(top_srcdir)/include + +noinst_LIBRARIES = libpcsxcore.a + +libpcsxcore_a_SOURCES = \ + $(top_builddir)/libpcsxcore/psxbios.c \ + $(top_builddir)/libpcsxcore/cdrom.c \ + $(top_builddir)/libpcsxcore/psxcounters.c \ + $(top_builddir)/libpcsxcore/psxdma.c \ + $(top_builddir)/libpcsxcore/disr3000a.c \ + $(top_builddir)/libpcsxcore/spu.c \ + $(top_builddir)/libpcsxcore/sio.c \ + $(top_builddir)/libpcsxcore/psxhw.c \ + $(top_builddir)/libpcsxcore/mdec.c \ + $(top_builddir)/libpcsxcore/psxmem.c \ + $(top_builddir)/libpcsxcore/misc.c \ + $(top_builddir)/libpcsxcore/plugins.c \ + $(top_builddir)/libpcsxcore/decode_xa.c \ + $(top_builddir)/libpcsxcore/r3000a.c \ + $(top_builddir)/libpcsxcore/psxinterpreter.c \ + $(top_builddir)/libpcsxcore/gte.c \ + $(top_builddir)/libpcsxcore/psxhle.c \ + $(top_builddir)/libpcsxcore/cdrom.h \ + $(top_builddir)/libpcsxcore/coff.h \ + $(top_builddir)/libpcsxcore/debug.c \ + $(top_builddir)/libpcsxcore/debug.h \ + $(top_builddir)/libpcsxcore/decode_xa.h \ + $(top_builddir)/libpcsxcore/gte.h \ + $(top_builddir)/libpcsxcore/gte_divider.h \ + $(top_builddir)/libpcsxcore/mdec.h \ + $(top_builddir)/libpcsxcore/misc.h \ + $(top_builddir)/libpcsxcore/plugins.h \ + $(top_builddir)/libpcsxcore/psemu_plugin_defs.h \ + $(top_builddir)/libpcsxcore/psxbios.h \ + $(top_builddir)/libpcsxcore/psxcommon.c \ + $(top_builddir)/libpcsxcore/psxcommon.h \ + $(top_builddir)/libpcsxcore/psxcounters.h \ + $(top_builddir)/libpcsxcore/psxdma.h \ + $(top_builddir)/libpcsxcore/psxhle.h \ + $(top_builddir)/libpcsxcore/psxhw.h \ + $(top_builddir)/libpcsxcore/psxmem.h \ + $(top_builddir)/libpcsxcore/r3000a.h \ + $(top_builddir)/libpcsxcore/sio.h \ + $(top_builddir)/libpcsxcore/sjisfont.h \ + $(top_builddir)/libpcsxcore/spu.h \ + $(top_builddir)/libpcsxcore/system.h \ + $(top_builddir)/libpcsxcore/cdriso.c \ + $(top_builddir)/libpcsxcore/cdriso.h \ + $(top_builddir)/libpcsxcore/cheat.c \ + $(top_builddir)/libpcsxcore/cheat.h \ + $(top_builddir)/libpcsxcore/socket.c \ + $(top_builddir)/libpcsxcore/socket.h \ + $(top_builddir)/libpcsxcore/ppf.c \ + $(top_builddir)/libpcsxcore/ppf.h + +if ARCH_X86_64 +libpcsxcore_a_SOURCES += \ + $(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86-64.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c \ + $(top_builddir)/libpcsxcore/ +else +if ARCH_X86 +libpcsxcore_a_SOURCES += \ + $(top_builddir)/libpcsxcore/ix86/iR3000A.c \ + $(top_builddir)/libpcsxcore/ix86/ix86.c \ + $(top_builddir)/libpcsxcore/ +endif +endif + +if ARCH_PPC +libpcsxcore_a_SOURCES += \ + $(top_builddir)/libpcsxcore/ppc/pR3000A.c \ + $(top_builddir)/libpcsxcore/ppc/ppc.c \ + $(top_builddir)/libpcsxcore/ppc/reguse.c \ + $(top_builddir)/libpcsxcore/ppc/pasm.s \ + $(top_builddir)/libpcsxcore/ +libpcsxcore_a_CCASFLAGS = -x assembler-with-cpp -mregnames +endif diff --git a/libpcsxcore/Makefile.in b/libpcsxcore/Makefile.in new file mode 100644 index 00000000..18721a57 --- /dev/null +++ b/libpcsxcore/Makefile.in @@ -0,0 +1,1174 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@ARCH_X86_64_TRUE@am__append_1 = \ +@ARCH_X86_64_TRUE@ $(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c \ +@ARCH_X86_64_TRUE@ $(top_builddir)/libpcsxcore/ix86_64/ix86-64.c \ +@ARCH_X86_64_TRUE@ $(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c \ +@ARCH_X86_64_TRUE@ $(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c \ +@ARCH_X86_64_TRUE@ $(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c \ +@ARCH_X86_64_TRUE@ $(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c \ +@ARCH_X86_64_TRUE@ $(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c \ +@ARCH_X86_64_TRUE@ $(top_builddir)/libpcsxcore/ + +@ARCH_X86_64_FALSE@@ARCH_X86_TRUE@am__append_2 = \ +@ARCH_X86_64_FALSE@@ARCH_X86_TRUE@ $(top_builddir)/libpcsxcore/ix86/iR3000A.c \ +@ARCH_X86_64_FALSE@@ARCH_X86_TRUE@ $(top_builddir)/libpcsxcore/ix86/ix86.c \ +@ARCH_X86_64_FALSE@@ARCH_X86_TRUE@ $(top_builddir)/libpcsxcore/ + +@ARCH_PPC_TRUE@am__append_3 = \ +@ARCH_PPC_TRUE@ $(top_builddir)/libpcsxcore/ppc/pR3000A.c \ +@ARCH_PPC_TRUE@ $(top_builddir)/libpcsxcore/ppc/ppc.c \ +@ARCH_PPC_TRUE@ $(top_builddir)/libpcsxcore/ppc/reguse.c \ +@ARCH_PPC_TRUE@ $(top_builddir)/libpcsxcore/ppc/pasm.s \ +@ARCH_PPC_TRUE@ $(top_builddir)/libpcsxcore/ + +subdir = libpcsxcore +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libpcsxcore_a_AR = $(AR) $(ARFLAGS) +libpcsxcore_a_LIBADD = +am__libpcsxcore_a_SOURCES_DIST = \ + $(top_builddir)/libpcsxcore/psxbios.c \ + $(top_builddir)/libpcsxcore/cdrom.c \ + $(top_builddir)/libpcsxcore/psxcounters.c \ + $(top_builddir)/libpcsxcore/psxdma.c \ + $(top_builddir)/libpcsxcore/disr3000a.c \ + $(top_builddir)/libpcsxcore/spu.c \ + $(top_builddir)/libpcsxcore/sio.c \ + $(top_builddir)/libpcsxcore/psxhw.c \ + $(top_builddir)/libpcsxcore/mdec.c \ + $(top_builddir)/libpcsxcore/psxmem.c \ + $(top_builddir)/libpcsxcore/misc.c \ + $(top_builddir)/libpcsxcore/plugins.c \ + $(top_builddir)/libpcsxcore/decode_xa.c \ + $(top_builddir)/libpcsxcore/r3000a.c \ + $(top_builddir)/libpcsxcore/psxinterpreter.c \ + $(top_builddir)/libpcsxcore/gte.c \ + $(top_builddir)/libpcsxcore/psxhle.c \ + $(top_builddir)/libpcsxcore/cdrom.h \ + $(top_builddir)/libpcsxcore/coff.h \ + $(top_builddir)/libpcsxcore/debug.c \ + $(top_builddir)/libpcsxcore/debug.h \ + $(top_builddir)/libpcsxcore/decode_xa.h \ + $(top_builddir)/libpcsxcore/gte.h \ + $(top_builddir)/libpcsxcore/gte_divider.h \ + $(top_builddir)/libpcsxcore/mdec.h \ + $(top_builddir)/libpcsxcore/misc.h \ + $(top_builddir)/libpcsxcore/plugins.h \ + $(top_builddir)/libpcsxcore/psemu_plugin_defs.h \ + $(top_builddir)/libpcsxcore/psxbios.h \ + $(top_builddir)/libpcsxcore/psxcommon.c \ + $(top_builddir)/libpcsxcore/psxcommon.h \ + $(top_builddir)/libpcsxcore/psxcounters.h \ + $(top_builddir)/libpcsxcore/psxdma.h \ + $(top_builddir)/libpcsxcore/psxhle.h \ + $(top_builddir)/libpcsxcore/psxhw.h \ + $(top_builddir)/libpcsxcore/psxmem.h \ + $(top_builddir)/libpcsxcore/r3000a.h \ + $(top_builddir)/libpcsxcore/sio.h \ + $(top_builddir)/libpcsxcore/sjisfont.h \ + $(top_builddir)/libpcsxcore/spu.h \ + $(top_builddir)/libpcsxcore/system.h \ + $(top_builddir)/libpcsxcore/cdriso.c \ + $(top_builddir)/libpcsxcore/cdriso.h \ + $(top_builddir)/libpcsxcore/cheat.c \ + $(top_builddir)/libpcsxcore/cheat.h \ + $(top_builddir)/libpcsxcore/socket.c \ + $(top_builddir)/libpcsxcore/socket.h \ + $(top_builddir)/libpcsxcore/ppf.c \ + $(top_builddir)/libpcsxcore/ppf.h \ + $(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86-64.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c \ + $(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c \ + $(top_builddir)/libpcsxcore/ \ + $(top_builddir)/libpcsxcore/ix86/iR3000A.c \ + $(top_builddir)/libpcsxcore/ix86/ix86.c \ + $(top_builddir)/libpcsxcore/ppc/pR3000A.c \ + $(top_builddir)/libpcsxcore/ppc/ppc.c \ + $(top_builddir)/libpcsxcore/ppc/reguse.c \ + $(top_builddir)/libpcsxcore/ppc/pasm.s +@ARCH_X86_64_TRUE@am__objects_1 = iR3000A-64.$(OBJEXT) \ +@ARCH_X86_64_TRUE@ ix86-64.$(OBJEXT) ix86_cpudetect.$(OBJEXT) \ +@ARCH_X86_64_TRUE@ ix86_fpu.$(OBJEXT) ix86_3dnow.$(OBJEXT) \ +@ARCH_X86_64_TRUE@ ix86_mmx.$(OBJEXT) ix86_sse.$(OBJEXT) +@ARCH_X86_64_FALSE@@ARCH_X86_TRUE@am__objects_2 = iR3000A.$(OBJEXT) \ +@ARCH_X86_64_FALSE@@ARCH_X86_TRUE@ ix86.$(OBJEXT) +@ARCH_PPC_TRUE@am__objects_3 = pR3000A.$(OBJEXT) ppc.$(OBJEXT) \ +@ARCH_PPC_TRUE@ reguse.$(OBJEXT) libpcsxcore_a-pasm.$(OBJEXT) +am_libpcsxcore_a_OBJECTS = psxbios.$(OBJEXT) cdrom.$(OBJEXT) \ + psxcounters.$(OBJEXT) psxdma.$(OBJEXT) disr3000a.$(OBJEXT) \ + spu.$(OBJEXT) sio.$(OBJEXT) psxhw.$(OBJEXT) mdec.$(OBJEXT) \ + psxmem.$(OBJEXT) misc.$(OBJEXT) plugins.$(OBJEXT) \ + decode_xa.$(OBJEXT) r3000a.$(OBJEXT) psxinterpreter.$(OBJEXT) \ + gte.$(OBJEXT) psxhle.$(OBJEXT) debug.$(OBJEXT) \ + psxcommon.$(OBJEXT) cdriso.$(OBJEXT) cheat.$(OBJEXT) \ + socket.$(OBJEXT) ppf.$(OBJEXT) $(am__objects_1) \ + $(am__objects_2) $(am__objects_3) +libpcsxcore_a_OBJECTS = $(am_libpcsxcore_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCCASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +SOURCES = $(libpcsxcore_a_SOURCES) +DIST_SOURCES = $(am__libpcsxcore_a_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -DLOCALE_DIR=\"${datadir}/locale/\" \ + -I$(top_srcdir)/include + +noinst_LIBRARIES = libpcsxcore.a +libpcsxcore_a_SOURCES = $(top_builddir)/libpcsxcore/psxbios.c \ + $(top_builddir)/libpcsxcore/cdrom.c \ + $(top_builddir)/libpcsxcore/psxcounters.c \ + $(top_builddir)/libpcsxcore/psxdma.c \ + $(top_builddir)/libpcsxcore/disr3000a.c \ + $(top_builddir)/libpcsxcore/spu.c \ + $(top_builddir)/libpcsxcore/sio.c \ + $(top_builddir)/libpcsxcore/psxhw.c \ + $(top_builddir)/libpcsxcore/mdec.c \ + $(top_builddir)/libpcsxcore/psxmem.c \ + $(top_builddir)/libpcsxcore/misc.c \ + $(top_builddir)/libpcsxcore/plugins.c \ + $(top_builddir)/libpcsxcore/decode_xa.c \ + $(top_builddir)/libpcsxcore/r3000a.c \ + $(top_builddir)/libpcsxcore/psxinterpreter.c \ + $(top_builddir)/libpcsxcore/gte.c \ + $(top_builddir)/libpcsxcore/psxhle.c \ + $(top_builddir)/libpcsxcore/cdrom.h \ + $(top_builddir)/libpcsxcore/coff.h \ + $(top_builddir)/libpcsxcore/debug.c \ + $(top_builddir)/libpcsxcore/debug.h \ + $(top_builddir)/libpcsxcore/decode_xa.h \ + $(top_builddir)/libpcsxcore/gte.h \ + $(top_builddir)/libpcsxcore/gte_divider.h \ + $(top_builddir)/libpcsxcore/mdec.h \ + $(top_builddir)/libpcsxcore/misc.h \ + $(top_builddir)/libpcsxcore/plugins.h \ + $(top_builddir)/libpcsxcore/psemu_plugin_defs.h \ + $(top_builddir)/libpcsxcore/psxbios.h \ + $(top_builddir)/libpcsxcore/psxcommon.c \ + $(top_builddir)/libpcsxcore/psxcommon.h \ + $(top_builddir)/libpcsxcore/psxcounters.h \ + $(top_builddir)/libpcsxcore/psxdma.h \ + $(top_builddir)/libpcsxcore/psxhle.h \ + $(top_builddir)/libpcsxcore/psxhw.h \ + $(top_builddir)/libpcsxcore/psxmem.h \ + $(top_builddir)/libpcsxcore/r3000a.h \ + $(top_builddir)/libpcsxcore/sio.h \ + $(top_builddir)/libpcsxcore/sjisfont.h \ + $(top_builddir)/libpcsxcore/spu.h \ + $(top_builddir)/libpcsxcore/system.h \ + $(top_builddir)/libpcsxcore/cdriso.c \ + $(top_builddir)/libpcsxcore/cdriso.h \ + $(top_builddir)/libpcsxcore/cheat.c \ + $(top_builddir)/libpcsxcore/cheat.h \ + $(top_builddir)/libpcsxcore/socket.c \ + $(top_builddir)/libpcsxcore/socket.h \ + $(top_builddir)/libpcsxcore/ppf.c \ + $(top_builddir)/libpcsxcore/ppf.h $(am__append_1) \ + $(am__append_2) $(am__append_3) +@ARCH_PPC_TRUE@libpcsxcore_a_CCASFLAGS = -x assembler-with-cpp -mregnames +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj .s +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libpcsxcore/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu libpcsxcore/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libpcsxcore.a: $(libpcsxcore_a_OBJECTS) $(libpcsxcore_a_DEPENDENCIES) + -rm -f libpcsxcore.a + $(libpcsxcore_a_AR) libpcsxcore.a $(libpcsxcore_a_OBJECTS) $(libpcsxcore_a_LIBADD) + $(RANLIB) libpcsxcore.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdriso.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdrom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cheat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decode_xa.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/disr3000a.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gte.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iR3000A-64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iR3000A.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ix86-64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ix86.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ix86_3dnow.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ix86_cpudetect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ix86_fpu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ix86_mmx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ix86_sse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mdec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pR3000A.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugins.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psxbios.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psxcommon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psxcounters.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psxdma.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psxhle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psxhw.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psxinterpreter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psxmem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/r3000a.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reguse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spu.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +psxbios.o: $(top_builddir)/libpcsxcore/psxbios.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxbios.o -MD -MP -MF $(DEPDIR)/psxbios.Tpo -c -o psxbios.o `test -f '$(top_builddir)/libpcsxcore/psxbios.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxbios.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxbios.Tpo $(DEPDIR)/psxbios.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxbios.c' object='psxbios.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxbios.o `test -f '$(top_builddir)/libpcsxcore/psxbios.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxbios.c + +psxbios.obj: $(top_builddir)/libpcsxcore/psxbios.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxbios.obj -MD -MP -MF $(DEPDIR)/psxbios.Tpo -c -o psxbios.obj `if test -f '$(top_builddir)/libpcsxcore/psxbios.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxbios.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxbios.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxbios.Tpo $(DEPDIR)/psxbios.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxbios.c' object='psxbios.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxbios.obj `if test -f '$(top_builddir)/libpcsxcore/psxbios.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxbios.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxbios.c'; fi` + +cdrom.o: $(top_builddir)/libpcsxcore/cdrom.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdrom.o -MD -MP -MF $(DEPDIR)/cdrom.Tpo -c -o cdrom.o `test -f '$(top_builddir)/libpcsxcore/cdrom.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/cdrom.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cdrom.Tpo $(DEPDIR)/cdrom.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/cdrom.c' object='cdrom.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdrom.o `test -f '$(top_builddir)/libpcsxcore/cdrom.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/cdrom.c + +cdrom.obj: $(top_builddir)/libpcsxcore/cdrom.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdrom.obj -MD -MP -MF $(DEPDIR)/cdrom.Tpo -c -o cdrom.obj `if test -f '$(top_builddir)/libpcsxcore/cdrom.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/cdrom.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/cdrom.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cdrom.Tpo $(DEPDIR)/cdrom.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/cdrom.c' object='cdrom.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdrom.obj `if test -f '$(top_builddir)/libpcsxcore/cdrom.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/cdrom.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/cdrom.c'; fi` + +psxcounters.o: $(top_builddir)/libpcsxcore/psxcounters.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxcounters.o -MD -MP -MF $(DEPDIR)/psxcounters.Tpo -c -o psxcounters.o `test -f '$(top_builddir)/libpcsxcore/psxcounters.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxcounters.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxcounters.Tpo $(DEPDIR)/psxcounters.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxcounters.c' object='psxcounters.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxcounters.o `test -f '$(top_builddir)/libpcsxcore/psxcounters.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxcounters.c + +psxcounters.obj: $(top_builddir)/libpcsxcore/psxcounters.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxcounters.obj -MD -MP -MF $(DEPDIR)/psxcounters.Tpo -c -o psxcounters.obj `if test -f '$(top_builddir)/libpcsxcore/psxcounters.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxcounters.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxcounters.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxcounters.Tpo $(DEPDIR)/psxcounters.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxcounters.c' object='psxcounters.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxcounters.obj `if test -f '$(top_builddir)/libpcsxcore/psxcounters.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxcounters.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxcounters.c'; fi` + +psxdma.o: $(top_builddir)/libpcsxcore/psxdma.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxdma.o -MD -MP -MF $(DEPDIR)/psxdma.Tpo -c -o psxdma.o `test -f '$(top_builddir)/libpcsxcore/psxdma.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxdma.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxdma.Tpo $(DEPDIR)/psxdma.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxdma.c' object='psxdma.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxdma.o `test -f '$(top_builddir)/libpcsxcore/psxdma.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxdma.c + +psxdma.obj: $(top_builddir)/libpcsxcore/psxdma.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxdma.obj -MD -MP -MF $(DEPDIR)/psxdma.Tpo -c -o psxdma.obj `if test -f '$(top_builddir)/libpcsxcore/psxdma.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxdma.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxdma.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxdma.Tpo $(DEPDIR)/psxdma.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxdma.c' object='psxdma.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxdma.obj `if test -f '$(top_builddir)/libpcsxcore/psxdma.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxdma.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxdma.c'; fi` + +disr3000a.o: $(top_builddir)/libpcsxcore/disr3000a.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT disr3000a.o -MD -MP -MF $(DEPDIR)/disr3000a.Tpo -c -o disr3000a.o `test -f '$(top_builddir)/libpcsxcore/disr3000a.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/disr3000a.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/disr3000a.Tpo $(DEPDIR)/disr3000a.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/disr3000a.c' object='disr3000a.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o disr3000a.o `test -f '$(top_builddir)/libpcsxcore/disr3000a.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/disr3000a.c + +disr3000a.obj: $(top_builddir)/libpcsxcore/disr3000a.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT disr3000a.obj -MD -MP -MF $(DEPDIR)/disr3000a.Tpo -c -o disr3000a.obj `if test -f '$(top_builddir)/libpcsxcore/disr3000a.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/disr3000a.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/disr3000a.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/disr3000a.Tpo $(DEPDIR)/disr3000a.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/disr3000a.c' object='disr3000a.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o disr3000a.obj `if test -f '$(top_builddir)/libpcsxcore/disr3000a.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/disr3000a.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/disr3000a.c'; fi` + +spu.o: $(top_builddir)/libpcsxcore/spu.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spu.o -MD -MP -MF $(DEPDIR)/spu.Tpo -c -o spu.o `test -f '$(top_builddir)/libpcsxcore/spu.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/spu.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/spu.Tpo $(DEPDIR)/spu.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/spu.c' object='spu.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spu.o `test -f '$(top_builddir)/libpcsxcore/spu.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/spu.c + +spu.obj: $(top_builddir)/libpcsxcore/spu.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spu.obj -MD -MP -MF $(DEPDIR)/spu.Tpo -c -o spu.obj `if test -f '$(top_builddir)/libpcsxcore/spu.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/spu.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/spu.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/spu.Tpo $(DEPDIR)/spu.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/spu.c' object='spu.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spu.obj `if test -f '$(top_builddir)/libpcsxcore/spu.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/spu.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/spu.c'; fi` + +sio.o: $(top_builddir)/libpcsxcore/sio.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sio.o -MD -MP -MF $(DEPDIR)/sio.Tpo -c -o sio.o `test -f '$(top_builddir)/libpcsxcore/sio.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/sio.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sio.Tpo $(DEPDIR)/sio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/sio.c' object='sio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sio.o `test -f '$(top_builddir)/libpcsxcore/sio.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/sio.c + +sio.obj: $(top_builddir)/libpcsxcore/sio.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sio.obj -MD -MP -MF $(DEPDIR)/sio.Tpo -c -o sio.obj `if test -f '$(top_builddir)/libpcsxcore/sio.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/sio.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/sio.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/sio.Tpo $(DEPDIR)/sio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/sio.c' object='sio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sio.obj `if test -f '$(top_builddir)/libpcsxcore/sio.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/sio.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/sio.c'; fi` + +psxhw.o: $(top_builddir)/libpcsxcore/psxhw.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxhw.o -MD -MP -MF $(DEPDIR)/psxhw.Tpo -c -o psxhw.o `test -f '$(top_builddir)/libpcsxcore/psxhw.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxhw.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxhw.Tpo $(DEPDIR)/psxhw.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxhw.c' object='psxhw.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxhw.o `test -f '$(top_builddir)/libpcsxcore/psxhw.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxhw.c + +psxhw.obj: $(top_builddir)/libpcsxcore/psxhw.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxhw.obj -MD -MP -MF $(DEPDIR)/psxhw.Tpo -c -o psxhw.obj `if test -f '$(top_builddir)/libpcsxcore/psxhw.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxhw.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxhw.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxhw.Tpo $(DEPDIR)/psxhw.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxhw.c' object='psxhw.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxhw.obj `if test -f '$(top_builddir)/libpcsxcore/psxhw.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxhw.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxhw.c'; fi` + +mdec.o: $(top_builddir)/libpcsxcore/mdec.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mdec.o -MD -MP -MF $(DEPDIR)/mdec.Tpo -c -o mdec.o `test -f '$(top_builddir)/libpcsxcore/mdec.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/mdec.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mdec.Tpo $(DEPDIR)/mdec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/mdec.c' object='mdec.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mdec.o `test -f '$(top_builddir)/libpcsxcore/mdec.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/mdec.c + +mdec.obj: $(top_builddir)/libpcsxcore/mdec.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mdec.obj -MD -MP -MF $(DEPDIR)/mdec.Tpo -c -o mdec.obj `if test -f '$(top_builddir)/libpcsxcore/mdec.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/mdec.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/mdec.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mdec.Tpo $(DEPDIR)/mdec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/mdec.c' object='mdec.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mdec.obj `if test -f '$(top_builddir)/libpcsxcore/mdec.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/mdec.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/mdec.c'; fi` + +psxmem.o: $(top_builddir)/libpcsxcore/psxmem.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxmem.o -MD -MP -MF $(DEPDIR)/psxmem.Tpo -c -o psxmem.o `test -f '$(top_builddir)/libpcsxcore/psxmem.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxmem.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxmem.Tpo $(DEPDIR)/psxmem.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxmem.c' object='psxmem.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxmem.o `test -f '$(top_builddir)/libpcsxcore/psxmem.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxmem.c + +psxmem.obj: $(top_builddir)/libpcsxcore/psxmem.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxmem.obj -MD -MP -MF $(DEPDIR)/psxmem.Tpo -c -o psxmem.obj `if test -f '$(top_builddir)/libpcsxcore/psxmem.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxmem.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxmem.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxmem.Tpo $(DEPDIR)/psxmem.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxmem.c' object='psxmem.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxmem.obj `if test -f '$(top_builddir)/libpcsxcore/psxmem.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxmem.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxmem.c'; fi` + +misc.o: $(top_builddir)/libpcsxcore/misc.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT misc.o -MD -MP -MF $(DEPDIR)/misc.Tpo -c -o misc.o `test -f '$(top_builddir)/libpcsxcore/misc.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/misc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/misc.Tpo $(DEPDIR)/misc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/misc.c' object='misc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o misc.o `test -f '$(top_builddir)/libpcsxcore/misc.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/misc.c + +misc.obj: $(top_builddir)/libpcsxcore/misc.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT misc.obj -MD -MP -MF $(DEPDIR)/misc.Tpo -c -o misc.obj `if test -f '$(top_builddir)/libpcsxcore/misc.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/misc.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/misc.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/misc.Tpo $(DEPDIR)/misc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/misc.c' object='misc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o misc.obj `if test -f '$(top_builddir)/libpcsxcore/misc.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/misc.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/misc.c'; fi` + +plugins.o: $(top_builddir)/libpcsxcore/plugins.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plugins.o -MD -MP -MF $(DEPDIR)/plugins.Tpo -c -o plugins.o `test -f '$(top_builddir)/libpcsxcore/plugins.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/plugins.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/plugins.Tpo $(DEPDIR)/plugins.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/plugins.c' object='plugins.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plugins.o `test -f '$(top_builddir)/libpcsxcore/plugins.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/plugins.c + +plugins.obj: $(top_builddir)/libpcsxcore/plugins.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plugins.obj -MD -MP -MF $(DEPDIR)/plugins.Tpo -c -o plugins.obj `if test -f '$(top_builddir)/libpcsxcore/plugins.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/plugins.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/plugins.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/plugins.Tpo $(DEPDIR)/plugins.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/plugins.c' object='plugins.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plugins.obj `if test -f '$(top_builddir)/libpcsxcore/plugins.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/plugins.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/plugins.c'; fi` + +decode_xa.o: $(top_builddir)/libpcsxcore/decode_xa.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decode_xa.o -MD -MP -MF $(DEPDIR)/decode_xa.Tpo -c -o decode_xa.o `test -f '$(top_builddir)/libpcsxcore/decode_xa.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/decode_xa.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/decode_xa.Tpo $(DEPDIR)/decode_xa.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/decode_xa.c' object='decode_xa.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decode_xa.o `test -f '$(top_builddir)/libpcsxcore/decode_xa.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/decode_xa.c + +decode_xa.obj: $(top_builddir)/libpcsxcore/decode_xa.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decode_xa.obj -MD -MP -MF $(DEPDIR)/decode_xa.Tpo -c -o decode_xa.obj `if test -f '$(top_builddir)/libpcsxcore/decode_xa.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/decode_xa.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/decode_xa.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/decode_xa.Tpo $(DEPDIR)/decode_xa.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/decode_xa.c' object='decode_xa.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decode_xa.obj `if test -f '$(top_builddir)/libpcsxcore/decode_xa.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/decode_xa.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/decode_xa.c'; fi` + +r3000a.o: $(top_builddir)/libpcsxcore/r3000a.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT r3000a.o -MD -MP -MF $(DEPDIR)/r3000a.Tpo -c -o r3000a.o `test -f '$(top_builddir)/libpcsxcore/r3000a.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/r3000a.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/r3000a.Tpo $(DEPDIR)/r3000a.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/r3000a.c' object='r3000a.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o r3000a.o `test -f '$(top_builddir)/libpcsxcore/r3000a.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/r3000a.c + +r3000a.obj: $(top_builddir)/libpcsxcore/r3000a.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT r3000a.obj -MD -MP -MF $(DEPDIR)/r3000a.Tpo -c -o r3000a.obj `if test -f '$(top_builddir)/libpcsxcore/r3000a.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/r3000a.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/r3000a.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/r3000a.Tpo $(DEPDIR)/r3000a.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/r3000a.c' object='r3000a.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o r3000a.obj `if test -f '$(top_builddir)/libpcsxcore/r3000a.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/r3000a.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/r3000a.c'; fi` + +psxinterpreter.o: $(top_builddir)/libpcsxcore/psxinterpreter.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxinterpreter.o -MD -MP -MF $(DEPDIR)/psxinterpreter.Tpo -c -o psxinterpreter.o `test -f '$(top_builddir)/libpcsxcore/psxinterpreter.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxinterpreter.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxinterpreter.Tpo $(DEPDIR)/psxinterpreter.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxinterpreter.c' object='psxinterpreter.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxinterpreter.o `test -f '$(top_builddir)/libpcsxcore/psxinterpreter.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxinterpreter.c + +psxinterpreter.obj: $(top_builddir)/libpcsxcore/psxinterpreter.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxinterpreter.obj -MD -MP -MF $(DEPDIR)/psxinterpreter.Tpo -c -o psxinterpreter.obj `if test -f '$(top_builddir)/libpcsxcore/psxinterpreter.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxinterpreter.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxinterpreter.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxinterpreter.Tpo $(DEPDIR)/psxinterpreter.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxinterpreter.c' object='psxinterpreter.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxinterpreter.obj `if test -f '$(top_builddir)/libpcsxcore/psxinterpreter.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxinterpreter.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxinterpreter.c'; fi` + +gte.o: $(top_builddir)/libpcsxcore/gte.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gte.o -MD -MP -MF $(DEPDIR)/gte.Tpo -c -o gte.o `test -f '$(top_builddir)/libpcsxcore/gte.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/gte.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gte.Tpo $(DEPDIR)/gte.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/gte.c' object='gte.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gte.o `test -f '$(top_builddir)/libpcsxcore/gte.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/gte.c + +gte.obj: $(top_builddir)/libpcsxcore/gte.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gte.obj -MD -MP -MF $(DEPDIR)/gte.Tpo -c -o gte.obj `if test -f '$(top_builddir)/libpcsxcore/gte.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/gte.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/gte.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gte.Tpo $(DEPDIR)/gte.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/gte.c' object='gte.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gte.obj `if test -f '$(top_builddir)/libpcsxcore/gte.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/gte.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/gte.c'; fi` + +psxhle.o: $(top_builddir)/libpcsxcore/psxhle.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxhle.o -MD -MP -MF $(DEPDIR)/psxhle.Tpo -c -o psxhle.o `test -f '$(top_builddir)/libpcsxcore/psxhle.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxhle.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxhle.Tpo $(DEPDIR)/psxhle.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxhle.c' object='psxhle.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxhle.o `test -f '$(top_builddir)/libpcsxcore/psxhle.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxhle.c + +psxhle.obj: $(top_builddir)/libpcsxcore/psxhle.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxhle.obj -MD -MP -MF $(DEPDIR)/psxhle.Tpo -c -o psxhle.obj `if test -f '$(top_builddir)/libpcsxcore/psxhle.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxhle.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxhle.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxhle.Tpo $(DEPDIR)/psxhle.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxhle.c' object='psxhle.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxhle.obj `if test -f '$(top_builddir)/libpcsxcore/psxhle.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxhle.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxhle.c'; fi` + +debug.o: $(top_builddir)/libpcsxcore/debug.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug.o -MD -MP -MF $(DEPDIR)/debug.Tpo -c -o debug.o `test -f '$(top_builddir)/libpcsxcore/debug.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/debug.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/debug.Tpo $(DEPDIR)/debug.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/debug.c' object='debug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug.o `test -f '$(top_builddir)/libpcsxcore/debug.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/debug.c + +debug.obj: $(top_builddir)/libpcsxcore/debug.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug.obj -MD -MP -MF $(DEPDIR)/debug.Tpo -c -o debug.obj `if test -f '$(top_builddir)/libpcsxcore/debug.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/debug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/debug.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/debug.Tpo $(DEPDIR)/debug.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/debug.c' object='debug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug.obj `if test -f '$(top_builddir)/libpcsxcore/debug.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/debug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/debug.c'; fi` + +psxcommon.o: $(top_builddir)/libpcsxcore/psxcommon.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxcommon.o -MD -MP -MF $(DEPDIR)/psxcommon.Tpo -c -o psxcommon.o `test -f '$(top_builddir)/libpcsxcore/psxcommon.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxcommon.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxcommon.Tpo $(DEPDIR)/psxcommon.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxcommon.c' object='psxcommon.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxcommon.o `test -f '$(top_builddir)/libpcsxcore/psxcommon.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/psxcommon.c + +psxcommon.obj: $(top_builddir)/libpcsxcore/psxcommon.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT psxcommon.obj -MD -MP -MF $(DEPDIR)/psxcommon.Tpo -c -o psxcommon.obj `if test -f '$(top_builddir)/libpcsxcore/psxcommon.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxcommon.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxcommon.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/psxcommon.Tpo $(DEPDIR)/psxcommon.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/psxcommon.c' object='psxcommon.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o psxcommon.obj `if test -f '$(top_builddir)/libpcsxcore/psxcommon.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/psxcommon.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/psxcommon.c'; fi` + +cdriso.o: $(top_builddir)/libpcsxcore/cdriso.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdriso.o -MD -MP -MF $(DEPDIR)/cdriso.Tpo -c -o cdriso.o `test -f '$(top_builddir)/libpcsxcore/cdriso.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/cdriso.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cdriso.Tpo $(DEPDIR)/cdriso.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/cdriso.c' object='cdriso.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdriso.o `test -f '$(top_builddir)/libpcsxcore/cdriso.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/cdriso.c + +cdriso.obj: $(top_builddir)/libpcsxcore/cdriso.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cdriso.obj -MD -MP -MF $(DEPDIR)/cdriso.Tpo -c -o cdriso.obj `if test -f '$(top_builddir)/libpcsxcore/cdriso.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/cdriso.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/cdriso.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cdriso.Tpo $(DEPDIR)/cdriso.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/cdriso.c' object='cdriso.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cdriso.obj `if test -f '$(top_builddir)/libpcsxcore/cdriso.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/cdriso.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/cdriso.c'; fi` + +cheat.o: $(top_builddir)/libpcsxcore/cheat.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cheat.o -MD -MP -MF $(DEPDIR)/cheat.Tpo -c -o cheat.o `test -f '$(top_builddir)/libpcsxcore/cheat.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/cheat.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cheat.Tpo $(DEPDIR)/cheat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/cheat.c' object='cheat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cheat.o `test -f '$(top_builddir)/libpcsxcore/cheat.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/cheat.c + +cheat.obj: $(top_builddir)/libpcsxcore/cheat.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cheat.obj -MD -MP -MF $(DEPDIR)/cheat.Tpo -c -o cheat.obj `if test -f '$(top_builddir)/libpcsxcore/cheat.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/cheat.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/cheat.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/cheat.Tpo $(DEPDIR)/cheat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/cheat.c' object='cheat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cheat.obj `if test -f '$(top_builddir)/libpcsxcore/cheat.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/cheat.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/cheat.c'; fi` + +socket.o: $(top_builddir)/libpcsxcore/socket.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT socket.o -MD -MP -MF $(DEPDIR)/socket.Tpo -c -o socket.o `test -f '$(top_builddir)/libpcsxcore/socket.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/socket.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/socket.Tpo $(DEPDIR)/socket.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/socket.c' object='socket.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o socket.o `test -f '$(top_builddir)/libpcsxcore/socket.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/socket.c + +socket.obj: $(top_builddir)/libpcsxcore/socket.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT socket.obj -MD -MP -MF $(DEPDIR)/socket.Tpo -c -o socket.obj `if test -f '$(top_builddir)/libpcsxcore/socket.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/socket.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/socket.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/socket.Tpo $(DEPDIR)/socket.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/socket.c' object='socket.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o socket.obj `if test -f '$(top_builddir)/libpcsxcore/socket.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/socket.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/socket.c'; fi` + +ppf.o: $(top_builddir)/libpcsxcore/ppf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ppf.o -MD -MP -MF $(DEPDIR)/ppf.Tpo -c -o ppf.o `test -f '$(top_builddir)/libpcsxcore/ppf.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ppf.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ppf.Tpo $(DEPDIR)/ppf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ppf.c' object='ppf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ppf.o `test -f '$(top_builddir)/libpcsxcore/ppf.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ppf.c + +ppf.obj: $(top_builddir)/libpcsxcore/ppf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ppf.obj -MD -MP -MF $(DEPDIR)/ppf.Tpo -c -o ppf.obj `if test -f '$(top_builddir)/libpcsxcore/ppf.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ppf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ppf.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ppf.Tpo $(DEPDIR)/ppf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ppf.c' object='ppf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ppf.obj `if test -f '$(top_builddir)/libpcsxcore/ppf.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ppf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ppf.c'; fi` + +iR3000A-64.o: $(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iR3000A-64.o -MD -MP -MF $(DEPDIR)/iR3000A-64.Tpo -c -o iR3000A-64.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/iR3000A-64.Tpo $(DEPDIR)/iR3000A-64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c' object='iR3000A-64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iR3000A-64.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c + +iR3000A-64.obj: $(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iR3000A-64.obj -MD -MP -MF $(DEPDIR)/iR3000A-64.Tpo -c -o iR3000A-64.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/iR3000A-64.Tpo $(DEPDIR)/iR3000A-64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c' object='iR3000A-64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iR3000A-64.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/iR3000A-64.c'; fi` + +ix86-64.o: $(top_builddir)/libpcsxcore/ix86_64/ix86-64.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86-64.o -MD -MP -MF $(DEPDIR)/ix86-64.Tpo -c -o ix86-64.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86-64.Tpo $(DEPDIR)/ix86-64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c' object='ix86-64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86-64.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c + +ix86-64.obj: $(top_builddir)/libpcsxcore/ix86_64/ix86-64.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86-64.obj -MD -MP -MF $(DEPDIR)/ix86-64.Tpo -c -o ix86-64.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86-64.Tpo $(DEPDIR)/ix86-64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c' object='ix86-64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86-64.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86-64.c'; fi` + +ix86_cpudetect.o: $(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86_cpudetect.o -MD -MP -MF $(DEPDIR)/ix86_cpudetect.Tpo -c -o ix86_cpudetect.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86_cpudetect.Tpo $(DEPDIR)/ix86_cpudetect.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c' object='ix86_cpudetect.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86_cpudetect.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c + +ix86_cpudetect.obj: $(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86_cpudetect.obj -MD -MP -MF $(DEPDIR)/ix86_cpudetect.Tpo -c -o ix86_cpudetect.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86_cpudetect.Tpo $(DEPDIR)/ix86_cpudetect.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c' object='ix86_cpudetect.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86_cpudetect.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86_cpudetect.c'; fi` + +ix86_fpu.o: $(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86_fpu.o -MD -MP -MF $(DEPDIR)/ix86_fpu.Tpo -c -o ix86_fpu.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86_fpu.Tpo $(DEPDIR)/ix86_fpu.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c' object='ix86_fpu.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86_fpu.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c + +ix86_fpu.obj: $(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86_fpu.obj -MD -MP -MF $(DEPDIR)/ix86_fpu.Tpo -c -o ix86_fpu.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86_fpu.Tpo $(DEPDIR)/ix86_fpu.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c' object='ix86_fpu.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86_fpu.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86_fpu.c'; fi` + +ix86_3dnow.o: $(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86_3dnow.o -MD -MP -MF $(DEPDIR)/ix86_3dnow.Tpo -c -o ix86_3dnow.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86_3dnow.Tpo $(DEPDIR)/ix86_3dnow.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c' object='ix86_3dnow.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86_3dnow.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c + +ix86_3dnow.obj: $(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86_3dnow.obj -MD -MP -MF $(DEPDIR)/ix86_3dnow.Tpo -c -o ix86_3dnow.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86_3dnow.Tpo $(DEPDIR)/ix86_3dnow.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c' object='ix86_3dnow.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86_3dnow.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86_3dnow.c'; fi` + +ix86_mmx.o: $(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86_mmx.o -MD -MP -MF $(DEPDIR)/ix86_mmx.Tpo -c -o ix86_mmx.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86_mmx.Tpo $(DEPDIR)/ix86_mmx.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c' object='ix86_mmx.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86_mmx.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c + +ix86_mmx.obj: $(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86_mmx.obj -MD -MP -MF $(DEPDIR)/ix86_mmx.Tpo -c -o ix86_mmx.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86_mmx.Tpo $(DEPDIR)/ix86_mmx.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c' object='ix86_mmx.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86_mmx.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86_mmx.c'; fi` + +ix86_sse.o: $(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86_sse.o -MD -MP -MF $(DEPDIR)/ix86_sse.Tpo -c -o ix86_sse.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86_sse.Tpo $(DEPDIR)/ix86_sse.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c' object='ix86_sse.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86_sse.o `test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c + +ix86_sse.obj: $(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86_sse.obj -MD -MP -MF $(DEPDIR)/ix86_sse.Tpo -c -o ix86_sse.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86_sse.Tpo $(DEPDIR)/ix86_sse.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c' object='ix86_sse.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86_sse.obj `if test -f '$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86_64/ix86_sse.c'; fi` + +iR3000A.o: $(top_builddir)/libpcsxcore/ix86/iR3000A.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iR3000A.o -MD -MP -MF $(DEPDIR)/iR3000A.Tpo -c -o iR3000A.o `test -f '$(top_builddir)/libpcsxcore/ix86/iR3000A.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86/iR3000A.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/iR3000A.Tpo $(DEPDIR)/iR3000A.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86/iR3000A.c' object='iR3000A.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iR3000A.o `test -f '$(top_builddir)/libpcsxcore/ix86/iR3000A.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86/iR3000A.c + +iR3000A.obj: $(top_builddir)/libpcsxcore/ix86/iR3000A.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iR3000A.obj -MD -MP -MF $(DEPDIR)/iR3000A.Tpo -c -o iR3000A.obj `if test -f '$(top_builddir)/libpcsxcore/ix86/iR3000A.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86/iR3000A.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86/iR3000A.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/iR3000A.Tpo $(DEPDIR)/iR3000A.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86/iR3000A.c' object='iR3000A.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iR3000A.obj `if test -f '$(top_builddir)/libpcsxcore/ix86/iR3000A.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86/iR3000A.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86/iR3000A.c'; fi` + +ix86.o: $(top_builddir)/libpcsxcore/ix86/ix86.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86.o -MD -MP -MF $(DEPDIR)/ix86.Tpo -c -o ix86.o `test -f '$(top_builddir)/libpcsxcore/ix86/ix86.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86/ix86.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86.Tpo $(DEPDIR)/ix86.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86/ix86.c' object='ix86.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86.o `test -f '$(top_builddir)/libpcsxcore/ix86/ix86.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ix86/ix86.c + +ix86.obj: $(top_builddir)/libpcsxcore/ix86/ix86.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ix86.obj -MD -MP -MF $(DEPDIR)/ix86.Tpo -c -o ix86.obj `if test -f '$(top_builddir)/libpcsxcore/ix86/ix86.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86/ix86.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86/ix86.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ix86.Tpo $(DEPDIR)/ix86.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ix86/ix86.c' object='ix86.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ix86.obj `if test -f '$(top_builddir)/libpcsxcore/ix86/ix86.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ix86/ix86.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ix86/ix86.c'; fi` + +pR3000A.o: $(top_builddir)/libpcsxcore/ppc/pR3000A.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pR3000A.o -MD -MP -MF $(DEPDIR)/pR3000A.Tpo -c -o pR3000A.o `test -f '$(top_builddir)/libpcsxcore/ppc/pR3000A.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ppc/pR3000A.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pR3000A.Tpo $(DEPDIR)/pR3000A.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ppc/pR3000A.c' object='pR3000A.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pR3000A.o `test -f '$(top_builddir)/libpcsxcore/ppc/pR3000A.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ppc/pR3000A.c + +pR3000A.obj: $(top_builddir)/libpcsxcore/ppc/pR3000A.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pR3000A.obj -MD -MP -MF $(DEPDIR)/pR3000A.Tpo -c -o pR3000A.obj `if test -f '$(top_builddir)/libpcsxcore/ppc/pR3000A.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ppc/pR3000A.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ppc/pR3000A.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/pR3000A.Tpo $(DEPDIR)/pR3000A.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ppc/pR3000A.c' object='pR3000A.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pR3000A.obj `if test -f '$(top_builddir)/libpcsxcore/ppc/pR3000A.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ppc/pR3000A.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ppc/pR3000A.c'; fi` + +ppc.o: $(top_builddir)/libpcsxcore/ppc/ppc.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ppc.o -MD -MP -MF $(DEPDIR)/ppc.Tpo -c -o ppc.o `test -f '$(top_builddir)/libpcsxcore/ppc/ppc.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ppc/ppc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ppc.Tpo $(DEPDIR)/ppc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ppc/ppc.c' object='ppc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ppc.o `test -f '$(top_builddir)/libpcsxcore/ppc/ppc.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ppc/ppc.c + +ppc.obj: $(top_builddir)/libpcsxcore/ppc/ppc.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ppc.obj -MD -MP -MF $(DEPDIR)/ppc.Tpo -c -o ppc.obj `if test -f '$(top_builddir)/libpcsxcore/ppc/ppc.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ppc/ppc.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ppc/ppc.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ppc.Tpo $(DEPDIR)/ppc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ppc/ppc.c' object='ppc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ppc.obj `if test -f '$(top_builddir)/libpcsxcore/ppc/ppc.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ppc/ppc.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ppc/ppc.c'; fi` + +reguse.o: $(top_builddir)/libpcsxcore/ppc/reguse.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reguse.o -MD -MP -MF $(DEPDIR)/reguse.Tpo -c -o reguse.o `test -f '$(top_builddir)/libpcsxcore/ppc/reguse.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ppc/reguse.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/reguse.Tpo $(DEPDIR)/reguse.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ppc/reguse.c' object='reguse.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reguse.o `test -f '$(top_builddir)/libpcsxcore/ppc/reguse.c' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ppc/reguse.c + +reguse.obj: $(top_builddir)/libpcsxcore/ppc/reguse.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT reguse.obj -MD -MP -MF $(DEPDIR)/reguse.Tpo -c -o reguse.obj `if test -f '$(top_builddir)/libpcsxcore/ppc/reguse.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ppc/reguse.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ppc/reguse.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/reguse.Tpo $(DEPDIR)/reguse.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_builddir)/libpcsxcore/ppc/reguse.c' object='reguse.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reguse.obj `if test -f '$(top_builddir)/libpcsxcore/ppc/reguse.c'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ppc/reguse.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ppc/reguse.c'; fi` + +.s.o: + $(CCASCOMPILE) -c -o $@ $< + +.s.obj: + $(CCASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.s.lo: + $(LTCCASCOMPILE) -c -o $@ $< + +libpcsxcore_a-pasm.o: $(top_builddir)/libpcsxcore/ppc/pasm.s + $(CCAS) $(libpcsxcore_a_CCASFLAGS) $(CCASFLAGS) -c -o libpcsxcore_a-pasm.o `test -f '$(top_builddir)/libpcsxcore/ppc/pasm.s' || echo '$(srcdir)/'`$(top_builddir)/libpcsxcore/ppc/pasm.s + +libpcsxcore_a-pasm.obj: $(top_builddir)/libpcsxcore/ppc/pasm.s + $(CCAS) $(libpcsxcore_a_CCASFLAGS) $(CCASFLAGS) -c -o libpcsxcore_a-pasm.obj `if test -f '$(top_builddir)/libpcsxcore/ppc/pasm.s'; then $(CYGPATH_W) '$(top_builddir)/libpcsxcore/ppc/pasm.s'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/libpcsxcore/ppc/pasm.s'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c new file mode 100644 index 00000000..18b0de92 --- /dev/null +++ b/libpcsxcore/cdriso.c @@ -0,0 +1,881 @@ +/*************************************************************************** + * Copyright (C) 2007 PCSX-df Team * + * Copyright (C) 2009 Wei Mingzhi * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#include "psxcommon.h" +#include "plugins.h" +#include "cdrom.h" +#include "cdriso.h" + +#ifdef _WIN32 +#include +#include +#else +#include +#include +#endif + +static FILE *cdHandle = NULL; +static FILE *cddaHandle = NULL; +static FILE *subHandle = NULL; + +static boolean subChanMixed = FALSE; +static boolean subChanRaw = FALSE; + +static unsigned char cdbuffer[DATA_SIZE]; +static unsigned char subbuffer[SUB_FRAMESIZE]; + +static unsigned char sndbuffer[CD_FRAMESIZE_RAW * 10]; + +#define CDDA_FRAMETIME (1000 * (sizeof(sndbuffer) / CD_FRAMESIZE_RAW) / 75) + +#ifdef _WIN32 +static HANDLE threadid; +#else +static pthread_t threadid; +#endif +static unsigned int initial_offset = 0; +static volatile boolean playing = FALSE; +static boolean cddaBigEndian = FALSE; +static volatile unsigned int cddaCurOffset = 0; + +char* CALLBACK CDR__getDriveLetter(void); +long CALLBACK CDR__configure(void); +long CALLBACK CDR__test(void); +void CALLBACK CDR__about(void); +long CALLBACK CDR__setfilename(char *filename); +long CALLBACK CDR__getStatus(struct CdrStat *stat); + +extern void *hCDRDriver; + +struct trackinfo { + enum {DATA, CDDA} type; + char start[3]; // MSF-format + char length[3]; // MSF-format +}; + +#define MAXTRACKS 100 /* How many tracks can a CD hold? */ + +static int numtracks = 0; +static struct trackinfo ti[MAXTRACKS]; + +// get a sector from a msf-array +static unsigned int msf2sec(char *msf) { + return ((msf[0] * 60 + msf[1]) * 75) + msf[2]; +} + +static void sec2msf(unsigned int s, char *msf) { + msf[0] = s / 75 / 60; + s = s - msf[0] * 75 * 60; + msf[1] = s / 75; + s = s - msf[1] * 75; + msf[2] = s; +} + +// divide a string of xx:yy:zz into m, s, f +static void tok2msf(char *time, char *msf) { + char *token; + + token = strtok(time, ":"); + if (token) { + msf[0] = atoi(token); + } + else { + msf[0] = 0; + } + + token = strtok(NULL, ":"); + if (token) { + msf[1] = atoi(token); + } + else { + msf[1] = 0; + } + + token = strtok(NULL, ":"); + if (token) { + msf[2] = atoi(token); + } + else { + msf[2] = 0; + } +} + +#ifndef _WIN32 +static long GetTickCount(void) { + static time_t initial_time = 0; + struct timeval now; + + gettimeofday(&now, NULL); + + if (initial_time == 0) { + initial_time = now.tv_sec; + } + + return (now.tv_sec - initial_time) * 1000L + now.tv_usec / 1000L; +} +#endif + +// this thread plays audio data +#ifdef _WIN32 +static void playthread(void *param) +#else +static void *playthread(void *param) +#endif +{ + long d, t, i, s; + unsigned char tmp; + + t = GetTickCount(); + + while (playing) { + d = t - (long)GetTickCount(); + if (d <= 0) { + d = 1; + } + else if (d > CDDA_FRAMETIME) { + d = CDDA_FRAMETIME; + } +#ifdef _WIN32 + Sleep(d); +#else + usleep(d * 1000); +#endif + + t = GetTickCount() + CDDA_FRAMETIME; + + if (subChanMixed) { + s = 0; + + for (i = 0; i < sizeof(sndbuffer) / CD_FRAMESIZE_RAW; i++) { + // read one sector + d = fread(sndbuffer + CD_FRAMESIZE_RAW * i, 1, CD_FRAMESIZE_RAW, cddaHandle); + if (d < CD_FRAMESIZE_RAW) { + break; + } + + s += d; + + // skip the subchannel data + fseek(cddaHandle, SUB_FRAMESIZE, SEEK_CUR); + } + } + else { + s = fread(sndbuffer, 1, sizeof(sndbuffer), cddaHandle); + } + + if (s == 0) { + playing = FALSE; + fclose(cddaHandle); + cddaHandle = NULL; + initial_offset = 0; + break; + } + + if (!cdr.Muted && playing) { + if (cddaBigEndian) { + for (i = 0; i < s / 2; i++) { + tmp = sndbuffer[i * 2]; + sndbuffer[i * 2] = sndbuffer[i * 2 + 1]; + sndbuffer[i * 2 + 1] = tmp; + } + } + + SPU_playCDDAchannel((short *)sndbuffer, s); + } + + cddaCurOffset += s; + } + +#ifdef _WIN32 + _endthread(); +#else + pthread_exit(0); + return NULL; +#endif +} + +// stop the CDDA playback +static void stopCDDA() { + if (!playing) { + return; + } + + playing = FALSE; +#ifdef _WIN32 + WaitForSingleObject(threadid, INFINITE); +#else + pthread_join(threadid, NULL); +#endif + + if (cddaHandle != NULL) { + fclose(cddaHandle); + cddaHandle = NULL; + } + + initial_offset = 0; +} + +// start the CDDA playback +static void startCDDA(unsigned int offset) { + if (playing) { + if (initial_offset == offset) { + return; + } + stopCDDA(); + } + + cddaHandle = fopen(GetIsoFile(), "rb"); + if (cddaHandle == NULL) { + return; + } + + initial_offset = offset; + cddaCurOffset = initial_offset; + fseek(cddaHandle, initial_offset, SEEK_SET); + + playing = TRUE; + +#ifdef _WIN32 + threadid = (HANDLE)_beginthread(playthread, 0, NULL); +#else + pthread_create(&threadid, NULL, playthread, NULL); +#endif +} + +// this function tries to get the .toc file of the given .bin +// the necessary data is put into the ti (trackinformation)-array +static int parsetoc(const char *isofile) { + char tocname[MAXPATHLEN]; + FILE *fi; + char linebuf[256], dummy[256], name[256]; + char *token; + char time[20], time2[20]; + unsigned int t; + + numtracks = 0; + + // copy name of the iso and change extension from .bin to .toc + strncpy(tocname, isofile, sizeof(tocname)); + tocname[MAXPATHLEN - 1] = '\0'; + if (strlen(tocname) >= 4) { + strcpy(tocname + strlen(tocname) - 4, ".toc"); + } + else { + return -1; + } + + if ((fi = fopen(tocname, "r")) == NULL) { + // try changing extension to .cue (to satisfy some stupid tutorials) + strcpy(tocname + strlen(tocname) - 4, ".cue"); + if ((fi = fopen(tocname, "r")) == NULL) { + // if filename is image.toc.bin, try removing .bin (for Brasero) + strcpy(tocname, isofile); + t = strlen(tocname); + if (t >= 8 && strcmp(tocname + t - 8, ".toc.bin") == 0) { + tocname[t - 4] = '\0'; + if ((fi = fopen(tocname, "r")) == NULL) { + return -1; + } + } + else { + return -1; + } + } + } + + memset(&ti, 0, sizeof(ti)); + cddaBigEndian = TRUE; // cdrdao uses big-endian for CD Audio + + // parse the .toc file + while (fgets(linebuf, sizeof(linebuf), fi) != NULL) { + // search for tracks + strncpy(dummy, linebuf, sizeof(linebuf)); + token = strtok(dummy, " "); + + if (token == NULL) continue; + + if (!strcmp(token, "TRACK")) { + // get type of track + token = strtok(NULL, " "); + numtracks++; + + if (!strncmp(token, "MODE2_RAW", 9)) { + ti[numtracks].type = DATA; + sec2msf(2 * 75, ti[numtracks].start); // assume data track on 0:2:0 + + // check if this image contains mixed subchannel data + token = strtok(NULL, " "); + if (token != NULL && !strncmp(token, "RW_RAW", 6)) { + subChanMixed = TRUE; + subChanRaw = TRUE; + } + } + else if (!strncmp(token, "AUDIO", 5)) { + ti[numtracks].type = CDDA; + } + } + else if (!strcmp(token, "DATAFILE")) { + if (ti[numtracks].type == CDDA) { + sscanf(linebuf, "DATAFILE \"%[^\"]\" #%d %8s", name, &t, time2); + t /= CD_FRAMESIZE_RAW + (subChanMixed ? SUB_FRAMESIZE : 0); + t += 2 * 75; + sec2msf(t, (char *)&ti[numtracks].start); + tok2msf((char *)&time2, (char *)&ti[numtracks].length); + } + else { + sscanf(linebuf, "DATAFILE \"%[^\"]\" %8s", name, time); + tok2msf((char *)&time, (char *)&ti[numtracks].length); + } + } + else if (!strcmp(token, "FILE")) { + sscanf(linebuf, "FILE \"%[^\"]\" #%d %8s %8s", name, &t, time, time2); + tok2msf((char *)&time, (char *)&ti[numtracks].start); + t /= CD_FRAMESIZE_RAW + (subChanMixed ? SUB_FRAMESIZE : 0); + t += msf2sec(ti[numtracks].start) + 2 * 75; + sec2msf(t, (char *)&ti[numtracks].start); + tok2msf((char *)&time2, (char *)&ti[numtracks].length); + } + } + + fclose(fi); + + return 0; +} + +// this function tries to get the .cue file of the given .bin +// the necessary data is put into the ti (trackinformation)-array +static int parsecue(const char *isofile) { + char cuename[MAXPATHLEN]; + FILE *fi; + char *token; + char time[20]; + char *tmp; + char linebuf[256], dummy[256]; + unsigned int t; + + numtracks = 0; + + // copy name of the iso and change extension from .bin to .cue + strncpy(cuename, isofile, sizeof(cuename)); + cuename[MAXPATHLEN - 1] = '\0'; + if (strlen(cuename) >= 4) { + strcpy(cuename + strlen(cuename) - 4, ".cue"); + } + else { + return -1; + } + + if ((fi = fopen(cuename, "r")) == NULL) { + return -1; + } + + // Some stupid tutorials wrongly tell users to use cdrdao to rip a + // "bin/cue" image, which is in fact a "bin/toc" image. So let's check + // that... + if (fgets(linebuf, sizeof(linebuf), fi) != NULL) { + if (!strncmp(linebuf, "CD_ROM_XA", 9)) { + // Don't proceed further, as this is actually a .toc file rather + // than a .cue file. + fclose(fi); + return parsetoc(isofile); + } + fseek(fi, 0, SEEK_SET); + } + + memset(&ti, 0, sizeof(ti)); + + while (fgets(linebuf, sizeof(linebuf), fi) != NULL) { + strncpy(dummy, linebuf, sizeof(linebuf)); + token = strtok(dummy, " "); + + if (token == NULL) { + continue; + } + + if (!strcmp(token, "TRACK")){ + numtracks++; + + if (strstr(linebuf, "AUDIO") != NULL) { + ti[numtracks].type = CDDA; + } + else if (strstr(linebuf, "MODE1/2352") != NULL || strstr(linebuf, "MODE2/2352") != NULL) { + ti[numtracks].type = DATA; + } + } + else if (!strcmp(token, "INDEX")) { + tmp = strstr(linebuf, "INDEX"); + if (tmp != NULL) { + tmp += strlen("INDEX") + 3; // 3 - space + numeric index + while (*tmp == ' ') tmp++; + if (*tmp != '\n') sscanf(tmp, "%8s", time); + } + + tok2msf((char *)&time, (char *)&ti[numtracks].start); + + t = msf2sec(ti[numtracks].start) + 2 * 75; + sec2msf(t, ti[numtracks].start); + + // If we've already seen another track, this is its end + if (numtracks > 1) { + t = msf2sec(ti[numtracks].start) - msf2sec(ti[numtracks - 1].start); + sec2msf(t, ti[numtracks - 1].length); + } + } + } + + fclose(fi); + + // Fill out the last track's end based on size + if (numtracks >= 1) { + fseek(cdHandle, 0, SEEK_END); + t = ftell(cdHandle) / 2352 - msf2sec(ti[numtracks].start) + 2 * 75; + sec2msf(t, ti[numtracks].length); + } + + return 0; +} + +// this function tries to get the .ccd file of the given .img +// the necessary data is put into the ti (trackinformation)-array +static int parseccd(const char *isofile) { + char ccdname[MAXPATHLEN]; + FILE *fi; + char linebuf[256]; + unsigned int t; + + numtracks = 0; + + // copy name of the iso and change extension from .img to .ccd + strncpy(ccdname, isofile, sizeof(ccdname)); + ccdname[MAXPATHLEN - 1] = '\0'; + if (strlen(ccdname) >= 4) { + strcpy(ccdname + strlen(ccdname) - 4, ".ccd"); + } + else { + return -1; + } + + if ((fi = fopen(ccdname, "r")) == NULL) { + return -1; + } + + memset(&ti, 0, sizeof(ti)); + + while (fgets(linebuf, sizeof(linebuf), fi) != NULL) { + if (!strncmp(linebuf, "[TRACK", 6)){ + numtracks++; + } + else if (!strncmp(linebuf, "MODE=", 5)) { + sscanf(linebuf, "MODE=%d", &t); + ti[numtracks].type = ((t == 0) ? CDDA : DATA); + } + else if (!strncmp(linebuf, "INDEX 1=", 8)) { + sscanf(linebuf, "INDEX 1=%d", &t); + sec2msf(t + 2 * 75, ti[numtracks].start); + + // If we've already seen another track, this is its end + if (numtracks > 1) { + t = msf2sec(ti[numtracks].start) - msf2sec(ti[numtracks - 1].start); + sec2msf(t, ti[numtracks - 1].length); + } + } + } + + fclose(fi); + + // Fill out the last track's end based on size + if (numtracks >= 1) { + fseek(cdHandle, 0, SEEK_END); + t = ftell(cdHandle) / 2352 - msf2sec(ti[numtracks].start) + 2 * 75; + sec2msf(t, ti[numtracks].length); + } + + return 0; +} + +// this function tries to get the .mds file of the given .mdf +// the necessary data is put into the ti (trackinformation)-array +static int parsemds(const char *isofile) { + char mdsname[MAXPATHLEN]; + FILE *fi; + unsigned int offset, extra_offset, l, i; + unsigned short s; + + numtracks = 0; + + // copy name of the iso and change extension from .mdf to .mds + strncpy(mdsname, isofile, sizeof(mdsname)); + mdsname[MAXPATHLEN - 1] = '\0'; + if (strlen(mdsname) >= 4) { + strcpy(mdsname + strlen(mdsname) - 4, ".mds"); + } + else { + return -1; + } + + if ((fi = fopen(mdsname, "rb")) == NULL) { + return -1; + } + + memset(&ti, 0, sizeof(ti)); + + // check if it's a valid mds file + fread(&i, 1, sizeof(unsigned int), fi); + i = SWAP32(i); + if (i != 0x4944454D) { + // not an valid mds file + fclose(fi); + return -1; + } + + // get offset to session block + fseek(fi, 0x50, SEEK_SET); + fread(&offset, 1, sizeof(unsigned int), fi); + offset = SWAP32(offset); + + // get total number of tracks + offset += 14; + fseek(fi, offset, SEEK_SET); + fread(&s, 1, sizeof(unsigned short), fi); + s = SWAP16(s); + numtracks = s; + + // get offset to track blocks + fseek(fi, 4, SEEK_CUR); + fread(&offset, 1, sizeof(unsigned int), fi); + offset = SWAP32(offset); + + // skip lead-in data + while (1) { + fseek(fi, offset + 4, SEEK_SET); + if (fgetc(fi) < 0xA0) { + break; + } + offset += 0x50; + } + + // check if the image contains mixed subchannel data + fseek(fi, offset + 1, SEEK_SET); + subChanMixed = (fgetc(fi) ? TRUE : FALSE); + + // read track data + for (i = 1; i <= numtracks; i++) { + fseek(fi, offset, SEEK_SET); + + // get the track type + ti[i].type = ((fgetc(fi) == 0xA9) ? CDDA : DATA); + fseek(fi, 8, SEEK_CUR); + + // get the track starting point + ti[i].start[0] = fgetc(fi); + ti[i].start[1] = fgetc(fi); + ti[i].start[2] = fgetc(fi); + + if (i > 1) { + l = msf2sec(ti[i].start); + sec2msf(l - 2 * 75, ti[i].start); // ??? + } + + // get the track length + fread(&extra_offset, 1, sizeof(unsigned int), fi); + extra_offset = SWAP32(extra_offset); + + fseek(fi, extra_offset + 4, SEEK_SET); + fread(&l, 1, sizeof(unsigned int), fi); + l = SWAP32(l); + sec2msf(l, ti[i].length); + + offset += 0x50; + } + + fclose(fi); + return 0; +} + +// this function tries to get the .sub file of the given .img +static int opensubfile(const char *isoname) { + char subname[MAXPATHLEN]; + + // copy name of the iso and change extension from .img to .sub + strncpy(subname, isoname, sizeof(subname)); + subname[MAXPATHLEN - 1] = '\0'; + if (strlen(subname) >= 4) { + strcpy(subname + strlen(subname) - 4, ".sub"); + } + else { + return -1; + } + + subHandle = fopen(subname, "rb"); + if (subHandle == NULL) { + return -1; + } + + return 0; +} + +static long CALLBACK ISOinit(void) { + assert(cdHandle == NULL); + assert(subHandle == NULL); + + return 0; // do nothing +} + +static long CALLBACK ISOshutdown(void) { + if (cdHandle != NULL) { + fclose(cdHandle); + cdHandle = NULL; + } + if (subHandle != NULL) { + fclose(subHandle); + subHandle = NULL; + } + stopCDDA(); + return 0; +} + +static void PrintTracks(void) { + int i; + + for (i = 1; i <= numtracks; i++) { + SysPrintf(_("Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n"), + i, (ti[i].type == DATA ? "DATA" : "AUDIO"), + ti[i].start[0], ti[i].start[1], ti[i].start[2], + ti[i].length[0], ti[i].length[1], ti[i].length[2]); + } +} + +// This function is invoked by the front-end when opening an ISO +// file for playback +static long CALLBACK ISOopen(void) { + if (cdHandle != NULL) { + return 0; // it's already open + } + + cdHandle = fopen(GetIsoFile(), "rb"); + if (cdHandle == NULL) { + return -1; + } + + SysPrintf(_("Loaded CD Image: %s"), GetIsoFile()); + + cddaBigEndian = FALSE; + subChanMixed = FALSE; + subChanRaw = FALSE; + + if (parsecue(GetIsoFile()) == 0) { + SysPrintf("[+cue]"); + } + else if (parsetoc(GetIsoFile()) == 0) { + SysPrintf("[+toc]"); + } + else if (parseccd(GetIsoFile()) == 0) { + SysPrintf("[+ccd]"); + } + else if (parsemds(GetIsoFile()) == 0) { + SysPrintf("[+mds]"); + } + + if (!subChanMixed && opensubfile(GetIsoFile()) == 0) { + SysPrintf("[+sub]"); + } + + SysPrintf(".\n"); + + PrintTracks(); + + return 0; +} + +static long CALLBACK ISOclose(void) { + if (cdHandle != NULL) { + fclose(cdHandle); + cdHandle = NULL; + } + if (subHandle != NULL) { + fclose(subHandle); + subHandle = NULL; + } + stopCDDA(); + return 0; +} + +// return Starting and Ending Track +// buffer: +// byte 0 - start track +// byte 1 - end track +static long CALLBACK ISOgetTN(unsigned char *buffer) { + buffer[0] = 1; + + if (numtracks > 0) { + buffer[1] = numtracks; + } + else { + buffer[1] = 1; + } + + return 0; +} + +// return Track Time +// buffer: +// byte 0 - frame +// byte 1 - second +// byte 2 - minute +static long CALLBACK ISOgetTD(unsigned char track, unsigned char *buffer) { + if (numtracks > 0 && track <= numtracks) { + buffer[2] = ti[track].start[0]; + buffer[1] = ti[track].start[1]; + buffer[0] = ti[track].start[2]; + } + else { + buffer[2] = 0; + buffer[1] = 2; + buffer[0] = 0; + } + + return 0; +} + +// decode 'raw' subchannel data ripped by cdrdao +static void DecodeRawSubData(void) { + unsigned char subQData[12]; + int i; + + memset(subQData, 0, sizeof(subQData)); + + for (i = 0; i < 8 * 12; i++) { + if (subbuffer[i] & (1 << 6)) { // only subchannel Q is needed + subQData[i >> 3] |= (1 << (7 - (i & 7))); + } + } + + memcpy(&subbuffer[12], subQData, 12); +} + +// read track +// time: byte 0 - minute; byte 1 - second; byte 2 - frame +// uses bcd format +static long CALLBACK ISOreadTrack(unsigned char *time) { + if (cdHandle == NULL) { + return -1; + } + + if (subChanMixed) { + fseek(cdHandle, MSF2SECT(btoi(time[0]), btoi(time[1]), btoi(time[2])) * (CD_FRAMESIZE_RAW + SUB_FRAMESIZE) + 12, SEEK_SET); + fread(cdbuffer, 1, DATA_SIZE, cdHandle); + fread(subbuffer, 1, SUB_FRAMESIZE, cdHandle); + + if (subChanRaw) DecodeRawSubData(); + } + else { + fseek(cdHandle, MSF2SECT(btoi(time[0]), btoi(time[1]), btoi(time[2])) * CD_FRAMESIZE_RAW + 12, SEEK_SET); + fread(cdbuffer, 1, DATA_SIZE, cdHandle); + + if (subHandle != NULL) { + fseek(subHandle, MSF2SECT(btoi(time[0]), btoi(time[1]), btoi(time[2])) * SUB_FRAMESIZE, SEEK_SET); + fread(subbuffer, 1, SUB_FRAMESIZE, subHandle); + + if (subChanRaw) DecodeRawSubData(); + } + } + + return 0; +} + +// return readed track +static unsigned char * CALLBACK ISOgetBuffer(void) { + return cdbuffer; +} + +// plays cdda audio +// sector: byte 0 - minute; byte 1 - second; byte 2 - frame +// does NOT uses bcd format +static long CALLBACK ISOplay(unsigned char *time) { + if (SPU_playCDDAchannel != NULL) { + if (subChanMixed) { + startCDDA(MSF2SECT(time[0], time[1], time[2]) * (CD_FRAMESIZE_RAW + SUB_FRAMESIZE)); + } + else { + startCDDA(MSF2SECT(time[0], time[1], time[2]) * CD_FRAMESIZE_RAW); + } + } + return 0; +} + +// stops cdda audio +static long CALLBACK ISOstop(void) { + stopCDDA(); + return 0; +} + +// gets subchannel data +static unsigned char* CALLBACK ISOgetBufferSub(void) { + if (subHandle != NULL || subChanMixed) { + return subbuffer; + } + + return NULL; +} + +static long CALLBACK ISOgetStatus(struct CdrStat *stat) { + int sec; + + CDR__getStatus(stat); + + if (playing) { + stat->Type = 0x02; + stat->Status |= 0x80; + sec = cddaCurOffset / CD_FRAMESIZE_RAW; + sec2msf(sec, (char *)stat->Time); + } + else { + stat->Type = 0x01; + } + + return 0; +} + +void cdrIsoInit(void) { + CDR_init = ISOinit; + CDR_shutdown = ISOshutdown; + CDR_open = ISOopen; + CDR_close = ISOclose; + CDR_getTN = ISOgetTN; + CDR_getTD = ISOgetTD; + CDR_readTrack = ISOreadTrack; + CDR_getBuffer = ISOgetBuffer; + CDR_play = ISOplay; + CDR_stop = ISOstop; + CDR_getBufferSub = ISOgetBufferSub; + CDR_getStatus = ISOgetStatus; + + CDR_getDriveLetter = CDR__getDriveLetter; + CDR_configure = CDR__configure; + CDR_test = CDR__test; + CDR_about = CDR__about; + CDR_setfilename = CDR__setfilename; + + numtracks = 0; +} + +int cdrIsoActive(void) { + return (cdHandle != NULL); +} diff --git a/libpcsxcore/cdriso.h b/libpcsxcore/cdriso.h new file mode 100644 index 00000000..27d1ecd0 --- /dev/null +++ b/libpcsxcore/cdriso.h @@ -0,0 +1,34 @@ +/*************************************************************************** + * Copyright (C) 2007 PCSX-df Team * + * Copyright (C) 2009 Wei Mingzhi * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef CDRISO_H +#define CDRISO_H + +#ifdef __cplusplus +extern "C" { +#endif + +void cdrIsoInit(void); +int cdrIsoActive(void); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c new file mode 100644 index 00000000..92e4b7f2 --- /dev/null +++ b/libpcsxcore/cdrom.c @@ -0,0 +1,1138 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* Handles all CD-ROM registers and functions. +*/ + +#include "cdrom.h" +#include "ppf.h" + +cdrStruct cdr; + +/* CD-ROM magic numbers */ +#define CdlSync 0 +#define CdlNop 1 +#define CdlSetloc 2 +#define CdlPlay 3 +#define CdlForward 4 +#define CdlBackward 5 +#define CdlReadN 6 +#define CdlStandby 7 +#define CdlStop 8 +#define CdlPause 9 +#define CdlInit 10 +#define CdlMute 11 +#define CdlDemute 12 +#define CdlSetfilter 13 +#define CdlSetmode 14 +#define CdlGetmode 15 +#define CdlGetlocL 16 +#define CdlGetlocP 17 +#define CdlReadT 18 +#define CdlGetTN 19 +#define CdlGetTD 20 +#define CdlSeekL 21 +#define CdlSeekP 22 +#define CdlSetclock 23 +#define CdlGetclock 24 +#define CdlTest 25 +#define CdlID 26 +#define CdlReadS 27 +#define CdlReset 28 +#define CdlReadToc 30 + +#define AUTOPAUSE 249 +#define READ_ACK 250 +#define READ 251 +#define REPPLAY_ACK 252 +#define REPPLAY 253 +#define ASYNC 254 +/* don't set 255, it's reserved */ + +char *CmdName[0x100]= { + "CdlSync", "CdlNop", "CdlSetloc", "CdlPlay", + "CdlForward", "CdlBackward", "CdlReadN", "CdlStandby", + "CdlStop", "CdlPause", "CdlInit", "CdlMute", + "CdlDemute", "CdlSetfilter", "CdlSetmode", "CdlGetmode", + "CdlGetlocL", "CdlGetlocP", "CdlReadT", "CdlGetTN", + "CdlGetTD", "CdlSeekL", "CdlSeekP", "CdlSetclock", + "CdlGetclock", "CdlTest", "CdlID", "CdlReadS", + "CdlReset", NULL, "CDlReadToc", NULL +}; + +unsigned char Test04[] = { 0 }; +unsigned char Test05[] = { 0 }; +unsigned char Test20[] = { 0x98, 0x06, 0x10, 0xC3 }; +unsigned char Test22[] = { 0x66, 0x6F, 0x72, 0x20, 0x45, 0x75, 0x72, 0x6F }; +unsigned char Test23[] = { 0x43, 0x58, 0x44, 0x32, 0x39 ,0x34, 0x30, 0x51 }; + +// 1x = 75 sectors per second +// PSXCLK = 1 sec in the ps +// so (PSXCLK / 75) = cdr read time (linuzappz) +#define cdReadTime (PSXCLK / 75) + +static struct CdrStat stat; +static struct SubQ *subq; + +#define CDR_INT(eCycle) { \ + psxRegs.interrupt |= 0x4; \ + psxRegs.intCycle[2 + 1] = eCycle; \ + psxRegs.intCycle[2] = psxRegs.cycle; } + +#define CDREAD_INT(eCycle) { \ + psxRegs.interrupt |= 0x40000; \ + psxRegs.intCycle[2 + 16 + 1] = eCycle; \ + psxRegs.intCycle[2 + 16] = psxRegs.cycle; } + +#define StartReading(type, eCycle) { \ + cdr.Reading = type; \ + cdr.FirstSector = 1; \ + cdr.Readed = 0xff; \ + AddIrqQueue(READ_ACK, eCycle); \ +} + +#define StopReading() { \ + if (cdr.Reading) { \ + cdr.Reading = 0; \ + psxRegs.interrupt &= ~0x40000; \ + } \ + cdr.StatP &= ~0x20;\ +} + +#define StopCdda() { \ + if (cdr.Play) { \ + if (!Config.Cdda) CDR_stop(); \ + cdr.StatP &= ~0x80; \ + cdr.Play = FALSE; \ + } \ +} + +#define SetResultSize(size) { \ + cdr.ResultP = 0; \ + cdr.ResultC = size; \ + cdr.ResultReady = 1; \ +} + +static void ReadTrack() { + cdr.Prev[0] = itob(cdr.SetSector[0]); + cdr.Prev[1] = itob(cdr.SetSector[1]); + cdr.Prev[2] = itob(cdr.SetSector[2]); + +#ifdef CDR_LOG + CDR_LOG("ReadTrack() Log: KEY *** %x:%x:%x\n", cdr.Prev[0], cdr.Prev[1], cdr.Prev[2]); +#endif + cdr.RErr = CDR_readTrack(cdr.Prev); +} + +// cdr.Stat: +#define NoIntr 0 +#define DataReady 1 +#define Complete 2 +#define Acknowledge 3 +#define DataEnd 4 +#define DiskError 5 + +void AddIrqQueue(unsigned char irq, unsigned long ecycle) { + cdr.Irq = irq; + if (cdr.Stat) { + cdr.eCycle = ecycle; + } else { + CDR_INT(ecycle); + } +} + +void cdrInterrupt() { + int i; + unsigned char Irq = cdr.Irq; + + if (cdr.Stat) { + CDR_INT(0x1000); + return; + } + + cdr.Irq = 0xff; + cdr.Ctrl &= ~0x80; + + switch (Irq) { + case CdlSync: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + break; + + case CdlNop: + SetResultSize(1); + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + i = stat.Status; + if (CDR_getStatus(&stat) != -1) { + if (stat.Type == 0xff) cdr.Stat = DiskError; + if (stat.Status & 0x10) { + cdr.Stat = DiskError; + cdr.Result[0] |= 0x11; + cdr.Result[0] &= ~0x02; + } + else if (i & 0x10) { + cdr.StatP |= 0x2; + cdr.Result[0] |= 0x2; + CheckCdrom(); + } + } + break; + + case CdlSetloc: + cdr.CmdProcess = 0; + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + break; + + case CdlPlay: + cdr.CmdProcess = 0; + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + cdr.StatP |= 0x80; +// if ((cdr.Mode & 0x5) == 0x5) AddIrqQueue(REPPLAY, cdReadTime); + break; + + case CdlForward: + cdr.CmdProcess = 0; + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Complete; + break; + + case CdlBackward: + cdr.CmdProcess = 0; + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Complete; + break; + + case CdlStandby: + cdr.CmdProcess = 0; + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Complete; + break; + + case CdlStop: + cdr.CmdProcess = 0; + SetResultSize(1); + cdr.StatP &= ~0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Complete; +// cdr.Stat = Acknowledge; + + // check case open/close -shalma + i = stat.Status; + if (CDR_getStatus(&stat) != -1) { + if (stat.Type == 0xff) cdr.Stat = DiskError; + if (stat.Status & 0x10) { + cdr.Stat = DiskError; + cdr.Result[0] |= 0x11; + cdr.Result[0] &= ~0x02; + } + else if (i & 0x10) { + cdr.StatP |= 0x2; + cdr.Result[0] |= 0x2; + CheckCdrom(); + } + } + break; + + case CdlPause: + SetResultSize(1); + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + AddIrqQueue(CdlPause + 0x20, 0x1000); + cdr.Ctrl |= 0x80; + break; + + case CdlPause + 0x20: + SetResultSize(1); + cdr.StatP &= ~0x20; + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Complete; + break; + + case CdlInit: + SetResultSize(1); + cdr.StatP = 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; +// if (!cdr.Init) { + AddIrqQueue(CdlInit + 0x20, 0x1000); +// } + break; + + case CdlInit + 0x20: + SetResultSize(1); + cdr.Result[0] = cdr.StatP; + cdr.Stat = Complete; + cdr.Init = 1; + break; + + case CdlMute: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + break; + + case CdlDemute: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + break; + + case CdlSetfilter: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + break; + + case CdlSetmode: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + break; + + case CdlGetmode: + SetResultSize(6); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Result[1] = cdr.Mode; + cdr.Result[2] = cdr.File; + cdr.Result[3] = cdr.Channel; + cdr.Result[4] = 0; + cdr.Result[5] = 0; + cdr.Stat = Acknowledge; + break; + + case CdlGetlocL: + SetResultSize(8); +// for (i = 0; i < 8; i++) +// cdr.Result[i] = itob(cdr.Transfer[i]); + for (i = 0; i < 8; i++) + cdr.Result[i] = cdr.Transfer[i]; + cdr.Stat = Acknowledge; + break; + + case CdlGetlocP: + SetResultSize(8); + subq = (struct SubQ *)CDR_getBufferSub(); + + if (subq != NULL) { + cdr.Result[0] = subq->TrackNumber; + cdr.Result[1] = subq->IndexNumber; + memcpy(cdr.Result + 2, subq->TrackRelativeAddress, 3); + memcpy(cdr.Result + 5, subq->AbsoluteAddress, 3); + + // subQ integrity check + if (calcCrc((u8 *)subq + 12, 10) != (((u16)subq->CRC[0] << 8) | subq->CRC[1])) { + memset(cdr.Result + 2, 0, 3 + 3); // CRC wrong, wipe out time data + } + } else { + cdr.Result[0] = 1; + cdr.Result[1] = 1; + + cdr.Result[2] = btoi(cdr.Prev[0]); + cdr.Result[3] = btoi(cdr.Prev[1]) - 2; + cdr.Result[4] = cdr.Prev[2]; + + // m:s adjustment + if ((s8)cdr.Result[3] < 0) { + cdr.Result[3] += 60; + cdr.Result[2] -= 1; + } + + cdr.Result[2] = itob(cdr.Result[2]); + cdr.Result[3] = itob(cdr.Result[3]); + + memcpy(cdr.Result + 5, cdr.Prev, 3); + } + + cdr.Stat = Acknowledge; + break; + + case CdlGetTN: + cdr.CmdProcess = 0; + SetResultSize(3); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + if (CDR_getTN(cdr.ResultTN) == -1) { + cdr.Stat = DiskError; + cdr.Result[0] |= 0x01; + } else { + cdr.Stat = Acknowledge; + cdr.Result[1] = itob(cdr.ResultTN[0]); + cdr.Result[2] = itob(cdr.ResultTN[1]); + } + break; + + case CdlGetTD: + cdr.CmdProcess = 0; + cdr.Track = btoi(cdr.Param[0]); + SetResultSize(4); + cdr.StatP |= 0x2; + if (CDR_getTD(cdr.Track, cdr.ResultTD) == -1) { + cdr.Stat = DiskError; + cdr.Result[0] |= 0x01; + } else { + cdr.Stat = Acknowledge; + cdr.Result[0] = cdr.StatP; + cdr.Result[1] = itob(cdr.ResultTD[2]); + cdr.Result[2] = itob(cdr.ResultTD[1]); + cdr.Result[3] = itob(cdr.ResultTD[0]); + } + break; + + case CdlSeekL: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.StatP |= 0x40; + cdr.Stat = Acknowledge; + cdr.Seeked = TRUE; + AddIrqQueue(CdlSeekL + 0x20, 0x1000); + break; + + case CdlSeekL + 0x20: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.StatP &= ~0x40; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Complete; + break; + + case CdlSeekP: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.StatP |= 0x40; + cdr.Stat = Acknowledge; + AddIrqQueue(CdlSeekP + 0x20, 0x1000); + break; + + case CdlSeekP + 0x20: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.StatP &= ~0x40; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Complete; + break; + + case CdlTest: + cdr.Stat = Acknowledge; + switch (cdr.Param[0]) { + case 0x20: // System Controller ROM Version + SetResultSize(4); + memcpy(cdr.Result, Test20, 4); + break; + case 0x22: + SetResultSize(8); + memcpy(cdr.Result, Test22, 4); + break; + case 0x23: case 0x24: + SetResultSize(8); + memcpy(cdr.Result, Test23, 4); + break; + } + break; + + case CdlID: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + AddIrqQueue(CdlID + 0x20, 0x1000); + break; + + case CdlID + 0x20: + SetResultSize(8); + if (CDR_getStatus(&stat) == -1) { + cdr.Result[0] = 0x00; // 0x08 and cdr.Result[1]|0x10 : audio cd, enters cd player + cdr.Result[1] = 0x00; // 0x80 leads to the menu in the bios, else loads CD + } + else { + if (stat.Type == 2) { + cdr.Result[0] = 0x08; + cdr.Result[1] = 0x10; + } + else { + cdr.Result[0] = 0x00; + cdr.Result[1] = 0x00; + } + } + cdr.Result[1] |= 0x80; + cdr.Result[2] = 0x00; + cdr.Result[3] = 0x00; + strncpy((char *)&cdr.Result[4], "PCSX", 4); + cdr.Stat = Complete; + break; + + case CdlReset: + SetResultSize(1); + cdr.StatP = 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + break; + + case CdlReadToc: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Acknowledge; + AddIrqQueue(CdlReadToc + 0x20, 0x1000); + break; + + case CdlReadToc + 0x20: + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = Complete; + break; + + case AUTOPAUSE: + cdr.OCUP = 0; +/* SetResultSize(1); + StopCdda(); + StopReading(); + cdr.OCUP = 0; + cdr.StatP&=~0x20; + cdr.StatP|= 0x2; + cdr.Result[0] = cdr.StatP; + cdr.Stat = DataEnd; +*/ AddIrqQueue(CdlPause, 0x800); + break; + + case READ_ACK: + if (!cdr.Reading) return; + + SetResultSize(1); + cdr.StatP |= 0x2; + cdr.Result[0] = cdr.StatP; + if (!cdr.Seeked) { + cdr.Seeked = TRUE; + cdr.StatP |= 0x40; + } + cdr.StatP |= 0x20; + cdr.Stat = Acknowledge; + +// CDREAD_INT((cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime); + CDREAD_INT(0x80000); + break; + + case REPPLAY_ACK: + cdr.Stat = Acknowledge; + cdr.Result[0] = cdr.StatP; + SetResultSize(1); + AddIrqQueue(REPPLAY, cdReadTime); + break; + + case REPPLAY: + if ((cdr.Mode & 5) != 5) break; +/* if (CDR_getStatus(&stat) == -1) { + cdr.Result[0] = 0; + cdr.Result[1] = 0; + cdr.Result[2] = 0; + cdr.Result[3] = 0; + cdr.Result[4] = 0; + cdr.Result[5] = 0; + cdr.Result[6] = 0; + cdr.Result[7] = 0; + } else memcpy(cdr.Result, &stat.Track, 8); + cdr.Stat = 1; + SetResultSize(8); + AddIrqQueue(REPPLAY_ACK, cdReadTime); +*/ break; + + case 0xff: + return; + + default: + cdr.Stat = Complete; + break; + } + + if (cdr.Stat != NoIntr && cdr.Reg2 != 0x18) { + psxHu32ref(0x1070) |= SWAP32((u32)0x4); + } + +#ifdef CDR_LOG + CDR_LOG("cdrInterrupt() Log: CDR Interrupt IRQ %x\n", Irq); +#endif +} + +void cdrReadInterrupt() { + u8 *buf; + + if (!cdr.Reading) + return; + + if (cdr.Stat) { + CDREAD_INT(0x1000); + return; + } + +#ifdef CDR_LOG + CDR_LOG("cdrReadInterrupt() Log: KEY END"); +#endif + + cdr.OCUP = 1; + SetResultSize(1); + cdr.StatP |= 0x22; + cdr.StatP &= ~0x40; + cdr.Result[0] = cdr.StatP; + + ReadTrack(); + + buf = CDR_getBuffer(); + if (buf == NULL) + cdr.RErr = -1; + + if (cdr.RErr == -1) { +#ifdef CDR_LOG + fprintf(emuLog, "cdrReadInterrupt() Log: err\n"); +#endif + memset(cdr.Transfer, 0, DATA_SIZE); + cdr.Stat = DiskError; + cdr.Result[0] |= 0x01; + CDREAD_INT((cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime); + return; + } + + memcpy(cdr.Transfer, buf, DATA_SIZE); + CheckPPFCache(cdr.Transfer, cdr.Prev[0], cdr.Prev[1], cdr.Prev[2]); + + cdr.Stat = DataReady; + +#ifdef CDR_LOG + fprintf(emuLog, "cdrReadInterrupt() Log: cdr.Transfer %x:%x:%x\n", cdr.Transfer[0], cdr.Transfer[1], cdr.Transfer[2]); +#endif + + if ((!cdr.Muted) && (cdr.Mode & 0x40) && (!Config.Xa) && (cdr.FirstSector != -1)) { // CD-XA + if ((cdr.Transfer[4 + 2] & 0x4) && + ((cdr.Mode & 0x8) ? (cdr.Transfer[4 + 1] == cdr.Channel) : 1) && + (cdr.Transfer[4 + 0] == cdr.File)) { + int ret = xa_decode_sector(&cdr.Xa, cdr.Transfer+4, cdr.FirstSector); + + if (!ret) { + SPU_playADPCMchannel(&cdr.Xa); + cdr.FirstSector = 0; + } + else cdr.FirstSector = -1; + } + } + + cdr.SetSector[2]++; + if (cdr.SetSector[2] == 75) { + cdr.SetSector[2] = 0; + cdr.SetSector[1]++; + if (cdr.SetSector[1] == 60) { + cdr.SetSector[1] = 0; + cdr.SetSector[0]++; + } + } + + cdr.Readed = 0; + + if ((cdr.Transfer[4 + 2] & 0x80) && (cdr.Mode & 0x2)) { // EOF +#ifdef CDR_LOG + CDR_LOG("cdrReadInterrupt() Log: Autopausing read\n"); +#endif +// AddIrqQueue(AUTOPAUSE, 0x1000); + AddIrqQueue(CdlPause, 0x1000); + } + else { + CDREAD_INT((cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime); + } + psxHu32ref(0x1070) |= SWAP32((u32)0x4); +} + +/* +cdrRead0: + bit 0 - 0 REG1 command send / 1 REG1 data read + bit 1 - 0 data transfer finish / 1 data transfer ready/in progress + bit 2 - unknown + bit 3 - unknown + bit 4 - unknown + bit 5 - 1 result ready + bit 6 - 1 dma ready + bit 7 - 1 command being processed +*/ + +unsigned char cdrRead0(void) { + if (cdr.ResultReady) + cdr.Ctrl |= 0x20; + else + cdr.Ctrl &= ~0x20; + + if (cdr.OCUP) + cdr.Ctrl |= 0x40; +// else +// cdr.Ctrl &= ~0x40; + + // What means the 0x10 and the 0x08 bits? I only saw it used by the bios + cdr.Ctrl |= 0x18; + +#ifdef CDR_LOG + CDR_LOG("cdrRead0() Log: CD0 Read: %x\n", cdr.Ctrl); +#endif + + return psxHu8(0x1800) = cdr.Ctrl; +} + +/* +cdrWrite0: + 0 - to send a command / 1 - to get the result +*/ + +void cdrWrite0(unsigned char rt) { +#ifdef CDR_LOG + CDR_LOG("cdrWrite0() Log: CD0 write: %x\n", rt); +#endif + cdr.Ctrl = rt | (cdr.Ctrl & ~0x3); + + if (rt == 0) { + cdr.ParamP = 0; + cdr.ParamC = 0; + cdr.ResultReady = 0; + } +} + +unsigned char cdrRead1(void) { + if (cdr.ResultReady) { // && cdr.Ctrl & 0x1) { + psxHu8(0x1801) = cdr.Result[cdr.ResultP++]; + if (cdr.ResultP == cdr.ResultC) + cdr.ResultReady = 0; + } else { + psxHu8(0x1801) = 0; + } +#ifdef CDR_LOG + CDR_LOG("cdrRead1() Log: CD1 Read: %x\n", psxHu8(0x1801)); +#endif + return psxHu8(0x1801); +} + +void cdrWrite1(unsigned char rt) { + int i; + +#ifdef CDR_LOG + CDR_LOG("cdrWrite1() Log: CD1 write: %x (%s)\n", rt, CmdName[rt]); +#endif +// psxHu8(0x1801) = rt; + cdr.Cmd = rt; + cdr.OCUP = 0; + +#ifdef CDRCMD_DEBUG + SysPrintf("cdrWrite1() Log: CD1 write: %x (%s)", rt, CmdName[rt]); + if (cdr.ParamC) { + SysPrintf(" Param[%d] = {", cdr.ParamC); + for (i = 0; i < cdr.ParamC; i++) + SysPrintf(" %x,", cdr.Param[i]); + SysPrintf("}\n"); + } else { + SysPrintf("\n"); + } +#endif + + if (cdr.Ctrl & 0x1) return; + + switch (cdr.Cmd) { + case CdlSync: + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlNop: + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlSetloc: + StopReading(); + cdr.Seeked = FALSE; + for (i = 0; i < 3; i++) + cdr.SetSector[i] = btoi(cdr.Param[i]); + cdr.SetSector[3] = 0; +/* if ((cdr.SetSector[0] | cdr.SetSector[1] | cdr.SetSector[2]) == 0) { + *(u32 *)cdr.SetSector = *(u32 *)cdr.SetSectorSeek; + }*/ + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlPlay: + if (!cdr.SetSector[0] & !cdr.SetSector[1] & !cdr.SetSector[2]) { + if (CDR_getTN(cdr.ResultTN) != -1) { + if (cdr.CurTrack > cdr.ResultTN[1]) + cdr.CurTrack = cdr.ResultTN[1]; + if (CDR_getTD((unsigned char)(cdr.CurTrack), cdr.ResultTD) != -1) { + int tmp = cdr.ResultTD[2]; + cdr.ResultTD[2] = cdr.ResultTD[0]; + cdr.ResultTD[0] = tmp; + if (!Config.Cdda) CDR_play(cdr.ResultTD); + } + } + } else if (!Config.Cdda) { + CDR_play(cdr.SetSector); + } + cdr.Play = TRUE; + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlForward: + if (cdr.CurTrack < 0xaa) + cdr.CurTrack++; + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlBackward: + if (cdr.CurTrack > 1) + cdr.CurTrack--; + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlReadN: + cdr.Irq = 0; + StopReading(); + cdr.Ctrl|= 0x80; + cdr.Stat = NoIntr; + StartReading(1, 0x1000); + break; + + case CdlStandby: + StopCdda(); + StopReading(); + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlStop: + StopCdda(); + StopReading(); + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlPause: + StopCdda(); + StopReading(); + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x80000); + break; + + case CdlReset: + case CdlInit: + StopCdda(); + StopReading(); + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlMute: + cdr.Muted = TRUE; + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlDemute: + cdr.Muted = FALSE; + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlSetfilter: + cdr.File = cdr.Param[0]; + cdr.Channel = cdr.Param[1]; + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlSetmode: +#ifdef CDR_LOG + CDR_LOG("cdrWrite1() Log: Setmode %x\n", cdr.Param[0]); +#endif + cdr.Mode = cdr.Param[0]; + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlGetmode: + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlGetlocL: + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlGetlocP: + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlGetTN: + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlGetTD: + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlSeekL: +// ((u32 *)cdr.SetSectorSeek)[0] = ((u32 *)cdr.SetSector)[0]; + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlSeekP: +// ((u32 *)cdr.SetSectorSeek)[0] = ((u32 *)cdr.SetSector)[0]; + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlTest: + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlID: + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + case CdlReadS: + cdr.Irq = 0; + StopReading(); + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + StartReading(2, 0x1000); + break; + + case CdlReadToc: + cdr.Ctrl |= 0x80; + cdr.Stat = NoIntr; + AddIrqQueue(cdr.Cmd, 0x1000); + break; + + default: +#ifdef CDR_LOG + CDR_LOG("cdrWrite1() Log: Unknown command: %x\n", cdr.Cmd); +#endif + return; + } + if (cdr.Stat != NoIntr) { + psxHu32ref(0x1070) |= SWAP32((u32)0x4); + } +} + +unsigned char cdrRead2(void) { + unsigned char ret; + + if (cdr.Readed == 0) { + ret = 0; + } else { + ret = *cdr.pTransfer++; + } + +#ifdef CDR_LOG + CDR_LOG("cdrRead2() Log: CD2 Read: %x\n", ret); +#endif + return ret; +} + +void cdrWrite2(unsigned char rt) { +#ifdef CDR_LOG + CDR_LOG("cdrWrite2() Log: CD2 write: %x\n", rt); +#endif + if (cdr.Ctrl & 0x1) { + switch (rt) { + case 0x07: + cdr.ParamP = 0; + cdr.ParamC = 0; + cdr.ResultReady = 1; //0; + cdr.Ctrl &= ~3; //cdr.Ctrl = 0; + break; + + default: + cdr.Reg2 = rt; + break; + } + } else if (!(cdr.Ctrl & 0x1) && cdr.ParamP < 8) { + cdr.Param[cdr.ParamP++] = rt; + cdr.ParamC++; + } +} + +unsigned char cdrRead3(void) { + if (cdr.Stat) { + if (cdr.Ctrl & 0x1) + psxHu8(0x1803) = cdr.Stat | 0xE0; + else + psxHu8(0x1803) = 0xff; + } else { + psxHu8(0x1803) = 0; + } +#ifdef CDR_LOG + CDR_LOG("cdrRead3() Log: CD3 Read: %x\n", psxHu8(0x1803)); +#endif + return psxHu8(0x1803); +} + +void cdrWrite3(unsigned char rt) { +#ifdef CDR_LOG + CDR_LOG("cdrWrite3() Log: CD3 write: %x\n", rt); +#endif + if (rt == 0x07 && cdr.Ctrl & 0x1) { + cdr.Stat = 0; + + if (cdr.Irq == 0xff) { + cdr.Irq = 0; + return; + } + if (cdr.Irq) + CDR_INT(cdr.eCycle); + if (cdr.Reading && !cdr.ResultReady) + CDREAD_INT((cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime); + + return; + } + if (rt == 0x80 && !(cdr.Ctrl & 0x1) && cdr.Readed == 0) { + cdr.Readed = 1; + cdr.pTransfer = cdr.Transfer; + + switch (cdr.Mode & 0x30) { + case 0x10: + case 0x00: + cdr.pTransfer += 12; + break; + default: + break; + } + } +} + +void psxDma3(u32 madr, u32 bcr, u32 chcr) { + u32 cdsize; + u8 *ptr; + +#ifdef CDR_LOG + CDR_LOG("psxDma3() Log: *** DMA 3 *** %x addr = %x size = %x\n", chcr, madr, bcr); +#endif + + switch (chcr) { + case 0x11000000: + case 0x11400100: + if (cdr.Readed == 0) { +#ifdef CDR_LOG + CDR_LOG("psxDma3() Log: *** DMA 3 *** NOT READY\n"); +#endif + break; + } + + cdsize = (bcr & 0xffff) * 4; + + ptr = (u8 *)PSXM(madr); + if (ptr == NULL) { +#ifdef CPU_LOG + CDR_LOG("psxDma3() Log: *** DMA 3 *** NULL Pointer!\n"); +#endif + break; + } + memcpy(ptr, cdr.pTransfer, cdsize); + psxCpu->Clear(madr, cdsize / 4); + cdr.pTransfer += cdsize; + break; + default: +#ifdef CDR_LOG + CDR_LOG("psxDma3() Log: Unknown cddma %x\n", chcr); +#endif + break; + } + + HW_DMA3_CHCR &= SWAP32(~0x01000000); + DMA_INTERRUPT(3); +} + +void cdrReset() { + memset(&cdr, 0, sizeof(cdr)); + cdr.CurTrack = 1; + cdr.File = 1; + cdr.Channel = 1; +} + +int cdrFreeze(gzFile f, int Mode) { + uintptr_t tmp; + + gzfreeze(&cdr, sizeof(cdr)); + + if (Mode == 1) + tmp = cdr.pTransfer - cdr.Transfer; + + gzfreeze(&tmp, sizeof(tmp)); + + if (Mode == 0) + cdr.pTransfer = cdr.Transfer + tmp; + + return 0; +} diff --git a/libpcsxcore/cdrom.h b/libpcsxcore/cdrom.h new file mode 100644 index 00000000..c5d448cd --- /dev/null +++ b/libpcsxcore/cdrom.h @@ -0,0 +1,110 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __CDROM_H__ +#define __CDROM_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "decode_xa.h" +#include "r3000a.h" +#include "plugins.h" +#include "psxmem.h" +#include "psxhw.h" + +#define btoi(b) ((b) / 16 * 10 + (b) % 16) /* BCD to u_char */ +#define itob(i) ((i) / 10 * 16 + (i) % 10) /* u_char to BCD */ + +#define MSF2SECT(m, s, f) (((m) * 60 + (s) - 2) * 75 + (f)) + +#define CD_FRAMESIZE_RAW 2352 +#define DATA_SIZE (CD_FRAMESIZE_RAW - 12) + +#define SUB_FRAMESIZE 96 + +typedef struct { + unsigned char OCUP; + unsigned char Reg1Mode; + unsigned char Reg2; + unsigned char CmdProcess; + unsigned char Ctrl; + unsigned char Stat; + + unsigned char StatP; + + unsigned char Transfer[CD_FRAMESIZE_RAW]; + unsigned char *pTransfer; + + unsigned char Prev[4]; + unsigned char Param[8]; + unsigned char Result[8]; + + unsigned char ParamC; + unsigned char ParamP; + unsigned char ResultC; + unsigned char ResultP; + unsigned char ResultReady; + unsigned char Cmd; + unsigned char Readed; + u32 Reading; + + unsigned char ResultTN[6]; + unsigned char ResultTD[4]; + unsigned char SetSector[4]; + unsigned char SetSectorSeek[4]; + unsigned char Track; + boolean Play, Muted; + int CurTrack; + int Mode, File, Channel; + int Reset; + int RErr; + int FirstSector; + + xa_decode_t Xa; + + int Init; + + unsigned char Irq; + u32 eCycle; + + boolean Seeked; +} cdrStruct; + +extern cdrStruct cdr; + +void cdrReset(); +void cdrInterrupt(); +void cdrReadInterrupt(); +unsigned char cdrRead0(void); +unsigned char cdrRead1(void); +unsigned char cdrRead2(void); +unsigned char cdrRead3(void); +void cdrWrite0(unsigned char rt); +void cdrWrite1(unsigned char rt); +void cdrWrite2(unsigned char rt); +void cdrWrite3(unsigned char rt); +int cdrFreeze(gzFile f, int Mode); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/cheat.c b/libpcsxcore/cheat.c new file mode 100644 index 00000000..21d88b8e --- /dev/null +++ b/libpcsxcore/cheat.c @@ -0,0 +1,1024 @@ +/* Cheat Support for PCSX-Reloaded + * Copyright (c) 2009, Wei Mingzhi . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include "psxcommon.h" +#include "r3000a.h" +#include "psxmem.h" + +#include "cheat.h" + +Cheat *Cheats = NULL; +int NumCheats = 0; +static int NumCheatsAllocated = 0; + +CheatCode *CheatCodes = NULL; +int NumCodes = 0; +static int NumCodesAllocated = 0; + +s8 *prevM = NULL; +u32 *SearchResults = NULL; +int NumSearchResults = 0; +static int NumSearchResultsAllocated = 0; + +#define ALLOC_INCREMENT 100 + +void ClearAllCheats() { + int i; + + if (Cheats != NULL) { + for (i = 0; i < NumCheats; i++) { + free(Cheats[i].Descr); + } + free(Cheats); + } + + Cheats = NULL; + NumCheats = 0; + NumCheatsAllocated = 0; + + if (CheatCodes != NULL) { + free(CheatCodes); + } + + CheatCodes = NULL; + NumCodes = 0; + NumCodesAllocated = 0; +} + +// load cheats from the specific filename +void LoadCheats(const char *filename) { + FILE *fp; + char buf[256]; + int count = 0; + unsigned int t1, t2; + + fp = fopen(filename, "r"); + if (fp == NULL) { + return; + } + + ClearAllCheats(); + + while (fgets(buf, 255, fp) != NULL) { + buf[255] = '\0'; + trim(buf); + + // Skip comment or blank lines + if (buf[0] == '#' || buf[0] == ';' || buf[0] == '/' || buf[0] == '\"' || buf[0] == '\0') + continue; + + if (buf[0] == '[' && buf[strlen(buf) - 1] == ']') { + if (NumCheats > 0) + Cheats[NumCheats - 1].n = count; + + if (NumCheats >= NumCheatsAllocated) { + NumCheatsAllocated += ALLOC_INCREMENT; + + if (Cheats == NULL) { + assert(NumCheats == 0); + assert(NumCheatsAllocated == ALLOC_INCREMENT); + Cheats = (Cheat *)malloc(sizeof(Cheat) * NumCheatsAllocated); + } else { + Cheats = (Cheat *)realloc(Cheats, sizeof(Cheat) * NumCheatsAllocated); + } + } + + buf[strlen(buf) - 1] = '\0'; + count = 0; + + if (buf[1] == '*') { + Cheats[NumCheats].Descr = strdup(buf + 2); + Cheats[NumCheats].Enabled = 1; + } else { + Cheats[NumCheats].Descr = strdup(buf + 1); + Cheats[NumCheats].Enabled = 0; + } + + Cheats[NumCheats].First = NumCodes; + + NumCheats++; + continue; + } + + if (NumCheats <= 0) + continue; + + if (NumCodes >= NumCodesAllocated) { + NumCodesAllocated += ALLOC_INCREMENT; + + if (CheatCodes == NULL) { + assert(NumCodes == 0); + assert(NumCodesAllocated == ALLOC_INCREMENT); + CheatCodes = (CheatCode *)malloc(sizeof(CheatCode) * NumCodesAllocated); + } else { + CheatCodes = (CheatCode *)realloc(CheatCodes, sizeof(CheatCode) * NumCodesAllocated); + } + } + + sscanf(buf, "%x %x", &t1, &t2); + + CheatCodes[NumCodes].Addr = t1; + CheatCodes[NumCodes].Val = t2; + + NumCodes++; + count++; + } + + if (NumCheats > 0) + Cheats[NumCheats - 1].n = count; + + fclose(fp); + + SysPrintf(_("Cheats loaded from: %s\n"), filename); +} + +// save all cheats to the specified filename +void SaveCheats(const char *filename) { + FILE *fp; + int i, j; + + fp = fopen(filename, "w"); + if (fp == NULL) { + return; + } + + for (i = 0; i < NumCheats; i++) { + // write the description + if (Cheats[i].Enabled) + fprintf(fp, "[*%s]\n", Cheats[i].Descr); + else + fprintf(fp, "[%s]\n", Cheats[i].Descr); + + // write all cheat codes + for (j = 0; j < Cheats[i].n; j++) { + fprintf(fp, "%.8X %.4X\n", + CheatCodes[Cheats[i].First + j].Addr, + CheatCodes[Cheats[i].First + j].Val); + } + + fprintf(fp, "\n"); + } + + fclose(fp); + + SysPrintf(_("Cheats saved to: %s\n"), filename); +} + +// apply all enabled cheats +void ApplyCheats() { + int i, j, k, endindex; + + for (i = 0; i < NumCheats; i++) { + if (!Cheats[i].Enabled) { + continue; + } + + // process all cheat codes + endindex = Cheats[i].First + Cheats[i].n; + + for (j = Cheats[i].First; j < endindex; j++) { + u8 type = (uint8_t)(CheatCodes[j].Addr >> 24); + u32 addr = (CheatCodes[j].Addr & 0x001FFFFF); + u16 val = CheatCodes[j].Val; + u32 taddr; + + switch (type) { + case CHEAT_CONST8: + psxMu8ref(addr) = (u8)val; + break; + + case CHEAT_CONST16: + psxMu16ref(addr) = SWAPu16(val); + break; + + case CHEAT_INC16: + psxMu16ref(addr) = SWAPu16(psxMu16(addr) + val); + break; + + case CHEAT_DEC16: + psxMu16ref(addr) = SWAPu16(psxMu16(addr) - val); + break; + + case CHEAT_INC8: + psxMu8ref(addr) += (u8)val; + break; + + case CHEAT_DEC8: + psxMu8ref(addr) -= (u8)val; + break; + + case CHEAT_SLIDE: + j++; + if (j >= endindex) + break; + + type = (uint8_t)(CheatCodes[j].Addr >> 24); + taddr = (CheatCodes[j].Addr & 0x001FFFFF); + val = CheatCodes[j].Val; + + if (type == CHEAT_CONST8) { + for (k = 0; k < ((addr >> 8) & 0xFF); k++) { + psxMu8ref(taddr) = (u8)val; + taddr += (s8)(addr & 0xFF); + val += (s8)(CheatCodes[j - 1].Val & 0xFF); + } + } + else if (type == CHEAT_CONST16) { + for (k = 0; k < ((addr >> 8) & 0xFF); k++) { + psxMu16ref(taddr) = SWAPu16(val); + taddr += (s8)(addr & 0xFF); + val += (s8)(CheatCodes[j - 1].Val & 0xFF); + } + } + break; + + case CHEAT_MEMCPY: + j++; + if (j >= endindex) + break; + + taddr = (CheatCodes[j].Addr & 0x001FFFFF); + for (k = 0; k < val; k++) { + psxMu8ref(taddr + k) = PSXMu8(addr + k); + } + break; + + case CHEAT_EQU8: + if (PSXMu8(addr) != (u8)val) + j++; // skip the next code + break; + + case CHEAT_NOTEQU8: + if (PSXMu8(addr) == (u8)val) + j++; // skip the next code + break; + + case CHEAT_LESSTHAN8: + if (PSXMu8(addr) >= (u8)val) + j++; // skip the next code + break; + + case CHEAT_GREATERTHAN8: + if (PSXMu8(addr) <= (u8)val) + j++; // skip the next code + break; + + case CHEAT_EQU16: + if (PSXMu16(addr) != val) + j++; // skip the next code + break; + + case CHEAT_NOTEQU16: + if (PSXMu16(addr) == val) + j++; // skip the next code + break; + + case CHEAT_LESSTHAN16: + if (PSXMu16(addr) >= val) + j++; // skip the next code + break; + + case CHEAT_GREATERTHAN16: + if (PSXMu16(addr) <= val) + j++; // skip the next code + break; + } + } + } +} + +int AddCheat(const char *descr, char *code) { + int c = 1; + char *p1, *p2; + + if (NumCheats >= NumCheatsAllocated) { + NumCheatsAllocated += ALLOC_INCREMENT; + + if (Cheats == NULL) { + assert(NumCheats == 0); + assert(NumCheatsAllocated == ALLOC_INCREMENT); + Cheats = (Cheat *)malloc(sizeof(Cheat) * NumCheatsAllocated); + } + else { + Cheats = (Cheat *)realloc(Cheats, sizeof(Cheat) * NumCheatsAllocated); + } + } + + Cheats[NumCheats].Descr = strdup(descr[0] ? descr : _("(Untitled)")); + Cheats[NumCheats].Enabled = 0; + Cheats[NumCheats].First = NumCodes; + Cheats[NumCheats].n = 0; + + p1 = code; + p2 = code; + + while (c) { + unsigned int t1, t2; + + while (*p2 != '\n' && *p2 != '\0') + p2++; + + if (*p2 == '\0') + c = 0; + + *p2 = '\0'; + p2++; + + t1 = 0; + t2 = 0; + sscanf(p1, "%x %x", &t1, &t2); + + if (t1 > 0x10000000) { + if (NumCodes >= NumCodesAllocated) { + NumCodesAllocated += ALLOC_INCREMENT; + + if (CheatCodes == NULL) { + assert(NumCodes == 0); + assert(NumCodesAllocated == ALLOC_INCREMENT); + CheatCodes = (CheatCode *)malloc(sizeof(CheatCode) * NumCodesAllocated); + } + else { + CheatCodes = (CheatCode *)realloc(CheatCodes, sizeof(CheatCode) * NumCodesAllocated); + } + } + + CheatCodes[NumCodes].Addr = t1; + CheatCodes[NumCodes].Val = t2; + NumCodes++; + Cheats[NumCheats].n++; + } + + p1 = p2; + } + + if (Cheats[NumCheats].n == 0) { + return -1; + } + + NumCheats++; + return 0; +} + +void RemoveCheat(int index) { + assert(index >= 0 && index < NumCheats); + + free(Cheats[index].Descr); + + while (index < NumCheats - 1) { + Cheats[index] = Cheats[index + 1]; + index++; + } + + NumCheats--; +} + +int EditCheat(int index, const char *descr, char *code) { + int c = 1; + int prev = NumCodes; + char *p1, *p2; + + assert(index >= 0 && index < NumCheats); + + p1 = code; + p2 = code; + + while (c) { + unsigned int t1, t2; + + while (*p2 != '\n' && *p2 != '\0') + p2++; + + if (*p2 == '\0') + c = 0; + + *p2 = '\0'; + p2++; + + t1 = 0; + t2 = 0; + sscanf(p1, "%x %x", &t1, &t2); + + if (t1 > 0x10000000) { + if (NumCodes >= NumCodesAllocated) { + NumCodesAllocated += ALLOC_INCREMENT; + + if (CheatCodes == NULL) { + assert(NumCodes == 0); + assert(NumCodesAllocated == ALLOC_INCREMENT); + CheatCodes = (CheatCode *)malloc(sizeof(CheatCode) * NumCodesAllocated); + } + else { + CheatCodes = (CheatCode *)realloc(CheatCodes, sizeof(CheatCode) * NumCodesAllocated); + } + } + + CheatCodes[NumCodes].Addr = t1; + CheatCodes[NumCodes].Val = t2; + NumCodes++; + } + + p1 = p2; + } + + if (NumCodes == prev) { + return -1; + } + + free(Cheats[index].Descr); + Cheats[index].Descr = strdup(descr[0] ? descr : _("(Untitled)")); + Cheats[index].First = prev; + Cheats[index].n = NumCodes - prev; + + return 0; +} + +void FreeCheatSearchResults() { + if (SearchResults != NULL) { + free(SearchResults); + } + SearchResults = NULL; + + NumSearchResults = 0; + NumSearchResultsAllocated = 0; +} + +void FreeCheatSearchMem() { + if (prevM != NULL) { + free(prevM); + } + prevM = NULL; +} + +void CheatSearchBackupMemory() { + if (prevM != NULL) { + memcpy(prevM, psxM, 0x200000); + } +} + +static void CheatSearchInitBackupMemory() { + if (prevM == NULL) { + prevM = (s8 *)malloc(0x200000); + CheatSearchBackupMemory(); + } +} + +static void CheatSearchAddResult(u32 addr) { + if (NumSearchResults >= NumSearchResultsAllocated) { + NumSearchResultsAllocated += ALLOC_INCREMENT; + + if (SearchResults == NULL) { + SearchResults = (u32 *)malloc(sizeof(u32) * NumSearchResultsAllocated); + } + else { + SearchResults = (u32 *)realloc(SearchResults, sizeof(u32) * NumSearchResultsAllocated); + } + } + + SearchResults[NumSearchResults++] = addr; +} + +void CheatSearchEqual8(u8 val) { + u32 i, j; + + CheatSearchInitBackupMemory(); + + if (SearchResults == NULL) { + // search the whole memory + for (i = 0; i < 0x200000; i++) { + if (PSXMu8(i) == val) { + CheatSearchAddResult(i); + } + } + } + else { + // only search within the previous results + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu8(SearchResults[i]) == val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; + } +} + +void CheatSearchEqual16(u16 val) { + u32 i, j; + + CheatSearchInitBackupMemory(); + + if (SearchResults == NULL) { + // search the whole memory + for (i = 0; i < 0x200000; i += 2) { + if (PSXMu16(i) == val) { + CheatSearchAddResult(i); + } + } + } + else { + // only search within the previous results + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu16(SearchResults[i]) == val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; + } +} + +void CheatSearchEqual32(u32 val) { + u32 i, j; + + CheatSearchInitBackupMemory(); + + if (SearchResults == NULL) { + // search the whole memory + for (i = 0; i < 0x200000; i += 4) { + if (PSXMu32(i) == val) { + CheatSearchAddResult(i); + } + } + } + else { + // only search within the previous results + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu32(SearchResults[i]) == val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; + } +} + +void CheatSearchNotEqual8(u8 val) { + u32 i, j; + + CheatSearchInitBackupMemory(); + + if (SearchResults == NULL) { + // search the whole memory + for (i = 0; i < 0x200000; i++) { + if (PSXMu8(i) != val) { + CheatSearchAddResult(i); + } + } + } + else { + // only search within the previous results + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu8(SearchResults[i]) != val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; + } +} + +void CheatSearchNotEqual16(u16 val) { + u32 i, j; + + CheatSearchInitBackupMemory(); + + if (SearchResults == NULL) { + // search the whole memory + for (i = 0; i < 0x200000; i += 2) { + if (PSXMu16(i) != val) { + CheatSearchAddResult(i); + } + } + } + else { + // only search within the previous results + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu16(SearchResults[i]) != val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; + } +} + +void CheatSearchNotEqual32(u32 val) { + u32 i, j; + + CheatSearchInitBackupMemory(); + + if (SearchResults == NULL) { + // search the whole memory + for (i = 0; i < 0x200000; i += 4) { + if (PSXMu32(i) != val) { + CheatSearchAddResult(i); + } + } + } + else { + // only search within the previous results + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu32(SearchResults[i]) != val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; + } +} + +void CheatSearchRange8(u8 min, u8 max) { + u32 i, j; + + CheatSearchInitBackupMemory(); + + if (SearchResults == NULL) { + // search the whole memory + for (i = 0; i < 0x200000; i++) { + if (PSXMu8(i) >= min && PSXMu8(i) <= max) { + CheatSearchAddResult(i); + } + } + } + else { + // only search within the previous results + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu8(SearchResults[i]) >= min && PSXMu8(SearchResults[i]) <= max) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; + } +} + +void CheatSearchRange16(u16 min, u16 max) { + u32 i, j; + + CheatSearchInitBackupMemory(); + + if (SearchResults == NULL) { + // search the whole memory + for (i = 0; i < 0x200000; i += 2) { + if (PSXMu16(i) >= min && PSXMu16(i) <= max) { + CheatSearchAddResult(i); + } + } + } + else { + // only search within the previous results + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu16(SearchResults[i]) >= min && PSXMu16(SearchResults[i]) <= max) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; + } +} + +void CheatSearchRange32(u32 min, u32 max) { + u32 i, j; + + CheatSearchInitBackupMemory(); + + if (SearchResults == NULL) { + // search the whole memory + for (i = 0; i < 0x200000; i += 4) { + if (PSXMu32(i) >= min && PSXMu32(i) <= max) { + CheatSearchAddResult(i); + } + } + } + else { + // only search within the previous results + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu32(SearchResults[i]) >= min && PSXMu32(SearchResults[i]) <= max) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; + } +} + +void CheatSearchIncreasedBy8(u8 val) { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu8(SearchResults[i]) - PrevMu8(SearchResults[i]) == val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchIncreasedBy16(u16 val) { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu16(SearchResults[i]) - PrevMu16(SearchResults[i]) == val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchIncreasedBy32(u32 val) { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PSXMu32(SearchResults[i]) - PrevMu32(SearchResults[i]) == val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchDecreasedBy8(u8 val) { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu8(SearchResults[i]) - PSXMu8(SearchResults[i]) == val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchDecreasedBy16(u16 val) { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu16(SearchResults[i]) - PSXMu16(SearchResults[i]) == val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchDecreasedBy32(u32 val) { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu32(SearchResults[i]) - PSXMu32(SearchResults[i]) == val) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchIncreased8() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu8(SearchResults[i]) < PSXMu8(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchIncreased16() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu16(SearchResults[i]) < PSXMu16(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchIncreased32() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu32(SearchResults[i]) < PSXMu32(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchDecreased8() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu8(SearchResults[i]) > PSXMu8(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchDecreased16() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu16(SearchResults[i]) > PSXMu16(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchDecreased32() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu32(SearchResults[i]) > PSXMu32(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchDifferent8() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu8(SearchResults[i]) != PSXMu8(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchDifferent16() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu16(SearchResults[i]) != PSXMu16(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchDifferent32() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu32(SearchResults[i]) != PSXMu32(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchNoChange8() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu8(SearchResults[i]) == PSXMu8(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchNoChange16() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu16(SearchResults[i]) == PSXMu16(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} + +void CheatSearchNoChange32() { + u32 i, j; + + assert(prevM != NULL); // not possible for the first search + + j = 0; + + for (i = 0; i < NumSearchResults; i++) { + if (PrevMu32(SearchResults[i]) == PSXMu32(SearchResults[i])) { + SearchResults[j++] = SearchResults[i]; + } + } + + NumSearchResults = j; +} diff --git a/libpcsxcore/cheat.h b/libpcsxcore/cheat.h new file mode 100644 index 00000000..d54f22c3 --- /dev/null +++ b/libpcsxcore/cheat.h @@ -0,0 +1,117 @@ +/* Cheat Support for PCSX-Reloaded + * Copyright (C) 2009, Wei Mingzhi . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifndef CHEAT_H +#define CHEAT_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + uint32_t Addr; + uint16_t Val; +} CheatCode; + +typedef struct { + char *Descr; + int First; // index of the first cheat code + int n; // number of cheat codes for this cheat + int Enabled; +} Cheat; + +void ClearAllCheats(); + +void LoadCheats(const char *filename); +void SaveCheats(const char *filename); + +void ApplyCheats(); + +int AddCheat(const char *descr, char *code); +void RemoveCheat(int index); +int EditCheat(int index, const char *descr, char *code); + +void FreeCheatSearchResults(); +void FreeCheatSearchMem(); +void CheatSearchBackupMemory(); + +void CheatSearchEqual8(u8 val); +void CheatSearchEqual16(u16 val); +void CheatSearchEqual32(u32 val); +void CheatSearchNotEqual8(u8 val); +void CheatSearchNotEqual16(u16 val); +void CheatSearchNotEqual32(u32 val); +void CheatSearchRange8(u8 min, u8 max); +void CheatSearchRange16(u16 min, u16 max); +void CheatSearchRange32(u32 min, u32 max); +void CheatSearchIncreasedBy8(u8 val); +void CheatSearchIncreasedBy16(u16 val); +void CheatSearchIncreasedBy32(u32 val); +void CheatSearchDecreasedBy8(u8 val); +void CheatSearchDecreasedBy16(u16 val); +void CheatSearchDecreasedBy32(u32 val); +void CheatSearchIncreased8(); +void CheatSearchIncreased16(); +void CheatSearchIncreased32(); +void CheatSearchDecreased8(); +void CheatSearchDecreased16(); +void CheatSearchDecreased32(); +void CheatSearchDifferent8(); +void CheatSearchDifferent16(); +void CheatSearchDifferent32(); +void CheatSearchNoChange8(); +void CheatSearchNoChange16(); +void CheatSearchNoChange32(); + +extern Cheat *Cheats; +extern CheatCode *CheatCodes; +extern int NumCheats; +extern int NumCodes; + +extern s8 *prevM; +extern u32 *SearchResults; +extern int NumSearchResults; + +#define PREVM(mem) (&prevM[mem]) +#define PrevMu8(mem) (*(u8 *)PREVM(mem)) +#define PrevMu16(mem) (SWAP16(*(u16 *)PREVM(mem))) +#define PrevMu32(mem) (SWAP32(*(u32 *)PREVM(mem))) + +// cheat types +#define CHEAT_CONST8 0x30 /* 8-bit Constant Write */ +#define CHEAT_CONST16 0x80 /* 16-bit Constant Write */ +#define CHEAT_INC16 0x10 /* 16-bit Increment */ +#define CHEAT_DEC16 0x11 /* 16-bit Decrement */ +#define CHEAT_INC8 0x20 /* 8-bit Increment */ +#define CHEAT_DEC8 0x21 /* 8-bit Decrement */ +#define CHEAT_SLIDE 0x50 /* Slide Codes */ +#define CHEAT_MEMCPY 0xC2 /* Memory Copy */ + +#define CHEAT_EQU8 0xE0 /* 8-bit Equal To */ +#define CHEAT_NOTEQU8 0xE1 /* 8-bit Not Equal To */ +#define CHEAT_LESSTHAN8 0xE2 /* 8-bit Less Than */ +#define CHEAT_GREATERTHAN8 0xE3 /* 8-bit Greater Than */ +#define CHEAT_EQU16 0xD0 /* 16-bit Equal To */ +#define CHEAT_NOTEQU16 0xD1 /* 16-bit Not Equal To */ +#define CHEAT_LESSTHAN16 0xD2 /* 16-bit Less Than */ +#define CHEAT_GREATERTHAN16 0xD3 /* 16-bit Greater Than */ + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/coff.h b/libpcsxcore/coff.h new file mode 100644 index 00000000..1d084d28 --- /dev/null +++ b/libpcsxcore/coff.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __COFF_H__ +#define __COFF_H__ + +/********************** FILE HEADER **********************/ + +struct external_filehdr { + unsigned short f_magic; /* magic number */ + unsigned short f_nscns; /* number of sections */ + unsigned long f_timdat; /* time & date stamp */ + unsigned long f_symptr; /* file pointer to symtab */ + unsigned long f_nsyms; /* number of symtab entries */ + unsigned short f_opthdr; /* sizeof(optional hdr) */ + unsigned short f_flags; /* flags */ +}; + +#define FILHDR struct external_filehdr +#define FILHSZ sizeof(FILHDR) + +#endif diff --git a/libpcsxcore/debug.c b/libpcsxcore/debug.c new file mode 100644 index 00000000..307a0020 --- /dev/null +++ b/libpcsxcore/debug.c @@ -0,0 +1,1145 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "psxcommon.h" +#include "r3000a.h" +#include "debug.h" +#include "socket.h" + +/* +PCSX Debug console protocol description, version 1.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Commands number are formatted using %03X (yes) +Registers number are formatted using %02X. +Breakpoints numbers are formatted using %X +All other values are formatted using %08X, unless specified. + + +Client inputs: +~~~~~~~~~~~~~ +Basic commands (1xx): +-------------------- +100 + Sends a dumb message. Will be replied with a 200 reply, followed by the message. +101 + Gets PCSX version. +102 + Gets protocol version. +103 + Gets status +110 + Gets PC. +111 [reg] + Gets GP register, or all, if no argument. +112 + Gets LO/HI registers. +113 [reg] + Gets COP0 register, or all, if no argument. +114 [reg] + Gets COP2 control register, or all, if no argument. +115 [reg] + Gets COP2 data register, or all, if no argument. +119 [pc] + Disassemble current PC, or given PC. +121 = + Sets a GP register. Will return a 221 message. +122 = + Sets LO or HI register. Will return a 222 message. +123 = + Sets a COP0 register. Will return a 223 message. +124 = + Sets a COP2 control register. Will return a 224 message. +125 = + Sets a COP2 data register. Will return a 225 message. +130 @ + Dumps a range of memory, of size bytes starting at addr. +140 @ + Sets a range of memory, of size bytes starting at addr. + Will have to send immediately exactly size bytes afterward. +150 [number] + Starts/reset mapping execution flow, or stop it if number = 0 +151 [number] + Starts/reset mapping read8 flow, or stop it if number = 0 +152 [number] + Starts/reset mapping read16 flow, or stop it if number = 0 +153 [number] + Starts/reset mapping read32 flow, or stop it if number = 0 +154 [number] + Starts/reset mapping write8 flow, or stop it if number = 0 +155 [number] + Starts/reset mapping write16 flow, or stop it if number = 0 +156 [number] + Starts/reset mapping write32 flow, or stop it if number = 0 +160 [number] + Breaks on map exec flow, or stop it if number = 0 +161 [number] + Breaks on map read8 flow, or stop it if number = 0 +162 [number] + Breaks on map read16 flow, or stop it if number = 0 +163 [number] + Breaks on map read32 flow, or stop it if number = 0 +164 [number] + Breaks on map write8 flow, or stop it if number = 0 +165 [number] + Breaks on map write16 flow, or stop it if number = 0 +166 [number] + Breaks on map write32 flow, or stop it if number = 0 +170 + Dumps the execution flow map in an IDC file + +Execution flow control commands (3xx): +------------------------------------- +300 [number] + Get a list of the actual breakpoints. Will get '400' answers. +301 [number] + Deletes a breakpoint, or all, if no arguments. +310
+ Sets an exec breakpoint. +320
+ Sets a read breakpoint, 1 byte / 8 bits. +321
+ Sets a read breakpoint, 2 bytes / 16 bits, has to be on an even address. +322
+ Sets a read breakpoint, 4 bytes / 32 bits, address has to be 4-bytes aligned. +330
+ Sets a write breakpoint, 1 byte / 8 bits. +331
+ Sets a write breakpoint, 2 bytes / 16 bits, has to be on an even address. +332
+ Sets a write breakpoint, 4 bytes / 32 bits, address has to be 4-bytes aligned. +390 + Pauses execution. Equivalents to a breakpoint. +391 + Restarts execution. +395 [number] + Traces execution, 1 instruction by default. Formatted using %i +398 + Soft (quick) resets. +399 + Resets. + + +Server outputs: +~~~~~~~~~~~~~~ +Spontaneous messages (0xx): +-------------------------- +000 + Greeting banner. +010 / 011 / 012 / 013 / 014 / 015 / 016 + Execution hit mapping flow automatic breakpoint. +030 @ + Execution hit breakpoint, PCSX is paused. Displays PC's value. + +Basic commands acknowledge (2xx): +-------------------------------- +200 + Sends a dumb message. +201 + Returns PCSX version. +202 + Returns protocol version. +203 + status = 0: running; = 1: paused; = 2: trace +210 PC= + Displays current PC value. +211 = + Displays one GP register value. +212 LO= HI= + Displays LO/HI registers. +213 = + Displays one COP0 register value. +214 = + Displays one COP2 control register value. +215 = + Displays one COP2 data register value. +219 + Displays one line of disassembled code. +221 = + Displays one GP register value, ack for modification. +222 LO= HI= + Displays LO/HI registers, ack for modification. +223 = + Displays one COP0 register value, ack for modification. +224 = + Displays one COP2 control register value, ack for modification. +225 = + Displays one COP2 data register value, ack for modification. +230 @ + Dumping memory. Will then raw outputs size bytes. +240 @ + Memory set acknowledge. +250 / 251 / 252 / 253 / 254 / 255 / 256 + Acknolwedge of 15x commands. +260 / 261 / 262 / 263 / 264 / 265 / 266 + Acknolwedge of 16x commands. +270 + Acknolwedge of 170 command. + +Execution flow control commands acknowledge (4xx): +------------------------------------------------- +400 @
- + Displays a breakpoint, where 'type' can be of E, R1, R2, R4, W1, W2 or W4. +401 + Breakpoint deleting acknowledge. +410, 420, 421, 422, 430, 431, 432 + Breakpoint adding acknowledge. Returns the number of the added breakpoint. +490 + Pausing. +491 + Resuming. +495 + Tracing. +498 + Soft resetting. +499 + Resetting. + +Error messages (5xx): +-------------------- +500 + Command not understood. +511 + Invalid GPR register. +512 + Invalid LO/HI register. +513, 514 + Invalid range or address. +530 + Non existant breakpoint. +531, 532, 533 + Invalid breakpoint address. +*/ + +static int debugger_active = 0, paused = 0, trace = 0, reset = 0, resetting = 0; +static int mapping_e = 0, mapping_r8 = 0, mapping_r16 = 0, mapping_r32 = 0, mapping_w8 = 0, mapping_w16 = 0, mapping_w32 = 0; +static int breakmp_e = 0, breakmp_r8 = 0, breakmp_r16 = 0, breakmp_r32 = 0, breakmp_w8 = 0, breakmp_w16 = 0, breakmp_w32 = 0; + +static void ProcessCommands(); + +static u8 *MemoryMap = NULL; + +enum { + MAP_EXEC = 1, + MAP_R8 = 2, + MAP_R16 = 4, + MAP_R32 = 8, + MAP_W8 = 16, + MAP_W16 = 32, + MAP_W32 = 64, + MAP_EXEC_JAL = 128, +}; + +char *breakpoint_type_names[] = { + "E", "R1", "R2", "R4", "W1", "W2", "W4" +}; + +typedef struct breakpoint_s { + struct breakpoint_s *next, *prev; + int number, type; + u32 address; +} breakpoint_t; + +static breakpoint_t *first = NULL; + +int add_breakpoint(int type, u32 address) { + breakpoint_t *bp = (breakpoint_t *)malloc(sizeof(breakpoint_t)); + + bp->type = type; + bp->address = address; + + if (first) { + bp->number = first->prev->number + 1; + bp->next = first; + bp->prev = first->prev; + first->prev = bp; + bp->prev->next = bp; + } else { + first = bp; + bp->number = 1; + bp->next = bp; + bp->prev = bp; + } + + return bp->number; +} + +void delete_breakpoint(breakpoint_t * bp) { + if (bp == first) { + if (bp->next == bp) { + first = NULL; + } else { + first = bp->next; + } + } + + bp->next->prev = bp->prev; + bp->prev->next = bp->next; + + free(bp); +} + +breakpoint_t *next_breakpoint(breakpoint_t *bp) { + return bp->next != first ? bp->next : 0; +} + +breakpoint_t *find_breakpoint(int number) { + breakpoint_t *p; + + for (p = first; p; p = next_breakpoint(p)) { + if (p->number == number) + return p; + } + + return 0; +} + +void StartDebugger() { + if (debugger_active) + return; + + MemoryMap = (u8 *)malloc(0x200000); + if (MemoryMap == NULL) { + SysMessage(_("Error allocating memory")); + return; + } + + if (StartServer() == -1) { + SysPrintf(_("Unable to start debug server.\n")); + return; + } + + SysPrintf(_("Debugger started.\n")); + debugger_active = 1; +} + +void StopDebugger() { + if (debugger_active) { + StopServer(); + SysPrintf(_("Debugger stopped.\n")); + } + + if (MemoryMap != NULL) { + free(MemoryMap); + MemoryMap = NULL; + } + + while (first != NULL) delete_breakpoint(first); + + debugger_active = 0; +} + +void PauseDebugger() { + trace = 0; + paused = 1; +} + +void ResumeDebugger() { + trace = 0; + paused = 0; +} + +void DebugVSync() { + if (!debugger_active || resetting) + return; + + if (reset) { + resetting = 1; + CheckCdrom(); + SysReset(); + if (reset == 2) + LoadCdrom(); + reset = resetting = 0; + return; + } + + GetClient(); + ProcessCommands(); +} + +void MarkMap(u32 address, int mask) { + if ((address & 0xff000000) != 0x80000000) return; + MemoryMap[address & 0x001fffff] |= mask; +} + +int IsMapMarked(u32 address, int mask) { + return (MemoryMap[address & 0x001fffff] & mask) != 0; +} + +void ProcessDebug() { + if (!debugger_active || reset || resetting) + return; + if (trace) { + if (!(--trace)) { + paused = 1; + } + } + if (!paused) { + DebugCheckBP(psxRegs.pc, E); + } + if (mapping_e) { + MarkMap(psxRegs.pc, MAP_EXEC); + if ((psxRegs.code >> 26) == 3) { + MarkMap(_JumpTarget_, MAP_EXEC_JAL); + } + if (((psxRegs.code >> 26) == 0) && ((psxRegs.code && 0x3F) == 9)) { + MarkMap(_Rd_, MAP_EXEC_JAL); + } + } + while (paused) { + GetClient(); + ProcessCommands(); + GPU_updateLace(); + SysUpdate(); + } +} + +static void ProcessCommands() { + int code, i, dumping; + FILE *sfile; + char cmd[257], *arguments, *p, reply[10240], *save, *dump; + u32 reg, value, size, address; + breakpoint_t *bp; + + if (!HasClient()) + return; + if (ReadSocket(cmd, 256) > 0) { + arguments = NULL; + if (strlen(cmd) <= 2) { + code = 0; + } else if (strlen(cmd) == 3) { + code = strtol(cmd, 0, 16); + } else if (!(isxdigit(cmd[0]) && isxdigit(cmd[1]) && isxdigit(cmd[2]) && (cmd[3] == 0x20))) { + code = 0; + } else if (sscanf(cmd, "%3X ", &code) != 1) { + code = 0; + } else { + arguments = cmd + 4; + } + code = strtol(cmd, &arguments, 16); + while (arguments && *arguments && *arguments == 0x20) + arguments++; + + if (*arguments == '\0') + arguments = NULL; + + dumping = 0; + save = NULL; + + switch (code) { + case 0x100: + sprintf(reply, "200 %s\r\n", arguments == NULL ? "OK" : arguments); + break; + case 0x101: + sprintf(reply, "201 %s\r\n", PACKAGE_VERSION); + break; + case 0x102: + sprintf(reply, "202 1.0\r\n"); + break; + case 0x103: + sprintf(reply, "203 %i\r\n", paused ? 1 : trace ? 2 : 0); + break; + case 0x110: + sprintf(reply, "210 PC=%08X\r\n", psxRegs.pc); + break; + case 0x111: + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "511 Malformed 111 command '%s'\r\n", cmd); + break; + } + } + if (!arguments) { + reply[0] = 0; + for (i = 0; i < 32; i++) { + sprintf(reply, "%s211 %02X=%08X\r\n", reply, i, psxRegs.GPR.r[i]); + } + } else { + if ((code >= 0) && (code < 32)) { + sprintf(reply, "211 %02X=%08X\r\n", code, psxRegs.GPR.r[code]); + } else { + sprintf(reply, "511 Invalid GPR register: %X\r\n", code); + } + } + break; + case 0x112: + sprintf(reply, "212 LO=%08X HI=%08X\r\n", psxRegs.GPR.n.lo, psxRegs.GPR.n.hi); + break; + case 0x113: + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "511 Malformed 113 command '%s'\r\n", cmd); + break; + } + } + if (!arguments) { + reply[0] = 0; + for (i = 0; i < 32; i++) { + sprintf(reply, "%s213 %02X=%08X\r\n", reply, i, psxRegs.CP0.r[i]); + } + } else { + if ((code >= 0) && (code < 32)) { + sprintf(reply, "213 %02X=%08X\r\n", code, psxRegs.CP0.r[code]); + } else { + sprintf(reply, "511 Invalid COP0 register: %X\r\n", code); + } + } + break; + case 0x114: + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "511 Malformed 114 command '%s'\r\n", cmd); + break; + } + } + if (!arguments) { + reply[0] = 0; + for (i = 0; i < 32; i++) { + sprintf(reply, "%s214 %02X=%08X\r\n", reply, i, psxRegs.CP2C.r[i]); + } + } else { + if ((code >= 0) && (code < 32)) { + sprintf(reply, "214 %02X=%08X\r\n", code, psxRegs.CP2C.r[code]); + } else { + sprintf(reply, "511 Invalid COP2C register: %X\r\n", code); + } + } + break; + case 0x115: + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "511 Malformed 111 command '%s'\r\n", cmd); + break; + } + } + if (!arguments) { + reply[0] = 0; + for (i = 0; i < 32; i++) { + sprintf(reply, "%s215 %02X=%08X\r\n", reply, i, psxRegs.CP2D.r[i]); + } + } else { + if ((code >= 0) && (code < 32)) { + sprintf(reply, "215 %02X=%08X\r\n", code, psxRegs.CP2D.r[code]); + } else { + sprintf(reply, "511 Invalid COP2D register: %X\r\n", code); + } + } + break; + case 0x119: + if (arguments) { + if (sscanf(arguments, "%08X", &code) != 1) { + sprintf(reply, "511 Malformed 119 command '%s'\r\n", cmd); + break; + } + } + if (!arguments) + code = psxRegs.pc; + + sprintf(reply, "219 %s\r\n", disR3000AF(psxMemRead32(code), code)); + break; + case 0x121: + if (!arguments || sscanf(arguments, "%02X=%08X", ®, &value) != 2) { + sprintf(reply, "500 Malformed 121 command '%s'\r\n", arguments); + break; + } + + if (reg < 32) { + psxRegs.GPR.r[reg] = value; + sprintf(reply, "221 %02X=%08X\r\n", reg, value); + } else { + sprintf(reply, "512 Invalid GPR register: %02X\r\n", reg); + } + break; + case 0x122: + if (!arguments || strncmp(arguments, "HI=", 3) == 0) { + reg = 33; + } else if (arguments && strncmp(arguments, "LO=", 3) == 0) { + reg = 32; + } else { + arguments[2] = 0; + sprintf(reply, "512 Invalid LO/HI register: '%s'\r\n", arguments); + break; + } + + if (sscanf(arguments + 3, "%08X", &value) != 1) { + sprintf(reply, "500 Malformed 122 command '%s'\r\n", arguments); + } else { + psxRegs.GPR.r[reg] = value; + sprintf(reply, "222 LO=%08X HI=%08X\r\n", psxRegs.GPR.n.lo, psxRegs.GPR.n.hi); + } + break; + case 0x123: + if (!arguments || sscanf(arguments, "%02X=%08X", ®, &value) != 2) { + sprintf(reply, "500 Malformed 123 command '%s'\r\n", arguments); + break; + } + + if (reg < 32) { + psxRegs.CP0.r[reg] = value; + sprintf(reply, "223 %02X=%08X\r\n", reg, value); + } else { + sprintf(reply, "512 Invalid COP0 register: %02X\r\n", reg); + } + break; + case 0x124: + if (!arguments || sscanf(arguments, "%02X=%08X", ®, &value) != 2) { + sprintf(reply, "500 Malformed 124 command '%s'\r\n", arguments); + break; + } + + if (reg < 32) { + psxRegs.CP2C.r[reg] = value; + sprintf(reply, "224 %02X=%08X\r\n", reg, value); + } else { + sprintf(reply, "512 Invalid COP2C register: %02X\r\n", reg); + } + break; + case 0x125: + if (!arguments || sscanf(arguments, "%02X=%08X", ®, &value) != 2) { + sprintf(reply, "500 Malformed 121 command '%s'\r\n", arguments); + break; + } + + if (reg < 32) { + psxRegs.CP2D.r[reg] = value; + sprintf(reply, "225 %02X=%08X\r\n", reg, value); + } else { + sprintf(reply, "512 Invalid COP2D register: %02X\r\n", reg); + } + break; + case 0x130: + if (!arguments || sscanf(arguments, "%08X@%08X", &size, &address) != 2) { + sprintf(reply, "500 Malformed 130 command '%s'\r\n", arguments); + break; + } + + if ((address >= 0x80000000) && ((address + size) <= 0x80200000)) { + sprintf(reply, "230 %08X@%08X\r\n", size, address); + dump = (char *) PSXM(address); + dumping = 1; + } else { + sprintf(reply, "513 Invalid address or range: '%s'\r\n", arguments); + } + break; + case 0x140: + if (!arguments || sscanf(arguments, "%08X@%08X", &size, &address) != 2) { + sprintf(reply, "500 Malformed 140 command '%s'\r\n", arguments); + break; + } + + if ((address >= 0x80000000) && ((address + size) <= 0x80200000)) { + sprintf(reply, "240 %08X@%08X\r\n", size, address); + RawReadSocket((char *)PSXM(address), size); + } else { + sprintf(reply, "514 Invalid address or range: '%s'\r\n", arguments); + } + break; + case 0x150: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 150 command '%s'\r\n", cmd); + break; + } + } + if (code) { + mapping_e = 1; + for (i = 0; i < 0x00200000; i++) { + MemoryMap[i] &= ~MAP_EXEC; + MemoryMap[i] &= ~MAP_EXEC_JAL; + } + } else { + mapping_e = 0; + } + sprintf(reply, "250 Mapping of exec flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x151: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 151 command '%s'\r\n", cmd); + break; + } + } + if (code) { + mapping_r8 = 1; + for (i = 0; i < 0x00200000; i++) { + MemoryMap[i] &= ~MAP_R8; + } + } else { + mapping_r8 = 0; + } + sprintf(reply, "251 Mapping of read8 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x152: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 152 command '%s'\r\n", cmd); + break; + } + } + if (code) { + mapping_r16 = 1; + for (i = 0; i < 0x00200000; i++) { + MemoryMap[i] &= ~MAP_R16; + } + } else { + mapping_r16 = 0; + } + sprintf(reply, "252 Mapping of read16 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x153: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 153 command '%s'\r\n", cmd); + break; + } + } + if (code) { + mapping_r32 = 1; + for (i = 0; i < 0x00200000; i++) { + MemoryMap[i] &= ~MAP_R32; + } + } else { + mapping_r32 = 0; + } + sprintf(reply, "253 Mapping of read32 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x154: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 154 command '%s'\r\n", cmd); + break; + } + } + if (code) { + mapping_w8 = 1; + for (i = 0; i < 0x00200000; i++) { + MemoryMap[i] &= ~MAP_W8; + } + } else { + mapping_w8 = 0; + } + sprintf(reply, "254 Mapping of write8 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x155: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 155 command '%s'\r\n", cmd); + break; + } + } + if (code) { + mapping_w16 = 1; + for (i = 0; i < 0x00200000; i++) { + MemoryMap[i] &= ~MAP_W16; + } + } else { + mapping_w16 = 0; + } + sprintf(reply, "255 Mapping of write16 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x156: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 156 command '%s'\r\n", cmd); + break; + } + } + if (code) { + mapping_w32 = 1; + for (i = 0; i < 0x00200000; i++) { + MemoryMap[i] &= ~MAP_W32; + } + } else { + mapping_w32 = 0; + } + sprintf(reply, "256 Mapping of write32 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x160: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 160 command '%s'\r\n", cmd); + break; + } + } + if (code) { + breakmp_e = 1; + } else { + breakmp_e = 0; + } + sprintf(reply, "260 Break on map of exec flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x161: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 161 command '%s'\r\n", cmd); + break; + } + } + if (code) { + breakmp_r8 = 1; + } else { + breakmp_r8 = 0; + } + sprintf(reply, "261 Break on map of read8 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x162: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 162 command '%s'\r\n", cmd); + break; + } + } + if (code) { + breakmp_r16 = 1; + } else { + breakmp_r16 = 0; + } + sprintf(reply, "262 Break on map of read16 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x163: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 163 command '%s'\r\n", cmd); + break; + } + } + if (code) { + breakmp_r32 = 1; + } else { + breakmp_r32 = 0; + } + sprintf(reply, "263 Break on map of read32 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x164: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 164 command '%s'\r\n", cmd); + break; + } + } + if (code) { + breakmp_w8 = 1; + } else { + breakmp_w8 = 0; + } + sprintf(reply, "264 Break on map of write8 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x165: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 165 command '%s'\r\n", cmd); + break; + } + } + if (code) { + breakmp_w16 = 1; + } else { + breakmp_w16 = 0; + } + sprintf(reply, "265 Break on map of write16 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x166: + code = 1; + if (arguments) { + if (sscanf(arguments, "%02X", &code) != 1) { + sprintf(reply, "500 Malformed 166 command '%s'\r\n", cmd); + break; + } + } + if (code) { + breakmp_w32 = 1; + } else { + breakmp_w32 = 0; + } + sprintf(reply, "266 Break on map of write32 flow %s\r\n", code ? "started" : "stopped"); + break; + case 0x170: + sfile = fopen("flow.idc", "wb"); + fprintf(sfile, "#include \r\n\r\n"); + fprintf(sfile, "static main(void) {\r\n"); + for (i = 0; i < 0x00200000; i++) { + if (IsMapMarked(i, MAP_EXEC_JAL)) { + fprintf(sfile, "\tMakeFunction(0X8%07X,BADADDR);\r\n", i); + } + } + fprintf(sfile, "}\r\n"); + fclose(sfile); + sfile = fopen("markcode.idc", "wb"); + fprintf(sfile, "#include \r\n\r\n"); + fprintf(sfile, "static main(void) {\r\n"); + for (i = 0; i < 0x00200000; i++) { + if (IsMapMarked(i, MAP_EXEC)) { + fprintf(sfile, "\tMakeCode(0X8%07X);\r\n", i); + } + } + fprintf(sfile, "}\r\n"); + fclose(sfile); + sprintf(reply, "270 flow.idc and markcode.idc dumped\r\n"); + break; + case 0x300: + p = arguments; + if (arguments) { + code = strtol(arguments, &p, 16); + } + if (p == arguments) { + if (first) { + reply[0] = 0; + for (bp = first; bp; bp = next_breakpoint(bp)) { + sprintf(reply, "%s400 %X@%08X-%s\r\n", reply, bp->number, bp->address, breakpoint_type_names[bp->type]); + } + } else { + sprintf(reply, "530 No breakpoint\r\n"); + } + } else { + if ((bp = find_breakpoint(code))) { + sprintf(reply, "400 %X@%08X-%s\r\n", bp->number, bp->address, breakpoint_type_names[bp->type]); + } else { + sprintf(reply, "530 Invalid breakpoint number: %X\r\n", code); + } + } + break; + case 0x301: + p = arguments; + if (arguments) { + code = strtol(arguments, &p, 16); + } + if (p == arguments) { + while (first != NULL) delete_breakpoint(first); + sprintf(reply, "401 All breakpoints deleted.\r\n"); + } else { + if ((bp = find_breakpoint(code))) { + delete_breakpoint(bp); + sprintf(reply, "401 Breakpoint %X deleted.\r\n", code); + } else { + sprintf(reply, "530 Invalid breakpoint number: %X\r\n", code); + } + } + break; + case 0x310: + if (!arguments || sscanf(arguments, "%08X", &address) != 1) { + sprintf(reply, "500 Malformed 310 command '%s'\r\n", arguments); + break; + } +// if ((address & 3) || (address < 0x80000000) || (address >= 0x80200000)) { +// sprintf(reply, "531 Invalid address %08X\r\n", address); +// break; +// } + code = add_breakpoint(E, address); + sprintf(reply, "410 %X\r\n", code); + break; + case 0x320: + if (!arguments || sscanf(arguments, "%08X", &address) != 1) { + sprintf(reply, "500 Malformed 320 command '%s'\r\n", arguments); + break; + } + if ((address < 0x80000000) || (address >= 0x80200000)) { + sprintf(reply, "532 Invalid address %08X\r\n", address); + break; + } + code = add_breakpoint(R1, address); + sprintf(reply, "420 %X\r\n", code); + break; + case 0x321: + if (!arguments || sscanf(arguments, "%08X", &address) != 1) { + sprintf(reply, "500 Malformed 321 command '%s'\r\n", arguments); + break; + } + if ((address & 1) || (address < 0x80000000) || (address >= 0x80200000)) { + sprintf(reply, "532 Invalid address %08X\r\n", address); + break; + } + code = add_breakpoint(R2, address); + sprintf(reply, "421 %X\r\n", code); + break; + case 0x322: + if (!arguments || sscanf(arguments, "%08X", &address) != 1) { + sprintf(reply, "500 Malformed 322 command '%s'\r\n", arguments); + break; + } + if ((address & 3) || (address < 0x80000000) || (address >= 0x80200000)) { + sprintf(reply, "532 Invalid address %08X\r\n", address); + break; + } + code = add_breakpoint(R4, address); + sprintf(reply, "422 %X\r\n", code); + break; + case 0x330: + if (!arguments || sscanf(arguments, "%08X", &address) != 1) { + sprintf(reply, "500 Malformed 330 command '%s'\r\n", arguments); + break; + } + if ((address < 0x80000000) || (address >= 0x80200000)) { + sprintf(reply, "533 Invalid address %08X\r\n", address); + break; + } + code = add_breakpoint(W1, address); + sprintf(reply, "430 %X\r\n", code); + break; + case 0x331: + if (!arguments || sscanf(arguments, "%08X", &address) != 1) { + sprintf(reply, "500 Malformed 331 command '%s'\r\n", arguments); + break; + } + if ((address & 1) || (address < 0x80000000) || (address >= 0x80200000)) { + sprintf(reply, "533 Invalid address %08X\r\n", address); + break; + } + code = add_breakpoint(W2, address); + sprintf(reply, "431 %X\r\n", code); + break; + case 0x332: + if (!arguments || sscanf(arguments, "%08X", &address) != 1) { + sprintf(reply, "500 Malformed 332 command '%s'\r\n", arguments); + break; + } + if ((address & 3) || (address < 0x80000000) || (address >= 0x80200000)) { + sprintf(reply, "533 Invalid address %08X\r\n", address); + break; + } + code = add_breakpoint(W4, address); + sprintf(reply, "432 %X\r\n", code); + break; + case 0x390: + paused = 1; + sprintf(reply, "490 Paused\r\n"); + break; + case 0x391: + paused = 0; + sprintf(reply, "491 Resumed\r\n"); + break; + case 0x395: + p = arguments; + if (arguments) { + trace = strtol(arguments, &p, 10); + } + if (p == arguments) { + trace = 1; + } + paused = 0; + sprintf(reply, "495 Tracing\r\n"); + break; + case 0x398: + paused = 0; + trace = 0; + reset = 2; + sprintf(reply, "498 Soft resetting\r\n"); + break; + case 0x399: + paused = 0; + trace = 0; + reset = 1; + sprintf(reply, "499 Resetting\r\n"); + break; + default: + sprintf(reply, "500 Unknown command '%s'\r\n", cmd); + break; + } + WriteSocket(reply, strlen(reply)); + + if (dumping) { + WriteSocket(dump, size); + } + + if (save) { + free(save); + } + } +} + +void DebugCheckBP(u32 address, enum breakpoint_types type) { + breakpoint_t *bp; + char reply[512]; + + if (!debugger_active || reset) + return; + for (bp = first; bp; bp = next_breakpoint(bp)) { + if ((bp->type == type) && (bp->address == address)) { + sprintf(reply, "030 %X@%08X\r\n", bp->number, psxRegs.pc); + WriteSocket(reply, strlen(reply)); + paused = 1; + return; + } + } + if (breakmp_e && type == E) { + if (!IsMapMarked(address, MAP_EXEC)) { + sprintf(reply, "010 %08X@%08X\r\n", address, psxRegs.pc); + WriteSocket(reply, strlen(reply)); + paused = 1; + } + } + if (breakmp_r8 && type == R1) { + if (!IsMapMarked(address, MAP_R8)) { + sprintf(reply, "011 %08X@%08X\r\n", address, psxRegs.pc); + WriteSocket(reply, strlen(reply)); + paused = 1; + } + } + if (breakmp_r16 && type == R2) { + if (!IsMapMarked(address, MAP_R16)) { + sprintf(reply, "012 %08X@%08X\r\n", address, psxRegs.pc); + WriteSocket(reply, strlen(reply)); + paused = 1; + } + } + if (breakmp_r32 && type == R4) { + if (!IsMapMarked(address, MAP_R32)) { + sprintf(reply, "013 %08X@%08X\r\n", address, psxRegs.pc); + WriteSocket(reply, strlen(reply)); + paused = 1; + } + } + if (breakmp_w8 && type == W1) { + if (!IsMapMarked(address, MAP_W8)) { + sprintf(reply, "014 %08X@%08X\r\n", address, psxRegs.pc); + WriteSocket(reply, strlen(reply)); + paused = 1; + } + } + if (breakmp_w16 && type == W2) { + if (!IsMapMarked(address, MAP_W16)) { + sprintf(reply, "015 %08X@%08X\r\n", address, psxRegs.pc); + WriteSocket(reply, strlen(reply)); + paused = 1; + } + } + if (breakmp_w32 && type == W4) { + if (!IsMapMarked(address, MAP_W32)) { + sprintf(reply, "016 %08X@%08X\r\n", address, psxRegs.pc); + WriteSocket(reply, strlen(reply)); + paused = 1; + } + } + if (mapping_r8 && type == R1) MarkMap(address, MAP_R8); + if (mapping_r16 && type == R2) MarkMap(address, MAP_R16); + if (mapping_r32 && type == R4) MarkMap(address, MAP_R32); + if (mapping_w8 && type == W1) MarkMap(address, MAP_W8); + if (mapping_w16 && type == W2) MarkMap(address, MAP_W16); + if (mapping_w32 && type == W4) MarkMap(address, MAP_W32); + } diff --git a/libpcsxcore/debug.h b/libpcsxcore/debug.h new file mode 100644 index 00000000..5c5336d4 --- /dev/null +++ b/libpcsxcore/debug.h @@ -0,0 +1,72 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __DEBUG_H__ +#define __DEBUG_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +enum breakpoint_types { + E, R1, R2, R4, W1, W2, W4 +}; + +void StartDebugger(); +void StopDebugger(); + +void DebugVSync(); +void ProcessDebug(); + +void DebugCheckBP(u32 address, enum breakpoint_types type); + +void PauseDebugger(); +void ResumeDebugger(); + +extern char *disRNameCP0[]; + +char* disR3000AF(u32 code, u32 pc); + +/* + * Specficies which logs should be activated. + */ + +//#define LOG_STDOUT + +//#define PAD_LOG __Log +//#define GTE_LOG __Log +//#define CDR_LOG __Log("%8.8lx %8.8lx: ", psxRegs.pc, psxRegs.cycle); __Log + +//#define PSXHW_LOG __Log("%8.8lx %8.8lx: ", psxRegs.pc, psxRegs.cycle); __Log +//#define PSXBIOS_LOG __Log("%8.8lx %8.8lx: ", psxRegs.pc, psxRegs.cycle); __Log +//#define PSXDMA_LOG __Log +//#define PSXMEM_LOG __Log("%8.8lx %8.8lx: ", psxRegs.pc, psxRegs.cycle); __Log +//#define PSXCPU_LOG __Log + +//#define CDRCMD_DEBUG + +#if defined (PSXCPU_LOG) || defined(PSXDMA_LOG) || defined(CDR_LOG) || defined(PSXHW_LOG) || \ + defined(PSXBIOS_LOG) || defined(PSXMEM_LOG) || defined(GTE_LOG) || defined(PAD_LOG) +#define EMU_LOG __Log +#endif + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/decode_xa.c b/libpcsxcore/decode_xa.c new file mode 100644 index 00000000..ee1dd6f3 --- /dev/null +++ b/libpcsxcore/decode_xa.c @@ -0,0 +1,367 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* XA audio decoding functions (Kazzuya). +*/ + +#include "decode_xa.h" + +#define FIXED + +#define NOT(_X_) (!(_X_)) +#define XACLAMP(_X_,_MI_,_MA_) {if(_X_<_MI_)_X_=_MI_;if(_X_>_MA_)_X_=_MA_;} + +#define SH 4 +#define SHC 10 + +//============================================ +//=== ADPCM DECODING ROUTINES +//============================================ + +#ifndef FIXED +static double K0[4] = { + 0.0, + 0.9375, + 1.796875, + 1.53125 +}; + +static double K1[4] = { + 0.0, + 0.0, + -0.8125, + -0.859375 +}; +#else +static int K0[4] = { + 0.0 * (1<y0 = 0; + decp->y1 = 0; +} + +//=========================================== +#ifndef FIXED +#define IK0(fid) ((int)((-K0[fid]) * (1<> 4) & 0x0f; + range = (filter_range >> 0) & 0x0f; + + fy0 = decp->y0; + fy1 = decp->y1; + + for (i = BLKSIZ/4; i; --i) { + s32 y; + s32 x0, x1, x2, x3; + + y = *blockp++; + x3 = (short)( y & 0xf000) >> range; x3 <<= SH; + x2 = (short)((y << 4) & 0xf000) >> range; x2 <<= SH; + x1 = (short)((y << 8) & 0xf000) >> range; x1 <<= SH; + x0 = (short)((y << 12) & 0xf000) >> range; x0 <<= SH; + + x0 -= (IK0(filterid) * fy0 + (IK1(filterid) * fy1)) >> SHC; fy1 = fy0; fy0 = x0; + x1 -= (IK0(filterid) * fy0 + (IK1(filterid) * fy1)) >> SHC; fy1 = fy0; fy0 = x1; + x2 -= (IK0(filterid) * fy0 + (IK1(filterid) * fy1)) >> SHC; fy1 = fy0; fy0 = x2; + x3 -= (IK0(filterid) * fy0 + (IK1(filterid) * fy1)) >> SHC; fy1 = fy0; fy0 = x3; + + XACLAMP( x0, -32768<> SH; destp += inc; + XACLAMP( x1, -32768<> SH; destp += inc; + XACLAMP( x2, -32768<> SH; destp += inc; + XACLAMP( x3, -32768<> SH; destp += inc; + } + decp->y0 = fy0; + decp->y1 = fy1; +} + +static int headtable[4] = {0,2,8,10}; + +//=========================================== +static void xa_decode_data( xa_decode_t *xdp, unsigned char *srcp ) { + const u8 *sound_groupsp; + const u8 *sound_datap, *sound_datap2; + int i, j, k, nbits; + u16 data[4096], *datap; + short *destp; + + destp = xdp->pcm; + nbits = xdp->nbits == 4 ? 4 : 2; + + if (xdp->stereo) { // stereo + if ((xdp->nbits == 8) && (xdp->freq == 37800)) { // level A + for (j=0; j < 18; j++) { + sound_groupsp = srcp + j * 128; // sound groups header + sound_datap = sound_groupsp + 16; // sound data just after the header + + for (i=0; i < nbits; i++) { + datap = data; + sound_datap2 = sound_datap + i; + + for (k=0; k < 14; k++, sound_datap2 += 8) { + *(datap++) = (u16)sound_datap2[0] | + (u16)(sound_datap2[4] << 8); + } + + ADPCM_DecodeBlock16( &xdp->left, sound_groupsp[headtable[i]+0], data, + destp+0, 2 ); + + datap = data; + sound_datap2 = sound_datap + i; + for (k=0; k < 14; k++, sound_datap2 += 8) { + *(datap++) = (u16)sound_datap2[0] | + (u16)(sound_datap2[4] << 8); + } + ADPCM_DecodeBlock16( &xdp->right, sound_groupsp[headtable[i]+1], data, + destp+1, 2 ); + + destp += 28*2; + } + } + } else { // level B/C + for (j=0; j < 18; j++) { + sound_groupsp = srcp + j * 128; // sound groups header + sound_datap = sound_groupsp + 16; // sound data just after the header + + for (i=0; i < nbits; i++) { + datap = data; + sound_datap2 = sound_datap + i; + + for (k=0; k < 7; k++, sound_datap2 += 16) { + *(datap++) = (u16)(sound_datap2[ 0] & 0x0f) | + ((u16)(sound_datap2[ 4] & 0x0f) << 4) | + ((u16)(sound_datap2[ 8] & 0x0f) << 8) | + ((u16)(sound_datap2[12] & 0x0f) << 12); + } + ADPCM_DecodeBlock16( &xdp->left, sound_groupsp[headtable[i]+0], data, + destp+0, 2 ); + + datap = data; + sound_datap2 = sound_datap + i; + for (k=0; k < 7; k++, sound_datap2 += 16) { + *(datap++) = (u16)(sound_datap2[ 0] >> 4) | + ((u16)(sound_datap2[ 4] >> 4) << 4) | + ((u16)(sound_datap2[ 8] >> 4) << 8) | + ((u16)(sound_datap2[12] >> 4) << 12); + } + ADPCM_DecodeBlock16( &xdp->right, sound_groupsp[headtable[i]+1], data, + destp+1, 2 ); + + destp += 28*2; + } + } + } + } else { // mono + if ((xdp->nbits == 8) && (xdp->freq == 37800)) { // level A + for (j=0; j < 18; j++) { + sound_groupsp = srcp + j * 128; // sound groups header + sound_datap = sound_groupsp + 16; // sound data just after the header + + for (i=0; i < nbits; i++) { + datap = data; + sound_datap2 = sound_datap + i; + for (k=0; k < 14; k++, sound_datap2 += 8) { + *(datap++) = (u16)sound_datap2[0] | + (u16)(sound_datap2[4] << 8); + } + ADPCM_DecodeBlock16( &xdp->left, sound_groupsp[headtable[i]+0], data, + destp, 1 ); + + destp += 28; + + datap = data; + sound_datap2 = sound_datap + i; + for (k=0; k < 14; k++, sound_datap2 += 8) { + *(datap++) = (u16)sound_datap2[0] | + (u16)(sound_datap2[4] << 8); + } + ADPCM_DecodeBlock16( &xdp->left, sound_groupsp[headtable[i]+1], data, + destp, 1 ); + + destp += 28; + } + } + } else { // level B/C + for (j=0; j < 18; j++) { + sound_groupsp = srcp + j * 128; // sound groups header + sound_datap = sound_groupsp + 16; // sound data just after the header + + for (i=0; i < nbits; i++) { + datap = data; + sound_datap2 = sound_datap + i; + for (k=0; k < 7; k++, sound_datap2 += 16) { + *(datap++) = (u16)(sound_datap2[ 0] & 0x0f) | + ((u16)(sound_datap2[ 4] & 0x0f) << 4) | + ((u16)(sound_datap2[ 8] & 0x0f) << 8) | + ((u16)(sound_datap2[12] & 0x0f) << 12); + } + ADPCM_DecodeBlock16( &xdp->left, sound_groupsp[headtable[i]+0], data, + destp, 1 ); + + destp += 28; + + datap = data; + sound_datap2 = sound_datap + i; + for (k=0; k < 7; k++, sound_datap2 += 16) { + *(datap++) = (u16)(sound_datap2[ 0] >> 4) | + ((u16)(sound_datap2[ 4] >> 4) << 4) | + ((u16)(sound_datap2[ 8] >> 4) << 8) | + ((u16)(sound_datap2[12] >> 4) << 12); + } + ADPCM_DecodeBlock16( &xdp->left, sound_groupsp[headtable[i]+1], data, + destp, 1 ); + + destp += 28; + } + } + } + } +} + +//============================================ +//=== XA SPECIFIC ROUTINES +//============================================ +typedef struct { +u8 filenum; +u8 channum; +u8 submode; +u8 coding; + +u8 filenum2; +u8 channum2; +u8 submode2; +u8 coding2; +} xa_subheader_t; + +#define SUB_SUB_EOF (1<<7) // end of file +#define SUB_SUB_RT (1<<6) // real-time sector +#define SUB_SUB_FORM (1<<5) // 0 form1 1 form2 +#define SUB_SUB_TRIGGER (1<<4) // used for interrupt +#define SUB_SUB_DATA (1<<3) // contains data +#define SUB_SUB_AUDIO (1<<2) // contains audio +#define SUB_SUB_VIDEO (1<<1) // contains video +#define SUB_SUB_EOR (1<<0) // end of record + +#define AUDIO_CODING_GET_STEREO(_X_) ( (_X_) & 3) +#define AUDIO_CODING_GET_FREQ(_X_) (((_X_) >> 2) & 3) +#define AUDIO_CODING_GET_BPS(_X_) (((_X_) >> 4) & 3) +#define AUDIO_CODING_GET_EMPHASIS(_X_) (((_X_) >> 6) & 1) + +#define SUB_UNKNOWN 0 +#define SUB_VIDEO 1 +#define SUB_AUDIO 2 + +//============================================ +static int parse_xa_audio_sector( xa_decode_t *xdp, + xa_subheader_t *subheadp, + unsigned char *sectorp, + int is_first_sector ) { + if ( is_first_sector ) { + switch ( AUDIO_CODING_GET_FREQ(subheadp->coding) ) { + case 0: xdp->freq = 37800; break; + case 1: xdp->freq = 18900; break; + default: xdp->freq = 0; break; + } + switch ( AUDIO_CODING_GET_BPS(subheadp->coding) ) { + case 0: xdp->nbits = 4; break; + case 1: xdp->nbits = 8; break; + default: xdp->nbits = 0; break; + } + switch ( AUDIO_CODING_GET_STEREO(subheadp->coding) ) { + case 0: xdp->stereo = 0; break; + case 1: xdp->stereo = 1; break; + default: xdp->stereo = 0; break; + } + + if ( xdp->freq == 0 ) + return -1; + + ADPCM_InitDecode( &xdp->left ); + ADPCM_InitDecode( &xdp->right ); + + xdp->nsamples = 18 * 28 * 8; + if (xdp->stereo == 1) xdp->nsamples /= 2; + } + xa_decode_data( xdp, sectorp ); + + return 0; +} + +//================================================================ +//=== THIS IS WHAT YOU HAVE TO CALL +//=== xdp - structure were all important data are returned +//=== sectorp - data in input +//=== pcmp - data in output +//=== is_first_sector - 1 if it's the 1st sector of the stream +//=== - 0 for any other successive sector +//=== return -1 if error +//================================================================ +s32 xa_decode_sector( xa_decode_t *xdp, + unsigned char *sectorp, int is_first_sector ) { + if (parse_xa_audio_sector(xdp, (xa_subheader_t *)sectorp, sectorp + sizeof(xa_subheader_t), is_first_sector)) + return -1; + + return 0; +} + +/* EXAMPLE: +"nsamples" is the number of 16 bit samples +every sample is 2 bytes in mono and 4 bytes in stereo + +xa_decode_t xa; + + sectorp = read_first_sector(); + xa_decode_sector( &xa, sectorp, 1 ); + play_wave( xa.pcm, xa.freq, xa.nsamples ); + + while ( --n_sectors ) + { + sectorp = read_next_sector(); + xa_decode_sector( &xa, sectorp, 0 ); + play_wave( xa.pcm, xa.freq, xa.nsamples ); + } +*/ diff --git a/libpcsxcore/decode_xa.h b/libpcsxcore/decode_xa.h new file mode 100644 index 00000000..a5994e12 --- /dev/null +++ b/libpcsxcore/decode_xa.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __DECODE_XA_H__ +#define __DECODE_XA_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" + +typedef struct { + s32 y0, y1; +} ADPCM_Decode_t; + +typedef struct { + int freq; + int nbits; + int stereo; + int nsamples; + ADPCM_Decode_t left, right; + short pcm[16384]; +} xa_decode_t; + +s32 xa_decode_sector( xa_decode_t *xdp, + unsigned char *sectorp, + int is_first_sector ); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/disr3000a.c b/libpcsxcore/disr3000a.c new file mode 100644 index 00000000..23667c1a --- /dev/null +++ b/libpcsxcore/disr3000a.c @@ -0,0 +1,323 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* R3000A disassembler. +*/ + +#include "psxcommon.h" + +char ostr[256]; + +// Names of registers +static char *disRNameGPR[] = { + "r0", "at", "v0", "v1", "a0", "a1","a2", "a3", + "t0", "t1", "t2", "t3", "t4", "t5","t6", "t7", + "s0", "s1", "s2", "s3", "s4", "s5","s6", "s7", + "t8", "t9", "k0", "k1", "gp", "sp","fp", "ra"}; + +char *disRNameCP0[] = { + "Index" , "Random" , "EntryLo0", "EntryLo1", "Context" , "PageMask" , "Wired" , "*Check me*", + "BadVAddr" , "Count" , "EntryHi" , "Compare" , "Status" , "Cause" , "ExceptPC" , "PRevID" , + "Config" , "LLAddr" , "WatchLo" , "WatchHi" , "XContext", "*RES*" , "*RES*" , "*RES*" , + "*RES*" , "*RES* " , "PErr" , "CacheErr", "TagLo" , "TagHi" , "ErrorEPC" , "*RES*" }; + + +// Type deffinition of our functions + +typedef char* (*TdisR3000AF)(u32 code, u32 pc); + +// These macros are used to assemble the disassembler functions +#define MakeDisFg(fn, b) char* fn(u32 code, u32 pc) { b; return ostr; } +#define MakeDisF(fn, b) \ + static char* fn(u32 code, u32 pc) { \ + sprintf (ostr, "%8.8x %8.8x:", pc, code); \ + b; /*ostr[(strlen(ostr) - 1)] = 0;*/ return ostr; \ + } + + +#include "r3000a.h" + +#undef _Funct_ +#undef _Rd_ +#undef _Rt_ +#undef _Rs_ +#undef _Sa_ +#undef _Im_ +#undef _Target_ + +#define _Funct_ ((code ) & 0x3F) // The funct part of the instruction register +#define _Rd_ ((code >> 11) & 0x1F) // The rd part of the instruction register +#define _Rt_ ((code >> 16) & 0x1F) // The rt part of the instruction register +#define _Rs_ ((code >> 21) & 0x1F) // The rs part of the instruction register +#define _Sa_ ((code >> 6) & 0x1F) // The sa part of the instruction register +#define _Im_ ( code & 0xFFFF) // The immediate part of the instruction register + +#define _Target_ ((pc & 0xf0000000) + ((code & 0x03ffffff) * 4)) +#define _Branch_ (pc + 4 + ((short)_Im_ * 4)) +#define _OfB_ _Im_, _nRs_ + +#define dName(i) sprintf(ostr, "%s %-7s,", ostr, i) +#define dGPR(i) sprintf(ostr, "%s %8.8x (%s),", ostr, psxRegs.GPR.r[i], disRNameGPR[i]) +#define dCP0(i) sprintf(ostr, "%s %8.8x (%s),", ostr, psxRegs.CP0.r[i], disRNameCP0[i]) +#define dHI() sprintf(ostr, "%s %8.8x (%s),", ostr, psxRegs.GPR.n.hi, "hi") +#define dLO() sprintf(ostr, "%s %8.8x (%s),", ostr, psxRegs.GPR.n.lo, "lo") +#define dImm() sprintf(ostr, "%s %4.4x (%d),", ostr, _Im_, _Im_) +#define dTarget() sprintf(ostr, "%s %8.8x,", ostr, _Target_) +#define dSa() sprintf(ostr, "%s %2.2x (%d),", ostr, _Sa_, _Sa_) +#define dOfB() sprintf(ostr, "%s %4.4x (%8.8x (%s)),", ostr, _Im_, psxRegs.GPR.r[_Rs_], disRNameGPR[_Rs_]) +#define dOffset() sprintf(ostr, "%s %8.8x,", ostr, _Branch_) +#define dCode() sprintf(ostr, "%s %8.8x,", ostr, (code >> 6) & 0xffffff) + +/********************************************************* +* Arithmetic with immediate operand * +* Format: OP rt, rs, immediate * +*********************************************************/ +MakeDisF(disADDI, dName("ADDI"); dGPR(_Rt_); dGPR(_Rs_); dImm();) +MakeDisF(disADDIU, dName("ADDIU"); dGPR(_Rt_); dGPR(_Rs_); dImm();) +MakeDisF(disANDI, dName("ANDI"); dGPR(_Rt_); dGPR(_Rs_); dImm();) +MakeDisF(disORI, dName("ORI"); dGPR(_Rt_); dGPR(_Rs_); dImm();) +MakeDisF(disSLTI, dName("SLTI"); dGPR(_Rt_); dGPR(_Rs_); dImm();) +MakeDisF(disSLTIU, dName("SLTIU"); dGPR(_Rt_); dGPR(_Rs_); dImm();) +MakeDisF(disXORI, dName("XORI"); dGPR(_Rt_); dGPR(_Rs_); dImm();) + +/********************************************************* +* Register arithmetic * +* Format: OP rd, rs, rt * +*********************************************************/ +MakeDisF(disADD, dName("ADD"); dGPR(_Rd_); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disADDU, dName("ADDU"); dGPR(_Rd_); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disAND, dName("AND"); dGPR(_Rd_); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disNOR, dName("NOR"); dGPR(_Rd_); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disOR, dName("OR"); dGPR(_Rd_); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disSLT, dName("SLT"); dGPR(_Rd_); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disSLTU, dName("SLTU"); dGPR(_Rd_); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disSUB, dName("SUB"); dGPR(_Rd_); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disSUBU, dName("SUBU"); dGPR(_Rd_); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disXOR, dName("XOR"); dGPR(_Rd_); dGPR(_Rs_); dGPR(_Rt_);) + +/********************************************************* +* Register arithmetic & Register trap logic * +* Format: OP rs, rt * +*********************************************************/ +MakeDisF(disDIV, dName("DIV"); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disDIVU, dName("DIVU"); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disMULT, dName("MULT"); dGPR(_Rs_); dGPR(_Rt_);) +MakeDisF(disMULTU, dName("MULTU"); dGPR(_Rs_); dGPR(_Rt_);) + +/********************************************************* +* Register branch logic * +* Format: OP rs, offset * +*********************************************************/ +MakeDisF(disBGEZ, dName("BGEZ"); dGPR(_Rs_); dOffset();) +MakeDisF(disBGEZAL, dName("BGEZAL"); dGPR(_Rs_); dOffset();) +MakeDisF(disBGTZ, dName("BGTZ"); dGPR(_Rs_); dOffset();) +MakeDisF(disBLEZ, dName("BLEZ"); dGPR(_Rs_); dOffset();) +MakeDisF(disBLTZ, dName("BLTZ"); dGPR(_Rs_); dOffset();) +MakeDisF(disBLTZAL, dName("BLTZAL"); dGPR(_Rs_); dOffset();) + +/********************************************************* +* Shift arithmetic with constant shift * +* Format: OP rd, rt, sa * +*********************************************************/ +MakeDisF(disSLL, if (code) { dName("SLL"); dGPR(_Rd_); dGPR(_Rt_); dSa(); } else { dName("NOP"); }) +MakeDisF(disSRA, dName("SRA"); dGPR(_Rd_); dGPR(_Rt_); dSa();) +MakeDisF(disSRL, dName("SRL"); dGPR(_Rd_); dGPR(_Rt_); dSa();) + +/********************************************************* +* Shift arithmetic with variant register shift * +* Format: OP rd, rt, rs * +*********************************************************/ +MakeDisF(disSLLV, dName("SLLV"); dGPR(_Rd_); dGPR(_Rt_); dGPR(_Rs_);) +MakeDisF(disSRAV, dName("SRAV"); dGPR(_Rd_); dGPR(_Rt_); dGPR(_Rs_);) +MakeDisF(disSRLV, dName("SRLV"); dGPR(_Rd_); dGPR(_Rt_); dGPR(_Rs_);) + +/********************************************************* +* Load higher 16 bits of the first word in GPR with imm * +* Format: OP rt, immediate * +*********************************************************/ +MakeDisF(disLUI, dName("LUI"); dGPR(_Rt_); dImm();) + +/********************************************************* +* Move from HI/LO to GPR * +* Format: OP rd * +*********************************************************/ +MakeDisF(disMFHI, dName("MFHI"); dGPR(_Rd_); dHI();) +MakeDisF(disMFLO, dName("MFLO"); dGPR(_Rd_); dLO();) + +/********************************************************* +* Move from GPR to HI/LO * +* Format: OP rd * +*********************************************************/ +MakeDisF(disMTHI, dName("MTHI"); dHI(); dGPR(_Rs_);) +MakeDisF(disMTLO, dName("MTLO"); dLO(); dGPR(_Rs_);) + +/********************************************************* +* Special purpose instructions * +* Format: OP * +*********************************************************/ +MakeDisF(disBREAK, dName("BREAK")) +MakeDisF(disRFE, dName("RFE")) +MakeDisF(disSYSCALL, dName("SYSCALL")) +MakeDisF(disHLE, dName("HLE")) + + +MakeDisF(disRTPS, dName("RTPS")) +MakeDisF(disOP , dName("OP")) +MakeDisF(disNCLIP, dName("NCLIP")) +MakeDisF(disDPCS, dName("DPCS")) +MakeDisF(disINTPL, dName("INTPL")) +MakeDisF(disMVMVA, dName("MVMVA")) +MakeDisF(disNCDS , dName("NCDS")) +MakeDisF(disCDP , dName("CDP")) +MakeDisF(disNCDT , dName("NCDT")) +MakeDisF(disNCCS , dName("NCCS")) +MakeDisF(disCC , dName("CC")) +MakeDisF(disNCS , dName("NCS")) +MakeDisF(disNCT , dName("NCT")) +MakeDisF(disSQR , dName("SQR")) +MakeDisF(disDCPL , dName("DCPL")) +MakeDisF(disDPCT , dName("DPCT")) +MakeDisF(disAVSZ3, dName("AVSZ3")) +MakeDisF(disAVSZ4, dName("AVSZ4")) +MakeDisF(disRTPT , dName("RTPT")) +MakeDisF(disGPF , dName("GPF")) +MakeDisF(disGPL , dName("GPL")) +MakeDisF(disNCCT , dName("NCCT")) + +MakeDisF(disMFC2, dName("MFC2"); dGPR(_Rt_);) +MakeDisF(disCFC2, dName("CFC2"); dGPR(_Rt_);) +MakeDisF(disMTC2, dName("MTC2"); dGPR(_Rt_);) +MakeDisF(disCTC2, dName("CTC2"); dGPR(_Rt_);) + +/********************************************************* +* Register branch logic * +* Format: OP rs, rt, offset * +*********************************************************/ +MakeDisF(disBEQ, dName("BEQ"); dGPR(_Rs_); dGPR(_Rt_); dOffset();) +MakeDisF(disBNE, dName("BNE"); dGPR(_Rs_); dGPR(_Rt_); dOffset();) + +/********************************************************* +* Jump to target * +* Format: OP target * +*********************************************************/ +MakeDisF(disJ, dName("J"); dTarget();) +MakeDisF(disJAL, dName("JAL"); dTarget(); dGPR(31);) + +/********************************************************* +* Register jump * +* Format: OP rs, rd * +*********************************************************/ +MakeDisF(disJR, dName("JR"); dGPR(_Rs_);) +MakeDisF(disJALR, dName("JALR"); dGPR(_Rs_); dGPR(_Rd_)) + +/********************************************************* +* Load and store for GPR * +* Format: OP rt, offset(base) * +*********************************************************/ +MakeDisF(disLB, dName("LB"); dGPR(_Rt_); dOfB();) +MakeDisF(disLBU, dName("LBU"); dGPR(_Rt_); dOfB();) +MakeDisF(disLH, dName("LH"); dGPR(_Rt_); dOfB();) +MakeDisF(disLHU, dName("LHU"); dGPR(_Rt_); dOfB();) +MakeDisF(disLW, dName("LW"); dGPR(_Rt_); dOfB();) +MakeDisF(disLWL, dName("LWL"); dGPR(_Rt_); dOfB();) +MakeDisF(disLWR, dName("LWR"); dGPR(_Rt_); dOfB();) +MakeDisF(disLWC2, dName("LWC2"); dGPR(_Rt_); dOfB();) +MakeDisF(disSB, dName("SB"); dGPR(_Rt_); dOfB();) +MakeDisF(disSH, dName("SH"); dGPR(_Rt_); dOfB();) +MakeDisF(disSW, dName("SW"); dGPR(_Rt_); dOfB();) +MakeDisF(disSWL, dName("SWL"); dGPR(_Rt_); dOfB();) +MakeDisF(disSWR, dName("SWR"); dGPR(_Rt_); dOfB();) +MakeDisF(disSWC2, dName("SWC2"); dGPR(_Rt_); dOfB();) + +/********************************************************* +* Moves between GPR and COPx * +* Format: OP rt, fs * +*********************************************************/ +MakeDisF(disMFC0, dName("MFC0"); dGPR(_Rt_); dCP0(_Rd_);) +MakeDisF(disMTC0, dName("MTC0"); dCP0(_Rd_); dGPR(_Rt_);) +MakeDisF(disCFC0, dName("CFC0"); dGPR(_Rt_); dCP0(_Rd_);) +MakeDisF(disCTC0, dName("CTC0"); dCP0(_Rd_); dGPR(_Rt_);) + +/********************************************************* +* Unknow instruction (would generate an exception) * +* Format: ? * +*********************************************************/ +MakeDisF(disNULL, dName("*** Bad OP ***");) + + +TdisR3000AF disR3000A_SPECIAL[] = { // Subset of disSPECIAL + disSLL , disNULL , disSRL , disSRA , disSLLV , disNULL , disSRLV , disSRAV , + disJR , disJALR , disNULL, disNULL, disSYSCALL, disBREAK , disNULL , disNULL , + disMFHI, disMTHI , disMFLO, disMTLO, disNULL , disNULL , disNULL , disNULL , + disMULT, disMULTU, disDIV , disDIVU, disNULL , disNULL , disNULL , disNULL , + disADD , disADDU , disSUB , disSUBU, disAND , disOR , disXOR , disNOR , + disNULL, disNULL , disSLT , disSLTU, disNULL , disNULL , disNULL , disNULL , + disNULL, disNULL , disNULL, disNULL, disNULL , disNULL , disNULL , disNULL , + disNULL, disNULL , disNULL, disNULL, disNULL , disNULL , disNULL , disNULL}; + +MakeDisF(disSPECIAL, disR3000A_SPECIAL[_Funct_](code, pc)) + +TdisR3000AF disR3000A_BCOND[] = { // Subset of disBCOND + disBLTZ , disBGEZ , disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, + disNULL , disNULL , disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, + disBLTZAL, disBGEZAL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, + disNULL , disNULL , disNULL, disNULL, disNULL, disNULL, disNULL, disNULL}; + +MakeDisF(disBCOND, disR3000A_BCOND[_Rt_](code, pc)) + +TdisR3000AF disR3000A_COP0[] = { // Subset of disCOP0 + disMFC0, disNULL, disCFC0, disNULL, disMTC0, disNULL, disCTC0, disNULL, + disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, + disRFE , disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, + disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL}; + +MakeDisF(disCOP0, disR3000A_COP0[_Rs_](code, pc)) + +TdisR3000AF disR3000A_BASIC[] = { // Subset of disBASIC (based on rs) + disMFC2, disNULL, disCFC2, disNULL, disMTC2, disNULL, disCTC2, disNULL, + disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, + disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, + disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL, disNULL}; + +MakeDisF(disBASIC, disR3000A_BASIC[_Rs_](code, pc)) + +TdisR3000AF disR3000A_COP2[] = { // Subset of disR3000F_COP2 (based on funct) + disBASIC, disRTPS , disNULL , disNULL , disNULL, disNULL , disNCLIP, disNULL, + disNULL , disNULL , disNULL , disNULL , disOP , disNULL , disNULL , disNULL, + disDPCS , disINTPL, disMVMVA, disNCDS , disCDP , disNULL , disNCDT , disNULL, + disNULL , disNULL , disNULL , disNCCS , disCC , disNULL , disNCS , disNULL, + disNCT , disNULL , disNULL , disNULL , disNULL, disNULL , disNULL , disNULL, + disSQR , disDCPL , disDPCT , disNULL , disNULL, disAVSZ3, disAVSZ4, disNULL, + disRTPT , disNULL , disNULL , disNULL , disNULL, disNULL , disNULL , disNULL, + disNULL , disNULL , disNULL , disNULL , disNULL, disGPF , disGPL , disNCCT }; + +MakeDisF(disCOP2, disR3000A_COP2[_Funct_](code, pc)) + +TdisR3000AF disR3000A[] = { + disSPECIAL , disBCOND , disJ , disJAL , disBEQ , disBNE , disBLEZ , disBGTZ , + disADDI , disADDIU , disSLTI , disSLTIU, disANDI, disORI , disXORI , disLUI , + disCOP0 , disNULL , disCOP2 , disNULL , disNULL, disNULL, disNULL , disNULL , + disNULL , disNULL , disNULL , disNULL , disNULL, disNULL, disNULL , disNULL , + disLB , disLH , disLWL , disLW , disLBU , disLHU , disLWR , disNULL , + disSB , disSH , disSWL , disSW , disNULL, disNULL, disSWR , disNULL , + disNULL , disNULL , disLWC2 , disNULL , disNULL, disNULL, disNULL , disNULL , + disNULL , disNULL , disSWC2 , disHLE , disNULL, disNULL, disNULL , disNULL }; + +MakeDisFg(disR3000AF, disR3000A[code >> 26](code, pc)) diff --git a/libpcsxcore/gte.c b/libpcsxcore/gte.c new file mode 100644 index 00000000..72210d34 --- /dev/null +++ b/libpcsxcore/gte.c @@ -0,0 +1,904 @@ +/*************************************************************************** + * PCSX-Revolution - PlayStation Emulator for Nintendo Wii * + * Copyright (C) 2009-2010 PCSX-Revolution Dev Team * + * * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* GTE functions. +*/ + +#include "gte.h" +#include "psxmem.h" + +#define VX(n) (n < 3 ? psxRegs.CP2D.p[n << 1].sw.l : psxRegs.CP2D.p[9].sw.l) +#define VY(n) (n < 3 ? psxRegs.CP2D.p[n << 1].sw.h : psxRegs.CP2D.p[10].sw.l) +#define VZ(n) (n < 3 ? psxRegs.CP2D.p[(n << 1) + 1].sw.l : psxRegs.CP2D.p[11].sw.l) +#define MX11(n) (n < 3 ? psxRegs.CP2C.p[(n << 3)].sw.l : 0) +#define MX12(n) (n < 3 ? psxRegs.CP2C.p[(n << 3)].sw.h : 0) +#define MX13(n) (n < 3 ? psxRegs.CP2C.p[(n << 3) + 1].sw.l : 0) +#define MX21(n) (n < 3 ? psxRegs.CP2C.p[(n << 3) + 1].sw.h : 0) +#define MX22(n) (n < 3 ? psxRegs.CP2C.p[(n << 3) + 2].sw.l : 0) +#define MX23(n) (n < 3 ? psxRegs.CP2C.p[(n << 3) + 2].sw.h : 0) +#define MX31(n) (n < 3 ? psxRegs.CP2C.p[(n << 3) + 3].sw.l : 0) +#define MX32(n) (n < 3 ? psxRegs.CP2C.p[(n << 3) + 3].sw.h : 0) +#define MX33(n) (n < 3 ? psxRegs.CP2C.p[(n << 3) + 4].sw.l : 0) +#define CV1(n) (n < 3 ? (s32)psxRegs.CP2C.r[(n << 3) + 5] : 0) +#define CV2(n) (n < 3 ? (s32)psxRegs.CP2C.r[(n << 3) + 6] : 0) +#define CV3(n) (n < 3 ? (s32)psxRegs.CP2C.r[(n << 3) + 7] : 0) + +#define fSX(n) ((psxRegs.CP2D.p)[((n) + 12)].sw.l) +#define fSY(n) ((psxRegs.CP2D.p)[((n) + 12)].sw.h) +#define fSZ(n) ((psxRegs.CP2D.p)[((n) + 17)].w.l) /* (n == 0) => SZ1; */ + +#define gteVXY0 (psxRegs.CP2D.r[0]) +#define gteVX0 (psxRegs.CP2D.p[0].sw.l) +#define gteVY0 (psxRegs.CP2D.p[0].sw.h) +#define gteVZ0 (psxRegs.CP2D.p[1].sw.l) +#define gteVXY1 (psxRegs.CP2D.r[2]) +#define gteVX1 (psxRegs.CP2D.p[2].sw.l) +#define gteVY1 (psxRegs.CP2D.p[2].sw.h) +#define gteVZ1 (psxRegs.CP2D.p[3].sw.l) +#define gteVXY2 (psxRegs.CP2D.r[4]) +#define gteVX2 (psxRegs.CP2D.p[4].sw.l) +#define gteVY2 (psxRegs.CP2D.p[4].sw.h) +#define gteVZ2 (psxRegs.CP2D.p[5].sw.l) +#define gteRGB (psxRegs.CP2D.r[6]) +#define gteR (psxRegs.CP2D.p[6].b.l) +#define gteG (psxRegs.CP2D.p[6].b.h) +#define gteB (psxRegs.CP2D.p[6].b.h2) +#define gteCODE (psxRegs.CP2D.p[6].b.h3) +#define gteOTZ (psxRegs.CP2D.p[7].w.l) +#define gteIR0 (psxRegs.CP2D.p[8].sw.l) +#define gteIR1 (psxRegs.CP2D.p[9].sw.l) +#define gteIR2 (psxRegs.CP2D.p[10].sw.l) +#define gteIR3 (psxRegs.CP2D.p[11].sw.l) +#define gteSXY0 (psxRegs.CP2D.r[12]) +#define gteSX0 (psxRegs.CP2D.p[12].sw.l) +#define gteSY0 (psxRegs.CP2D.p[12].sw.h) +#define gteSXY1 (psxRegs.CP2D.r[13]) +#define gteSX1 (psxRegs.CP2D.p[13].sw.l) +#define gteSY1 (psxRegs.CP2D.p[13].sw.h) +#define gteSXY2 (psxRegs.CP2D.r[14]) +#define gteSX2 (psxRegs.CP2D.p[14].sw.l) +#define gteSY2 (psxRegs.CP2D.p[14].sw.h) +#define gteSXYP (psxRegs.CP2D.r[15]) +#define gteSXP (psxRegs.CP2D.p[15].sw.l) +#define gteSYP (psxRegs.CP2D.p[15].sw.h) +#define gteSZ0 (psxRegs.CP2D.p[16].w.l) +#define gteSZ1 (psxRegs.CP2D.p[17].w.l) +#define gteSZ2 (psxRegs.CP2D.p[18].w.l) +#define gteSZ3 (psxRegs.CP2D.p[19].w.l) +#define gteRGB0 (psxRegs.CP2D.r[20]) +#define gteR0 (psxRegs.CP2D.p[20].b.l) +#define gteG0 (psxRegs.CP2D.p[20].b.h) +#define gteB0 (psxRegs.CP2D.p[20].b.h2) +#define gteCODE0 (psxRegs.CP2D.p[20].b.h3) +#define gteRGB1 (psxRegs.CP2D.r[21]) +#define gteR1 (psxRegs.CP2D.p[21].b.l) +#define gteG1 (psxRegs.CP2D.p[21].b.h) +#define gteB1 (psxRegs.CP2D.p[21].b.h2) +#define gteCODE1 (psxRegs.CP2D.p[21].b.h3) +#define gteRGB2 (psxRegs.CP2D.r[22]) +#define gteR2 (psxRegs.CP2D.p[22].b.l) +#define gteG2 (psxRegs.CP2D.p[22].b.h) +#define gteB2 (psxRegs.CP2D.p[22].b.h2) +#define gteCODE2 (psxRegs.CP2D.p[22].b.h3) +#define gteRES1 (psxRegs.CP2D.r[23]) +#define gteMAC0 (((s32 *)psxRegs.CP2D.r)[24]) +#define gteMAC1 (((s32 *)psxRegs.CP2D.r)[25]) +#define gteMAC2 (((s32 *)psxRegs.CP2D.r)[26]) +#define gteMAC3 (((s32 *)psxRegs.CP2D.r)[27]) +#define gteIRGB (psxRegs.CP2D.r[28]) +#define gteORGB (psxRegs.CP2D.r[29]) +#define gteLZCS (psxRegs.CP2D.r[30]) +#define gteLZCR (psxRegs.CP2D.r[31]) + +#define gteR11R12 (((s32 *)psxRegs.CP2C.r)[0]) +#define gteR22R23 (((s32 *)psxRegs.CP2C.r)[2]) +#define gteR11 (psxRegs.CP2C.p[0].sw.l) +#define gteR12 (psxRegs.CP2C.p[0].sw.h) +#define gteR13 (psxRegs.CP2C.p[1].sw.l) +#define gteR21 (psxRegs.CP2C.p[1].sw.h) +#define gteR22 (psxRegs.CP2C.p[2].sw.l) +#define gteR23 (psxRegs.CP2C.p[2].sw.h) +#define gteR31 (psxRegs.CP2C.p[3].sw.l) +#define gteR32 (psxRegs.CP2C.p[3].sw.h) +#define gteR33 (psxRegs.CP2C.p[4].sw.l) +#define gteTRX (((s32 *)psxRegs.CP2C.r)[5]) +#define gteTRY (((s32 *)psxRegs.CP2C.r)[6]) +#define gteTRZ (((s32 *)psxRegs.CP2C.r)[7]) +#define gteL11 (psxRegs.CP2C.p[8].sw.l) +#define gteL12 (psxRegs.CP2C.p[8].sw.h) +#define gteL13 (psxRegs.CP2C.p[9].sw.l) +#define gteL21 (psxRegs.CP2C.p[9].sw.h) +#define gteL22 (psxRegs.CP2C.p[10].sw.l) +#define gteL23 (psxRegs.CP2C.p[10].sw.h) +#define gteL31 (psxRegs.CP2C.p[11].sw.l) +#define gteL32 (psxRegs.CP2C.p[11].sw.h) +#define gteL33 (psxRegs.CP2C.p[12].sw.l) +#define gteRBK (((s32 *)psxRegs.CP2C.r)[13]) +#define gteGBK (((s32 *)psxRegs.CP2C.r)[14]) +#define gteBBK (((s32 *)psxRegs.CP2C.r)[15]) +#define gteLR1 (psxRegs.CP2C.p[16].sw.l) +#define gteLR2 (psxRegs.CP2C.p[16].sw.h) +#define gteLR3 (psxRegs.CP2C.p[17].sw.l) +#define gteLG1 (psxRegs.CP2C.p[17].sw.h) +#define gteLG2 (psxRegs.CP2C.p[18].sw.l) +#define gteLG3 (psxRegs.CP2C.p[18].sw.h) +#define gteLB1 (psxRegs.CP2C.p[19].sw.l) +#define gteLB2 (psxRegs.CP2C.p[19].sw.h) +#define gteLB3 (psxRegs.CP2C.p[20].sw.l) +#define gteRFC (((s32 *)psxRegs.CP2C.r)[21]) +#define gteGFC (((s32 *)psxRegs.CP2C.r)[22]) +#define gteBFC (((s32 *)psxRegs.CP2C.r)[23]) +#define gteOFX (((s32 *)psxRegs.CP2C.r)[24]) +#define gteOFY (((s32 *)psxRegs.CP2C.r)[25]) +#define gteH (psxRegs.CP2C.p[26].sw.l) +#define gteDQA (psxRegs.CP2C.p[27].sw.l) +#define gteDQB (((s32 *)psxRegs.CP2C.r)[28]) +#define gteZSF3 (psxRegs.CP2C.p[29].sw.l) +#define gteZSF4 (psxRegs.CP2C.p[30].sw.l) +#define gteFLAG (psxRegs.CP2C.r[31]) + +#define GTE_OP(op) ((op >> 20) & 31) +#define GTE_SF(op) ((op >> 19) & 1) +#define GTE_MX(op) ((op >> 17) & 3) +#define GTE_V(op) ((op >> 15) & 3) +#define GTE_CV(op) ((op >> 13) & 3) +#define GTE_CD(op) ((op >> 11) & 3) /* not used */ +#define GTE_LM(op) ((op >> 10) & 1) +#define GTE_CT(op) ((op >> 6) & 15) /* not used */ +#define GTE_FUNCT(op) (op & 63) + +#define gteop (psxRegs.code & 0x1ffffff) + +static inline s64 BOUNDS(s64 n_value, s64 n_max, int n_maxflag, s64 n_min, int n_minflag) { + if (n_value > n_max) { + gteFLAG |= n_maxflag; + } else if (n_value < n_min) { + gteFLAG |= n_minflag; + } + return n_value; +} + +static inline s32 LIM(s32 value, s32 max, s32 min, u32 flag) { + s32 ret = value; + if (value > max) { + gteFLAG |= flag; + ret = max; + } else if (value < min) { + gteFLAG |= flag; + ret = min; + } + return ret; +} + +#define A1(a) BOUNDS((a), 0x7fffffff, (1 << 30), -(s64)0x80000000, (1 << 31) | (1 << 27)) +#define A2(a) BOUNDS((a), 0x7fffffff, (1 << 29), -(s64)0x80000000, (1 << 31) | (1 << 26)) +#define A3(a) BOUNDS((a), 0x7fffffff, (1 << 28), -(s64)0x80000000, (1 << 31) | (1 << 25)) +#define limB1(a, l) LIM((a), 0x7fff, -0x8000 * !l, (1 << 31) | (1 << 24)) +#define limB2(a, l) LIM((a), 0x7fff, -0x8000 * !l, (1 << 31) | (1 << 23)) +#define limB3(a, l) LIM((a), 0x7fff, -0x8000 * !l, (1 << 22)) +#define limC1(a) LIM((a), 0x00ff, 0x0000, (1 << 21)) +#define limC2(a) LIM((a), 0x00ff, 0x0000, (1 << 20)) +#define limC3(a) LIM((a), 0x00ff, 0x0000, (1 << 19)) +#define limD(a) LIM((a), 0xffff, 0x0000, (1 << 31) | (1 << 18)) + +static inline u32 limE(u32 result) { + if (result > 0x1ffff) { + gteFLAG |= (1 << 31) | (1 << 17); + return 0x1ffff; + } + return result; +} + +#define F(a) BOUNDS((a), 0x7fffffff, (1 << 31) | (1 << 16), -(s64)0x80000000, (1 << 31) | (1 << 15)) +#define limG1(a) LIM((a), 0x3ff, -0x400, (1 << 31) | (1 << 14)) +#define limG2(a) LIM((a), 0x3ff, -0x400, (1 << 31) | (1 << 13)) +#define limH(a) LIM((a), 0xfff, 0x000, (1 << 12)) + +#include "gte_divider.h" + +static inline u32 MFC2(int reg) { + switch (reg) { + case 1: + case 3: + case 5: + case 8: + case 9: + case 10: + case 11: + psxRegs.CP2D.r[reg] = (s32)psxRegs.CP2D.p[reg].sw.l; + break; + + case 7: + case 16: + case 17: + case 18: + case 19: + psxRegs.CP2D.r[reg] = (u32)psxRegs.CP2D.p[reg].w.l; + break; + + case 15: + psxRegs.CP2D.r[reg] = gteSXY2; + break; + + case 28: + case 30: + return 0; + + case 29: + psxRegs.CP2D.r[reg] = LIM(gteIR1 >> 7, 0x1f, 0, 0) | + (LIM(gteIR2 >> 7, 0x1f, 0, 0) << 5) | + (LIM(gteIR3 >> 7, 0x1f, 0, 0) << 10); + break; + } + return psxRegs.CP2D.r[reg]; +} + +static inline void MTC2(u32 value, int reg) { + switch (reg) { + case 15: + gteSXY0 = gteSXY1; + gteSXY1 = gteSXY2; + gteSXY2 = value; + gteSXYP = value; + break; + + case 28: + gteIRGB = value; + gteIR1 = (value & 0x1f) << 7; + gteIR2 = (value & 0x3e0) << 2; + gteIR3 = (value & 0x7c00) >> 3; + break; + + case 30: + { + int a; + gteLZCS = value; + + a = gteLZCS; + if (a > 0) { + int i; + for (i = 31; (a & (1 << i)) == 0 && i >= 0; i--); + gteLZCR = 31 - i; + } else if (a < 0) { + int i; + a ^= 0xffffffff; + for (i = 31; (a & (1 << i)) == 0 && i >= 0; i--); + gteLZCR = 31 - i; + } else { + gteLZCR = 32; + } + } + break; + + case 7: + case 29: + case 31: + return; + + default: + psxRegs.CP2D.r[reg] = value; + } +} + +static inline void CTC2(u32 value, int reg) { + switch (reg) { + case 4: + case 12: + case 20: + case 26: + case 27: + case 29: + case 30: + value = (s32)(s16)value; + break; + + case 31: + value = value & 0x7ffff000; + if (value & 0x7f87e000) value |= 0x80000000; + break; + } + + psxRegs.CP2C.r[reg] = value; +} + +void gteMFC2() { + if (!_Rt_) return; + psxRegs.GPR.r[_Rt_] = MFC2(_Rd_); +} + +void gteCFC2() { + if (!_Rt_) return; + psxRegs.GPR.r[_Rt_] = psxRegs.CP2C.r[_Rd_]; +} + +void gteMTC2() { + MTC2(psxRegs.GPR.r[_Rt_], _Rd_); +} + +void gteCTC2() { + CTC2(psxRegs.GPR.r[_Rt_], _Rd_); +} + +#define _oB_ (psxRegs.GPR.r[_Rs_] + _Imm_) + +void gteLWC2() { + MTC2(psxMemRead32(_oB_), _Rt_); +} + +void gteSWC2() { + psxMemWrite32(_oB_, MFC2(_Rt_)); +} + +void gteRTPS() { + int quotient; + +#ifdef GTE_LOG + GTE_LOG("GTE RTPS\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1((((s64)gteTRX << 12) + (gteR11 * gteVX0) + (gteR12 * gteVY0) + (gteR13 * gteVZ0)) >> 12); + gteMAC2 = A2((((s64)gteTRY << 12) + (gteR21 * gteVX0) + (gteR22 * gteVY0) + (gteR23 * gteVZ0)) >> 12); + gteMAC3 = A3((((s64)gteTRZ << 12) + (gteR31 * gteVX0) + (gteR32 * gteVY0) + (gteR33 * gteVZ0)) >> 12); + gteIR1 = limB1(gteMAC1, 0); + gteIR2 = limB2(gteMAC2, 0); + gteIR3 = limB3(gteMAC3, 0); + gteSZ0 = gteSZ1; + gteSZ1 = gteSZ2; + gteSZ2 = gteSZ3; + gteSZ3 = limD(gteMAC3); + quotient = limE(DIVIDE(gteH, gteSZ3)); + gteSXY0 = gteSXY1; + gteSXY1 = gteSXY2; + gteSX2 = limG1(F((s64)gteOFX + ((s64)gteIR1 * quotient)) >> 16); + gteSY2 = limG2(F((s64)gteOFY + ((s64)gteIR2 * quotient)) >> 16); + + gteMAC0 = F((s64)(gteDQB + ((s64)gteDQA * quotient)) >> 12); + gteIR0 = limH(gteMAC0); +} + +void gteRTPT() { + int quotient; + int v; + s32 vx, vy, vz; + +#ifdef GTE_LOG + GTE_LOG("GTE RTPT\n"); +#endif + gteFLAG = 0; + + gteSZ0 = gteSZ3; + for (v = 0; v < 3; v++) { + vx = VX(v); + vy = VY(v); + vz = VZ(v); + gteMAC1 = A1((((s64)gteTRX << 12) + (gteR11 * vx) + (gteR12 * vy) + (gteR13 * vz)) >> 12); + gteMAC2 = A2((((s64)gteTRY << 12) + (gteR21 * vx) + (gteR22 * vy) + (gteR23 * vz)) >> 12); + gteMAC3 = A3((((s64)gteTRZ << 12) + (gteR31 * vx) + (gteR32 * vy) + (gteR33 * vz)) >> 12); + gteIR1 = limB1(gteMAC1, 0); + gteIR2 = limB2(gteMAC2, 0); + gteIR3 = limB3(gteMAC3, 0); + fSZ(v) = limD(gteMAC3); + quotient = limE(DIVIDE(gteH, fSZ(v))); + fSX(v) = limG1(F((s64)gteOFX + ((s64)gteIR1 * quotient)) >> 16); + fSY(v) = limG2(F((s64)gteOFY + ((s64)gteIR2 * quotient)) >> 16); + } + gteMAC0 = F((s64)(gteDQB + ((s64)gteDQA * quotient)) >> 12); + gteIR0 = limH(gteMAC0); +} + +void gteMVMVA() { + int shift = 12 * GTE_SF(gteop); + int mx = GTE_MX(gteop); + int v = GTE_V(gteop); + int cv = GTE_CV(gteop); + int lm = GTE_LM(gteop); + s32 vx = VX(v); + s32 vy = VY(v); + s32 vz = VZ(v); + +#ifdef GTE_LOG + GTE_LOG("GTE MVMVA\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1((((s64)CV1(cv) << 12) + (MX11(mx) * vx) + (MX12(mx) * vy) + (MX13(mx) * vz)) >> shift); + gteMAC2 = A2((((s64)CV2(cv) << 12) + (MX21(mx) * vx) + (MX22(mx) * vy) + (MX23(mx) * vz)) >> shift); + gteMAC3 = A3((((s64)CV3(cv) << 12) + (MX31(mx) * vx) + (MX32(mx) * vy) + (MX33(mx) * vz)) >> shift); + + gteIR1 = limB1(gteMAC1, lm); + gteIR2 = limB2(gteMAC2, lm); + gteIR3 = limB3(gteMAC3, lm); +} + +void gteNCLIP() { +#ifdef GTE_LOG + GTE_LOG("GTE NCLIP\n"); +#endif + gteFLAG = 0; + + gteMAC0 = F((s64)gteSX0 * (gteSY1 - gteSY2) + + gteSX1 * (gteSY2 - gteSY0) + + gteSX2 * (gteSY0 - gteSY1)); +} + +void gteAVSZ3() { +#ifdef GTE_LOG + GTE_LOG("GTE AVSZ3\n"); +#endif + gteFLAG = 0; + + gteMAC0 = F((s64)(gteZSF3 * gteSZ1) + (gteZSF3 * gteSZ2) + (gteZSF3 * gteSZ3)); + gteOTZ = limD(gteMAC0 >> 12); +} + +void gteAVSZ4() { +#ifdef GTE_LOG + GTE_LOG("GTE AVSZ4\n"); +#endif + gteFLAG = 0; + + gteMAC0 = F((s64)(gteZSF4 * (gteSZ0 + gteSZ1 + gteSZ2 + gteSZ3))); + gteOTZ = limD(gteMAC0 >> 12); +} + +void gteSQR() { + int shift = 12 * GTE_SF(gteop); + int lm = GTE_LM(gteop); + +#ifdef GTE_LOG + GTE_LOG("GTE SQR\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1((gteIR1 * gteIR1) >> shift); + gteMAC2 = A2((gteIR2 * gteIR2) >> shift); + gteMAC3 = A3((gteIR3 * gteIR3) >> shift); + gteIR1 = limB1(gteMAC1 >> shift, lm); + gteIR2 = limB2(gteMAC2 >> shift, lm); + gteIR3 = limB3(gteMAC3 >> shift, lm); +} + +void gteNCCS() { +#ifdef GTE_LOG + GTE_LOG("GTE NCCS\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1((((s64)gteL11 * gteVX0) + (gteL12 * gteVY0) + (gteL13 * gteVZ0)) >> 12); + gteMAC2 = A2((((s64)gteL21 * gteVX0) + (gteL22 * gteVY0) + (gteL23 * gteVZ0)) >> 12); + gteMAC3 = A3((((s64)gteL31 * gteVX0) + (gteL32 * gteVY0) + (gteL33 * gteVZ0)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1((((s64)gteRBK << 12) + (gteLR1 * gteIR1) + (gteLR2 * gteIR2) + (gteLR3 * gteIR3)) >> 12); + gteMAC2 = A2((((s64)gteGBK << 12) + (gteLG1 * gteIR1) + (gteLG2 * gteIR2) + (gteLG3 * gteIR3)) >> 12); + gteMAC3 = A3((((s64)gteBBK << 12) + (gteLB1 * gteIR1) + (gteLB2 * gteIR2) + (gteLB3 * gteIR3)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1(((s64)gteR * gteIR1) >> 8); + gteMAC2 = A2(((s64)gteG * gteIR2) >> 8); + gteMAC3 = A3(((s64)gteB * gteIR3) >> 8); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); +} + +void gteNCCT() { + int v; + s32 vx, vy, vz; + +#ifdef GTE_LOG + GTE_LOG("GTE NCCT\n"); +#endif + gteFLAG = 0; + + for (v = 0; v < 3; v++) { + vx = VX(v); + vy = VY(v); + vz = VZ(v); + gteMAC1 = A1((((s64)gteL11 * vx) + (gteL12 * vy) + (gteL13 * vz)) >> 12); + gteMAC2 = A2((((s64)gteL21 * vx) + (gteL22 * vy) + (gteL23 * vz)) >> 12); + gteMAC3 = A3((((s64)gteL31 * vx) + (gteL32 * vy) + (gteL33 * vz)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1((((s64)gteRBK << 12) + (gteLR1 * gteIR1) + (gteLR2 * gteIR2) + (gteLR3 * gteIR3)) >> 12); + gteMAC2 = A2((((s64)gteGBK << 12) + (gteLG1 * gteIR1) + (gteLG2 * gteIR2) + (gteLG3 * gteIR3)) >> 12); + gteMAC3 = A3((((s64)gteBBK << 12) + (gteLB1 * gteIR1) + (gteLB2 * gteIR2) + (gteLB3 * gteIR3)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1(((s64)gteR * gteIR1) >> 8); + gteMAC2 = A2(((s64)gteG * gteIR2) >> 8); + gteMAC3 = A3(((s64)gteB * gteIR3) >> 8); + + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); + } + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); +} + +void gteNCDS() { +#ifdef GTE_LOG + GTE_LOG("GTE NCDS\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1((((s64)gteL11 * gteVX0) + (gteL12 * gteVY0) + (gteL13 * gteVZ0)) >> 12); + gteMAC2 = A2((((s64)gteL21 * gteVX0) + (gteL22 * gteVY0) + (gteL23 * gteVZ0)) >> 12); + gteMAC3 = A3((((s64)gteL31 * gteVX0) + (gteL32 * gteVY0) + (gteL33 * gteVZ0)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1((((s64)gteRBK << 12) + (gteLR1 * gteIR1) + (gteLR2 * gteIR2) + (gteLR3 * gteIR3)) >> 12); + gteMAC2 = A2((((s64)gteGBK << 12) + (gteLG1 * gteIR1) + (gteLG2 * gteIR2) + (gteLG3 * gteIR3)) >> 12); + gteMAC3 = A3((((s64)gteBBK << 12) + (gteLB1 * gteIR1) + (gteLB2 * gteIR2) + (gteLB3 * gteIR3)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1(((((s64)gteR << 4) * gteIR1) + (gteIR0 * limB1(gteRFC - ((gteR * gteIR1) >> 8), 0))) >> 12); + gteMAC2 = A2(((((s64)gteG << 4) * gteIR2) + (gteIR0 * limB2(gteGFC - ((gteG * gteIR2) >> 8), 0))) >> 12); + gteMAC3 = A3(((((s64)gteB << 4) * gteIR3) + (gteIR0 * limB3(gteBFC - ((gteB * gteIR3) >> 8), 0))) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); +} + +void gteNCDT() { + int v; + s32 vx, vy, vz; + +#ifdef GTE_LOG + GTE_LOG("GTE NCDT\n"); +#endif + gteFLAG = 0; + + for (v = 0; v < 3; v++) { + vx = VX(v); + vy = VY(v); + vz = VZ(v); + gteMAC1 = A1((((s64)gteL11 * vx) + (gteL12 * vy) + (gteL13 * vz)) >> 12); + gteMAC2 = A2((((s64)gteL21 * vx) + (gteL22 * vy) + (gteL23 * vz)) >> 12); + gteMAC3 = A3((((s64)gteL31 * vx) + (gteL32 * vy) + (gteL33 * vz)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1((((s64)gteRBK << 12) + (gteLR1 * gteIR1) + (gteLR2 * gteIR2) + (gteLR3 * gteIR3)) >> 12); + gteMAC2 = A2((((s64)gteGBK << 12) + (gteLG1 * gteIR1) + (gteLG2 * gteIR2) + (gteLG3 * gteIR3)) >> 12); + gteMAC3 = A3((((s64)gteBBK << 12) + (gteLB1 * gteIR1) + (gteLB2 * gteIR2) + (gteLB3 * gteIR3)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1(((((s64)gteR << 4) * gteIR1) + (gteIR0 * limB1(gteRFC - ((gteR * gteIR1) >> 8), 0))) >> 12); + gteMAC2 = A2(((((s64)gteG << 4) * gteIR2) + (gteIR0 * limB2(gteGFC - ((gteG * gteIR2) >> 8), 0))) >> 12); + gteMAC3 = A3(((((s64)gteB << 4) * gteIR3) + (gteIR0 * limB3(gteBFC - ((gteB * gteIR3) >> 8), 0))) >> 12); + + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); + } + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); +} + +void gteOP() { + int shift = 12 * GTE_SF(gteop); + int lm = GTE_LM(gteop); + +#ifdef GTE_LOG + GTE_LOG("GTE OP\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1(((s64)(gteR22 * gteIR3) - (gteR33 * gteIR2)) >> shift); + gteMAC2 = A2(((s64)(gteR33 * gteIR1) - (gteR11 * gteIR3)) >> shift); + gteMAC3 = A3(((s64)(gteR11 * gteIR2) - (gteR22 * gteIR1)) >> shift); + gteIR1 = limB1(gteMAC1, lm); + gteIR2 = limB2(gteMAC2, lm); + gteIR3 = limB3(gteMAC3, lm); +} + +void gteDCPL() { + int lm = GTE_LM(gteop); + + s64 RIR1 = ((s64)gteR * gteIR1) >> 8; + s64 GIR2 = ((s64)gteG * gteIR2) >> 8; + s64 BIR3 = ((s64)gteB * gteIR3) >> 8; + +#ifdef GTE_LOG + GTE_LOG("GTE DCPL\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1(RIR1 + ((gteIR0 * limB1(gteRFC - RIR1, 0)) >> 12)); + gteMAC2 = A2(GIR2 + ((gteIR0 * limB1(gteGFC - GIR2, 0)) >> 12)); + gteMAC3 = A3(BIR3 + ((gteIR0 * limB1(gteBFC - BIR3, 0)) >> 12)); + + gteIR1 = limB1(gteMAC1, lm); + gteIR2 = limB2(gteMAC2, lm); + gteIR3 = limB3(gteMAC3, lm); + + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); +} + +void gteGPF() { + int shift = 12 * GTE_SF(gteop); + +#ifdef GTE_LOG + GTE_LOG("GTE GPF\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1(((s64)gteIR0 * gteIR1) >> shift); + gteMAC2 = A2(((s64)gteIR0 * gteIR2) >> shift); + gteMAC3 = A3(((s64)gteIR0 * gteIR3) >> shift); + gteIR1 = limB1(gteMAC1, 0); + gteIR2 = limB2(gteMAC2, 0); + gteIR3 = limB3(gteMAC3, 0); + + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); +} + +void gteGPL() { + int shift = 12 * GTE_SF(gteop); + +#ifdef GTE_LOG + GTE_LOG("GTE GPL\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1((((s64)gteMAC1 << shift) + (gteIR0 * gteIR1)) >> shift); + gteMAC2 = A2((((s64)gteMAC2 << shift) + (gteIR0 * gteIR2)) >> shift); + gteMAC3 = A3((((s64)gteMAC3 << shift) + (gteIR0 * gteIR3)) >> shift); + gteIR1 = limB1(gteMAC1, 0); + gteIR2 = limB2(gteMAC2, 0); + gteIR3 = limB3(gteMAC3, 0); + + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); +} + +void gteDPCS() { + int shift = 12 * GTE_SF(gteop); + +#ifdef GTE_LOG + GTE_LOG("GTE DPCS\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1(((gteR << 16) + (gteIR0 * limB1(A1((s64)gteRFC - (gteR << 4)) << (12 - shift), 0))) >> 12); + gteMAC2 = A2(((gteG << 16) + (gteIR0 * limB2(A2((s64)gteGFC - (gteG << 4)) << (12 - shift), 0))) >> 12); + gteMAC3 = A3(((gteB << 16) + (gteIR0 * limB3(A3((s64)gteBFC - (gteB << 4)) << (12 - shift), 0))) >> 12); + + gteIR1 = limB1(gteMAC1, 0); + gteIR2 = limB2(gteMAC2, 0); + gteIR3 = limB3(gteMAC3, 0); + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); +} + +void gteDPCT() { + int v; + +#ifdef GTE_LOG + GTE_LOG("GTE DPCT\n"); +#endif + gteFLAG = 0; + + for (v = 0; v < 3; v++) { + gteMAC1 = A1((((s64)gteR0 << 16) + ((s64)gteIR0 * (limB1(gteRFC - (gteR0 << 4), 0)))) >> 12); + gteMAC2 = A2((((s64)gteG0 << 16) + ((s64)gteIR0 * (limB1(gteGFC - (gteG0 << 4), 0)))) >> 12); + gteMAC3 = A3((((s64)gteB0 << 16) + ((s64)gteIR0 * (limB1(gteBFC - (gteB0 << 4), 0)))) >> 12); + + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); + } + gteIR1 = limB1(gteMAC1, 0); + gteIR2 = limB2(gteMAC2, 0); + gteIR3 = limB3(gteMAC3, 0); +} + +void gteNCS() { +#ifdef GTE_LOG + GTE_LOG("GTE NCS\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1((((s64)gteL11 * gteVX0) + (gteL12 * gteVY0) + (gteL13 * gteVZ0)) >> 12); + gteMAC2 = A2((((s64)gteL21 * gteVX0) + (gteL22 * gteVY0) + (gteL23 * gteVZ0)) >> 12); + gteMAC3 = A3((((s64)gteL31 * gteVX0) + (gteL32 * gteVY0) + (gteL33 * gteVZ0)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1((((s64)gteRBK << 12) + (gteLR1 * gteIR1) + (gteLR2 * gteIR2) + (gteLR3 * gteIR3)) >> 12); + gteMAC2 = A2((((s64)gteGBK << 12) + (gteLG1 * gteIR1) + (gteLG2 * gteIR2) + (gteLG3 * gteIR3)) >> 12); + gteMAC3 = A3((((s64)gteBBK << 12) + (gteLB1 * gteIR1) + (gteLB2 * gteIR2) + (gteLB3 * gteIR3)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); +} + +void gteNCT() { + int v; + s32 vx, vy, vz; + +#ifdef GTE_LOG + GTE_LOG("GTE NCT\n"); +#endif + gteFLAG = 0; + + for (v = 0; v < 3; v++) { + vx = VX(v); + vy = VY(v); + vz = VZ(v); + gteMAC1 = A1((((s64)gteL11 * vx) + (gteL12 * vy) + (gteL13 * vz)) >> 12); + gteMAC2 = A2((((s64)gteL21 * vx) + (gteL22 * vy) + (gteL23 * vz)) >> 12); + gteMAC3 = A3((((s64)gteL31 * vx) + (gteL32 * vy) + (gteL33 * vz)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1((((s64)gteRBK << 12) + (gteLR1 * gteIR1) + (gteLR2 * gteIR2) + (gteLR3 * gteIR3)) >> 12); + gteMAC2 = A2((((s64)gteGBK << 12) + (gteLG1 * gteIR1) + (gteLG2 * gteIR2) + (gteLG3 * gteIR3)) >> 12); + gteMAC3 = A3((((s64)gteBBK << 12) + (gteLB1 * gteIR1) + (gteLB2 * gteIR2) + (gteLB3 * gteIR3)) >> 12); + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); + } + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); +} + +void gteCC() { +#ifdef GTE_LOG + GTE_LOG("GTE CC\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1((((s64)gteRBK << 12) + (gteLR1 * gteIR1) + (gteLR2 * gteIR2) + (gteLR3 * gteIR3)) >> 12); + gteMAC2 = A2((((s64)gteGBK << 12) + (gteLG1 * gteIR1) + (gteLG2 * gteIR2) + (gteLG3 * gteIR3)) >> 12); + gteMAC3 = A3((((s64)gteBBK << 12) + (gteLB1 * gteIR1) + (gteLB2 * gteIR2) + (gteLB3 * gteIR3)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1(((s64)gteR * gteIR1) >> 8); + gteMAC2 = A2(((s64)gteG * gteIR2) >> 8); + gteMAC3 = A3(((s64)gteB * gteIR3) >> 8); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); +} + +void gteINTPL() { + int shift = 12 * GTE_SF(gteop); + int lm = GTE_LM(gteop); + +#ifdef GTE_LOG + GTE_LOG("GTE INTPL\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1(((gteIR1 << 12) + (gteIR0 * limB1(((s64)gteRFC - gteIR1), 0))) >> shift); + gteMAC2 = A2(((gteIR2 << 12) + (gteIR0 * limB2(((s64)gteGFC - gteIR2), 0))) >> shift); + gteMAC3 = A3(((gteIR3 << 12) + (gteIR0 * limB3(((s64)gteBFC - gteIR3), 0))) >> shift); + gteIR1 = limB1(gteMAC1, lm); + gteIR2 = limB2(gteMAC2, lm); + gteIR3 = limB3(gteMAC3, lm); + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); +} + +void gteCDP() { +#ifdef GTE_LOG + GTE_LOG("GTE CDP\n"); +#endif + gteFLAG = 0; + + gteMAC1 = A1((((s64)gteRBK << 12) + (gteLR1 * gteIR1) + (gteLR2 * gteIR2) + (gteLR3 * gteIR3)) >> 12); + gteMAC2 = A2((((s64)gteGBK << 12) + (gteLG1 * gteIR1) + (gteLG2 * gteIR2) + (gteLG3 * gteIR3)) >> 12); + gteMAC3 = A3((((s64)gteBBK << 12) + (gteLB1 * gteIR1) + (gteLB2 * gteIR2) + (gteLB3 * gteIR3)) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + gteMAC1 = A1(((((s64)gteR << 4) * gteIR1) + (gteIR0 * limB1(gteRFC - ((gteR * gteIR1) >> 8), 0))) >> 12); + gteMAC2 = A2(((((s64)gteG << 4) * gteIR2) + (gteIR0 * limB2(gteGFC - ((gteG * gteIR2) >> 8), 0))) >> 12); + gteMAC3 = A3(((((s64)gteB << 4) * gteIR3) + (gteIR0 * limB3(gteBFC - ((gteB * gteIR3) >> 8), 0))) >> 12); + gteIR1 = limB1(gteMAC1, 1); + gteIR2 = limB2(gteMAC2, 1); + gteIR3 = limB3(gteMAC3, 1); + + gteRGB0 = gteRGB1; + gteRGB1 = gteRGB2; + gteCODE2 = gteCODE; + gteR2 = limC1(gteMAC1 >> 4); + gteG2 = limC2(gteMAC2 >> 4); + gteB2 = limC3(gteMAC3 >> 4); +} diff --git a/libpcsxcore/gte.h b/libpcsxcore/gte.h new file mode 100644 index 00000000..2cea0264 --- /dev/null +++ b/libpcsxcore/gte.h @@ -0,0 +1,65 @@ +/*************************************************************************** + * PCSX-Revolution - PlayStation Emulator for Nintendo Wii * + * Copyright (C) 2009-2010 PCSX-Revolution Dev Team * + * * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __GTE_H__ +#define __GTE_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "r3000a.h" + +void gteMFC2(); +void gteCFC2(); +void gteMTC2(); +void gteCTC2(); +void gteLWC2(); +void gteSWC2(); + +void gteRTPS(); +void gteOP(); +void gteNCLIP(); +void gteDPCS(); +void gteINTPL(); +void gteMVMVA(); +void gteNCDS(); +void gteNCDT(); +void gteCDP(); +void gteNCCS(); +void gteCC(); +void gteNCS(); +void gteNCT(); +void gteSQR(); +void gteDCPL(); +void gteDPCT(); +void gteAVSZ3(); +void gteAVSZ4(); +void gteRTPT(); +void gteGPF(); +void gteGPL(); +void gteNCCT(); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/gte_divider.h b/libpcsxcore/gte_divider.h new file mode 100644 index 00000000..ae32db0d --- /dev/null +++ b/libpcsxcore/gte_divider.h @@ -0,0 +1,4133 @@ +// GTE Divider by shalma +// http://forums.ngemu.com/1844192-post72.html + +static u16 initial_guess[32768] = { + 0x0000, 0xFE93, 0xFE91, 0xFE8F, 0xFE8D, 0xFE8B, 0xFE89, 0xFE87, + 0xFE85, 0xFE83, 0xFE81, 0xFE7F,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+ 0xFACE, 0xFC8C, 0xFB1E, 0xFCD5, 0xFE22, 0xF992, 0xF730, 0xF98E, + 0xFBB3, 0xF9E2, 0xFBA6, 0xFDAB, 0xF84B, 0xFA29, 0xF905, 0xFAE1, + 0xFCE6, 0xFB2B, 0xFC83, 0xFE74, 0xF9A9, 0xF7B5, 0xFA63, 0xFBBC, + 0xFDBC, 0xFC09, 0xFDA1, 0xF860, 0xFAF6, 0xF91E, 0xFB46, 0xFC9A, + 0xF77B, 0xFA26, 0xFB89, 0xFA76, 0xFBD5, 0xFD70, 0xF893, 0xF6F1, + 0xF8E5, 0xFB0B, 0xF936, 0xFB59, 0xFCFD, 0xF80A, 0xF590, 0xF865, + 0xFA8A, 0xFC95, 0xFADB, 0xFC30, 0xF782, 0xF905, 0xF70C, 0xF9BD, + 0xFB6C, 0xFA0D, 0xF298, 0xF628, 0xF8E6, 0xF685, 0xF937, 0xFAF1, + 0xFC97, 0xF1F9, 0xF59F, 0xF868, 0xF66B, 0xF8B8, 0xFA77, 0xFC1B, + 0xEFB1, 0xF42C, 0xF7E1, 0xF9A9, 0xF7D7, 0xFA5A, 0xFC05, 0xF630, + 0xF391, 0xF68A, 0xF990, 0xF754, 0xF9DE, 0xFB8A, 0xF5A8, 0xF28C, + 0xF678, 0xF853, 0xFAC8, 0xF962, 0xFB16, 0xF516, 0xF77C, 0xF5E4, + 0xF837, 0xFA4C, 0xF8E4, 0xFA9A, 0xF502, 0xF75D, 0xF55F, 0xF7B8, + 0xF9D0, 0xFBC8, 0xFA1E, 0xF38C, 0xF6D6, 0xF904, 0xF731, 0xF956, + 0xFB54, 0xF9A4, 0xF2F1, 0xF651, 0xF8E7, 0xF6AC, 0xF936, 0xFAD8, + 0xF9DA, 0xF2DF, 0xF5CA, 0xF86D, 0xF6ED, 0xF914, 0xFB0E, 0xFC4B, + 0xF244, 0xF5AD, 0xF7E8, 0xF9FA, 0xF88E, 0xFA95, 0xFC28, 0xF7D2, + 0xF520, 0xF82B, 0xF9D1, 0xF879, 0xFA1D, 0xF434, 0xF752, 0xF56B, + 0xF7A8, 0xFA0F, 0xFB9D, 0xFA59, 0xF486, 0xF6CF, 0xF943, 0xF77A, + 0xF993, 0xFB27, 0xFA2D, 0xF3F6, 0xF70F, 0xF8C4, 0xF768, 0xF969, + 0xF80B, 0xF9B5, 0xF860, 0xFA54, 0xFBDB, 0xF73C, 0xF557, 0xF78D, + 0xF9EC, 0xF838, 0xF9DA, 0xFBB8, 0xF77F, 0xF53F, 0xF7CB, 0xF9CA, + 0xF871, 0xFA60, 0xFBEE, 0xF6FC, 0xF517, 0xF7A2, 0xF99B, 0xF84F, + 0xFA3F, 0xF4A5, 0xF794, 0xF560, 0xF7E4, 0xF9D9, 0xF885, 0xFA10, + 0xF47B, 0xF715, 0xF536, 0xF7B8, 0xF9B1, 0xF860, 0xF1E9, 0xF4C0, + 0xF7A7, 0xF57B, 0xF793, 0xF98A, 0xF83A, 0xF152, 0xF567, 0xF783, + 0xF615, 0xF824, 0xFA10, 0xF484, 0xF213, 0xF53D, 0xF759, 0xF5EB, + 0xF7FD, 0xFA39, 0xF4C7, 0xF265, 0xF582, 0xF7ED, 0xF62E, 0xF890, + 0xF16C, 0xF49F, 0xF319, 0xF5B4, 0xF7C5, 0xF666, 0xF8BB, 0xF220, + 0xF544, 0xF2E9, 0xF652, 0xF851, 0xF6FE, 0xF88E, 0xF2D7, 0xF57C, + 0xF398, 0xF628, 0xF880, 0xF727, 0xEEBF, 0xF386, 0xF614, 0xF442, + 0xF713, 0xF8AF, 0xF6FE, 0xEF96, 0xF3BE, 0xF64A, 0xF475, 0xF6F0, + 0xF8D8, 0xF3AC, 0xF0CF, 0xF463, 0xF735, 0xF57A, 0xF71F, 0xF90C, + 0xF384, 0xF188, 0xF49B, 0xF760, 0xF5A5, 0xF7AF, 0xF174, 0xF487, + 0xF29E, 0xF592, 0xF78C, 0xF5E6, 0xF880, 0xF28C, 0xF4BF, 0xF2DB, + 0xF5C7, 0xF810, 0xF9DF, 0xF8F8, 0xF2C9, 0xF60D, 0xF3E4, 0xF652, + 0xF83B, 0xF74D, 0xF925, 0xFA8F, 0xF95C, 0xF47C, 0xF6E6, 0xF8B7, + 0xF7C9, 0xF99A, 0xFAFE, 0xF283, 0xF570, 0xF762, 0xF60B, 0xF845, + 0xF9C1, 0xFB6B, 0xF3EF, 0xF64C, 0xF7E1, 0xF692, 0xF8C1, 0xFA2A, + 0xF594, 0xF47A, 0xF6D3, 0xF85F, 0xF710, 0xF93B, 0xF413, 0xF228, + 0xF50E, 0xF750, 0xF91A, 0xF7E0, 0xF280, 0xF54D, 0xF326, 0xF5E8, + 0xF7D2, 0xF63D, 0xF8AA, 0xF372, 0xF5D6, 0xF3C7, 0xF6C2, 0xF83D, + 0xF6FC, 0xF176, 0xF462, 0xF65D, 0xF4B7, 0xF743, 0xF954, 0xEEE5, + 0xF275, 0xF543, 0xF38F, 0xF5D8, 0xF7C1, 0xF2C1, 0xEFFC, 0xF367, + 0xF621, 0xF474, 0xF701, 0xF8C7, 0xF40F, 0xF185, 0xF4AB, 0xF690, + 0xF548, 0xF734, 0xF1C6, 0xF49D, 0xF2DE, 0xF58B, 0xF7B3, 0xF675, + 0xEF46, 0xF377, 0xF1A2, 0xF414, 0xF612, 0xF4C3, 0xEC77, 0xF11E, + 0xF45E, 0xF29D, 0xF553, 0xF726, 0xF63B, 0xEF7B, 0xF2DC, 0xF52E, + 0xF38B, 0xF5D6, 0xF82E, 0xED3A, 0xF0F7, 0xF420, 0xF65B, 0xF50E, + 0xF6E6, 0xF192, 0xEF3E, 0xF241, 0xF547, 0xF351, 0xF5D9, 0xEF30, + 0xF2E7, 0xF112, 0xF3E5, 0xF5C8, 0xF4D6, 0xF6AB, 0xF153, 0xF473, + 0xF25C, 0xF560, 0xF6DD, 0xF5F0, 0xEFC1, 0xF2A9, 0xF13A, 0xF3A2, + 0xF29F, 0xF067, 0xF39B, 0xF573, 0xF435, 0xF6A8, 0xF809, 0xEE5A, + 0xF1C5, 0xF4BF, 0xF2CC, 0xF554, 0xF766, 0xF25E, 0xF08F, 0xF35A, + 0xF5DF, 0xF3FA, 0xF66A, 0xF0CE, 0xF3F1, 0xF234, 0xF488, 0xF69B, + 0xF5B1, 0xF001, 0xF26E, 0xF111, 0xF41C, 0xF63A, 0xF4B1, 0xED88, + 0xF1B1, 0xF44E, 0xF2AF, 0xF4E3, 0xF6F4, 0xEBA2, 0xF029, 0xF344, + 0xF139, 0xF3DB, 0xF68D, 0xF0CD, 0xEE7A, 0xF1D2, 0xF4AC, 0xF373, + 0xF53D, 0xEF20, 0xF2B4, 0xF0FB, 0xF3A5, 0xF5C8, 0xF441, 0xEE53, + 0xF19C, 0xEF70, 0xF294, 0xF55E, 0xF3CF, 0xEC26, 0xF012, 0xF36D, + 0xF224, 0xF40B, 0xF65F, 0xF534, 0xEF36, 0xF25E, 0xF0AD, 0xF347, + 0xF56A, 0xF434, 0xEDF8, 0xF144, 0xF427, 0xF28E, 0xF502, 0xF6B3, + 0xEBCD, 0xF0D3, 0xF31E, 0xF17C, 0xF3FE, 0xF652, 0xF110, 0xEF4B, + 0xF2B0, 0xF4CA, 0xF2F1, 0xF55B, 0xEFEF, 0xF2E8, 0xF140, 0xF420, + 0xF61A, 0xF4F3, 0xEF73, 0xF278, 0xF12D, 0xF3B0, 0xF523, 0xF3F1, + 0xEDD9, 0xF16A, 0xF3E8, 0xF2AB, 0xF4BB, 0xF6B1, 0xEC90, 0xF0F3, + 0xF37C, 0xF23A, 0xF453, 0xF64B, 0xF18E, 0xEFCF, 0xF275, 0xF484, + 0xF3A9, 0xF5A8, 0xF11D, 0xF348, 0xF206, 0xF473, 0xF618, 0xF544, + 0xF414, 0xF60A, 0xF4E5, 0xEF94, 0xF22F, 0xF0E3, 0xF3AE, 0xF5AB, + 0xF47F, 0xEF7F, 0xF1C1, 0xF06F, 0xF2FB, 0xF547, 0xF3D7, 0xEE4C, + 0xF1B0, 0xF3CC, 0xF28F, 0xF4DF, 0xF36D, 0xEDD4, 0xF098, 0xF35F, + 0xF226, 0xF439, 0xF61A, 0xEC98, 0xF024, 0xF2F9, 0xF16C, 0xF3D3, + 0xEE05, 0xF10B, 0xF00D, 0xF28A, 0xF443, 0xF365, 0xED89, 0xF0F6, + 0xEF9E, 0xF27A, 0xF433, 0xF354, 0xED0A, 0xF087, 0xEE7A, 0xF16A, + 0xF3C9, 0xF2E6, 0xEBC7, 0xF00E, 0xF286, 0xF0FB, 0xF360, 0xF27F, + 0xEBB2, 0xEF55, 0xF276, 0xF0E9, 0xF350, 0xF536, 0xEB31, 0xEEDD, + 0xF209, 0xF075, 0xF2E1, 0xECA8, 0xF06E, 0xEE67, 0xF19C, 0xF3F0, + 0xF313, 0xEC2D, 0xF001, 0xEE50, 0xF188, 0xF38C, 0xF2AD, 0xEC18, + 0xEF8B, 0xEDD8, 0xF11F, 0xF324, 0xF240, 0xEB99, 0xEF77, 0xF239, + 0xF0B0, 0xF34F, 0xF22C, 0xEB82, 0xEF07, 0xF1CC, 0xF09B, 0xF2EB, + 0xED46, 0xEAF9, 0xEEF0, 0xF1B6, 0xF0CD, 0xF2D2, 0xED83, 0xF067, + 0xEF2D, 0xF151, 0xF38C, 0xF2AE, 0xED04, 0xF057, 0xEEB7, 0xF183, + 0xF3BB, 0xF2A0, 0xECEF, 0xF08B, 0xEE41, 0xF1B3, 0xF357, 0xF233, + 0xEC7B, 0xF01E, 0xF26C, 0xF148, 0xF385, 0xF265, 0xECB8, 0xEFAA, + 0xEE67, 0xF178, 0xF31C, 0xF295, 0xF46C, 0xF62D, 0xEEA0, 0xF10D, + 0xF34C, 0xF229, 0xF408, 0xF5C9, 0xEE30, 0xF13D, 0xF328, 0xF258, + 0xF436, 0xEFAC, 0xEE62, 0xF16F, 0xF358, 0xF236, 0xF414, 0xEFDE, + 0xEE9F, 0xF104, 0xF382, 0xF266, 0xECE6, 0xF010, 0xEED4, 0xF134, + 0xF360, 0xF296, 0xECD1, 0xF043, 0xEF0C, 0xF165, 0xF389, 0xEF03, + 0xED0E, 0xF07B, 0xF269, 0xF142, 0xF365, 0xEEDA, 0xED4B, 0xF051, + 0xF2D9, 0xF172, 0xF395, 0xEF17, 0xEDCF, 0xF089, 0xF2B7, 0xF1EB, + 0xEC6E, 0xEF47, 0xEE0A, 0xF0BB, 0xF2E3, 0xF1C9, 0xECA9, 0xEFC5, + 0xEE3C, 0xF12E, 0xF34F, 0xE889, 0xEC8B, 0xEFFB, 0xEEC0, 0xF108, + 0xF32D, 0xE8DC, 0xED75, 0xF074, 0xEEF9, 0xF138, 0xEB5E, 0xE9E7, + 0xED4A, 0xF052, 0xEF72, 0xF1AE, 0xECA3, 0xEA2D, 0xEE32, 0xF082, + 0xEF52, 0xF18C, 0xEC28, 0xEF8E, 0xEEAC, 0xF0F7, 0xEFC9, 0xE942, + 0xED62, 0xF00B, 0xEF2D, 0xF115, 0xF040, 0xE9E5, 0xEDE4, 0xF082, + 0xEF0D, 0xF18A, 0xEC92, 0xEA2B, 0xEE66, 0xF0F3, 0xEF84, 0xF1F6, + 0xED1F, 0xEB79, 0xEE46, 0xF0CD, 0xEFF9, 0xE940, 0xEDA1, 0xEC04, + 0xEEC6, 0xF188, 0xF070, 0xEA9E, 0xEE21, 0xEC91, 0xEF84, 0xF1F4, + 0xF095, 0xF2A1, 0xE96C, 0xED63, 0xEFF9, 0xEE88, 0xF148, 0xEC0A, + 0xEA5D, 0xEDE3, 0xF020, 0xEF47, 0xF126, 0xEC95, 0xEAF3, 0xEEAA, + 0xF0D6, 0xEFC4, 0xE97F, 0xED67, 0xEC82, 0xEED1, 0xF18B, 0xF07A, + 0xEB22, 0xEE33, 0xEC59, 0xEF8C, 0xF1A7, 0xE6A8, 0xEBAD, 0xEEF1, + 0xED29, 0xF045, 0xF256, 0xE87C, 0xEC86, 0xEF16, 0xEDF9, 0xF06A, + 0xEB28, 0xE974, 0xED9B, 0xEFD2, 0xEF03, 0xE8B6, 0xEC01, 0xEB15, + 0xEE60, 0xF0CF, 0xEFBD, 0xE9A3, 0xED1F, 0xEBEE, 0xEE85, 0xF0EB, + 0xE5D1, 0xEA90, 0xEDED, 0xED0C, 0xEF8D, 0xF15E, 0xE7B7, 0xEBB9, + 0xEEF5, 0xED31, 0xEFA9, 0xEB0D, 0xE906, 0xEC8C, 0xEF57, 0xEE3A, + 0xF0E3, 0xEC34, 0xEA41, 0xEDE6, 0xF053, 0xEF41, 0xE98E, 0xEC5B, + 0xEB71, 0xEE0D, 0xF0B2, 0xEFAB, 0xEABE, 0xEDBA, 0xEC8D, 0xEF58, + 0xF114, 0xE79B, 0xEBE3, 0xEEC0, 0xED9C, 0xEFB7, 0xEA90, 0xE93F, + 0xEC56, 0xEF22, 0xEE06, 0xF0AE, 0xEBB7, 0xEA78, 0xEDB5, 0xEFD8, + 0xEF4F, 0xEA13, 0xED14, 0xEBE9, 0xEE31, 0xF101, 0xEFF3, 0xEA91, + 0xEDCC, 0xECA4, 0xEFA5, 0xF19A, 0xE88D, 0xEC02, 0xEF15, 0xEDFC, + 0xF04D, 0xF231, 0xEA1B, 0xEDA2, 0xEFB7, 0xEEA9, 0xF0E7, 0xEC1B, + 0xEF64, 0xF15C, 0xECEB, 0xEBBF, 0xEED0, 0xEDB9, 0xF00B, 0xEB19, + 0xEDF7, 0xED68, 0xEFBE, 0xEEA8, 0xE92B, 0xECC9, 0xEB9C, 0xEE13, + 0xF09B, 0xE5F0, 0xE9F7, 0xEDC2, 0xEC56, 0xEF01, 0xF13A, 0xE7F9, + 0xEBFC, 0xEEB0, 0xED54, 0xEFE6, 0xEBA5, 0xEA26, 0xECFE, 0xEF98, + 0xEE5A, 0xE9C3, 0xECA9, 0xEB31, 0xEDF7, 0xED71, 0xE649, 0xEAD7, + 0xE8FD, 0xECD9, 0xEF26, 0xEEAB, 0xE89A, 0xEBF6, 0xEB5A, 0xEE13, + 0xF009, 0xE625, 0xEAFE, 0xED7C, 0xECA1, 0xEEB9, 0xEA0B, 0xE915, + 0xEC52, 0xEE68, 0xEDDC, 0xE813, 0xEBFA, 0xEA34, 0xED8A, 0xEC24, + 0xE467, 0xE9D6, 0xE83C, 0xEBD5, 0xEE76, 0xED65, 0xE786, 0xEB7B, + 0xE9C0, 0xED16, 0xEF4E, 0xE503, 0xE952, 0xED08, 0xEB61, 0xEE85, + 0xE8F5, 0xE760, 0xEAFE, 0xEDF2, 0xECDF, 0xE698, 0xEAA2, 0xEA13, + 0xECCF, 0xEBBD, 0xEE93, 0xE96E, 0xE7D2, 0xEB68, 0xEE02, 0xECB9, + 0xE773, 0xEACA, 0xE9E1, 0xEC99, 0xEF19, 0xE4F4, 0xE9D5, 0xEC8D, + 0xEBC4, 0xEE10, 0xE974, 0xE73B, 0xEB26, 0xEDC1, 0xECAC, 0xEF68, + 0xEAD0, 0xE99D, 0xEC9D, 0xEBDA, 0xEE1F, 0xE98F, 0xE7BF, 0xEB82, + 0xEDCF, 0xED03, 0xE760, 0xEB2A, 0xE9B8, 0xECF7, 0xEF27, 0xE5F4, + 0xE2FA, 0xE8CE, 0xEBDC, 0xEA32, 0xED9A, 0xEC91, 0xE61D, 0xEA14, + 0xE989, 0xEC44, 0xEEB3, 0xE402, 0xE933, 0xEBEC, 0xEACF, 0xEDAC, + 0xE8D4, 0xE6AA, 0xEAC3, 0xED56, 0xEC54, 0xE68C, 0xEAF6, 0xE9E2, + 0xEC34, 0xEBB4, 0xE580, 0xE939, 0xE76D, 0xEBA8, 0xEDDD, 0xE21D, + 0xE7A2, 0xEB52, 0xE9F4, 0xED15, 0xE7E2, 0xE6AA, 0xE99E, 0xECC1, + 0xEBB9, 0xE642, 0xE9CA, 0xE941, 0xEBA1, 0xEB1A, 0xED54, 0xE8E2, + 0xE76D, 0xEB0E, 0xED87, 0xEC89, 0xE70C, 0xEAB8, 0xE9A4, 0xEC7B, + 0xEB74, 0xE5A8, 0xE947, 0xE811, 0xEB23, 0xEDCD, 0xE3E8, 0xE8A2, + 0xEBD6, 0xEACA, 0xED02, 0xE890, 0xE70F, 0xEA74, 0xECF4, 0xEBF6, + 0xE6B2, 0xEA20, 0xE907, 0xEC1E, 0xEB5A, 0xE4FD, 0xE97B, 0xE8A1, + 0xEB4E, 0xED7B, 0xE3EC, 0xE84D, 0xEB42, 0xEA32, 0xED25, 0xEEF6, + 0xE6BC, 0xEA14, 0xECDA, 0xEC1D, 0xEDFE, 0xEA8F, 0xE981, 0xEBC8, + 0xEB0A, 0xEDAA, 0xE924, 0xE855, 0xEB73, 0xED5D, 0xECE1, 0xE7F8, + 0xEB67, 0xEAA3, 0xED0B, 0xEC8D, 0xE794, 0xEA4D, 0xECFD, 0xEC42, + 0xEE8B, 0xEAC1, 0xE9F2, 0xEBF3, 0xEB31, 0xED8E, 0xE99E, 0xE8D1, + 0xEB9A, 0xEDEE, 0xED3A, 0xE879, 0xEB8E, 0xEACA, 0xED2E, 0xEC73, + 0xEBB8, 0xEB3A, 0xED4D, 0xE37F, 0xE80F, 0xEAE6, 0xEA24, 0xEC8F, + 0xE88A, 0xE7B0, 0xEA94, 0xE903, 0xEC39, 0xE759, 0xE678, 0xE9BD, + 0xEC29, 0xEB6D, 0xE616, 0xEA2F, 0xE89C, 0xEBD4, 0xEA9D, 0xE5B4, + 0xE910, 0xE83A, 0xEB0F, 0xED1E, 0xE463, 0xE7E8, 0xEB33, 0xE9F9, + 0xE3FF, 0xE8A9, 0xE7D5, 0xEA63, 0xE99E, 0xE396, 0xE77A, 0xE69F, + 0xE994, 0xE8C9, 0xE22A, 0xE71D, 0xE55E, 0xE939, 0xEB6A, 0xE044, + 0xE631, 0xE9AB, 0xE85B, 0xEB57, 0xE6B5, 0xE4EB, 0xE8D4, 0xE802, + 0xEA89, 0xE576, 0xE489, 0xE87B, 0xEAB3, 0xEA37, 0xE47F, 0xE820, + 0xE79D, 0xEAA0, 0xE964, 0xE416, 0xE80F, 0xE669, 0xE9D4, 0xEC23, + 0xE2B7, 0xE6E2, 0xE658, 0xE97B, 0xEC10, 0xE146, 0xE6D1, 0xE9E9, + 0xE8A6, 0xEB4D, 0xE74A, 0xE59D, 0xE916, 0xE84D, 0xEAFB, 0xE665, + 0xE58C, 0xE8BD, 0xEB62, 0xEAA2, 0xE60C, 0xE92D, 0xE7E1, 0xEB0E, + 0xE687, 0xE519, 0xE8D4, 0xE78A, 0xEA46, 0xE59B, 0xE4B9, 0xE801, + 0xEB1F, 0xE9ED, 0xE53B, 0xE871, 0xE7A6, 0xEA5D, 0xE9DC, 0xE448, + 0xE81A, 0xE712, 0xEA04, 0xE90E, 0xE3E8, 0xE807, 0xE6B6, 0xE9F1, + 0xEBF5, 0xE2E5, 0xE72D, 0xEA1B, 0xE929, 0xEBA4, 0xE823, 0xE6D2, + 0xE575, 0xE8D0, 0xE851, 0xEAA9, 0xEA30, 0xE564, 0xE8BF, 0xE83E, + 0xEA58, 0xECC1, 0xE4FB, 0xE868, 0xE766, 0xEA47, 0xEC71, 0xE40A, + 0xE855, 0xEA6F, 0xE9F7, 0xE56A, 0xE87F, 0xE77D, 0xEA1F, 0xE9A0, + 0xE482, 0xE828, 0xE726, 0xEA0E, 0xE98D, 0xE41B, 0xE815, 0xE715, + 0xE9B5, 0xE93F, 0xE40C, 0xE7C0, 0xE6BE, 0xE9A4, 0xE51D, 0xE3AE, + 0xE7AD, 0xEA44, 0xE956, 0xE42E, 0xE39D, 0xE6D7, 0xE9EE, 0xE8FF, + 0xE4AE, 0xE7CD, 0xE745, 0xE99F, 0xE964, 0xE3BF, 0xE76F, 0xE6F0, + 0xE98C, 0xE4D0, 0xE3B0, 0xE763, 0xE6DF, 0xE937, 0xE472, 0xE349, + 0xE707, 0xE681, 0xE92B, 0xE45B, 0xE33A, 0xE6B2, 0xE9C4, 0xE94E, + 0xE3FC, 0xE2D5, 0xE720, 0xE976, 0xDE33, 0xE3ED, 0xE7C9, 0xE6CB, + 0xE997, 0xE57E, 0xE46D, 0xE774, 0xE6BA, 0xE984, 0xE526, 0xE408, + 0xE763, 0xE65C, 0xE932, 0xE515, 0xE3F7, 0xE70E, 0xE6CC, 0xE005, + 0xE4B9, 0xE39B, 0xE773, 0xE9EE, 0xDF99, 0xE4A8, 0xE81A, 0xE71E, + 0xE9A2, 0xDF83, 0xE4D4, 0xE7C5, 0xE70D, 0xE9FF, 0xE584, 0xE4C3, + 0xE7ED, 0xE737, 0xE1E3, 0xE5F9, 0xE4ED, 0xE7DC, 0xE758, 0xE180, + 0xE59D, 0xE491, 0xE7FD, 0xE74A, 0xE171, 0xE58C, 0xE508, 0xE7AA, + 0xE2D0, 0xE677, 0xE635, 0xE8C3, 0xE3DD, 0xE350, 0xE666, 0xE5E2, + 0xE8E6, 0xE410, 0xE2ED, 0xE704, 0xE940, 0xDFA6, 0xE43A, 0xE36B, + 0xE6B1, 0xE92D, 0xDF33, 0xE4AF, 0xE756, 0xE6D7, 0xE94E, 0xDFCA, + 0xE4D9, 0xE7F4, 0xE6FC, 0xE139, 0xE587, 0xE47F, 0xE815, 0xE6EB, + 0xE256, 0xE5B1, 0xE4F4, 0xE837, 0xE789, 0xE1F3, 0xE5DB, 0xE59B, + 0xE85E, 0xE340, 0xE271, 0xE5FC, 0xE548, 0xE87F, 0xE373, 0xE331, + 0xE626, 0xE569, 0xE8A0, 0xE3E8, 0xE2D0, 0xE650, 0xE593, 0xDFEC, + 0xE412, 0xE34C, 0xE6BC, 0xE638, 0xE021, 0xE4C0, 0xE378, 0xE6DD, + 0xE217, 0xE0AF, 0xE4EA, 0xE42D, 0xE737, 0xE24A, 0xE176, 0xE514, + 0xE80C, 0xE75F, 0xE276, 0xE236, 0xE5B9, 0xE82B, 0xDDFC, 0xE32B, + 0xE695, 0xE5E1, 0xE84C, 0xDEDE, 0xE35E, 0xE6BF, 0xE60B, 0xE8A6, + 0xE4CE, 0xE40C, 0xE719, 0xE665, 0xE115, 0xE573, 0xE4B8, 0xE738, + 0xE686, 0xE1DC, 0xE59B, 0xE4E2, 0xE792, 0xE6E0, 0xE206, 0xE5C1, + 0xE50A, 0xE7B3, 0xE3C8, 0xE2FD, 0xE61F, 0xE5DF, 0xE80D, 0xE474, + 0xE3B2, 0xE640, 0xE609, 0xE82C, 0xE49A, 0xE3DC, 0xE713, 0xE663, + 0xE17D, 0xE578, 0xE43D, 0xE76B, 0xE975, 0xE1E9, 0xE59B, 0xE4E3, + 0xE427, 0xE367, 0xE6A6, 0xE8BF, 0xE103, 0xE50A, 0xE3C8, 0xE6FD, + 0xE28F, 0xE1C8, 0xE52D, 0xE474, 0xE757, 0xE37D, 0xE2B4, 0xE58E, + 0xE54E, 0xDF17, 0xE3DE, 0xE2E5, 0xE661, 0xE5B1, 0xE075, 0xE408, + 0xE3C8, 0xE6B9, 0xE241, 0xE178, 0xE4E2, 0xE42B, 0xE70A, 0xE32B, + 0xE1A2, 0xE543, 0xE505, 0xDF24, 0xE395, 0xE295, 0xE59D, 0xE566, + 0xE0C0, 0xE3F6, 0xE37F, 0xE66E, 0xE1FA, 0xE0EA, 0xE4D0, 0xE3E2, + 0xE6F6, 0xE2E4, 0xE1E4, 0xE52B, 0xE4BA, 0xDF68, 0xE345, 0xE307, + 0xE602, 0xE54B, 0xE074, 0xE426, 0xE36F, 0xE65A, 0xDAEA, 0xE16E, + 0xE487, 0xE449, 0xE6E2, 0xDCD6, 0xE25F, 0xE58F, 0xE4E1, 0xDFB5, + 0xDED7, 0xE2F7, 0xE5E7, 0xE539, 0xE0B6, 0xDFE1, 0xE3D8, 0xE676, + 0xDCF2, 0xE1E7, 0xE0E2, 0xE470, 0xE6FE, 0xDE13, 0xE248, 0xE20A, + 0xE4CB, 0xE039, 0xDF64, 0xE367, 0xE2AB, 0xE5CE, 0xE171, 0xE065, + 0xE3FF, 0xE38A, 0xDD91, 0xE297, 0xE194, 0xE50E, 0xE422, 0xDF77, + 0xE2F8, 0xE2BA, 0xE594, 0xE0FB, 0xE0B6, 0xE43F, 0xE352, 0xE623, + 0xE221, 0xE1E3, 0xE4D4, 0xE466, 0xDEFA, 0xE33E, 0xE282, 0xE55F, + 0xE4F5, 0xE040, 0xE3D6, 0xE398, 0xE5E9, 0xE267, 0xE16D, 0xE463, + 0xE027, 0xDF14, 0xE2FF, 0xE2CA, 0xE598, 0xE192, 0xE091, 0xE44A, + 0xE360, 0xDE21, 0xE231, 0xE1B5, 0xE4D7, 0xE49E, 0xDF65, 0xE37C, + 0xE28B, 0xE594, 0xDBF8, 0xE0D9, 0xDFD8, 0xE3D4, 0xE61A, 0xDD5C, + 0xE1B6, 0xE141, 0xE466, 0xDFFD, 0xDEEE, 0xE308, 0xE217, 0xDC5B, + 0xE15F, 0xE05E, 0xE39C, 0xE360, 0xDDFB, 0xE23A, 0xE1C0, 0xE460, + 0xE083, 0xDF7D, 0xE2D0, 0xE294, 0xE524, 0xE160, 0xE0ED, 0xE447, + 0xE35F, 0xDE93, 0xDE10, 0xE1C1, 0xE505, 0xDA79, 0xE00A, 0xDFCE, + 0xE346, 0xE5BD, 0xDD1A, 0xE1A8, 0xE0A9, 0xE40A, 0xDF29, 0xDEE6, + 0xE27C, 0xE23E, 0xE4CC, 0xE0CE, 0xE092, 0xE345, 0xE309, 0xDDFE, + 0xE25A, 0xE16D, 0xE43E, 0xE3CB, 0xDFB1, 0xE35C, 0xE2F0, 0xE528, + 0xDC7E, 0xE14D, 0xE41E, 0xE3E9, 0xDF9A, 0xDE51, 0xE256, 0xE50E, + 0xE4D9, 0xE07C, 0xE039, 0xE31F, 0xE2EA, 0xDDA0, 0xE18C, 0xE150, + 0xE416, 0xE3E1, 0xDF5A, 0xE33D, 0xE251, 0xE53B, 0xE1A8, 0xE130, + 0xE432, 0xE34E, 0xDF81, 0xE2A8, 0xE237, 0xE4AF, 0xE445, 0xE096, + 0xE39F, 0xE36C, 0xE594, 0xDE1A, 0xE1A4, 0xE4C4, 0xE45A, 0xE6A9, + 0xDF7D, 0xE381, 0xE268, 0xE576, 0xE1BC, 0xE14A, 0xE3CE, 0xE399, + 0xE32A, 0xE2F5, 0xE552, 0xDD92, 0xE1D9, 0xE0B0, 0xE418, 0xDFFE, + 0xDFC2, 0xE30A, 0xE1F3, 0xDDB9, 0xE146, 0xE0CE, 0xE38E, 0xDA11, + 0xDEE5, 0xE279, 0xE246, 0xE4A9, 0xDC8D, 0xE128, 0xDFF3, 0xE36E, + 0xDF41, 0xDEC2, 0xE25B, 0xE13D, 0xDCB4, 0xE089, 0xE01A, 0xE2DD, + 0xD88F, 0xDE23, 0xDDE0, 0xE18E, 0xE433, 0xDB73, 0xE06D, 0xDF38, + 0xE2F4, 0xDE7F, 0xDE00, 0xE1E1, 0xE1A7, 0xDBE6, 0xE00A, 0xDF94, + 0xE298, 0xE229, 0xDE63, 0xDD19, 0xE10F, 0xE3EC, 0xDBC5, 0xDFEE, + 0xDFB4, 0xE2AF, 0xDDBF, 0xDD7C, 0xE19E, 0xE12F, 0xDB11, 0xDF8D, + 0xDF15, 0xE253, 0xE1E4, 0xDDDF, 0xDD62, 0xE0CC, 0xE05D, 0xDAF7, + 0xDFA4, 0xDF2E, 0xE26A, 0xDE77, 0xDCF3, 0xE152, 0xE0E3, 0xDBA6, + 0xDB1B, 0xDFC4, 0xE210, 0xE1D6, 0xDD99, 0xDD13, 0xE089, 0xE048, + 0xDBC8, 0xDF63, 0xDEED, 0xE254, 0xDE2F, 0xDDB9, 0xE144, 0xE0D5, + 0xDB18, 0xDAD7, 0xDFB8, 0xE22E, 0xE1C6, 0xDE8B, 0xDCCD, 0xE0B0, + 0xE03A, 0xDB84, 0xDF57, 0xDF16, 0xE278, 0xDE23, 0xDDAF, 0xE16B, + 0xE0FC, 0xE38E, 0xDBE9, 0xDFDF, 0xDF6B, 0xE219, 0xDE7F, 0xDE04, + 0xE0D7, 0xE09D, 0xDB7C, 0xDFBA, 0xDF46, 0xE2FE, 0xDE55, 0xDDDF, + 0xDD64, 0xE18B, 0xE11C, 0xE3A3, 0xE33D, 0xDFCC, 0xDF58, 0xE237, + 0xE4D6, 0xDDFA, 0xE0F7, 0xE08A, 0xE377, 0xDFEA, 0xDF7D, 0xE288, + 0xE283, 0xDE90, 0xDE13, 0xE1A9, 0xE13C, 0xDC15, 0x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A59, 0xDA1C, 0xDD93, + 0xDCCA, 0xD8F2, 0xDCC0, 0xDCBB, 0xDF59, 0xD774, 0xDBB2, 0xDBAD, + 0xDE8F, 0xDB6B, 0xDA96, 0xDE4F, 0xDE4A, 0xDA51, 0xDA4C, 0xDD87, + 0xDD82, 0xD927, 0xD922, 0xDC79, 0xDC7B, 0xD7B4, 0xDC71, 0xDBA3, + 0xD62F, 0xD62A, 0xDB5C, 0xDB5E, 0xD48B, 0xDA86, 0xDA42, 0xDE05, + 0xD274, 0xD95E, 0xD921, 0xDD36, 0xD919, 0xD914, 0xDC67, 0xDC62, + 0xD7EA, 0xD7E5, 0xDB5B, 0xDB56, 0xD664, 0xDB4C, 0xDB47, 0xDDF5, + 0xD4C9, 0xDA32, 0xDA2D, 0xDDB4, 0xD94E, 0xD913, 0xD90E, 0xDCE7, + 0xD904, 0xD81C, 0xDC18, 0xDC13, 0xD7D7, 0xD6A4, 0xDBD3, 0xDB07, + 0xD697, 0xDAFD, 0xDAFA, 0xDE32, 0xD549, 0xDA1D, 0xDA18, 0xDD65, + 0xD9D8, 0xD8FE, 0xDD2C, 0xDC98, 0xD8F1, 0xD8EC, 0xDC5A, 0xDC55, + 0xD7C4, 0xDBC1, 0xDB86, 0xDE78, 0xD68D, 0xDB7E, 0xDAAD, 0xDDB2, + 0xD53F, 0xDAA5, 0xDAA0, 0xDDA5, 0xD3E7, 0xD9C5, 0xD9C0, 0xDCD8, + 0xD8DC, 0xD8A1, 0xDC9A, 0xDC0D, 0xD894, 0xD7AE, 0xDBFE, 0xDBF9, + 0xD7A6, 0xD7A1, 0xDB2C, 0xDB27, 0xD66F, 0xDAE7, 0xDA55, 0xDDAF, + 0xD569, 0xDA46, 0xDA0B, 0xDD1A, 0xD96B, 0xD968, 0xDCDC, 0xDCD7, + 0xD923, 0xD881, 0xDC40, 0xD12B, 0xD837, 0xD839, 0xDBFD, 0xD750, + 0xD74B, 0xDB66, 0xDB63, 0xD73E, 0xD653, 0xDA8F, 0xDA8A, 0xD646, + 0xDA87, 0xDA84, 0xDA49, 0xD503, 0xD9AB, 0xD9A6, 0xDCD9, 0xD3F1, + 0xD961, 0xD8C1, 0xDCCC, 0xD8BE, 0xD8BB, 0xDC35, 0xDC01, 0xD7D4, + 0xD7CF, 0xDB65, 0xD7CE, 0xD7C9, 0xD6E0, 0xDB5A, 0xD6DD, 0xD6D8, + 0xDA88, 0xDA8A, 0xD5E0, 0xD5E2, 0xDA7B, 0xDA76, 0xD4E3, 0xD9E1, + 0xD9A6, 0xDCCE, 0xD4D1, 0xD997, 0xD994, 0xDC8B, 0xD37D, 0xD8F1, + 0xD8B8, 0xDC7E, 0xD8AE, 0xD8A9, 0xDBEB, 0xDBEB, 0xD801, 0xD7C8, + 0xDBA8, 0xD7BE, 0xD719, 0xDB13, 0xDB10, 0xD713, 0xD70E, 0xDB08, + 0xDA76, 0xD61D, 0xD618, 0xDA33, 0xDA2E, 0xD612, 0xDA2B, 0xDA26, + 0xDCD7, 0xD517, 0xDA20, 0xD987, 0xDCCC, 0xD949, 0xD944, 0xDC37, + 0xDC32, 0xD93E, 0xD8A0, 0xDBFD, 0xDBF8, 0xD891, 0xD893, 0xDBE9, + 0xDBEB, 0xDBE6, 0xD7AD, 0xD7A8, 0xDB53, 0xDB4E, 0xD7A2, 0xDB17, + 0xDB12, 0xDB0D, 0xD6F7, 0xDB0A, 0xDB05, 0xDD69, 0xD6A8, 0xDA6D, + 0xDA68, 0xD6A2, 0xD69D, 0xDA2A, 0xDA27, 0xD5AE, 0xDA24, 0xDA1F, + 0xDC96, 0xD5A3, 0xD980, 0xD982, 0xDC89, 0xD4E7, 0xD93F, 0xD93A, + 0xD49D, 0xD937, 0xD932, 0xD92F, 0xD3E1, 0xD925, 0xD927, 0xDBFF, + 0xD3CF, 0xD888, 0xD883, 0xDBF2, 0xD845, 0xD842, 0xD83D, 0xDB5C, + 0xD833, 0xD835, 0xDB54, 0xD2AD, 0xD828, 0xD78C, 0xDB13, 0xD19A, + 0xD786, 0xD746, 0xDB08, 0xD73C, 0xD73E, 0xDACC, 0xDAC7, 0xD731, + 0xD72C, 0xDABF, 0xCF87, 0xD688, 0xD685, 0xDA22, 0xD67B, 0xD63B, + 0xD63F, 0xDA17, 0xD635, 0xD630, 0xD9DB, 0xD9D6, 0xD62A, 0xD625, + 0xD9D0, 0xD57A, 0xD575, 0xD577, 0xD98F, 0xD56F, 0xD52F, 0xD982, + 0xD984, 0xD5CC, 0xD5C7, 0xD975, 0xD972, 0xD517, 0xD514, 0xD936, + 0xD511, 0xD4CC, 0xD92E, 0xD92B, 0xD4C4, 0xD4C1, 0xD91C, 0xD8E5, + 0xD4B4, 0xD4B6, 0xD8DD, 0xD8D8, 0xD46E, 0xD46B, 0xD8D2, 0xD8CD, + 0xD45E, 0xD891, 0xD893, 0xD456, 0xD453, 0xD884, 0xD881, 0xD44D, + 0xD399, 0xD879, 0xD840, 0xD3FB, 0xD838, 0xD83A, 0xDB33, 0xD3F0, + 0xD3EB, 0xD828, 0xD82A, 0xD3E5, 0xD3A0, 0xD877, 0xD879, 0xD39A, + 0xD7DC, 0xD7DE, 0xDB2F, 0xD38A, 0xD832, 0xD82D, 0xD382, 0xD37F, + 0xD820, 0xD7E7, 0xD339, 0xD3E3, 0xD7E1, 0xD7DC, 0xD327, 0xD7D9, + 0xD7D6, 0xDAF1, 0xD38B, 0xD828, 0xD825, 0xD385, 0xD380, 0xD7E4, + 0xD7DF, 0xD373, 0xD370, 0xD7D7, 0xD7D4, 0xD3D7, 0xD82B, 0xD826, + 0xD322, 0xD31F, 0xD7EC, 0xD7E9, 0xD37F, 0xD381, 0xD7DA, 0xD7DC, + 0xD374, 0xD371, 0xD829, 0xD82B, 0xD3D8, 0xD7EF, 0xD7EA, 0xD3CB, + 0xD3C6, 0xD7E4, 0xD839, 0xD428, 0xD37D, 0xD833, 0xD82E, 0xD3E4, + 0xD3DF, 0xD7ED, 0xD3D7, 0xD43F, 0xD841, 0xD83C, 0xD432, 0xD42F, + 0xD88E, 0xD88B, 0xD48F, 0xD48A, 0xD851, 0xD489, 0xD4EA, 0xD4E5, + 0xD89E, 0xD43E, 0xD49F, 0xD891, 0xD85A, 0xD499, 0xD496, 0xD8AC, + 0xD8A7, 0xD4F4, 0xD4F1, 0xD8FB, 0xD54D, 0xD54A, 0xD545, 0xD8B5, + 0xD50B, 0xD506, 0xD907, 0xD904, 0xD55F, 0xD55A, 0xD8CA, 0xCFA3, + 0xD5B3, 0xD5B0, 0xD910, 0xD60C, 0xD609, 0xD56C, 0xD905, 0xD5C8, + 0xD5C5, 0xD91E, 0xD973, 0xD61E, 0xD619, 0xD96B, 0xD156, 0xD672, + 0xD634, 0xD97F, 0xD1BF, 0xD68D, 0xD688, 0xD99A, 0xD6DF, 0xD6DA, + 0xD6D5, 0xD6D7, 0xD9DD, 0xD2E9, 0xD6F0, 0xD6F4, 0xD9F8, 0xD2A0, + 0xD744, 0xD799, 0xD305, 0xD737, 0xD75A, 0xD75C, 0xD3C6, 0xD7AC, + 0xD7A7, 0xD801, 0xD41F, 0xD7A1, 0xD7C2, 0xD3E0, 0xD441, 0xD814, + 0xD80F, 0xD49A, 0xD495, 0xD82D, 0xD4F1, 0xD4F3, 0xD4F0, 0xD875, + 0xD4AF, 0xD510, 0xD50B, 0xD890, 0xD567, 0xD5C1, 0xD8D9, 0xD06D, + 0xD582, 0xD57F, 0xD945, 0xD146, 0xD633, 0xD630, 0xD216, 0xD211, + 0xD64E, 0xD64B, 0xD20B, 0xD233, 0xD6FA, 0xD698, 0xD298, 0xD2FE, + 0xD70E, 0xD361, 0xD35C, 0xD760, 0xD703, 0xD34F, 0xD377, 0xD779, + 0xCD1E, 0xD439, 0xD436, 0xD794, 0xCE16, 0xD454, 0xD456, 0xD7E1, + 0xCF7C, 0xD50C, 0xD564, 0xCFE6, 0xD05A, 0xD527, 0xD586, 0xD134, + 0xD5DB, 0xD5D8, 0xD5A1, 0xD156, 0xD5F6, 0xD650, 0xD224, 0xD21F, + 0xD611, 0xD669, 0xD284, 0xD27F, 0xD6BB, 0xCBEB, 0xD36C, 0xD367, + 0xD72C, 0xD366, 0xD387, 0xD389, 0xD79D, 0xD447, 0xD444, 0xD43F, + 0xCF4C, 0xD462, 0xD4C1, 0xD7D1, 0xCFEA, 0xD4E1, 0xD539, 0xD12B, + 0xD128, 0xD589, 0xD58B, 0xD14D, 0xD1BA, 0xD601, 0xD5FE, 0xD216, + 0xD23E, 0xD679, 0xD308, 0xD367, 0xD300, 0xD6EA, 0xD323, 0xD382, + 0xD3E1, 0xD754, 0xCE73, 0xD406, 0xD45E, 0xD7C5, 0xCFC9, 0xD47C, + 0xD4DB, 0xD05E, 0xD0C9, 0xD4FB, 0xD553, 0xD12C, 0xD0EB, 0xD571, + 0xD223, 0xD21E, 0xD21B, 0xD5E2, 0xD2A7, 0xD304, 0xD306, 0xD6AE, + 0xD329, 0xD388, 0xD6CC, 0xCECC, 0xD408, 0xD460, 0xD78C, 0xCF6A, + 0xD480, 0xD4DD, 0xD040, 0xD03D, 0xD553, 0xD555, 0xD139, 0xD136, + 0xD5C9, 0xCA0E, 0xD224, 0xD226, 0xD5E4, 0xD2AB, 0xD2A8, 0xD2AA, + 0xCDD3, 0xD391, 0xD32A, 0xD3B2, 0xCE6F, 0xD40C, 0xD3D2, 0xD48A, + 0xCFEC, 0xD482, 0xD4FE, 0xD04F, 0xD0E3, 0xD579, 0xD574, 0xD171, + 0xD235, 0xD594, 0xCC23, 0xD2BC, 0xD2B9, 0xD627, 0xCDC4, 0xD339, + 0xD33B, 0xCED8, 0xCF41, 0xD3B4, 0xD437, 0xCFD9, 0xCFD6, 0xD4B0, + 0xD0D3, 0xD0D0, 0xD529, 0xD526, 0xD15C, 0xD182, 0xD568, 0xD5C0, + 0xD269, 0xD2CD, 0xD632, 0xCD3B, 0xD34D, 0xD348, 0xD6C7, 0xCF60, + 0xD3EC, 0xD444, 0xD05F, 0xD05A, 0xD462, 0xD4E3, 0xD0E6, 0xD113, + 0xD557, 0xD172, 0xD261, 0xD25C, 0xD5EA, 0xD2DF, 0xD2DC, 0xD362, + 0xCE4C, 0xD385, 0xD382, 0xD37D, 0xCFE9, 0xD3FB, 0xD47C, 0xD77B, + 0xD077, 0xD4EE, 0xD568, 0xD1F5, 0xD1F0, 0xD586, 0xD583, 0xD270, + 0xD2F6, 0xD291, 0xD616, 0xD689, 0xD395, 0xD397, 0xD6A7, 0xD009, + 0xD48D, 0xD48A, 0xD4B0, 0xD0F7, 0xD527, 0xD522, 0xD20C, 0xD207, + 0xD5B8, 0xD5B5, 0xD2B0, 0xD2AD, 0xD64B, 0xCED9, 0xD3AF, 0xD3AA, + 0xD6D7, 0xD001, 0xD447, 0xD449, 0xD11B, 0xD118, 0xD4DF, 0xD559, + 0xD226, 0xD2AC, 0xD577, 0xCDCD, 0xD2CA, 0xD349, 0xD679, 0xCF01, + 0xD3C2, 0xD3E8, 0xD022, 0xD0B4, 0xD4D7, 0xCAEE, 0xD137, 0xD1BD, + 0xD56F, 0xCCBE, 0xD2C4, 0xD266, 0xCE6D, 0xCF04, 0xD361, 0xD3E0, + 0xCF8E, 0xD020, 0xD3FE, 0xCA3A, 0xD138, 0xD135, 0xD50C, 0xCCC1, + 0xD1DC, 0xD260, 0xCD5E, 0xCE6B, 0xD302, 0xD304, 0xCF8F, 0xCFBC, + 0xD39F, 0xD049, 0xD0D4, 0xD0CF, 0xD4B2, 0xD1E0, 0xD17D, 0xD201, + 0xCD66, 0xD27D, 0xD2A3, 0xD29E, 0xCF2D, 0xCF28, 0xD3C2, 0xD043, + 0xD0CE, 0xD06B, 0xCB80, 0xD17A, 0xD177, 0xD1FB, 0xCD69, 0xD21E, + 0xD2A2, 0xCE99, 0xCF29, 0xD33B, 0xD361, 0xCFE1, 0xD06A, 0xD3FC, + 0xCB8A, 0xD116, 0xD19C, 0xD508, 0xCD6C, 0xD241, 0xD2C0, 0xCE9A, + 0xCEC7, 0xD35E, 0xD37F, 0xCFE2, 0xD06D, 0xD418, 0xCB8F, 0xD117, + 0xD13D, 0xD4D0, 0xCD76, 0xD264, 0xD2E3, 0xCEC6, 0xCF56, 0xD323, + 0xD3A0, 0xD00C, 0xD097, 0xD0BB, 0xD45A, 0xCCDE, 0xD162, 0xD1E4, + 0xCDA2, 0xCE3C, 0xD284, 0xD2AA, 0xCEF4, 0xCF82, 0xD3BE, 0xD031, + 0xD0BA, 0xD0E0, 0xCCE6, 0xCCE8, 0xD185, 0xD209, 0xCE3D, 0xCED2, + 0xD2C9, 0xCF86, 0xCFB1, 0xD03A, 0xD403, 0xCBB1, 0xD166, 0xD105, + 0xCD1E, 0xCDB3, 0xD22F, 0xCE73, 0xCF01, 0xCF8F, 0xD367, 0xC9C2, + 0xD039, 0xD0E6, 0xCC5D, 0xCC5F, 0xD189, 0xD1AF, 0xCDB9, 0xCE75, + 0xD276, 0xCF30, 0xCFB7, 0xCFDD, 0xD3AC, 0xCB25, 0xD10C, 0xD132, + 0xCD2D, 0xCDC7, 0xD1D5, 0xCE80, 0xCEAB, 0xCF32, 0xD336, 0xCA5A, + 0xD00A, 0xD093, 0xCC73, 0xCCA3, 0xD158, 0xD17E, 0xCDF6, 0xCE89, + 0xD29C, 0xCF3B, 0xCFED, 0xD011, 0xCB45, 0xCBE4, 0xD0DD, 0xD15F, + 0xCD41, 0xCE02, 0xD224, 0xCEB6, 0xCEE1, 0xCF68, 0xD303, 0xCAAC, + 0xD0BE, 0xD0E4, 0xCCB5, 0xCD4F, 0xD1A9, 0xD1CD, 0xCEC2, 0xCEE8, + 0xD306, 0xCA8F, 0xD043, 0xD040, 0xCBFD, 0xCCC3, 0xD133, 0xD1AE, + 0xCE3D, 0xCE38, 0xD295, 0xCF18, 0xCF9F, 0xCFC5, 0xD36D, 0xCC0B, + 0xD0B8, 0xD138, 0xCD8F, 0xCE44, 0xD21F, 0xCEFB, 0xCF1F, 0xCFCF, + 0xD2FE, 0xCC1C, 0xD099, 0xD0BD, 0xCD99, 0xCDC4, 0xD224, 0xD248, + 0xD267, 0xCF4F, 0xCFFD, 0xD31E, 0xD344, 0xD0C7, 0xD0ED, 0xD418, + 0xCDCD, 0xD24B, 0xD26F, 0xCF59, 0xCF7D, 0xD2D1, 0xD347, 0xD04E, + 0xD0F0, 0xD41B, 0xCDD7, 0xD1D5, 0xD1FB, 0xCF63, 0xCF89, 0xD2DB, + 0xD371, 0xD07A, 0xD09E, 0xD11E, 0xCD59, 0xCE0C, 0xD1FE, 0xCEE5, + 0xCF93, 0xCFB7, 0xD31F, 0xCC7E, 0xD0A8, 0xD14A, 0xCD8C, 0xCE18, + 0xD22A, 0xC95B, 0xCF13, 0xCFC1, 0xD327, 0xCC8F, 0xD0AB, 0xD0F8, + 0xCD96, 0xCE50, 0xD1DD, 0xC973, 0xCF46, 0xCFED, 0xD2D5, 0xCC07, + 0xD0DE, 0xD0FB, 0xCDA7, 0xCDCD, 0xD202, 0xC9B9, 0xCF77, 0xD020, + 0xCC16, 0xCCD3, 0xD108, 0xD127, 0xCDDA, 0xCE8D, 0xCEB1, 0xCA71, + 0xCF83, 0xCFCE, 0xCC27, 0xCC52, 0xCD36, 0xD153, 0xCE12, 0xCEC0, + 0xCEE4, 0xCB49, 0xCB79, 0xCFFA, 0xCC61, 0xCD17, 0xCD42, 0xD1A6, + 0xC99A, 0xCEF1, 0xCF15, 0xCAC1, 0xCC45, 0xD02B, 0xC619, 0xCD51, + 0xCE29, 0xD154, 0xC9E0, 0xCF24, 0xCF6F, 0xCB99, 0xCC84, 0xD079, + 0xC72B, 0xCDB0, 0xCE5C, 0xCE85, 0xCABD, 0xCF77, 0xCF9B, 0xCC93, + 0xCCB7, 0xCD94, 0xC82C, 0xCDE3, 0xCEB6, 0xCEDF, 0xCAFC, 0xCBE5, + 0xCFEE, 0xCCCB, 0xCD1B, 0xCDCC, 0xC91A, 0xCA19, 0xCEE7, 0xCF32, + 0xCBF9, 0xCCDD, 0xD041, 0xD103, 0xCE02, 0xCE26, 0xCEF9, 0xCB22, + 0xCF68, 0xD006, 0xCC5A, 0xCD37, 0xCD60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 0xCC0E, 0xC8D6, 0xC955, 0xCD58, 0xC509, + 0xCABD, 0xCB30, 0xC7AE, 0xC830, 0xC9BB, 0xCDB2, 0xCAAB, 0xCB1E, + 0xCB8F, 0xC84A, 0xC8C7, 0xCD03, 0xC578, 0xCB36, 0xCBA2, 0xC838, + 0xC8B5, 0xCCEF, 0xC568, 0xCB22, 0xCBBA, 0xC850, 0xC8CD, 0xC94A, + 0xCD8E, 0xC613, 0xCBCD, 0xCC39, 0xC8BB, 0xC962, 0xCDA1, 0xC601, + 0xCAC5, 0xCB5B, 0xC8D3, 0xC950, 0xC9F2, 0xC620, 0xC6A9, 0xCB73, + 0xC16F, 0xC968, 0xCA05, 0xCD6C, 0xC6C1, 0xCB86, 0xCC1E, 0xC878, + 0xC918, 0xCA90, 0xC6E0, 0xC762, 0xCC2F, 0xC890, 0xC932, 0xC9A8, + 0xC5A4, 0xC77F, 0xCB53, 0xC255, 0xC94A, 0xC9EC, 0xCA87, 0xC679, + 0xCB8B, 0xCC21, 0xC987, 0xC9FD, 0xCA9A, 0xC698, 0xC749, 0xCC59, + 0xC373, 0xCA3A, 0xCAD7, 0xC6E1, 0xC78B, 0xCC8F, 0xC392, 0xC954, + 0xC9F1, 0xC728, 0xC7AA, 0xC84F, 0xCC49, 0xC47D, 0xCA2E, 0xCAC9, + 0xC7EC, 0xC893, 0xCC81, 0xC4CB, 0xCA6B, 0xCB2B, 0xC830, 0xC8D5, + 0xC45E, 0xC519, 0xCACB, 0xCB61, 0xC89C, 0xC93C, 0xCCEA, 0xC567, + 0xCB2D, 0xCBBE, 0xC7A7, 0xC84E, 0xC8EE, 0xC5B5, 0xC66B, 0xCAE4, + 0xC213, 0xC8BA, 0xC955, 0xC62D, 0xC6DC, 0xCB44, 0xC26B, 0xC8F7, + 0xC9BC, 0xC674, 0xC74F, 0xC7F4, 0xCC55, 0xC3C3, 0xCA1C, 0xCADC, + 0xC7BB, 0xC860, 0xCBB4, 0xC445, 0xCAA8, 0xCACA, 0xC827, 0xC8F1, + 0xC93D, 0xC4C2, 0xC57D, 0xCA82, 0xC265, 0xC803, 0xC8CB, 0xC53F, + 0xC622, 0xCB09, 0xC2EC, 0xC899, 0xC95C, 0xCA1C, 0xC693, 0xC767, + 0xCBCE, 0xC496, 0xC9E8, 0xCAA1, 0xC730, 0xC7FD, 0xC8F1, 0xC511, + 0xCA6D, 0xCA20, 0xC7C4, 0xC8B8, 0xC951, 0xC5B8, 0xC6B9, 0xCA96, + 0xC191, 0xC7CA, 0xC8BC, 0xC4DB, 0xC5BE, 0xC6C4, 0xCBED, 0xC383, + 0xC970, 0xCA53, 0xC688, 0xC784, 0xCB64, 0xC432, 0xCA1A, 0xCAAE, + 0xC74B, 0xC83D, 0xC92A, 0xC50B, 0xC613, 0xCA43, 0xC28F, 0xC91B, + 0xC918, 0xC604, 0xC705, 0xCB12, 0xC377, 0xC834, 0xC944, 0xCA25, + 0xC747, 0xC735, 0xCB5E, 0xC5B9, 0xCA16, 0xCACF, 0xC6FC, 0xC816, + 0xCC3F, 0xC4B9, 0xCA2E, 0xCA69, 0xC809, 0xC917, 0xC9B0, 0xC5B7, + 0xC6E0, 0xCB79, 0xC327, 0xC90C, 0xC96A, 0xC6D1, 0xC815, 0xCB42, + 0xC852, 0xCCD0, 0xC6EC, 0xCAC9, 0xCAE1, 0xC868, 0xC99B, 0xCA52, + 0xC704, 0xC744, 0xCC0A, 0xC5A7, 0xC9D1, 0xCA0C, 0xC75F, 0xC897, + 0xC97D, 0xC53E, 0xC62E, 0xCB3F, 0xC453, 0xC8D4, 0xC914, 0xC621, + 0xC790, 0xC87B, 0xC375, 0xC4E4, 0xCA74, 0xC007, 0xC7D2, 0xC835, + 0xC501, 0xC657, 0xC774, 0xCB28, 0xC388, 0xC9A1, 0xC99E, 0xC6C1, + 0xC729, 0xCB16, 0xC53C, 0xC91D, 0xCA7D, 0xC76E, 0xC8C7, 0xC8CB, + 0xC583, 0xC61A, 0xCA70, 0xC414, 0xC845, 0xC9AF, 0xC65D, 0xC7EA, + 0xC7EE, 0xC431, 0xC4FC, 0xC99D, 0xC2B3, 0xC768, 0xC8FF, 0xC544, + 0xC70F, 0xC70C, 0xC2D0, 0xC3D9, 0xC8EF, 0xC16D, 0xC683, 0xC824, + 0xC450, 0xC623, 0xC625, 0xC0C3, 0xC2A2, 0xC83A, 0xC59A, 0xC597, + 0xC76F, 0xC323, 0xC539, 0xC96B, 0xBEA9, 0xC785, 0xC75F, 0xC4A6, + 0xC4A8, 0xC6B4, 0xC1E9, 0xC445, 0xC8BD, 0xBCE6, 0xC6CD, 0xC6A2, + 0xC3AD, 0xC3AF, 0xC5F7, 0xC9C1, 0xC347, 0xC832, 0xC80C, 0xC612, + 0xC5E7, 0xC7DB, 0xC2AE, 0xC537, 0xC93B, 0xC246, 0xC781, 0xC792, + 0xC550, 0xC525, 0xC723, 0xC1A3, 0xC892, 0xC88F, 0xC5D8, 0xC6C4, + 0xC72C, 0xC48B, 0xC460, 0xC994, 0xC08E, 0xC802, 0xC7FF, 0xC56A, + 0xC93F, 0xC1CA, 0xC7A8, 0xC856, 0xC5D5, 0xC5D2, 0xC774, 0xC32B, + 0xC4FA, 0xC8B4, 0xC0E7, 0xC71A, 0xC83D, 0xC544, 0xC519, 0xC6E6, + 0xC28B, 0xC4B4, 0xC869, 0xC035, 0xC68C, 0xC7FA, 0xC47F, 0xC495, + 0xC630, 0xC1B4, 0xC446, 0xC8DC, 0xBF7C, 0xC5FB, 0xC76E, 0xC3E4, + 0xC4A6, 0xC59F, 0xC105, 0xC3AB, 0xC858, 0xBEBE, 0xC563, 0xC6E0, + 0xC344, 0xC534, 0xC509, 0xC024, 0xC2DE, 0xC7CC, 0xBE39, 0xC5B5, + 0xC654, 0xC2A4, 0xC49E, 0xC473, 0xBF72, 0xC239, 0xC743, 0xBE56, + 0xC5C4, 0xC5C1, 0xC1FF, 0xC403, 0xC419, 0xBEB6, 0xC196, 0xC6B7, + 0xBE73, 0xC52E, 0xC5E6, 0xC683, 0xC368, 0xC4FC, 0xC8B1, 0xC11B, + 0xC770, 0xC76D, 0xC4C5, 0xC61D, 0xC5F2, 0xC2C8, 0xC48E, 0xC82F, + 0xC073, 0xC70C, 0xC7FE, 0xC431, 0xC58C, 0xC6B0, 0xC257, 0xC3F8, + 0xC8BB, 0xBFC1, 0xC680, 0xC79A, 0xC521, 0xC523, 0xC64C, 0xC38A, + 0xC387, 0xC834, 0xC17B, 0xC711, 0xC713, 0xC4BA, 0xC5E8, 0xC5BD, + 0xC2F1, 0xC459, 0xC8BE, 0xC100, 0xC6AD, 0xC7A4, 0xC424, 0xC557, + 0xC67B, 0xC280, 0xC3ED, 0xC837, 0xC08A, 0xC649, 0xC740, 0xC4EC, + 0xC4F0, 0xC617, 0xC384, 0xC381, 0xC8C3, 0xC1CF, 0xC6DF, 0xC7A9, + 0xBFD3, 0xBFD0, 0xC6AD, 0xBD32, 0xC44E, 0xC57F, 0xC160, 0xC2DC, + 0xC41C, 0xBF53, 0xC124, 0xC621, 0xBCA5, 0xC3E7, 0xC4F0, 0xC26E, + 0xC26B, 0xC3B0, 0xBED5, 0xC0AE, 0xC6B7, 0xBC18, 0xC4AD, 0xC5B1, + 0xC1FD, 0xC342, 0xC47B, 0xC038, 0xC1C1, 0xC64E, 0xBE16, 0xC54D, + 0xC54A, 0xC2D9, 0xC412, 0xC40F, 0xC17B, 0xC2CA, 0xC6BC, 0xBDCA, + 0xC4E6, 0xC5BD, 0xC268, 0xC3A6, 0xC4AF, 0xC10C, 0xC259, 0xC728, + 0xBF35, 0xC57A, 0xC651, 0xC33F, 0xC44B, 0xC548, 0xC1ED, 0xC308, + 0xC791, 0xC05A, 0xC5ED, 0xC6B8, 0xC3E2, 0xC4E4, 0xC5BB, 0xC2C7, + 0xC3D3, 0xC4B2, 0xC170, 0xC290, 0xC726, 0xBE34, 0xC47D, 0xC559, + 0xC256, 0xC36C, 0xC44D, 0xC101, 0xC221, 0xC6C4, 0xBF61, 0xC518, + 0xC5C5, 0xC300, 0xC40A, 0xC4E6, 0xC1E0, 0xC2CE, 0xC708, 0xC081, + 0xC589, 0xC631, 0xC3A3, 0xC482, 0xC557, 0xC288, 0xC371, 0xC76F, + 0xC138, 0xC5F5, 0xC69D, 0xC446, 0xC4F3, 0xC5C8, 0xC330, 0xC40F, + 0xC7B3, 0xC212, 0xC63E, 0xC7A7, 0xC4B7, 0xC564, 0xC6DA, 0xC3AD, + 0xC485, 0xC88E, 0xC2BA, 0xC74B, 0xC7EB, 0xC5D3, 0xC67B, 0xC71E, + 0xC444, 0xC5A1, 0xC8CD, 0xC335, 0xC791, 0xC82A, 0xC63F, 0xC6E2, + 0xC4B8, 0xC565, 0xC212, 0xC3D6, 0xC753, 0xC0EC, 0xC5E0, 0xC683, + 0xC456, 0xC508, 0xC5D6, 0xC372, 0xC44C, 0xC4F7, 0xC286, 0xC33D, + 0xBF41, 0xC06C, 0xC572, 0xBDF5, 0xC3E8, 0xC495, 0xC21A, 0xC2FC, + 0xC3B3, 0xC121, 0xC210, 0xC661, 0xBEF0, 0xC459, 0xC5AF, 0xC2C2, + 0xC377, 0xC4D7, 0xC1A6, 0xC28B, 0xC41B, 0xC0AB, 0xC19C, 0xC5F8, + 0xBE6D, 0xC49B, 0xC548, 0xC309, 0xC3B9, 0xC46B, 0xC156, 0xC2FA, + 0xBF2F, 0xC02D, 0xC58F, 0xBCD0, 0xBF25, 0xC4D8, 0xBB2E, 0xC293, + 0xC348, 0xC0E0, 0xC1A4, 0xC289, 0xBEE1, 0xC0AB, 0xC521, 0xBD97, + 0xC3C1, 0xC46C, 0xC165, 0xC302, 0xC38F, 0xC06C, 0xC216, 0xC2D0, + 0xBF64, 0xC05D, 0xC55E, 0xBE54, 0xC403, 0xC4AE, 0xC1D7, 0xC349, + 0xC01C, 0xC0E3, 0xC1A2, 0xBE12, 0xBFE7, 0xC4F3, 0xBCBE, 0xC2E2, + 0xC443, 0xC166, 0xC21E, 0xC2D8, 0xBFA3, 0xC131, 0xC1EE, 0xBE98, + 0xC063, 0xC535, 0xBD85, 0xC329, 0xC480, 0xC0F2, 0xC265, 0xC3CB, + 0xC021, 0xC1A3, 0xC5FA, 0xBF20, 0xC41E, 0xC54A, 0xBE10, 0xC36B, + 0xB92E, 0xC21F, 0xC2AC, 0xBFAB, 0xC072, 0xC1EF, 0xBED2, 0xBF9C, + 0xC460, 0xBCAC, 0xC323, 0xC3AB, 0xC0F3, 0xC266, 0xC2F3, 0xC022, + 0xC17E, 0xC236, 0xC36F, 0xBFEF, 0xC16F, 0xC5A1, 0xBF19, 0xC46E, + 0xBC1C, 0xC2AD, 0xC3BB, 0xC075, 0xC1EB, 0xC308, 0xBFA4, 0xC0FE, + 0xC271, 0xBEA0, 0xC034, 0xC488, 0xBDC2, 0xC378, 0xC3FB, 0xC17F, + 0xC2BB, 0xC348, 0xC0B5, 0xC205, 0xC28B, 0xBFE9, 0xC085, 0xBD74, + 0xBE48, 0xC394, 0xBB70, 0xC24F, 0xC302, 0xC06F, 0xC1BA, 0xC245, + 0xBFA0, 0xC03A, 0xC18A, 0xBDD1, 0xBF6B, 0xC455, 0xBCE9, 0xC296, + 0xC3A2, 0xC149, 0xC1DB, 0xC315, 0xBFF1, 0xC13F, 0xBD83, 0xBF1D, + 0xC07A, 0xBC9D, 0xBE4B, 0xC361, 0xBA87, 0xC21E, 0xC2A9, 0xC040, + 0xC0D0, 0xC214, 0xBF71, 0xC0C9, 0xC159, 0xBDCD, 0xBF67, 0xC401, + 0xBCEC, 0xC2EE, 0xC36F, 0xC118, 0xC233, 0xBF28, 0xC055, 0xC19C, + 0xBE56, 0xBFB6, 0xC0DE, 0xBCA0, 0xBEE9, 0xC38C, 0xBBB7, 0xC1ED, + 0xC2FC, 0xC00F, 0xC132, 0xC246, 0xBF42, 0xC098, 0xC4B2, 0xBEA0, + 0xBFD0, 0xC427, 0xBDC9, 0xC319, 0xBA69, 0xC17A, 0xC289, 0xBFBA, + 0xC0E2, 0xC1F9, 0xBEED, 0xC01D, 0xC444, 0xBD7D, 0xBF80, 0xC3B9, + 0xBD71, 0xC224, 0xC32E, 0xC073, 0xC18F, 0xC322, 0xC06C, 0xC183, + 0xC531, 0xBFCD, 0xC3D6, 0xBCFA, 0xBE67, 0xC34B, 0xBC46, 0xC25B, + 0xC2BB, 0xC39A, 0xC474, 0xC22B, 0xC30F, 0xC081, 0xC224, 0xC284, + 0xC075, 0xC191, 0xC512, 0xBFDB, 0xC045, 0xC491, 0xBE7A, 0xC352, + 0xC406, 0xC241, 0xC2C2, 0xC0C2, 0xC1AE, 0xC295, 0xBFFF, 0xC11B, + 0xC207, 0xBF62, 0xC086, 0xC423, 0xBEC0, 0xBFE9, 0xC417, 0xBE20, + 0xC2B4, 0xC391, 0xC13D, 0xC224, 0xBFAF, 0xC0A5, 0xC196, 0xBF14, + 0xC00D, 0xC127, 0xBE49, 0xBF70, 0xC3A9, 0xBD9D, 0xC267, 0xC3A2, + 0xBCF3, 0xC23A, 0xBA05, 0xC0BB, 0xC1A7, 0xBF2A, 0xC025, 0xC13F, + 0xBE8F, 0xBF8D, 0xC0AC, 0xBDEA, 0xBEF0, 0xC334, 0xBD45, 0xC1EF, + 0xBA66, 0xC072, 0xC1BD, 0xB9A5, 0xBFDA, 0xC12F, 0xBE13, 0xBFCE, + 0xC0C2, 0xBD6E, 0xBF38, 0xC02C, 0xBCC4, 0xBE96, 0xC2BC, 0xBC17, + 0xC1D5, 0xBA06, 0xC07C, 0xC147, 0xBEED, 0xBFEB, 0xC0DA, 0xBE52, + 0xBF4E, 0xC042, 0xBDAD, 0xBEB3, 0xC32B, 0xBD0A, 0xBEA9, 0xBA60, + 0xBBBA, 0xC158, 0xB8AF, 0xC001, 0xC151, 0xBE6F, 0xBF6B, 0xC0C0, + 0xBDCF, 0xBF5F, 0xC02D, 0xBD27, 0xBEC4, 0xC2B8, 0xBC7D, 0xC1CF, + 0xB9CD, 0xBBD5, 0xC162, 0xB909, 0xBFE7, 0xC0D6, 0xBE80, 0xBF7C, + 0xC0CF, 0xBDE0, 0xBEE1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, 0xB8D2, 0xBA30, 0xB6DC, 0xB8C6, 0xBA67, 0xB797, + 0xB907, 0xBDD2, 0xB78B, 0xB9B0, 0xB5CB, 0xB841, 0xBCF2, 0xB645, + 0xB80D, 0xBD26, 0xB6FE, 0xBC48, 0xB461, 0xB67F, 0xBC7F, 0xB4AA, + 0xBB9C, 0xBD11, 0xB527, 0xBBCE, 0xB244, 0xBAE8, 0xBC05, 0xB3BA, + 0xBB1F, 0xBBFB, 0xBA34, 0xBB1A, 0xB0F4, 0xB9C2, 0xBB4C, 0xB8CA, + 0xBA66, 0xBB83, 0xB906, 0xBA9D, 0xB796, 0xB942, 0xBAD4, 0xB847, + 0xB9E4, 0xBB0B, 0xB881, 0xBA1B, 0xB709, 0xB92A, 0xBA16, 0xB704, + 0xB8B8, 0xBA4D, 0xB7B3, 0xB95F, 0xB5B6, 0xB7F4, 0xB996, 0xB672, + 0xB8A0, 0xB9D0, 0xB72B, 0xB8DA, 0xB59E, 0xB76C, 0xB916, 0xB51C, + 0xB81B, 0xBCCC, 0xB5DD, 0xB857, 0xB436, 0xB696, 0xBC25, 0xB504, + 0xB6DA, 0xBC57, 0xB548, 0xBB7B, 0xB39E, 0xB609, 0xBBAD, 0xB46C, + 0xBACE, 0xBBE4, 0xB532, 0xBB63, 0xB214, 0xBA84, 0xBB9A, 0xB2F4, + 0xBAB6, 0xBBCC, 0xB924, 0xBAEB, 0xB16C, 0xBA04, 0xBB22, 0xB867, + 0xBA3E, 0xBB59, 0xB90C, 0xBA75, 0xB7A8, 0xB948, 0xBAA7, 0xB852, + 0xB9BE, 0xBADC, 0xB314, 0xB9FA, 0xBB13, 0xB365, 0xBA2F, 0xBBDF, + 0xB9AB, 0xBAC9, 0xB18C, 0xB9E0, 0xBB37, 0xB8F6, 0xBA17, 0xBB6C, + 0xB92B, 0xBA4E, 0xB788, 0xB967, 0xBABF, 0xB873, 0xB99C, 0xBAF6, + 0xB8AD, 0xBA14, 0xB770, 0xB8E7, 0xBAAC, 0xB7F0, 0xB9C5, 0xBB1A, + 0xB89A, 0xB9FA, 0xB79E, 0xB910, 0xBA31, 0xB7DB, 0xB94A, 0xB6DC, + 0xB817, 0xB981, 0xB71B, 0xB892, 0xB9F7, 0xB809, 0xB973, 0xB656, + 0xB843, 0xB9A8, 0xB695, 0xB87A, 0xB9DF, 0xB786, 0xB8F5, 0xB63E, + 0xB7C2, 0xB92F, 0xB6C1, 0xB8A6, 0xB9A5, 0xB700, 0xB921, 0xB66F, + 0xB7EE, 0xB956, 0xB6AE, 0xB869, 0xB5A7, 0xB72E, 0xB8A3, 0xB5E6, + 0xB81A, 0xB97F, 0xB6DC, 0xB856, 0xB519, 0xB75F, 0xB8CA, 0xB617, + 0xB799, 0xBC8C, 0xB69F, 0xB817, 0xB54F, 0xB78B, 0xB8F8, 0xB648, + 0xB7C5, 0xBC55, 0xB687, 0xB840, 0xB580, 0xB70A, 0xBC10, 0xB5BF, + 0xB788, 0xB464, 0xB6F9, 0xBB6D, 0xB5B1, 0xB736, 0xBBD6, 0xB5F0, + 0xB7B4, 0xB49A, 0xB72A, 0xBBC8, 0xB5E4, 0xB7A8, 0xBC2F, 0xB66A, + 0xBB25, 0xB51C, 0xB6A4, 0xBB91, 0xB559, 0xBB17, 0xBBFA, 0xB696, + 0xBB83, 0xB54D, 0xB719, 0xBBEC, 0xB5D3, 0xBADD, 0xBC53, 0xB656, + 0xB80B, 0xB9A8, 0xB745, 0xB886, 0xBCC7, 0xB7FF, 0xB8FA, 0xBD29, + 0xB878, 0xB96E, 0xB705, 0xB8EC, 0xB9DF, 0xB82B, 0xB962, 0xB6F7, + 0xB8DE, 0xB9D1, 0xB775, 0xB954, 0xBA3F, 0xB82D, 0xB9C5, 0xB767, + 0xB8A1, 0xBA31, 0xB7E0, 0xB917, 0xB756, 0xB893, 0xB986, 0xB7D2, + 0xB909, 0xB69B, 0xB887, 0xB978, 0xB719, 0xB8FB, 0xBA23, 0xB7D4, + 0xB96C, 0xB70B, 0xB84A, 0xB97A, 0xB789, 0xB8FD, 0xB6FD, 0xB83C, + 0xB96C, 0xB77B, 0xB8EF, 0xBA17, 0xB82E, 0xB960, 0xB6C2, 0xB8E1, + 0xBA0B, 0xB77D, 0xB952, 0xB092, 0xB830, 0xB960, 0xB76F, 0xB8A4, + 0xB081, 0xB822, 0xB954, 0xB24D, 0xB8D5, 0xB9FD, 0xB816, 0xB946, + 0xB16C, 0xB8C9, 0xB9F1, 0xB2D4, 0xB8D7, 0xB160, 0xB3B1, 0xB982, + 0xB1F9, 0xB8CB, 0xBA28, 0xB3A5, 0xB974, 0xB1ED, 0xB478, 0xBA1A, + 0xB397, 0xB968, 0xB1E1, 0xB46C, 0xB976, 0xB3D2, 0xB534, 0xBA56, + 0xB4A2, 0xB9A4, 0xB2B5, 0xB56A, 0xBA48, 0xB3D9, 0xB62D, 0xB2F5, + 0xB55C, 0xB6EB, 0xB3CD, 0xB61F, 0xB2E7, 0xB49D, 0xB71E, 0xB3C1, + 0xB563, 0xB72C, 0xB4D3, 0xB665, 0xB3FA, 0xB599, 0xB720, 0xB4C5, + 0xB659, 0xB3EE, 0xB5CF, 0xB751, 0xB500, 0xB68D, 0xB841, 0xB5C3, + 0xB782, 0xB851, 0xB5D1, 0xB792, 0xB502, 0xB6CE, 0xB87D, 0xB607, + 0xB7C3, 0xB53D, 0xB6FF, 0xB8AB, 0xB63D, 0xB7F4, 0xB8BE, 0xB732, + 0xB829, 0xB66E, 0xB7A9, 0xB8EA, 0xB6E5, 0xB830, 0xB0D9, 0xB776, + 0xB918, 0xB6B4, 0xB861, 0xB11C, 0xB7A2, 0xB8D0, 0xB24E, 0xB850, + 0xB15F, 0xB370, 0xB8D7, 0xB28E, 0xB822, 0xB9B5, 0xB3AB, 0xB93D, + 0xB2CC, 0xB4BB, 0xB94D, 0xB3E4, 0xB510, 0xB1F8, 0xB43E, 0xB610, + 0xB31A, 0xB546, 0xB236, 0xB474, 0xB680, 0xB39D, 0xB5B9, 0xB6F7, + 0xB4AA, 0xB6B1, 0xB3D8, 0xB5EF, 0xB701, 0xB525, 0xB641, 0xB453, + 0xB577, 0xB76C, 0xB490, 0xB6AF, 0xB391, 0xB5AD, 0xB760, 0xB4E3, + 0xB71F, 0xAD7F, 0xB620, 0xB76C, 0xB556, 0xB670, 0xB850, 0xB612, + 0xB7D5, 0xAFD5, 0xB6E0, 0xB81F, 0xB15F, 0xB752, 0xB06D, 0xB318, + 0xB885, 0xB1EC, 0xB7D0, 0xB0B0, 0xB351, 0xB842, 0xB274, 0xB3ED, + 0xB020, 0xB2CE, 0xB575, 0xB1A2, 0xB468, 0xB5C7, 0xB351, 0xB527, + 0xB274, 0xB4E3, 0xB677, 0xB411, 0xB575, 0xB2F7, 0xB466, 0xB66B, + 0xB3C0, 0xB625, 0xB330, 0xB520, 0xB672, 0xB411, 0xB5B2, 0xB726, + 0xB554, 0xB6E0, 0xB4CE, 0xB662, 0xB7A4, 0xB560, 0xB6EC, 0xADEB, + 0xB656, 0xB437, 0xB610, 0xB755, 0xB54D, 0xB69A, 0xB443, 0xB59D, + 0xB724, 0xB53F, 0xB6CB, 0xAE7A, 0xB685, 0xB7C7, 0xB100, 0xB70F, + 0xAF6C, 0xB1D7, 0xB7CE, 0xB186, 0xB740, 0xB09E, 0xB2C1, 0xB7FA, + 0xB14D, 0xB3CA, 0xB045, 0xB381, 0xB523, 0xB264, 0xB45D, 0xB62F, + 0xB34B, 0xB4EF, 0xB29D, 0xB491, 0xB5E6, 0xB448, 0xB5A2, 0xB338, + 0xB51C, 0xB6A4, 0xB3FA, 0xB5EB, 0xB3B3, 0xB50E, 0xB6AD, 0xB50C, + 0xB61A, 0xAD8B, 0xB613, 0xB716, 0xB06A, 0xB6D5, 0xAF27, 0xB1F0, + 0xB794, 0xB02E, 0xB2D7, 0xAF6D, 0xB22E, 0xB3E0, 0xB1E2, 0xB397, + 0xB068, 0xB309, 0xB4F0, 0xB18C, 0xB3E8, 0xB5BA, 0xB2FD, 0xB4FC, + 0xB2FB, 0xB45E, 0xB640, 0xB415, 0xB52B, 0xB307, 0xB524, 0xB632, + 0xB421, 0xB5EE, 0xACFA, 0xB56D, 0xB6B0, 0xAF97, 0xB66F, 0xAF3E, + 0xB561, 0xB731, 0xB0D7, 0xB67B, 0xAEE2, 0xB253, 0xB7AA, 0xB113, + 0xB3B7, 0xB0C4, 0xB28C, 0xB4C9, 0xB240, 0xB3A6, 0xB591, 0xB362, + 0xB54D, 0xB2D6, 0xB437, 0xB612, 0xB430, 0xB519, 0xB30A, 0xB4FD, + 0xB693, 0xB479, 0xB5C7, 0xB3DB, 0xB583, 0xB711, 0xB4AD, 0xB646, + 0xAEB8, 0xB602, 0xB750, 0xB0B9, 0xB6C4, 0xB04D, 0xB2F8, 0xB7C9, + 0xB1CA, 0xB3D2, 0xB5B0, 0xB349, 0xB49D, 0xB636, 0xB49B, 0xB62F, + 0xAE5D, 0xB526, 0xB6B4, 0xB0D4, 0xB673, 0xAF3B, 0xB206, 0xB6F8, + 0xB1FD, 0xB33B, 0xB079, 0xB2DA, 0xB48B, 0xB293, 0xB3C7, 0xB162, + 0xB36B, 0xB50F, 0xB324, 0xB4CD, 0xB240, 0xB434, 0xB593, 0xB3F0, + 0xB58C, 0xADC8, 0xB4BD, 0xB614, 0xAF68, 0xB5D5, 0xAF16, 0xB195, + 0xB658, 0xB059, 0xB275, 0xB052, 0xB26E, 0xB422, 0xB13F, 0xB306, + 0xB138, 0xB2FF, 0xB4AB, 0xB21B, 0xB427, 0xB1D1, 0xB38B, 0xB4ED, + 0xB384, 0xB4EB, 0xABD3, 0xB417, 0xB571, 0xAF43, 0xB56A, 0xAD99, + 0xB036, 0xB67A, 0xB034, 0xB5AE, 0xAEE5, 0xB204, 0xB6B9, 0xB0D0, + 0xB377, 0xB0C9, 0xB298, 0xB402, 0xB291, 0xB3FE, 0xB1AA, 0xB324, + 0xB514, 0xB31B, 0xB445, 0xB23E, 0xB43E, 0xB55B, 0xB367, 0xB554, + 0xADC4, 0xB4C2, 0xB65F, 0xAFC2, 0xB59D, 0xAFC0, 0xB198, 0xB6A3, + 0xB191, 0xB30B, 0xB0A4, 0xB304, 0xB42C, 0xB225, 0xB425, 0xB1DB, + 0xB34E, 0xB53B, 0xB34C, 0xB46C, 0xB26D, 0xB46A, 0xB57F, 0xB393, + 0xB540, 0xAEA7, 0xB4AC, 0xB649, 0xB090, 0xB5BD, 0xAF9B, 0xB20C, + 0xB68B, 0xB1C7, 0xB337, 0xB120, 0xB333, 0xB458, 0xB256, 0xB414, + 0xB5B4, 0xB689, 0xB16D, 0xB680, 0xB166, 0xB29E, 0xB454, 0xB297, + 0xB44D, 0xB1F5, 0xB3B8, 0xB523, 0xB3B4, 0xB494, 0xB2DC, 0xB48D, + 0xAD6E, 0xB3FB, 0xB563, 0xB013, 0xB55A, 0xAF19, 0xB14F, 0xB628, + 0xB14B, 0xB27E, 0xB05E, 0xB27C, 0xB3F2, 0xB275, 0xB35D, 0xB193, + 0xB359, 0xB4C7, 0xB2BF, 0xB435, 0xAD5A, 0xB42E, 0xB591, 0xAFF5, + 0xB502, 0xAF00, 0xB134, 0xB61E, 0xB12D, 0xB2BB, 0xB045, 0xB21E, + 0xB03E, 0xB217, 0xB393, 0xB17A, 0xB2FE, 0xAA45, 0xB2F7, 0xB468, + 0xAD91, 0xB3D3, 0xAD8A, 0xAFDF, 0xB535, 0xAFD8, 0xB1B4, 0xAEE0, + 0xB0D4, 0xB331, 0xB0CD, 0xB297, 0xB025, 0xB1FC, 0xB3CB, 0xB1B5, + 0xB371, 0xAC03, 0xB32F, 0xB49B, 0xAE74, 0xB494, 0xAE70, 0xB067, + 0xAD6F, 0xB060, 0xB1F4, 0xAF72, 0xB152, 0xAEC5, 0xB14B, 0xB2CF, + 0xB0AB, 0xB2C8, 0xA8C7, 0xB230, 0xB3F5, 0xACFE, 0xB365, 0xABE8, + 0xAF0C, 0xB48A, 0xAF05, 0xB0A7, 0xAE52, 0xB0A5, 0xB22A, 0xAFFD, + 0xB228, 0xAFF6, 0xB18B, 0xB358, 0xB184, 0xB300, 0xAB6F, 0xB2BE, + 0xAA46, 0xAD9E, 0xB3EB, 0xAD97, 0xB038, 0xACDE, 0xAF90, 0xB180, + 0xAF8E, 0xB123, 0xAE9D, 0xB0DE, 0xB2EF, 0xB0D7, 0xB259, 0xA9C5, + 0xB255, 0xB389, 0xAD26, 0xAF8A, 0xB4F7, 0xAF83, 0xB11B, 0xAED8, + 0xB114, 0xB2E4, 0xB10D, 0xB24F, 0xB06F, 0xB248, 0xB37C, 0xB241, + 0xB375, 0xAD67, 0xB336, 0xAC5E, 0xAF18, 0xB456, 0xAF11, 0xB105, + 0xAE66, 0xB067, 0xB23D, 0xB060, 0xB239, 0xAFBD, 0xB1A3, 0xB32B, + 0xB19C, 0xB324, 0xABE5, 0xB2CF, 0xABE3, 0xAE60, 0xB3BC, 0xAE59, + 0xB055, 0xADAB, 0xB051, 0xB227, 0xAFB0, 0xB18F, 0xAFA9, 0xB18D, + 0xB313, 0xB186, 0xB2BB, 0xAC27, 0xAE97, 0xB3F6, 0xAE4C, 0xB04B, + 0xADE7, 0xB044, 0xAD97, 0xAFE4, 0xB182, 0xAF9A, 0xB17B, 0xAF3A, + 0xB177, 0xB2FD, 0xAC1F, 0xB26A, 0xABB1, 0xAE88, 0xB3DE, 0xAE81, + 0xB035, 0xADD3, 0xB02E, 0xADD1, 0xAFCE, 0xB1C0, 0xAF86, 0xB165, + 0xA8DC, 0xB123, 0xB2AE, 0xAC5E, 0xB2A7, 0xABA2, 0xAE74, 0xB392, + 0xAE6D, 0xB021, 0xAE69, 0xB01A, 0xB1B1, 0xB016, 0xB1AC, 0xB00F, + 0xB1A5, 0xA930, 0xB10F, 0xB2E9, 0xAC4F, 0xAEC6, 0xAC48, 0xAEBF, + 0xB0FD, 0xAE5C, 0xB064, 0xAE57, 0xB05D, 0xB1EE, 0xB05B, 0xB1EA, + 0xAFFB, 0xB1A5, 0xAA42, 0xAD9E, 0xB2E6, 0xACED, 0xAF51, 0xACE6, + 0xAF4A, 0xB13D, 0xAEA9, 0xB0A9, 0xAEA2, 0xB0A2, 0xB27A, 0xB09B, + 0xAE99, 0xB097, 0xB1E5, 0xAAF5, 0xB1DE, 0xAAF3, 0xAD88, 0xB318, + 0xAD3B, 0xAF92, 0xACD0, 0xAF90, 0xB13D, 0xAEEF, 0xB0E0, 0xAEE8, + 0xB0DE, 0xA87D, 0xB0D7, 0xB271, 0xAC0C, 0xAED8, 0xAC05, 0xAE34, + 0xB035, 0xAE2D, 0xB02E, 0xAE2B, 0xB02C, 0xADC3, 0xB025, 0xB174, + 0xAA0D, 0xB16D, 0xAA06, 0xAD10, 0xB26E, 0xAD09, 0xAF77, 0xAD02, + 0xAF19, 0xB0C9, 0xAED6, 0xB0C5, 0xAECF, 0xB0BE, 0xA852, 0xB027, + 0xB1C7, 0xAC41, 0xAE63, 0xAB8A, 0xAE5C, 0xB017, 0xADB8, 0xB013, + 0xADB3, 0xB00C, 0xA6D9, 0xAF72, 0xB118, 0xAA4C, 0xB116, 0xAA45, + 0xAD9C, 0xB29D, 0xACF5, 0xAF5E, 0xACEE, 0xAF57, 0xB0FD, 0xAF50, + 0xB0A7, 0xAEB6, 0xB067, 0xA967, 0xACD9, 0xB244, 0xACD5, 0xAEA6, + 0xAC28, 0xAE9F, 0xB050, 0xAE98, 0xB049, 0xAE96, 0xB009, 0xA806, + 0xB002, 0xB19D, 0xAAF5, 0xB196, 0xAAF3, 0xADE2, 0xAFF2, 0xADDD, + 0xAFEB, 0xADD9, 0xAFE9, 0xB149, 0xAF8E, 0xB142, 0xAAD7, 0xB13D, + 0xAA1A, 0xAD24, 0xB286, 0xAD1D, 0xAF3B, 0xAD1B, 0xAF34, 0xB09C, + 0xAF32, 0xB09A, 0xAF2B, 0xB093, 0xA9FA, 0xB0E0, 0xB230, 0xAC5A, + 0xAEDA, 0xAC55, 0xAED8, 0xB043, 0xAED1, 0xB03C, 0xAECA, 0xB03A, + 0xAEC8, 0xAC9D, 0xAE6A, 0xAC9B, 0xAE24, 0xB079, 0xAE20, 0xB023, + 0xA845, 0xABE5, 0xB18A, 0xABDE, 0xAE67, 0xABDC, 0xAE62, 0xABD5, + 0xAE5E, 0xB020, 0xADC1, 0xB019, 0xA896, 0xAB7E, 0xB131, 0xAB77, + 0xAE08, 0xAB75, 0xAE06, 0xAB6E, 0xADFF, 0xAFC2, 0xADF8, 0xAFBD, + 0xA7AF, 0xAFB9, 0xB114, 0xABBB, 0xADA9, 0xABB9, 0xADA2, 0xAB09, + 0xADA0, 0xAFBA, 0xADF3, 0xAFB3, 0xA808, 0xAFB1, 0xB10A, 0xAB54, + 0xB0CA, 0xAB4F, 0xAD9D, 0xAB4B, 0xAD96, 0xAF61, 0xAD94, 0xAFAE, + 0xADE4, 0xAFA7, 0xB0C7, 0xAAEF, 0xB111, 0xAAED, 0xAD7D, 0xAB48, + 0xAD37, 0xAF57, 0xAD8C, 0xAFA4, 0xAD85, 0xAFA2, 0xA852, 0xAB95, + 0xB107, 0xAB8E, 0xADCF, 0xAAE3, 0xAD73, 0xAFA1, 0xAD87, 0xAF9A, + 0xAD80, 0xAF98, 0xA7E7, 0xAF3F, 0xB0FD, 0xABE8, 0xADCA, 0xABE6, + 0xADC5, 0xAF99, 0xAD7F, 0xAF95, 0xADD2, 0xAF8E, 0xA910, 0xAF50, + 0xB0F3, 0xABE8, 0xAE19, 0xAC3E, 0xADC0, 0xAFE1, 0xADCF, 0xAF8D, + 0xAE24, 0xAF9C, 0xA910, 0xAFE9, 0xB14B, 0xAC3D, 0xB147, 0xAC3B, + 0xAE28, 0xAFA0, 0xAE21, 0xAFE8, 0xAE71, 0xB033, 0xAE6A, 0xAFDF, + 0xB141, 0xAC97, 0xB155, 0xACEA, 0xAE75, 0xB29D, 0xAEC0, 0xB030, + 0xAE67, 0xAC96, 0xAE7B, 0xACEE, 0xAEC8, 0xB085, 0xAEC4, 0xB031, + 0xAA96, 0xAC9C, 0xAAF1, 0xACF2, 0xAECC, 0xAD42, 0xAF17, 0xAD40, + 0xAF13, 0xB044, 0xAED2, 0xB08C, 0xABB2, 0xADA0, 0xABAB, 0xAD99, + 0xAF14, 0xAD92, 0xAF28, 0xADA6, 0xAF73, 0xA930, 0xAC09, 0xB0E4, + 0xAC07, 0xAD98, 0xABC1, 0xAE01, 0xAC14, 0xAE4C, 0xAF6D, 0xA9FC, + 0xAFCE, 0xA995, 0xAC1F, 0xAA0E, 0xAC72, 0xAE50, 0xACC8, 0xAE4E, + 0xACC3, 0xAEAF, 0xA76C, 0xAA77, 0xB029, 0xAB32, 0xAD23, 0xAB2B, + 0xAD1C, 0xAB26, 0xAD85, 0xAEFE, 0xA8B3, 0xAF0F, 0xA979, 0xAB8E, + 0xA912, 0xAB87, 0xADDB, 0xABF8, 0xAD82, 0xA656, 0xADE8, 0xAF5E, + 0xA9E0, 0xAC5B, 0xA9D9, 0xAC56, 0xAA50, 0xAC4F, 0xAE3E, 0xACBB, + 0xAE52, 0xA7A9, 0xAE9D, 0xA7C0, 0xAB13, 0xAD6D, 0xAB11, 0xAD14, + 0xAB80, 0xAD28, 0xA436, 0xAD78, 0xAF4F, 0xA962, 0xABE3, 0xA960, + 0xABDE, 0xA9D7, 0xABDC, 0xADCC, 0xAC48, 0xAE32, 0xA790, 0xAA9F, + 0xA720, 0xAA9D, 0xACA8, 0xAA96, 0xACA1, 0xAB05, 0xAD0A, 0xA51E, + 0xAD03, 0xAE90, 0xA8E6, 0xAB6D, 0xA8DF, 0xAB66, 0xAD79, 0xAC2C, + 0xADC4, 0xABD0, 0xADC0, 0xA779, 0xAA26, 0xAF53, 0xAA1F, 0xAC9E, + 0xAAEE, 0xAC99, 0xAE2C, 0xACAB, 0xAE8D, 0xA8CF, 0xAB56, 0xA8C8, + 0xAB6A, 0xAD5D, 0xABBB, 0xAD59, 0xAB77, 0xADBF, 0xA764, 0xAA0D, + 0xAF4B, 0xAA08, 0xAC87, 0xAA7C, 0xAC2B, 0xAA78, 0xAC94, 0xAE85, + 0xA8BD, 0xAE83, 0xA8B6, 0xAB51, 0xA92D, 0xAB4C, 0xAD53, 0xABB6, + 0xADB7, 0xA752, 0xA99B, 0xA6E2, 0xAA6A, 0xAC84, 0xAA08, 0xAC7D, + 0xAAD4, 0xACE6, 0xA560, 0xA840, 0xAE7D, 0xA91D, 0xABA8, 0xA91B, + 0xABA6, 0xA98D, 0xAC0D, 0xADB4, 0xA740, 0xADAF, 0xA7BD, 0xAA6C, + 0xA7BB, 0xAA67, 0xAC7C, 0xAAD6, 0xACE3, 0xA5C4, 0xAD47, 0xA649, + 0xA97F, 0xABAA, 0xA97D, 0xAC11, 0xA9EF, 0xAC0A, 0xA3B0, 0xAC73, + 0xAE12, 0xA88F, 0xAACB, 0xA82A, 0xAB32, 0xA902, 0xAB30, 0xAD48, + 0xAB9A, 0xAD44, 0xA72C, 0xA9E1, 0xA811, 0xAA53, 0xAC10, 0xAABF, + 0xAC77, 0xAAB8, 0xACDB, 0xA623, 0xA8F4, 0xAE81, 0xA96B, 0xABF5, + 0xA9DD, 0xABA0, 0xAA47, 0xAC07, 0xADA4, 0xA79B, 0xADB8, 0xA87B, + 0xAB1E, 0xA8ED, 0xAB32, 0xACDA, 0xAB2B, 0xAD3E, 0xA782, 0xA9CF, + 0xA71A, 0xAA3C, 0xAC60, 0xAAA8, 0xAC74, 0xAABF, 0xAC6D, 0xA618, + 0xA95B, 0xAE79, 0xA954, 0xAB89, 0xA9C6, 0xABF0, 0xAA35, 0xAC04, + 0xAA47, 0xAC68, 0xA5FA, 0xA8E0, 0xAE0F, 0xA952, 0xAB84, 0xA9C4, + 0xABEB, 0xAA2E, 0xAB94, 0xA477, 0xA7ED, 0xADA9, 0xA867, 0xAAAA, + 0xA8D9, 0xAB14, 0xA94B, 0xAB7B, 0xAD34, 0xA6F4, 0xAA27, 0xA771, + 0xAA3E, 0xA7E6, 0xAAA8, 0xAC67, 0xAB0D, 0xACC9, 0xA677, 0xA942, + 0xA6F4, 0xAA23, 0xABEF, 0xA9C6, 0xABE8, 0xAA35, 0xAC65, 0xA5D9, + 0xA8CE, 0xA6DB, 0xA940, 0xAB18, 0xA9AD, 0xABE8, 0xA4CE, 0xABE6, + 0xA554, 0xA85C, 0xAA98, 0xA8CE, 0xAAFF, 0xA93E, 0xAB13, 0xA3B6, + 0xA754, 0xAD42, 0xA843, 0xAA29, 0xA8B5, 0xAA93, 0xA8CC, 0xAAFD, + 0xA288, 0xA6D7, 0xACDC, 0xA752, 0xAA13, 0xA7C7, 0xAA27, 0xA8B3, + 0xAAFD, 0xAC64, 0xA6C1, 0xA937, 0xA6D8, 0xA9A4, 0xA750, 0xA9B8, + 0xABEC, 0xAA91, 0xABFB, 0xA644, 0xA8C8, 0xA6C1, 0xA935, 0xAB6F, + 0xAA11, 0xAB83, 0xAA25, 0xABE5, 0xA5C4, 0xA8AF, 0xA644, 0xA91C, + 0xAB6F, 0xA9A2, 0xAB83, 0xA4A5, 0xABE5, 0xA5B0, 0xA83D, 0xAA88, + 0xA91F, 0xAB03, 0xA933, 0xAB6A, 0xA422, 0xABE5, 0xAD37, 0xA83D, + 0xAA88, 0xA8AD, 0xAA9C, 0xA91F, 0xAB68, 0xACD8, 0xA7B4, 0xAD37, + 0xA829, 0xAA88, 0xA840, 0xAA9C, 0xA91F, 0xAB01, 0xAC74, 0xA7A0, + 0xAA0A, 0xAB8B, 0xA59F, 0xABED, 0xA69C, 0xA91F, 0xA6B3, 0xA98C, + 0x9F0C, 0xAA0A, 0xAB8B, 0xA5A4, 0xA89E, 0xA6A1, 0xA8B0, 0xA714, + 0xA98C, 0xAB10, 0xA50F, 0xAB8B, 0xA612, 0xA89E, 0xA624, 0xA8B0, + 0xA719, 0xA98C, 0xAB10, 0xA4FB, 0xA818, 0xA595, 0xA89E, 0xA68D, + 0xA90B, 0xAB01, 0xA98C, 0xAB77, 0xA583, 0xA81A, 0xA59A, 0xA8A3, + 0xA692, 0xA90E, 0xAB01, 0xA4EE, 0xAB77, 0xA588, 0xA88F, 0xA603, + 0xA8A3, 0xAA9C, 0xA90E, 0xAB01, 0xA4F3, 0xA80B, 0xA58D, 0xA891, + 0xA685, 0xA8A3, 0xAA9C, 0xA4E1, 0xAB15, 0xA4FB, 0xA810, 0xA5F6, + 0xA894, 0xAA8D, 0xA915, 0xAB03, 0xA4E9, 0xA7A0, 0xA580, 0xA810, + 0xA676, 0xA894, 0xAA8D, 0xA984, 0xAB03, 0xA56E, 0xA817, 0xA585, + 0xA82E, 0xAA8F, 0xA903, 0xAB05, 0xA4DC, 0xAB7B, 0xA5F3, 0xA889, + 0xA60A, 0xA90A, 0xAA8F, 0xA921, 0xAB05, 0xA561, 0xA808, 0xA670, + 0xA889, 0xAA91, 0xA90D, 0xAB0A, 0xA4EB, 0xAB19, 0xA5E6, 0xA890, + 0xA675, 0xA914, 0xAAAA, 0xA98D, 0xAB20, 0xA570, 0xA80F, 0xA607, + 0xA893, 0xAA96, 0xA914, 0xAB0C, 0xA992, 0xAB20, 0xA66D, 0xA89A, + 0xA6F7, 0xA91B, 0xAB13, 0xA994, 0xAB22, 0xA5E3, 0xAB98, 0xA689, + 0xA4C1, 0xAAAE, 0xAC2B, 0xA80E, 0xAA17, 0xA88D, 0xAA26, 0xA90E, + 0xAA9F, 0xA4C6, 0xA78A, 0xA9B2, 0xA827, 0xAA2B, 0xA910, 0xAAA1, + 0xA550, 0xA7FE, 0xA5E2, 0xA815, 0xAA2F, 0xA8AD, 0xAAA8, 0xA4C0, + 0xAB19, 0xA5E9, 0xA887, 0xA6EB, 0xA89B, 0xAAAA, 0xA930, 0xAB1E, + 0xA5D7, 0xA88E, 0xA67D, 0xA8A2, 0xA779, 0xA91E, 0xAB22, 0xA5E1, + 0xA828, 0xA66B, 0xA911, 0xA77E, 0xA923, 0xA254, 0xA660, 0xAB4C, + 0xA6EA, 0xA913, 0xA6FC, 0xA92A, 0xA2E7, 0xA9B7, 0xA38A, 0xA6F1, + 0xA91A, 0xA703, 0xA92C, 0xA810, 0xA9BE, 0xA417, 0xA6F6, 0xA4AC, + 0xA77A, 0xA933, 0xA815, 0xA9C0, 0xA49F, 0xA6FD, 0xA4B6, 0xA781, + 0xA5DA, 0xA81C, 0xA9C5, 0xA4AB, 0xA704, 0xA53B, 0xA78B, 0xA659, + 0xA823, 0xA03A, 0xA4B5, 0xAA56, 0xA545, 0xA813, 0xA660, 0xA825, + 0xA0E3, 0xA922, 0xA23F, 0xA551, 0xA818, 0xA66A, 0xA8AD, 0xA705, + 0xA929, 0xA2D2, 0xA65A, 0xA40A, 0xA66F, 0xA8B2, 0xA70F, 0xA944, + 0xA360, 0xA664, 0xA419, 0xA6FF, 0xA53B, 0xA781, 0xA946, 0xA409, + 0xA9D3, 0xA49C, 0xA706, 0xA545, 0xA79F, 0xA025, 0xA834, 0xAA50, + 0xA53A, 0xA794, 0xA5DB, 0xA827, 0xA665, 0xA83B, 0xA21D, 0xA541, + 0xA796, 0xA5E5, 0xA82E, 0xA6F3, 0xA8BE, 0xAA6D, 0xA5DA, 0xA821, + 0xA678, 0xA8B1, 0xA711, 0xA8D9, 0xA35A, 0xA66B, 0xA40E, 0xA706, + 0xA8CC, 0xA79C, 0xA95C, 0xA401, 0xA672, 0xA4AD, 0xA70D, 0xA551, + 0xA7A3, 0xA974, 0xA4A2, 0xA9FC, 0xA546, 0xA796, 0xA5E7, 0xA7BE, + 0xA15D, 0xA536, 0xA2C2, 0xA5D7, 0xA7B1, 0xA675, 0xA844, 0xA2B2, + 0xA8EA, 0xA369, 0xA66D, 0xA413, 0xA703, 0xA8DD, 0xA72E, 0xA968, + 0xA408, 0xA688, 0xA4AF, 0xA721, 0x9F51, 0xA7B4, 0xA162, 0xA4A4, + 0xA716, 0xA5D2, 0xA7A9, 0xA670, 0xA850, 0xA217, 0xA53B, 0xA2CC, + 0xA5F5, 0xA843, 0xA68E, 0xA86B, 0xA2C1, 0xA5E5, 0xA406, 0xA683, + 0xA4AF, 0xA730, 0xA902, 0xA3FB, 0xA608, 0xA49F, 0xA725, 0xA55F, + 0xA7B6, 0xA0B1, 0xA41E, 0xA217, 0xA54F, 0xA743, 0xA5F0, 0xA7EA, + 0xA20C, 0xA544, 0xA359, 0xA5F9, 0xA403, 0xA692, 0xA881, 0xA34C, + 0xA5EC, 0xA40F, 0xA685, 0xA543, 0xA72F, 0x9FF0, 0xA404, 0xA15F, + 0xA4AB, 0xA6BC, 0xA5ED, 0xA7CE, 0xA1F5, 0xA4B7, 0xA2AA, 0xA556, + 0xA373, 0xA68D, 0xA7FD, 0xA220, 0xA89F, 0xA3F8, 0xA5FE, 0xA42B, + 0xA6AD, 0x9FE0, 0xA374, 0xA14A, 0xA4AB, 0xA6B9, 0xA563, 0xA75E, + 0xA5FC, 0xA7F1, 0xA6A9, 0xA890, 0xA35E, 0xA608, 0xA4AC, 0xA6B5, + 0xA564, 0xA75F, 0xA143, 0xA42B, 0xA6A8, 0xA4E3, 0xA752, 0xA604, + 0xA78E, 0xA2A5, 0xA560, 0xA36B, 0xA610, 0x9D69, 0xA6BD, 0xA828, + 0xA35E, 0xA597, 0xA421, 0xA647, 0x9FC9, 0xA6F1, 0xA14A, 0xA4B5, + 0xA21C, 0xA56D, 0xA6FD, 0xA13F, 0xA79F, 0xA2A7, 0xA4EF, 0xA370, + 0xA626, 0x9EF3, 0xA2B8, 0xA848, 0xA37C, 0xA5B0, 0xA4C2, 0xA6DA, + 0x9FD3, 0xA77F, 0xA154, 0xA4CE, 0xA2BC, 0xA581, 0xA788, 0xA201, + 0xA7AE, 0xA2C8, 0xA58A, 0xA389, 0xA63A, 0x9F05, 0xA2D4, 0xA08F, + 0xA425, 0xA646, 0xA4DB, 0xA6EB, 0xA144, 0xA431, 0xA211, 0xA4E7, + 0xA2D5, 0xA597, 0x9E2E, 0xA2B3, 0xA4F3, 0xA374, 0xA5A3, 0xA449, + 0xA662, 0xA084, 0xA385, 0xA154, 0xA455, 0xA2D0, 0xA508, 0xA727, + 0xA1FE, 0xA4E6, 0xA2DC, 0xA514, 0xA39D, 0xA658, 0x9FB9, 0xA37B, + 0xA099, 0xA434, 0xA661, 0xA503, 0xA71D, 0xA144, 0xA440, 0xA22A, + 0xA50A, 0xA398, 0xA5CE, 0xA7DC, 0xA2CC, 0xA516, 0xA3A4, 0xA5DA, + 0xA471, 0xA696, 0xA0A3, 0xA3B0, 0xA225, 0xA502, 0xA6A2, 0xA5C4, + 0xA75B, 0xA231, 0xA50E, 0xA39A, 0xA5D0, 0x9F04, 0xA68C, 0xA0A0, + 0xA3A6, 0xA5F0, 0x9FBD, 0xA2FB, 0xA14B, 0xA3CB, 0xA5FC, 0xA51B, + 0xA6B8, 0xA15C, 0xA462, 0xA23D, 0xA527, 0xA3A1, 0xA5E6, 0x9FB8, + 0xA2F6, 0xA0AF, 0xA3C6, 0xA60B, 0xA48E, 0xA6C2, 0xA16E, 0xA471, + 0xA24F, 0xA536, 0x9E0D, 0xA575, 0x9F13, 0xA2EC, 0xA53F, 0xA3D8, + 0xA615, 0x9FE3, 0xA314, 0xA169, 0xA3E4, 0xA2EF, 0xA4A9, 0x9E0D, + 0xA194, 0xA48C, 0xA300, 0xA54C, 0xA3E7, 0xA61F, 0xA09C, 0xA323, + 0xA180, 0xA48D, 0xA306, 0xA4CF, 0x9E2A, 0xA23C, 0xA499, 0xA312, + 0xA56F, 0x9F05, 0xA5B1, 0xA097, 0xA335, 0xA195, 0xA419, 0x9C62, + 0xA0C2, 0xA716, 0xA24E, 0xA4BF, 0xA338, 0xA57E, 0x9F05, 0xA276, + 0xA0C8, 0xA3E6, 0xA254, 0xA4C2, 0xA66C, 0xA187, 0xA409, 0xA260, + 0xA4E2, 0xA34A, 0xA5A4, 0x9FDB, 0xA32D, 0xA0DF, 0xA40C, 0x9B61, + 0xA4E8, 0xA68F, 0xA19E, 0xA42F, 0xA330, 0xA508, 0x9F02, 0xA5D9, + 0xA00F, 0xA353, 0xA1A1, 0xA432, 0xA5F9, 0xA0D1, 0xA415, 0xA274, + 0xA455, 0xA359, 0xA52E, 0x9F39, 0xA297, 0xA0DC, 0xA37C, 0xA5DD, + 0xA458, 0xA61C, 0xA1AD, 0xA43B, 0xA29D, 0xA50F, 0xA37F, 0xA563, + 0xA00C, 0xA362, 0xA1B3, 0xA43C, 0xA614, 0xA0E8, 0xA6DA, 0xA1F2, + 0xA014, 0xA37C, 0xA549, 0x9FEF, 0xA2BD, 0xA10A, 0xA39F, 0xA29D, + 0xA476, 0x9E2E, 0xA1D8, 0xA014, 0xA2C0, 0xA544, 0xA3B9, 0xA581, + 0xA0ED, 0xA39C, 0xA1DE, 0xA473, 0x9D69, 0xA113, 0x9F43, 0xA2C0, + 0xA0F3, 0xA39F, 0xA57B, 0xA025, 0xA2E3, 0xA1DB, 0xA3D9, 0xA2C3, + 0xA4C4, 0x9F26, 0xA203, 0xA042, 0xA302, 0x9B2C, 0xA022, 0xA5C7, + 0xA11B, 0xA3D6, 0xA220, 0xA4BF, 0x9F26, 0xA200, 0xA028, 0xA2FA, + 0xA138, 0xA3F0, 0x9D5C, 0xA118, 0xA339, 0xA21D, 0xA427, 0x9E4F, + 0xA50D, 0xA02A, 0xA2F7, 0xA138, 0xA3E8, 0x9D44, 0xA06F, 0x9E77, + 0xA21A, 0xA422, 0xA314, 0xA50A, 0x9F7B, 0xA30B, 0xA135, 0xA367, + 0xA24E, 0xA450, 0x9E79, 0xA231, 0xA04C, 0xA328, 0xA519, 0xA043, + 0xA56A, 0xA14E, 0xA35F, 0xA24B, 0xA44D, 0x9F4F, 0xA18B, 0xA063, + 0xA339, 0xA16B, 0xA390, 0xA57B, 0xA0A5, 0xA373, 0xA262, 0xA473, + 0x9E9A, 0xA553, 0xA07C, 0xA29E, 0xA182, 0xA3A4, 0x9D92, 0xA162, + 0xA387, 0xA276, 0xA484, 0xA37E, 0xA4D8, 0xA07C, 0xA2B0, 0xA19B, + 0xA3B8, 0x9E6E, 0xA4B2, 0x9F8D, 0xA28A, 0xA495, 0xA392, 0xA4FD, + 0xA0AF, 0xA2DD, 0xA1AF, 0xA3E0, 0xA2BB, 0xA4D8, 0x9FBE, 0xA2B5, + 0xA4BB, 0xA615, 0xA1E3, 0xA411, 0xA2EF, 0xA506, 0xA0A3, 0xA5F2, + 0xA1BD, 0xA3E9, 0xA2C9, 0xA43D, 0x9FB7, 0xA20E, 0xA0DA, 0xA317, + 0x9D83, 0xA0D1, 0xA58E, 0xA1E8, 0xA411, 0xA2F1, 0xA479, 0x9FED, + 0xA2EB, 0xA10D, 0xA342, 0x9DBC, 0xA456, 0x9FBF, 0xA216, 0xA0E4, + 0xA333, 0xA49C, 0xA0D9, 0xA316, 0xA138, 0xA381, 0x9DF5, 0xA479, + 0x9FF5, 0xA241, 0xA112, 0xA35B, 0x9DAF, 0xA109, 0x9F03, 0xA232, + 0x9A52, 0xA289, 0xA4B3, 0xA028, 0xA283, 0xA157, 0xA398, 0x9ED1, + 0xA14E, 0x9FFF, 0xA25D, 0x9B8D, 0xA372, 0x9DDE, 0xA128, 0x9F2A, + 0xA19C, 0xA3D7, 0x9F07, 0xA17C, 0xA047, 0xA29F, 0xA173, 0xA3B1, + 0x9E14, 0xA16D, 0x9F60, 0xA290, 0x9BA5, 0x9F57, 0x9DEB, 0xA091, + 0x97BD, 0xA1B8, 0xA402, 0x9F2E, 0xA1AF, 0xA082, 0xA2CD, 0x9CE1, + 0xA062, 0x9F1F, 0xA1A0, 0xA059, 0xA2BE, 0x9BD7, 0x9F95, 0x9E2C, + 0xA0C7, 0xA323, 0x9E23, 0xA0C1, 0x9F6C, 0xA1E5, 0xA0B8, 0xA314, + 0x9D2A, 0xA0B2, 0x9F5D, 0xA1D6, 0x9A86, 0x9F54, 0x9CFE, 0x9FCE, + 0x9E6D, 0xA117, 0xA365, 0x9E67, 0xA0F7, 0x9FC1, 0xA22F, 0x9CE6, + 0x9FA1, 0x9E40, 0xA0E8, 0x9F98, 0xA220, 0x9BE1, 0x9F92, 0x9D64, + 0xA3C4, 0x9F89, 0xA161, 0xA01A, 0xA291, 0x9D38, 0xA014, 0x9E9F, + 0xA152, 0x9A9F, 0xA282, 0xA429, 0xA002, 0xA27C, 0xA143, 0xA2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x9885, + 0x9CE9, 0x9AEE, 0x9DD9, 0x97BD, 0x9B1C, 0x9A5A, 0x9D57, 0x9FFF, + 0x9A86, 0xA0D5, 0x9B93, 0x9E6A, 0x9DA8, 0xA061, 0x9AE8, 0x9DE8, + 0x9D26, 0x9ECF, 0x98EF, 0x9D6B, 0x9B5C, 0x9E53, 0x982F, 0x9B8D, + 0x9ACE, 0x9DD1, 0x9BD0, 0x9EB6, 0x98B5, 0x9BFE, 0x9B45, 0x9E39, + 0x9661, 0x9B73, 0x9E79, 0x9C87, 0x9F58, 0x996E, 0x9CB2, 0x9BE7, + 0x9EDC, 0x98D4, 0x9FCF, 0x9B59, 0x9D35, 0x9C72, 0x9F53, 0x9954, + 0x9CB5, 0x9BE7, 0x9DA0, 0x98BA, 0x9C13, 0x99D6, 0x9D1E, 0x964B, + 0x9A22, 0x993F, 0x9C9B, 0x9E72, 0x9D9E, 0xA08D, 0x9C13, 0x9DF5, + 0x9D1E, 0x9EEC, 0x9A25, 0x9D76, 0x9C99, 0x9E72, 0x998E, 0x9CF6, + 0x9AB9, 0x9DF3, 0x9742, 0x9AFF, 0x9A28, 0x9D76, 0x9B45, 0x9E87, + 0x9979, 0x9CF6, 0x9ABC, 0x9E08, 0x9FC7, 0x9B02, 0x9E48, 0x9D8B, + 0x9F4E, 0x9A74, 0x9DE0, 0x9BA8, 0x9EEE, 0x9E20, 0x9FEE, 0x9B1D, + 0x9E74, 0xA03A, 0x9B7D, 0x9EC6, 0x9CA3, 0x9FC9, 0x9ADA, 0x9CE3, + 0x9C20, 0x9E0F, 0x98B9, 0x9C78, 0x9B95, 0x9D92, 0x981C, 0x9BF5, + 0x9B0F, 0x9D10, 0x975E, 0x9B6F, 0x98DC, 0x9C90, 0x9BB2, 0x9DBF, + 0x983F, 0x9C0D, 0x9991, 0x9D3F, 0x9784, 0x9B87, 0x98F7, 0x9CD7, + 0x94E1, 0x9960, 0x9D31, 0x9C54, 0x9E52, 0x98CE, 0x9CB1, 0x9A2F, + 0x9DF2, 0x9D06, 0x9F0D, 0x999B, 0x9D75, 0x9B08, 0x9EA8, 0x9909, + 0x9B68, 0x9A7C, 0x9E2E, 0x9871, 0x9ADF, 0x99F0, 0x9C35, 0x95DC, + 0x9A53, 0x995E, 0x9BC7, 0x9504, 0x99C7, 0x98CC, 0x9B46, 0x9A42, + 0x9C91, 0x9EB0, 0x9ABD, 0x9D00, 0x9C13, 0x9E50, 0x9A31, 0x9C80, + 0x9BA5, 0x9DD6, 0x99A2, 0x9C1A, 0x9B1F, 0x9D73, 0x9719, 0x9B94, + 0x9A9B, 0x9CF6, 0x9675, 0x9E46, 0x9832, 0x9C76, 0x9B86, 0x9DE1, + 0x9777, 0x9C0D, 0x9AFD, 0x9D69, 0x96D9, 0x9B8A, 0x98A5, 0x9D03, + 0x9635, 0x9926, 0x9D6D, 0x9AC3, 0x9D47, 0x9894, 0x9B53, 0x9A3A, + 0x9CCA, 0x9BDD, 0x9E44, 0x99C8, 0x9C64, 0x9B57, 0x9DCA, 0x9939, + 0x9BE1, 0x9AD6, 0x9D67, 0x98AC, 0x9B60, 0x9A67, 0x9CEC, 0x9814, + 0x9AF7, 0x99DB, 0x9C86, 0x977C, 0x9A6E, 0x994C, 0x9C06, 0x9AFB, + 0x9D9E, 0x98BF, 0x9B9D, 0x9A8F, 0x9D3B, 0x982A, 0x9B1C, 0x9A03, + 0x9CC0, 0x9525, 0x9AB0, 0x997C, 0x9C5A, 0x9475, 0x9A27, 0x98EF, + 0x9BDC, 0x93BF, 0x99A0, 0x960B, 0x9B73, 0x92E2, 0x96D6, 0x9B9C, + 0x98E5, 0x9BE7, 0x9AC7, 0x9D91, 0x9855, 0x9B69, 0x9A40, 0x9D31, + 0x97C2, 0x9AFD, 0x99D1, 0x9CB6, 0x9727, 0x9A79, 0x994A, 0x9C50, + 0x968E, 0x9A0D, 0x98B8, 0x9BEF, 0x95EA, 0x9983, 0x9845, 0x9B86, + 0x9548, 0x98F9, 0x97B0, 0x9B05, 0x94A0, 0x9CFA, 0x971A, 0x9A99, + 0x994D, 0x9C82, 0x967E, 0x9A2D, 0x98E0, 0x9C1C, 0x95E2, 0x99A6, + 0x9850, 0x9BB8, 0x9CCA, 0x9934, 0x9C7E, 0x9B4F, 0x9C58, 0x98A7, + 0x9C03, 0x9AE6, 0x9BF2, 0x9837, 0x9B56, 0x9A7C, 0x9B89, 0x97A4, + 0x9A76, 0x99F8, 0x9B25, 0x99CF, 0x9D3E, 0x98D7, 0x9AB9, 0x9948, + 0x9CDB, 0x9641, 0x9A38, 0x98D3, 0x9C7D, 0x95A2, 0x99CE, 0x9861, + 0x9C17, 0x9500, 0x995C, 0x97D3, 0x9BB3, 0x9455, 0x98EF, 0x975B, + 0x9B67, 0x93A7, 0x9862, 0x9C57, 0x9AFB, 0x9CDA, 0x9CC1, 0x9E5F, + 0x9A97, 0x9C77, 0x9C5E, 0x9E14, 0x9A28, 0x9C16, 0x9BFA, 0x9DCB, + 0x99BE, 0x9BB0, 0x9B94, 0x9D82, 0x994F, 0x9B4C, 0x9B30, 0x9D22, + 0x9185, 0x971B, 0x9AC9, 0x9A07, 0x9B73, 0x96A2, 0x9A48, 0x99B5, + 0x9B0A, 0x99FD, 0x9D9B, 0x9946, 0x9AA3, 0x9976, 0x9D52, 0x98D9, + 0x9A54, 0x98F1, 0x9D09, 0x9869, 0x99EA, 0x9867, 0x9CC0, 0x97F4, + 0x9998, 0x97DC, 0x9C74, 0x9781, 0x9929, 0x973A, 0x9C28, 0x96B8, + 0x98B9, 0x96C4, 0x9BDC, 0x95CE, 0x9864, 0x964B, 0x9B90, 0x915F, + 0x97F4, 0x95CA, 0x9B41, 0x9096, 0x9781, 0x954B, 0x9AF5, 0x8FC9, + 0x970B, 0x94CC, 0x9AA3, 0x8EE8, 0x9A8C, 0x9429, 0x9A54, 0x9868, + 0x9A3A, 0x93A1, 0x9A02, 0x97F8, 0x99ED, 0x9316, 0x99B5, 0x97A5, + 0x999B, 0x9C7C, 0x9963, 0x9B56, 0x9949, 0x9C45, 0x990E, 0x9B07, + 0x98F4, 0x9BF9, 0x98BC, 0x9AD0, 0x989F, 0x9BC2, 0x9864, 0x9A9B, + 0x984F, 0x9B90, 0x9811, 0x9A4C, 0x97F7, 0x9B44, 0x97B9, 0x9A12, + 0x979F, 0x9B0A, 0x9761, 0x99DA, 0x9744, 0x9ABE, 0x9ABC, 0x9CE3, + 0x96EE, 0x9A89, 0x9A6D, 0x9CB1, 0x9693, 0x9A4F, 0x9A33, 0x9C7D, + 0x963A, 0x9A02, 0x99FE, 0x9C46, 0x95DC, 0x99C8, 0x99AC, 0x9BFF, + 0x957B, 0x998E, 0x9972, 0x9BCB, 0x951F, 0x993E, 0x993A, 0x9B94, + 0x94BB, 0x9904, 0x9902, 0x9B5F, 0x945C, 0x98CC, 0x98AD, 0x9B28, + 0x9ACD, 0x93D5, 0x9873, 0x9776, 0x9AC5, 0x936E, 0x9838, 0x9751, + 0x9AB8, 0x9306, 0x9800, 0x9713, 0x9A83, 0x9299, 0x97C0, 0x96F3, + 0x9A49, 0x922E, 0x9785, 0x96CB, 0x9A14, 0x91C3, 0x9732, 0x96A8, + 0x99DF, 0x9152, 0x96F2, 0x9685, 0x99A5, 0x90DC, 0x96B4, 0x9662, + 0x9970, 0x9065, 0x9679, 0x9657, 0x9933, 0x8FEE, 0x9636, 0x9634, + 0x98FE, 0x8F74, 0x95F8, 0x95F1, 0x98C6, 0x8EF4, 0x95BA, 0x95B3, + 0x98A1, 0x8E71, 0x9579, 0x9575, 0x9869, 0x8DE8, 0x953B, 0x9534, + 0x9831, 0x8D5C, 0x9515, 0x94F3, 0x97F6, 0x8CCA, 0x94CF, 0x94B2, + 0x97B9, 0x8C2F, 0x948E, 0x948C, 0x9799, 0x8B8E, 0x944A, 0x9446, + 0x975E, 0x8AE7, 0x9406, 0x9402, 0x9723, 0x8A3C, 0x93E0, 0x93BE, + 0x9700, 0x897A, 0x939C, 0x9395, 0x96C5, 0x88AC, 0x9358, 0x9351, + 0x9685, 0x87D4, 0x932F, 0x930A, 0x9662, 0x86D3, 0x92E8, 0x92E9, + 0x9624, 0x85B9, 0x92A1, 0x929F, 0x9601, 0x8443, 0x927D, 0x9276, + 0x95C3, 0x8221, 0x9236, 0x922F, 0x97EC, 0x7FFF, 0x957F, 0x91E5, + 0x97B4, 0x7FFF, 0x9559, 0x91B9, 0x9794, 0x7FFF, 0x951B, 0x9190, + 0x9759, 0x7FFF, 0x94F5, 0x9148, 0x9739, 0x7FFF, 0x94B7, 0x911F, + 0x96FE, 0x9A52, 0x98CA, 0x9B94, 0x96DB, 0x9A32, 0x98AA, 0x988E, + 0x96B8, 0x9A15, 0x942A, 0x986E, 0x967D, 0x99E0, 0x9404, 0x984E, + 0x965A, 0x99BE, 0x93DE, 0x9816, 0x963A, 0x9989, 0x939F, 0x97F6, + 0x97F2, 0x9969, 0x9379, 0x97D3, 0x97BA, 0x994C, 0x95B3, 0x979E, + 0x9797, 0x9A7A, 0x9595, 0x9779, 0x9777, 0x9A48, 0x9572, 0x98D4, + 0x973C, 0x9A28, 0x954F, 0x98B4, 0x971C, 0x9A0B, 0x950E, 0x9894, + 0x96F9, 0x99D6, 0x94EB, 0x9877, 0x96D9, 0x99B9, 0x94C5, 0x983F, + 0x983D, 0x9999, 0x94A2, 0x981F, 0x981D, 0x9A95, 0x9675, 0x97FF, + 0x97FD, 0x91CF, 0x963A, 0x943C, 0x97C5, 0x91A6, 0x9617, 0x9416, + 0x97A5, 0x9182, 0x95F4, 0x93F0, 0x9785, 0x9156, 0x95D1, 0x95CD, + 0x98C3, 0x912D, 0x95B1, 0x95AC, 0x98A3, 0x93A3, 0x971F, 0x9571, + 0x986E, 0x935F, 0x96FF, 0x954E, 0x984E, 0x9339, 0x96E1, 0x8C9D, + 0x9524, 0x9318, 0x96C1, 0x9060, 0x9506, 0x92F2, 0x969E, 0x9058, + 0x94E3, 0x92C9, 0x97D0, 0x9031, 0x94BD, 0x94B9, 0x97B0, 0x9005, + 0x963D, 0x9498, 0x9790, 0x9276, 0x961A, 0x9475, 0x9770, 0x9250, + 0x95F7, 0x944F, 0x9896, 0x922A, 0x95D4, 0x95D5, 0x985E, 0x9206, + 0x8F57, 0x95B2, 0x93E9, 0x970B, 0x91D6, 0x958F, 0x93C5, 0x981F, + 0x91B2, 0x956C, 0x9552, 0x97FF, 0x9189, 0x96AA, 0x952F, 0x97DF, + 0x9376, 0x968A, 0x9509, 0x97BF, 0x9350, 0x9667, 0x94EB, 0x98B5, + 0x932F, 0x9647, 0x9645, 0x9895, 0x9309, 0x9761, 0x9625, 0x9875, + 0x949F, 0x9741, 0x9602, 0x9962, 0x9479, 0x9721, 0x90B7, 0x95E0, + 0x9456, 0x9832, 0x9293, 0x95BD, 0x95B6, 0x9812, 0x928B, 0x96D8, + 0x9598, 0x97F2, 0x9267, 0x96BD, 0x9578, 0x98CD, 0x93E6, 0x969D, + 0x9696, 0x98AD, 0x93C0, 0x9797, 0x9676, 0x9890, 0x93A2, 0x9779, + 0x9658, 0x8FD5, 0x9509, 0x937A, 0x9755, 0x8FB1, 0x94EB, 0x9372, + 0x9735, 0x919D, 0x960F, 0x94C1, 0x9717, 0x9195, 0x95EC, 0x94A3, + 0x9327, 0x9320, 0x95CC, 0x8F4A, 0x9479, 0x92FF, 0x96D1, 0x8F23, + 0x945B, 0x92D9, 0x96B1, 0x911E, 0x9585, 0x9436, 0x9691, 0x90F5, + 0x9562, 0x9410, 0x9775, 0x9289, 0x9542, 0x9540, 0x9755, 0x9268, + 0x9648, 0x951D, 0x982E, 0x93C6, 0x962A, 0x9626, 0x9811, 0x93A3, + 0x970F, 0x9603, 0x98D1, 0x9382, 0x96EF, 0x95E8, 0x98B4, 0x94B3, + 0x97CB, 0x96CD, 0x95C1, 0x9490, 0x97B0, 0x9330, 0x96A9, 0x959C, + 0x9871, 0x9328, 0x968B, 0x957C, 0x9851, 0x9446, 0x976A, 0x9664, + 0x9836, 0x9423, 0x974D, 0x92DB, 0x9645, 0x9535, 0x980E, 0x92BA, + 0x9622, 0x9512, 0x97F3, 0x93D9, 0x9707, 0x9600, 0x8F63, 0x93D1, + 0x928A, 0x95E0, 0x8F58, 0x94CB, 0x93AC, 0x96C5, 0x90EA, 0x94C3, + 0x938B, 0x96AA, 0x923A, 0x9599, 0x949E, 0x976E, 0x9219, 0x9591, + 0x8EF9, 0x947C, 0x933C, 0x9661, 0x908C, 0x9459, 0x9336, 0x9641, + 0x91C9, 0x954D, 0x9434, 0x970B, 0x91C1, 0x952A, 0x9526, 0x97CC, + 0x92EC, 0x95FD, 0x9508, 0x97B1, 0x93EA, 0x96C7, 0x95DB, 0x985A, + 0x93C7, 0x92A1, 0x95BB, 0x8FE1, 0x94C1, 0x8C34, 0x9279, 0x9143, + 0x949E, 0x8E07, 0x9398, 0x926F, 0x958A, 0x8FA9, 0x9375, 0x9373, + 0x963F, 0x90F0, 0x946D, 0x9350, 0x9637, 0x90E8, 0x9546, 0x9448, + 0x96E9, 0x9201, 0x9523, 0x9521, 0x9795, 0x9303, 0x95F6, 0x9501, + 0x9405, 0x9401, 0x96A8, 0x91CC, 0x94DF, 0x93E3, 0x9688, 0x91A6, + 0x95B2, 0x94BA, 0x9734, 0x92B3, 0x917E, 0x958B, 0x8EC2, 0x93AF, + 0x928E, 0x956D, 0x9016, 0x948B, 0x938A, 0x9625, 0x914C, 0x946B, + 0x9467, 0x96CF, 0x925F, 0x9529, 0x9449, 0x9442, 0x9340, 0x95F4, + 0x9507, 0x8E5C, 0x9322, 0x9213, 0x95D2, 0x8FB0, 0x93FF, 0x9318, + 0x966F, 0x90CE, 0x94D6, 0x93DD, 0x92F3, 0x91DF, 0x9591, 0x8F7B, + 0x93D3, 0x92CE, 0x9641, 0x909C, 0x948F, 0x93AE, 0x9623, 0x9197, + 0x9548, 0x946D, 0x96BD, 0x929C, 0x952A, 0x9526, 0x9764, 0x9364, + 0x9277, 0x9165, 0x9044, 0x943E, 0x8BDE, 0x9252, 0x913D, 0x94FA, + 0x8EE8, 0x9335, 0x922A, 0x94D7, 0x8FF3, 0x93FA, 0x9313, 0x9592, + 0x910B, 0x94B6, 0x93D5, 0x9627, 0x91FB, 0x9493, 0x9491, 0x93B3, + 0x92C9, 0x954E, 0x90C0, 0x946F, 0x93A4, 0x95E6, 0x91B3, 0x9525, + 0x944D, 0x8CE2, 0x929A, 0x91A4, 0x9503, 0x8E28, 0x935F, 0x9272, + 0x94E8, 0x907E, 0x941C, 0x933A, 0x924D, 0x9159, 0x94BF, 0x8DF5, + 0x9318, 0x9243, 0x9572, 0x902E, 0x93D7, 0x930E, 0x960C, 0x9127, + 0x9493, 0x93B5, 0x95EF, 0x91F6, 0x9531, 0x9471, 0x9686, 0x92C4, + 0x91EF, 0x950F, 0x8FD6, 0x9386, 0x8C2B, 0x91C7, 0x90CF, 0x942A, + 0x8E9B, 0x9295, 0x91A7, 0x94E3, 0x8FA1, 0x933F, 0x9270, 0x9565, + 0x90A0, 0x94BA, 0x93FA, 0x95FD, 0x9249, 0x949F, 0x9498, 0x93D5, + 0x930C, 0x95DA, 0x914E, 0x9476, 0x93B3, 0x9671, 0x921A, 0x9514, + 0x9044, 0x9390, 0x92C7, 0x95AE, 0x911C, 0x9434, 0x9387, 0x9630, + 0x91CF, 0x94D2, 0x8FF9, 0x9424, 0x9360, 0x8B48, 0x91C4, 0x8FEC, + 0x9404, 0x8DC6, 0x926F, 0x919C, 0x94A2, 0x8EB7, 0x9319, 0x924F, + 0x9525, 0x909B, 0x93BD, 0x8EAB, 0x9240, 0x916D, 0x945E, 0x8F90, + 0x92EA, 0x92E8, 0x9599, 0x906E, 0x943A, 0x938D, 0x9618, 0x91F6, + 0x911E, 0x9418, 0x8E4D, 0x92A1, 0x8BFB, 0x9114, 0x9035, 0x934B, + 0x8E3C, 0x91CA, 0x90F1, 0x9490, 0x8F29, 0x9321, 0x9273, 0x9515, + 0x90CA, 0x93C3, 0x9318, 0x9592, 0x9194, 0x9464, 0x8FDE, 0x92F5, + 0x9244, 0x8B8A, 0x9098, 0x8FB3, 0x9395, 0x8DB6, 0x921A, 0x914A, + 0x941E, 0x8EA4, 0x92C5, 0x91F8, 0x94A1, 0x9067, 0x93F5, 0x8E93, + 0x92A1, 0x911B, 0x9480, 0x8F5C, 0x932D, 0x927C, 0x9500, 0x90F4, + 0x93C9, 0x9320, 0x8D49, 0x91A2, 0x90EA, 0x9450, 0x8F25, 0x92FA, + 0x8C18, 0x917E, 0x90C0, 0x9383, 0x8E2C, 0x9229, 0x9174, 0x94AF, + 0x8FD7, 0x935F, 0x92B1, 0x952F, 0x914A, 0x93E8, 0x9358, 0x9596, + 0x91F8, 0x950B, 0x906A, 0x93DA, 0x932F, 0x8CD0, 0x91D1, 0x9117, + 0x93B7, 0x8E97, 0x925E, 0x91AC, 0x94C6, 0x9036, 0x9394, 0x92EB, + 0x8C9B, 0x9188, 0x90CD, 0x9374, 0x8E60, 0x9230, 0x8B60, 0x90C3, + 0x8FEC, 0x9366, 0x8E54, 0x920C, 0x9157, 0x9472, 0x8FDB, 0x933D, + 0x9294, 0x94DF, 0x9074, 0x93C6, 0x8EEE, 0x9271, 0x91DB, 0x8B1A, + 0x906B, 0x8FA7, 0x92FC, 0x8D01, 0x91B2, 0x90FF, 0x9380, 0x8EB9, + 0x9241, 0x8CF5, 0x90DA, 0x903A, 0x935C, 0x8E92, 0x921D, 0x9181, + 0x946D, 0x9010, 0x9338, 0x92A5, 0x8CBB, 0x915A, 0x90A4, 0x8F26, + 0x8E5B, 0x91EF, 0x8BAB, 0x9098, 0x8FDF, 0x930A, 0x8E4F, 0x91C8, + 0x912C, 0x9419, 0x8FB5, 0x92E3, 0x9253, 0x91A4, 0x9105, 0x93F5, + 0x8EE9, 0x8DFF, 0x922C, 0x8C4A, 0x90DE, 0x903E, 0x92B6, 0x8DEE, + 0x9173, 0x90D4, 0x93B2, 0x8F5A, 0x9292, 0x8CF6, 0x914C, 0x90AD, + 0x93A4, 0x8F4E, 0x926E, 0x91D5, 0x9497, 0x9086, 0x8FE6, 0x92F0, + 0x8D92, 0x91B1, 0x9117, 0x907D, 0x8FBE, 0x92CF, 0x8D86, 0x91A5, + 0x9055, 0x933D, 0x8EF2, 0x92AB, 0x9215, 0x9433, 0x90E2, 0x932F, + 0x929E, 0x920B, 0x915C, 0x8B98, 0x9022, 0x8F66, 0x9278, 0x8DF7, + 0x9150, 0x909B, 0x9377, 0x8F58, 0x9254, 0x91C0, 0x9465, 0x908F, + 0x9353, 0x8F33, 0x9230, 0x919C, 0x9444, 0x9068, 0x932F, 0x92B5, + 0x9224, 0x8CE2, 0x90F7, 0x9041, 0x9321, 0x8EFA, 0x9200, 0x9169, + 0x93FF, 0x9033, 0x87F8, 0x8E2E, 0x8D62, 0x9148, 0x8AED, 0x9011, + 0x8F6E, 0x9249, 0x8D51, 0x9137, 0x90A0, 0x9343, 0x8F44, 0x923B, + 0x8D29, 0x9113, 0x9079, 0x931F, 0x8F3B, 0x8DD0, 0x9183, 0x8C48, + 0x9052, 0x8FB7, 0x9286, 0x8E6D, 0x915F, 0x8C3C, 0x9046, 0x8FA6, + 0x92EE, 0x8D9A, 0x9153, 0x90BC, 0x9359, 0x8F7F, 0x8EDE, 0x8E37, + 0x8D8A, 0x9095, 0x8A5C, 0x8F5D, 0x8EB4, 0x922E, 0x8D5D, 0x9106, + 0x9085, 0x9310, 0x8EAB, 0x920A, 0x8C86, 0x90F8, 0x9061, 0x92EC, + 0x8E81, 0x8DD7, 0x916B, 0x8C73, 0x903A, 0x8F9F, 0x9253, 0x8E6E, + 0x9144, 0x8C4B, 0x902E, 0x8F8E, 0x92BB, 0x8E4C, 0x91B2, 0x90A4, + 0x9394, 0x8F6C, 0x9297, 0x921F, 0x8CCB, 0x9110, 0x8B55, 0x8F5E, + 0x8F5C, 0x91FB, 0x8D69, 0x90EC, 0x9057, 0x92DD, 0x8F35, 0x91D7, + 0x915C, 0x90CA, 0x9046, 0x9329, 0x8F10, 0x8E85, 0x91B1, 0x8C82, + 0x90B7, 0x8F87, 0x9293, 0x8E5E, 0x91A3, 0x8C5A, 0x9093, 0x8FF9, + 0x9288, 0x8E39, 0x917F, 0x9106, 0x93B9, 0x8FF0, 0x92D5, 0x925D, + 0x8E29, 0x9159, 0x8C22, 0x905F, 0x8FC7, 0x923E, 0x8DFF, 0x914B, + 0x90BC, 0x8B5C, 0x8FA0, 0x8805, 0x8DF6, 0x8DEF, 0x9125, 0x8B31, + 0x8F94, 0x8EF6, 0x9208, 0x8DCA, 0x9101, 0x8BDB, 0x9006, 0x8F6B, + 0x88C4, 0x8DBE, 0x8D11, 0x9061, 0x8B15, 0x8F60, 0x8EC2, 0x8E37, + 0x8D95, 0x90CD, 0x8BA0, 0x8FB9, 0x8F37, 0x9213, 0x8D6A, 0x9122, + 0x90A7, 0x8AD7, 0x8FA9, 0x8876, 0x8DE9, 0x8D5D, 0x9085, 0x8B65, + 0x8F82, 0x8F00, 0x91DF, 0x8DD6, 0x90F1, 0x8BF0, 0x8FF4, 0x8EDB, + 0x8838, 0x8DB4, 0x8D22, 0x9051, 0x8B2C, 0x8F50, 0x8EB2, 0x9198, + 0x8DA1, 0x90A4, 0x8BB7, 0x8FAC, 0x8F27, 0x91FE, 0x8D7C, 0x9110, + 0x9097, 0x8BAA, 0x8F9C, 0x898E, 0x8DF5, 0x8D6C, 0x90EA, 0x8C32, + 0x8F75, 0x8EF2, 0x91B7, 0x8DCC, 0x90C6, 0x904A, 0x8FCE, 0x8F4C, + 0x8952, 0x8E47, 0x8DBE, 0x90B6, 0x8BF7, 0x8FBE, 0x8F3C, 0x91E1, + 0x8D97, 0x9109, 0x8C7C, 0x9014, 0x8F95, 0x91D3, 0x8E12, 0x915C, + 0x90E3, 0x8C52, 0x8F76, 0x8EF1, 0x8E6C, 0x8DE9, 0x90BF, 0x8CD4, + 0x8FE0, 0x8FDE, 0x926C, 0x8E5E, 0x9128, 0x90AF, 0x90B0, 0x8FBA, + 0x8A33, 0x8EBB, 0x8E38, 0x9102, 0x8D24, 0x9010, 0x8F93, 0x9227, + 0x8E92, 0x9155, 0x8CFF, 0x9066, 0x8FEA, 0x9274, 0x8F07, 0x91A5, + 0x8DFF, 0x90B9, 0x8C62, 0x8FDA, 0x8F5D, 0x91F2, 0x8E5B, 0x910C, + 0x90A9, 0x9030, 0x8FB4, 0x922C, 0x8EB5, 0x8E4E, 0x90FC, 0x8D3D, + 0x900A, 0x8F8E, 0x8F2A, 0x8EA5, 0x9136, 0x8D9F, 0x9060, 0x8FE4, + 0x9256, 0x8F01, 0x8E7F, 0x8DFC, 0x8D76, 0x903A, 0x8BD3, 0x8FD0, + 0x8EDB, 0x91D2, 0x8DEC, 0x90FF, 0x8CDC, 0x9023, 0x8FAC, 0x8A97, + 0x8EC6, 0x8DC8, 0x90D9, 0x8CB6, 0x9000, 0x8B06, 0x8F20, 0x8EA0, + 0x9129, 0x8D2F, 0x9053, 0x8FD7, 0x8AF5, 0x8EF7, 0x89C3, 0x8E10, + 0x8D8D, 0x902D, 0x8BED, 0x8F50, 0x8ED1, 0x9151, 0x8DE7, 0x9080, + 0x8C6F, 0x8BDF, 0x8FA2, 0x8A25, 0x8E41, 0x8DBE, 0x90CF, 0x8CCD, + 0x8FF5, 0x8B26, 0x8F18, 0x8E99, 0x9109, 0x8D2D, 0x8CA4, 0x8C31, + 0x8BA4, 0x8EF2, 0x89E6, 0x8E09, 0x8D85, 0x9023, 0x8C0A, 0x8F46, + 0x8A53, 0x8E65, 0x8DE5, 0x871B, 0x8CF2, 0x8C68, 0x8F98, 0x8AD7, + 0x8EBA, 0x8909, 0x8DCE, 0x8CC8, 0x904A, 0x8BCC, 0x8EF8, 0x8E94, + 0x88FB, 0x8DAA, 0x86DB, 0x8CB7, 0x8BA5, 0x8F4A, 0x8A9E, 0x8E6C, + 0x8E02, 0x90D3, 0x8D15, 0x8FA0, 0x8B93, 0x8A74, 0x8E5C, 0x8958, + 0x8D72, 0x8CE9, 0x8FD9, 0x8BF2, 0x8F15, 0x8A62, 0x8E31, 0x8DCA, + 0x8D47, 0x9028, 0x8FC5, 0x91E8, 0x8EED, 0x9133, 0x8DA1, 0x8D1E, + 0x9002, 0x8C29, 0x8F3E, 0x8EC4, 0x8E60, 0x8DF9, 0x90AC, 0x8D0C, + 0x8FEE, 0x8F7A, 0x8B19, 0x8EB5, 0x897C, 0x8DD1, 0x8D67, 0x9027, + 0x8C76, 0x8F68, 0x8E8F, 0x8E88, 0x8E24, 0x9064, 0x8CD3, 0x8CCF, + 0x8F42, 0x8B52, 0x8EDD, 0x8E00, 0x8D99, 0x8D13, 0x904E, 0x8C3B, + 0x8F1D, 0x8EB6, 0x8A21, 0x8DD8, 0x87EC, 0x8D04, 0x8C80, 0x8F6A, + 0x8B19, 0x8E8F, 0x8E28, 0x8DC3, 0x8D43, 0x8732, 0x8C6E, 0x8B7B, + 0x8EE1, 0x8A77, 0x8E00, 0x8D9B, 0x8D34, 0x8C45, 0x8F7B, 0x8BD5, + 0x8AD9, 0x8E55, 0x893C, 0x8D73, 0x877E, 0x8C9C, 0x8C34, 0x8EF5, + 0x8AB0, 0x8E2D, 0x8DC6, 0x8D5F, 0x8C78, 0x862D, 0x8B9A, 0x8B9B, + 0x8E7F, 0x8995, 0x8D9E, 0x8D34, 0x8CCF, 0x8C62, 0x8F1C, 0x8B00, + 0x8A70, 0x8DF3, 0x88E9, 0x8D0E, 0x8725, 0x8C39, 0x8BC9, 0x8E91, + 0x8A5E, 0x8DCB, 0x8D64, 0x883C, 0x8C95, 0x85DB, 0x8BA3, 0x8B32, + 0x8E1E, 0x89BB, 0x8D3C, 0x8CD4, 0x8C6A, 0x8BFF, 0x8F18, 0x8A97, + 0x8A23, 0x8DF4, 0x8914, 0x8D26, 0x8779, 0x8BD4, 0x8B66, 0x8E8F, + 0x89F5, 0x8DCC, 0x8D65, 0x87EE, 0x8C96, 0x86BD, 0x8BC0, 0x8AC9, + 0x8E08, 0x89E1, 0x8D3D, 0x8CD8, 0x8F65, 0x8C03, 0x8EBC, 0x8B27, + 0x8E56, 0x8DF5, 0x9052, 0x8D29, 0x8CC2, 0x8C5A, 0x8B6A, 0x8E90, + 0x8A8D, 0x8DCD, 0x8D66, 0x8FE3, 0x8C97, 0x8F83, 0x8BC4, 0x8B59, + 0x8E69, 0x89ED, 0x8DA0, 0x8D3C, 0x8C74, 0x8C06, 0x8EFE, 0x8B2D, + 0x8ABF, 0x8DDD, 0x89D7, 0x8D2D, 0x8854, 0x8CC1, 0x8BF3, 0x8ED7, + 0x8B1A, 0x8E2B, 0x89AB, 0x8936, 0x8D00, 0x8840, 0x8C31, 0x8BC6, + 0x8E67, 0x8A80, 0x8E04, 0x899A, 0x8D3B, 0x8C70, 0x8790, 0x8B9B, + 0x8B30, 0x8AC4, 0x8A53, 0x8D75, 0x88F6, 0x8CC5, 0x8C5D, 0x8F19, + 0x8B8A, 0x8489, 0x8AAE, 0x8A3F, 0x8D64, 0x8956, 0x8C98, 0x8C33, + 0x8BCB, 0x8B5D, 0x8E49, 0x8A13, 0x899F, 0x8D38, 0x88B5, 0x8C6E, + 0x869B, 0x8B9E, 0x8AE0, 0x8E22, 0x8A6D, 0x8D72, 0x8889, 0x880B, + 0x8C44, 0x8687, 0x8B88, 0x8B1F, 0x8E0C, 0x89D2, 0x8D49, 0x88E9, + 0x886E, 0x8C2E, 0x86F7, 0x8B5D, 0x8AF2, 0x8A17, 0x89A5, 0x8D1F, + 0x8842, 0x8C69, 0x8C04, 0x8645, 0x8AE3, 0x83E7, 0x8A70, 0x89FF, + 0x8D09, 0x88A7, 0x8C3F, 0x8BDA, 0x8B88, 0x8B1D, 0x8467, 0x8A43, + 0x8964, 0x8D42, 0x8877, 0x8C2E, 0x8703, 0x8BC2, 0x8AF0, 0x8E24, + 0x8D7E, 0x89C0, 0x8D18, 0x8CB6, 0x8F01, 0x8C00, 0x8B97, 0x8ADF, + 0x8A71, 0x8DAF, 0x8993, 0x8CEE, 0x8CA0, 0x8C3B, 0x8BD3, 0x863B, + 0x8B19, 0x8AB3, 0x8D88, 0x8965, 0x8CDB, 0x8909, 0x8C77, 0x8BA9, + 0x8E67, 0x8B58, 0x8A86, 0x8A1A, 0x89C2, 0x8CFB, 0x88DE, 0x8C4A, + 0x8BE5, 0x8E81, 0x8B2E, 0x84E5, 0x8A6E, 0x8A02, 0x8CE7, 0x88B0, + 0x8C81, 0x87DC, 0x8BD0, 0x8B01, 0x8E10, 0x8AAD, 0x89D4, 0x8D07, + 0x890D, 0x8C57, 0x87AB, 0x8C07, 0x8B3B, 0x8E41, 0x8A83, 0x842B, + 0x89BF, 0x8950, 0x8C90, 0x880E, 0x8BDC, 0x871D, 0x8B28, 0x8ABD, + 0x83F4, 0x89FF, 0x8990, 0x8CC4, 0x8855, 0x8C16, 0x86EC, 0x8B62, + 0x8AF7, 0x8DA9, 0x8A3C, 0x834B, 0x890D, 0x8908, 0x8C4D, 0x8752, + 0x8B38, 0x8B36, 0x8A80, 0x8A79, 0x8316, 0x8950, 0x8949, 0x8C23, + 0x8810, 0x8B6F, 0x86A1, 0x8B07, 0x8AB5, 0x8D50, 0x8990, 0x898B, + 0x88AC, 0x8856, 0x8BF3, 0x870D, 0x8B44, 0x8A8E, 0x8A87, 0x89CD, + 0x8381, 0x8908, 0x8907, 0x8C2C, 0x87C8, 0x8B7B, 0x865E, 0x8AC6, + 0x8A5A, 0x8D56, 0x899C, 0x8947, 0x88D5, 0x8811, 0x8BB2, 0x86C2, + 0x8B00, 0x8AFB, 0x8A48, 0x8A41, 0x832F, 0x8918, 0x88AB, 0x8C33, + 0x8766, 0x8B84, 0x8690, 0x8ACD, 0x8A19, 0x8D02, 0x8958, 0x8CB5, + 0x8893, 0x8C07, 0x8BA4, 0x8751, 0x8B09, 0x8B05, 0x8A51, 0x8A50, + 0x8CD5, 0x8927, 0x8C85, 0x8BDE, 0x8798, 0x8B8B, 0x86C0, 0x8ADC, + 0x8A25, 0x8D4D, 0x89CF, 0x8CA5, 0x8910, 0x8832, 0x8C0C, 0x8763, + 0x8B13, 0x8630, 0x8A5E, 0x8A5C, 0x8CD9, 0x89A1, 0x88E1, 0x8874, + 0x881E, 0x8B97, 0x874F, 0x8AE5, 0x8AE1, 0x8A30, 0x89DE, 0x83A3, + 0x891F, 0x891B, 0x8BBA, 0x87EA, 0x8B67, 0x86C0, 0x8AB5, 0x8A66, + 0x8564, 0x89B0, 0x8941, 0x88F1, 0x8898, 0x8BE8, 0x87D0, 0x8B3C, + 0x8AED, 0x862C, 0x8A38, 0x84CE, 0x89E4, 0x892A, 0x8C08, 0x8867, + 0x8BBA, 0x879F, 0x8745, 0x8ABD, 0x85FB, 0x8A0A, 0x851B, 0x89B6, + 0x88FC, 0x8BDB, 0x88A4, 0x87E0, 0x8716, 0x8717, 0x8A8F, 0x85C9, + 0x8A3E, 0x898A, 0x8988, 0x8933, 0x81FE, 0x8873, 0x881B, 0x8B5E, + 0x8754, 0x8AC3, 0x85AF, 0x8A10, 0x89BE, 0x83E0, 0x8905, 0x82E6, + 0x88AD, 0x87EC, 0x8B2E, 0x8723, 0x8A95, 0x85F5, 0x851A, 0x8990, + 0x8430, 0x893C, 0x8881, 0x887C, 0x8827, 0x8B61, 0x8760, 0x870A, + 0x8A63, 0x8561, 0x8A12, 0x847D, 0x890E, 0x890C, 0x8BC9, 0x87F8, + 0x87A5, 0x8B32, 0x86D6, 0x8A38, 0x8A33, 0x85A3, 0x8994, 0x8993, + 0x88DE, 0x8888, 0x8B9A, 0x8831, 0x8B02, 0x8B00, 0x8714, 0x8A67, + 0x85E9, 0x89B2, 0x8965, 0x8C5A, 0x890E, 0x8BC8, 0x8800, 0x87AA, + 0x8AD5, 0x86E3, 0x8A84, 0x85B5, 0x89E8, 0x89E7, 0x847A, 0x88E0, + 0x829C, 0x888E, 0x87D0, 0x8AEF, 0x8723, 0x8A9F, 0x8656, 0x85F7, + 0x8A04, 0x84C4, 0x8968, 0x88B0, 0x8860, 0x885B, 0x8B68, 0x87B5, + 0x86F0, 0x8A72, 0x8695, 0x89D9, 0x8566, 0x8985, 0x8938, 0x88E5, + 0x88E4, 0x82CF, 0x87D3, 0x8782, 0x8AEB, 0x8727, 0x8A9D, 0x8605, + 0x85A8, 0x8955, 0x84D1, 0x8904, 0x8388, 0x8861, 0x880E, 0x8B08, + 0x874B, 0x86F4, 0x869B, 0x85CF, 0x8A1F, 0x8570, 0x8924, 0x8437, + 0x8881, 0x887D, 0x827A, 0x87D7, 0x8786, 0x8782, 0x8668, 0x8A3A, + 0x860F, 0x89A3, 0x899F, 0x847C, 0x8905, 0x8333, 0x87FA, 0x87FB, + 0x8AED, 0x874F, 0x8A9F, 0x86A2, 0x86A3, 0x89BF, 0x857D, 0x896E, + 0x8444, 0x88D1, 0x8881, 0x8290, 0x882F, 0x8125, 0x871D, 0x86C4, + 0x8A27, 0x8616, 0x898B, 0x85B5, 0x84E8, 0x88EC, 0x8427, 0x889B, + 0x884B, 0x87F8, 0x87A4, 0x8A89, 0x868F, 0x8638, 0x89EF, 0x85DC, + 0x8958, 0x8525, 0x88BB, 0x83EC, 0x8867, 0x8816, 0x8AEB, 0x8773, + 0x8771, 0x871B, 0x86C7, 0x89C0, 0x85A7, 0x896F, 0x84F3, 0x88D5, + 0x8888, 0x83CF, 0x87E5, 0x87E3, 0x8790, 0x873A, 0x8A6B, 0x8692, + 0x8639, 0x863A, 0x85E3, 0x893C, 0x852C, 0x88A2, 0x8852, 0x8816, + 0x87AC, 0x82C9, 0x8757, 0x8706, 0x86AF, 0x8659, 0x89A2, 0x85AB, + 0x8551, 0x8920, 0x84F5, 0x88CC, 0x843A, 0x887D, 0x882A, 0x87DC, + 0x878C, 0x81BA, 0x8737, 0x86E3, 0x89B7, 0x8574, 0x8937, 0x84BD, + 0x84BB, 0x88E4, 0x8400, 0x8847, 0x833B, 0x87F5, 0x87A4, 0x8A64, + 0x86FE, 0x7F93, 0x8659, 0x8602, 0x894C, 0x8551, 0x88FE, 0x84F5, + 0x8498, 0x8862, 0x8301, 0x87BF, 0x8235, 0x876C, 0x871C, 0x89E3, + 0x8672, 0x7EFB, 0x85C7, 0x8570, 0x8913, 0x84BE, 0x88C2, 0x8403, + 0x83A2, 0x87DA, 0x82DD, 0x8739, 0x811F, 0x86E4, 0x8690, 0x89AD, + 0x85E5, 0x858E, 0x8537, 0x84DD, 0x88DD, 0x8425, 0x888B, 0x8366, + 0x8305, 0x87A0, 0x823A, 0x86FF, 0x86A9, 0x8658, 0x8604, 0x8974, + 0x8570, 0x8516, 0x8517, 0x84BA, 0x88A1, 0x83FF, 0x8852, 0x8802, + 0x8262, 0x8764, 0x8195, 0x86C2, 0x866F, 0x8635, 0x85E1, 0x893B, + 0x88F1, 0x8584, 0x886E, 0x886C, 0x8478, 0x881D, 0x8369, 0x87CE, + 0x877B, 0x872D, 0x86DC, 0x89D0, 0x864F, 0x864D, 0x894F, 0x85F5, + 0x8903, 0x8549, 0x8869, 0x8833, 0x83E7, 0x8832, 0x832B, 0x8794, + 0x8744, 0x86F6, 0x86A2, 0x80C8, 0x8667, 0x8662, 0x860E, 0x85BA, + 0x8912, 0x850F, 0x84B5, 0x882E, 0x8402, 0x87F6, 0x8305, 0x87A6, + 0x87A5, 0x8754, 0x86B5, 0x81DA, 0x862D, 0x8628, 0x8624, 0x8625, + 0x88DC, 0x852A, 0x84D3, 0x8478, 0x841E, 0x87F1, 0x83DC, 0x87B9, + 0x876E, 0x8321, 0x871C, 0x81FC, 0x867A, 0x863E, 0x863F, 0x85EB, + 0x7F0C, 0x8595, 0x853E, 0x8494, 0x8453, 0x884F, 0x83FA, 0x87B7, + 0x839A, 0x833C, 0x8731, 0x8223, 0x86DC, 0x868E, 0x863D, 0x8603, + 0x7FC9, 0x85FD, 0x85A9, 0x8554, 0x8503, 0x884A, 0x846B, 0x8467, + 0x8412, 0x840D, 0x8778, 0x82FE, 0x86F1, 0x86EF, 0x86EB, 0x869D, + 0x8191, 0x85C3, 0x85C1, 0x85BF, 0x85BB, 0x88A2, 0x84C2, 0x8485, + 0x842A, 0x8429, 0x878A, 0x83CF, 0x8787, 0x82BA, 0x8279, 0x86B2, + 0x8213, 0x86AC, 0x86AD, 0x860D, 0x85B9, 0x7F3B, 0x8580, 0x857B, + 0x852A, 0x84D2, 0x881A, 0x843E, 0x8814, 0x843A, 0x838C, 0x8748, + 0x8294, 0x8742, 0x828D, 0x8671, 0x866D, 0x861C, 0x861D, 0x8923, + 0x8578, 0x853B, 0x853C, 0x853A, 0x8858, 0x843B, 0x87C3, 0x83FC, + 0x83F8, 0x8789, 0x8345, 0x8705, 0x82A6, 0x86B5, 0x86B1, 0x81E7, + 0x8615, 0x80E0, 0x85DC, 0x85D7, 0x8899, 0x84FA, 0x7E54, 0x84F9, + 0x84F4, 0x87D0, 0x840D, 0x87CA, 0x83B6, 0x83B4, 0x8747, 0x82C2, + 0x86F5, 0x8262, 0x8673, 0x8671, 0x813F, 0x861C, 0x80F6, 0x8594, + 0x8592, 0x8889, 0x853F, 0x7F03, 0x84B3, 0x84AE, 0x8806, 0x8405, + 0x8788, 0x836D, 0x836E, 0x8737, 0x82B7, 0x86B5, 0x8275, 0x86B2, + 0x8664, 0x8116, 0x85DC, 0x810D, 0x85D6, 0x8552, 0x84FE, 0x84FC, + 0x7F28, 0x84F6, 0x846B, 0x8467, 0x8415, 0x8778, 0x837F, 0x837E, + 0x8323, 0x8324, 0x86F1, 0x8231, 0x8655, 0x8228, 0x8226, 0x861B, + 0x8126, 0x8596, 0x8125, 0x858D, 0x853E, 0x7FAC, 0x84B0, 0x7FA8, + 0x84AF, 0x84AB, 0x8768, 0x83CB, 0x7B51, 0x83C5, 0x8334, 0x86E4, + 0x82DA, 0x86DE, 0x82D3, 0x81E2, 0x8657, 0x81DB, 0x85D5, 0x80DB, + 0x8582, 0x857E, 0x80D2, 0x84F8, 0x7FC4, 0x84F2, 0x84F0, 0x8466, + 0x8464, 0x7E2F, 0x840B, 0x840C, 0x837E, 0x8379, 0x86CE, 0x8376, + 0x828E, 0x864D, 0x8285, 0x8644, 0x8645, 0x818F, 0x85C0, 0x8189, + 0x85BA, 0x85B8, 0x883B, 0x8532, 0x7F74, 0x84E2, 0x8458, 0x87BA, + 0x8451, 0x7E4D, 0x844E, 0x83C0, 0x873A, 0x83BD, 0x86B8, 0x832A, + 0x82D5, 0x82D0, 0x82CC, 0x8631, 0x8238, 0x862E, 0x822F, 0x813C, + 0x85AA, 0x8136, 0x85A1, 0x8095, 0x851E, 0x8519, 0x802F, 0x8491, + 0x7F81, 0x848D, 0x8489, 0x8724, 0x83FF, 0x7E5D, 0x83A9, 0x83A7, + 0x86A0, 0x8317, 0x869A, 0x8311, 0x827F, 0x8619, 0x8279, 0x8612, + 0x81E2, 0x8593, 0x858E, 0x8180, 0x858B, 0x80E2, 0x8505, 0x80DC, + 0x8039, 0x84FD, 0x8039, 0x8477, 0x7F2A, 0x8471, 0x846F, 0x7E06, + 0x83E6, 0x7E05, 0x83DD, 0x83DE, 0x86B6, 0x8351, 0x7B87, 0x8348, + 0x82BC, 0x862F, 0x8265, 0x85F6, 0x81CB, 0x81C7, 0x85A5, 0x81C6, + 0x856F, 0x8129, 0x8568, 0x8567, 0x8083, 0x84E4, 0x8080, 0x84DE, + 0x7F7A, 0x8455, 0x8456, 0x7ECA, 0x844F, 0x7EC4, 0x83C6, 0x83C1, + 0x86C9, 0x83BE, 0x7CE2, 0x8334, 0x832D, 0x8645, 0x829F, 0x860A, + 0x8299, 0x829A, 0x8605, 0x8201, 0x8588, 0x8200, 0x81FB, 0x8580, + 0x8164, 0x84FA, 0x80C7, 0x84F7, 0x84F5, 0x8064, 0x846F, 0x7FC2, + 0x846C, 0x7FBC, 0x8430, 0x83E1, 0x83DF, 0x83DA, 0x86D6, 0x83A1, + 0x7E5A, 0x834D, 0x8348, 0x8655, 0x830F, 0x7C7A, 0x8306, 0x82B6, + 0x8615, 0x8274, 0x85CA, 0x8273, 0x826E, 0x8593, 0x81DB, 0x858A, + 0x81DA, 0x8589, 0x8143, 0x813E, 0x8505, 0x8138, 0x84FF, 0x80A0, + 0x809B, 0x847A, 0x8098, 0x8476, 0x7FF6, 0x83F0, 0x83EE, 0x7F53, + 0x83E8, 0x7F4A, 0x83AC, 0x83AD, 0x83AB, 0x8359, 0x7DF0, 0x831C, + 0x831B, 0x8319, 0x8314, 0x8605, 0x8311, 0x7BFF, 0x8281, 0x8282, + 0x85CA, 0x81F1, 0x7B2A, 0x81EB, 0x81EC, 0x8545, 0x8155, 0x8542, + 0x8151, 0x814D, 0x84BD, 0x80B8, 0x84BA, 0x80B1, 0x84B3, 0x8071, + 0x806C, 0x8479, 0x7FD1, 0x842B, 0x7FC8, 0x7FC6, 0x83F0, 0x7FC2, + 0x83EA, 0x7F20, 0x83E6, 0x83E2, 0x7F1B, 0x835B, 0x7E6F, 0x8357, + 0x8356, 0x8354, 0x82C9, 0x7DBB, 0x82C8, 0x82C3, 0x8289, 0x8287, + 0x7C46, 0x8283, 0x7C42, 0x81F3, 0x81F4, 0x85A3, 0x81ED, 0x7AAB, + 0x81EA, 0x81E8, 0x851F, 0x81E2, 0x851E, 0x8151, 0x814F, 0x8499, + 0x80BA, 0x8496, 0x80B4, 0x845D, 0x8073, 0x806F, 0x8458, 0x806E, + 0x8451, 0x7FD0, 0x7FD1, 0x83CF, 0x7FCA, 0x83C9, 0x7FC7, 0x83C5, + 0x83C1, 0x83C2, 0x83C0, 0x83BB, 0x7F21, 0x8335, 0x7E78, 0x8334, + 0x832F, 0x85F4, 0x82F6, 0x7DC7, 0x82EF, 0x82EE, 0x82EF, 0x8266, + 0x7D7A, 0x8260, 0x8261, 0x825C, 0x8258, 0x8534, 0x8257, 0x7CB8, + 0x8251, 0x8252, 0x8528, 0x81C4, 0x7B37, 0x81BE, 0x81BC, 0x851D, + 0x81B6, 0x84A0, 0x8179, 0x8125, 0x8121, 0x80E8, 0x8494, 0x80E2, + 0x80E0, 0x80DE, 0x80DA, 0x8489, 0x80D9, 0x8485, 0x80D0, 0x80D1, + 0x8406, 0x803C, 0x8400, 0x8038, 0x8033, 0x8032, 0x8033, 0x83F4, + 0x802A, 0x83F1, 0x7F94, 0x7F92, 0x836B, 0x7F4C, 0x8368, 0x7F4B, + 0x7F49, 0x8360, 0x7F43, 0x835C, 0x7EA3, 0x8323, 0x7E9D, 0x7E9E, + 0x831E, 0x7E97, 0x82CC, 0x7E94, 0x8293, 0x8294, 0x7E8C, 0x828B, + 0x7E8B, 0x828A, 0x8286, 0x7DE3, 0x8285, 0x7DDD, 0x827C, 0x827D, + 0x827B, 0x81F5, 0x7CE9, 0x81EF, 0x7CE3, 0x81EB, 0x81E7, 0x7CDD, + 0x81E6, 0x7CDA, 0x81DF, 0x81DE, 0x81DF, 0x81DA, 0x7CD1, 0x81D7, + 0x81D5, 0x8149, 0x814A, 0x7C14, 0x8143, 0x7C14, 0x8140, 0x813E, + 0x84B4, 0x8138, 0x7C08, 0x8134, 0x8132, 0x8131, 0x812F, 0x7AF9, + 0x8129, 0x8127, 0x815C, 0x815D, 0x8455, 0x8156, 0x80CA, 0x80CB, + 0x80C9, 0x80C4, 0x80C3, 0x8446, 0x80C2, 0x83C9, 0x80B9, 0x80BA, + 0x80B8, 0x80B3, 0x83C0, 0x80B3, 0x80AE, 0x80AC, 0x80AB, 0x83E5, + 0x8019, 0x83E4, 0x8018, 0x8013, 0x83DC, 0x8010, 0x83D6, 0x800C, + 0x8008, 0x8006, 0x8007, 0x8352, 0x7FFE, 0x8382, 0x7FFD, 0x8035, + 0x837D, 0x802F, 0x8374, 0x802B, 0x8029, 0x8028, 0x7F9A, 0x836E, + 0x7F93, 0x7F8F, 0x7F90, 0x7F8E, 0x8318, 0x7F88, 0x8314, 0x7F87, + 0x7F82, 0x830F, 0x7F7F, 0x8309, 0x7FB5, 0x7FB4, 0x7FB2, 0x7FB0, + 0x8333, 0x7FAA, 0x8330, 0x7FA9, 0x7FA4, 0x835B, 0x7F0E, 0x8357, + 0x7F0E, 0x7F0C, 0x7F07, 0x7F43, 0x82D1, 0x7F3C, 0x7F3B, 0x7F39, + 0x7F3A, 0x82F9, 0x7F31, 0x82F8, 0x7F30, 0x7F66, 0x7F67, 0x7F68, + 0x831D, 0x7F5F, 0x7F5D, 0x7F5E, 0x7F5C, 0x8299, 0x7F93, 0x8293, + 0x7F8C, 0x7F8B, 0x82C1, 0x7EF5, 0x82BD, 0x7EF4, 0x7EF2, 0x7EED, + 0x7EEC, 0x82E5, 0x7F23, 0x7731, 0x7F22, 0x7F20, 0x830C, 0x7F1A, + 0x830C, 0x7F50, 0x7F4F, 0x7F4D, 0x7F4B, 0x82B6, 0x7F82, 0x7F80, + 0x7F7E, 0x7F7A, 0x82E0, 0x7F79, 0x82DA, 0x7FAD, 0x7FAB, 0x7FA9, + 0x7FA7, 0x8304, 0x7FDE, 0x7F13, 0x7F14, 0x7F0F, 0x82B1, 0x7F46, + 0x7F44, 0x82AC, 0x7F3E, 0x7F79, 0x7F77, 0x7F73, 0x8304, 0x7F72, + 0x8303, 0x7FA6, 0x7FA4, 0x7FA2, 0x7FD7, 0x8328, 0x7FD7, 0x7FD2, + 0x8008, 0x8006, 0x82D7, 0x8002, 0x7A3E, 0x8036, 0x8037, 0x7F72, + 0x7F70, 0x832C, 0x7FA4, 0x7FA2, 0x7FD7, 0x7FD6, 0x8353, 0x7FD2, + 0x7AB9, 0x8006, 0x8007, 0x8002, 0x8037, 0x7AF8, 0x8037, 0x7B39, + 0x8067, 0x8063, 0x7B34, 0x8099, 0x7B78, 0x8093, 0x80C5, 0x805B, + 0x8007, 0x7BAE, 0x803E, 0x7BEF, 0x8037, 0x806A, 0x7C2B, 0x8069, + 0x7C2A, 0x8099, 0x8098, 0x7C66, 0x80CB, 0x7CA4, 0x80FB, 0x7CA0, + 0x7C9B, 0x812A, 0x7CDC, 0x8126, 0x7D13, 0x80B8, 0x809F, 0x7D4F, + 0x80D2, 0x7C70, 0x8102, 0x7CAA, 0x7CA9, 0x8131, 0x7CE6, 0x8161, + 0x7CE0, 0x7D22, 0x818F, 0x7D59, 0x8189, 0x7D56, 0x8152, 0x7D90, + 0x7D8E, 0x816B, 0x7DC5, 0x8198, 0x7DFD, 0x7DFE, 0x7E37, 0x7E38, + 0x81F4, 0x7E6F, 0x7EA2, 0x7EA3, 0x7ED9, 0x81EB, 0x7E9B, 0x76F1, + 0x7E0A, 0x7E43, 0x7E41, 0x7E77, 0x822E, 0x7EAE, 0x7EAF, 0x7EE4, + 0x7EE3, 0x8256, 0x7F16, 0x7982, 0x7F4D, 0x7F80, 0x7F81, 0x7FB6, + 0x7A59, 0x7FB0, 0x7A55, 0x7F78, 0x7F3F, 0x82B8, 0x7F58, 0x7B1B, + 0x7FC2, 0x7B59, 0x7FF6, 0x7FF4, 0x8026, 0x8025, 0x7BD7, 0x808C, + 0x7C56, 0x8052, 0x8053, 0x7B6D, 0x8016, 0x7BAB, 0x8068, 0x7BE9, + 0x7C2C, 0x80CA, 0x7C64, 0x80F8, 0x7C9E, 0x80F7, 0x80F2, 0x7D15, + 0x80BE, 0x7D4D, 0x80D4, 0x7D87, 0x7DC3, 0x8136, 0x7DF7, 0x8196, + 0x7DB9, 0x7D7C, 0x7D78, 0x7D9B, 0x815D, 0x7DCF, 0x7864, 0x7E41, + 0x7E3F, 0x7E78, 0x7EAE, 0x793F, 0x7EDF, 0x7F17, 0x7EDE, 0x7EDC, + 0x787B, 0x7E9E, 0x7913, 0x7EF2, 0x7F2A, 0x7F28, 0x7F5B, 0x79E1, + 0x7FC2, 0x7A6B, 0x7FC2, 0x7FBD, 0x7AEF, 0x7F83, 0x7B6F, 0x7FD5, + 0x7BAD, 0x7BEA, 0x803B, 0x7C66, 0x8068, 0x7C9B, 0x7C5B, 0x802F, + 0x7C1C, 0x8048, 0x7C3E, 0x7C77, 0x7CB4, 0x7CF0, 0x80D8, 0x7D5F, + 0x76A1, 0x7DD1, 0x7DD0, 0x7DCE, 0x7D91, 0x817F, 0x7D8E, 0x787C, + 0x7DE4, 0x7E1D, 0x8146, 0x7E89, 0x77B1, 0x7EBD, 0x7EBB, 0x7E82, + 0x7E80, 0x7925, 0x7E9C, 0x79B3, 0x7F3E, 0x7F6E, 0x7A7A, 0x7F6D, + 0x7B3C, 0x7F67, 0x7BBC, 0x7B79, 0x7FB4, 0x7B75, 0x801C, 0x7B56, + 0x7B93, 0x8014, 0x7C0F, 0x7FFB, 0x7CC3, 0x8090, 0x7CF7, 0x7CF6, + 0x808B, 0x7CB7, 0x8088, 0x7D11, 0x7D4A, 0x7DBB, 0x7DF4, 0x8130, + 0x80FE, 0x7DEC, 0x80FA, 0x7DAE, 0x7E06, 0x7E3C, 0x7EA9, 0x816F, + 0x7EA5, 0x7945, 0x7E9F, 0x7EA0, 0x7EBD, 0x7F27, 0x7B17, 0x7F58, + 0x7B13, 0x7F52, 0x7F50, 0x7ACF, 0x7F9F, 0x7BAA, 0x8007, 0x7C62, + 0x7C5D, 0x7FCB, 0x7C59, 0x804B, 0x7C3A, 0x7C77, 0x7CEB, 0x7D5C, + 0x8040, 0x7D59, 0x7662, 0x7D1A, 0x7D3B, 0x7DAC, 0x7E17, 0x7907, + 0x7E16, 0x7906, 0x7E12, 0x7E0E, 0x78B8, 0x7ECD, 0x79F4, 0x7EC9, + 0x7EC7, 0x7AB5, 0x7EE3, 0x7AB1, 0x7F7C, 0x7AD1, 0x7B4C, 0x7F43, + 0x7C04, 0x7FF8, 0x7BFE, 0x7BC0, 0x7BBC, 0x7C59, 0x800E, 0x7D04, + 0x76C7, 0x7CC5, 0x7CC3, 0x7CE1, 0x7D8D, 0x80E1, 0x7DBE, 0x781A, + 0x7D86, 0x7DA4, 0x7E46, 0x7E79, 0x78E6, 0x7E3E, 0x7994, 0x7E5C, + 0x7EF8, 0x7A9A, 0x7EF4, 0x7A93, 0x7EBC, 0x7B33, 0x7BAC, 0x7F73, + 0x7BAB, 0x7F6D, 0x7BA4, 0x7C3C, 0x7CAE, 0x7CAF, 0x7FE8, 0x7C70, + 0x76B5, 0x7D72, 0x7D6D, 0x7D34, 0x7D35, 0x7745, 0x7DF8, 0x7965, + 0x7DF1, 0x7DF0, 0x795C, 0x7E75, 0x797F, 0x7E74, 0x7E72, 0x7A80, + 0x7F2B, 0x7A7F, 0x7F24, 0x7B93, 0x7B91, 0x7FA1, 0x7B52, 0x7FA0, + 0x7C5F, 0x7C5D, 0x7C59, 0x7C5A, 0x7FE2, 0x7D21, 0x76A3, 0x7D1D, + 0x781C, 0x7DA9, 0x7DA7, 0x7DA2, 0x7DA1, 0x7990, 0x7E60, 0x794A, + 0x7E28, 0x7E23, 0x7A6E, 0x7ED9, 0x7A6A, 0x7EA2, 0x7B7F, 0x7B7D, + 0x7F24, 0x7B3E, 0x7F1E, 0x7C47, 0x7C0D, 0x7C09, 0x7C9D, 0x8017, + 0x7CD1, 0x76BA, 0x7CCE, 0x7D93, 0x7D59, 0x7D58, 0x784E, 0x7E12, + 0x797E, 0x7DDA, 0x797B, 0x7A9C, 0x7E94, 0x7A9B, 0x7E5C, 0x7B6D, + 0x7B6C, 0x7B6D, 0x7B2C, 0x7F5A, 0x7BFE, 0x75A6, 0x7BFA, 0x7CC4, + 0x7CC2, 0x7CC0, 0x774F, 0x7D4C, 0x7748, 0x7D45, 0x7D44, 0x7888, + 0x7DCC, 0x79B2, 0x7DC6, 0x79B2, 0x7A8D, 0x7E49, 0x7A8D, 0x7ECA, + 0x7B5F, 0x7B5D, 0x7B23, 0x7B1E, 0x7F12, 0x7BED, 0x768C, 0x7C79, + 0x7C78, 0x7C79, 0x7C77, 0x77D3, 0x7D00, 0x78C5, 0x7DBD, 0x7D87, + 0x78C3, 0x7D83, 0x79A7, 0x7E05, 0x7A84, 0x7A82, 0x7E85, 0x7B52, + 0x7F04, 0x7B51, 0x7B11, 0x7BE1, 0x7BDF, 0x7F48, 0x7C6C, 0x771B, + 0x7C68, 0x7CF6, 0x7CF1, 0x7CF0, 0x780E, 0x7D78, 0x78FD, 0x7D72, + 0x7DF9, 0x79DC, 0x7DC0, 0x7AB5, 0x7E42, 0x7A73, 0x7B47, 0x7EC2, + 0x7B41, 0x7F0C, 0x7BD1, 0x7BD2, 0x7C60, 0x7C5E, 0x7F82, 0x7CE7, + 0x7852, 0x7CE4, 0x7D6B, 0x7D69, 0x7D36, 0x7935, 0x7DB8, 0x79D6, + 0x79D1, 0x7E35, 0x7AA5, 0x7AA6, 0x7E81, 0x7B39, 0x7EFC, 0x7BC7, + 0x7BC8, 0x7C56, 0x7C54, 0x7F44, 0x7CDA, 0x779F, 0x7CA5, 0x7D2A, + 0x7D28, 0x7D29, 0x7931, 0x7DAB, 0x7A0B, 0x7DF9, 0x7A9F, 0x7A9E, + 0x7E76, 0x7B31, 0x7EC0, 0x7BC1, 0x7BBD, 0x7BBE, 0x7C4C, 0x76EF, + 0x7C46, 0x77E3, 0x7C9A, 0x7D21, 0x78C9, 0x7D1E, 0x796B, 0x7D6B, + 0x7A06, 0x7A04, 0x7DEC, 0x7A98, 0x7E39, 0x7B2C, 0x757D, 0x7BB9, + 0x7BB7, 0x7BB5, 0x7C44, 0x777A, 0x7C95, 0x7824, 0x7C8F, 0x7D16, + 0x78C7, 0x7D67, 0x79A5, 0x7D60, 0x7A3A, 0x79FF, 0x7E2F, 0x7A93, + 0x7509, 0x7B24, 0x7B25, 0x7BB4, 0x7BAF, 0x76CE, 0x7C01, 0x77BE, + 0x7C8D, 0x7864, 0x7862, 0x7CD9, 0x7902, 0x7D5C, 0x79A0, 0x7A36, + 0x7A34, 0x7ACA, 0x7DF5, 0x7AC7, 0x755B, 0x7B1C, 0x7BAA, 0x7BA9, + 0x7BFF, 0x7710, 0x7C85, 0x77BC, 0x7C82, 0x7CD1, 0x793F, 0x7D54, + 0x799E, 0x7D9F, 0x7A36, 0x7A34, 0x7AC7, 0x7AC5, 0x74EE, 0x7B1A, + 0x75AD, 0x7BA4, 0x7BA2, 0x7758, 0x7C7E, 0x7804, 0x7C7D, 0x78A3, + 0x7941, 0x7D1B, 0x79D9, 0x7D9A, 0x79D5, 0x7A2F, 0x7AC2, 0x7AC0, + 0x7E2D, 0x7B15, 0x7646, 0x7B9F, 0x76F4, 0x7BF4, 0x7C79, 0x7842, + 0x7CCA, 0x78E1, 0x7D15, 0x793D, 0x7D11, 0x79D2, 0x7A66, 0x7DAB, + 0x7ABE, 0x7E27, 0x7B4B, 0x7B49, 0x7B9D, 0x7B9E, 0x773C, 0x7C76, + 0x7885, 0x7C70, 0x78E2, 0x78E3, 0x7D0D, 0x7978, 0x7D5E, 0x7A66, + 0x7A67, 0x7ABE, 0x7ABC, 0x7DEE, 0x7B46, 0x76D6, 0x7B9B, 0x7BEB, + 0x77E4, 0x7C6F, 0x7887, 0x7CBD, 0x791D, 0x797A, 0x7978, 0x7A0F, + 0x7DA1, 0x7A64, 0x7507, 0x7AB9, 0x7B45, 0x7B44, 0x7B9A, 0x76DD, + 0x7BE6, 0x7827, 0x7C37, 0x78C4, 0x791F, 0x7D06, 0x79B4, 0x73D9, + 0x7A0F, 0x7A66, 0x7AF0, 0x7AF1, 0x7610, 0x7B43, 0x767D, 0x7B94, + 0x77CB, 0x7869, 0x7C33, 0x78C6, 0x7C84, 0x7925, 0x79B6, 0x79B7, + 0x7A0E, 0x7D69, 0x7A63, 0x75AC, 0x7B43, 0x7B42, 0x76C6, 0x7B93, + 0x77D0, 0x7BE2, 0x786D, 0x78CB, 0x7962, 0x7960, 0x7CCB, 0x79B9, + 0x748E, 0x7A9D, 0x7A9B, 0x7AF2, 0x7B42, 0x7710, 0x7B94, 0x7771, + 0x7812, 0x7810, 0x7872, 0x7C7E, 0x7964, 0x7286, 0x79BA, 0x7A4A, + 0x7A48, 0x7A9F, 0x759A, 0x7AF1, 0x76B0, 0x7B92, 0x77B5, 0x77B9, + 0x7C33, 0x78AF, 0x7C7E, 0x7908, 0x7966, 0x79F3, 0x7A4A, 0x7536, + 0x7A9D, 0x75E5, 0x7AEF, 0x7B42, 0x775D, 0x7B91, 0x77FA, 0x7C31, + 0x7C32, 0x78B1, 0x7CC9, 0x79A3, 0x79F7, 0x7D60, 0x7A4A, 0x7586, + 0x7AF4, 0x7AF2, 0x7B43, 0x7B93, 0x77A2, 0x7BE1, 0x785F, 0x7C30, + 0x794E, 0x7949, 0x7D16, 0x79FB, 0x746F, 0x7A4D, 0x75D5, 0x7AF5, + 0x7AF3, 0x7749, 0x7B97, 0x77A6, 0x7BE2, 0x789C, 0x78F7, 0x7CC9, + 0x79A6, 0x7D11, 0x79FF, 0x7577, 0x7AA4, 0x7AA5, 0x76ED, 0x7B46, + 0x77EA, 0x7B95, 0x784A, 0x78A2, 0x78FD, 0x78FB, 0x7CC7, 0x79AA, + 0x74AB, 0x7A53, 0x7A54, 0x762C, 0x7AF8, 0x7734, 0x7B99, 0x77F1, + 0x7850, 0x78AB, 0x78A9, 0x7C7C, 0x7956, 0x74FD, 0x7A04, 0x7A02, + 0x767A, 0x7AAA, 0x76DB, 0x7B4B, 0x779C, 0x77F7, 0x7853, 0x78EA, + 0x7C7E, 0x7996, 0x73E2, 0x79E9, 0x75B7, 0x7A08, 0x7A5C, 0x7681, + 0x7AFA, 0x77E0, 0x77DE, 0x783A, 0x7895, 0x7C33, 0x7944, 0x73C6, + 0x79F0, 0x755D, 0x7A95, 0x7A93, 0x76C9, 0x7AFF, 0x778A, 0x77E9, + 0x7841, 0x783F, 0x7898, 0x78F2, 0x7425, 0x799E, 0x74FC, 0x7A44, + 0x7A97, 0x7673, 0x7AB1, 0x7734, 0x7B4F, 0x77EF, 0x784A, 0x78A2, + 0x78FA, 0x73BD, 0x79A6, 0x754F, 0x7A4B, 0x7A9C, 0x7619, 0x7AB8, + 0x7779, 0x7B56, 0x7833, 0x788B, 0x78E3, 0x78A8, 0x741A, 0x7954, + 0x759E, 0x7A4F, 0x7663, 0x7AEE, 0x7AEF, 0x7781, 0x7B57, 0x7837, + 0x7BEF, 0x78E7, 0x793F, 0x7990, 0x7959, 0x7540, 0x7A54, 0x760D, + 0x7AF5, 0x7AF0, 0x778B, 0x7B59, 0x783F, 0x7BC4, 0x78EF, 0x7943, + 0x7998, 0x79B6, 0x75F7, 0x7A58, 0x76B9, 0x7AF6, 0x7774, 0x782A, + 0x7BAC, 0x7847, 0x7BC5, 0x78F3, 0x7466, 0x79EF, 0x79ED, 0x7602, + 0x7A5A, 0x76C4, 0x7AFB, 0x77D9, 0x782E, 0x7886, 0x7885, 0x7399, + 0x7951, 0x7471, 0x79F4, 0x75AA, 0x760D, 0x7AB0, 0x772A, 0x7ACA, + 0x77E1, 0x7839, 0x78E5, 0x78E6, 0x745C, 0x7956, 0x7591, 0x79FB, + 0x7657, 0x7714, 0x7B04, 0x776E, 0x7B6C, 0x783F, 0x7323, 0x793F, + 0x793E, 0x74D3, 0x79B0, 0x759F, 0x7A1C, 0x76C3, 0x771F, 0x77D5, + 0x782A, 0x7B6E, 0x789E, 0x73ED, 0x7947, 0x7524, 0x75EC, 0x7A57, + 0x76AA, 0x7A70, 0x7725, 0x7784, 0x7831, 0x7888, 0x731F, 0x78F9, + 0x7467, 0x796B, 0x7594, 0x765B, 0x7A29, 0x776B, 0x7AC4, 0x778B, + 0x7294, 0x7892, 0x78B0, 0x74B7, 0x79A6, 0x75E3, 0x7A13, 0x7603, + 0x76C1, 0x7777, 0x77CF, 0x7B32, 0x7843, 0x7319, 0x78B7, 0x745E, + 0x752B, 0x79CB, 0x764F, 0x7A67, 0x76CD, 0x7780, 0x7830, 0x77F5, + 0x78A3, 0x7BE6, 0x7913, 0x757A, 0x79B6, 0x75FC, 0x7A6F, 0x7A3D, + 0x7731, 0x7AD5, 0x7839, 0x73CA, 0x78AA, 0x78FE, 0x791A, 0x79BE, + 0x7648, 0x7A27, 0x76C3, 0x7774, 0x7775, 0x77EA, 0x7B40, 0x785E, + 0x74AA, 0x7922, 0x7571, 0x75F5, 0x7A2F, 0x76AE, 0x7A98, 0x77D7, + 0x72F2, 0x789E, 0x789D, 0x790E, 0x7960, 0x75DE, 0x79CC, 0x765D, + 0x7714, 0x7733, 0x77E2, 0x7B02, 0x7856, 0x7443, 0x78C6, 0x750A, + 0x758B, 0x79D4, 0x7647, 0x7A3D, 0x7775, 0x7209, 0x783F, 0x785E, + 0x742D, 0x78CE, 0x7578, 0x798B, 0x7658, 0x76B1, 0x76D3, 0x7783, + 0x72DA, 0x7848, 0x73D5, 0x78BB, 0x7505, 0x7586, 0x7993, 0x7605, + 0x7A4C, 0x7715, 0x7195, 0x77AA, 0x7853, 0x7428, 0x7913, 0x7572, + 0x7980, 0x764D, 0x764E, 0x7722, 0x7720, 0x72D8, 0x77E9, 0x73D3, + 0x7879, 0x74C2, 0x75DD, 0x7988, 0x76B6, 0x6FFF, 0x7785, 0x7257, + 0x77F3, 0x7814, 0x7426, 0x78D5, 0x750B, 0x798F, 0x7644, 0x76C1, + 0x76BF, 0x7790, 0x72D6, 0x7801, 0x7434, 0x78BF, 0x751C, 0x757C, + 0x7997, 0x7656, 0x7083, 0x7722, 0x72C2, 0x780B, 0x7809, 0x74AB, + 0x78E7, 0x7589, 0x6EB6, 0x76BB, 0x76B9, 0x772F, 0x77A2, 0x7341, + 0x7864, 0x7494, 0x78D4, 0x7576, 0x764E, 0x79A6, 0x76C6, 0x7A78, + 0x7738, 0x72E8, 0x7870, 0x786F, 0x7505, 0x7949, 0x75A5, 0x79AF, + 0x76D0, 0x76F2, 0x779C, 0x780B, 0x73CA, 0x7879, 0x7512, 0x7953, + 0x75F0, 0x766A, 0x7689, 0x7733, 0x72C5, 0x7815, 0x73B7, 0x7883, + 0x74C7, 0x7580, 0x795B, 0x7674, 0x70C8, 0x7740, 0x726C, 0x77CE, + 0x7820, 0x7450, 0x78FB, 0x7590, 0x6FC3, 0x7660, 0x76D7, 0x774A, + 0x77BD, 0x73B8, 0x782A, 0x749E, 0x757B, 0x75F6, 0x7615, 0x766E, + 0x76E4, 0x7249, 0x77CA, 0x742C, 0x742D, 0x750B, 0x7588, 0x7977, + 0x7604, 0x70E5, 0x76EE, 0x72C7, 0x73BA, 0x7840, 0x749D, 0x78AD, + 0x7599, 0x7033, 0x7632, 0x76DD, 0x72B5, 0x776E, 0x742A, 0x784D, + 0x74AD, 0x7587, 0x75FE, 0x7678, 0x7133, 0x76EA, 0x72C9, 0x77CC, + 0x743E, 0x743C, 0x7517, 0x7594, 0x7038, 0x7682, 0x71BC, 0x7766, + 0x7340, 0x742C, 0x77F5, 0x7529, 0x6E7B, 0x75A2, 0x7027, 0x768F, + 0x7703, 0x72CB, 0x77E2, 0x7439, 0x6BE9, 0x7536, 0x75B1, 0x762B, + 0x769B, 0x71C1, 0x7710, 0x7342, 0x73C8, 0x74A9, 0x7524, 0x75A2, + 0x7619, 0x713F, 0x76A9, 0x72CB, 0x73B8, 0x743A, 0x74B8, 0x787F, + 0x78EB, 0x7625, 0x7699, 0x770C, 0x7727, 0x7797, 0x7804, 0x7447, + 0x788B, 0x7544, 0x75BB, 0x7632, 0x76A6, 0x79F4, 0x7732, 0x7437, + 0x780E, 0x7534, 0x75AB, 0x78FA, 0x763E, 0x797E, 0x7725, 0x7343, + 0x77AD, 0x744B, 0x74C6, 0x789E, 0x75B8, 0x7921, 0x76BE, 0x72D0, + 0x774C, 0x77BC, 0x745A, 0x783E, 0x7550, 0x70A3, 0x763B, 0x7658, + 0x76CB, 0x773B, 0x73C9, 0x7831, 0x7540, 0x755F, 0x75D7, 0x7648, + 0x76BE, 0x76D7, 0x7356, 0x77D0, 0x7458, 0x754D, 0x75C7, 0x75E6, + 0x7656, 0x76CA, 0x7349, 0x7752, 0x73EB, 0x746A, 0x74E5, 0x75D6, + 0x712B, 0x7663, 0x724D, 0x76F1, 0x73DB, 0x745A, 0x7851, 0x74F4, + 0x7018, 0x7601, 0x71D3, 0x76E2, 0x72E6, 0x73EA, 0x77F4, 0x74E4, + 0x6F8E, 0x75F1, 0x71C2, 0x767D, 0x76ED, 0x73DA, 0x7793, 0x7478, + 0x6EDB, 0x756B, 0x7600, 0x766E, 0x768C, 0x72EC, 0x7783, 0x7468, + 0x6E4D, 0x7503, 0x7598, 0x713B, 0x767C, 0x72D9, 0x7726, 0x73FF, + 0x7478, 0x74F3, 0x7588, 0x70BC, 0x761B, 0x7268, 0x7716, 0x73EF, + 0x740E, 0x748A, 0x7523, 0x70AF, 0x760B, 0x7258, 0x76B5, 0x737F, + 0x73FE, 0x747A, 0x7513, 0x709F, 0x7619, 0x71E0, 0x76A5, 0x7372, + 0x7395, 0x77B2, 0x74AA, 0x7853, 0x75B4, 0x7628, 0x7644, 0x76CC, + 0x7382, 0x77C2, 0x749A, 0x77F6, 0x75A4, 0x75C3, 0x764F, 0x76BF, + 0x7315, 0x7762, 0x7431, 0x7523, 0x753F, 0x75B3, 0x763F, 0x765D, + 0x7386, 0x7755, 0x749B, 0x74BA, 0x752F, 0x75C1, 0x78A8, 0x766B, + 0x72F4, 0x775F, 0x7432, 0x74AA, 0x7540, 0x755C, 0x71DD, 0x765B, + 0x7309, 0x7702, 0x7422, 0x74B9, 0x780A, 0x754C, 0x7168, 0x7669, + 0x7298, 0x7399, 0x7433, 0x7453, 0x7815, 0x755D, 0x7158, 0x7608, + 0x730D, 0x732D, 0x73CA, 0x7443, 0x77BA, 0x756E, 0x714B, 0x7616, + 0x729D, 0x731C, 0x7729, 0x7457, 0x701D, 0x755E, 0x7160, 0x7606, + 0x728C, 0x73AF, 0x7733, 0x7468, 0x6F9D, 0x756C, 0x714F, 0x7616, + 0x72A4, 0x7342, 0x7741, 0x7458, 0x7028, 0x757D, 0x7167, 0x7210, + 0x76AF, 0x7335, 0x774F, 0x7469, 0x6FA8, 0x758B, 0x717C, 0x7225, + 0x76BA, 0x7346, 0x6E37, 0x7477, 0x702C, 0x7596, 0x75B4, 0x729A, + 0x765B, 0x73D2, 0x6DAB, 0x7488, 0x6FB3, 0x75A6, 0x75C2, 0x72AB, + 0x7669, 0x736C, 0x6E45, 0x7499, 0x7037, 0x7175, 0x75D3, 0x72BD, + 0x7677, 0x737A, 0x6E61, 0x74A7, 0x7536, 0x7187, 0x75E1, 0x724F, + 0x6C1E, 0x738B, 0x6F85, 0x74B8, 0x7544, 0x7179, 0x75EF, 0x72C1, + 0x6CC7, 0x7417, 0x74AA, 0x74C6, 0x7555, 0x718E, 0x75FA, 0x72F7, + 0x6D92, 0x7428, 0x74BB, 0x7048, 0x7563, 0x71C5, 0x7628, 0x7308, + 0x6DB1, 0x7436, 0x74C9, 0x70EB, 0x7592, 0x723A, 0x7636, 0x7394, + 0x742B, 0x7447, 0x74DA, 0x70FF, 0x759D, 0x7270, 0x6C08, 0x73A2, + 0x7439, 0x7476, 0x7506, 0x719A, 0x75AA, 0x7300, 0x6D86, 0x73B4, + 0x744A, 0x7058, 0x7514, 0x71D4, 0x7645, 0x730E, 0x73A5, 0x73E6, + 0x7479, 0x7070, 0x753F, 0x7265, 0x75E7, 0x731F, 0x73D8, 0x746B, + 0x7487, 0x7131, 0x75BD, 0x7279, 0x7314, 0x73C9, 0x73E9, 0x749A, + 0x7526, 0x71CC, 0x75E5, 0x72AC, 0x7347, 0x73D8, 0x7489, 0x74A8, + 0x7552, 0x71DD, 0x7611, 0x7335, 0x73EA, 0x740A, 0x749A, 0x712C, + 0x7560, 0x728F, 0x761E, 0x7368, 0x73FC, 0x74A9, 0x74C6, 0x71E2, + 0x758B, 0x72C2, 0x735D, 0x740C, 0x742B, 0x74D5, 0x74F1, 0x71FA, + 0x75B7, 0x72D4, 0x738C, 0x741D, 0x74C7, 0x7504, 0x758D, 0x722D, + 0x7648, 0x737E, 0x742C, 0x744C, 0x74F6, 0x71FF, 0x75B5, 0x72D8, + 0x7670, 0x73AD, 0x7459, 0x7478, 0x7522, 0x7232, 0x75E1, 0x730B, + 0x73BD, 0x6FEF, 0x70BF, 0x7163, 0x7224, 0x75ED, 0x7300, 0x6F32, + 0x745D, 0x70B4, 0x7179, 0x7199, 0x725A, 0x6DAA, 0x73C2, 0x6FFB, + 0x748C, 0x70EB, 0x71AC, 0x726D, 0x7302, 0x6E82, 0x73F1, 0x7035, + 0x7181, 0x71A1, 0x725C, 0x7315, 0x7350, 0x7003, 0x741D, 0x70F3, + 0x71B4, 0x7272, 0x7328, 0x6E91, 0x73F6, 0x703D, 0x74D5, 0x71A6, + 0x7263, 0x72A2, 0x7357, 0x6F5E, 0x7440, 0x70FB, 0x71BA, 0x7277, + 0x72B8, 0x7367, 0x7416, 0x7049, 0x746C, 0x71D0, 0x728A, 0x72C8, + 0x737A, 0x6F8F, 0x7442, 0x7125, 0x7520, 0x729D, 0x72BA, 0x736C, + 0x73A7, 0x7051, 0x748C, 0x71D8, 0x6C52, 0x72CD, 0x737F, 0x73B7, + 0x7461, 0x712A, 0x753F, 0x7227, 0x6DFD, 0x731B, 0x73C9, 0x707B, + 0x74AB, 0x71FB, 0x7585, 0x72F3, 0x6ECE, 0x73D9, 0x7414, 0x7154, + 0x7579, 0x7250, 0x6E0C, 0x733E, 0x6FBA, 0x74AF, 0x74E6, 0x7225, + 0x75BF, 0x7316, 0x6FAD, 0x741A, 0x70BC, 0x717E, 0x7235, 0x7273, + 0x7602, 0x7361, 0x708B, 0x7464, 0x718E, 0x7248, 0x7286, 0x7354, + 0x6FDB, 0x743A, 0x70E6, 0x7512, 0x727A, 0x72B8, 0x7367, 0x73A2, + 0x70BB, 0x7481, 0x71B8, 0x728D, 0x72CB, 0x7377, 0x73B2, 0x7474, + 0x71AB, 0x6C5D, 0x729D, 0x6F0C, 0x6F55, 0x73DF, 0x7104, 0x74BE, + 0x71FD, 0x6E24, 0x730A, 0x6FED, 0x70D5, 0x7117, 0x71F1, 0x6D61, + 0x72E2, 0x6F3D, 0x7026, 0x70EC, 0x712B, 0x7204, 0x72D5, 0x6E7F, + 0x734E, 0x703D, 0x711E, 0x71F7, 0x7236, 0x6E4C, 0x7323, 0x7030, + 0x685B, 0x7132, 0x720B, 0x7249, 0x7317, 0x6F5E, 0x7414, 0x7128, + 0x6BA1, 0x723C, 0x6E5D, 0x6F4E, 0x737F, 0x7080, 0x7479, 0x719C, + 0x6D97, 0x72AC, 0x6F68, 0x7051, 0x746D, 0x716D, 0x6CA6, 0x7281, + 0x6EB1, 0x6FA1, 0x7087, 0x7164, 0x71A0, 0x7272, 0x6EA4, 0x72EA, + 0x707A, 0x70BC, 0x7196, 0x71D4, 0x6DBF, 0x72E1, 0x6FA9, 0x73FD, + 0x70F1, 0x71CB, 0x7206, 0x72D1, 0x6F9F, 0x73D0, 0x70C6, 0x6BAE, + 0x71FA, 0x72C8, 0x6EEB, 0x733D, 0x70B7, 0x7452, 0x71ED, 0x6DC3, + 0x72F6, 0x6FCB, 0x7011, 0x7446, 0x714C, 0x6CFC, 0x725D, 0x6EF5, + 0x7004, 0x70E2, 0x7121, 0x74C2, 0x7250, 0x6EEC, 0x736E, 0x703A, + 0x7115, 0x7175, 0x7244, 0x6E34, 0x7364, 0x702D, 0x73F1, 0x7168, + 0x71A7, 0x7272, 0x72CC, 0x7024, 0x73E4, 0x715F, 0x719A, 0x7284, + 0x72C2, 0x6F77, 0x73D8, 0x7152, 0x7464, 0x71EA, 0x6E5A, 0x730C, + 0x7050, 0x70AE, 0x7184, 0x6D2E, 0x721C, 0x6F61, 0x6FA0, 0x70A4, + 0x70E3, 0x6D21, 0x7210, 0x6F54, 0x734B, 0x7095, 0x70D6, 0x71C8, + 0x7222, 0x6E7E, 0x733F, 0x6FF2, 0x6B0A, 0x712A, 0x6D7B, 0x6E93, + 0x7336, 0x6FE2, 0x6AFD, 0x711E, 0x6D6E, 0x7265, 0x6F96, 0x6FD9, + 0x70D3, 0x7133, 0x6D61, 0x7259, 0x6EC3, 0x6FCC, 0x702D, 0x7123, + 0x6D5B, 0x726B, 0x6EDC, 0x72FB, 0x7024, 0x6B5C, 0x7177, 0x71D4, + 0x6ECF, 0x730D, 0x7039, 0x6B4F, 0x7189, 0x6DB1, 0x6EC6, 0x6F2B, + 0x702D, 0x73A8, 0x717D, 0x6DCA, 0x7233, 0x6F1F, 0x7042, 0x7081, + 0x7192, 0x6DC1, 0x7226, 0x6F37, 0x68FB, 0x7096, 0x70F4, 0x6D04, + 0x7238, 0x6F2B, 0x736D, 0x70A9, 0x6C83, 0x71F4, 0x6E36, 0x6F43, + 0x72DB, 0x709F, 0x6CA3, 0x7157, 0x6E2D, 0x6F59, 0x6FBA, 0x70B1, + 0x710F, 0x716C, 0x6E46, 0x72A6, 0x6FB1, 0x7012, 0x7124, 0x717E, + 0x6E39, 0x72B7, 0x6FC3, 0x6A81, 0x7136, 0x6D13, 0x71CE, 0x72C9, + 0x6FDC, 0x7371, 0x714B, 0x6D30, 0x71FB, 0x6ECD, 0x6FEE, 0x704F, + 0x715D, 0x6D49, 0x720D, 0x6EE6, 0x7007, 0x7062, 0x70BF, 0x71C9, + 0x721F, 0x6EFF, 0x72CB, 0x707A, 0x6C37, 0x71DB, 0x7231, 0x6F11, + 0x694A, 0x708C, 0x6C2A, 0x7141, 0x6EC5, 0x6F2A, 0x6F8C, 0x709E, + 0x6C47, 0x7153, 0x6EDB, 0x6F3D, 0x6F9E, 0x70B1, 0x6C60, 0x7186, + 0x6E2D, 0x6928, 0x6FB4, 0x6C08, 0x713E, 0x7198, 0x6E45, 0x7248, + 0x6FEB, 0x6C25, 0x7151, 0x6DF5, 0x6E5B, 0x6F9F, 0x6FFD, 0x6C42, + 0x7181, 0x6E0B, 0x67C2, 0x6FB5, 0x7013, 0x708F, 0x7196, 0x6E47, + 0x725E, 0x6FE9, 0x6B24, 0x70A1, 0x6D08, 0x6E60, 0x6EC2, 0x6FFC, + 0x6B64, 0x70D2, 0x6D44, 0x6E98, 0x6EFA, 0x7033, 0x6B81, 0x7106, + 0x6D5E, 0x71B3, 0x6F32, 0x6B2C, 0x70BE, 0x6D0D, 0x6D99, 0x71E4, + 0x6F44, 0x6B49, 0x70EF, 0x6D49, 0x6DB2, 0x6F1A, 0x6F7C, 0x6B89, + 0x7120, 0x6D85, 0x71EB, 0x6F30, 0x6FAD, 0x700B, 0x7150, 0x6D9E, + 0x7218, 0x6F65, 0x6B74, 0x703F, 0x6D70, 0x6DD6, 0x6E5F, 0x6F99, + 0x6B91, 0x708F, 0x6DAC, 0x6E12, 0x6E97, 0x6FCD, 0x704A, 0x70C0, + 0x6DE5, 0x718F, 0x6ECF, 0x6A99, 0x707B, 0x6CA5, 0x6E1D, 0x71DB, + 0x6F04, 0x6AB6, 0x70C8, 0x6CE5, 0x6E55, 0x6EDA, 0x6F38, 0x7083, + 0x70FB, 0x6D21, 0x71DF, 0x6F0E, 0x6F8C, 0x7009, 0x7147, 0x6E63, + 0x7228, 0x6F43, 0x6B0F, 0x703A, 0x6D2F, 0x6E98, 0x6F19, 0x6F96, + 0x7010, 0x6CDE, 0x6D6B, 0x6EEF, 0x6F6D, 0x6AFA, 0x7060, 0x6D3D, + 0x714B, 0x6F24, 0x6AC8, 0x701B, 0x7094, 0x6D79, 0x7197, 0x6E80, + 0x6B0C, 0x706B, 0x6D48, 0x6DD1, 0x6E56, 0x6ED7, 0x6B76, 0x70BA, + 0x6DA7, 0x6753, 0x6EAD, 0x6B1E, 0x6BD9, 0x7103, 0x6E02, 0x7202, + 0x6F01, 0x6B88, 0x7017, 0x6DB5, 0x6E59, 0x6ED7, 0x6F55, 0x6BEB, + 0x7067, 0x6E10, 0x6923, 0x6F2B, 0x6BBD, 0x6C4E, 0x70B3, 0x6E83, + 0x6999, 0x6F7F, 0x6C20, 0x6CAD, 0x6D3A, 0x6ED7, 0x6F58, 0x6FEE, + 0x6C7F, 0x70F8, 0x6DB2, 0x69D9, 0x6FC7, 0x6C51, 0x6CDE, 0x715C, + 0x6E0C, 0x6A44, 0x7033, 0x6CB1, 0x6D60, 0x6DE2, 0x6E83, 0x6AAF, + 0x6F9A, 0x6D32, 0x678C, 0x6E59, 0x6A80, 0x6F70, 0x6D04, 0x6D8A, + 0x712B, 0x6ECF, 0x6AEB, 0x6FDF, 0x6D60, 0x6E05, 0x6EA5, 0x6F42, + 0x6B75, 0x704B, 0x6DDA, 0x6879, 0x6F18, 0x6B47, 0x6BFB, 0x6DD0, + 0x6E51, 0x68F3, 0x6F84, 0x6BCD, 0x70AE, 0x6D2A, 0x6EE4, 0x6F7D, + 0x7012, 0x6C53, 0x7131, 0x6DA5, 0x695E, 0x6EE3, 0x6C25, 0x6CD2, + 0x6D77, 0x6E3B, 0x6B42, 0x6F6E, 0x6CC7, 0x6D70, 0x6E11, 0x6EAE, + 0x6BEF, 0x6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C3, 0x6DA4, 0x6972, 0x6F7F, 0x6BB2, 0x6CBB, 0x6DB8, + 0x6EAA, 0x6AB6, 0x6F08, 0x6CD3, 0x6872, 0x6EC1, 0x6ACE, 0x6BE6, + 0x6D07, 0x6E00, 0x69C9, 0x6E65, 0x6C1E, 0x673A, 0x6DFC, 0x69E5, + 0x6B02, 0x6F7C, 0x6D56, 0x68CD, 0x6DB9, 0x6B41, 0x6C6D, 0x6CED, + 0x6CD7, 0x6A40, 0x6EF9, 0x6C85, 0x679D, 0x6D0E, 0x6A58, 0x6F2C, + 0x6BD5, 0x6BFE, 0x6D42, 0x6E53, 0x6B26, 0x6F03, 0x6C39, 0x696B, + 0x6E87, 0x69E4, 0x6B44, 0x6C71, 0x6DAD, 0x68D3, 0x6E5E, 0x6B83, + 0x65C9, 0x6DDD, 0x6916, 0x6A63, 0x6BBB, 0x6CFF, 0x67CE, 0x6DB8, + 0x6A9E, 0x6C16, 0x6D53, 0x6D70, 0x6999, 0x6EF9, 0x6C4D, 0x6695, + 0x6D0A, 0x69DC, 0x6B3C, 0x6CA1, 0x6CC2, 0x68A3, 0x6E73, 0x6B97, + 0x656C, 0x6C5C, 0x68EA, 0x6A7E, 0x6BF2, 0x6C10, 0x67A2, 0x6DEC, + 0x6ADD, 0x63FC, 0x6BA6, 0x67E9, 0x6E3C, 0x6B38, 0x6B3A, 0x6BE9, + 0x6D42, 0x6A1B, 0x6DE3, 0x6AC8, 0x670A, 0x6DB2, 0x6DB3, 0x6A58, + 0x6F6C, 0x6CB7, 0x6954, 0x6D55, 0x69EE, 0x6BAA, 0x6D2A, 0x6D28, + 0x696E, 0x6EE7, 0x6C24, 0x685E, 0x6CCA, 0x6923, 0x6AF3, 0x6C9B, + 0x6C99, 0x682D, 0x6E7F, 0x6B6E, 0x6787, 0x6C3B, 0x6854, 0x6A58, + 0x6C0C, 0x6C0A, 0x6CD1, 0x6DFC, 0x6DFD, 0x6BBE, 0x6F56, 0x6D60, + 0x6995, 0x6E35, 0x6B77, 0x6C3F, 0x6D90, 0x6D72, 0x6B2E, 0x6EF2, + 0x6CF1, 0x68CA, 0x6DCA, 0x6AE0, 0x6BCF, 0x6D25, 0x6D07, 0x6A93, + 0x6E8E, 0x6C85, 0x67F7, 0x6D62, 0x6A44, 0x6B3B, 0x6C97, 0x6C9B, + 0x69F4, 0x6E23, 0x6C12, 0x671C, 0x6D10, 0x69A5, 0x6AC4, 0x6C2A, + 0x6C28, 0x6958, 0x6DBB, 0x6BA2, 0x663C, 0x6CA4, 0x6905, 0x6A2C, + 0x6BBA, 0x6B98, 0x68B4, 0x6D50, 0x6B2E, 0x6B6F, 0x6C57, 0x6D2B, + 0x69B0, 0x6E70, 0x6B28, 0x680C, 0x6CE5, 0x6ADA, 0x6AFF, 0x6C07, + 0x6CBF, 0x6934, 0x6E28, 0x6AB4, 0x675C, 0x6C98, 0x6A66, 0x6A87, + 0x6BD6, 0x6C53, 0x6890, 0x6DC0, 0x6A3C, 0x66A8, 0x6C2C, 0x6A11, + 0x6A0F, 0x6B86, 0x6C03, 0x680F, 0x6D58, 0x69CC, 0x65EC, 0x6BBC, + 0x6999, 0x6997, 0x6B75, 0x6B93, 0x67B2, 0x6D0C, 0x6997, 0x652F, + 0x6B50, 0x691C, 0x691E, 0x6B21, 0x6B22, 0x672A, 0x6CA0, 0x6942, + 0x6466, 0x6B43, 0x68A0, 0x689E, 0x6AD0, 0x6AAE, 0x66C9, 0x6C53, + 0x6931, 0x638E, 0x6B6E, 0x681F, 0x681D, 0x6A5C, 0x6A5A, 0x6664, + 0x6BE7, 0x6920, 0x62AD, 0x6BC0, 0x67C2, 0x679C, 0x6A07, 0x69E5, + 0x6E5A, 0x6BFA, 0x6956, 0x6DF5, 0x6B6D, 0x6B71, 0x6CAA, 0x6CA8, + 0x6990, 0x6EB9, 0x6C81, 0x6965, 0x6DAF, 0x6B1F, 0x6AFD, 0x6C5A, + 0x693A, 0x6A2F, 0x6AD4, 0x6C38, 0x6910, 0x6D47, 0x6AAE, 0x6653, + 0x6C0D, 0x68E1, 0x6A85, 0x6A83, 0x6BE8, 0x68B7, 0x6CFB, 0x6A5A, + 0x65EE, 0x6BC0, 0x6868, 0x6A34, 0x6A32, 0x6B9B, 0x683A, 0x6CAF, + 0x6A09, 0x6564, 0x6B70, 0x680E, 0x69DF, 0x6A29, 0x6B4A, 0x67E1, + 0x6C65, 0x69B4, 0x64FE, 0x6C3C, 0x67B5, 0x698A, 0x6AFC, 0x6AFD, + 0x6784, 0x6D25, 0x695F, 0x6491, 0x6BF2, 0x6758, 0x6935, 0x6AAB, + 0x6AA9, 0x672A, 0x6CDC, 0x6A85, 0x6427, 0x6BA5, 0x68E2, 0x68E0, + 0x6A5A, 0x6B7C, 0x66C9, 0x6C93, 0x6A34, 0x63B9, 0x6B58, 0x6889, + 0x6A07, 0x6A09, 0x6B2F, 0x685F, 0x6C47, 0x69DF, 0x6664, 0x6B07, + 0x6830, 0x69B6, 0x69B7, 0x6AFE, 0x682A, 0x6CEE, 0x698E, 0x6602, + 0x6BD6, 0x67FE, 0x6964, 0x6AAF, 0x6AB1, 0x67D1, 0x6CA1, 0x6939, + 0x65A4, 0x6B89, 0x67A5, 0x6933, 0x6A5E, 0x6B80, 0x6777, 0x6C58, + 0x6A38, 0x653E, 0x6B5C, 0x68DC, 0x6A2F, 0x6A10, 0x6B33, 0x671D, + 0x6CFC, 0x6A07, 0x6504, 0x6C04, 0x6887, 0x69E1, 0x6AE4, 0x6AE6, + 0x6BE0, 0x69B8, 0x6D81, 0x6AC0, 0x6BBB, 0x6C8E, 0x6D5C, 0x6AB7, + 0x6B92, 0x6C88, 0x6966, 0x6D38, 0x6B8C, 0x67FE, 0x6C61, 0x6A68, + 0x6A66, 0x6B68, 0x6C3B, 0x6935, 0x6DB5, 0x6B3F, 0x67CC, 0x6CE5, + 0x6A1A, 0x6B19, 0x6BF4, 0x6BF2, 0x6A11, 0x6D70, 0x6AF2, 0x68D8, + 0x68B6, 0x69E9, 0x6AEC, 0x6748, 0x6C7A, 0x69C3, 0x658E, 0x6B9E, + 0x6886, 0x6996, 0x6A9D, 0x6B78, 0x6859, 0x6C4D, 0x6A77, 0x670B, + 0x6B54, 0x6851, 0x6968, 0x6A6C, 0x6B4B, 0x6827, 0x6CD1, 0x6A46, + 0x66B1, 0x6BF9, 0x6939, 0x64EE, 0x6B00, 0x67F4, 0x690F, 0x6A17, + 0x6AFA, 0x67CA, 0x6BB3, 0x68E7, 0x64B4, 0x6AD2, 0x67A1, 0x68BD, + 0x69C9, 0x6AA9, 0x6798, 0x6C38, 0x69A0, 0x6619, 0x6B5F, 0x688A, + 0x699A, 0x6A7B, 0x6B39, 0x6881, 0x6CBC, 0x6A58, 0x65DF, 0x6B31, + 0x685C, 0x6949, 0x6A30, 0x6B0C, 0x6832, 0x6C73, 0x6A27, 0x66E0, + 0x6829, 0x6919, 0x6A01, 0x66DA, 0x6B98, 0x68EF, 0x639F, 0x6AB7, + 0x67D5, 0x6182, 0x69D2, 0x6543, 0x66A8, 0x67CD, 0x68C1, 0x6515, + 0x6B44, 0x67A3, 0x613F, 0x6980, 0x6671, 0x6799, 0x688E, 0x697A, + 0x6643, 0x6AFA, 0x6868, 0x631E, 0x6A35, 0x6745, 0x6862, 0x694B, + 0x6A0F, 0x6610, 0x6B86, 0x6925, 0x6499, 0x6AC5, 0x6713, 0x680C, + 0x69E3, 0x6AA3, 0x670A, 0x6BEF, 0x68F3, 0x65AE, 0x6B32, 0x67DC, + 0x68CD, 0x69B2, 0x6A72, 0x67D3, 0x6C57, 0x698C, 0x66A8, 0x6B08, + 0x689A, 0x63FB, 0x6A26, 0x67A3, 0x6874, 0x6960, 0x6A1D, 0x6676, + 0x5FE0, 0x6936, 0x653A, 0x664B, 0x6844, 0x692D, 0x6508, 0x6A91, + 0x6747, 0x61E1, 0x69CB, 0x6617, 0x6741, 0x6812, 0x69C2, 0x660E, + 0x6B1A, 0x680C, 0x6375, 0x6A5C, 0x670D, 0x67E2, 0x68AF, 0x6A36, + 0x66E3, 0x6B84, 0x68A9, 0x6493, 0x6AC9, 0x67B2, 0x6883, 0x6948, + 0x6A09, 0x67A9, 0x6BEC, 0x6942, 0x6579, 0x6B36, 0x6850, 0x691C, + 0x69DD, 0x6779, 0x684A, 0x6913, 0x69B7, 0x664F, 0x6B9F, 0x68E9, + 0x653B, 0x6A4A, 0x681A, 0x68E3, 0x6988, 0x6A44, 0x67F0, 0x6C07, + 0x697F, 0x6615, 0x6AB8, 0x68B4, 0x6958, 0x69FC, 0x6B48, 0x688D, + 0x63AD, 0x69F3, 0x66E3, 0x6884, 0x692C, 0x69CD, 0x66BC, 0x6B98, + 0x6923, 0x65B0, 0x6A60, 0x6858, 0x68FD, 0x69A1, 0x6A3A, 0x682E, + 0x6BFD, 0x6998, 0x667F, 0x6B61, 0x68D1, 0x6972, 0x6A12, 0x6B3E, + 0x68C7, 0x696C, 0x6A09, 0x6728, 0x6BB0, 0x6946, 0x6624, 0x6B16, + 0x6898, 0x693D, 0x661E, 0x6AF0, 0x6875, 0x6419, 0x69B7, 0x66CE, + 0x6174, 0x690D, 0x65EA, 0x66C8, 0x6845, 0x68EA, 0x65E4, 0x6ABF, + 0x683C, 0x63DE, 0x6982, 0x6694, 0x6815, 0x68BB, 0x695C, 0x668E, + 0x6B0C, 0x68B5, 0x6585, 0x6A6E, 0x67E6, 0x688B, 0x657C, 0x6A68, + 0x67E0, 0x636D, 0x69C6, 0x6633, 0x60E3, 0x685F, 0x654B, 0x662A, + 0x67B0, 0x6859, 0x6545, 0x6A16, 0x6789, 0x632E, 0x6974, 0x65F9, + 0x6780, 0x6829, 0x696E, 0x65F3, 0x6A81, 0x6823, 0x6507, 0x69E5, + 0x6750, 0x67FD, 0x6942, 0x69BF, 0x674A, 0x689B, 0x691C, 0x65B9, + 0x604E, 0x6871, 0x64CD, 0x6668, 0x671A, 0x686B, 0x64A2, 0x698D, + 0x66F3, 0x62AA, 0x68EA, 0x663B, 0x66ED, 0x683F, 0x68E1, 0x660D, + 0x6A72, 0x6815, 0x6467, 0x69D7, 0x66BD, 0x680F, 0x6934, 0x69D1, + 0x6760, 0x6809, 0x692E, 0x65D6, 0x6AB8, 0x67E3, 0x6516, 0x69A2, + 0x6733, 0x67DD, 0x6902, 0x6A17, 0x672A, 0x6325, 0x68DC, 0x65A0, + 0x6703, 0x6851, 0x68D6, 0x664B, 0x6A64, 0x682B, 0x64AD, 0x69C9, + 0x66D3, 0x6825, 0x68A6, 0x661B, 0x6779, 0x67FF, 0x6920, 0x6615, + 0x6A8D, 0x67F9, 0x6476, 0x6997, 0x6749, 0x6873, 0x68F4, 0x69EC, + 0x6194, 0x6850, 0x6524, 0x666E, 0x6719, 0x6847, 0x64F9, 0x69DD, + 0x6713, 0x6341, 0x693E, 0x665F, 0x6158, 0x681A, 0x65A6, 0x6638, + 0x676E, 0x6894, 0x657C, 0x6A0A, 0x6765, 0x63F9, 0x690C, 0x66B8, + 0x675F, 0x6868, 0x6965, 0x66AF, 0x621E, 0x6862, 0x6545, 0x5FE2, + 0x67BA, 0x6480, 0x65F4, 0x672B, 0x67B1, 0x647A, 0x6933, 0x6704, + 0x62B9, 0x68B0, 0x65C0, 0x66FB, 0x6808, 0x6887, 0x6599, 0x66D4, + 0x67FF, 0x64FD, 0x697D, 0x66CE, 0x634C, 0x64D2, 0x661D, 0x6750, + 0x6346, 0x68D4, 0x6614, 0x626C, 0x6850, 0x655B, 0x669A, 0x6724, + 0x682A, 0x6551, 0x6694, 0x67A2, 0x63D5, 0x691E, 0x666A, 0x6303, + 0x689B, 0x65D6, 0x66EC, 0x6772, 0x6874, 0x65AF, 0x6117, 0x67F0, + 0x6516, 0x65A5, 0x6765, 0x67E7, 0x64EB, 0x662F, 0x673E, 0x6389, + 0x68C2, 0x6626, 0x61E7, 0x683E, 0x6571, 0x668B, 0x6715, 0x6818, + 0x6567, 0x69E6, 0x6790, 0x63EF, 0x68EF, 0x6704, 0x678A, 0x64A7, + 0x6961, 0x66E1, 0x631E, 0x68E2, 0x65C1, 0x616D, 0x67DE, 0x650B, + 0x6648, 0x6756, 0x67BB, 0x6505, 0x698B, 0x6730, 0x6468, 0x690C, + 0x66A3, 0x67AE, 0x680F, 0x6906, 0x669A, 0x6787, 0x6882, 0x655F, + 0x6673, 0x67FF, 0x685F, 0x65E6, 0x66F6, 0x67DB, 0x654E, 0x6029, + 0x66EC, 0x63FE, 0x6527, 0x6642, 0x674A, 0x63F5, 0x6905, 0x66C1, + 0x632E, 0x68A2, 0x65A8, 0x61B1, 0x67A2, 0x6513, 0x65A2, 0x6719, + 0x679C, 0x64EC, 0x5FDE, 0x6710, 0x63B6, 0x6570, 0x6687, 0x676E, + 0x6449, 0x68C6, 0x6660, 0x62E5, 0x6846, 0x65D0, 0x6167, 0x67C2, + 0x64AA, 0x65CA, 0x66B9, 0x67BC, 0x6539, 0x6079, 0x6734, 0x63E9, + 0x650E, 0x66AB, 0x62A5, 0x6475, 0x6595, 0x6688, 0x633E, 0x6849, + 0x658F, 0x61C8, 0x67E2, 0x64FA, 0x65F2, 0x66E0, 0x67BF, 0x6561, + 0x60E5, 0x6758, 0x643A, 0x5E37, 0x66CF, 0x6302, 0x64C2, 0x65BD, + 0x66AC, 0x6396, 0x6869, 0x663D, 0x6229, 0x67E5, 0x6526, 0x60A1, + 0x6781, 0x648D, 0x6589, 0x6678, 0x675E, 0x6487, 0x5FD8, 0x66F3, + 0x63ED, 0x64F1, 0x65E5, 0x66D0, 0x63C2, 0x6889, 0x6664, 0x6324, + 0x6809, 0x65D7, 0x61DB, 0x6784, 0x64B9, 0x65B0, 0x669C, 0x677E, + 0x6540, 0x6045, 0x66FA, 0x641D, 0x65A3, 0x668E, 0x62E5, 0x6484, + 0x659D, 0x66E9, 0x6379, 0x6885, 0x65FF, 0x62D7, 0x67A5, 0x656E, + 0x665A, 0x6741, 0x67FB, 0x6568, 0x615E, 0x677A, 0x64D7, 0x5FF3, + 0x66B2, 0x63AF, 0x68A7, 0x6629, 0x6336, 0x67CE, 0x6537, 0x6684, + 0x630A, 0x64A2, 0x6596, 0x6264, 0x67A4, 0x6508, 0x6112, 0x66DC, + 0x6494, 0x658C, 0x6657, 0x6737, 0x646D, 0x65EB, 0x66B1, 0x63F8, + 0x5DE0, 0x6646, 0x62C7, 0x645F, 0x6554, 0x66A4, 0x6358, 0x6820, + 0x65B6, 0x621A, 0x67BD, 0x64C0, 0x60C7, 0x66DB, 0x642A, 0x6523, + 0x6210, 0x6736, 0x6491, 0x60B9, 0x66CE, 0x6420, 0x5E88, 0x65E4, + 0x62EF, 0x6487, 0x6557, 0x663F, 0x6380, 0x681C, 0x65B9, 0x6246, + 0x63E7, 0x6549, 0x6121, 0x62DB, 0x6452, 0x65A8, 0x623C, 0x6732, + 0x64B5, 0x606B, 0x66CD, 0x63B2, 0x6518, 0x6665, 0x631B, 0x64A7, + 0x6033, 0x6642, 0x63A8, 0x5DF4, 0x65D6, 0x6298, 0x640F, 0x64E3, + 0x6634, 0x6307, 0x6476, 0x65AB, 0x6268, 0x672D, 0x64D9, 0x6147, + 0x62D4, 0x6447, 0x659D, 0x625A, 0x6723, 0x64AA, 0x6091, 0x66BF, + 0x6439, 0x5F27, 0x65D5, 0x6335, 0x649D, 0x656C, 0x6694, 0x639D, + 0x5F19, 0x65CB, 0x6328, 0x5CB3, 0x6541, 0x6216, 0x6393, 0x646B, + 0x65A0, 0x6286, 0x677F, 0x6530, 0x6169, 0x671B, 0x64C7, 0x60BD, + 0x6253, 0x63CB, 0x649F, 0x6139, 0x6690, 0x6432, 0x60B3, 0x662B, + 0x6747, 0x6492, 0x612B, 0x66E3, 0x6421, 0x655A, 0x661E, 0x66C0, + 0x6466, 0x686D, 0x665B, 0x63F5, 0x5FEE, 0x65F3, 0x6316, 0x6459, + 0x658A, 0x664E, 0x63E8, 0x67E6, 0x65C8, 0x62E3, 0x6786, 0x64FA, + 0x626D, 0x6352, 0x648D, 0x65BE, 0x62D9, 0x6778, 0x6555, 0x61C7, + 0x6718, 0x6483, 0x6149, 0x6653, 0x6412, 0x64C1, 0x61BD, 0x66AE, + 0x6454, 0x609A, 0x6649, 0x63E6, 0x5F66, 0x65E1, 0x6375, 0x644A, + 0x655A, 0x667F, 0x63D9, 0x5F58, 0x65B6, 0x62DB, 0x5E0A, 0x654D, + 0x625E, 0x63AD, 0x64E4, 0x65AC, 0x6338, 0x647A, 0x6525, 0x6254, + 0x5C5E, 0x64B8, 0x6141, 0x632E, 0x63E5, 0x6518, 0x6224, 0x66D8, + 0x64AB, 0x6133, 0x6677, 0x6441, 0x60B4, 0x6612, 0x6366, 0x6483, + 0x619C, 0x66A9, 0x6412, 0x6080, 0x65E7, 0x633A, 0x5F76, 0x6582, + 0x62C8, 0x6408, 0x6519, 0x65DA, 0x639A, 0x5FEF, 0x6574, 0x62BA, + 0x5DFB, 0x650F, 0x6244, 0x636B, 0x64A2, 0x65AB, 0x628B, 0x6435, + 0x64E0, 0x6214, 0x5D54, 0x6477, 0x6127, 0x62EF, 0x6409, 0x6538, + 0x6279, 0x6353, 0x64CF, 0x6190, 0x6672, 0x63FF, 0x6111, 0x626B, + 0x638E, 0x64A3, 0x6160, 0x6320, 0x63F2, 0x6066, 0x65E6, 0x6384, + 0x5FE3, 0x659E, 0x6312, 0x642C, 0x6539, 0x6636, 0x63C2, 0x67A7, + 0x65D5, 0x6350, 0x674A, 0x650E, 0x6270, 0x6393, 0x64C6, 0x65AD, + 0x6346, 0x6459, 0x6544, 0x62D4, 0x66DC, 0x64FC, 0x6262, 0x667B, + 0x6493, 0x6598, 0x62A8, 0x63C3, 0x64D1, 0x6232, 0x66B1, 0x646B, + 0x6148, 0x666A, 0x641C, 0x60CD, 0x6293, 0x63AE, 0x64C0, 0x61B1, + 0x6642, 0x6456, 0x6136, 0x65E1, 0x6386, 0x6044, 0x6599, 0x6314, + 0x642E, 0x612C, 0x6614, 0x63E2, 0x60B1, 0x65CC, 0x6374, 0x5FB6, + 0x656A, 0x6306, 0x6419, 0x60F4, 0x6602, 0x63AF, 0x5FFD, 0x659D, + 0x62DA, 0x5EFA, 0x64F7, 0x6286, 0x6383, 0x64F0, 0x6217, 0x6333, + 0x5FEF, 0x652E, 0x62C8, 0x5EE7, 0x64C8, 0x6256, 0x6371, 0x6462, + 0x6170, 0x6303, 0x5EB3, 0x64FF, 0x6248, 0x5E26, 0x6499, 0x61D5, + 0x62F9, 0x644D, 0x615E, 0x62F1, 0x63E3, 0x648B, 0x6214, 0x5E14, + 0x6487, 0x61A1, 0x5CF5, 0x63D9, 0x60D9, 0x6253, 0x636F, 0x64BE, + 0x6202, 0x5E05, 0x6413, 0x618F, 0x5CE2, 0x640C, 0x60A8, 0x6241, + 0x63A2, 0x644A, 0x61D2, 0x62F2, 0x6446, 0x610A, 0x5B6D, 0x63DC, + 0x6096, 0x6211, 0x632D, 0x647D, 0x61C0, 0x6325, 0x6413, 0x6149, + 0x5B5A, 0x6368, 0x605E, 0x61FF, 0x6360, 0x5F8C, 0x618C, 0x62AD, + 0x639F, 0x60C7, 0x6569, 0x639B, 0x604C, 0x61CB, 0x62E8, 0x5FCC, + 0x610A, 0x6279, 0x63D2, 0x6103, 0x6598, 0x636B, 0x6017, 0x6536, + 0x631F, 0x5FBD, 0x6146, 0x62B0, 0x63A2, 0x6081, 0x656C, 0x6356, + 0x6079, 0x650A, 0x62EF, 0x5F85, 0x6111, 0x6237, 0x6394, 0x60C0, + 0x6233, 0x6326, 0x6044, 0x6539, 0x62BB, 0x5F76, 0x64F1, 0x626E, + 0x6361, 0x6088, 0x61FF, 0x635D, 0x6032, 0x650A, 0x62AD, 0x5FB6, + 0x64C2, 0x62A5, 0x6394, 0x6079, 0x61ED, 0x6390, 0x6072, 0x64F8, + 0x62E0, 0x5F81, 0x64F1, 0x6275, 0x5F27, 0x648F, 0x6225, 0x6360, + 0x603D, 0x650A, 0x62B0, 0x5FE7, 0x64C5, 0x62A9, 0x5F6B, 0x64BE, + 0x61F4, 0x6393, 0x602B, 0x6538, 0x62E4, 0x6027, 0x6496, 0x62E0, + 0x5F32, 0x6492, 0x622C, 0x6363, 0x644A, 0x6509, 0x6317, 0x6066, + 0x6505, 0x62AC, 0x5F9C, 0x64C1, 0x6263, 0x6393, 0x645B, 0x625B, + 0x62E7, 0x60A2, 0x6531, 0x62E3, 0x5FDC, 0x6492, 0x6278, 0x6367, + 0x648A, 0x622B, 0x635F, 0x6445, 0x6505, 0x6316, 0x601B, 0x6501, + 0x62AF, 0x5F9F, 0x645E, 0x6262, 0x6392, 0x645A, 0x6516, 0x632B, + 0x6412, 0x61A6, 0x5DF0, 0x640E, 0x619E, 0x5DEC, 0x6366, 0x60E8, + 0x622A, 0x5F0C, 0x60E0, 0x6226, 0x5E38, 0x63DE, 0x6171, 0x5E34, + 0x63D7, 0x6169, 0x6261, 0x5F4C, 0x6118, 0x625A, 0x5F48, 0x644E, + 0x61A5, 0x5E78, 0x63EC, 0x61A1, 0x5D9C, 0x5F8F, 0x60E7, 0x626F, + 0x5F88, 0x6460, 0x6225, 0x5EBC, 0x641B, 0x621E, 0x5EB4, 0x601D, + 0x616C, 0x62A6, 0x5FCB, 0x6165, 0x62A2, 0x5FC3, 0x6430, 0x61F1, + 0x5EF8, 0x6059, 0x61E9, 0x5EF4, 0x6051, 0x619C, 0x6272, 0x5F8E, + 0x649C, 0x626A, 0x5F8A, 0x5A65, 0x6266, 0x5EBB, 0x60D7, 0x6219, + 0x62E7, 0x601C, 0x61B1, 0x62E3, 0x6014, 0x64A6, 0x6236, 0x5FC2, + 0x615C, 0x6232, 0x5FBE, 0x60A2, 0x61E5, 0x62F8, 0x609A, 0x64BB, + 0x62AF, 0x604C, 0x5BA3, 0x62A7, 0x6044, 0x6127, 0x62A3, 0x6369, + 0x611F, 0x61F6, 0x6365, 0x60CE, 0x5CDE, 0x62BC, 0x60CA, 0x61A1, + 0x62B8, 0x600F, 0x619D, 0x626F, 0x637A, 0x60E7, 0x5D7E, 0x6372, + 0x60E3, 0x5D76, 0x632D, 0x6095, 0x61B6, 0x6329, 0x63E7, 0x61AE, + 0x5EE2, 0x6387, 0x6164, 0x5E15, 0x6342, 0x615D, 0x622F, 0x633A, + 0x6439, 0x622B, 0x5F70, 0x6435, 0x6223, 0x5EA8, 0x63F0, 0x6172, + 0x5EA4, 0x604C, 0x616E, 0x6240, 0x5FFA, 0x5BE5, 0x6239, 0x5F89, + 0x5AED, 0x6231, 0x5F33, 0x6118, 0x61EB, 0x5F2B, 0x60CA, 0x5C8E, + 0x62F3, 0x600F, 0x5C86, 0x62AA, 0x600B, 0x5C26, 0x6242, 0x6004, + 0x6129, 0x5E03, 0x6346, 0x60DB, 0x5DFB, 0x6300, 0x60D4, 0x5D22, + 0x5EED, 0x60D0, 0x61E9, 0x5EE5, 0x6015, 0x619F, 0x5E8E, 0x6353, + 0x6133, 0x5E8A, 0x589B, 0x60E9, 0x5DBD, 0x5FBE, 0x60E1, 0x61FA, + 0x5FB6, 0x60DD, 0x61F6, 0x5F64, 0x5A72, 0x61EE, 0x5EA0, 0x608B, + 0x61EA, 0x5E9B, 0x6083, 0x613C, 0x624D, 0x5FCC, 0x5C6F, 0x6249, + 0x5FC4, 0x5C0F, 0x6241, 0x5FC0, 0x60E6, 0x5E34, 0x5F71, 0x60DE, + 0x5D63, 0x629C, 0x60DA, 0x5D5F, 0x6298, 0x608C, 0x5D07, 0x5EA1, + 0x6088, 0x613A, 0x5E99, 0x634F, 0x6136, 0x5E46, 0x632D, 0x6132, + 0x5E41, 0x5FC5, 0x60E4, 0x5E3D, 0x5F76, 0x60E0, 0x61F5, 0x5F6E, + 0x5BAF, 0x618D, 0x5F6A, 0x5ABF, 0x6185, 0x5F66, 0x6043, 0x6181, + 0x62CC, 0x601C, 0x5D04, 0x6286, 0x6015, 0x5CA8, 0x6222, 0x5FCA, + 0x5CA4, 0x621E, 0x5FC2, 0x6127, 0x5E3E, 0x62DD, 0x6123, 0x5E3A, + 0x62D5, 0x6093, 0x5DE3, 0x62B3, 0x606C, 0x61C5, 0x5F63, 0x6068, + 0x5D0D, 0x62AB, 0x6064, 0x5D09, 0x5E9B, 0x605C, 0x6173, 0x5E97, + 0x6058, 0x6129, 0x5E93, 0x59E8, 0x6106, 0x5E8E, 0x6006, 0x60FE, + 0x5E87, 0x5FFE, 0x60FA, 0x61EA, 0x5F65, 0x5C94, 0x61E2, 0x5F3E, + 0x5BB8, 0x61DE, 0x5F3A, 0x60EA, 0x5D61, 0x5F36, 0x60E3, 0x5D59, + 0x62B9, 0x609C, 0x5D55, 0x62B5, 0x604E, 0x5D51, 0x5F26, 0x602B, + 0x6184, 0x5F21, 0x6023, 0x613A, 0x5F1D, 0x5B36, 0x6117, 0x5ECA, + 0x59E3, 0x6110, 0x5E58, 0x6013, 0x5D38, 0x5E54, 0x600F, 0x5C0D, + 0x61F3, 0x600B, 0x5C05, 0x61EF, 0x5FBC, 0x5C01, 0x5E40, 0x5F6E, + 0x60F4, 0x5E3C, 0x5F4A, 0x60AD, 0x5E38, 0x5958, 0x6063, 0x5E30, + 0x5F3E, 0x6083, 0x5E2C, 0x5F3A, 0x607E, 0x616F, 0x5F36, 0x5BE3, + 0x616B, 0x5F79, 0x5BDF, 0x61A5, 0x5F75, 0x5AFE, 0x5D55, 0x5F26, + 0x6067, 0x5D51, 0x623F, 0x6063, 0x5D4C, 0x57B5, 0x6018, 0x5D48, + 0x5EA8, 0x5FF5, 0x5D44, 0x5EA4, 0x5FF1, 0x6128, 0x5EA0, 0x5ADC, + 0x6121, 0x5EE3, 0x5AD8, 0x615F, 0x5EDF, 0x6024, 0x5C88, 0x5ED7, + 0x6020, 0x5C60, 0x61DE, 0x5FD5, 0x5CAC, 0x61DA, 0x5FD1, 0x5CA8, + 0x5E34, 0x5F86, 0x60E6, 0x5E0D, 0x5FA6, 0x60E2, 0x5E54, 0x59CC, + 0x5CEB, 0x61C6, 0x5FE1, 0x5CE7, 0x61BF, 0x5FDD, 0x5CDF, 0x619C, + 0x5FD9, 0x6088, 0x5E8B, 0x5F8E, 0x60AB, 0x5E3B, 0x6274, 0x60A3, + 0x5DE8, 0x5A6D, 0x60E2, 0x5E10, 0x5FA2, 0x60DA, 0x5E08, 0x5F9E, + 0x5C9B, 0x61A0, 0x5FE0, 0x5C97, 0x61DE, 0x5F95, 0x5CE3, 0x5E47, + 0x5F91, 0x5CDE, 0x5E3F, 0x5F46, 0x60E6, 0x5DEF, 0x59BE, 0x609F, + 0x5DEB, 0x5A17, 0x609B, 0x5E0F, 0x5FA5, 0x6097, 0x5E53, 0x5F9D, + 0x5CA2, 0x619C, 0x5F52, 0x5C9A, 0x6198, 0x5F4E, 0x5CE6, 0x5E46, + 0x5F6E, 0x5CE2, 0x5DF7, 0x5FB1, 0x609F, 0x5E1B, 0x5A52, 0x607C, + 0x5E62, 0x5A22, 0x60FD, 0x5EA2, 0x5A21, 0x5CAD, 0x5E56, 0x5F7A, + 0x5CF5, 0x61BB, 0x5FBD, 0x5CF1, 0x5851, 0x5FB5, 0x5CE9, 0x5E6E, + 0x5FB1, 0x5CE5, 0x5EB2, 0x5B14, 0x60C2, 0x5EAD, 0x5AB6, 0x60BB, + 0x5E5E, 0x5AB2, 0x60DA, 0x5E5A, 0x5ADF, 0x5D4C, 0x5E7E, 0x5FC0, + 0x5D48, 0x5F08, 0x5FE0, 0x5CF4, 0x5929, 0x601F, 0x5D19, 0x5983, + 0x601B, 0x5DB0, 0x5E92, 0x5B1B, 0x60E2, 0x5F1C, 0x5B9C, 0x60DE, + 0x5F18, 0x5C3D, 0x5D54, 0x5EC9, 0x5C35, 0x5DC4, 0x5EC5, 0x5FE4, + 0x5E08, 0x5A52, 0x6043, 0x5DB8, 0x5A4D, 0x603F, 0x5DB4, 0x5A49, + 0x603B, 0x5E20, 0x5F00, 0x6033, 0x6125, 0x5F87, 0x5C45, 0x615C, + 0x5F3C, 0x5C6D, 0x6158, 0x5F34, 0x5D05, 0x5E7F, 0x5F9B, 0x5D01, + 0x5E77, 0x5F97, 0x60A6, 0x5E2F, 0x5B89, 0x60A1, 0x5E4F, 0x5B84, + 0x60C1, 0x5ED7, 0x5B80, 0x5D61, 0x5E8B, 0x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x5B4E, 0x5CCB, 0x5DEC, 0x5B73, + 0x5847, 0x5E50, 0x5BE1, 0x58C8, 0x5E6D, 0x5C4F, 0x594C, 0x5AEE, + 0x5C73, 0x5975, 0x5B60, 0x5CD9, 0x5DFA, 0x5B85, 0x585E, 0x5E5B, + 0x5BF3, 0x58E2, 0x5E7B, 0x5C5D, 0x5962, 0x5B04, 0x5CEF, 0x5DA4, + 0x5BE5, 0x5CEB, 0x5E08, 0x5C09, 0x5878, 0x5E8D, 0x5C73, 0x58F9, + 0x5B17, 0x5C98, 0x59F5, 0x5B89, 0x5CFE, 0x5E1B, 0x5BAE, 0x5869, + 0x5E3B, 0x5C18, 0x596A, 0x5E58, 0x5C3D, 0x5994, 0x5B2D, 0x5CA6, + 0x5E2D, 0x5C0A, 0x5D31, 0x5E4A, 0x5C2E, 0x5905, 0x5E6A, 0x5C53, + 0x59FD, 0x5ECA, 0x5CB9, 0x59AA, 0x5BB2, 0x5CDD, 0x5DF7, 0x5BD3, + 0x589B, 0x5E58, 0x5C3D, 0x599B, 0x5E78, 0x5CCF, 0x5A13, 0x5BC8, + 0x5CF0, 0x5E09, 0x5BED, 0x5D55, 0x5E2A, 0x5C53, 0x593A, 0x5E87, + 0x5CE2, 0x5A2A, 0x5B6C, 0x5D02, 0x5A53, 0x5BD7, 0x592B, 0x5E39, + 0x5C66, 0x59A3, 0x5E59, 0x5CF4, 0x5A45, 0x5632, 0x5D15, 0x5A6A, + 0x5BED, 0x5918, 0x5B50, 0x5C7C, 0x59BE, 0x5ECC, 0x5D07, 0x59E4, + 0x55BA, 0x5D2B, 0x5AD2, 0x56E5, 0x5D48, 0x5B66, 0x5C8F, 0x59D9, + 0x5B8B, 0x5CB3, 0x5A4C, 0x56D6, 0x5D3A, 0x5AE5, 0x5708, 0x5D5B, + 0x5B7D, 0x5818, 0x59F0, 0x5B9E, 0x5CC6, 0x5A63, 0x5BC3, 0x5D50, + 0x5AFC, 0x5783, 0x5D6D, 0x5B93, 0x5837, 0x5A0A, 0x5BB4, 0x58B4, + 0x5AA7, 0x5C44, 0x5D1E, 0x5B16, 0x5828, 0x5DA4, 0x5BA6, 0x5852, + 0x5246, 0x5BCB, 0x58CF, 0x5ABE, 0x5C5A, 0x59ED, 0x5B52, 0x5843, + 0x5DB6, 0x5B77, 0x58EE, 0x5DD7, 0x5C03, 0x5966, 0x5492, 0x5C6D, + 0x5A08, 0x5BD7, 0x58E0, 0x5AA1, 0x5BF8, 0x5909, 0x5E0A, 0x5C84, + 0x59AF, 0x55BD, 0x5CA8, 0x5A48, 0x5684, 0x5CC5, 0x5AB8, 0x5C0B, + 0x599D, 0x5B06, 0x5C55, 0x5A3A, 0x5675, 0x5CDC, 0x5AD3, 0x5732, + 0x5D62, 0x5AF8, 0x57E3, 0x59B7, 0x5B88, 0x5CCE, 0x5A51, 0x5BAD, + 0x5CF2, 0x5AE9, 0x57D4, 0x5D99, 0x5B34, 0x5883, 0x5A6C, 0x5BC4, + 0x5926, 0x5B04, 0x5C53, 0x5D26, 0x5B29, 0x5874, 0x5D6B, 0x5BB9, + 0x591B, 0x5A86, 0x5BFF, 0x5941, 0x5B1B, 0x5C87, 0x5A09, 0x56A2, + 0x5CAB, 0x5AA1, 0x57DD, 0x5CF1, 0x5B32, 0x5889, 0x59FA, 0x5B57, + 0x5CC2, 0x5A93, 0x574C, 0x5CE3, 0x5ADE, 0x57F9, 0x5D87, 0x5B72, + 0x58CE, 0x5AAE, 0x5B93, 0x596D, 0x5AD3, 0x581C, 0x5D17, 0x5B89, + 0x58C0, 0x5DBA, 0x5BAA, 0x5962, 0x554E, 0x5C36, 0x5A26, 0x5B7E, + 0x58DF, 0x5A4B, 0x5BC5, 0x5981, 0x5ADF, 0x5C50, 0x59A3, 0x56C1, + 0x5C92, 0x5A66, 0x5776, 0x5924, 0x5AF7, 0x5822, 0x59C2, 0x5BB0, + 0x5CA9, 0x5A5B, 0x5713, 0x5CCA, 0x5B12, 0x583E, 0x5244, 0x5B5C, + 0x5868, 0x5A73, 0x5BE8, 0x59AD, 0x5B2C, 0x5861, 0x59FC, 0x5B4E, + 0x5904, 0x54A9, 0x5BFF, 0x59C8, 0x55A8, 0x5C45, 0x59ED, 0x56EE, + 0x591F, 0x5AA9, 0x5BAF, 0x59E3, 0x562A, 0x5C5C, 0x5A09, 0x5712, + 0x5C7D, 0x5AC3, 0x57BF, 0x5964, 0x5B76, 0x5891, 0x5A24, 0x5736, + 0x595A, 0x5ADB, 0x57DF, 0x5CD6, 0x5B25, 0x58AD, 0x5415, 0x5BB1, + 0x5979, 0x55AC, 0x57FE, 0x599B, 0x5B40, 0x58CC, 0x5A5A, 0x5BEE, + 0x5994, 0x5660, 0x5C0F, 0x5A50, 0x568B, 0x58EB, 0x5A75, 0x57E9, + 0x59AC, 0x5B28, 0x58B7, 0x5A6B, 0x5732, 0x5C8D, 0x5AB6, 0x5808, + 0x59CB, 0x5AD7, 0x5C61, 0x5A86, 0x5780, 0x5CA4, 0x5ACD, 0x5828, + 0x59E6, 0x5B7F, 0x58F2, 0x5AA1, 0x581E, 0x5CBA, 0x5AE8, 0x5872, + 0x5CFC, 0x5B96, 0x5937, 0x55CD, 0x5BDC, 0x59F7, 0x5AFF, 0x5891, + 0x5A42, 0x5BD6, 0x5956, 0x5AF5, 0x5C18, 0x5A12, 0x5784, 0x5C5B, + 0x5A5D, 0x57AE, 0x5971, 0x5B10, 0x58A6, 0x5A53, 0x57A3, 0x596B, + 0x5A9E, 0x5872, 0x5D37, 0x5B50, 0x58C2, 0x5544, 0x5B93, 0x5983, + 0x5632, 0x58BB, 0x5A64, 0x57B9, 0x597C, 0x5AAF, 0x5BCF, 0x59C7, + 0x5705, 0x5C12, 0x5A13, 0x57DC, 0x52B6, 0x5AEC, 0x58CC, 0x5A09, + 0x5728, 0x591C, 0x5ABC, 0x5826, 0x59D9, 0x5B03, 0x58E8, 0x554C, + 0x5B6F, 0x59D2, 0x5665, 0x5842, 0x5A1A, 0x573E, 0x5931, 0x5A65, + 0x583B, 0x5A13, 0x5737, 0x5C54, 0x5A5B, 0x578C, 0x53A3, 0x5AA2, + 0x5881, 0x5562, 0x5B76, 0x5942, 0x55C1, 0x5850, 0x59B4, 0x5B6F, + 0x58C7, 0x55BA, 0x5BB2, 0x5987, 0x5698, 0x50C4, 0x59F9, 0x579B, + 0x597D, 0x5ACE, 0x588C, 0x59C9, 0x5790, 0x58DC, 0x5AA2, 0x57E5, + 0x54AE, 0x5B0E, 0x58D2, 0x5511, 0x5B55, 0x59B8, 0x56A7, 0x58CB, + 0x5A00, 0x57A6, 0x5917, 0x55ED, 0x5B8E, 0x59F9, 0x56F6, 0x5214, + 0x5A66, 0x57F0, 0x5CB8, 0x5AAD, 0x586B, 0x5A3A, 0x5B7D, 0x5952, + 0x5AA7, 0x5864, 0x5C91, 0x5AEA, 0x5948, 0x562F, 0x5BDB, 0x5993, + 0x5733, 0x5C1D, 0x5A93, 0x5829, 0x598D, 0x5ADA, 0x5C14, 0x59FB, + 0x577D, 0x5C77, 0x5AD0, 0x5899, 0x5530, 0x5B38, 0x58E5, 0x566D, + 0x5864, 0x59EA, 0x5B32, 0x58DB, 0x5A35, 0x5B9A, 0x59E3, 0x5766, + 0x5BDC, 0x5A2B, 0x57B7, 0x5457, 0x5A94, 0x58CA, 0x5A21, 0x57AC, + 0x5940, 0x5A8D, 0x58C0, 0x59AE, 0x5AF6, 0x5936, 0x56A1, 0x5B5F, + 0x59A7, 0x56FA, 0x533E, 0x5A7D, 0x5816, 0x599D, 0x56EF, 0x5925, + 0x59E5, 0x5810, 0x5993, 0x5ADC, 0x5883, 0x55AE, 0x5B44, 0x598C, + 0x56DE, 0x587C, 0x59FA, 0x575E, 0x5986, 0x562D, 0x5876, 0x59F0, + 0x5754, 0x58E8, 0x5A5D, 0x586B, 0x54DE, 0x5AC6, 0x58E2, 0x561C, + 0x57C5, 0x5950, 0x5743, 0x58D4, 0x5615, 0x57BE, 0x5946, 0x573C, + 0x529E, 0x5A68, 0x57B4, 0x54C2, 0x5AD1, 0x58ED, 0x5554, 0x57D8, + 0x595F, 0x5685, 0x584F, 0x5549, 0x57CD, 0x5955, 0x56A9, 0x5282, + 0x59C3, 0x57C7, 0x53EF, 0x5A52, 0x583E, 0x5568, 0x571F, 0x58B1, + 0x5698, 0x5834, 0x5561, 0x5AB4, 0x58D0, 0x568E, 0x518A, 0x593F, + 0x5739, 0x5407, 0x5A5D, 0x584D, 0x554F, 0x5732, 0x58E6, 0x59CC, + 0x57AA, 0x5490, 0x5AE1, 0x58DF, 0x55FA, 0x5175, 0x594D, 0x5721, + 0x532B, 0x59E1, 0x57C3, 0x596A, 0x5741, 0x5837, 0x59FD, 0x57B9, + 0x54A7, 0x5A66, 0x5857, 0x560D, 0x5195, 0x597F, 0x5692, 0x5347, + 0x5607, 0x57D2, 0x58E9, 0x56B2, 0x5870, 0x5A08, 0x57F2, 0x54C3, + 0x5A93, 0x588C, 0x5621, 0x5097, 0x58FE, 0x56CC, 0x5885, 0x5645, + 0x5748, 0x591A, 0x56C2, 0x58A2, 0x59AE, 0x5765, 0x54D7, 0x5A3A, + 0x58C1, 0x558C, 0x5789, 0x5930, 0x56DC, 0x5823, 0x55B1, 0x5782, + 0x594F, 0x5700, 0x581C, 0x59DF, 0x579F, 0x5438, 0x5A6A, 0x583C, + 0x55CF, 0x57BF, 0x58D5, 0x5741, 0x585C, 0x55C5, 0x57DF, 0x58F1, + 0x569C, 0x587C, 0x5985, 0x57D8, 0x5480, 0x5A11, 0x5898, 0x560E, + 0x57F8, 0x592D, 0x56B6, 0x58B8, 0x5632, 0x5755, 0x5949, 0x56DA, + 0x5319, 0x59D8, 0x5779, 0x54C4, 0x5A86, 0x5839, 0x564C, 0x5799, + 0x58D2, 0x5717, 0x5859, 0x566D, 0x5A84, 0x58EE, 0x573B, 0x5484, + 0x59A1, 0x57D9, 0x5537, 0x5A30, 0x5895, 0x55E4, 0x57F6, 0x5926, + 0x5A48, 0x58B5, 0x560C, 0x5AF4, 0x5968, 0x579B, 0x53E5, 0x59F4, + 0x534A, 0x5984, 0x56FB, 0x540B, 0x5678, 0x5878, 0x59A3, 0x5718, + 0x5438, 0x5A51, 0x57DD, 0x55EE, 0x51D2, 0x5899, 0x56BD, 0x53C7, + 0x560F, 0x5783, 0x5482, 0x56DE, 0x53F0, 0x596F, 0x57A3, 0x54D7, + 0x5A1D, 0x5860, 0x567F, 0x5259, 0x5917, 0x5749, 0x543F, 0x569F, + 0x5806, 0x5521, 0x5790, 0x5494, 0x55FA, 0x584C, 0x5572, 0x5210, + 0x5904, 0x5645, 0x5313, 0x5905, 0x5710, 0x54E2, 0x5666, 0x57D1, + 0x55E3, 0x5757, 0x5532, 0x56B1, 0x5814, 0x5607, 0x52CB, 0x58F2, + 0x56F9, 0x53C0, 0x5653, 0x57BE, 0x55A4, 0x571D, 0x53E6, 0x569E, + 0x5801, 0x55F0, 0x5764, 0x58DF, 0x56BF, 0x537C, 0x598E, 0x57AB, + 0x5490, 0x5706, 0x588A, 0x556A, 0x57EE, 0x54B5, 0x574D, 0x57F3, + 0x55BA, 0x5364, 0x58CD, 0x56B0, 0x544D, 0x4EDC, 0x5799, 0x5556, + 0x5199, 0x5878, 0x5651, 0x57DC, 0x55A3, 0x573F, 0x58BA, 0x569D, + 0x5439, 0x59B1, 0x5786, 0x5543, 0x5185, 0x5888, 0x563E, 0x52B7, + 0x5593, 0x574F, 0x58CA, 0x56AD, 0x5832, 0x58CE, 0x5796, 0x552F, + 0x59C2, 0x582B, 0x5652, 0x52A3, 0x589C, 0x5715, 0x53C5, 0x55AC, + 0x5741, 0x54D4, 0x569F, 0x541A, 0x59D1, 0x57AE, 0x554C, 0x528F, + 0x5497, 0x566B, 0x5817, 0x5598, 0x577B, 0x5910, 0x56B2, 0x5433, + 0x5932, 0x57BE, 0x5564, 0x527B, 0x58BF, 0x567F, 0x53CA, 0x55AD, + 0x578E, 0x5500, 0x56F1, 0x544B, 0x5620, 0x57D1, 0x5578, 0x5104, + 0x57F9, 0x5693, 0x53E6, 0x55EC, 0x56B9, 0x5518, 0x5665, 0x52FB, + 0x5592, 0x5706, 0x546C, 0x5664, 0x582F, 0x5595, 0x52BE, 0x5905, + 0x56D6, 0x5403, 0x50B0, 0x5800, 0x555D, 0x524F, 0x5484, 0x569F, + 0x5842, 0x55D4, 0x52DE, 0x5890, 0x570D, 0x544B, 0x50D2, 0x57A3, + 0x559C, 0x526F, 0x54C8, 0x56DD, 0x5413, 0x5637, 0x5327, 0x5568, + 0x56D3, 0x5490, 0x56A6, 0x5796, 0x5603, 0x52BD, 0x58B6, 0x5608, + 0x5457, 0x55AA, 0x5766, 0x5580, 0x569E, 0x54FB, 0x55D4, 0x57EF, + 0x5504, 0x5189, 0x581A, 0x566E, 0x5340, 0x4F54, 0x57C0, 0x54CC, + 0x514A, 0x53EE, 0x563A, 0x5302, 0x556B, 0x520C, 0x5497, 0x56F3, + 0x53B5, 0x58D9, 0x571F, 0x5537, 0x519D, 0x5866, 0x569C, 0x537C, + 0x55FA, 0x56EF, 0x552A, 0x5626, 0x5425, 0x55F3, 0x579F, 0x55C5, + 0x5220, 0x57E7, 0x55F2, 0x5419, 0x4FD1, 0x5796, 0x5517, 0x51E2, + 0x54C1, 0x55E9, 0x53E3, 0x54EE, 0x52CF, 0x586C, 0x56A6, 0x5431, + 0x55DC, 0x56EC, 0x54E5, 0x56E9, 0x585F, 0x5699, 0x531B, 0x58A9, + 0x56C2, 0x54D8, 0x5668, 0x580A, 0x563E, 0x579C, 0x559F, 0x56B5, + 0x57E1, 0x55E9, 0x5399, 0x58FE, 0x578F, 0x5592, 0x5157, 0x57DA, + 0x55E6, 0x538C, 0x5560, 0x5739, 0x5533, 0x56C6, 0x548A, 0x55D9, + 0x570C, 0x54E2, 0x526A, 0x5833, 0x56BA, 0x547D, 0x4FC5, 0x5709, + 0x54D9, 0x5230, 0x5422, 0x5663, 0x5420, 0x55EB, 0x536D, 0x54CC, + 0x5635, 0x53C7, 0x50F5, 0x5789, 0x55DE, 0x5360, 0x4DCA, 0x562E, + 0x53BE, 0x55B0, 0x52D0, 0x5583, 0x570D, 0x5506, 0x523D, 0x57A2, + 0x5555, 0x5273, 0x580F, 0x56DA, 0x54FD, 0x51D2, 0x57DE, 0x5579, + 0x5297, 0x54CB, 0x5687, 0x549D, 0x565A, 0x53F3, 0x5594, 0x571A, + 0x546E, 0x5134, 0x5765, 0x5603, 0x5412, 0x4F43, 0x5734, 0x5493, + 0x515C, 0x53DF, 0x55AB, 0x53B1, 0x55A5, 0x52F9, 0x54D9, 0x566A, + 0x537E, 0x4FAA, 0x56DD, 0x554A, 0x531C, 0x4B59, 0x5685, 0x53A3, + 0x4FD3, 0x52E9, 0x54F1, 0x5657, 0x54EB, 0x51F9, 0x575D, 0x55DD, + 0x5283, 0x4DFB, 0x5677, 0x548F, 0x521D, 0x5461, 0x55F8, 0x52DD, + 0x54E1, 0x51E9, 0x5432, 0x55A2, 0x542C, 0x50B8, 0x56D5, 0x5573, + 0x56AC, 0x53DB, 0x514A, 0x578A, 0x5545, 0x539D, 0x5542, 0x567C, + 0x544A, 0x5652, 0x536D, 0x551A, 0x5732, 0x54E6, 0x525A, 0x580B, + 0x561F, 0x533E, 0x5031, 0x5702, 0x54B2, 0x52D7, 0x5488, 0x55CB, + 0x53DE, 0x55C9, 0x52A3, 0x54B2, 0x56A9, 0x5453, 0x51B3, 0x5784, + 0x556E, 0x52A0, 0x4F07, 0x567A, 0x53F6, 0x5234, 0x53F0, 0x553D, + 0x5399, 0x5510, 0x51D0, 0x5496, 0x5620, 0x5393, 0x510A, 0x5700, + 0x54DF, 0x522E, 0x4DCA, 0x55F0, 0x5367, 0x515F, 0x532F, 0x54B4, + 0x5329, 0x5480, 0x512B, 0x547A, 0x5597, 0x52F9, 0x508E, 0x567B, + 0x544C, 0x5211, 0x4C76, 0x5566, 0x539F, 0x5080, 0x5291, 0x550F, + 0x528B, 0x53EC, 0x5052, 0x53E6, 0x5508, 0x525B, 0x500D, 0x55F2, + 0x5411, 0x5222, 0x4AFA, 0x55C3, 0x5387, 0x4FCD, 0x51F2, 0x54A4, + 0x51EB, 0x5354, 0x506A, 0x5351, 0x54F6, 0x52F7, 0x4F59, 0x564D, + 0x5449, 0x5182, 0x4947, 0x5538, 0x52ED, 0x4F19, 0x514A, 0x5418, + 0x5147, 0x5412, 0x5114, 0x52B8, 0x5502, 0x52B2, 0x4E9B, 0x55C4, + 0x53DD, 0x50D9, 0x473E, 0x54D1, 0x524F, 0x4E57, 0x524D, 0x5380, + 0x509E, 0x537D, 0x5098, 0x5219, 0x5473, 0x5213, 0x4DD8, 0x553A, + 0x5348, 0x502F, 0x4462, 0x54E6, 0x51DD, 0x4D8F, 0x51D7, 0x5411, + 0x4FEF, 0x52E4, 0x4FED, 0x52DE, 0x53E3, 0x5173, 0x4D46, 0x559A, + 0x53DA, 0x4FAE, 0x3FFE, 0x54A3, 0x52A6, 0x4CFD, 0x5136, 0x53A9, + 0x5134, 0x537A, 0x4F6B, 0x5274, 0x5470, 0x5241, 0x4C73, 0x5533, + 0x5345, 0x50C5, 0x3FFE, 0x543F, 0x520B, 0x4EF0, 0x5209, 0x5314, + 0x508B, 0x530E, 0x5088, 0x530B, 0x5408, 0x51CF, 0x4EAA, 0x556C, + 0x53D7, 0x504D, 0x3FFE, 0x54A0, 0x52D0, 0x4E6D, 0x5196, 0x53A6, + 0x5190, 0x53A0, 0x500C, 0x529E, 0x546D, 0x526F, 0x4E26, 0x55C8, + 0x536F, 0x512A, 0x4B2C, 0x5500, 0x5239, 0x4DE5, 0x5237, 0x540C, + 0x50EF, 0x530F, 0x50ED, 0x5309, 0x54A6, 0x5201, 0x4D9D, 0x5565, + 0x53D5, 0x50B2, 0x4A89, 0x5475, 0x52D1, 0x4F17, 0x51C4, 0x53A0, + 0x51BE, 0x539D, 0x5075, 0x529B, 0x543F, 0x5299, 0x4ED5, 0x559A, + 0x543A, 0x5186, 0x4CCF, 0x54D6, 0x5263, 0x5031, 0x5261, 0x5405, + 0x514F, 0x53DB, 0x511C, 0x530A, 0x54A0, 0x5304, 0x4FF3, 0x55D2, + 0x53D2, 0x51F6, 0x4E4D, 0x550F, 0x52D2, 0x4FB8, 0x52CC, 0x5442, + 0x51C0, 0x543D, 0x51BD, 0x5370, 0x54D9, 0x536E, 0x50A0, 0x5607, + 0x540C, 0x5187, 0x4DC5, 0x5185, 0x5339, 0x5068, 0x5336, 0x5066, + 0x525C, 0x53D8, 0x525A, 0x4F01, 0x5511, 0x53D0, 0x5146, 0x4B8A, + 0x5449, 0x5224, 0x4EF3, 0x521E, 0x539F, 0x510F, 0x5399, 0x510D, + 0x52C7, 0x54B2, 0x52C5, 0x4FE5, 0x554A, 0x540D, 0x51BA, 0x4D27, + 0x54A6, 0x533A, 0x4FAA, 0x528D, 0x53DC, 0x51B1, 0x53DA, 0x517E, + 0x5309, 0x54E8, 0x5303, 0x5091, 0x55EE, 0x5447, 0x522A, 0x4F63, + 0x5553, 0x539D, 0x5143, 0x4C94, 0x54B3, 0x52C9, 0x5051, 0x51EE, + 0x540D, 0x51EB, 0x5369, 0x510A, 0x533F, 0x5480, 0x5295, 0x5014, + 0x4A2E, 0x53DA, 0x51B3, 0x4EE4, 0x50CD, 0x530B, 0x50C7, 0x525D, + 0x4FDA, 0x5257, 0x5444, 0x517A, 0x4EA1, 0x54B9, 0x52D3, 0x508E, + 0x4D53, 0x54B0, 0x521F, 0x4F96, 0x521C, 0x536D, 0x513C, 0x5343, + 0x5139, 0x5299, 0x547E, 0x5297, 0x4F58, 0x5562, 0x53B4, 0x51E2, + 0x4E1A, 0x54C2, 0x5309, 0x50FE, 0x525F, 0x5421, 0x5259, 0x4F14, + 0x51A9, 0x537A, 0x517A, 0x52D5, 0x50C1, 0x52D3, 0x548A, 0x5224, + 0x4FCE, 0x556B, 0x53E9, 0x516B, 0x4ED0, 0x54CF, 0x533E, 0x5086, + 0x5299, 0x5452, 0x51EA, 0x53B2, 0x51E4, 0x53AF, 0x549C, 0x530B, + 0x5104, 0x5305, 0x5422, 0x525B, 0x5044, 0x5574, 0x537C, 0x51A9, + 0x4E4D, 0x54FF, 0x52D1, 0x50C5, 0x4D36, 0x545E, 0x5224, 0x5004, + 0x5222, 0x53BD, 0x516E, 0x5340, 0x516C, 0x5297, 0x542C, 0x5295, + 0x4FC7, 0x5580, 0x5389, 0x51E4, 0x4ECD, 0x5508, 0x5307, 0x5131, + 0x52DC, 0x504A, 0x525E, 0x4F87, 0x5258, 0x4F84, 0x51AD, 0x534D, + 0x51A7, 0x4DB0, 0x5438, 0x52A6, 0x5038, 0x4C92, 0x53BB, 0x521E, + 0x4F44, 0x5172, 0x5317, 0x516C, 0x5311, 0x50B7, 0x526C, 0x53FD, + 0x5269, 0x4FCC, 0x552F, 0x535B, 0x5137, 0x4E35, 0x54B6, 0x52DB, + 0x507B, 0x4D21, 0x5079, 0x522F, 0x4FBA, 0x51A9, 0x4EC3, 0x517D, + 0x5322, 0x50F6, 0x4DF1, 0x547F, 0x529F, 0x5039, 0x4CD9, 0x5405, + 0x51F2, 0x4F74, 0x5143, 0x52E9, 0x5140, 0x52E6, 0x50B8, 0x5269, + 0x4FFE, 0x523E, 0x4FF8, 0x51B8, 0x532F, 0x51B5, 0x4F35, 0x5488, + 0x52B0, 0x5103, 0x4D63, 0x5076, 0x522C, 0x4FB8, 0x5201, 0x4FB5, + 0x517B, 0x536E, 0x5178, 0x4EF2, 0x5451, 0x52EF, 0x50C1, 0x4D1B, + 0x53B3, 0x526B, 0x4F79, 0x4B3E, 0x5338, 0x513E, 0x4EAE, 0x513B, + 0x52B5, 0x508A, 0x52B3, 0x4FF9, 0x5235, 0x537B, 0x518A, 0x4F37, + 0x5184, 0x4F34, 0x54A5, 0x52F6, 0x50FE, 0x4D9A, 0x542F, 0x5276, + 0x5046, 0x51F8, 0x53B5, 0x51CD, 0x533D, 0x514A, 0x5337, 0x5471, + 0x52BE, 0x50BD, 0x5526, 0x53F7, 0x523E, 0x5004, 0x4C70, 0x537D, + 0x5190, 0x4F70, 0x510D, 0x52FE, 0x5107, 0x5282, 0x507F, 0x527F, + 0x53BC, 0x5201, 0x4FC6, 0x54C7, 0x5342, 0x5153, 0x4F31, 0x544E, + 0x52C6, 0x50C9, 0x4D9B, 0x5041, 0x5243, 0x503B, 0x51C4, 0x4F83, + 0x5199, 0x5309, 0x5116, 0x4EEE, 0x5487, 0x528A, 0x508C, 0x4E22, + 0x5412, 0x51E5, 0x4FFD, 0x4CAA, 0x5398, 0x5160, 0x4F3F, 0x515A, + 0x4EAB, 0x50D6, 0x52A4, 0x50D4, 0x4DDE, 0x53DA, 0x5224, 0x5046, + 0x4D3A, 0x5360, 0x51A0, 0x4F00, 0x4B78, 0x52E5, 0x511A, 0x4E66, + 0x5093, 0x5266, 0x5090, 0x5263, 0x5008, 0x51E5, 0x5376, 0x51E3, + 0x4F78, 0x4B63, 0x52FB, 0x515E, 0x4EB4, 0x4A6A, 0x52A4, 0x5053, + 0x4E1A, 0x5050, 0x5224, 0x4FC7, 0x51A6, 0x4FC1, 0x51A4, 0x5336, + 0x5121, 0x4E75, 0x543E, 0x52BB, 0x509B, 0x4DD6, 0x4904, 0x51EC, + 0x5010, 0x4D36, 0x500A, 0x5167, 0x4F80, 0x5165, 0x4EEE, 0x515F, + 0x5282, 0x50DF, 0x4E29, 0x5391, 0x5203, 0x5055, 0x4D8E, 0x538C, + 0x5182, 0x4FC9, 0x4C13, 0x4F3B, 0x5125, 0x4F39, 0x50FA, 0x4EAA, + 0x509F, 0x5241, 0x509D, 0x4D4A, 0x539F, 0x51C1, 0x5012, 0x4CA4, + 0x5328, 0x51B9, 0x4F82, 0x4BF9, 0x52D5, 0x50BA, 0x4EF2, 0x50B8, + 0x4E62, 0x505D, 0x5200, 0x502D, 0x4CFD, 0x5362, 0x5180, 0x4F48, + 0x4C56, 0x52EB, 0x517B, 0x4F3F, 0x4BAB, 0x5270, 0x50F6, 0x4EAA, + 0x5072, 0x5215, 0x4FED, 0x5212, 0x4FEB, 0x4D7B, 0x5301, 0x5192, + 0x4F5B, 0x4C05, 0x52AB, 0x5110, 0x4EF8, 0x4B58, 0x522F, 0x50B4, + 0x4E62, 0x502F, 0x5226, 0x502D, 0x51AC, 0x4FA8, 0x5156, 0x52C1, + 0x5154, 0x4F17, 0x4C8D, 0x52BC, 0x50CF, 0x4EB0, 0x4B05, 0x5241, + 0x504C, 0x4E1A, 0x4FED, 0x51E9, 0x4FEA, 0x51E3, 0x4FE8, 0x5168, + 0x52D2, 0x5166, 0x4F5C, 0x5110, 0x527C, 0x508C, 0x4E69, 0x4AEF, + 0x5200, 0x5084, 0x4DD6, 0x5003, 0x51FB, 0x5001, 0x517D, 0x4FA1, + 0x517B, 0x52E0, 0x5124, 0x4F15, 0x5122, 0x5269, 0x511C, 0x4E84, + 0x534F, 0x5211, 0x5045, 0x4DF1, 0x5043, 0x520D, 0x4FBE, 0x518F, + 0x4FB8, 0x513D, 0x52F2, 0x5137, 0x4F2C, 0x53D3, 0x5277, 0x50B5, + 0x4EC9, 0x535D, 0x5223, 0x5058, 0x4E37, 0x5355, 0x51CC, 0x5053, + 0x4DA0, 0x4FCE, 0x4D3A, 0x4F73, 0x5149, 0x4F70, 0x4C99, 0x5288, + 0x50F0, 0x4EE4, 0x4BF6, 0x5235, 0x506E, 0x4E7D, 0x4AA1, 0x522D, + 0x5066, 0x4DEA, 0x500E, 0x4DE8, 0x4F89, 0x515B, 0x4F87, 0x4CEC, + 0x4F81, 0x5156, 0x4F24, 0x4C4A, 0x5292, 0x5084, 0x4E97, 0x4BA3, + 0x4E95, 0x507C, 0x4E05, 0x5021, 0x4E03, 0x501E, 0x4D9D, 0x501C, + 0x4D9B, 0x4F9B, 0x5168, 0x4F95, 0x4CFF, 0x52A3, 0x50EB, 0x4F33, + 0x4BF7, 0x4EAC, 0x5092, 0x4EA9, 0x4BEF, 0x4E48, 0x5089, 0x4E46, + 0x502F, 0x4E40, 0x502C, 0x51C9, 0x4FAB, 0x4D49, 0x4FA9, 0x50FD, + 0x4F4D, 0x4CB1, 0x48A2, 0x50F8, 0x4F44, 0x4C13, 0x4EBE, 0x509C, + 0x4E5D, 0x5099, 0x4E5B, 0x5097, 0x4E55, 0x5017, 0x4DC8, 0x4FBF, + 0x515F, 0x4FBD, 0x4D64, 0x49C5, 0x515A, 0x4F5B, 0x4D5B, 0x4F59, + 0x5102, 0x4F56, 0x4C5A, 0x4F54, 0x50A9, 0x4ECA, 0x50A7, 0x4E6D, + 0x4B4A, 0x51C4, 0x5024, 0x4E64, 0x4B41, 0x51BB, 0x4FCB, 0x4D76, + 0x49E9, 0x5164, 0x4FC2, 0x4D6E, 0x4FC0, 0x510F, 0x4F64, 0x50E4, + 0x4EE2, 0x4C6E, 0x4EDC, 0x508F, 0x4ED9, 0x4C00, 0x51CD, 0x5086, + 0x4E76, 0x4BFB, 0x51A4, 0x502D, 0x4E17, 0x502B, 0x514C, 0x5025, + 0x4D84, 0x4A3A, 0x5144, 0x4F4C, 0x4D7B, 0x4907, 0x50EF, 0x4F44, + 0x4D13, 0x4EEB, 0x50E7, 0x4EE9, 0x50E4, 0x4EE3, 0x4C12, 0x4EE0, + 0x503B, 0x4E84, 0x4C0D, 0x51A5, 0x500D, 0x4DF6, 0x4AFF, 0x517B, + 0x4FB3, 0x4D92, 0x4AFA, 0x4D8F, 0x4FAB, 0x4D8D, 0x4FA8, 0x4D87, + 0x4F4D, 0x50CC, 0x4F4A, 0x4D22, 0x4F48, 0x50C4, 0x4EF0, 0x4C89, + 0x47D2, 0x50BF, 0x4E67, 0x4C1F, 0x4E61, 0x5066, 0x4E5E, 0x4BB0, + 0x4E5C, 0x500D, 0x4DFB, 0x4FB6, 0x4DF8, 0x4B0A, 0x5126, 0x4F88, + 0x4DF0, 0x4A96, 0x50FC, 0x4F83, 0x4D05, 0x4971, 0x50F4, 0x4F25, + 0x4C9B, 0x4F23, 0x4C99, 0x4F20, 0x4C93, 0x4EC4, 0x4C90, 0x4EC2, + 0x5094, 0x4EBF, 0x4C26, 0x5185, 0x503F, 0x4E60, 0x4C21, 0x46C7, + 0x4FE6, 0x4DD3, 0x4B18, 0x4DD0, 0x4FB8, 0x4DCE, 0x4F86, 0x4D70, + 0x4F5E, 0x4D69, 0x4F5B, 0x4D67, 0x4A9C, 0x511C, 0x4F53, 0x4D02, + 0x497C, 0x50C8, 0x4EF8, 0x4CFA, 0x4973, 0x50BF, 0x4EF0, 0x4CF4, + 0x4EED, 0x4C01, 0x4E95, 0x5014, 0x4E8F, 0x4BF8, 0x4E8C, 0x500F, + 0x4E8A, 0x4B8A, 0x5150, 0x4FE5, 0x4E2B, 0x4B85, 0x4DCD, 0x4F88, + 0x4DA0, 0x4B15, 0x4D9E, 0x4F83, 0x4D98, 0x4F80, 0x4D3A, 0x4F7E, + 0x4D37, 0x4F78, 0x50C5, 0x4F75, 0x4D2F, 0x51FC, 0x50BD, 0x4F1B, + 0x4CCA, 0x51F4, 0x506C, 0x4F13, 0x4CC5, 0x4EBB, 0x5063, 0x4EB8, + 0x4CC0, 0x4EB6, 0x505B, 0x4E5D, 0x5058, 0x4E57, 0x4C54, 0x4E2E, + 0x5003, 0x4E28, 0x4B58, 0x5141, 0x4FAA, 0x4DC8, 0x4B4F, 0x5117, + 0x4FA5, 0x4DC3, 0x4B4A, 0x4DC1, 0x4F7B, 0x4DBB, 0x4F75, 0x4DB8, + 0x4F72, 0x4DB6, 0x4F70, 0x4DB3, 0x4ACF, 0x50B3, 0x4F16, 0x4D53, + 0x4ACA, 0x50AE, 0x4F0D, 0x4D4B, 0x4A5A, 0x50AA, 0x4F08, 0x4CEA, + 0x4F06, 0x4CE4, 0x4F00, 0x4C85, 0x4EFD, 0x4C82, 0x4EA5, 0x5025, + 0x4EA3, 0x4C4E, 0x48B7, 0x501D, 0x4E48, 0x4BE8, 0x48B1, 0x5018, + 0x4E3F, 0x4BDF, 0x4E16, 0x4BDD, 0x4E14, 0x4BDA, 0x4E0E, 0x4BD8, + 0x4E0B, 0x5008, 0x4E09, 0x4BD3, 0x4E06, 0x4FB3, 0x4E04, 0x4BCA, + 0x481B, 0x4FAE, 0x4DFB, 0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x4D4A, 0x4BAD, 0x49BD, 0x4F3A, 0x4DC4, 0x4BD6, + 0x49B8, 0x4BD7, 0x4DE8, 0x4C02, 0x49E6, 0x4BFF, 0x4DE3, 0x4BFD, + 0x4E0C, 0x4C80, 0x4A74, 0x4C7D, 0x4E04, 0x4C23, 0x4A0C, 0x4F4F, + 0x4A0A, 0x4CA3, 0x4A9C, 0x4CA1, 0x4E52, 0x4CCB, 0x4A97, 0x4CC9, + 0x4E49, 0x4CC6, 0x4AC5, 0x4818, 0x4E70, 0x4CEE, 0x4AF2, 0x4813, + 0x4AEC, 0x4D16, 0x4B78, 0x48B4, 0x4B76, 0x4D0D, 0x4B16, 0x4D38, + 0x4B9F, 0x48E4, 0x4B9C, 0x4D5F, 0x4B9A, 0x497B, 0x4EFE, 0x4D5A, + 0x4BC6, 0x490E, 0x4553, 0x4D82, 0x4BEF, 0x49A4, 0x4611, 0x4DA5, + 0x4BEA, 0x49D6, 0x4C15, 0x49D0, 0x4C12, 0x4A63, 0x4C41, 0x4A60, + 0x46FE, 0x4DEE, 0x4CBD, 0x4A8D, 0x47A6, 0x4E15, 0x4C60, 0x4ABB, + 0x4848, 0x4AB8, 0x4CE0, 0x4B41, 0x487B, 0x4AE5, 0x4D04, 0x4B6E, + 0x4917, 0x4B68, 0x4914, 0x4B65, 0x4D29, 0x4B94, 0x4947, 0x4B92, + 0x4D4D, 0x4BC1, 0x4975, 0x45A2, 0x4D74, 0x4BE9, 0x4A06, 0x465A, + 0x4A04, 0x4BE1, 0x4A34, 0x4C0F, 0x4A31, 0x4C0D, 0x4A2F, 0x4C37, + 0x4A5F, 0x47E6, 0x4A59, 0x4C60, 0x4A8C, 0x47E0, 0x4E33, 0x4CDB, + 0x4B13, 0x48B5, 0x434E, 0x4D03, 0x4B3C, 0x48E8, 0x4B3A, 0x4D27, + 0x4B69, 0x48E3, 0x4B62, 0x4918, 0x4B91, 0x4D74, 0x4B8F, 0x49AA, + 0x4666, 0x4D9C, 0x4BB7, 0x49D8, 0x4751, 0x4DBF, 0x4BE0, 0x4A02, + 0x4785, 0x4A35, 0x4C36, 0x4ABF, 0x4827, 0x4ABD, 0x4CB1, 0x4AE8, + 0x4CDB, 0x4AEA, 0x4CD9, 0x4B15, 0x4D03, 0x4B13, 0x4CFD, 0x4B3E, + 0x4920, 0x4E77, 0x4D24, 0x4B6B, 0x494E, 0x4EBE, 0x4D74, 0x4C19, + 0x49B3, 0x46B5, 0x4D98, 0x4C3D, 0x4A3B, 0x4BE7, 0x4A6B, 0x4C65, + 0x4A69, 0x4C8F, 0x4A98, 0x4C8D, 0x4E0C, 0x4CB7, 0x4AC2, 0x4897, + 0x4E2F, 0x4CDB, 0x4AEE, 0x48CA, 0x4523, 0x4D03, 0x4B17, 0x4930, + 0x4BC9, 0x4D53, 0x4BC6, 0x49BD, 0x4BF1, 0x49ED, 0x4C1C, 0x4A1D, + 0x4C19, 0x4A1B, 0x4774, 0x4DC4, 0x4C41, 0x4A44, 0x4812, 0x4DE7, + 0x4C96, 0x4AA3, 0x4879, 0x4545, 0x4CBA, 0x4B53, 0x490C, 0x4B51, + 0x493D, 0x4B7C, 0x4971, 0x4BAB, 0x496B, 0x4BA5, 0x499F, 0x4BCF, + 0x49CB, 0x4750, 0x4D7F, 0x4BF8, 0x4A85, 0x47BC, 0x4DCB, 0x4C4D, + 0x4AAE, 0x488D, 0x44A8, 0x4C71, 0x4B09, 0x48BB, 0x4B06, 0x48F0, + 0x4B32, 0x48ED, 0x4B61, 0x49B0, 0x4B88, 0x49DD, 0x4B85, 0x49DE, + 0x47A1, 0x4D63, 0x4BDF, 0x4A3A, 0x47D4, 0x43BC, 0x4C03, 0x4A63, + 0x483B, 0x44CB, 0x4C58, 0x4ABE, 0x4906, 0x4AEA, 0x4933, 0x4AEB, + 0x4934, 0x4B16, 0x4961, 0x46E2, 0x4995, 0x4BEE, 0x49C1, 0x474F, + 0x4D46, 0x4C12, 0x49EE, 0x4820, 0x43E4, 0x4C67, 0x4AD2, 0x4887, + 0x4AFD, 0x4884, 0x4AFA, 0x48B5, 0x4B26, 0x48E6, 0x4B51, 0x49A9, + 0x4B7C, 0x49D9, 0x472F, 0x4CDA, 0x4BD1, 0x4A02, 0x479B, 0x42F6, + 0x4C23, 0x4A5E, 0x47CF, 0x450C, 0x4C4A, 0x4AB9, 0x48CE, 0x4AE4, + 0x48FE, 0x4B0F, 0x492F, 0x4B0D, 0x495F, 0x46A9, 0x498C, 0x4B63, + 0x49BC, 0x47B8, 0x4D61, 0x4BB5, 0x49E9, 0x481F, 0x4478, 0x4C0A, + 0x4A45, 0x484E, 0x456D, 0x487F, 0x4B1F, 0x48B4, 0x4B4A, 0x4973, + 0x4B74, 0x49A0, 0x4B9F, 0x49D0, 0x4737, 0x49FF, 0x4BF1, 0x4A2B, + 0x4838, 0x44A0, 0x4BC9, 0x4A86, 0x489A, 0x45CF, 0x4C1A, 0x4ADD, + 0x48FC, 0x4641, 0x492C, 0x4B33, 0x495D, 0x4B5E, 0x498D, 0x4B89, + 0x49B9, 0x4BDD, 0x49E9, 0x47F0, 0x4A15, 0x4C2E, 0x4A40, 0x4853, + 0x45ED, 0x4C7E, 0x4A9B, 0x4947, 0x465F, 0x4CCB, 0x4B1B, 0x49A3, + 0x47A4, 0x49CF, 0x4B71, 0x4A2D, 0x4B9C, 0x4A59, 0x483D, 0x4A84, + 0x4BED, 0x4AB0, 0x489E, 0x4ADB, 0x4C67, 0x4B06, 0x4900, 0x46B7, + 0x4CB7, 0x4B85, 0x498F, 0x475C, 0x49BB, 0x4BD7, 0x49EB, 0x4C01, + 0x4A13, 0x4C54, 0x4A42, 0x4BD9, 0x4A9C, 0x4919, 0x4AC7, 0x4C53, + 0x4AF2, 0x4975, 0x4741, 0x4CA0, 0x4B71, 0x4A00, 0x47E1, 0x4D18, + 0x4812, 0x4A5B, 0x4843, 0x4AB4, 0x4874, 0x4ADF, 0x48D8, 0x4B06, + 0x4905, 0x4690, 0x4935, 0x4B85, 0x4961, 0x47CB, 0x446C, 0x4B5D, + 0x49EB, 0x4861, 0x45D0, 0x4BD8, 0x4A71, 0x48F1, 0x467C, 0x4922, + 0x4AF5, 0x494E, 0x46E9, 0x49AC, 0x474F, 0x49D8, 0x4785, 0x4A32, + 0x47B6, 0x450E, 0x4C18, 0x4A89, 0x490A, 0x469B, 0x4C69, 0x4B09, + 0x4995, 0x473C, 0x433E, 0x4B31, 0x496C, 0x47A3, 0x44FE, 0x4808, + 0x49F2, 0x4839, 0x4A1E, 0x4899, 0x45E3, 0x48CA, 0x4AA3, 0x4929, + 0x475E, 0x4955, 0x4B4C, 0x49B3, 0x47F4, 0x4522, 0x4BCA, 0x4A39, + 0x4886, 0x45CF, 0x48E5, 0x4AB9, 0x4916, 0x4676, 0x4971, 0x46E1, + 0x49A0, 0x4714, 0x49FA, 0x477D, 0x49A2, 0x47E3, 0x49CE, 0x4814, + 0x462C, 0x4C08, 0x4A80, 0x48A5, 0x46CE, 0x43CA, 0x4B00, 0x4963, + 0x479E, 0x4484, 0x47CF, 0x49E9, 0x4834, 0x453C, 0x4894, 0x4A97, + 0x48C0, 0x4AF0, 0x4920, 0x4759, 0x497E, 0x4AEB, 0x49D8, 0x47EF, + 0x44EC, 0x4B6C, 0x4A01, 0x48B0, 0x45D3, 0x490F, 0x4A5B, 0x4882, + 0x4676, 0x48E2, 0x4ADB, 0x4940, 0x474B, 0x496C, 0x47AC, 0x49C6, + 0x47DE, 0x4A20, 0x4842, 0x4630, 0x4BD7, 0x4ACA, 0x48FD, 0x4702, + 0x495C, 0x4768, 0x49B6, 0x47CD, 0x4A0C, 0x4B73, 0x4A37, 0x4891, + 0x468A, 0x4C16, 0x4A66, 0x494B, 0x4756, 0x43C4, 0x4B0F, 0x491E, + 0x4820, 0x44B8, 0x478E, 0x4A00, 0x47EE, 0x45A0, 0x484F, 0x4AAA, + 0x48AE, 0x467C, 0x490D, 0x4717, 0x4996, 0x4B00, 0x49F0, 0x47DE, + 0x458F, 0x4BA4, 0x4A43, 0x489D, 0x466B, 0x429E, 0x4A9B, 0x4985, + 0x476B, 0x44D1, 0x47CD, 0x4980, 0x4831, 0x45EE, 0x48BC, 0x4656, + 0x48EC, 0x46C0, 0x4892, 0x475A, 0x48ED, 0x4ADD, 0x4976, 0x47ED, + 0x45DD, 0x4B5E, 0x4A53, 0x4822, 0x45A9, 0x42BD, 0x4A27, 0x490B, + 0x46B5, 0x4402, 0x471B, 0x49EA, 0x47B0, 0x452B, 0x4840, 0x4598, + 0x489F, 0x463D, 0x4929, 0x46A4, 0x43F0, 0x4AE9, 0x4900, 0x47D3, + 0x4515, 0x4B41, 0x4A08, 0x488F, 0x462C, 0x4366, 0x4A5B, 0x48BF, + 0x475D, 0x4496, 0x47F1, 0x49A2, 0x47BC, 0x45AF, 0x47C4, 0x464F, + 0x4853, 0x46EA, 0x48DD, 0x46B4, 0x4484, 0x4ACC, 0x4963, 0x4782, + 0x45D7, 0x40D5, 0x49EB, 0x4871, 0x45D9, 0x4285, 0x4A6B, 0x48CE, + 0x470F, 0x4401, 0x47A4, 0x49B3, 0x4834, 0x455B, 0x4860, 0x45FD, + 0x4835, 0x469C, 0x48C3, 0x4732, 0x442F, 0x4AD9, 0x49A2, 0x4791, + 0x4972, 0x47C8, 0x4624, 0x4B80, 0x4A7A, 0x4910, 0x4721, 0x490A, + 0x4A7C, 0x4911, 0x478A, 0x49C0, 0x4849, 0x4A19, 0x48A4, 0x4A13, + 0x48A2, 0x4682, 0x48D5, 0x4AEB, 0x4987, 0x480C, 0x4565, 0x4B16, + 0x4989, 0x480D, 0x463F, 0x443C, 0x4A87, 0x494B, 0x479F, 0x4442, + 0x4798, 0x497B, 0x47D0, 0x45FC, 0x488A, 0x4A25, 0x48E4, 0x472D, + 0x48E2, 0x46F7, 0x4942, 0x4792, 0x49C2, 0x484C, 0x4654, 0x4879, + 0x4A1B, 0x4852, 0x468A, 0x445C, 0x4A6D, 0x495C, 0x4813, 0x4615, + 0x41DD, 0x4A0D, 0x4844, 0x464B, 0x48F8, 0x4716, 0x4924, 0x47A2, + 0x4928, 0x47A0, 0x4560, 0x4806, 0x49D3, 0x48BF, 0x4707, 0x44B1, + 0x4A7F, 0x4919, 0x4709, 0x44ED, 0x4243, 0x496D, 0x4853, 0x46C5, + 0x4431, 0x46C2, 0x490B, 0x46FA, 0x44A8, 0x47EA, 0x45BA, 0x47E7, + 0x4652, 0x481E, 0x464F, 0x433A, 0x46F0, 0x48D0, 0x47B0, 0x4576, + 0x4267, 0x49AD, 0x4810, 0x45B1, 0x42EF, 0x4A59, 0x4893, 0x473F, + 0x4567, 0x3F93, 0x494A, 0x4830, 0x45A2, 0x429F, 0x46D3, 0x4861, + 0x46D0, 0x4911, 0x4738, 0x44EB, 0x47F3, 0x49C2, 0x47F1, 0x4690, + 0x4400, 0x4A1B, 0x48AA, 0x472A, 0x4441, 0x40A9, 0x498A, 0x478E, + 0x4621, 0x43F1, 0x4625, 0x4871, 0x474B, 0x4468, 0x4749, 0x45E0, + 0x47DF, 0x45AD, 0x4836, 0x464B, 0x436D, 0x46DD, 0x48EE, 0x46DB, + 0x456C, 0x426B, 0x49A0, 0x47CE, 0x4671, 0x42B2, 0x3D9B, 0x4887, + 0x46D7, 0x44F2, 0x425C, 0x4530, 0x4790, 0x4662, 0x42E3, 0x4630, + 0x44B0, 0x4758, 0x4478, 0x4726, 0x458C, 0x47EB, 0x49B1, 0x4813, + 0x45F7, 0x4435, 0x4A30, 0x48CB, 0x46EB, 0x45B2, 0x40FE, 0x494F, + 0x47AB, 0x46B2, 0x43B5, 0x46AC, 0x4864, 0x4743, 0x4539, 0x4770, + 0x453B, 0x4801, 0x466F, 0x482A, 0x4641, 0x44FC, 0x4734, 0x48E1, + 0x4736, 0x45D2, 0x4327, 0x4965, 0x47F0, 0x46CD, 0x44B7, 0x3F17, + 0x48A9, 0x47BC, 0x45C3, 0x42A0, 0x45C1, 0x4871, 0x46BF, 0x443D, + 0x46BC, 0x451C, 0x477F, 0x4584, 0x477C, 0x4653, 0x43FA, 0x4680, + 0x4895, 0x4743, 0x4543, 0x41C6, 0x4944, 0x4801, 0x4644, 0x43B5, + 0x4611, 0x4887, 0x4709, 0x4503, 0x4798, 0x490C, 0x47C4, 0x4605, + 0x4851, 0x46CE, 0x484E, 0x46CB, 0x48D6, 0x478D, 0x45C9, 0x4791, + 0x4959, 0x4818, 0x4690, 0x4481, 0x49D8, 0x48A1, 0x4724, 0x4554, + 0x42A5, 0x49A5, 0x4814, 0x4655, 0x4406, 0x4718, 0x48EE, 0x47A6, + 0x461B, 0x47A8, 0x4619, 0x43C3, 0x46DD, 0x48B8, 0x46AF, 0x44D7, + 0x4211, 0x493C, 0x47FA, 0x46A5, 0x4462, 0x3F9C, 0x487F, 0x4736, + 0x45A0, 0x4374, 0x459D, 0x47C1, 0x4667, 0x4489, 0x46FA, 0x4563, + 0x46F8, 0x4560, 0x47B5, 0x462B, 0x444B, 0x46EE, 0x4810, 0x46BC, + 0x451F, 0x42E6, 0x491E, 0x4807, 0x45EC, 0x4406, 0x4124, 0x488C, + 0x4743, 0x44DF, 0x429F, 0x45B0, 0x47CE, 0x4679, 0x44A4, 0x470C, + 0x44A2, 0x4709, 0x4577, 0x4797, 0x4641, 0x437E, 0x463E, 0x4821, + 0x46D2, 0x456B, 0x4210, 0x48FD, 0x47E9, 0x4602, 0x4458, 0x4035, + 0x452E, 0x4729, 0x452B, 0x42FC, 0x45C6, 0x4416, 0x468A, 0x4413, + 0x471D, 0x44EE, 0x42EF, 0x4589, 0x4779, 0x4652, 0x43D5, 0x4175, + 0x4889, 0x46DF, 0x4581, 0x42A9, 0x3F83, 0x47FA, 0x4614, 0x446F, + 0x4128, 0x4544, 0x4736, 0x4542, 0x438A, 0x45DC, 0x4467, 0x4670, + 0x4507, 0x46FF, 0x4505, 0x4347, 0x459F, 0x478A, 0x4664, 0x4422, + 0x4210, 0x486C, 0x4756, 0x4593, 0x4301, 0x4082, 0x47DC, 0x46BC, + 0x44BB, 0x41C9, 0x455B, 0x4719, 0x45F0, 0x43A6, 0x4684, 0x447E, + 0x4713, 0x451E, 0x4710, 0x45E4, 0x4399, 0x4649, 0x47F7, 0x4646, + 0x4512, 0x46D9, 0x45AC, 0x4763, 0x4641, 0x4434, 0x463E, 0x4845, + 0x46A2, 0x4570, 0x434A, 0x48F5, 0x47B5, 0x4602, 0x4497, 0x421C, + 0x486B, 0x46F5, 0x4530, 0x43B8, 0x40D6, 0x47DC, 0x465A, 0x452B, + 0x42C8, 0x45C1, 0x4748, 0x45BE, 0x444E, 0x4623, 0x44EE, 0x46B2, + 0x44EB, 0x4740, 0x4586, 0x4445, 0x4617, 0x47F7, 0x467A, 0x457C, + 0x4361, 0x48CF, 0x4767, 0x45DF, 0x44A5, 0x426F, 0x4544, 0x46D2, + 0x45D5, 0x43C5, 0x45A6, 0x446B, 0x4637, 0x4507, 0x4315, 0x459D, + 0x43BD, 0x462D, 0x445F, 0x4691, 0x44FB, 0x42D2, 0x4561, 0x4779, + 0x45F6, 0x4421, 0x40E0, 0x47D0, 0x46E4, 0x4558, 0x4373, 0x3F85, + 0x47A0, 0x464E, 0x44B6, 0x4286, 0x4520, 0x4737, 0x45B2, 0x43D7, + 0x4616, 0x4478, 0x46A5, 0x4514, 0x4704, 0x4579, 0x43CF, 0x4080, + 0x47B8, 0x466D, 0x44D7, 0x42E9, 0x3F1F, 0x4756, 0x45D2, 0x4433, + 0x41F6, 0x3D93, 0x46C1, 0x4535, 0x4385, 0x402D, 0x43F5, 0x462A, + 0x4492, 0x429D, 0x452D, 0x4346, 0x458E, 0x43E9, 0x4680, 0x4454, + 0x4291, 0x4588, 0x473D, 0x45E9, 0x444F, 0x419D, 0x47F0, 0x46AC, + 0x454C, 0x43A5, 0x4097, 0x4760, 0x4641, 0x44AD, 0x42F1, 0x3F84, + 0x4367, 0x45A9, 0x4405, 0x4150, 0x44A1, 0x42B2, 0x4507, 0x435B, + 0x4600, 0x43C7, 0x41FB, 0x4502, 0x46BE, 0x4567, 0x431C, 0x403C, + 0x4776, 0x4628, 0x44C5, 0x426B, 0x3F1E, 0x46E5, 0x45C0, 0x4421, + 0x41AF, 0x44BD, 0x46DC, 0x4523, 0x4377, 0x4588, 0x4419, 0x464A, + 0x4480, 0x42C7, 0x457E, 0x436F, 0x45DF, 0x4477, 0x463E, 0x44E1, + 0x42BF, 0x4546, 0x46F8, 0x45A7, 0x443D, 0x41D1, 0x3EB2, 0x46C3, + 0x453A, 0x4398, 0x4113, 0x4435, 0x465D, 0x449C, 0x42ED, 0x4565, + 0x438C, 0x45C6, 0x4492, 0x4629, 0x44F8, 0x42E0, 0x455D, 0x473B, + 0x45BE, 0x4459, 0x422F, 0x47EE, 0x46D9, 0x45B4, 0x43B4, 0x4172, + 0x4762, 0x4648, 0x451B, 0x433C, 0x40AF, 0x4759, 0x45DC, 0x447D, + 0x428F, 0x44E3, 0x46F7, 0x45D7, 0x440A, 0x4632, 0x4475, 0x42F8, + 0x453E, 0x471D, 0x459F, 0x446B, 0x4246, 0x47A5, 0x46BB, 0x4533, + 0x43C7, 0x418F, 0x4744, 0x4629, 0x4495, 0x4321, 0x455E, 0x473B, + 0x45C2, 0x448F, 0x42A7, 0x44F5, 0x46D9, 0x45B8, 0x43EF, 0x4618, + 0x4456, 0x4648, 0x4520, 0x46FF, 0x4580, 0x43E3, 0x463E, 0x4787, + 0x469D, 0x4518, 0x43DA, 0x4861, 0x477E, 0x4636, 0x450E, 0x4338, + 0x4543, 0x43A0, 0x41A3, 0x3DFC, 0x465D, 0x44D6, 0x4396, 0x40E5, + 0x4402, 0x420D, 0x44CC, 0x4280, 0x452E, 0x435C, 0x4159, 0x4432, + 0x4620, 0x4494, 0x42E8, 0x409A, 0x4706, 0x45B9, 0x4426, 0x42DE, + 0x400E, 0x46A5, 0x45B3, 0x441C, 0x41BB, 0x3F41, 0x429F, 0x451B, + 0x437B, 0x4102, 0x43E3, 0x4229, 0x44B2, 0x4307, 0x4572, 0x43DD, + 0x4176, 0x4444, 0x425B, 0x4509, 0x436A, 0x416C, 0x443A, 0x45FC, + 0x446F, 0x42C3, 0x4030, 0x46DF, 0x4595, 0x4401, 0x4249, 0x4026, + 0x4326, 0x4529, 0x43F8, 0x4243, 0x44C2, 0x42B1, 0x44F7, 0x4388, + 0x4119, 0x43BE, 0x4204, 0x448A, 0x42E2, 0x454E, 0x43B9, 0x41FA, + 0x4480, 0x4637, 0x44B5, 0x4345, 0x40CF, 0x3E78, 0x45A9, 0x444B, + 0x433B, 0x40C5, 0x3CAB, 0x459F, 0x4442, 0x4224, 0x3F81, 0x4301, + 0x4537, 0x43D3, 0x421E, 0x446D, 0x42FC, 0x4532, 0x43CE, 0x4562, + 0x43FF, 0x4287, 0x44C9, 0x46A8, 0x455D, 0x43FA, 0x41D5, 0x3F2A, + 0x4645, 0x44F4, 0x438B, 0x4159, 0x3E96, 0x45E3, 0x44EB, 0x431B, + 0x4154, 0x43B7, 0x45D9, 0x4482, 0x42A6, 0x4516, 0x4348, 0x4572, + 0x4414, 0x426A, 0x44AD, 0x4342, 0x410A, 0x43A5, 0x459D, 0x44A4, + 0x42CE, 0x408C, 0x436E, 0x4567, 0x443A, 0x42C8, 0x44CF, 0x42FE, + 0x4173, 0x43CC, 0x41E2, 0x4466, 0x42F5, 0x40BA, 0x4361, 0x455A, + 0x4460, 0x4284, 0x4037, 0x4670, 0x4525, 0x43F2, 0x427A, 0x3FB3, + 0x3BAC, 0x451B, 0x43ED, 0x4204, 0x3FA9, 0x42AB, 0x44B7, 0x437E, + 0x4156, 0x4418, 0x4236, 0x44AD, 0x430E, 0x40D9, 0x440F, 0x4230, + 0x3F5D, 0x42D7, 0x44D8, 0x43A1, 0x41BA, 0x3F53, 0x45F5, 0x44CF, + 0x4335, 0x41B0, 0x3EC8, 0x4592, 0x4466, 0x42C5, 0x40C1, 0x3DF4, + 0x41E2, 0x4460, 0x4289, 0x407F, 0x435C, 0x41DC, 0x43F7, 0x4284, + 0x3FFC, 0x42EC, 0x4161, 0x43ED, 0x420E, 0x4482, 0x42E3, 0x40E9, + 0x3DDB, 0x4546, 0x4419, 0x42AB, 0x4067, 0x3DD5, 0x453C, 0x4413, + 0x423A, 0x4029, 0x3C56, 0x450B, 0x43A5, 0x4230, 0x3FA5, 0x42D2, + 0x410C, 0x436E, 0x41BA, 0x3F9B, 0x4262, 0x4106, 0x4369, 0x41B4, + 0x43FF, 0x425C, 0x4011, 0x42F9, 0x4523, 0x4395, 0x4252, 0x3FD2, + 0x3CD5, 0x451D, 0x438F, 0x41E1, 0x3F49, 0x3B3F, 0x44B5, 0x4386, + 0x41D7, 0x3F44, 0x427A, 0x44B0, 0x4380, 0x41CD, 0x3F3A, 0x4274, + 0x4033, 0x4311, 0x4156, 0x43AC, 0x426B, 0x3FB0, 0x430C, 0x4504, + 0x433E, 0x41F9, 0x440C, 0x45BE, 0x44A0, 0x4338, 0x4183, 0x46A2, + 0x458D, 0x4496, 0x4301, 0x417D, 0x3EE2, 0x4584, 0x4491, 0x42FB, + 0x4106, 0x43F7, 0x457E, 0x4428, 0x42F2, 0x40FC, 0x438D, 0x41E3, + 0x441F, 0x42EC, 0x44E5, 0x4384, 0x41DA, 0x43EC, 0x42E3, 0x447D, + 0x4319, 0x41D4, 0x3F84, 0x456E, 0x4477, 0x4313, 0x415D, 0x3F00, + 0x4565, 0x446E, 0x42DC, 0x4158, 0x3EF6, 0x455B, 0x4409, 0x42D2, + 0x414E, 0x436E, 0x41F6, 0x4400, 0x42CD, 0x40D6, 0x4364, 0x41BA, + 0x442D, 0x42C3, 0x445E, 0x42F9, 0x41B4, 0x3FA2, 0x4257, 0x4458, + 0x42F4, 0x41AF, 0x3F1D, 0x4574, 0x4482, 0x4322, 0x41A5, 0x3F18, + 0x3B6E, 0x4479, 0x4319, 0x4132, 0x3ED4, 0x41D7, 0x4418, 0x42AD, + 0x4129, 0x437D, 0x4206, 0x4000, 0x42A8, 0x4123, 0x4373, 0x4201, + 0x3FFB, 0x429E, 0x4469, 0x436E, 0x41FB, 0x3FF5, 0x4267, 0x4463, + 0x4303, 0x4185, 0x3F76, 0x3CD0, 0x448D, 0x42FE, 0x4180, 0x3F6C, + 0x3CCA, 0x4428, 0x4328, 0x417A, 0x3F66, 0x4252, 0x40CB, 0x4323, + 0x4142, 0x3F27, 0x424D, 0x4053, 0x42B8, 0x41A5, 0x4383, 0x4215, + 0x4049, 0x3D8B, 0x44AA, 0x4379, 0x420B, 0x400F, 0x3D41, 0x44A0, + 0x4374, 0x4206, 0x4079, 0x3DC3, 0x4123, 0x43A2, 0x41FC, 0x4073, + 0x3DBD, 0x4153, 0x4338, 0x41C4, 0x3FFA, 0x4262, 0x414E, 0x4332, + 0x4226, 0x3FF0, 0x4291, 0x40DB, 0x3F33, 0x41B9, 0x43C5, 0x428C, + 0x40D1, 0x3EB3, 0x41AF, 0x43BC, 0x4286, 0x4106, 0x3EAD, 0x3BA1, + 0x43B6, 0x42B5, 0x4100, 0x3EA3, 0x41DA, 0x43E0, 0x42AB, 0x40F6, + 0x3EDF, 0x41D4, 0x3FD7, 0x4240, 0x40BE, 0x430C, 0x4204, 0x3FCD, + 0x426F, 0x4125, 0x433A, 0x4192, 0x3FC7, 0x3CB3, 0x445E, 0x4335, + 0x418D, 0x3FC1, 0x3D82, 0x442D, 0x42FE, 0x41C1, 0x3FF7, 0x3D78, + 0x40DD, 0x42F9, 0x41B7, 0x3FF2, 0x3D72, 0x40D8, 0x4323, 0x41E7, + 0x3FE8, 0x4252, 0x4108, 0x431E, 0x41E1, 0x4382, 0x424C, 0x4103, + 0x3F2A, 0x4174, 0x43AC, 0x427B, 0x4133, 0x3EAA, 0x44F8, 0x43A7, + 0x4272, 0x412D, 0x3F5B, 0x3B54, 0x43D1, 0x42A1, 0x40BB, 0x3EDC, + 0x41CE, 0x43FA, 0x429B, 0x40EB, 0x3F8C, 0x41C4, 0x4073, 0x42C6, + 0x40E6, 0x432B, 0x41F4, 0x3FFF, 0x425F, 0x411A, 0x4359, 0x41EE, + 0x4030, 0x3E06, 0x4450, 0x4354, 0x421D, 0x40D3, 0x3E42, 0x4475, + 0x4322, 0x4249, 0x4060, 0x3E38, 0x4470, 0x434C, 0x41E0, 0x4095, + 0x3E74, 0x416F, 0x4342, 0x4210, 0x408B, 0x3E6E, 0x419F, 0x4370, + 0x4206, 0x40C0, 0x3EAA, 0x3BB1, 0x439A, 0x4235, 0x40B6, 0x3EE1, + 0x3C88, 0x43C4, 0x4264, 0x40EA, 0x3EDB, 0x3BF3, 0x4004, 0x4293, + 0x411B, 0x3F12, 0x4187, 0x403A, 0x428A, 0x4115, 0x3FBC, 0x41B7, + 0x4030, 0x3E0C, 0x4145, 0x434D, 0x41E6, 0x4065, 0x3E47, 0x4175, + 0x437B, 0x4215, 0x409A, 0x3EF9, 0x3B3F, 0x4315, 0x4244, 0x40CA, + 0x3F30, 0x3C18, 0x4052, 0x423B, 0x40C5, 0x3F2A, 0x3C5B, 0x3FDE, + 0x426A, 0x40F5, 0x3F60, 0x4197, 0x4014, 0x3E66, 0x4125, 0x3F96, + 0x41C6, 0x4045, 0x3E61, 0x4155, 0x42FB, 0x41F6, 0x407A, 0x3E9C, + 0x3C42, 0x4325, 0x4225, 0x40AA, 0x3ED3, 0x3BAD, 0x434F, 0x4250, + 0x40A5, 0x3F09, 0x3C7F, 0x402D, 0x427E, 0x40D5, 0x3F40, 0x3CBD, + 0x405D, 0x3E08, 0x4105, 0x3F76, 0x41DB, 0x4025, 0x3E44, 0x4135, + 0x3FAB, 0x420A, 0x4059, 0x3E7B, 0x3CAA, 0x4335, 0x4235, 0x408A, + 0x3EB2, 0x3CEC, 0x4363, 0x4264, 0x40BB, 0x3EED, 0x3D29, 0x4047, + 0x428F, 0x40EB, 0x3F23, 0x3D66, 0x4078, 0x425C, 0x411B, 0x3F55, + 0x3DA2, 0x40A8, 0x3ED6, 0x4184, 0x3FC6, 0x421B, 0x40D8, 0x3F11, + 0x41AF, 0x3FF7, 0x424A, 0x413E, 0x4313, 0x41DE, 0x402C, 0x3E52, + 0x40D4, 0x433D, 0x4209, 0x405D, 0x3E89, 0x413A, 0x430B, 0x41D6, + 0x40C8, 0x3EBF, 0x3CBC, 0x4335, 0x4235, 0x40F8, 0x3F32, 0x3CF9, + 0x4085, 0x4264, 0x4127, 0x3F68, 0x3D36, 0x40B5, 0x428F, 0x418C, + 0x3F9D, 0x4223, 0x411B, 0x3F1F, 0x41B7, 0x4009, 0x41F0, 0x40AD, + 0x3F55, 0x3D66, 0x403A, 0x424F, 0x4117, 0x3FC6, 0x3DA2, 0x43A7, + 0x427E, 0x4142, 0x3FF7, 0x3E1B, 0x3BBF, 0x42D8, 0x41A7, 0x4062, + 0x3E52, 0x3BFE, 0x3F44, 0x4206, 0x408E, 0x3EC5, 0x4165, 0x3F7A, + 0x3E08, 0x405A, 0x3F00, 0x4132, 0x3FE6, 0x3E80, 0x40C0, 0x3F6D, + 0x4196, 0x404D, 0x3EB7, 0x3C71, 0x4321, 0x41F2, 0x407D, 0x3F25, + 0x3CF6, 0x3981, 0x4220, 0x40E3, 0x3F91, 0x3D33, 0x39CC, 0x41ED, + 0x4148, 0x3FFD, 0x3DAD, 0x3B48, 0x3EA6, 0x4114, 0x3F8D, 0x3E26, + 0x40A2, 0x3F14, 0x3D62, 0x3FF9, 0x3E99, 0x40D2, 0x3F85, 0x3DDB, + 0x4060, 0x3F0B, 0x4137, 0x3FEC, 0x3E4F, 0x3BC1, 0x426C, 0x41CC, + 0x4057, 0x3EC2, 0x3C48, 0x384C, 0x4199, 0x40BD, 0x3F30, 0x3CC9, + 0x39F1, 0x41F8, 0x4085, 0x3EFA, 0x3D44, 0x3FDC, 0x3E3F, 0x40EA, + 0x3F67, 0x3DBD, 0x407C, 0x3EED, 0x3D3B, 0x3FD3, 0x3E36, 0x40DE, + 0x3F5A, 0x3DB0, 0x403A, 0x4218, 0x4142, 0x3FC6, 0x3E29, 0x3B50, + 0x4272, 0x410F, 0x402D, 0x3E9B, 0x3BDD, 0x38D5, 0x41A0, 0x3FF8, + 0x3F09, 0x3CA2, 0x3F84, 0x3DA4, 0x4094, 0x3ECF, 0x3D21, 0x3FEC, + 0x3E54, 0x40F6, 0x3F77, 0x3D96, 0x4088, 0x3EC6, 0x3D14, 0x3FDF, + 0x3E47, 0x40ED, 0x3F6B, 0x3D89, 0x3A9F, 0x4252, 0x40EA, 0x3FD6, + 0x3E3E, 0x3C3B, 0x424F, 0x414F, 0x3FCC, 0x3EAD, 0x3CBB, 0x39A2, + 0x41AA, 0x403A, 0x3EE3, 0x3D73, 0x3FCB, 0x3DF7, 0x40D5, 0x3F1C, + 0x3D38, 0x4067, 0x3E6A, 0x40D0, 0x3FBE, 0x3DEE, 0x4093, 0x3F13, + 0x3D2F, 0x405B, 0x41CE, 0x40CA, 0x3FB1, 0x3DE1, 0x3B96, 0x422F, + 0x415F, 0x3FAC, 0x3E8C, 0x3C5B, 0x425A, 0x412C, 0x404F, 0x3F34, + 0x3D14, 0x3FAA, 0x41EC, 0x40E6, 0x3EFB, 0x3E07, 0x4047, 0x3E49, + 0x40B2, 0x3FD4, 0x3DCD, 0x4044, 0x3F29, 0x4178, 0x403A, 0x3E78, + 0x40DB, 0x3FC7, 0x3DC0, 0x403C, 0x423B, 0x413B, 0x3FC9, 0x3EA6, + 0x3C3A, 0x426C, 0x416D, 0x4065, 0x3F13, 0x3D35, 0x3A8B, 0x41CC, + 0x4090, 0x3F4C, 0x3DE6, 0x4058, 0x422D, 0x412D, 0x3FE9, 0x3E1D, + 0x408F, 0x3F3F, 0x3DD9, 0x3FEB, 0x3ECA, 0x4120, 0x3FA7, 0x3DDB, + 0x3C9C, 0x3FA3, 0x4122, 0x4014, 0x3EF8, 0x3C5B, 0x3AFA, 0x417D, + 0x4076, 0x3EF3, 0x3D51, 0x3AB7, 0x372A, 0x40DD, 0x3F98, 0x3E76, + 0x3BC8, 0x388C, 0x3DC2, 0x3FFF, 0x3E40, 0x3CC6, 0x3FC2, 0x3E31, + 0x3BFF, 0x3F52, 0x3DF2, 0x3FC3, 0x3E6F, 0x3D38, 0x3F4C, 0x3DB7, + 0x4090, 0x3F45, 0x3D32, 0x3B6B, 0x3ED0, 0x40C3, 0x3F7D, 0x3E23, + 0x3CA8, 0x395C, 0x40F2, 0x3FE4, 0x3E90, 0x3C70, 0x3ACC, 0x3E89, + 0x4082, 0x3F37, 0x3D9E, 0x3B94, 0x3E53, 0x3CDF, 0x3F68, 0x3E0D, + 0x3BDE, 0x3F65, 0x3DCD, 0x403D, 0x3EB9, 0x3D14, 0x3F62, 0x3E0C, + 0x3C53, 0x3EEB, 0x3D4B, 0x3FFF, 0x3EE8, 0x3D0B, 0x3A25, 0x3E72, + 0x4098, 0x3F1C, 0x3D83, 0x3BC0, 0x37EF, 0x40CF, 0x3F83, 0x3E2E, + 0x3C7B, 0x397E, 0x3E26, 0x4022, 0x3F0C, 0x3D3A, 0x3B6C, 0x3E28, + 0x3C3B, 0x3F12, 0x3DA9, 0x3BAA, 0x3ECD, 0x3DA2, 0x3FDD, 0x3EC5, + 0x3CEC, 0x3FA4, 0x3DE0, 0x3BEC, 0x3EC7, 0x4115, 0x3FA5, 0x3E86, + 0x3D1C, 0x3A84, 0x4177, 0x403D, 0x3F2C, 0x3D98, 0x3B98, 0x3906, + 0x40A0, 0x3F96, 0x3E02, 0x3C53, 0x394D, 0x3DC3, 0x3FC6, 0x3EE5, + 0x3D4B, 0x3B04, 0x4199, 0x4060, 0x3F86, 0x3D8A, 0x3BC6, 0x3EA9, + 0x40C3, 0x3FBD, 0x3E67, 0x3D3B, 0x3F47, 0x3E60, 0x3FE9, 0x3F0E, + 0x3D3D, 0x3FE2, 0x3E99, 0x3CF5, 0x3FAE, 0x3DE4, 0x404B, 0x3ED2, + 0x3DE1, 0x3BF3, 0x3EC7, 0x40E3, 0x3F6B, 0x3E89, 0x3C6A, 0x3A50, + 0x4145, 0x400A, 0x3EC2, 0x3D5C, 0x3BE2, 0x3884, 0x406E, 0x3F29, + 0x3E42, 0x3C27, 0x39AF, 0x3D98, 0x3FC9, 0x3EE8, 0x3D14, 0x3B93, + 0x3E02, 0x3CD3, 0x3F57, 0x3DC3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, 0x3BBB, 0x39BB, 0x3774, 0x3B3D, 0x3D5B, 0x3C6A, 0x3B3A, + 0x392C, 0x3C2E, 0x3AB7, 0x3D50, 0x3C2B, 0x3A75, 0x3921, 0x3BAF, + 0x3A72, 0x3CD8, 0x3BAC, 0x39EC, 0x3CD1, 0x3BA9, 0x39E9, 0x37AF, + 0x3B2B, 0x3DB2, 0x3CCB, 0x3B24, 0x3956, 0x3706, 0x3E86, 0x3D3B, + 0x3C4D, 0x3B1D, 0x3950, 0x36FF, 0x3E15, 0x3D30, 0x3BD3, 0x3A97, + 0x3879, 0x3556, 0x3E0B, 0x3CB8, 0x3B8F, 0x3A0F, 0x37DC, 0x3B4B, + 0x3A08, 0x3CB2, 0x3B48, 0x3981, 0x3C3C, 0x3B0C, 0x397E, 0x3C34, + 0x3B04, 0x393A, 0x3C31, 0x3A85, 0x38A9, 0x3C2E, 0x3A82, 0x3D14, + 0x3BB7, 0x3A7B, 0x38A2, 0x3BAF, 0x3DBD, 0x3C9C, 0x3BAC, 0x39F2, + 0x380B, 0x3587, 0x3DB3, 0x3C96, 0x3B2C, 0x39E8, 0x3800, 0x33AF, + 0x3D40, 0x3C58, 0x3AEC, 0x395E, 0x3762, 0x3AE5, 0x3D3A, 0x3C12, + 0x3AE1, 0x3953, 0x3BD6, 0x3A62, 0x3D2F, 0x3BD3, 0x3A5B, 0x3CBF, + 0x3BD0, 0x3A58, 0x3835, 0x3B54, 0x3A54, 0x3CB5, 0x3B50, 0x39CF, + 0x37E7, 0x3B4D, 0x3D5E, 0x3CAA, 0x3B46, 0x39C5, 0x3749, 0x3E33, + 0x3D54, 0x3C31, 0x3B40, 0x39BE, 0x3743, 0x3DFB, 0x3D14, 0x3C2B, + 0x3ABF, 0x3930, 0x369E, 0x3AB7, 0x3CD6, 0x3BB1, 0x3AB4, 0x38A0, + 0x3BA9, 0x3A35, 0x3CD0, 0x3BA6, 0x3A32, 0x3CC9, 0x3B6A, 0x3A2A, + 0x3CC6, 0x3B67, 0x3D72, 0x3C54, 0x3B64, 0x39A2, 0x3C4D, 0x3B20, + 0x3D6C, 0x3C4A, 0x3AE4, 0x399B, 0x3767, 0x3E0A, 0x3CF5, 0x3C0C, + 0x3AD9, 0x3955, 0x3719, 0x3E04, 0x3CEF, 0x3BC6, 0x3AD3, 0x3907, + 0x3BC3, 0x3D93, 0x3CE4, 0x3BC0, 0x3AC8, 0x3CAE, 0x3B84, 0x3D88, + 0x3CAB, 0x3B81, 0x3A46, 0x3CA4, 0x3B7E, 0x3A43, 0x3CA1, 0x3B7B, + 0x3DB5, 0x3C9E, 0x3B73, 0x3A39, 0x3C96, 0x3E52, 0x3D43, 0x3C93, + 0x3B6D, 0x39B5, 0x381A, 0x35AB, 0x3D38, 0x3C1F, 0x3AED, 0x39AA, + 0x380F, 0x34FB, 0x3D00, 0x3C14, 0x3AE7, 0x3969, 0x3808, 0x34F4, + 0x3966, 0x3BD6, 0x3AA7, 0x395E, 0x3770, 0x3AA0, 0x395B, 0x3BD0, + 0x3A9D, 0x3958, 0x376A, 0x3A9A, 0x3955, 0x3BC6, 0x3A92, 0x394D, + 0x3BC3, 0x3A8F, 0x38C6, 0x36C8, 0x3A8C, 0x3CA9, 0x3B48, 0x3A0D, + 0x38C0, 0x3679, 0x3A0A, 0x3C9F, 0x3B7E, 0x3A07, 0x38B5, 0x366D, + 0x3146, 0x3C2B, 0x3B73, 0x3A3E, 0x3872, 0x3667, 0x313A, 0x3C5B, + 0x3B6D, 0x3A38, 0x3867, 0x365C, 0x3A35, 0x3C55, 0x3AF2, 0x39B5, + 0x3861, 0x3B2B, 0x39B2, 0x385E, 0x3B24, 0x39AA, 0x3856, 0x3B21, + 0x39A7, 0x3853, 0x3B1E, 0x39A4, 0x3C0E, 0x3B1A, 0x39DF, 0x37C1, + 0x35A4, 0x39DC, 0x3C04, 0x3ADB, 0x39D9, 0x37BB, 0x359E, 0x3CE4, + 0x3BF9, 0x3AD1, 0x3955, 0x37FA, 0x34EE, 0x3D14, 0x3BBF, 0x3ACA, + 0x398D, 0x37F3, 0x3541, 0x398A, 0x3BB9, 0x3B01, 0x3987, 0x3760, + 0x3AFE, 0x397F, 0x3BEA, 0x3A85, 0x397C, 0x37A0, 0x3A7D, 0x38FA, + 0x379D, 0x3A7A, 0x393B, 0x3BA9, 0x3AB4, 0x3937, 0x3792, 0x3AB1, + 0x3C8F, 0x3BA3, 0x3AAE, 0x392D, 0x378C, 0x3AA6, 0x3CBA, 0x3BD4, + 0x3AA3, 0x3969, 0x3BD1, 0x3A6B, 0x3962, 0x3BCD, 0x3A68, 0x395F, + 0x37C4, 0x3A60, 0x3C7B, 0x3B8F, 0x3A9A, 0x38DA, 0x3731, 0x3A97, + 0x3C71, 0x3B89, 0x3A94, 0x3917, 0x3776, 0x35A6, 0x3CA1, 0x3BBA, + 0x3ACA, 0x390C, 0x376B, 0x34FD, 0x3CD1, 0x3BB4, 0x3A4E, 0x3949, + 0x37AF, 0x3A4B, 0x3946, 0x3B76, 0x3A85, 0x3981, 0x37A4, 0x3A7D, + 0x397E, 0x37A1, 0x3A7A, 0x397B, 0x37E7, 0x3AB4, 0x38FA, 0x37E0, + 0x3AB1, 0x393A, 0x3BD9, 0x3AA9, 0x3932, 0x3823, 0x3587, 0x392F, + 0x3B9B, 0x3A6E, 0x396F, 0x3796, 0x35CE, 0x3CB2, 0x3B95, 0x3AA4, + 0x3964, 0x37D5, 0x35C7, 0x31E0, 0x3BC5, 0x3AD6, 0x399C, 0x37CA, + 0x360E, 0x39DB, 0x3BBF, 0x3B0C, 0x39D4, 0x3808, 0x3608, 0x3958, + 0x3805, 0x3A91, 0x3997, 0x3846, 0x364E, 0x3990, 0x3843, 0x3AC7, + 0x398D, 0x3884, 0x3B00, 0x39C7, 0x387D, 0x368C, 0x39C4, 0x38BD, + 0x3B32, 0x39FF, 0x38BA, 0x36D1, 0x33A2, 0x3BE1, 0x3ABB, 0x3A35, + 0x3878, 0x3711, 0x34F1, 0x3C11, 0x3AED, 0x39B8, 0x38B1, 0x3755, + 0x344A, 0x38AE, 0x3B1E, 0x39EF, 0x38EE, 0x3794, 0x3537, 0x38E7, + 0x3B54, 0x3A63, 0x3926, 0x3706, 0x3A60, 0x3923, 0x3749, 0x3A59, + 0x395E, 0x3746, 0x3A20, 0x38E2, 0x3788, 0x3A5A, 0x38DF, 0x3785, + 0x3A57, 0x391A, 0x37C7, 0x360E, 0x3955, 0x3B45, 0x3A89, 0x3952, + 0x3805, 0x369B, 0x3312, 0x3BB0, 0x3A83, 0x398A, 0x383E, 0x36DB, + 0x3368, 0x3BE1, 0x3ABC, 0x39C1, 0x387C, 0x364A, 0x34B8, 0x38B8, + 0x3AF2, 0x39BE, 0x383A, 0x36D6, 0x39BB, 0x3876, 0x3AE7, 0x39F5, + 0x3873, 0x3716, 0x3A2F, 0x38B3, 0x3759, 0x3A64, 0x38EF, 0x3755, + 0x3A29, 0x392A, 0x3797, 0x39EC, 0x3927, 0x3B4E, 0x3A26, 0x3962, + 0x37D6, 0x366F, 0x38E6, 0x3B4B, 0x3A94, 0x3925, 0x37D0, 0x35D9, + 0x33E4, 0x3BB7, 0x3A8E, 0x399B, 0x3816, 0x3666, 0x348C, 0x3B7D, + 0x3AC7, 0x39CD, 0x384F, 0x36AB, 0x398D, 0x388B, 0x3AF9, 0x3992, + 0x38CB, 0x3731, 0x39CC, 0x3906, 0x3AFA, 0x3A06, 0x38C0, 0x37B5, + 0x3A3B, 0x38C5, 0x37F6, 0x3A38, 0x3900, 0x3B5F, 0x3A00, 0x393B, + 0x376F, 0x3A35, 0x3976, 0x3B5C, 0x3A6E, 0x3973, 0x37ED, 0x3642, + 0x3C71, 0x3B8D, 0x3AA0, 0x3974, 0x386A, 0x36CD, 0x3C72, 0x3B8E, + 0x3AD9, 0x39E4, 0x3864, 0x3752, 0x3A1E, 0x3BF5, 0x3B0A, 0x39DE, + 0x38E3, 0x37D1, 0x39DE, 0x391E, 0x3B0B, 0x3A54, 0x3958, 0x3B76, + 0x366A, 0x3955, 0x37CF, 0x3667, 0x3918, 0x380C, 0x3625, 0x3952, + 0x388B, 0x3A83, 0x39CA, 0x3888, 0x36F2, 0x3492, 0x384E, 0x3AB9, + 0x39C4, 0x388A, 0x3776, 0x357A, 0x32D6, 0x3AED, 0x3A3A, 0x393E, + 0x37B0, 0x3608, 0x3382, 0x3AEE, 0x3A30, 0x3902, 0x37F6, 0x36DA, + 0x3479, 0x3832, 0x3AA5, 0x39B0, 0x386E, 0x3691, 0x3510, 0x386A, + 0x36D4, 0x3974, 0x386F, 0x375B, 0x3556, 0x38AB, 0x379D, 0x355C, + 0x3924, 0x37D9, 0x35A5, 0x3920, 0x3792, 0x3635, 0x38E7, 0x37DB, + 0x3A52, 0x395B, 0x3817, 0x3701, 0x345F, 0x3892, 0x3A53, 0x3992, + 0x3850, 0x36BD, 0x3543, 0x32A2, 0x3ABC, 0x3A09, 0x38CE, 0x37C2, + 0x361D, 0x33A4, 0x3036, 0x3A06, 0x38D0, 0x37BC, 0x361F, 0x3495, + 0x3804, 0x3A74, 0x397E, 0x387F, 0x372C, 0x34DD, 0x387C, 0x3728, + 0x3980, 0x3842, 0x36E8, 0x3575, 0x38BC, 0x376F, 0x3605, 0x38F2, + 0x37EB, 0x368F, 0x38EF, 0x37E8, 0x3646, 0x3433, 0x37ED, 0x3A21, + 0x3967, 0x3867, 0x3718, 0x3560, 0x3864, 0x3A96, 0x39A1, 0x3869, + 0x3753, 0x35A6, 0x3377, 0x3B01, 0x39D8, 0x3919, 0x3817, 0x367C, + 0x34B7, 0x37D5, 0x3A49, 0x3953, 0x3819, 0x367E, 0x34BA, 0x3893, + 0x3701, 0x354C, 0x3B9F, 0x3A7F, 0x39C7, 0x3890, 0x377F, 0x3620, + 0x3405, 0x3AEA, 0x3A00, 0x3906, 0x3800, 0x36AA, 0x34A4, 0x37FD, + 0x3A3A, 0x3979, 0x387F, 0x36E9, 0x357C, 0x387C, 0x3773, 0x39EF, + 0x3880, 0x37AF, 0x3657, 0x3932, 0x3774, 0x3654, 0x38F2, 0x382F, + 0x3659, 0x3934, 0x382C, 0x371D, 0x3527, 0x3831, 0x371A, 0x396E, + 0x38A6, 0x371E, 0x35FB, 0x342E, 0x37DF, 0x39D8, 0x391E, 0x3798, + 0x36CA, 0x34C8, 0x3224, 0x3A12, 0x3995, 0x3856, 0x370D, 0x3556, + 0x3378, 0x2E56, 0x3997, 0x38D4, 0x374F, 0x362D, 0x346C, 0x3154, + 0x362A, 0x390E, 0x37C7, 0x36FB, 0x34B4, 0x32BE, 0x36F8, 0x3981, + 0x3846, 0x377D, 0x35D5, 0x38C3, 0x377A, 0x3621, 0x38C0, 0x37BE, + 0x3663, 0x393B, 0x37FA, 0x3668, 0x3538, 0x37FE, 0x372B, 0x39AD, + 0x3874, 0x3728, 0x360F, 0x33A7, 0x37AC, 0x39E6, 0x38EC, 0x37A9, + 0x3698, 0x34DD, 0x32A4, 0x3A1B, 0x3927, 0x3824, 0x371F, 0x35BB, + 0x32F4, 0x3056, 0x3999, 0x3864, 0x37A0, 0x3686, 0x3435, 0x3291, + 0x3642, 0x38DD, 0x381A, 0x370D, 0x3562, 0x32EA, 0x36CA, 0x35F5, + 0x3894, 0x378E, 0x35ED, 0x33D4, 0x3753, 0x36BE, 0x350B, 0x37CF, + 0x3676, 0x34BB, 0x380E, 0x3740, 0x359C, 0x337A, 0x36FD, 0x3599, + 0x38C5, 0x37BC, 0x3667, 0x3464, 0x315A, 0x366C, 0x38FF, 0x37FC, + 0x36EF, 0x3543, 0x3317, 0x3153, 0x3972, 0x3876, 0x3730, 0x35CE, + 0x3408, 0x32B5, 0x39A7, 0x38B1, 0x37AC, 0x36A5, 0x3581, 0x33AD, + 0x36E2, 0x3964, 0x38A6, 0x3766, 0x3651, 0x3495, 0x3763, 0x3608, + 0x38E0, 0x37E1, 0x36D4, 0x356F, 0x385E, 0x3758, 0x35FC, 0x381D, + 0x3715, 0x35F9, 0x3899, 0x3794, 0x3685, 0x3519, 0x3812, 0x3682, + 0x38D4, 0x380F, 0x36C7, 0x35A9, 0x33E2, 0x374B, 0x3986, 0x38C9, + 0x3744, 0x3632, 0x34C4, 0x328D, 0x39BB, 0x3903, 0x3805, 0x373D, + 0x35E1, 0x3381, 0x3112, 0x393D, 0x387E, 0x377A, 0x366A, 0x3502, + 0x3375, 0x36EF, 0x3932, 0x383A, 0x36AC, 0x358D, 0x3414, 0x3730, + 0x361A, 0x3875, 0x37AF, 0x36A0, 0x34A8, 0x37EE, 0x369D, 0x353C, + 0x37EB, 0x36E2, 0x3925, 0x3867, 0x3762, 0x3652, 0x3451, 0x37DF, + 0x399A, 0x38E2, 0x3822, 0x36D4, 0x35BC, 0x381F, 0x3A45, 0x391C, + 0x385D, 0x3797, 0x3688, 0x34D8, 0x3A42, 0x39C8, 0x3911, 0x37D3, + 0x370A, 0x35F3, 0x33EA, 0x3A37, 0x3946, 0x388D, 0x37C8, 0x363B, + 0x3515, 0x33E2, 0x36BC, 0x35A3, 0x3803, 0x3701, 0x362F, 0x342E, + 0x377F, 0x3675, 0x34C4, 0x37BE, 0x3672, 0x3553, 0x383B, 0x36F2, + 0x35E0, 0x3424, 0x3736, 0x3666, 0x34B5, 0x37B4, 0x36AC, 0x3549, + 0x332D, 0x36A4, 0x3590, 0x3831, 0x36E9, 0x3617, 0x3463, 0x3321, + 0x2FF0, 0x38E5, 0x37AB, 0x36E2, 0x3581, 0x3457, 0x321A, 0x2E2D, + 0x3861, 0x37A0, 0x364F, 0x34A1, 0x3367, 0x30A7, 0x3531, 0x37DB, + 0x3713, 0x35BE, 0x3496, 0x3267, 0x3604, 0x3525, 0x3796, 0x3685, + 0x3571, 0x33AC, 0x36CA, 0x35F8, 0x3443, 0x370A, 0x363E, 0x34D4, + 0x3788, 0x36BF, 0x3562, 0x339D, 0x3703, 0x35A9, 0x3805, 0x3742, + 0x3630, 0x3482, 0x32A4, 0x3675, 0x3511, 0x37FA, 0x36B5, 0x359A, + 0x33DD, 0x31EC, 0x35E0, 0x3875, 0x3773, 0x3626, 0x3552, 0x33D6, + 0x318E, 0x38EB, 0x37F0, 0x36EB, 0x361B, 0x34B5, 0x32DE, 0x30CC, + 0x34FC, 0x37EA, 0x36A5, 0x358A, 0x3415, 0x322D, 0x35D0, 0x3463, + 0x3763, 0x3652, 0x357E, 0x3373, 0x3697, 0x35C5, 0x3457, 0x36D7, + 0x360A, 0x34E7, 0x3797, 0x3650, 0x352E, 0x33B6, 0x36D0, 0x3575, + 0x3813, 0x370F, 0x35FC, 0x3495, 0x330E, 0x3641, 0x388A, 0x378D, + 0x3682, 0x35B4, 0x37CC, 0x3743, 0x35F6, 0x34D6, 0x3782, 0x367B, + 0x351E, 0x33EF, 0x36BB, 0x35A6, 0x37FF, 0x36FB, 0x35EC, 0x3512, + 0x32FE, 0x3675, 0x38B5, 0x37BA, 0x36EF, 0x35E0, 0x3479, 0x32F2, + 0x392A, 0x3836, 0x3772, 0x3666, 0x354F, 0x346E, 0x3247, 0x2F5C, + 0x382B, 0x372D, 0x365B, 0x3502, 0x33D3, 0x3193, 0x358A, 0x37AA, + 0x3722, 0x3614, 0x34F6, 0x3330, 0x3659, 0x353D, 0x379F, 0x3699, + 0x3584, 0x345D, 0x3324, 0x364E, 0x34AA, 0x3374, 0x368E, 0x357D, + 0x3456, 0x36CE, 0x35BE, 0x349E, 0x3368, 0x3683, 0x34E6, 0x378D, + 0x36C7, 0x35B3, 0x3404, 0x32C4, 0x35F8, 0x34DA, 0x3787, 0x3639, + 0x3521, 0x33F9, 0x3219, 0x35ED, 0x37FE, 0x3700, 0x3632, 0x351B, + 0x33F2, 0x31BB, 0x2E4F, 0x37BA, 0x36F5, 0x35EB, 0x3482, 0x3350, + 0x3106, 0x2E47, 0x37B3, 0x366C, 0x359C, 0x3477, 0x3345, 0x3043, + 0x34C3, 0x372D, 0x3665, 0x354F, 0x33DD, 0x32A1, 0x361A, 0x34B8, + 0x3388, 0x365A, 0x3544, 0x33D6, 0x31F5, 0x358A, 0x346A, 0x32E5, + 0x3613, 0x353D, 0x3386, 0x3654, 0x357F, 0x3417, 0x32DE, 0x35C4, + 0x34AA, 0x3715, 0x364D, 0x34F2, 0x33C8, 0x3233, 0x2FC3, 0x37CF, + 0x370A, 0x3642, 0x34E6, 0x33BD, 0x31DC, 0x2EEF, 0x37C4, 0x36C9, + 0x35B7, 0x34DB, 0x33B6, 0x317A, 0x2EE8, 0x3784, 0x36BE, 0x35AC, + 0x3492, 0x3314, 0x3121, 0x34D9, 0x33F3, 0x36B3, 0x35E9, 0x3486, + 0x330D, 0x3114, 0x34CD, 0x33A4, 0x362E, 0x3559, 0x347F, 0x3301, + 0x35E3, 0x34C7, 0x339D, 0x3623, 0x3552, 0x33E6, 0x36A6, 0x35D7, + 0x3479, 0x3396, 0x3159, 0x350A, 0x33DF, 0x369A, 0x354C, 0x3472, + 0x32F4, 0x3152, 0x34FF, 0x3720, 0x3659, 0x3545, 0x3467, 0x32ED, + 0x3146, 0x3815, 0x3715, 0x364E, 0x357E, 0x341D, 0x32E1, 0x3090, + 0x2E3D, 0x370A, 0x3647, 0x34F2, 0x3412, 0x3290, 0x3089, 0x34A4, + 0x36C9, 0x3601, 0x34E6, 0x340B, 0x3284, 0x3571, 0x3498, 0x3700, + 0x35F5, 0x3524, 0x33FF, 0x327D, 0x35AE, 0x3492, 0x36B7, 0x35EF, + 0x3519, 0x33B5, 0x3637, 0x351E, 0x33F9, 0x330F, 0x35A8, 0x348B, + 0x3730, 0x362B, 0x3517, 0x343D, 0x3308, 0x359D, 0x34CA, 0x36E8, + 0x3663, 0x3555, 0x3432, 0x32B7, 0x35D9, 0x37E1, 0x36E5, 0x35DE, + 0x3549, 0x33E8, 0x32B0, 0x30B7, 0x3765, 0x36DE, 0x3616, 0x3502, + 0x33DC, 0x32A4, 0x358C, 0x379A, 0x3699, 0x360B, 0x34FB, 0x33D5, + 0x32EB, 0x35C4, 0x34AE, 0x3381, 0x31A7, 0x3534, 0x3415, 0x324C, + 0x3539, 0x34A2, 0x32EA, 0x3601, 0x34EC, 0x33CB, 0x3240, 0x3099, + 0x3459, 0x332B, 0x35F6, 0x34E6, 0x33C0, 0x3288, 0x3092, 0x3453, + 0x36BB, 0x35B4, 0x351F, 0x3400, 0x3281, 0x3086, 0x2D69, 0x36B4, + 0x35EC, 0x3492, 0x33F9, 0x322F, 0x30DB, 0x2E9D, 0x36B1, 0x35E5, + 0x34D0, 0x33AF, 0x3277, 0x30CF, 0x2DCA, 0x3313, 0x359F, 0x350E, + 0x33EF, 0x3270, 0x311E, 0x347C, 0x3354, 0x35D7, 0x34C6, 0x33E8, + 0x32B2, 0x306E, 0x3433, 0x3394, 0x320D, 0x3504, 0x3399, 0x32F8, + 0x3589, 0x3472, 0x32FD, 0x31BB, 0x34F9, 0x33DE, 0x325A, 0x3542, + 0x34AC, 0x3343, 0x31B4, 0x3056, 0x3418, 0x3609, 0x357A, 0x3460, + 0x3383, 0x31FC, 0x30A6, 0x3412, 0x3683, 0x35B7, 0x345D, 0x3378, + 0x3243, 0x2FEF, 0x2D29, 0x3642, 0x3571, 0x34E0, 0x3379, 0x31F2, + 0x3045, 0x2D92, 0x3675, 0x35A9, 0x3490, 0x33B9, 0x3239, 0x3095, + 0x3447, 0x331E, 0x3567, 0x34D6, 0x33F8, 0x3280, 0x30E5, 0x3443, + 0x335E, 0x35E2, 0x350F, 0x33AF, 0x32C2, 0x312E, 0x3482, 0x3314, + 0x3223, 0x34CC, 0x33EE, 0x3276, 0x3590, 0x3439, 0x3354, 0x31D1, + 0x3505, 0x33E8, 0x361B, 0x354E, 0x3478, 0x3399, 0x35CD, 0x34FE, + 0x342A, 0x334A, 0x35C9, 0x34B1, 0x3396, 0x360C, 0x353F, 0x3469, + 0x32FA, 0x3209, 0x34B3, 0x33D5, 0x3601, 0x3534, 0x3420, 0x3340, + 0x3202, 0x305D, 0x3704, 0x3640, 0x3574, 0x34A4, 0x3380, 0x31FF, + 0x3051, 0x36C4, 0x3635, 0x356D, 0x345C, 0x337D, 0x3294, 0x30AA, + 0x2E7A, 0x3674, 0x35AD, 0x34DA, 0x3402, 0x3288, 0x30F9, 0x2ED9, + 0x336D, 0x35A2, 0x34D3, 0x33BE, 0x32D6, 0x3191, 0x348B, 0x3366, + 0x31EA, 0x3514, 0x343E, 0x3317, 0x3144, 0x3488, 0x33AA, 0x327A, + 0x30E2, 0x33F5, 0x3314, 0x31DB, 0x34C1, 0x33E9, 0x327C, 0x3134, + 0x3479, 0x339F, 0x326B, 0x3502, 0x33EA, 0x3305, 0x31CB, 0x2F75, + 0x3356, 0x35D1, 0x34FB, 0x3425, 0x32FE, 0x3179, 0x3075, 0x2D7F, + 0x3603, 0x353B, 0x346B, 0x338D, 0x325D, 0x3114, 0x2EA3, 0x2B23, + 0x3577, 0x3468, 0x3386, 0x3256, 0x30C1, 0x2F5A, 0x2C8A, 0x3570, + 0x34E5, 0x340F, 0x32E8, 0x31AE, 0x2FAC, 0x337F, 0x3202, 0x34E2, + 0x33CA, 0x32E1, 0x3161, 0x3006, 0x33BA, 0x3291, 0x314F, 0x344A, + 0x3370, 0x3240, 0x30F7, 0x3401, 0x32DA, 0x31A0, 0x2FF6, 0x336D, + 0x3239, 0x30A8, 0x33FE, 0x331A, 0x31E3, 0x3041, 0x33AC, 0x32CB, + 0x3510, 0x343C, 0x33A4, 0x327A, 0x30E9, 0x2F2C, 0x3313, 0x3549, + 0x34BD, 0x33A5, 0x3273, 0x3132, 0x2F25, 0x2CCA, 0x3588, 0x34FE, + 0x33A2, 0x3304, 0x31D1, 0x302F, 0x2E5E, 0x29D0, 0x34FB, 0x3426, + 0x334C, 0x31CE, 0x3079, 0x2DFF, 0x32AE, 0x34FC, 0x3468, 0x3349, + 0x325D, 0x316F, 0x2F6C, 0x32F6, 0x3259, 0x34A9, 0x3389, 0x32EE, + 0x316C, 0x2FBD, 0x3380, 0x3256, 0x3111, 0x3410, 0x32F0, 0x31B4, + 0x30B8, 0x33C3, 0x3297, 0x31AB, 0x300D, 0x3333, 0x324C, 0x34DB, + 0x340A, 0x3327, 0x31FB, 0x3058, 0x3373, 0x32DD, 0x3516, 0x3406, + 0x336A, 0x31F8, 0x30FA, 0x2FA2, 0x3320, 0x3556, 0x3448, 0x33B2, + 0x3286, 0x319A, 0x2FA4, 0x2DBF, 0x3591, 0x3489, 0x3434, 0x3311, + 0x31E5, 0x3097, 0x2F36, 0x32C7, 0x34CA, 0x3475, 0x3359, 0x322F, + 0x3138, 0x2F38, 0x3351, 0x3544, 0x34B6, 0x339C, 0x3278, 0x31D1, + 0x2FE1, 0x3393, 0x3268, 0x34F2, 0x33DE, 0x3300, 0x321C, 0x30D5, + 0x33D6, 0x32B1, 0x3179, 0x3420, 0x334B, 0x32AD, 0x3122, 0x3418, + 0x333B, 0x320C, 0x311E, 0x33CF, 0x32F1, 0x352B, 0x3459, 0x3382, + 0x3256, 0x31B7, 0x3018, 0x2D97, 0x2A6E, 0x349A, 0x33C4, 0x32EA, + 0x3202, 0x30BB, 0x2EA7, 0x2D1E, 0x315F, 0x340A, 0x3373, 0x3293, + 0x3156, 0x2F5B, 0x2DE5, 0x31B2, 0x3104, 0x33B5, 0x32D7, 0x31A1, + 0x3057, 0x2EA2, 0x32D3, 0x319E, 0x3003, 0x331A, 0x31EC, 0x30A9, + 0x2FA8, 0x3317, 0x31E8, 0x30A1, 0x2EEB, 0x327D, 0x31E0, 0x309D, + 0x335A, 0x3232, 0x313C, 0x2F98, 0x2D64, 0x3229, 0x30EA, 0x339C, + 0x32BD, 0x3187, 0x303D, 0x2F39, 0x2CF3, 0x3184, 0x3426, 0x334F, + 0x326A, 0x3132, 0x2FE4, 0x2E16, 0x2AB0, 0x3467, 0x3391, 0x32B3, + 0x31C6, 0x3083, 0x2ED2, 0x2C7A, 0x2337, 0x33CF, 0x32F6, 0x3210, + 0x30D4, 0x2F7A, 0x2DA7, 0x2A23, 0x30CC, 0x3382, 0x32EA, 0x31BB, + 0x30C8, 0x2E64, 0x2BFA, 0x3118, 0x301B, 0x332D, 0x3205, 0x3114, + 0x2FC6, 0x2E57, 0x3201, 0x3110, 0x2F10, 0x32E0, 0x315F, 0x3065, + 0x2F07, 0x3246, 0x315B, 0x3011, 0x2EAA, 0x3242, 0x3153, 0x300D, + 0x331B, 0x323A, 0x30AE, 0x2F58, 0x2D84, 0x319E, 0x30AA, 0x331C, + 0x3283, 0x319A, 0x3057, 0x2E42, 0x2C48, 0x3148, 0x33E7, 0x3310, + 0x322F, 0x30F2, 0x2F9F, 0x2E35, 0x2AE3, 0x342C, 0x3353, 0x3274, + 0x318F, 0x309C, 0x2EE5, 0x353C, 0x346D, 0x33DD, 0x3306, 0x326C, + 0x30E8, 0x2FE6, 0x32FD, 0x34EF, 0x3461, 0x3391, 0x32B0, 0x31C8, + 0x30DB, 0x2F32, 0x3265, 0x34A5, 0x33CE, 0x333C, 0x325D, 0x3127, + 0x302C, 0x32F3, 0x31C6, 0x3452, 0x3382, 0x32EF, 0x31BE, 0x30D1, + 0x337E, 0x329D, 0x31BA, 0x3075, 0x3332, 0x3253, 0x31B2, 0x3022, + 0x332A, 0x324F, 0x3114, 0x301E, 0x32E5, 0x31FB, 0x3110, 0x3374, + 0x32DC, 0x31B0, 0x3108, 0x2F6B, 0x328F, 0x31A7, 0x33F9, 0x3368, + 0x3244, 0x31A4, 0x305E, 0x2F5F, 0x323C, 0x347C, 0x33ED, 0x32D2, + 0x3238, 0x3102, 0x2FB2, 0x2EA3, 0x2C5B, 0x3431, 0x335E, 0x32C6, + 0x3199, 0x30F6, 0x2F54, 0x2D89, 0x2B0A, 0x33E3, 0x3352, 0x322E, + 0x318D, 0x304C, 0x2EF1, 0x2CB4, 0x3189, 0x3397, 0x32BC, 0x3222, + 0x30EB, 0x3040, 0x2E91, 0x3219, 0x30E3, 0x338B, 0x32B0, 0x3183, + 0x30DF, 0x2F94, 0x2DCD, 0x317F, 0x30DB, 0x2F8B, 0x3262, 0x3176, + 0x3035, 0x2EDA, 0x320F, 0x3173, 0x3032, 0x2ED6, 0x320B, 0x30D4, + 0x3029, 0x32E7, 0x3208, 0x30D1, 0x3025, 0x2E19, 0x31BC, 0x30C8, + 0x3331, 0x324F, 0x31B4, 0x30C4, 0x2F79, 0x2DB7, 0x3160, 0x3077, + 0x3325, 0x3248, 0x315C, 0x301B, 0x2EC4, 0x2D45, 0x2AC9, 0x336B, + 0x32D5, 0x31FA, 0x310C, 0x300E, 0x2EB7, 0x2CE1, 0x29D0, 0x335F, + 0x3288, 0x31A2, 0x3100, 0x2FBC, 0x2DFA, 0x2C08, 0x30FC, 0x3357, + 0x327C, 0x3196, 0x305C, 0x2F5A, 0x2DED, 0x2C00, 0x3054, 0x32C2, + 0x322E, 0x3147, 0x3050, 0x2EFC, 0x2D2B, 0x313E, 0x304C, 0x2EF8, + 0x3222, 0x313A, 0x3044, 0x2E98, 0x321E, 0x3137, 0x2FA1, 0x2E41, + 0x3216, 0x3098, 0x2F98, 0x3265, 0x3184, 0x3090, 0x2F94, 0x2E34, + 0x317C, 0x308C, 0x2F91, 0x325E, 0x3178, 0x3088, 0x2F8D, 0x2E2D, + 0x2BDD, 0x3080, 0x32EE, 0x3210, 0x316C, 0x3032, 0x2F2F, 0x2D68, + 0x2AF9, 0x3333, 0x32E2, 0x3204, 0x311D, 0x302A, 0x2ECD, 0x2D60, + 0x2AF1, 0x3370, 0x3291, 0x31F8, 0x3110, 0x301E, 0x2E72, 0x2D53, + 0x2AE9, 0x3364, 0x328E, 0x315E, 0x30B7, 0x2F73, 0x2E6B, 0x2C89, + 0x306A, 0x2F6F, 0x3282, 0x31A2, 0x3066, 0x2F6B, 0x2E5E, 0x319A, + 0x3063, 0x2F62, 0x3234, 0x3196, 0x30AC, 0x2F5E, 0x3231, 0x3147, + 0x30A9, 0x2F5B, 0x322D, 0x3147, 0x3009, 0x2F06, 0x3225, 0x3143, + 0x3005, 0x2F02, 0x3221, 0x3140, 0x2FFC, 0x32B5, 0x31D7, 0x3137, + 0x3047, 0x32B1, 0x31D3, 0x3134, 0x3043, 0x2EF2, 0x2D2E, 0x30E8, + 0x303F, 0x3264, 0x31CC, 0x30E4, 0x2F9E, 0x2E98, 0x31C3, 0x30DB, + 0x2F9A, 0x2E94, 0x317D, 0x30D8, 0x2FE5, 0x2E90, 0x3175, 0x30D4, + 0x2FE1, 0x2E88, 0x31BC, 0x30CB, 0x2FDD, 0x3251, 0x31B8, 0x3084, + 0x2FD5, 0x2E80, 0x2D68, 0x307B, 0x2F86, 0x324A, 0x316A, 0x30C4, + 0x2F82, 0x2E25, 0x2CA5, 0x30C0, 0x2F7F, 0x31FC, 0x315E, 0x30BD, + 0x2F76, 0x2E75, 0x2CFE, 0x2A87, 0x32D1, 0x323A, 0x319D, 0x306C, + 0x2FBD, 0x2E68, 0x2CF1, 0x2A7F, 0x32C5, 0x322E, 0x3153, 0x30AD, + 0x2F6B, 0x2EB7, 0x2D48, 0x2AE9, 0x2F67, 0x322B, 0x3147, 0x3059, + 0x2F5F, 0x2E06, 0x2C85, 0x2ADB, 0x2FAF, 0x3223, 0x313B, 0x3055, + 0x2FAB, 0x2E51, 0x2CDE, 0x309E, 0x2F53, 0x2E4D, 0x313C, 0x3096, + 0x2F54, 0x2EA0, 0x2CD6, 0x3045, 0x2F50, 0x2E45, 0x3130, 0x3045, + 0x2F9B, 0x2DEE, 0x3135, 0x3042, 0x2F97, 0x2E42, 0x2C6F, 0x308B, + 0x2F94, 0x2E3E, 0x3174, 0x3087, 0x2F45, 0x2E91, 0x2CC2, 0x307F, + 0x2F90, 0x3201, 0x3125, 0x3037, 0x2F8C, 0x2E84, 0x2D1A, 0x2B20, + 0x2FD7, 0x3247, 0x3164, 0x30C4, 0x2F80, 0x2E2A, 0x2D6B, 0x2B82, + 0x2845, 0x31FE, 0x311A, 0x3079, 0x2F7D, 0x2ECF, 0x2D0F, 0x2B15, + 0x28C3, 0x323C, 0x319F, 0x30B9, 0x2FC4, 0x2E76, 0x2D60, 0x2B77, + 0x2FC0, 0x2E72, 0x3156, 0x3069, 0x2FC5, 0x2EC4, 0x2DB1, 0x2BD2, + 0x2FBC, 0x2F10, 0x3194, 0x30F5, 0x3006, 0x2F0C, 0x2D56, 0x2C2C, + 0x2FB5, 0x2EBD, 0x2DAA, 0x30AB, 0x2FB5, 0x2EB9, 0x2DFE, 0x30EE, + 0x2FFF, 0x2F05, 0x2DFA, 0x30EA, 0x3049, 0x2F51, 0x2DF6, 0x30A3, + 0x2FF8, 0x2EFE, 0x2D9F, 0x2C7E, 0x2FF8, 0x2EFE, 0x31C8, 0x312A, + 0x3042, 0x2F4A, 0x2E46, 0x2CD6, 0x303E, 0x2F46, 0x31C4, 0x312B, + 0x303E, 0x2F4B, 0x2E3E, 0x2CD3, 0x2BA6, 0x329B, 0x31C1, 0x311F, + 0x3083, 0x2FE0, 0x2E91, 0x2D83, 0x2B99, 0x3298, 0x31BD, 0x3166, + 0x30CC, 0x2F8F, 0x2E8D, 0x2D27, 0x2BFD, 0x2FD9, 0x31FB, 0x31A8, + 0x307C, 0x2FD0, 0x2F2A, 0x2E26, 0x2CB1, 0x2FD5, 0x323C, 0x315F, + 0x30BC, 0x301F, 0x2F27, 0x2DCC, 0x30C1, 0x3016, 0x2F72, 0x319D, + 0x3104, 0x301B, 0x2F1A, 0x2E6C, 0x3100, 0x3060, 0x2F6E, 0x319A, + 0x314B, 0x3018, 0x2FB9, 0x31E3, 0x3143, 0x3061, 0x2F67, 0x2EBA, + 0x3148, 0x3058, 0x2FB5, 0x31E0, 0x313F, 0x305D, 0x2FB1, 0x2F0B, + 0x3144, 0x30A1, 0x2FB6, 0x2F03, 0x2E03, 0x2C93, 0x2A91, 0x2F08, + 0x3182, 0x30E9, 0x2FF8, 0x2F53, 0x2E00, 0x2CE5, 0x2B58, 0x28AE, + 0x317F, 0x312C, 0x3041, 0x2F9D, 0x2E49, 0x2D92, 0x2BBC, 0x29A2, + 0x23CB, 0x312D, 0x3089, 0x2F9F, 0x2EEB, 0x2D94, 0x2C16, 0x2A74, + 0x2EA0, 0x2DE7, 0x30CD, 0x2F9B, 0x2F3B, 0x2DDE, 0x2CCD, 0x2B44, + 0x2EE4, 0x2E3A, 0x30CE, 0x2FDC, 0x2F86, 0x2E31, 0x2D7F, 0x2B47, + 0x2F34, 0x2E87, 0x2D76, 0x3026, 0x2FD0, 0x2E83, 0x2D7C, 0x2C5E, + 0x2F7F, 0x2ED8, 0x2DCF, 0x2C5E, 0x3019, 0x2ED4, 0x2DC6, 0x2CB4, + 0x2FC9, 0x2F23, 0x2E22, 0x2CB0, 0x2BEC, 0x2F20, 0x2E19, 0x2D67, + 0x3012, 0x2F73, 0x2E6F, 0x2D63, 0x2C49, 0x2A47, 0x2E6B, 0x30F9, + 0x305B, 0x2FBD, 0x2EC0, 0x2DB7, 0x2CA5, 0x2B12, 0x2872, 0x3140, + 0x30A7, 0x3002, 0x2F0C, 0x2E0A, 0x2D00, 0x2BD9, 0x2951, 0x318A, + 0x30EE, 0x304A, 0x2F57, 0x2E5C, 0x2DAC, 0x2C90, 0x2A99, 0x285B, + 0x3130, 0x3047, 0x2FA1, 0x2EB1, 0x2DFA, 0x2CE6, 0x2B62, 0x28D5, + 0x2DF6, 0x308F, 0x303A, 0x2F4B, 0x2E4C, 0x2D40, 0x2BC0, 0x29B1, + 0x2E48, 0x2D97, 0x303B, 0x2F95, 0x2E9D, 0x2D94, 0x2C78, 0x2FE2, + 0x2EEC, 0x2E3B, 0x2CD6, 0x2B4D, 0x2EE8, 0x3167, 0x30CA, 0x302B, + 0x2F37, 0x2E37, 0x2D2B, 0x2C0C, 0x2F85, 0x2E8D, 0x30C7, 0x3028, + 0x2F81, 0x2E89, 0x2D7F, 0x2C68, 0x2FCF, 0x2ED8, 0x2E27, 0x30BA, + 0x301B, 0x2F2C, 0x2E7C, 0x2D72, 0x301B, 0x2F2C, 0x2E28, 0x2D6E, + 0x2BFD, 0x2F76, 0x2E78, 0x2DC5, 0x3063, 0x2FBE, 0x2ECD, 0x2E1B, + 0x2D0F, 0x2BEF, 0x2F1B, 0x2E6C, 0x2D67, 0x3010, 0x2F18, 0x2E68, + 0x2D63, 0x2C4C, 0x2ABD, 0x2E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1, 0x2D60, 0x2CAE, 0x2B42, 0x2A6F, 0x299C, 0x2D08, + 0x2BF8, 0x2EB2, 0x2E07, 0x2D5C, 0x2C54, 0x2BEA, 0x2B2B, 0x299E, + 0x27DF, 0x2C47, 0x2EAE, 0x2E03, 0x2DAC, 0x2CA2, 0x2BE6, 0x2ACD, + 0x2990, 0x2844, 0x25E1, 0x2EFA, 0x2DFF, 0x2DA8, 0x2CF3, 0x2C3E, + 0x2B1F, 0x2A55, 0x291E, 0x26D4, 0x24A7, 0x2E48, 0x2DA4, 0x2CEF, + 0x2C3B, 0x2B79, 0x2A52, 0x2910, 0x2744, 0x2BD1, 0x2B17, 0x2DEE, + 0x2D3F, 0x2C37, 0x2BCD, 0x2A53, 0x2976, 0x282A, 0x2C29, 0x2B6C, + 0x2A40, 0x2D3B, 0x2C80, 0x2C20, 0x2AA6, 0x2A3B, 0x282C, 0x2C7B, + 0x2B6D, 0x2AA2, 0x2D86, 0x2CD1, 0x2C1C, 0x2B01, 0x2A38, 0x28F5, + 0x2C77, 0x2BB8, 0x2AF8, 0x2965, 0x2CD6, 0x2C73, 0x2B56, 0x2A34, + 0x295B, 0x2CC9, 0x2BBD, 0x2B52, 0x2A26, 0x28ED, 0x2C6F, 0x2BAF, + 0x2A96, 0x29C0, 0x2CC5, 0x2C10, 0x2BA6, 0x2A82, 0x2953, 0x2802, + 0x2C02, 0x2AEC, 0x2DC4, 0x2D15, 0x2CB7, 0x2BA7, 0x2ADE, 0x29B8, + 0x286B, 0x260C, 0x2B9E, 0x2DC8, 0x2D68, 0x2CB3, 0x2BFA, 0x2ADA, + 0x2A16, 0x293D, 0x2707, 0x257A, 0x2E11, 0x2DB2, 0x2D04, 0x2BF7, + 0x2B3E, 0x2AD1, 0x299C, 0x27E8, 0x257D, 0x2E5A, 0x2DAE, 0x2D00, + 0x2CA2, 0x2BE9, 0x2ACE, 0x29FF, 0x2857, 0x267C, 0x24DC, 0x2E00, + 0x2D53, 0x2C9E, 0x2BE5, 0x2B23, 0x29FC, 0x28BE, 0x276D, 0x25E7, + 0x2B1F, 0x2D9D, 0x2CEE, 0x2C37, 0x2B7C, 0x2A62, 0x29EE, 0x28B0, + 0x26DD, 0x2B1B, 0x2A54, 0x2D42, 0x2C92, 0x2BD9, 0x2B16, 0x2A4A, + 0x2916, 0x2C88, 0x2BCF, 0x2B0D, 0x29E5, 0x2CDD, 0x2C2B, 0x2B6B, + 0x2A4C, 0x2975, 0x2C85, 0x2BCC, 0x2B0E, 0x2A42, 0x2971, 0x2C80, + 0x2BC7, 0x2B05, 0x2A3E, 0x2D2D, 0x2C77, 0x2BBE, 0x2A9E, 0x296D, + 0x2CCC, 0x2C19, 0x2B59, 0x2A3A, 0x2969, 0x2821, 0x2BBF, 0x2AFD, + 0x2D80, 0x2D20, 0x2C6F, 0x2BB6, 0x2AF8, 0x2A2C, 0x295B, 0x2C6B, + 0x2BB1, 0x2AEF, 0x2D72, 0x2CC4, 0x2C11, 0x2B4D, 0x2A88, 0x2957, + 0x2CBF, 0x2BAE, 0x2AEB, 0x2A24, 0x2953, 0x2C5E, 0x2BA4, 0x2AE7, + 0x2A20, 0x2CBC, 0x2C59, 0x2BA0, 0x2AE3, 0x2A16, 0x2873, 0x2C00, + 0x2B9C, 0x2AD9, 0x2D0F, 0x2CAE, 0x2BFC, 0x2B3B, 0x2A18, 0x2946, + 0x286A, 0x2BF2, 0x2AD5, 0x2A0E, 0x2D02, 0x2C51, 0x2BEE, 0x2AD1, + 0x2A0A, 0x2938, 0x277D, 0x2B33, 0x2ACD, 0x2D55, 0x2CA6, 0x2C44, + 0x2B2F, 0x2A6A, 0x2935, 0x2858, 0x276F, 0x24F5, 0x2DA2, 0x2CFA, + 0x2C98, 0x2B86, 0x2B21, 0x2A5C, 0x292C, 0x284F, 0x2675, 0x23CA, + 0x2D48, 0x2CEC, 0x2C32, 0x2B7E, 0x2ABB, 0x29EF, 0x291D, 0x2762, + 0x256D, 0x21CC, 0x2D3F, 0x2C87, 0x2BD4, 0x2B70, 0x2A50, 0x2986, + 0x283D, 0x2754, 0x255D, 0x2A46, 0x2CE4, 0x2C2A, 0x2BC7, 0x2B0B, + 0x2A42, 0x2978, 0x2834, 0x2660, 0x2B07, 0x29E3, 0x28A4, 0x2C1D, + 0x2B68, 0x2B03, 0x29D9, 0x289F, 0x27BF, 0x2B64, 0x2A9D, 0x29D5, + 0x289B, 0x2BBF, 0x2B5A, 0x2A3A, 0x29CB, 0x2891, 0x273E, 0x2B56, + 0x2A35, 0x2962, 0x288D, 0x2BB1, 0x2AFB, 0x2A31, 0x28FB, 0x2823, + 0x2BAD, 0x2AF1, 0x2A28, 0x28F7, 0x281A, 0x2B52, 0x2AED, 0x2A23, + 0x28ED, 0x2C0C, 0x2B4E, 0x2AE3, 0x29BF, 0x28E9, 0x27A0, 0x26AD, + 0x2A82, 0x29BB, 0x2C61, 0x2BFE, 0x2B40, 0x2A82, 0x29B6, 0x287C, + 0x2791, 0x25AE, 0x2A7E, 0x29AD, 0x2C53, 0x2BA0, 0x2AE1, 0x2A75, + 0x29A8, 0x286E, 0x271B, 0x25A5, 0x2A70, 0x2CAB, 0x2C4F, 0x2B93, + 0x2B2E, 0x2A13, 0x293F, 0x2860, 0x270C, 0x2596, 0x2D4F, 0x2C9E, + 0x2C41, 0x2B85, 0x2ACE, 0x2A05, 0x2931, 0x27F2, 0x2693, 0x2488, + 0x29FB, 0x2C99, 0x2BE4, 0x2B81, 0x2AC1, 0x29F7, 0x28C6, 0x27E3, + 0x2685, 0x2478, 0x29F3, 0x2C8C, 0x2BD7, 0x2B22, 0x2A60, 0x2994, + 0x28BD, 0x27DA, 0x267C, 0x2A56, 0x29EE, 0x2C88, 0x2BD2, 0x2B14, + 0x2AAF, 0x29E5, 0x28AF, 0x2765, 0x2B10, 0x2AAA, 0x297C, 0x2C2C, + 0x2BC5, 0x2B10, 0x2A4E, 0x2981, 0x28AA, 0x2BC5, 0x2B0C, 0x2A44, + 0x297D, 0x2C23, 0x2BC1, 0x2B02, 0x2A9D, 0x29D8, 0x2903, 0x2BB7, + 0x2AFE, 0x2A3C, 0x296F, 0x2898, 0x2BBC, 0x2AFE, 0x2A3C, 0x296F, + 0x2C16, 0x2BB3, 0x2AFA, 0x2A37, 0x296B, 0x2894, 0x2BAF, 0x2AF6, + 0x2A90, 0x29C6, 0x288F, 0x27AD, 0x25D6, 0x23B8, 0x2C6D, 0x2C08, + 0x2BAA, 0x2AEC, 0x2A2A, 0x295D, 0x2823, 0x273D, 0x2644, 0x23A9, + 0x2959, 0x2C04, 0x2BA6, 0x2AE4, 0x2A21, 0x29B4, 0x28E4, 0x27A0, + 0x263B, 0x242D, 0x2950, 0x2BFF, 0x2B99, 0x2ADF, 0x2A7A, 0x2950, + 0x2879, 0x272A, 0x2637, 0x24AE, 0x29AB, 0x28DC, 0x2B94, 0x2B31, + 0x2A18, 0x294C, 0x28D2, 0x27FD, 0x26A3, 0x2A6C, 0x2948, 0x2870, + 0x2789, 0x2AD2, 0x2A68, 0x29A2, 0x28D3, 0x2789, 0x262A, 0x2A68, + 0x2999, 0x28C9, 0x27EF, 0x2ACD, 0x2A63, 0x299E, 0x28C5, 0x27EA, + 0x2704, 0x2A5A, 0x2995, 0x28C5, 0x2781, 0x268C, 0x2A5F, 0x2990, + 0x2927, 0x27E6, 0x2B1B, 0x2A5B, 0x29F4, 0x28C1, 0x27E2, 0x26FB, + 0x2590, 0x29EA, 0x2922, 0x27E2, 0x2B16, 0x2AAD, 0x29EA, 0x2919, + 0x2846, 0x26F7, 0x2581, 0x29E6, 0x291E, 0x2842, 0x2B12, 0x2AA9, + 0x29E2, 0x2915, 0x2842, 0x275A, 0x2670, 0x2470, 0x291A, 0x2BC5, + 0x2B0E, 0x2AA5, 0x29DD, 0x2975, 0x283E, 0x27C6, 0x25F7, 0x2467, + 0x216D, 0x2BC1, 0x2B63, 0x2AFB, 0x2A36, 0x2971, 0x2897, 0x27C2, + 0x2663, 0x2565, 0x233E, 0x2C0F, 0x2BB3, 0x2AF2, 0x2A32, 0x29CB, + 0x2C0F, 0x2B56, 0x2AF7, 0x2A8E, 0x29C7, 0x28F9, 0x281D, 0x26D3, + 0x2A32, 0x2CBC, 0x2C0B, 0x2BA5, 0x2B47, 0x2A8A, 0x29BD, 0x2955, + 0x2880, 0x2736, 0x2A8A, 0x2A1F, 0x2C0B, 0x2BFD, 0x2B43, 0x2A80, + 0x29C2, 0x2956, 0x287C, 0x279C, 0x2ADB, 0x2A1B, 0x294C, 0x2BF9, + 0x2B3F, 0x2AD7, 0x2A72, 0x29B0, 0x28DE, 0x27A2, 0x2AD7, 0x2A17, + 0x29B0, 0x28DE, 0x2B98, 0x2B31, 0x2A6E, 0x29A6, 0x28DA, 0x286F, + 0x2789, 0x2A73, 0x2A09, 0x293A, 0x2865, 0x2B2D, 0x2A6A, 0x29AC, + 0x293F, 0x286A, 0x278B, 0x2AC5, 0x29FF, 0x2935, 0x286B, 0x27F4, + 0x270B, 0x2A5B, 0x2999, 0x28C7, 0x27F0, 0x2AC9, 0x2A60, 0x2999, + 0x2927, 0x2852, 0x270D, 0x2617, 0x2995, 0x28CD, 0x2858, 0x2B1A, + 0x2A5C, 0x29F2, 0x2923, 0x284E, 0x2773, 0x2687, 0x2515, 0x2986, + 0x28B4, 0x2B6E, 0x2AB7, 0x2A4E, 0x2986, 0x28BA, 0x2845, 0x26FA, + 0x260A, 0x248C, 0x291A, 0x2B6A, 0x2AB3, 0x2A4A, 0x2982, 0x2915, + 0x2841, 0x2761, 0x2674, 0x2502, 0x2368, 0x2BC2, 0x2B08, 0x2AA5, + 0x29E0, 0x2974, 0x28A7, 0x27D0, 0x26E7, 0x25F7, 0x24F8, 0x218E, + 0x2B60, 0x2AFA, 0x2A3C, 0x29D1, 0x2907, 0x2899, 0x274E, 0x2667, + 0x24F4, 0x23E0, 0x217D, 0x2AFF, 0x2A97, 0x2A2D, 0x2961, 0x2895, + 0x27BD, 0x26D9, 0x25E9, 0x245F, 0x221D, 0x2825, 0x2AF1, 0x2A29, + 0x29BF, 0x28FA, 0x2886, 0x27AE, 0x2654, 0x255F, 0x23D3, 0x2886, + 0x27AE, 0x26C6, 0x2A1B, 0x2958, 0x28EB, 0x2816, 0x26C7, 0x25D6, + 0x24D7, 0x28EB, 0x2878, 0x2732, 0x264B, 0x29B6, 0x294A, 0x287D, + 0x279B, 0x26B7, 0x25C7, 0x294A, 0x28DD, 0x27A1, 0x2728, 0x263B, + 0x29A8, 0x28DD, 0x2804, 0x2729, 0x2641, 0x29A8, 0x293C, 0x2809, + 0x2792, 0x26AE, 0x2543, 0x2941, 0x28D4, 0x2793, 0x271A, 0x2A04, + 0x2941, 0x28D4, 0x27FB, 0x2720, 0x269F, 0x2533, 0x2933, 0x285C, + 0x2789, 0x2A68, 0x299F, 0x2933, 0x28C6, 0x27EC, 0x2711, 0x25B0, + 0x242C, 0x28C6, 0x27F2, 0x277A, 0x2A5A, 0x2990, 0x2925, 0x2853, + 0x277B, 0x2702, 0x25A1, 0x241C, 0x28BD, 0x27E3, 0x2A5A, 0x29F6, + 0x292A, 0x28BD, 0x284E, 0x276C, 0x2616, 0x2598, 0x2412, 0x284E, + 0x2AB8, 0x2A4C, 0x29E8, 0x297D, 0x28AE, 0x27D5, 0x26F9, 0x267F, + 0x2518, 0x2385, 0x21B8, 0x2AAA, 0x2A47, 0x2983, 0x2917, 0x2845, + 0x27D0, 0x26F0, 0x25FE, 0x2508, 0x2375, 0x27D6, 0x2A9C, 0x2A39, + 0x2509, 0x2909, 0x2837, 0x2AA6, 0x2A39, 0x29D5, 0x296A, 0x289B, + 0x27C7, 0x2750, 0x25FA, 0x2500, 0x28A1, 0x2B03, 0x2A98, 0x2A34, + 0x2970, 0x2904, 0x2832, 0x27B8, 0x26DD, 0x25F0, 0x24F0, 0x2363, + 0x2AF5, 0x2A93, 0x29D0, 0x296B, 0x28F6, 0x2888, 0x27B4, 0x26CE, + 0x25E1, 0x246E, 0x2353, 0x2AF0, 0x2A85, 0x2A22, 0x29B8, 0x28F1, + 0x281F, 0x2742, 0x265A, 0x2563, 0x24DC, 0x22C3, 0x27AF, 0x2A80, + 0x2A18, 0x2953, 0x28E3, 0x2811, 0x27A0, 0x26C0, 0x25CE, 0x24D3, + 0x22B3, 0x280C, 0x272F, 0x29B9, 0x294A, 0x28DE, 0x280C, 0x272F, + 0x264C, 0x2555, 0x2451, 0x2335, 0x279C, 0x26BC, 0x29AF, 0x2940, + 0x28D9, 0x2807, 0x2726, 0x26AD, 0x25C0, 0x24BF, 0x2867, 0x278D, + 0x271B, 0x2632, 0x293B, 0x2871, 0x27F9, 0x2788, 0x26A8, 0x2542, + 0x243D, 0x285E, 0x27EF, 0x26A8, 0x2629, 0x2532, 0x28C6, 0x27F4, + 0x2717, 0x2699, 0x25AC, 0x28D0, 0x2859, 0x2784, 0x2708, 0x2624, + 0x252D, 0x28BC, 0x27EF, 0x2775, 0x2695, 0x25A8, 0x28C1, 0x2854, + 0x277F, 0x2703, 0x2620, 0x251E, 0x241E, 0x27EB, 0x2771, 0x2690, + 0x2599, 0x2919, 0x284F, 0x27D7, 0x26FF, 0x2611, 0x2593, 0x241A, + 0x2304, 0x276C, 0x268C, 0x2984, 0x2915, 0x284B, 0x27D2, 0x26FA, + 0x267C, 0x258F, 0x2416, 0x2273, 0x27CD, 0x2687, 0x297F, 0x2910, + 0x2846, 0x27CE, 0x26F6, 0x2678, 0x258A, 0x2484, 0x2379, 0x21C0, + 0x26E7, 0x2975, 0x2906, 0x289F, 0x27C9, 0x274E, 0x2673, 0x257B, + 0x24FC, 0x2375, 0x2129, 0x2A37, 0x29CB, 0x290B, 0x289B, 0x2829, + 0x2754, 0x26D8, 0x25E9, 0x24F8, 0x236C, 0x2249, 0x2065, 0x29C6, + 0x2962, 0x2896, 0x2824, 0x274F, 0x26D3, 0x25E5, 0x2567, 0x23E8, + 0x22D1, 0x1FB7, 0x26CE, 0x295D, 0x28EE, 0x2824, 0x27B0, 0x26CF, + 0x2650, 0x2563, 0x2462, 0x22D3, 0x2740, 0x26CA, 0x2953, 0x28EE, + 0x287D, 0x27AC, 0x2731, 0x2656, 0x25D1, 0x24DA, 0x234D, 0x27A2, + 0x26C0, 0x2647, 0x28E9, 0x2878, 0x2807, 0x2737, 0x26BB, 0x25D2, + 0x24D5, 0x2874, 0x279D, 0x2723, 0x2647, 0x25C7, 0x28DA, 0x280C, + 0x2793, 0x26B6, 0x2638, 0x2545, 0x286A, 0x2801, 0x278E, 0x26AC, + 0x25C3, 0x28D5, 0x2865, 0x278E, 0x2719, 0x26A7, 0x25BE, 0x28CB, + 0x27FD, 0x2789, 0x26A7, 0x2629, 0x253C, 0x2865, 0x27F3, 0x277F, + 0x26A2, 0x293A, 0x28D0, 0x2860, 0x27EE, 0x2714, 0x2698, 0x25AF, + 0x24B8, 0x23AC, 0x228F, 0x2017, 0x2935, 0x28C6, 0x285B, 0x27E9, + 0x2776, 0x2693, 0x25AA, 0x2528, 0x2427, 0x228B, 0x2155, 0x268E, + 0x2927, 0x28B8, 0x284C, 0x2776, 0x2700, 0x2684, 0x259B, 0x24A4, + 0x239E, 0x2281, 0x26F6, 0x2616, 0x28BC, 0x284C, 0x27DA, 0x2767, + 0x268A, 0x260B, 0x251E, 0x2494, 0x2301, 0x2146, 0x2685, 0x2606, + 0x28AE, 0x283D, 0x27CB, 0x26F7, 0x267A, 0x2587, 0x248F, 0x2389, + 0x226C, 0x26EC, 0x2675, 0x250F, 0x283D, 0x27D0, 0x275D, 0x26E2, + 0x25F8, 0x250A, 0x2480, 0x2379, 0x2753, 0x26DD, 0x2588, 0x2505, + 0x2404, 0x27C1, 0x274E, 0x2667, 0x257D, 0x24FA, 0x23FF, 0x2758, + 0x26E3, 0x25F8, 0x2578, 0x24F5, 0x23F4, 0x274E, 0x26D8, 0x25EE, + 0x256D, 0x247C, 0x27BC, 0x2749, 0x26D4, 0x25E9, 0x2569, 0x2471, + 0x2360, 0x273F, 0x26C9, 0x25DF, 0x24F1, 0x246C, 0x27AD, 0x273A, + 0x265D, 0x256F, 0x24EC, 0x2461, 0x22D4, 0x26CF, 0x2658, 0x2564, + 0x24E1, 0x2815, 0x273A, 0x26C4, 0x264D, 0x255F, 0x24DC, 0x235D, + 0x22C4, 0x26C0, 0x2648, 0x2554, 0x2815, 0x27A8, 0x272B, 0x26B5, + 0x25D5, 0x2550, 0x2458, 0x234C, 0x2235, 0x2649, 0x25D0, 0x287B, + 0x2806, 0x2799, 0x2726, 0x26B0, 0x25C5, 0x254A, 0x244E, 0x233C, + 0x2224, 0x204B, 0x28DF, 0x286C, 0x2801, 0x278F, 0x26B6, 0x2639, + 0x25BC, 0x24CE, 0x23C7, 0x22B0, 0x2214, 0x2040, 0x28D1, 0x2867, + 0x27F6, 0x2720, 0x26A7, 0x262F, 0x25B1, 0x24BE, 0x23B8, 0x2327, + 0x20E5, 0x1EDC, 0x28C6, 0x285D, 0x2789, 0x2711, 0x269C, 0x2625, + 0x2536, 0x24AF, 0x23A8, 0x229B, 0x216B, 0x2620, 0x28C1, 0x27F1, + 0x277B, 0x270C, 0x2697, 0x2616, 0x252D, 0x24AA, 0x23A3, 0x228B, + 0x2692, 0x25A7, 0x28B7, 0x27EC, 0x2775, 0x2702, 0x2688, 0x2611, + 0x2522, 0x242B, 0x2399, 0x26FD, 0x2688, 0x25A2, 0x251D, 0x27E7, + 0x2770, 0x26F8, 0x2683, 0x259D, 0x2518, 0x2495, 0x2394, 0x26F8, + 0x2678, 0x2601, 0x2518, 0x27D8, 0x2766, 0x26EE, 0x267E, 0x2593, + 0x250D, 0x2490, 0x2761, 0x26ED, 0x2673, 0x25FC, 0x2513, 0x27CD, + 0x2761, 0x26E8, 0x2673, 0x258E, 0x2508, 0x27CD, 0x2757, 0x26E8, + 0x266E, 0x25F7, 0x2503, 0x27C8, 0x2756, 0x26E3, 0x266E, 0x25ED, + 0x2837, 0x27C8, 0x2751, 0x26E3, 0x2664, 0x25F2, 0x24FE, 0x27C7, + 0x2751, 0x26D9, 0x2669, 0x28A0, 0x2892, 0x27BE, 0x2751, 0x26D9, + 0x265F, 0x25E7, 0x256A, 0x2477, 0x23E7, 0x22E0, 0x2122, 0x25E3, + 0x24F9, 0x2472, 0x274C, 0x26D4, 0x265A, 0x25E2, 0x2565, 0x2472, + 0x23E2, 0x22D0, 0x21B1, 0x2078, 0x2564, 0x24DF, 0x27A9, 0x2732, + 0x2659, 0x25DD, 0x255A, 0x246D, 0x23DD, 0x22CB, 0x2237, 0x206E, + 0x1E5B, 0x2813, 0x279F, 0x272D, 0x26BF, 0x2645, 0x2555, 0x24DA, + 0x2452, 0x234B, 0x2239, 0x2102, 0x1F12, 0x2813, 0x27A3, 0x272D, + 0x26B4, 0x263A, 0x25C8, 0x24D5, 0x244D, 0x2346, 0x22B5, 0x20FD, + 0x1F0D, 0x1CAA, 0x2799, 0x2727, 0x26B4, 0x263F, 0x25BE, 0x2540, + 0x2448, 0x23C3, 0x22B1, 0x218D, 0x1FB7, 0x1E40, 0x24C0, 0x2789, + 0x2718, 0x2635, 0x25B9, 0x2540, 0x24C0, 0x23BE, 0x2331, 0x2213, + 0x2055, 0x1F99, 0x24B5, 0x2438, 0x2717, 0x269F, 0x2625, 0x25A9, + 0x24BB, 0x2433, 0x232C, 0x221A, 0x2177, 0x25A9, 0x252B, 0x2433, + 0x23A8, 0x269F, 0x2625, 0x25A9, 0x252B, 0x24AB, 0x23A9, 0x229C, + 0x21FD, 0x2615, 0x252B, 0x24AB, 0x2423, 0x269A, 0x2620, 0x25A4, + 0x2526, 0x24A0, 0x23A4, 0x2317, 0x21FF, 0x2610, 0x2526, 0x24A6, + 0x241E, 0x2317, 0x268A, 0x2610, 0x2594, 0x2516, 0x241E, 0x2393, + 0x2287, 0x2610, 0x2594, 0x2516, 0x2773, 0x2702, 0x268A, 0x2610, + 0x2594, 0x2516, 0x2496, 0x240E, 0x2306, 0x267A, 0x2600, 0x2584, + 0x2496, 0x2768, 0x26F2, 0x267A, 0x2600, 0x2584, 0x2506, 0x2414, + 0x2389, 0x22FC, 0x2600, 0x2589, 0x2506, 0x2486, 0x23FE, 0x26E7, + 0x266F, 0x2589, 0x250B, 0x2486, 0x2403, 0x2379, 0x2674, 0x25F0, + 0x2579, 0x24F6, 0x2403, 0x2379, 0x2674, 0x25FA, 0x2579, 0x24FB, + 0x2476, 0x23F3, 0x2674, 0x265F, 0x25EA, 0x256E, 0x247B, 0x23F3, + 0x2368, 0x2250, 0x25EA, 0x256E, 0x247B, 0x23F3, 0x236E, 0x2664, + 0x25EA, 0x2574, 0x24F6, 0x246B, 0x236F, 0x22E1, 0x21BE, 0x2574, + 0x24F6, 0x246B, 0x23E3, 0x26D1, 0x2659, 0x25DA, 0x255E, 0x24E6, + 0x2460, 0x235E, 0x22D1, 0x21B3, 0x2081, 0x24E6, 0x2466, 0x23DE, + 0x26C6, 0x25E4, 0x25D5, 0x2559, 0x2466, 0x23DE, 0x234E, 0x2241, + 0x2117, 0x2076, 0x24DB, 0x23E3, 0x26C6, 0x2653, 0x25D9, 0x25CA, + 0x24DB, 0x2456, 0x23CE, 0x2348, 0x2230, 0x219D, 0x1FC6, 0x1E6C, + 0x244B, 0x26C0, 0x2648, 0x25CF, 0x2553, 0x24D0, 0x244B, 0x23C8, + 0x22BB, 0x21A4, 0x2107, 0x1FC1, 0x1E5A, 0x2726, 0x26B5, 0x2639, + 0x25C4, 0x2548, 0x24C5, 0x2445, 0x2343, 0x22B1, 0x221A, 0x20F6, + 0x1FAF, 0x1D98, 0x19E1, 0x26AA, 0x2633, 0x25BE, 0x253E, 0x24C0, + 0x23C3, 0x23B2, 0x22A6, 0x218E, 0x2056, 0x1F07, 0x1D86, 0x23B3, + 0x26A5, 0x2628, 0x25B3, 0x2533, 0x24B5, 0x2430, 0x23AD, 0x22A0, + 0x220B, 0x20E0, 0x1F9F, 0x1E37, 0x23AD, 0x2322, 0x2622, 0x25AE, + 0x252D, 0x24AF, 0x2425, 0x23A2, 0x2290, 0x21FF, 0x20DA, 0x1EF0, + 0x242F, 0x23A8, 0x2318, 0x2621, 0x25A3, 0x2522, 0x24AA, 0x241F, + 0x239C, 0x228A, 0x21FA, 0x20C9, 0x1F89, 0x242A, 0x239D, 0x230D, + 0x2285, 0x259D, 0x2521, 0x249F, 0x241A, 0x2397, 0x2285, 0x21F5, + 0x20C4, 0x249F, 0x2424, 0x2397, 0x2307, 0x227A, 0x2592, 0x251C, + 0x2499, 0x240F, 0x238C, 0x2302, 0x21EF, 0x2150, 0x249E, 0x248E, + 0x2392, 0x2307, 0x2274, 0x2591, 0x2511, 0x248E, 0x2414, 0x2386, + 0x22F7, 0x21EA, 0x258C, 0x250B, 0x2489, 0x2391, 0x2381, 0x226F, + 0x21D9, 0x2510, 0x2501, 0x2409, 0x2381, 0x22FC, 0x2264, 0x2581, + 0x2500, 0x2488, 0x2403, 0x2376, 0x226A, 0x21D9, 0x257C, 0x24FB, + 0x240E, 0x23F8, 0x2370, 0x25FE, 0x2580, 0x2505, 0x2483, 0x23FE, + 0x2370, 0x2603, 0x25F4, 0x257B, 0x24FA, 0x2478, 0x23F2, 0x2365, + 0x2264, 0x21C8, 0x212F, 0x1FF7, 0x246D, 0x23E7, 0x22E6, 0x25EE, + 0x257A, 0x24F9, 0x2477, 0x23F2, 0x236B, 0x22DB, 0x2248, 0x212A, + 0x2087, 0x2471, 0x23EC, 0x235F, 0x22D5, 0x256F, 0x24F4, 0x2476, + 0x2466, 0x23E1, 0x235A, 0x224E, 0x21B2, 0x2119, 0x2466, 0x23E1, + 0x2365, 0x22D5, 0x2242, 0x255F, 0x24E4, 0x2461, 0x23DC, 0x234F, + 0x22C5, 0x21AD, 0x2113, 0x1FDB, 0x2456, 0x23D1, 0x22D0, 0x223D, + 0x21A7, 0x2553, 0x2460, 0x23DC, 0x2354, 0x22C4, 0x2232, 0x219B, + 0x2071, 0x2455, 0x23D0, 0x2349, 0x22BF, 0x222C, 0x2196, 0x206B, + 0x2455, 0x23CB, 0x2343, 0x22B3, 0x2220, 0x2102, 0x24CD, 0x244F, + 0x23CA, 0x2338, 0x222C, 0x2196, 0x20FD, 0x2059, 0x2444, 0x23BF, + 0x2338, 0x2226, 0x2190, 0x24CC, 0x244F, 0x23CA, 0x23BA, 0x2332, + 0x221B, 0x2185, 0x20EB, 0x1F13, 0x23BF, 0x2337, 0x22AD, 0x2215, + 0x2541, 0x24C6, 0x243E, 0x23B9, 0x2332, 0x22A8, 0x218B, 0x20F2, + 0x204E, 0x1F01, 0x23AE, 0x2327, 0x229D, 0x220A, 0x24C5, 0x24B5, + 0x2433, 0x23AE, 0x2321, 0x2297, 0x2204, 0x20E0, 0x203D, 0x1EEF, + 0x1D85, 0x2321, 0x2210, 0x253A, 0x24B9, 0x2432, 0x23B3, 0x232C, + 0x2316, 0x2204, 0x2174, 0x2044, 0x1F96, 0x1E3F, 0x1D7A, 0x2296, + 0x25A7, 0x252E, 0x24A9, 0x242C, 0x23A7, 0x231B, 0x2291, 0x21FE, + 0x2163, 0x20C3, 0x1F8A, 0x1ED7, 0x1CAF, 0x25AB, 0x2532, 0x2523, + 0x24A3, 0x2421, 0x23A1, 0x230F, 0x2285, 0x21ED, 0x2157, 0x202D, + 0x1F85, 0x1E27, 0x1C9C, 0x25A5, 0x252C, 0x251D, 0x2498, 0x241B, + 0x2391, 0x2309, 0x2274, 0x21E7, 0x2151, 0x2021, 0x1F73, 0x1E15, + 0x1C90, 0x2599, 0x2520, 0x24A1, 0x241F, 0x240F, 0x2385, 0x22FE, + 0x226F, 0x21DC, 0x20B8, 0x200F, 0x1F6D, 0x1E0F, 0x22F8, 0x226E, + 0x251A, 0x24A0, 0x248B, 0x2409, 0x237F, 0x22F8, 0x2263, 0x21D6, + 0x213A, 0x20A1, 0x1F5C, 0x237F, 0x22ED, 0x2263, 0x250F, 0x2494, + 0x2485, 0x23FE, 0x237E, 0x22EC, 0x225D, 0x21D0, 0x2135, 0x209B, + 0x23FD, 0x2373, 0x22EC, 0x225D, 0x250E, 0x2489, 0x240C, 0x23FC, + 0x2373, 0x22E6, 0x225C, 0x21C4, 0x2129, 0x208F, 0x23F1, 0x2372, + 0x22E6, 0x2257, 0x250C, 0x24F8, 0x2478, 0x23F1, 0x236D, 0x22E5, + 0x2256, 0x21BE, 0x2128, 0x2477, 0x23F0, 0x236C, 0x22DA, 0x2256, + 0x21BE, 0x2123, 0x2477, 0x23F0, 0x236C, 0x22E0, 0x224B, 0x21BE, + 0x2123, 0x2084, 0x1FDA, 0x1E92, 0x22DF, 0x224A, 0x21B8, 0x2122, + 0x246B, 0x23EF, 0x23DF, 0x2355, 0x22C9, 0x2239, 0x21A1, 0x2084, + 0x2072, 0x1F2D, 0x1DCE, 0x22C8, 0x2239, 0x21A7, 0x246A, 0x23E9, + 0x235F, 0x2354, 0x22C8, 0x2239, 0x21A7, 0x210B, 0x206C, 0x1F27, + 0x1E74, 0x1CFC, 0x2238, 0x21A6, 0x2469, 0x2459, 0x23D8, 0x234E, + 0x22C2, 0x22B7, 0x2227, 0x2195, 0x206C, 0x1FC3, 0x1F15, 0x1DB6, + 0x1C2A, 0x2227, 0x2467, 0x2458, 0x23D1, 0x234D, 0x22C1, 0x2232, + 0x2222, 0x2189, 0x2066, 0x1FBD, 0x1F0F, 0x1DB0, 0x1CEB, 0x1A60, + 0x24DB, 0x245B, 0x244C, 0x23CA, 0x2341, 0x22B5, 0x2226, 0x2194, + 0x20F3, 0x2054, 0x1FAB, 0x1E5D, 0x1D9D, 0x1C18, 0x1A4C, 0x245A, + 0x244B, 0x23C9, 0x2340, 0x2330, 0x22A4, 0x2215, 0x2182, 0x20E7, + 0x1FB1, 0x1F04, 0x1E51, 0x1CE0, 0x1B2F, 0x2182, 0x244E, 0x243F, + 0x23BD, 0x232F, 0x22A3, 0x2214, 0x2182, 0x20ED, 0x20D5, 0x1F9F, + 0x1EF1, 0x1D92, 0x1BFF, 0x2203, 0x2171, 0x243D, 0x23BC, 0x2333, + 0x2323, 0x229C, 0x220E, 0x2171, 0x20D5, 0x203C, 0x1F93, 0x1E3F, + 0x229C, 0x220D, 0x217B, 0x2164, 0x203C, 0x23B0, 0x232C, 0x231C, + 0x220D, 0x24C9, 0x24BA, 0x243B, 0x23B0, 0x232C, 0x231C, 0x2290, + 0x21FC, 0x216A, 0x20CF, 0x202A, 0x23A4, 0x231B, 0x228F, 0x2201, + 0x21F0, 0x243E, 0x242F, 0x23A4, 0x2320, 0x2310, 0x2284, 0x21F0, + 0x215E, 0x20BD, 0x201E, 0x239E, 0x230F, 0x2283, 0x21FA, 0x21E4, + 0x20C8, 0x2423, 0x239D, 0x2314, 0x228E, 0x227D, 0x21E4, 0x2151, + 0x20B7, 0x2018, 0x2313, 0x228D, 0x227D, 0x21EE, 0x2157, 0x20BC, + 0x2018, 0x2396, 0x230D, 0x2282, 0x2271, 0x21DD, 0x214B, 0x20AA, + 0x2011, 0x2312, 0x2302, 0x2271, 0x21E8, 0x214B, 0x20B6, 0x2011, + 0x1F6E, 0x2301, 0x227B, 0x21E7, 0x2156, 0x213F, 0x20A4, 0x2005, + 0x2306, 0x22F6, 0x226F, 0x21DC, 0x2145, 0x20A9, 0x2005, 0x1F62, + 0x1EB5, 0x226F, 0x21E0, 0x21D0, 0x2139, 0x2098, 0x1FFF, 0x2304, + 0x22F4, 0x2263, 0x21CF, 0x2143, 0x212D, 0x1FFF, 0x1F5C, 0x1EA8, + 0x1DEF, 0x225D, 0x21C9, 0x212C, 0x2097, 0x1FF2, 0x22FE, 0x22E8, + 0x2262, 0x21CE, 0x2137, 0x209D, 0x1FFE, 0x1FEC, 0x1F3D, 0x1DE9, + 0x1D30, 0x21C8, 0x212B, 0x2091, 0x1FEC, 0x2375, 0x22E7, 0x225C, + 0x21CD, 0x21BC, 0x2125, 0x2085, 0x1FE0, 0x1F37, 0x1E8F, 0x1D23, + 0x1C56, 0x212A, 0x2119, 0x207F, 0x236D, 0x22E5, 0x2255, 0x21C7, + 0x21B0, 0x2119, 0x2084, 0x1FE6, 0x1F37, 0x1E89, 0x1DD0, 0x1C51, + 0x1AAC, 0x208F, 0x207E, 0x236C, 0x22E4, 0x2253, 0x2243, 0x21AF, + 0x2118, 0x207E, 0x1FE5, 0x1FCD, 0x1F24, 0x1DD0, 0x1D0A, 0x1B7D, + 0x19A7, 0x2071, 0x236A, 0x22E2, 0x22D2, 0x2241, 0x21AE, 0x2117, + 0x207D, 0x206B, 0x1FC7, 0x1F1E, 0x1E6A, 0x1D04, 0x1C37, 0x1A8B, + 0x1760, 0x236D, 0x235D, 0x22D5, 0x2245, 0x2235, 0x21A7, 0x2110, + 0x2070, 0x205F, 0x1F1D, 0x1E70, 0x1DB7, 0x1CF1, 0x1B63, 0x198C, + 0x0FF8, 0x235C, 0x22D4, 0x2244, 0x2233, 0x21A6, 0x210F, 0x20F8, + 0x205E, 0x1FBF, 0x1F17, 0x1E5D, 0x1DA4, 0x1C2B, 0x1B4F, 0x1870, + 0x2058, 0x22D7, 0x22C7, 0x2237, 0x2227, 0x2199, 0x20F7, 0x205D, + 0x1FBF, 0x1FAD, 0x1F04, 0x1E50, 0x1CE4, 0x1C17, 0x197A, 0x205C, + 0x204B, 0x22CB, 0x22BB, 0x2230, 0x2198, 0x2101, 0x20F0, 0x2056, + 0x1FB2, 0x1F04, 0x1E56, 0x1D9D, 0x1CD1, 0x1B43, 0x20F0, 0x204A, + 0x1FAC, 0x22BE, 0x2234, 0x2224, 0x218B, 0x20F5, 0x20E4, 0x2049, + 0x2345, 0x22B3, 0x2228, 0x2218, 0x218A, 0x20EF, 0x2055, 0x203D, + 0x1F9F, 0x1EF1, 0x1E43, 0x1D84, 0x217F, 0x23DC, 0x2357, 0x2348, + 0x22C0, 0x22B1, 0x2221, 0x218E, 0x217E, 0x20E2, 0x2048, 0x2037, + 0x1F98, 0x1EE4, 0x1E36, 0x1D77, 0x1CB7, 0x20E1, 0x2355, 0x2346, + 0x22B4, 0x22A4, 0x221A, 0x2209, 0x2171, 0x20E0, 0x20CF, 0x202A, + 0x1F8B, 0x1EDD, 0x1E30, 0x1D70, 0x1BF1, 0x20D4, 0x203A, 0x2339, + 0x22B2, 0x22A2, 0x220D, 0x2180, 0x216F, 0x20D4, 0x2034, 0x1F97, + 0x1F85, 0x1ED7, 0x1E29, 0x1D6A, 0x1BEB, 0x20D3, 0x2034, 0x2022, + 0x1F7E, 0x229A, 0x220B, 0x2173, 0x2163, 0x20D2, 0x20C1, 0x2022, + 0x1F78, 0x1ED6, 0x1E1C, 0x1D5D, 0x1BE5, 0x20C6, 0x2032, 0x201B, + 0x1F77, 0x1EC9, 0x2209, 0x21F9, 0x2161, 0x20C5, 0x2032, 0x201A, + 0x1F77, 0x1EC9, 0x1E16, 0x1D63, 0x1C97, 0x20C5, 0x2026, 0x201A, + 0x1F76, 0x1EC8, 0x1E15, 0x21F1, 0x215F, 0x20C4, 0x20B3, 0x2014, + 0x1F76, 0x1F64, 0x1EB6, 0x1E02, 0x1C91, 0x20C3, 0x20B2, 0x2013, + 0x1F75, 0x1F63, 0x1EB5, 0x1E02, 0x2158, 0x20C2, 0x20B1, 0x2012, + 0x1F74, 0x1F63, 0x1EB5, 0x1E02, 0x1D42, 0x2146, 0x20B1, 0x2017, + 0x2006, 0x1F62, 0x1EB4, 0x1E01, 0x1D42, 0x2150, 0x20B5, 0x20A4, + 0x2005, 0x1F62, 0x1EB4, 0x1E01, 0x1DEE, 0x214A, 0x20B4, 0x20A3, + 0x2004, 0x1F61, 0x1EB3, 0x1EA1, 0x1DEE, 0x1D2E, 0x20B3, 0x20A3, + 0x2003, 0x1F60, 0x1F49, 0x1EA1, 0x1DEE, 0x2148, 0x20B3, 0x20A2, + 0x2003, 0x1F60, 0x1F48, 0x1EA0, 0x1DED, 0x1D2E, 0x1C68, 0x20A6, + 0x2095, 0x1FF6, 0x1F47, 0x1EA0, 0x1DED, 0x214B, 0x213B, 0x20A5, + 0x2095, 0x1FF6, 0x1F53, 0x1F41, 0x1DED, 0x1DDA, 0x1D1A, 0x1C54, + 0x2094, 0x1FF5, 0x1F52, 0x1F40, 0x1E92, 0x21D6, 0x213E, 0x212E, + 0x2098, 0x1FFA, 0x1FE8, 0x1F40, 0x1E92, 0x1DDF, 0x1DCC, 0x1C5B, + 0x1B88, 0x1FF9, 0x1FE8, 0x1F45, 0x1F33, 0x21DE, 0x21CD, 0x2137, + 0x209C, 0x208B, 0x1FEC, 0x1FDB, 0x1F32, 0x1E8B, 0x1DD8, 0x1DC5, + 0x1C4E, 0x1B73, 0x207F, 0x1FDA, 0x1F37, 0x21E1, 0x21D1, 0x213F, + 0x212F, 0x208F, 0x207E, 0x1FE5, 0x1F37, 0x1F25, 0x1E7D, 0x1DCB, + 0x1D0C, 0x1C47, 0x1B6C, 0x1FEA, 0x1FD8, 0x2267, 0x21DE, 0x21CE, + 0x2132, 0x2122, 0x208D, 0x207C, 0x1FD8, 0x1F35, 0x1F23, 0x1E70, + 0x1DC4, 0x1CFF, 0x1C33, 0x1B66, 0x1FDC, 0x2274, 0x2264, 0x21D6, + 0x1E69, 0x2130, 0x211F, 0x207F, 0x1FE7, 0x1FD6, 0x1F28, 0x1F16, + 0x1E6E, 0x1DB6, 0x2123, 0x208A, 0x2073, 0x1FDB, 0x1FC9, 0x1F21, + 0x1E6E, 0x1DC2, 0x1DAF, 0x2117, 0x207D, 0x206D, 0x1FCE, 0x1FBD, + 0x1F14, 0x1E67, 0x1DB5, 0x2121, 0x2082, 0x2071, 0x1FD9, 0x1FC7, + 0x1F1F, 0x1E6D, 0x1E5A, 0x1DA2, 0x1CE9, 0x2075, 0x2065, 0x1FCC, + 0x1FBB, 0x1F13, 0x1E60, 0x1DAE, 0x2119, 0x2085, 0x2074, 0x2063, + 0x1FC0, 0x1F18, 0x1F06, 0x1E59, 0x1DA1, 0x1CE3, 0x1C17, 0x2068, + 0x1FCA, 0x1FB9, 0x1F11, 0x1E5E, 0x1E4C, 0x1D94, 0x210B, 0x2072, + 0x2061, 0x1FBE, 0x1F16, 0x1F04, 0x1E58, 0x1DA0, 0x1D8D, 0x1CCE, + 0x1C02, 0x1B2F, 0x1FB1, 0x1F09, 0x1EF8, 0x1E4B, 0x1D92, 0x210E, + 0x2075, 0x2064, 0x1FC1, 0x1FB0, 0x1F08, 0x1EF6, 0x1E4A, 0x1D8C, + 0x1CCD, 0x1C02, 0x1B2F, 0x1A4B, 0x1FA3, 0x1F01, 0x1E4F, 0x1E3D, + 0x2111, 0x2101, 0x205C, 0x2057, 0x1FAE, 0x1F06, 0x1EF5, 0x1E48, + 0x1D90, 0x1D7E, 0x1CBF, 0x1BFB, 0x1B1A, 0x1A36, 0x1F05, 0x1EF4, + 0x1E3B, 0x2114, 0x2103, 0x206A, 0x205A, 0x1FB1, 0x1FA0, 0x1EF9, + 0x1EE7, 0x1E3A, 0x1D89, 0x1D70, 0x1BFA, 0x1BDF, 0x1B0B, 0x1948, + 0x183E, 0x1EE6, 0x1E2D, 0x2106, 0x20F6, 0x205D, 0x204C, 0x1FA9, + 0x1F98, 0x1EEB, 0x1E3F, 0x1E2C, 0x1D7B, 0x1CB7, 0x1BEC, 0x1BD8, + 0x1A2F, 0x193A, 0x1827, 0x1E38, 0x210E, 0x20FE, 0x20ED, 0x204F, + 0x1FAC, 0x1F9B, 0x1EFA, 0x1EE9, 0x1E37, 0x1E25, 0x1D6D, 0x1CA9, + 0x1BE5, 0x1BCA, 0x1A28, 0x192C, 0x1820, 0x219A, 0x2105, 0x20F5, + 0x2057, 0x2047, 0x1FAA, 0x1F99, 0x1EEC, 0x1EDB, 0x1E2F, 0x1E1D, + 0x1D5F, 0x1C9B, 0x1BD6, 0x1BC2, 0x1A1A, 0x1A04, 0x180A, 0x2192, + 0x2102, 0x20F2, 0x2055, 0x2044, 0x1FA1, 0x1F90, 0x1EEA, 0x1ED9, + 0x1E21, 0x1E0F, 0x1D5D, 0x1C99, 0x1BCF, 0x1BB4, 0x1A13, 0x19FD, + 0x1803, 0x1E20, 0x20FA, 0x20EA, 0x204C, 0x203B, 0x1F9F, 0x1F8E, + 0x1F7D, 0x1ED0, 0x1E1F, 0x1E0D, 0x1D56, 0x1C98, 0x1C85, 0x1BB3, + 0x1AD9, 0x19EE, 0x1ECF, 0x1E1E, 0x20FC,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, 0x1A95, 0x19AC, 0x18B6, 0x179C, + 0x1DDC, 0x1D20, 0x2025, 0x2015, 0x1F6F, 0x1F5E, 0x1EB9, 0x1EA8, + 0x1E96, 0x1DE7, 0x1DD5, 0x1D12, 0x1C50, 0x1C3D, 0x1B73, 0x1B5F, + 0x1A7F, 0x1995, 0x1795, 0x165F, 0x1D1E, 0x2027, 0x2016, 0x1F71, + 0x1F60, 0x1EB6, 0x1EA5, 0x1E93, 0x1DDE, 0x1DCC, 0x1D10, 0x1D03, + 0x1C41, 0x1B72, 0x1B5E, 0x1A7E, 0x1995, 0x1898, 0x177D, 0x1DCA, + 0x2023, 0x2018, 0x1F73, 0x1F62, 0x1F52, 0x1EA8, 0x1E96, 0x1DE1, + 0x1DCF, 0x1D14, 0x1D01, 0x1C3F, 0x1C2C, 0x1B5C, 0x1A7D, 0x1994, + 0x197E, 0x1881, 0x1640, 0x2025, 0x2014, 0x1F70, 0x1F5F, 0x1F4E, + 0x1EA4, 0x1E93, 0x1DE4, 0x1DD2, 0x1DC0, 0x1D05, 0x1C43, 0x1C30, + 0x1B61, 0x1B4D, 0x1A67, 0x197E, 0x1881, 0x176E, 0x1D16, 0x201B, + 0x200B, 0x1F66, 0x1F5B, 0x1F4A, 0x1EA1, 0x1E8F, 0x1DD5, 0x1DC3, + 0x1D08, 0x1CF6, 0x1C34, 0x1C21, 0x1B52, 0x1B3E, 0x1A58, 0x196E, + 0x186A, 0x1DC2, 0x2022, 0x2012, 0x1F6E, 0x1F63, 0x1F52, 0x1E9D, + 0x1E8C, 0x1DDE, 0x1DCC, 0x1DBA, 0x1CFF, 0x1CF3, 0x1C25, 0x1C12, + 0x1B42, 0x1A64, 0x197C, 0x1966, 0x1DCA, 0x1DB8, 0x2019, 0x2008, + 0x1F6A, 0x1F59, 0x1F48, 0x1E9A, 0x1E8E, 0x1E7D, 0x1DC9, 0x1DB7, + 0x1CFC, 0x1CEA, 0x1C23, 0x1C10, 0x1B3A, 0x1A63, 0x1E8C, 0x1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1BCD, 0x1BBA, 0x1ADD, + 0x1AD0, 0x1ABC, 0x1AB0, 0x19B9, 0x19AC, 0x18B0, 0x189B, 0x1886, + 0x177B, 0x1764, 0x1639, 0x1621, 0x14D4, 0x1AC0, 0x1AB4, 0x19BE, + 0x19B7, 0x19A3, 0x1CC5, 0x1CBA, 0x1BE0, 0x1BD4, 0x1BC7, 0x1BBB, + 0x1AD7, 0x1AC4, 0x1AB1, 0x19CF, 0x19BB, 0x19A7, 0x1993, 0x1897, + 0x1882, 0x1777, 0x1761, 0x162E, 0x1616, 0x1ACE, 0x1AC1, 0x1AAE, + 0x19C0, 0x19AC, 0x1997, 0x18A3, 0x1CB9, 0x1BE6, 0x1BD3, 0x1BC1, + 0x1BB5, 0x1AD2, 0x1ABF, 0x1AB8, 0x1AA5, 0x19B6, 0x19A2, 0x1995, + 0x1893, 0x187E, 0x176D, 0x1756, 0x162B, 0x1613, 0x1ACF, 0x1ABC, + 0x1AA9, 0x19C8, 0x19B4, 0x19A0, 0x189E, 0x1BF7, 0x1BE5, 0x1BD3, + 0x1BC7, 0x1AE5, 0x1AD9, 0x1AC6, 0x1AB2, 0x1AAC, 0x19B8, 0x19AA, + 0x1996, 0x1895, 0x1880, 0x1872, 0x175A, 0x1744, 0x1618, 0x1AD5, + 0x1AC9, 0x1AB6, 0x19C3, 0x19B5, 0x19A8, 0x1994, 0x188C, 0x1BF1, + 0x1BDF, 0x1BCD, 0x1BC1, 0x1ADF, 0x1AD2, 0x1ABF, 0x1AAC, 0x19C6, + 0x19B2, 0x199E, 0x189F, 0x188A, 0x187B, 0x1765, 0x174E, 0x1BBD, + 0x1ADC, 0x1ACF, 0x1AC3, 0x1AB0, 0x19BD, 0x19A9, 0x199C, 0x189C, + 0x1BF6, 0x1BF0, 0x1BDE, 0x1BD2, 0x1BC0, 0x1ADF, 0x1ACC, 0x1AB9, + 0x19D4, 0x19C0, 0x19AD, 0x1999, 0x1899, 0x1884, 0x186F, 0x1759, + 0x1752, 0x173B, 0x160A, 0x15F2, 0x1ABC, 0x19CB, 0x1CFA, 0x1CEE, + 0x1CE2, 0x1C0D, 0x1C01, 0x1BEF, 0x1BDD, 0x1BD1, 0x1AF2, 0x1ADF, + 0x1ACC, 0x1AB9, 0x1AB3, 0x19C1, 0x19B4, 0x19A0, 0x18A2, 0x188D, + 0x1878, 0x1863, 0x174D, 0x173E, 0x160E, 0x15F7, 0x149E, 0x1AB6, + 0x19C5, 0x19B1, 0x1CE6, 0x1C17, 0x1C06, 0x1BF4, 0x1BE8, 0x1BD6, + 0x1AF7, 0x1AE4, 0x1AD8, 0x1AC5, 0x1AB2, 0x19C8, 0x19B5, 0x19A8, + 0x1994, 0x1896, 0x1881, 0x186C, 0x1750, 0x1749, 0x1732, 0x15FB, + 0x15E3, 0x1493, 0x19CC, 0x19BE, 0x19B1, 0x199E, 0x189A, 0x1C04, + 0x1BF2, 0x1BE6, 0x1BD4, 0x1AF0, 0x1AEA, 0x1AD7, 0x1AC5, 0x19D6, + 0x19C2, 0x19AE, 0x19A1, 0x18A5, 0x1890, 0x187B, 0x1866, 0x1753, + 0x173D, 0x1726, 0x15EF, 0x15D8, 0x1490, 0x1476, 0x19B8, 0x19AB, + 0x1997, 0x1894, 0x1886, 0x1BFC, 0x1BEA, 0x1B08, 0x1AFC, 0x1AE9, + 0x1AD6, 0x1AC4, 0x19D5, 0x19C2, 0x19B5, 0x19A1, 0x189F, 0x188A, + 0x187D, 0x186E, 0x174E, 0x1738, 0x1730, 0x15F3, 0x15DC, 0x1485, + 0x146B, 0x19C5, 0x19B1, 0x19A4, 0x18A3, 0x188E, 0x1879, 0x186C, + 0x1B13, 0x1B01, 0x1AEE, 0x1AE2, 0x1ACF, 0x19E2, 0x19CF, 0x19BB, + 0x19AE, 0x199B, 0x1899, 0x1884, 0x1876, 0x1862, 0x1748, 0x1739, + 0x1723, 0x15E7, 0x15CF, 0x1481, 0x1468, 0x19BE, 0x19AB, 0x199E, + 0x1896, 0x1888, 0x1873, 0x1865, 0x1B12, 0x1AFF, 0x1AED, 0x1AE0, + 0x1ACE, 0x19E1, 0x19CE, 0x19C1, 0x19AE, 0x18A7, 0x1892, 0x1885, + 0x1870, 0x1862, 0x174A, 0x1734, 0x171E, 0x15EA, 0x15D3, 0x1475, + 0x19D1, 0x19BD, 0x19AA, 0x18AA, 0x1896, 0x1881, 0x1874, 0x1866, + 0x1740, 0x1B03, 0x1AF1, 0x1AE5, 0x19F4, 0x19E0, 0x19CD, 0x19C6, + 0x19B3, 0x19A6, 0x18A0, 0x188B, 0x187E, 0x1869, 0x174B, 0x173D, + 0x1727, 0x15E5, 0x15D6, 0x15BE, 0x19D6, 0x19C9, 0x19B6, 0x18B1, + 0x18A3, 0x188F, 0x187B, 0x186D, 0x174F, 0x1B13, 0x1B01, 0x1AEF, + 0x19FF, 0x19F2, 0x19DF, 0x19CC, 0x19BF, 0x19AC, 0x18AD, 0x1899, + 0x1885, 0x1877, 0x1754, 0x173E, 0x1730, 0x1721, 0x15E8, 0x19FB, + 0x19E8, 0x19D5, 0x19C8, 0x19B5, 0x18B7, 0x18A3, 0x188F, 0x1881, + 0x186D, 0x1B23, 0x1B17, 0x1B05, 0x1AF2, 0x19FD, 0x19F1, 0x19E4, + 0x19D7, 0x19C4, 0x19B0, 0x18AD, 0x1899, 0x188B, 0x1877, 0x175C, + 0x1746, 0x1730, 0x171B, 0x15E2, 0x15D3, 0x15BC, 0x1461, 0x1448, + 0x142E, 0x18B7, 0x1C43, 0x1B56, 0x1B50, 0x1B3E, 0x1B32, 0x1B20, + 0x1B0E, 0x1B02, 0x1A0E, 0x19FB, 0x19EF, 0x19DC, 0x19C8, 0x18C7, + 0x18B3, 0x18A5, 0x1891, 0x187D, 0x1763, 0x1755, 0x173F, 0x172A, + 0x171B, 0x15E4, 0x15CD, 0x15B6, 0x1454, 0x143B, 0x12A3, 0x1287, + 0x10AE, 0x1B5F, 0x1B53, 0x1B41, 0x1B2F, 0x1B23, 0x1B11, 0x1A19, + 0x1A12, 0x19FF, 0x19F3, 0x19E0, 0x19CC, 0x18C6, 0x18B1, 0x18A4, + 0x1890, 0x1889, 0x1875, 0x1755, 0x173F, 0x1731, 0x171B, 0x15DE, + 0x15C7, 0x15B0, 0x144F, 0x143F, 0x1425, 0x128D, 0x1271, 0x108D, + 0x0E03, 0x1B49, 0x1B37, 0x1B2B, 0x1A35, 0x1A29, 0x1A16, 0x1A0F, + 0x19FC, 0x19E9, 0x19DD, 0x18D8, 0x18C4, 0x18B0, 0x18A3, 0x188E, + 0x187A, 0x1763, 0x174D, 0x1738, 0x172A, 0x15E8, 0x15D0, 0x15B9, + 0x15B1, 0x144A, 0x1431, 0x1418, 0x1277, 0x10A1, 0x1081, 0x0DF8, + 0x175F, 0x1B3F, 0x1A4B, 0x1A38, 0x1A2C, 0x1A19, 0x1A13, 0x1A00, + 0x19ED, 0x18E3, 0x18D6, 0x18C2, 0x18AE, 0x18A1, 0x1893, 0x1770, + 0x1762, 0x174D, 0x1737, 0x1729, 0x15E8, 0x15D1, 0x15C2, 0x15AB, + 0x1445, 0x142C, 0x141B, 0x127D, 0x1260, 0x1080, 0x1054, 0x176C, + 0x1757, 0x1A54, 0x1A41, 0x1A3A, 0x1A28, 0x1A1C, 0x1A09, 0x19FC, + 0x18F4, 0x18E0, 0x18CD, 0x18C0, 0x18AC, 0x189F, 0x177D, 0x1768, + 0x175A, 0x1745, 0x172F, 0x15F8, 0x15E1, 0x15CA, 0x15BB, 0x1450, + 0x1437, 0x141E, 0x128B, 0x1278, 0x125C, 0x1069, 0x1779, 0x176B, + 0x1756, 0x1A5C, 0x1A49, 0x1A3D, 0x1A2A, 0x1A1E, 0x1A11, 0x1905, + 0x18F8, 0x18E4, 0x18D0, 0x18C3, 0x18B0, 0x1791, 0x1782, 0x1775, + 0x175F, 0x174A, 0x173C, 0x15F8, 0x15E1, 0x15D2, 0x15BB, 0x15A4, + 0x1441, 0x1428, 0x140F, 0x1274, 0x1258, 0x18AA, 0x1785, 0x1770, + 0x175B, 0x1A69, 0x1A57, 0x1A4B, 0x1A38, 0x1A2C, 0x1922, 0x190E, + 0x1901, 0x18EE, 0x18E7, 0x18D4, 0x18C7, 0x18B3, 0x1788, 0x1780, + 0x176B, 0x175E, 0x1748, 0x173B, 0x15F0, 0x15D9, 0x15CA, 0x15B4, + 0x15AC, 0x143A, 0x1422, 0x1411, 0x18CE, 0x18C1, 0x1797, 0x178A, + 0x1775, 0x1A7D, 0x1A71, 0x1A64, 0x1A58, 0x1A46, 0x1937, 0x192B, + 0x1917, 0x190A, 0x18F7, 0x18F0, 0x18DD, 0x18D0, 0x17A7, 0x179A, + 0x1785, 0x1777, 0x1762, 0x174D, 0x160D, 0x15FE, 0x15E8, 0x15D1, + 0x15C2, 0x1454, 0x190B, 0x18FF, 0x18EB, 0x18DE, 0x17B7, 0x17A9, + 0x1795, 0x1787, 0x1772, 0x175D, 0x1756, 0x1610, 0x15FA, 0x194D, + 0x1939, 0x1933, 0x1920, 0x1913, 0x18FF, 0x18F3, 0x18DF, 0x17C0, + 0x17AB, 0x179D, 0x1789, 0x177B, 0x1766, 0x1751, 0x160C, 0x15FD, + 0x15E7, 0x15DF, 0x15C8, 0x145D, 0x1445, 0x142C, 0x18FA, 0x18ED, + 0x17C1, 0x17B4, 0x179F, 0x1792, 0x177D, 0x176F, 0x175A, 0x1616, + 0x1600, 0x15F1, 0x15DA, 0x1941, 0x192E, 0x1921, 0x190E, 0x1901, + 0x17DE, 0x17CA, 0x17B5, 0x17A8, 0x1793, 0x178C, 0x1777, 0x176A, + 0x1620, 0x160A, 0x15FB, 0x15E5, 0x15DD, 0x15C7, 0x1455, 0x143D, + 0x1424, 0x1414, 0x1267, 0x17C4, 0x17B7, 0x17A2, 0x1795, 0x1787, + 0x1779, 0x1631, 0x161B, 0x160C, 0x15F6, 0x15E0, 0x194E, 0x193B, + 0x192F, 0x191C, 0x17F5, 0x17E7, 0x17D3, 0x17BF, 0x17B8, 0x17AA, + 0x1796, 0x1781, 0x1774, 0x162C, 0x1616, 0x1607, 0x15F1, 0x15E2, + 0x15CC, 0x145D, 0x144D, 0x1434, 0x141C, 0x140C, 0x1258, 0x17C7, + 0x17B2, 0x17AB, 0x1797, 0x1789, 0x163D, 0x1627, 0x1618, 0x1602, + 0x15FB, 0x15E4, 0x1955, 0x1948, 0x1935, 0x180A, 0x17FD, 0x17E9, + 0x17E2, 0x17D5, 0x17C1, 0x17AC, 0x179F, 0x178A, 0x1646, 0x1630, + 0x1622, 0x160C, 0x15F6, 0x15EE, 0x15D8, 0x145C, 0x144C, 0x143C, + 0x142C, 0x1413, 0x1263, 0x1247, 0x17CF, 0x17BB, 0x17AD, 0x1799, + 0x1648, 0x1640, 0x162B, 0x161C, 0x1606, 0x197A, 0x1967, 0x1961, + 0x1833, 0x1826, 0x1812, 0x1805, 0x17F7, 0x17EA, 0x17D6, 0x17C9, + 0x17B5, 0x166D, 0x1658, 0x164A, 0x163B, 0x162C, 0x1616, 0x1601, + 0x15F2, 0x147A, 0x146A, 0x1452, 0x1443, 0x142A, 0x1412, 0x1264, + 0x1252, 0x17DD, 0x17C9, 0x17B5, 0x166E, 0x1660, 0x164B, 0x1635, + 0x1627, 0x199D, 0x1991, 0x1867, 0x185B, 0x1847, 0x183A, 0x1826, + 0x181F, 0x180C, 0x17FF, 0x17EB, 0x17DD, 0x17C9, 0x1685, 0x1677, + 0x1661, 0x164C, 0x163E, 0x1628, 0x161A, 0x160B, 0x15FC, 0x1480, + 0x1470, 0x1458, 0x1448, 0x1430, 0x1418, 0x1805, 0x17F8, 0x17E4, + 0x169B, 0x1686, 0x1678, 0x1663, 0x165B, 0x19D2, 0x19C0, 0x189A, + 0x188E, 0x187A, 0x1874, 0x1860, 0x1853, 0x1840, 0x1833, 0x181F, + 0x1818, 0x1805, 0x17F8, 0x16AA, 0x1695, 0x1687, 0x1678, 0x166A, + 0x1655, 0x18BA, 0x18AD, 0x189A, 0x188D, 0x1880, 0x1873, 0x1860, + 0x1853, 0x183F, 0x1838, 0x182C, 0x1818, 0x180B, 0x16B8, 0x16AA, + 0x1695, 0x1687, 0x1672, 0x166B, 0x165D, 0x1647, 0x1632, 0x1624, + 0x14AD, 0x1496, 0x1487, 0x146F, 0x1460, 0x1448, 0x1430, 0x1283, + 0x1268, 0x1257, 0x123C, 0x122A, 0x1013, 0x0FF4, 0x1681, 0x166B, + 0x165D, 0x1648, 0x163A, 0x18B1, 0x189E, 0x1891, 0x187E, 0x1877, + 0x186B, 0x1857, 0x184A, 0x1837, 0x16E9, 0x16DB, 0x16C7, 0x16C0, + 0x16AB, 0x169D, 0x1688, 0x167A, 0x1665, 0x1657, 0x164F, 0x14C8, + 0x14B9, 0x14A1, 0x1492, 0x147B, 0x1473, 0x145B, 0x144C, 0x128A, + 0x1279, 0x125E, 0x124D, 0x1232, 0x1016, 0x1001, 0x0FE2, 0x168F, + 0x167A, 0x166C, 0x1657, 0x14D9, 0x14C9, 0x14B2, 0x18A1, 0x189B, + 0x188E, 0x187B, 0x172C, 0x171F, 0x170B, 0x16FD, 0x16F6, 0x16E1, + 0x16D4, 0x16BF, 0x16B1, 0x169C, 0x168F, 0x1680, 0x1672, 0x14F0, + 0x14E1, 0x14CA, 0x14C3, 0x14AC, 0x149C, 0x1485, 0x1476, 0x145E, + 0x12A2, 0x1288, 0x1277, 0x125C, 0x124B, 0x1239, 0x1018, 0x0FF9, + 0x0FEF, 0x169C, 0x168E, 0x150F, 0x1500, 0x14E9, 0x14DA, 0x14C4, + 0x14B4, 0x1774, 0x1767, 0x1753, 0x1745, 0x1738, 0x1724, 0x171D, + 0x1708, 0x16FB, 0x16E6, 0x16D9, 0x16D2, 0x16BD, 0x16B0, 0x169B, + 0x151F, 0x1508, 0x14F9, 0x14EA, 0x14DB, 0x14C4, 0x14B5, 0x149E, + 0x148F, 0x1478, 0x12B8, 0x12A7, 0x128D, 0x127C, 0x126B, 0x1259, + 0x123F, 0x1019, 0x0FFB, 0x16C3, 0x1544, 0x152D, 0x1526, 0x1517, + 0x1501, 0x14F2, 0x14DB, 0x17A6, 0x1792, 0x1785, 0x1777, 0x176A, + 0x1756, 0x1749, 0x173C, 0x172E, 0x1721, 0x170C, 0x16FF, 0x16EA, + 0x16DD, 0x16D6, 0x154B, 0x1543, 0x152D, 0x151E, 0x1510, 0x14F9, + 0x14EA, 0x14D4, 0x14CC, 0x14B5, 0x14A6, 0x12DE, 0x12C5, 0x12B4, + 0x12AB, 0x1292, 0x1281, 0x1267, 0x1711, 0x1704, 0x1585, 0x156F, + 0x1560, 0x1551, 0x1543, 0x1534, 0x151E, 0x150F, 0x17DC, 0x17C8, + 0x17BB, 0x17B4, 0x17A1, 0x1794, 0x1780, 0x1773, 0x176C, 0x1758, + 0x174B, 0x1737, 0x172A, 0x1723, 0x1599, 0x158B, 0x1575, 0x156D, + 0x155F, 0x1549, 0x153B, 0x1524, 0x1516, 0x150E, 0x14F8, 0x14E9, + 0x14D3, 0x1313, 0x12FA, 0x12E9, 0x12D0, 0x12C0, 0x1769, 0x175C, + 0x174F, 0x15D1, 0x15BB, 0x15AD, 0x1598, 0x1589, 0x1582, 0x156C, + 0x155E, 0x1548, 0x1539, 0x1523, 0x151C, 0x150D, 0x14F7, 0x14E8, + 0x131C, 0x130B, 0x12F2, 0x12EA, 0x12D9, 0x12C0, 0x1773, 0x15F9, + 0x15E4, 0x15D6, 0x15C1, 0x15B3, 0x15AB, 0x1596, 0x1588, 0x1572, + 0x1564, 0x154E, 0x1546, 0x1538, 0x1522, 0x1513, 0x14FD, 0x1335, + 0x132C, 0x1314, 0x1303, 0x12EB, 0x12DA, 0x12C1, 0x12B0, 0x1605, + 0x15F0, 0x15E2, 0x15D4, 0x15C6, 0x15B8, 0x15A2, 0x1594, 0x1586, + 0x1577, 0x1569, 0x1553, 0x1545, 0x1536, 0x1520, 0x135D, 0x134D, + 0x1335, 0x1324, 0x130C, 0x12FC, 0x12F3, 0x12DA, 0x12CA, 0x12B1, + 0x160A, 0x15FB, 0x15ED, 0x15E0, 0x15CA, 0x15BC, 0x15B5, 0x15A0, + 0x1591, 0x157C, 0x156E, 0x1566, 0x1551, 0x1384, 0x1375, 0x1364, + 0x1354, 0x1344, 0x132C, 0x131C, 0x1303, 0x12F3, 0x12DA, 0x12D2, + 0x12C1, 0x12A8, 0x1614, 0x15FF, 0x15F1, 0x15DC, 0x15CE, 0x15C7, + 0x15B2, 0x15A4, 0x1596, 0x1580, 0x1579, 0x13AB, 0x139B, 0x1383, + 0x1374, 0x1363, 0x1353, 0x1344, 0x132B, 0x131B, 0x1303, 0x12F3, + 0x12EA, 0x12D1, 0x1633, 0x162C, 0x161F, 0x160A, 0x15FC, 0x15F5, + 0x15E0, 0x15D2, 0x15BD, 0x15AF, 0x15A8, 0x13D8, 0x13C9, 0x13B1, + 0x13A2, 0x139A, 0x1382, 0x1372, 0x135A, 0x134A, 0x1332, 0x132A, + 0x131A, 0x1302, 0x12F1, 0x12D9, 0x10A8, 0x163D, 0x1636, 0x1621, + 0x1614, 0x1606, 0x15F8, 0x15EA, 0x15DC, 0x140C, 0x1404, 0x13F5, + 0x13DE, 0x13CE, 0x13B7, 0x13A7, 0x139F, 0x1388, 0x1378, 0x1360, + 0x1351, 0x1339, 0x1329, 0x1320, 0x1691, 0x167C, 0x166F, 0x1668, + 0x1654, 0x1646, 0x1631, 0x162A, 0x161D, 0x1455, 0x143E, 0x142F, + 0x1420, 0x1411, 0x1402, 0x13EA, 0x13DB, 0x13D3, 0x13BC, 0x13AD, + 0x1395, 0x1386, 0x1376, 0x1366, 0x1356, 0x133E, 0x132E, 0x131F, + 0x10D8, 0x168B, 0x1685, 0x1670, 0x1663, 0x149C, 0x1494, 0x147E, + 0x146F, 0x1459, 0x144A, 0x1442, 0x142C, 0x141D, 0x140E, 0x13F7, + 0x13E7, 0x13E0, 0x13C8, 0x13B9, 0x13A2, 0x1392, 0x138A, 0x16FD, + 0x16F0, 0x16DC, 0x16D5, 0x16C8, 0x16B4, 0x14EF, 0x14E1, 0x14DA, + 0x14C4, 0x14B5, 0x14A7, 0x1490, 0x1489, 0x147A, 0x1464, 0x1455, + 0x1446, 0x1437, 0x1428, 0x1419, 0x1402, 0x13F3, 0x13EB, 0x13D4, + 0x13C5, 0x13AE, 0x139E, 0x1396, 0x1717, 0x1556, 0x1548, 0x1532, + 0x1524, 0x151D, 0x1507, 0x14F9, 0x14EB, 0x14E3, 0x14CD, 0x14BF, + 0x14A9, 0x149A, 0x1493, 0x147D, 0x146E, 0x145F, 0x1450, 0x1441, + 0x1432, 0x141C, 0x140D, 0x1405, 0x13EE, 0x13DF, 0x13D0, 0x13B9, + 0x13B1, 0x1177, 0x115D, 0x114B, 0x1131, 0x111F, 0x110D, 0x10F2, + 0x10E9, 0x10CD, 0x10BB, 0x10A9, 0x108D, 0x107B, 0x105E, 0x104C, + 0x1042, 0x1495, 0x1486, 0x1478, 0x1468, 0x145A, 0x144B, 0x1435, + 0x142D, 0x141E, 0x1408, 0x13F9, 0x13EA, 0x11B2, 0x1198, 0x1186, + 0x116C, 0x158F, 0x1582, 0x156D, 0x155F, 0x1557, 0x1542, 0x1534, + 0x1526, 0x151F, 0x1509, 0x14FB, 0x14ED, 0x14DE, 0x14D0, 0x14C2, + 0x14AC, 0x14A4, 0x1496, 0x1480, 0x1471, 0x146A, 0x1454, 0x1445, + 0x1436, 0x11FB, 0x11E1, 0x11D1, 0x11C8, 0x11AE, 0x119D, 0x118C, + 0x1172, 0x1161, 0x1158, 0x113D, 0x112C, 0x111A, 0x10FF, 0x10EE, + 0x10DB, 0x10C9, 0x10B7, 0x109C, 0x108A, 0x0D69, 0x0D46, 0x0D3A, + 0x0D16, 0x14C2, 0x14B3, 0x14A5, 0x1496, 0x125A, 0x124A, 0x1239, + 0x1220, 0x1210, 0x1207, 0x11EE, 0x11DD, 0x11CD, 0x11B3, 0x11AA, + 0x15E0, 0x15D2, 0x15C4, 0x15B7, 0x15A9, 0x15A2, 0x158D, 0x1580, + 0x1572, 0x1564, 0x1556, 0x1548, 0x1541, 0x152C, 0x151E, 0x1516, + 0x1501, 0x12CE, 0x12BE, 0x12A6, 0x1296, 0x128E, 0x1275, 0x1265, + 0x1255, 0x123C, 0x1234, 0x1223, 0x120A, 0x11FA, 0x11E9, 0x11D8, + 0x11C7, 0x11B7, 0x119D, 0x118C, 0x1183, 0x1169, 0x1158, 0x1147, + 0x112D, 0x111B, 0x1112, 0x10F8, 0x10E6, 0x0DC7, 0x0DA5, 0x0D8F, + 0x0D6C, 0x1316, 0x12FE, 0x12EF, 0x12DF, 0x12C7, 0x12BF, 0x12AF, + 0x1297, 0x1287, 0x127F, 0x126F, 0x1257, 0x1246, 0x1236, 0x1680, + 0x1679, 0x1666, 0x1659, 0x1652, 0x142E, 0x141F, 0x1410, 0x1401, + 0x13F3, 0x13E4, 0x13D4, 0x13C6, 0x13B7, 0x13A8, 0x1398, 0x1389, + 0x137A, 0x1363, 0x135B, 0x134C, 0x133D, 0x132D, 0x131D, 0x130E, + 0x12F7, 0x12EF, 0x12DF, 0x12CF, 0x12B7, 0x12AF, 0x12A0, 0x1287, + 0x1278, 0x1268, 0x125F, 0x1247, 0x1237, 0x1227, 0x1216, 0x1205, + 0x11F5, 0x11DC, 0x11D3, 0x11C3, 0x11AA, 0x1199, 0x1188, 0x117F, + 0x0E52, 0x13E1, 0x13CB, 0x13C3, 0x13B4, 0x139E, 0x138F, 0x1387, + 0x1378, 0x1361, 0x1359, 0x134A, 0x133B, 0x1324, 0x156D, 0x1558, + 0x1551, 0x1544, 0x1536, 0x1528, 0x151A, 0x150C, 0x1505, 0x14F0, + 0x14E2, 0x14DB, 0x14CD, 0x14B7, 0x14B0, 0x14A2, 0x1494, 0x1485, + 0x11F5, 0x11EC, 0x0EC0, 0x0EAB, 0x0E97, 0x0E78, 0x0E63, 0x0E59, + 0x0E39, 0x0E24, 0x0E0F, 0x0DEE, 0x0DD9, 0x0DC3, 0x0DA2, 0x0D97, + 0x0D81, 0x0D5F, 0x0D48, 0x0D26, 0x0D0F, 0x0CF8, 0x1338, 0x1329, + 0x1321, 0x1311, 0x12FA, 0x12F2, 0x12E3, 0x12D3, 0x12BC, 0x152F, + 0x1521, 0x150C, 0x1505, 0x14F7, 0x14F0, 0x14DB, 0x14CD, 0x14C6, + 0x14B8, 0x14A3, 0x149C, 0x148D, 0x147F, 0x1471, 0x1462, 0x145B, + 0x144D, 0x1437, 0x1430, 0x1421, 0x1413, 0x1404, 0x13F5, 0x13E7, + 0x13DF, 0x13C9, 0x13BA, 0x13B3, 0x13A4, 0x138E, 0x1386, 0x1377, + 0x1368, 0x1360, 0x134A, 0x133B, 0x1333, 0x1029, 0x100E, 0x1004, + 0x0FF2, 0x0FE0, 0x0FC4, 0x0FB1, 0x0FA7, 0x0F8B, 0x0F78, 0x0F65, + 0x0F52, 0x0F3E, 0x0F2B, 0x0F17, 0x0EFA, 0x0EE6, 0x0EDC, 0x0EC8, + 0x0EAA, 0x0E96, 0x0E82, 0x0E63, 0x0E58, 0x0E44, 0x0E24, 0x0E0F, + 0x0DFA, 0x0DDA, 0x0DC5, 0x0DBA, 0x0DA4, 0x0D83, 0x0D6D, 0x0D4C, + 0x0D36, 0x0691, 0x065D, 0x10C0, 0x10AE, 0x10A5, 0x108B, 0x1079, + 0x1067, 0x1055, 0x1043, 0x134A, 0x133B, 0x132C, 0x1324, 0x1315, + 0x12FE, 0x12F6, 0x12E7, 0x12D8, 0x12D0, 0x12B8, 0x12A9, 0x12A1, + 0x1291, 0x127A, 0x1272, 0x1262, 0x1252, 0x1242, 0x1232, 0x1222, + 0x121A, 0x1202, 0x11F2, 0x11EA, 0x11D9, 0x11C9, 0x11B8, 0x11A8, + 0x1198, 0x118F, 0x1176, 0x1166, 0x1155, 0x114D, 0x1133, 0x1122, + 0x111A, 0x1109, 0x10EF, 0x10DE, 0x10D5, 0x10C4, 0x10AA, 0x10A1, + 0x1090, 0x107E, 0x1063, 0x105A, 0x1049, 0x1037, 0x1025, 0x1013, + 0x1001, 0x0FEF, 0x0FE5, 0x0FCA, 0x0FB7, 0x0FA5, 0x0F9B, 0x0F7F, + 0x0F6C, 0x0F5A, 0x0F47, 0x0F33, 0x0F20, 0x0F0D, 0x0EFA, 0x0EE6, + 0x0ED2, 0x0EBF, 0x0EAB, 0x0E8D, 0x0E83, 0x0E6F, 0x0E50, 0x0E3C, + 0x0E27, 0x11E9, 0x11E1, 0x11D1, 0x11C1, 0x11B0, 0x11A0, 0x1190, + 0x14AB, 0x149D, 0x148F, 0x1488, 0x147A, 0x1472, 0x145D, 0x1456, + 0x1448, 0x1441, 0x1433, 0x1424, 0x1416, 0x140E, 0x1400, 0x13F9, + 0x13E3, 0x13DC, 0x13CD, 0x13C6, 0x13B8, 0x13A9, 0x139A, 0x1393, + 0x1384, 0x137C, 0x1366, 0x135F, 0x1350, 0x1341, 0x133A, 0x1323, + 0x131B, 0x130C, 0x1305, 0x12F6, 0x12EE, 0x12D7, 0x12CF, 0x12C0, + 0x12B1, 0x12A9, 0x1292, 0x128A, 0x127B, 0x1273, 0x1263, 0x124C, + 0x1244, 0x1234, 0x122C, 0x121C, 0x120C, 0x11FC, 0x11ED, 0x11E4, + 0x05E0, 0x11C4, 0x11B4, 0x11A4, 0x119C, 0x14F1, 0x14EA, 0x14DC, + 0x14D5, 0x14C7, 0x14B9, 0x14B2, 0x14A4, 0x149D, 0x1490, 0x1481, + 0x1474, 0x146C, 0x1465, 0x1457, 0x1450, 0x143B, 0x1434, 0x1426, + 0x141E, 0x1417, 0x1409, 0x13FA, 0x13EC, 0x13E5, 0x13D7, 0x13CF, + 0x13C8, 0x13B2, 0x13AB, 0x139C, 0x1395, 0x1387, 0x1378, 0x1369, + 0x1361, 0x135A, 0x134B, 0x1344, 0x132D, 0x1326, 0x1317, 0x130F, + 0x1301, 0x12F9, 0x12E2, 0x12DB, 0x12CC, 0x12C4, 0x12B5, 0x12AD, + 0x1296, 0x128E, 0x127F, 0x1277, 0x1268, 0x1258, 0x1249, 0x1241, + 0x1231, 0x1229, 0x121A, 0x0D4C, 0x0D36, 0x0D2B, 0x0D0A, 0x0CF4, + 0x0CDE, 0x0CD3, 0x0CB1, 0x0C9B, 0x0C84, 0x0C6D, 0x0C61, 0x0C3E, + 0x0C27, 0x0C0F, 0x0C03, 0x0BDF, 0x0BC6, 0x0BAE, 0x0B95, 0x0B70, + 0x0B63, 0x0B4A, 0x0B30, 0x0B16, 0x0AEF, 0x0AD4, 0x0AC7, 0x0AAC, + 0x0A83, 0x0A67, 0x0A4C, 0x0A21, 0x0A04, 0x09F6, 0x09D8, 0x09AC, + 0x098D, 0x096F, 0x0950, 0x0920, 0x0900, 0x08E0, 0x08CF, 0x089C, + 0x087A, 0x0857, 0x0822, 0x07FD, 0x07D8, 0x079F, 0x0777, 0x074F, + 0x0711, 0x06E6, 0x06A3, 0x0675, 0x065D, 0x0614, 0x05E1, 0x0590, + 0x0558, 0x0E55, 0x0E41, 0x0E2D, 0x131F, 0x1318, 0x1301, 0x12FA, + 0x12F2, 0x12E3, 0x12DC, 0x12D4, 0x12BD, 0x12B6, 0x12A7, 0x129F, + 0x1297, 0x1288, 0x1280, 0x1271, 0x1262, 0x125A, 0x1252, 0x1243, + 0x123B, 0x1233, 0x121C, 0x1214, 0x1204, 0x11FC, 0x11F4, 0x11E5, + 0x11DD, 0x11CD, 0x11BD, 0x11B5, 0x11A5, 0x119D, 0x1195, 0x117D, + 0x1174, 0x1164, 0x115C, 0x1154, 0x1144, 0x113B, 0x1123, 0x111B, + 0x1112, 0x1102, 0x10F9, 0x10E9, 0x10E0, 0x10CF, 0x10BF, 0x10B6, + 0x10A6, 0x109D, 0x108C, 0x1084, 0x1072, 0x1061, 0x1058, 0x1047, + 0x103F, 0x102E, 0x1025, 0x100B, 0x1002, 0x0FF9, 0x0FE7, 0x0FDE, + 0x0FCD, 0x0FC4, 0x0FA9, 0x0FA0, 0x0F8E, 0x0F85, 0x0F73, 0x0F6A, + 0x0F58, 0x0F45, 0x0F33, 0x0F29, 0x0F17, 0x0F0D, 0x0EFB, 0x0EF1, + 0x0ED5, 0x0ECC, 0x0EB9, 0x0EAF, 0x0E9C, 0x0E92, 0x0E7F, 0x0E6C, + 0x0E58, 0x0E4F, 0x0E3B, 0x0E31, 0x0E1D, 0x0E13, 0x0DF5, 0x0DEB, + 0x0DD7, 0x0DC3, 0x0DB9, 0x0DA5, 0x0D9A, 0x0D7B, 0x0D71, 0x0D5C, + 0x0D47, 0x0D3D, 0x0D28, 0x0D1D, 0x0CFD, 0x0CF2, 0x0CDC, 0x0CC7, + 0x0CBB, 0x0CA6, 0x0C84, 0x0C79, 0x0C63, 0x0C57, 0x0C41, 0x0C2A, + 0x133B, 0x132C, 0x1325, 0x131D, 0x1316, 0x130F, 0x1307, 0x1300, + 0x12F8, 0x12F1, 0x12E2, 0x12DA, 0x12D2, 0x12CB, 0x12C3, 0x12BC, + 0x12B4, 0x12AC, 0x129D, 0x1296, 0x128E, 0x1286, 0x127F, 0x1277, + 0x126F, 0x1268, 0x1260, 0x1250, 0x1249, 0x1241, 0x1239, 0x1231, + 0x1229, 0x1222, 0x121A, 0x1212, 0x120A, 0x11FA, 0x11F3, 0x11EB, + 0x11E3, 0x11DB, 0x11D3, 0x11CB, 0x11C3, 0x11BB, 0x11AB, 0x11A3, + 0x119B, 0x1193, 0x118B, 0x1183, 0x117B, 0x1173, 0x116B, 0x115A, + 0x1152, 0x114A, 0x1142, 0x113A, 0x1131, 0x1129, 0x1121, 0x1119, + 0x1111, 0x1100, 0x10F8, 0x10EF, 0x10E7, 0x10DF, 0x10D6, 0x10CE, + 0x10C6, 0x10BD, 0x10B5, 0x10A4, 0x109B, 0x1093, 0x108B, 0x1082, + 0x1079, 0x1071, 0x1068, 0x1060, 0x1057, 0x1046, 0x103D, 0x1035, + 0x102C, 0x1023, 0x101B, 0x1012, 0x1009, 0x1001, 0x0FF8, 0x0FEF, + 0x0FDD, 0x0FD5, 0x0FCC, 0x0FC3, 0x0FBA, 0x0FB1, 0x0FA8, 0x0F9F, + 0x0F96, 0x0F8D, 0x0F7B, 0x0F72, 0x0F69, 0x0F60, 0x0F57, 0x0F4E, + 0x0F45, 0x0F3C, 0x0F32, 0x0F29, 0x0F20, 0x0F0D, 0x0F04, 0x0EFB, + 0x0EF2, 0x0EE8, 0x0EDF, 0x0ED6, 0x0ECC, 0x0EC3, 0x0EB9, 0x0EB0, + 0x0E9D, 0x0E93, 0x0E8A, 0x0E80, 0x0E77, 0x0E6D, 0x0E63, 0x0E5A, + 0x0E50, 0x0E46, 0x0E3D, 0x0E33, 0x0E1F, 0x0E15, 0x0E0C, 0x0E02, + 0x0DF8, 0x0DEE, 0x0DE4, 0x0DDA, 0x0DD0, 0x0DC6, 0x0DBC, 0x0DB2, + 0x0D9D, 0x0D93, 0x0D89, 0x0D7F, 0x0D75, 0x0D6A, 0x0D60, 0x0D56, + 0x0D4B, 0x0D41, 0x0D36, 0x0D2C, 0x0D21, 0x0D0C, 0x0D02, 0x0CF7, + 0x0CED, 0x0CE2, 0x0CD7, 0x0CCC, 0x0CC2, 0x0CB7, 0x0CAC, 0x0CA1, + 0x0C96, 0x0C8B, 0x0C75, 0x0C6A, 0x0C5F, 0x0C54, 0x0C49, 0x0C3E, + 0x0C32, 0x0C27, 0x0C1C, 0x0C11, 0x0C05, 0x0BFA, 0x0BEE, 0x0BD7, + 0x0BCC, 0x12A0, 0x1299, 0x1298, 0x1289, 0x1282, 0x1281, 0x1279, + 0x1272, 0x1271, 0x126A, 0x1269, 0x1262, 0x125A, 0x125A, 0x1252, + 0x1252, 0x1242, 0x123B, 0x123A, 0x1233, 0x1232, 0x122B, 0x1223, + 0x1222, 0x121B, 0x121A, 0x1213, 0x120B, 0x1203, 0x11FB, 0x11FB, + 0x11F3, 0x11EB, 0x11EB, 0x11E3, 0x11E2, 0x11DB, 0x11D3, 0x11D2, + 0x11CB, 0x11CA, 0x11BB, 0x11BA, 0x11B2, 0x11AA, 0x11AA, 0x11A2, + 0x11A2, 0x119A, 0x1192, 0x1191, 0x1189, 0x1189, 0x1181, 0x1179, + 0x1171, 0x1169, 0x1168, 0x1160, 0x1160, 0x1158, 0x1158, 0x1150, + 0x1148, 0x1147, 0x113F, 0x113F, 0x1137, 0x112E, 0x1126, 0x1126, + 0x111E, 0x1116, 0x1115, 0x110D, 0x110D, 0x1104, 0x1104, 0x10FC, + 0x10FB, 0x10F3, 0x10F3, 0x10E3, 0x10DA, 0x10DA, 0x10D2, 0x10D1, + 0x10C9, 0x10C9, 0x10C0, 0x10C0, 0x10B8, 0x10B7, 0x10AF, 0x10AF, + 0x10A6, 0x109E, 0x1095, 0x108D, 0x108D, 0x1084, 0x1084, 0x107C, + 0x107B, 0x1073, 0x1072, 0x106A, 0x1069, 0x1061, 0x1061, 0x1058, + 0x1058, 0x1047, 0x1047, 0x103E, 0x103E, 0x1035, 0x1035, 0x102C, + 0x102C, 0x1023, 0x1023, 0x101A, 0x101A, 0x1011, 0x1011, 0x1008 +}; + +// note: returns 16.16 fixed-point +static inline u32 DIVIDE(s16 n, u16 d) { + if (n >= 0 && n < d * 2) { + u32 offset = d; + int shift = 0; + u64 reciprocal; + u32 r, s; + + while (offset <= 0x8000) { + offset <<= 1; + shift++; + } + + // Newton-Raphson interation - x0, x1, x2 + // (16.16 fixed-point) + r = initial_guess[offset & 0x7fff] | 0x10000; + + s = (u64)offset * r >> 16; + r = (u64)r * (0x20000 - s) >> 16; + + s = (u64)offset * r >> 16; + r = (u64)r * (0x20000 - s) >> 16; + + reciprocal = (u64)(r) << shift; + + return (u32)(((reciprocal * n) + 0x8000) >> 16); + } + + return 0xffffffff; +} + diff --git a/libpcsxcore/ix86/iGte.h b/libpcsxcore/ix86/iGte.h new file mode 100644 index 00000000..d03705ec --- /dev/null +++ b/libpcsxcore/ix86/iGte.h @@ -0,0 +1,79 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __IGTE_H__ +#define __IGTE_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "../r3000a.h" +#include "../psxmem.h" + +#define CP2_FUNC(f) \ +void gte##f(); \ +static void rec##f() { \ + iFlushRegs(); \ + MOV32ItoM((u32)&psxRegs.code, (u32)psxRegs.code); \ + CALLFunc ((u32)gte##f); \ +/* branch = 2; */\ +} + +#define CP2_FUNCNC(f) \ +void gte##f(); \ +static void rec##f() { \ + iFlushRegs(); \ + CALLFunc ((u32)gte##f); \ +/* branch = 2; */\ +} + +CP2_FUNC(MFC2); +CP2_FUNC(MTC2); +CP2_FUNC(CFC2); +CP2_FUNC(CTC2); +CP2_FUNC(LWC2); +CP2_FUNC(SWC2); +CP2_FUNCNC(RTPS); +CP2_FUNC(OP); +CP2_FUNCNC(NCLIP); +CP2_FUNC(DPCS); +CP2_FUNC(INTPL); +CP2_FUNC(MVMVA); +CP2_FUNCNC(NCDS); +CP2_FUNCNC(NCDT); +CP2_FUNCNC(CDP); +CP2_FUNCNC(NCCS); +CP2_FUNCNC(CC); +CP2_FUNCNC(NCS); +CP2_FUNCNC(NCT); +CP2_FUNC(SQR); +CP2_FUNC(DCPL); +CP2_FUNCNC(DPCT); +CP2_FUNCNC(AVSZ3); +CP2_FUNCNC(AVSZ4); +CP2_FUNCNC(RTPT); +CP2_FUNC(GPF); +CP2_FUNC(GPL); +CP2_FUNCNC(NCCT); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/ix86/iR3000A.c b/libpcsxcore/ix86/iR3000A.c new file mode 100644 index 00000000..9216a229 --- /dev/null +++ b/libpcsxcore/ix86/iR3000A.c @@ -0,0 +1,2899 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* i386 assembly functions for R3000A core. +*/ + +#include "ix86.h" +#include + +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + +u32 *psxRecLUT; + +#undef PC_REC +#undef PC_REC8 +#undef PC_REC16 +#undef PC_REC32 +#define PC_REC(x) (psxRecLUT[x >> 16] + (x & 0xffff)) +#define PC_REC8(x) (*(u8 *)PC_REC(x)) +#define PC_REC16(x) (*(u16*)PC_REC(x)) +#define PC_REC32(x) (*(u32*)PC_REC(x)) + +#define RECMEM_SIZE (8 * 1024 * 1024) + +static char *recMem; /* the recompiled blocks will be here */ +static char *recRAM; /* and the ptr to the blocks here */ +static char *recROM; /* and here */ + +static u32 pc; /* recompiler pc */ +static u32 pcold; /* recompiler oldpc */ +static int count; /* recompiler intruction count */ +static int branch; /* set for branch */ +static u32 target; /* branch target */ +static u32 resp; + +typedef struct { + int state; + u32 k; + int reg; +} iRegisters; + +static iRegisters iRegs[32]; +static iRegisters iRegsS[32]; + +#define ST_UNK 0 +#define ST_CONST 1 +#define ST_MAPPED 2 + +#define IsConst(reg) (iRegs[reg].state == ST_CONST) +#define IsMapped(reg) (iRegs[reg].state == ST_MAPPED) + +static void (*recBSC[64])(); +static void (*recSPC[64])(); +static void (*recREG[32])(); +static void (*recCP0[32])(); +static void (*recCP2[64])(); +static void (*recCP2BSC[32])(); + +static void MapConst(int reg, u32 _const) { + iRegs[reg].k = _const; + iRegs[reg].state = ST_CONST; +} + +static void iFlushReg(int reg) { + if (IsConst(reg)) { + MOV32ItoM((u32)&psxRegs.GPR.r[reg], iRegs[reg].k); + } + iRegs[reg].state = ST_UNK; +} + +static void iFlushRegs() { + int i; + + for (i=1; i<32; i++) { + iFlushReg(i); + } +} + +static void iRet() { + /* store cycle */ + count = ((pc - pcold) / 4) * BIAS; + ADD32ItoM((u32)&psxRegs.cycle, count); + if (resp) ADD32ItoR(ESP, resp); + RET(); +} + +static int iLoadTest() { + u32 tmp; + + // check for load delay + tmp = psxRegs.code >> 26; + switch (tmp) { + case 0x10: // COP0 + switch (_Rs_) { + case 0x00: // MFC0 + case 0x02: // CFC0 + return 1; + } + break; + case 0x12: // COP2 + switch (_Funct_) { + case 0x00: + switch (_Rs_) { + case 0x00: // MFC2 + case 0x02: // CFC2 + return 1; + } + break; + } + break; + case 0x32: // LWC2 + return 1; + default: + if (tmp >= 0x20 && tmp <= 0x26) { // LB/LH/LWL/LW/LBU/LHU/LWR + return 1; + } + break; + } + return 0; +} + +/* set a pending branch */ +static void SetBranch() { + branch = 1; + psxRegs.code = PSXMu32(pc); + pc += 4; + + if (iLoadTest() == 1) { + iFlushRegs(); + MOV32ItoM((u32)&psxRegs.code, psxRegs.code); + /* store cycle */ + count = ((pc - pcold) / 4) * BIAS; + ADD32ItoM((u32)&psxRegs.cycle, count); + if (resp) ADD32ItoR(ESP, resp); + + PUSH32M((u32)&target); + PUSH32I(_Rt_); + CALLFunc((u32)psxDelayTest); + ADD32ItoR(ESP, 2*4); + + RET(); + return; + } + + recBSC[psxRegs.code>>26](); + + iFlushRegs(); + MOV32MtoR(EAX, (u32)&target); + MOV32RtoM((u32)&psxRegs.pc, EAX); + CALLFunc((u32)psxBranchTest); + + iRet(); +} + +static void iJump(u32 branchPC) { + branch = 1; + psxRegs.code = PSXMu32(pc); + pc+=4; + + if (iLoadTest() == 1) { + iFlushRegs(); + MOV32ItoM((u32)&psxRegs.code, psxRegs.code); + /* store cycle */ + count = ((pc - pcold) / 4) * BIAS; + ADD32ItoM((u32)&psxRegs.cycle, count); + if (resp) ADD32ItoR(ESP, resp); + + PUSH32I(branchPC); + PUSH32I(_Rt_); + CALLFunc((u32)psxDelayTest); + ADD32ItoR(ESP, 2*4); + + RET(); + return; + } + + recBSC[psxRegs.code>>26](); + + iFlushRegs(); + MOV32ItoM((u32)&psxRegs.pc, branchPC); + CALLFunc((u32)psxBranchTest); + /* store cycle */ + count = ((pc - pcold) / 4) * BIAS; + ADD32ItoM((u32)&psxRegs.cycle, count); + if (resp) ADD32ItoR(ESP, resp); + + // maybe just happened an interruption, check so + CMP32ItoM((u32)&psxRegs.pc, branchPC); + j8Ptr[0] = JE8(0); + RET(); + + x86SetJ8(j8Ptr[0]); + MOV32MtoR(EAX, PC_REC(branchPC)); + TEST32RtoR(EAX, EAX); + j8Ptr[1] = JNE8(0); + RET(); + + x86SetJ8(j8Ptr[1]); + RET(); + JMP32R(EAX); +} + +static void iBranch(u32 branchPC, int savectx) { + u32 respold=0; + + if (savectx) { + respold = resp; + memcpy(iRegsS, iRegs, sizeof(iRegs)); + } + + branch = 1; + psxRegs.code = PSXMu32(pc); + + // the delay test is only made when the branch is taken + // savectx == 0 will mean that :) + if (savectx == 0 && iLoadTest() == 1) { + iFlushRegs(); + MOV32ItoM((u32)&psxRegs.code, psxRegs.code); + /* store cycle */ + count = (((pc+4) - pcold) / 4) * BIAS; + ADD32ItoM((u32)&psxRegs.cycle, count); + if (resp) ADD32ItoR(ESP, resp); + + PUSH32I(branchPC); + PUSH32I(_Rt_); + CALLFunc((u32)psxDelayTest); + ADD32ItoR(ESP, 2*4); + + RET(); + return; + } + + pc+= 4; + recBSC[psxRegs.code>>26](); + + iFlushRegs(); + MOV32ItoM((u32)&psxRegs.pc, branchPC); + CALLFunc((u32)psxBranchTest); + /* store cycle */ + count = ((pc - pcold) / 4) * BIAS; + ADD32ItoM((u32)&psxRegs.cycle, count); + if (resp) ADD32ItoR(ESP, resp); + + // maybe just happened an interruption, check so + CMP32ItoM((u32)&psxRegs.pc, branchPC); + j8Ptr[1] = JE8(0); + RET(); + + x86SetJ8(j8Ptr[1]); + MOV32MtoR(EAX, PC_REC(branchPC)); + TEST32RtoR(EAX, EAX); + j8Ptr[2] = JNE8(0); + RET(); + + x86SetJ8(j8Ptr[2]); + JMP32R(EAX); + + pc-= 4; + if (savectx) { + resp = respold; + memcpy(iRegs, iRegsS, sizeof(iRegs)); + } +} + + +char *txt0 = "EAX = %x : ECX = %x : EDX = %x\n"; +char *txt1 = "EAX = %x\n"; +char *txt2 = "M32 = %x\n"; + +void iLogX86() { + PUSHA32(); + + PUSH32R (EDX); + PUSH32R (ECX); + PUSH32R (EAX); + PUSH32M ((u32)&txt0); + CALLFunc ((u32)SysPrintf); + ADD32ItoR(ESP, 4*4); + + POPA32(); +} + +void iLogEAX() { + PUSH32R (EAX); + PUSH32M ((u32)&txt1); + CALLFunc ((u32)SysPrintf); + ADD32ItoR(ESP, 4*2); +} + +void iLogM32(u32 mem) { + PUSH32M (mem); + PUSH32M ((u32)&txt2); + CALLFunc ((u32)SysPrintf); + ADD32ItoR(ESP, 4*2); +} + +static void iDumpRegs() { + int i, j; + + printf("%x %x\n", psxRegs.pc, psxRegs.cycle); + for (i = 0; i < 4; i++) { + for (j = 0; j < 8; j++) + printf("%x ", psxRegs.GPR.r[j * i]); + printf("\n"); + } +} + +void iDumpBlock(char *ptr) { + FILE *f; + u32 i; + + SysPrintf("dump1 %x:%x, %x\n", psxRegs.pc, pc, psxRegs.cycle); + + for (i = psxRegs.pc; i < pc; i += 4) + SysPrintf("%s\n", disR3000AF(PSXMu32(i), i)); + + fflush(stdout); + f = fopen("dump1", "w"); + fwrite(ptr, 1, (u32)x86Ptr - (u32)ptr, f); + fclose(f); + system("ndisasmw -u dump1"); + fflush(stdout); +} + +#define REC_FUNC(f) \ +void psx##f(); \ +static void rec##f() { \ + iFlushRegs(); \ + MOV32ItoM((u32)&psxRegs.code, (u32)psxRegs.code); \ + MOV32ItoM((u32)&psxRegs.pc, (u32)pc); \ + CALLFunc((u32)psx##f); \ +/* branch = 2; */\ +} + +#define REC_SYS(f) \ +void psx##f(); \ +static void rec##f() { \ + iFlushRegs(); \ + MOV32ItoM((u32)&psxRegs.code, (u32)psxRegs.code); \ + MOV32ItoM((u32)&psxRegs.pc, (u32)pc); \ + CALLFunc((u32)psx##f); \ + branch = 2; \ + iRet(); \ +} + +#define REC_BRANCH(f) \ +void psx##f(); \ +static void rec##f() { \ + iFlushRegs(); \ + MOV32ItoM((u32)&psxRegs.code, (u32)psxRegs.code); \ + MOV32ItoM((u32)&psxRegs.pc, (u32)pc); \ + CALLFunc((u32)psx##f); \ + branch = 2; \ + iRet(); \ +} + +static void recRecompile(); + +static int recInit() { + int i; + + psxRecLUT = (u32 *)malloc(0x010000 * 4); + + recMem = mmap(0, RECMEM_SIZE + 0x1000, + PROT_EXEC | PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + + recRAM = (char *)malloc(0x200000); + recROM = (char *)malloc(0x080000); + if (recRAM == NULL || recROM == NULL || recMem == NULL || psxRecLUT == NULL) { + SysMessage("Error allocating memory"); return -1; + } + + for (i = 0; i < 0x80; i++) psxRecLUT[i + 0x0000] = (u32)&recRAM[(i & 0x1f) << 16]; + memcpy(psxRecLUT + 0x8000, psxRecLUT, 0x80 * 4); + memcpy(psxRecLUT + 0xa000, psxRecLUT, 0x80 * 4); + + for (i = 0; i < 0x08; i++) psxRecLUT[i + 0xbfc0] = (u32)&recROM[i << 16]; + + return 0; +} + +static void recReset() { + memset(recRAM, 0, 0x200000); + memset(recROM, 0, 0x080000); + + x86Init(); + + x86SetPtr(recMem); + + branch = 0; + memset(iRegs, 0, sizeof(iRegs)); + iRegs[0].state = ST_CONST; + iRegs[0].k = 0; +} + +static void recShutdown() { + if (recMem == NULL) return; + free(psxRecLUT); + munmap(recMem, RECMEM_SIZE + 0x1000); + free(recRAM); + free(recROM); + x86Shutdown(); +} + +static void recError() { + SysReset(); + ClosePlugins(); + SysMessage("Unrecoverable error while running recompiler\n"); + SysRunGui(); +} + +__inline static void execute() { + void (**recFunc)() = NULL; + char *p; + + p = (char *)PC_REC(psxRegs.pc); + if (p != NULL) recFunc = (void (**)()) (u32)p; + else { recError(); return; } + + if (*recFunc == 0) { + recRecompile(); + } + (*recFunc)(); +} + +static void recExecute() { + for (;;) execute(); +} + +static void recExecuteBlock() { + execute(); +} + +static void recClear(u32 Addr, u32 Size) { + memset((void*)PC_REC(Addr), 0, Size * 4); +} + +static void recNULL() { +// SysMessage("recUNK: %8.8x\n", psxRegs.code); +} + +/********************************************************* +* goes to opcodes tables... * +* Format: table[something....] * +*********************************************************/ + +//REC_SYS(SPECIAL); +static void recSPECIAL() { + recSPC[_Funct_](); +} + +static void recREGIMM() { + recREG[_Rt_](); +} + +static void recCOP0() { + recCP0[_Rs_](); +} + +//REC_SYS(COP2); +static void recCOP2() { + recCP2[_Funct_](); +} + +static void recBASIC() { + recCP2BSC[_Rs_](); +} + +//end of Tables opcodes... + +/********************************************************* +* Arithmetic with immediate operand * +* Format: OP rt, rs, immediate * +*********************************************************/ + +/*REC_FUNC(ADDI); +REC_FUNC(ADDIU); +REC_FUNC(ANDI); +REC_FUNC(ORI); +REC_FUNC(XORI); +REC_FUNC(SLTI); +REC_FUNC(SLTIU); +#if 0*/ +static void recADDIU() { +// Rt = Rs + Im + if (!_Rt_) return; + +// iFlushRegs(); + + if (_Rs_ == _Rt_) { + if (IsConst(_Rt_)) { + iRegs[_Rt_].k+= _Imm_; + } else { + if (_Imm_ == 1) { + INC32M((u32)&psxRegs.GPR.r[_Rt_]); + } else if (_Imm_ == -1) { + DEC32M((u32)&psxRegs.GPR.r[_Rt_]); + } else if (_Imm_) { + ADD32ItoM((u32)&psxRegs.GPR.r[_Rt_], _Imm_); + } + } + } else { + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k + _Imm_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_ == 1) { + INC32R(EAX); + } else if (_Imm_ == -1) { + DEC32R(EAX); + } else if (_Imm_) { + ADD32ItoR(EAX, _Imm_); + } + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } + } +} + +static void recADDI() { +// Rt = Rs + Im + recADDIU(); +} + +static void recSLTI() { +// Rt = Rs < Im (signed) + if (!_Rt_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + MapConst(_Rt_, (s32)iRegs[_Rs_].k < _Imm_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + CMP32ItoR(EAX, _Imm_); + SETL8R (EAX); + AND32ItoR(EAX, 0xff); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } +} + +static void recSLTIU() { +// Rt = Rs < Im (unsigned) + if (!_Rt_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k < _ImmU_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + CMP32ItoR(EAX, _Imm_); + SETB8R (EAX); + AND32ItoR(EAX, 0xff); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } +} + +static void recANDI() { +// Rt = Rs And Im + if (!_Rt_) return; + +// iFlushRegs(); + + if (_Rs_ == _Rt_) { + if (IsConst(_Rt_)) { + iRegs[_Rt_].k&= _ImmU_; + } else { + AND32ItoM((u32)&psxRegs.GPR.r[_Rt_], _ImmU_); + } + } else { + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k & _ImmU_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + AND32ItoR(EAX, _ImmU_); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } + } +} + +static void recORI() { +// Rt = Rs Or Im + if (!_Rt_) return; + +// iFlushRegs(); + + if (_Rs_ == _Rt_) { + if (IsConst(_Rt_)) { + iRegs[_Rt_].k|= _ImmU_; + } else { + OR32ItoM((u32)&psxRegs.GPR.r[_Rt_], _ImmU_); + } + } else { + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k | _ImmU_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_ImmU_) OR32ItoR (EAX, _ImmU_); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } + } +} + +static void recXORI() { +// Rt = Rs Xor Im + if (!_Rt_) return; + +// iFlushRegs(); + + if (_Rs_ == _Rt_) { + if (IsConst(_Rt_)) { + iRegs[_Rt_].k^= _ImmU_; + } else { + XOR32ItoM((u32)&psxRegs.GPR.r[_Rt_], _ImmU_); + } + } else { + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k ^ _ImmU_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + XOR32ItoR(EAX, _ImmU_); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } + } +} +//#endif +//end of * Arithmetic with immediate operand + +/********************************************************* +* Load higher 16 bits of the first word in GPR with imm * +* Format: OP rt, immediate * +*********************************************************/ +/*REC_FUNC(LUI); +#if 0*/ +static void recLUI() { +// Rt = Imm << 16 + if (!_Rt_) return; + + MapConst(_Rt_, psxRegs.code << 16); +} +//#endif +//End of Load Higher ..... + + +/********************************************************* +* Register arithmetic * +* Format: OP rd, rs, rt * +*********************************************************/ + +/*REC_FUNC(ADD); +REC_FUNC(ADDU); +REC_FUNC(SUB); +REC_FUNC(SUBU); +REC_FUNC(AND); +REC_FUNC(OR); +REC_FUNC(XOR); +REC_FUNC(NOR); +REC_FUNC(SLT); +REC_FUNC(SLTU); + +#if 0*/ +static void recADDU() { +// Rd = Rs + Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k + iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + if (_Rt_ == _Rd_) { + if (iRegs[_Rs_].k == 1) { + INC32M((u32)&psxRegs.GPR.r[_Rd_]); + } else if (iRegs[_Rs_].k == -1) { + DEC32M((u32)&psxRegs.GPR.r[_Rd_]); + } else if (iRegs[_Rs_].k) { + ADD32ItoM((u32)&psxRegs.GPR.r[_Rd_], iRegs[_Rs_].k); + } + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + if (iRegs[_Rs_].k == 1) { + INC32R(EAX); + } else if (iRegs[_Rs_].k == 0xffffffff) { + DEC32R(EAX); + } else if (iRegs[_Rs_].k) { + ADD32ItoR(EAX, iRegs[_Rs_].k); + } + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + if (_Rs_ == _Rd_) { + if (iRegs[_Rt_].k == 1) { + INC32M((u32)&psxRegs.GPR.r[_Rd_]); + } else if (iRegs[_Rt_].k == -1) { + DEC32M((u32)&psxRegs.GPR.r[_Rd_]); + } else if (iRegs[_Rt_].k) { + ADD32ItoM((u32)&psxRegs.GPR.r[_Rd_], iRegs[_Rt_].k); + } + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (iRegs[_Rt_].k == 1) { + INC32R(EAX); + } else if (iRegs[_Rt_].k == 0xffffffff) { + DEC32R(EAX); + } else if (iRegs[_Rt_].k) { + ADD32ItoR(EAX, iRegs[_Rt_].k); + } + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } + } else { + iRegs[_Rd_].state = ST_UNK; + + if (_Rs_ == _Rd_) { // Rd+= Rt + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + ADD32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else if (_Rt_ == _Rd_) { // Rd+= Rs + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + ADD32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else { // Rd = Rs + Rt + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + ADD32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } + } +} + +static void recADD() { +// Rd = Rs + Rt + recADDU(); +} + +static void recSUBU() { +// Rd = Rs - Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k - iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + SUB32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + SUB32ItoR(EAX, iRegs[_Rt_].k); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + SUB32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSUB() { +// Rd = Rs - Rt + recSUBU(); +} + +static void recAND() { +// Rd = Rs And Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k & iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + if (_Rd_ == _Rt_) { // Rd&= Rs + AND32ItoM((u32)&psxRegs.GPR.r[_Rd_], iRegs[_Rs_].k); + } else { + MOV32ItoR(EAX, iRegs[_Rs_].k); + AND32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + if (_Rd_ == _Rs_) { // Rd&= kRt + AND32ItoM((u32)&psxRegs.GPR.r[_Rd_], iRegs[_Rt_].k); + } else { // Rd = Rs & kRt + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + AND32ItoR(EAX, iRegs[_Rt_].k); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } + } else { + iRegs[_Rd_].state = ST_UNK; + + if (_Rs_ == _Rd_) { // Rd&= Rt + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + AND32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else if (_Rt_ == _Rd_) { // Rd&= Rs + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + AND32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else { // Rd = Rs & Rt + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + AND32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } + } +} + +static void recOR() { +// Rd = Rs Or Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k | iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + OR32MtoR (EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + OR32ItoR (EAX, iRegs[_Rt_].k); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + OR32MtoR (EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recXOR() { +// Rd = Rs Xor Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k ^ iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + XOR32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + XOR32ItoR(EAX, iRegs[_Rt_].k); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + XOR32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recNOR() { +// Rd = Rs Nor Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, ~(iRegs[_Rs_].k | iRegs[_Rt_].k)); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + OR32MtoR (EAX, (u32)&psxRegs.GPR.r[_Rt_]); + NOT32R (EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + OR32ItoR (EAX, iRegs[_Rt_].k); + NOT32R (EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + OR32MtoR (EAX, (u32)&psxRegs.GPR.r[_Rt_]); + NOT32R (EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSLT() { +// Rd = Rs < Rt (signed) + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, (s32)iRegs[_Rs_].k < (s32)iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + CMP32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + SETL8R (EAX); + AND32ItoR(EAX, 0xff); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + CMP32ItoR(EAX, iRegs[_Rt_].k); + SETL8R (EAX); + AND32ItoR(EAX, 0xff); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + CMP32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + SETL8R (EAX); + AND32ItoR(EAX, 0xff); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSLTU() { +// Rd = Rs < Rt (unsigned) + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k < iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + CMP32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + SBB32RtoR(EAX, EAX); + NEG32R (EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + CMP32ItoR(EAX, iRegs[_Rt_].k); + SBB32RtoR(EAX, EAX); + NEG32R (EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + CMP32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + SBB32RtoR(EAX, EAX); + NEG32R (EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} +//#endif +//End of * Register arithmetic + +/********************************************************* +* Register mult/div & Register trap logic * +* Format: OP rs, rt * +*********************************************************/ + +/*REC_FUNC(MULT); +REC_FUNC(MULTU); +REC_FUNC(DIV); +REC_FUNC(DIVU); +#if 0*/ +static void recMULT() { +// Lo/Hi = Rs * Rt (signed) + +// iFlushRegs(); + + if ((IsConst(_Rs_) && iRegs[_Rs_].k == 0) || + (IsConst(_Rt_) && iRegs[_Rt_].k == 0)) { + XOR32RtoR(EAX, EAX); + MOV32RtoM((u32)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((u32)&psxRegs.GPR.n.hi, EAX); + return; + } + + if (IsConst(_Rs_)) { + MOV32ItoR(EAX, iRegs[_Rs_].k);// printf("multrsk %x\n", iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + } + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k);// printf("multrtk %x\n", iRegs[_Rt_].k); + IMUL32R (EDX); + } else { + IMUL32M ((u32)&psxRegs.GPR.r[_Rt_]); + } + MOV32RtoM((u32)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((u32)&psxRegs.GPR.n.hi, EDX); +} + +static void recMULTU() { +// Lo/Hi = Rs * Rt (unsigned) + +// iFlushRegs(); + + if ((IsConst(_Rs_) && iRegs[_Rs_].k == 0) || + (IsConst(_Rt_) && iRegs[_Rt_].k == 0)) { + XOR32RtoR(EAX, EAX); + MOV32RtoM((u32)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((u32)&psxRegs.GPR.n.hi, EAX); + return; + } + + if (IsConst(_Rs_)) { + MOV32ItoR(EAX, iRegs[_Rs_].k);// printf("multursk %x\n", iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + } + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k);// printf("multurtk %x\n", iRegs[_Rt_].k); + MUL32R (EDX); + } else { + MUL32M ((u32)&psxRegs.GPR.r[_Rt_]); + } + MOV32RtoM((u32)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((u32)&psxRegs.GPR.n.hi, EDX); +} + +static void recDIV() { +// Lo/Hi = Rs / Rt (signed) + +// iFlushRegs(); + + if (IsConst(_Rt_)) { + if (iRegs[_Rt_].k == 0) return; + MOV32ItoR(ECX, iRegs[_Rt_].k);// printf("divrtk %x\n", iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rt_]); + CMP32ItoR(ECX, 0); + j8Ptr[0] = JE8(0); + } + if (IsConst(_Rs_)) { + MOV32ItoR(EAX, iRegs[_Rs_].k);// printf("divrsk %x\n", iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + } + CDQ(); + IDIV32R (ECX); + MOV32RtoM((u32)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((u32)&psxRegs.GPR.n.hi, EDX); + if (!IsConst(_Rt_)) { + x86SetJ8(j8Ptr[0]); + } +} + +static void recDIVU() { +// Lo/Hi = Rs / Rt (unsigned) + +// iFlushRegs(); + + if (IsConst(_Rt_)) { + if (iRegs[_Rt_].k == 0) return; + MOV32ItoR(ECX, iRegs[_Rt_].k);// printf("divurtk %x\n", iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rt_]); + CMP32ItoR(ECX, 0); + j8Ptr[0] = JE8(0); + } + if (IsConst(_Rs_)) { + MOV32ItoR(EAX, iRegs[_Rs_].k);// printf("divursk %x\n", iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + } + XOR32RtoR(EDX, EDX); + DIV32R (ECX); + MOV32RtoM((u32)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((u32)&psxRegs.GPR.n.hi, EDX); + if (!IsConst(_Rt_)) { + x86SetJ8(j8Ptr[0]); + } +} +//#endif +//End of * Register mult/div & Register trap logic + +/*REC_FUNC(LB); +REC_FUNC(LBU); +REC_FUNC(LH); +REC_FUNC(LHU); +REC_FUNC(LW); + +REC_FUNC(SB); +REC_FUNC(SH); +REC_FUNC(SW);*/ + +//REC_FUNC(LWL); +//REC_FUNC(LWR); +//REC_FUNC(SWL); +//REC_FUNC(SWR); + +/* Push OfB for Stores/Loads */ +static void iPushOfB() { + if (IsConst(_Rs_)) { + PUSH32I (iRegs[_Rs_].k + _Imm_); + } else { + if (_Imm_) { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + ADD32ItoR(EAX, _Imm_); + PUSH32R (EAX); + } else { + PUSH32M ((u32)&psxRegs.GPR.r[_Rs_]); + } + } +} + +//#if 0 +static void recLB() { +// Rt = mem[Rs + Im] (signed) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRs8(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVSX32M8toR(EAX, (u32)&psxM[addr & 0x1fffff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVSX32M8toR(EAX, (u32)&psxH[addr & 0xfff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } +// SysPrintf("unhandled r8 %x\n", addr); + } + + iPushOfB(); + CALLFunc((u32)psxMemRead8); + if (_Rt_) { + iRegs[_Rt_].state = ST_UNK; + MOVSX32R8toR(EAX, EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } +// ADD32ItoR(ESP, 4); + resp+= 4; +} + +static void recLBU() { +// Rt = mem[Rs + Im] (unsigned) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRu8(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVZX32M8toR(EAX, (u32)&psxM[addr & 0x1fffff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVZX32M8toR(EAX, (u32)&psxH[addr & 0xfff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } +// SysPrintf("unhandled r8u %x\n", addr); + } + + iPushOfB(); + CALLFunc((u32)psxMemRead8); + if (_Rt_) { + iRegs[_Rt_].state = ST_UNK; + MOVZX32R8toR(EAX, EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } +// ADD32ItoR(ESP, 4); + resp+= 4; +} + +static void recLH() { +// Rt = mem[Rs + Im] (signed) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRs16(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVSX32M16toR(EAX, (u32)&psxM[addr & 0x1fffff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVSX32M16toR(EAX, (u32)&psxH[addr & 0xfff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } +// SysPrintf("unhandled r16 %x\n", addr); + } + + iPushOfB(); + CALLFunc((u32)psxMemRead16); + if (_Rt_) { + iRegs[_Rt_].state = ST_UNK; + MOVSX32R16toR(EAX, EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } +// ADD32ItoR(ESP, 4); + resp+= 4; +} + +static void recLHU() { +// Rt = mem[Rs + Im] (unsigned) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRu16(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVZX32M16toR(EAX, (u32)&psxM[addr & 0x1fffff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVZX32M16toR(EAX, (u32)&psxH[addr & 0xfff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80) { + if (addr >= 0x1f801c00 && addr < 0x1f801e00) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + PUSH32I (addr); + CALL32M ((u32)&SPU_readRegister); + MOVZX32R16toR(EAX, EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); +#ifndef __WIN32__ + resp+= 4; +#endif + return; + } + switch (addr) { + case 0x1f801100: case 0x1f801110: case 0x1f801120: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + PUSH32I((addr >> 4) & 0x3); + CALLFunc((u32)psxRcntRcount); + MOVZX32R16toR(EAX, EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + resp+= 4; + return; + + case 0x1f801104: case 0x1f801114: case 0x1f801124: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + PUSH32I((addr >> 4) & 0x3); + CALLFunc((u32)psxRcntRmode); + MOVZX32R16toR(EAX, EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + resp+= 4; + return; + + case 0x1f801108: case 0x1f801118: case 0x1f801128: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + PUSH32I((addr >> 4) & 0x3); + CALLFunc((u32)psxRcntRtarget); + MOVZX32R16toR(EAX, EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + resp+= 4; + return; + } + } +// SysPrintf("unhandled r16u %x\n", addr); + } + + iPushOfB(); + CALLFunc((u32)psxMemRead16); + if (_Rt_) { + iRegs[_Rt_].state = ST_UNK; + MOVZX32R16toR(EAX, EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } +// ADD32ItoR(ESP, 4); + resp+= 4; +} + +static void recLW() { +// Rt = mem[Rs + Im] (unsigned) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRu32(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxM[addr & 0x1fffff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxH[addr & 0xfff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80) { + switch (addr) { + case 0x1f801080: case 0x1f801084: case 0x1f801088: + case 0x1f801090: case 0x1f801094: case 0x1f801098: + case 0x1f8010a0: case 0x1f8010a4: case 0x1f8010a8: + case 0x1f8010b0: case 0x1f8010b4: case 0x1f8010b8: + case 0x1f8010c0: case 0x1f8010c4: case 0x1f8010c8: + case 0x1f8010d0: case 0x1f8010d4: case 0x1f8010d8: + case 0x1f8010e0: case 0x1f8010e4: case 0x1f8010e8: + case 0x1f801070: case 0x1f801074: + case 0x1f8010f0: case 0x1f8010f4: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxH[addr & 0xffff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + + case 0x1f801810: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + CALL32M((u32)&GPU_readData); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + + case 0x1f801814: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + CALL32M((u32)&GPU_readStatus); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + } +// SysPrintf("unhandled r32 %x\n", addr); + } + + iPushOfB(); + CALLFunc((u32)psxMemRead32); + if (_Rt_) { + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } +// ADD32ItoR(ESP, 4); + resp+= 4; +} + +extern u32 LWL_MASK[4]; +extern u32 LWL_SHIFT[4]; + +void iLWLk(u32 shift) { + if (IsConst(_Rt_)) { + MOV32ItoR(ECX, iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rt_]); + } + AND32ItoR(ECX, LWL_MASK[shift]); + SHL32ItoR(EAX, LWL_SHIFT[shift]); + OR32RtoR (EAX, ECX); +} + +void recLWL() { +// Rt = Rt Merge mem[Rs + Im] + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (u32)&psxM[addr & 0x1ffffc]); + iLWLk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (u32)&psxH[addr & 0xffc]); + iLWLk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + } + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + PUSH32R (EAX); + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + CALLFunc((u32)psxMemRead32); + + if (_Rt_) { + ADD32ItoR(ESP, 4); + POP32R (EDX); + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV32ItoR(ECX, (u32)LWL_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + SHL32CLtoR(EAX); // mem(EAX) << LWL_SHIFT[shift] + + MOV32ItoR(ECX, (u32)LWL_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (u32)&psxRegs.GPR.r[_Rt_]); + } + AND32RtoR(EDX, ECX); // _rRt_ & LWL_MASK[shift] + + OR32RtoR(EAX, EDX); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } else { +// ADD32ItoR(ESP, 8); + resp+= 8; + } +} + +static void recLWBlock(int count) { + u32 *code = (u32 *)PSXM(pc); + int i, respsave; +// Rt = mem[Rs + Im] (unsigned) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + // since bios is readonly it won't change + for (i = 0; i < count; i++, code++, addr += 4) { + if (_fRt_(*code)) { + MapConst(_fRt_(*code), psxRu32(addr)); + } + } + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + for (i = 0; i < count; i++, code++, addr += 4) { + if (!_fRt_(*code)) + return; + iRegs[_fRt_(*code)].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxM[addr & 0x1fffff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_fRt_(*code)], EAX); + } + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + for (i = 0; i < count; i++, code++, addr += 4) { + if (!_fRt_(*code)) + return; + iRegs[_fRt_(*code)].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxH[addr & 0xfff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_fRt_(*code)], EAX); + } + return; + } + } + + SysPrintf("recLWBlock %d: %d\n", count, IsConst(_Rs_)); + iPushOfB(); + CALLFunc((u32)psxMemPointer); +// ADD32ItoR(ESP, 4); + resp += 4; + + respsave = resp; resp = 0; + TEST32RtoR(EAX, EAX); + j32Ptr[4] = JZ32(0); + XOR32RtoR(ECX, ECX); + for (i = 0; i < count; i++, code++) { + if (_fRt_(*code)) { + iRegs[_fRt_(*code)].state = ST_UNK; + + MOV32RmStoR(EDX, EAX, ECX, 2); + MOV32RtoM((u32)&psxRegs.GPR.r[_fRt_(*code)], EDX); + } + if (i != (count - 1)) + INC32R(ECX); + } + j32Ptr[5] = JMP32(0); + x86SetJ32(j32Ptr[4]); + for (i = 0, code = (u32 *)PSXM(pc); i < count; i++, code++) { + psxRegs.code = *code; + recLW(); + } + ADD32ItoR(ESP, resp); + x86SetJ32(j32Ptr[5]); + resp = respsave; +} + +extern u32 LWR_MASK[4]; +extern u32 LWR_SHIFT[4]; + +void iLWRk(u32 shift) { + if (IsConst(_Rt_)) { + MOV32ItoR(ECX, iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rt_]); + } + AND32ItoR(ECX, LWR_MASK[shift]); + SHR32ItoR(EAX, LWR_SHIFT[shift]); + OR32RtoR(EAX, ECX); +} + +void recLWR() { +// Rt = Rt Merge mem[Rs + Im] + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (u32)&psxM[addr & 0x1ffffc]); + iLWRk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (u32)&psxH[addr & 0xffc]); + iLWRk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + } + + if (IsConst(_Rs_)) + MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + PUSH32R (EAX); + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + CALLFunc((u32)psxMemRead32); + + if (_Rt_) { + ADD32ItoR(ESP, 4); + POP32R (EDX); + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV32ItoR(ECX, (u32)LWR_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + SHR32CLtoR(EAX); // mem(EAX) >> LWR_SHIFT[shift] + + MOV32ItoR(ECX, (u32)LWR_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (u32)&psxRegs.GPR.r[_Rt_]); + } + AND32RtoR(EDX, ECX); // _rRt_ & LWR_MASK[shift] + + OR32RtoR(EAX, EDX); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } else { +// ADD32ItoR(ESP, 8); + resp+= 8; + } +} + +static void recSB() { +// mem[Rs + Im] = Rt + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (IsConst(_Rt_)) { + MOV8ItoM((u32)&psxM[addr & 0x1fffff], (u8)iRegs[_Rt_].k); + } else { + MOV8MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV8RtoM((u32)&psxM[addr & 0x1fffff], EAX); + } + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (IsConst(_Rt_)) { + MOV8ItoM((u32)&psxH[addr & 0xfff], (u8)iRegs[_Rt_].k); + } else { + MOV8MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV8RtoM((u32)&psxH[addr & 0xfff], EAX); + } + return; + } +// SysPrintf("unhandled w8 %x\n", addr); + } + + if (IsConst(_Rt_)) { + PUSH32I (iRegs[_Rt_].k); + } else { + PUSH32M ((u32)&psxRegs.GPR.r[_Rt_]); + } + iPushOfB(); + CALLFunc((u32)psxMemWrite8); +// ADD32ItoR(ESP, 8); + resp+= 8; +} + +static void recSH() { +// mem[Rs + Im] = Rt + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (IsConst(_Rt_)) { + MOV16ItoM((u32)&psxM[addr & 0x1fffff], (u16)iRegs[_Rt_].k); + } else { + MOV16MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV16RtoM((u32)&psxM[addr & 0x1fffff], EAX); + } + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (IsConst(_Rt_)) { + MOV16ItoM((u32)&psxH[addr & 0xfff], (u16)iRegs[_Rt_].k); + } else { + MOV16MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV16RtoM((u32)&psxH[addr & 0xfff], EAX); + } + return; + } + if (t == 0x1f80) { + if (addr >= 0x1f801c00 && addr < 0x1f801e00) { + if (IsConst(_Rt_)) { + PUSH32I(iRegs[_Rt_].k); + } else { + PUSH32M((u32)&psxRegs.GPR.r[_Rt_]); + } + PUSH32I (addr); + CALL32M ((u32)&SPU_writeRegister); +#ifndef __WIN32__ + resp+= 8; +#endif + return; + } + } +// SysPrintf("unhandled w16 %x\n", addr); + } + + if (IsConst(_Rt_)) { + PUSH32I (iRegs[_Rt_].k); + } else { + PUSH32M ((u32)&psxRegs.GPR.r[_Rt_]); + } + iPushOfB(); + CALLFunc((u32)psxMemWrite16); +// ADD32ItoR(ESP, 8); + resp+= 8; +} + +static void recSW() { +// mem[Rs + Im] = Rt + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (IsConst(_Rt_)) { + MOV32ItoM((u32)&psxM[addr & 0x1fffff], iRegs[_Rt_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxM[addr & 0x1fffff], EAX); + } + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (IsConst(_Rt_)) { + MOV32ItoM((u32)&psxH[addr & 0xfff], iRegs[_Rt_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxH[addr & 0xfff], EAX); + } + return; + } + if (t == 0x1f80) { + switch (addr) { + case 0x1f801080: case 0x1f801084: + case 0x1f801090: case 0x1f801094: + case 0x1f8010a0: case 0x1f8010a4: + case 0x1f8010b0: case 0x1f8010b4: + case 0x1f8010c0: case 0x1f8010c4: + case 0x1f8010d0: case 0x1f8010d4: + case 0x1f8010e0: case 0x1f8010e4: + case 0x1f801074: + case 0x1f8010f0: + if (IsConst(_Rt_)) { + MOV32ItoM((u32)&psxH[addr & 0xffff], iRegs[_Rt_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((u32)&psxH[addr & 0xffff], EAX); + } + return; + + case 0x1f801810: + if (IsConst(_Rt_)) { + PUSH32I(iRegs[_Rt_].k); + } else { + PUSH32M((u32)&psxRegs.GPR.r[_Rt_]); + } + CALL32M((u32)&GPU_writeData); +#ifndef __WIN32__ + resp+= 4; +#endif + return; + + case 0x1f801814: + if (IsConst(_Rt_)) { + PUSH32I(iRegs[_Rt_].k); + } else { + PUSH32M((u32)&psxRegs.GPR.r[_Rt_]); + } + CALL32M((u32)&GPU_writeStatus); +#ifndef __WIN32__ + resp+= 4; +#endif + } + } +// SysPrintf("unhandled w32 %x\n", addr); + } + + if (IsConst(_Rt_)) { + PUSH32I (iRegs[_Rt_].k); + } else { + PUSH32M ((u32)&psxRegs.GPR.r[_Rt_]); + } + iPushOfB(); + CALLFunc((u32)psxMemWrite32); +// ADD32ItoR(ESP, 8); + resp+= 8; +} +//#endif + +static void recSWBlock(int count) { + u32 *code; + int i, respsave; +// mem[Rs + Im] = Rt + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + code = (u32 *)PSXM(pc); + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + for (i = 0; i < count; i++, code++, addr += 4) { + if (IsConst(_fRt_(*code))) { + MOV32ItoM((u32)&psxM[addr & 0x1fffff], iRegs[_fRt_(*code)].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_fRt_(*code)]); + MOV32RtoM((u32)&psxM[addr & 0x1fffff], EAX); + } + } + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + for (i = 0; i < count; i++, code++, addr += 4) { + if (!_fRt_(*code)) + return; + iRegs[_fRt_(*code)].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxH[addr & 0xfff]); + MOV32RtoM((u32)&psxRegs.GPR.r[_fRt_(*code)], EAX); + } + return; + } + } + + SysPrintf("recSWBlock %d: %d\n", count, IsConst(_Rs_)); + iPushOfB(); + CALLFunc((u32)psxMemPointer); +// ADD32ItoR(ESP, 4); + resp += 4; + + respsave = resp; + resp = 0; + TEST32RtoR(EAX, EAX); + j32Ptr[4] = JZ32(0); + XOR32RtoR(ECX, ECX); + for (i = 0, code = (u32 *)PSXM(pc); i < count; i++, code++) { + if (IsConst(_fRt_(*code))) { + MOV32ItoR(EDX, iRegs[_fRt_(*code)].k); + } else { + MOV32MtoR(EDX, (u32)&psxRegs.GPR.r[_fRt_(*code)]); + } + MOV32RtoRmS(EAX, ECX, 2, EDX); + if (i != (count - 1)) + INC32R(ECX); + } + j32Ptr[5] = JMP32(0); + x86SetJ32(j32Ptr[4]); + for (i = 0, code = (u32 *)PSXM(pc); i < count; i++, code++) { + psxRegs.code = *code; + recSW(); + } + ADD32ItoR(ESP, resp); + x86SetJ32(j32Ptr[5]); + resp = respsave; +} + +extern u32 SWL_MASK[4]; +extern u32 SWL_SHIFT[4]; + +void iSWLk(u32 shift) { + if (IsConst(_Rt_)) { + MOV32ItoR(ECX, iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rt_]); + } + SHR32ItoR(ECX, SWL_SHIFT[shift]); + AND32ItoR(EAX, SWL_MASK[shift]); + OR32RtoR (EAX, ECX); +} + +void recSWL() { +// mem[Rs + Im] = Rt Merge mem[Rs + Im] + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (u32)&psxM[addr & 0x1ffffc]); + iSWLk(addr & 3); + MOV32RtoM((u32)&psxM[addr & 0x1ffffc], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (u32)&psxH[addr & 0xffc]); + iSWLk(addr & 3); + MOV32RtoM((u32)&psxH[addr & 0xffc], EAX); + return; + } + } + + if (IsConst(_Rs_)) { + MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + PUSH32R (EAX); + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + + CALLFunc((u32)psxMemRead32); + + ADD32ItoR(ESP, 4); + POP32R (EDX); + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV32ItoR(ECX, (u32)SWL_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + AND32RtoR(EAX, ECX); // mem & SWL_MASK[shift] + + MOV32ItoR(ECX, (u32)SWL_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (u32)&psxRegs.GPR.r[_Rt_]); + } + SHR32CLtoR(EDX); // _rRt_ >> SWL_SHIFT[shift] + + OR32RtoR (EAX, EDX); + PUSH32R (EAX); + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + + CALLFunc((u32)psxMemWrite32); +// ADD32ItoR(ESP, 8); + resp+= 8; +} + +extern u32 SWR_MASK[4]; +extern u32 SWR_SHIFT[4]; + +void iSWRk(u32 shift) { + if (IsConst(_Rt_)) { + MOV32ItoR(ECX, iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rt_]); + } + SHL32ItoR(ECX, SWR_SHIFT[shift]); + AND32ItoR(EAX, SWR_MASK[shift]); + OR32RtoR (EAX, ECX); +} + +void recSWR() { +// mem[Rs + Im] = Rt Merge mem[Rs + Im] + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (u32)&psxM[addr & 0x1ffffc]); + iSWRk(addr & 3); + MOV32RtoM((u32)&psxM[addr & 0x1ffffc], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (u32)&psxH[addr & 0xffc]); + iSWRk(addr & 3); + MOV32RtoM((u32)&psxH[addr & 0xffc], EAX); + return; + } + } + + if (IsConst(_Rs_)) { + MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + PUSH32R (EAX); + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + + CALLFunc((u32)psxMemRead32); + + ADD32ItoR(ESP, 4); + POP32R (EDX); + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV32ItoR(ECX, (u32)SWR_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + AND32RtoR(EAX, ECX); // mem & SWR_MASK[shift] + + MOV32ItoR(ECX, (u32)SWR_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (u32)&psxRegs.GPR.r[_Rt_]); + } + SHL32CLtoR(EDX); // _rRt_ << SWR_SHIFT[shift] + + OR32RtoR (EAX, EDX); + PUSH32R (EAX); + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + + CALLFunc((u32)psxMemWrite32); +// ADD32ItoR(ESP, 8); + resp += 8; +} + +/*REC_FUNC(SLL); +REC_FUNC(SRL); +REC_FUNC(SRA); +#if 0*/ +static void recSLL() { +// Rd = Rt << Sa + if (!_Rd_) + return; + +// iFlushRegs(); + + if (IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rt_].k << _Sa_); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + if (_Sa_) SHL32ItoR(EAX, _Sa_); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSRL() { +// Rd = Rt >> Sa + if (!_Rd_) + return; + +// iFlushRegs(); + + if (IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rt_].k >> _Sa_); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + if (_Sa_) SHR32ItoR(EAX, _Sa_); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSRA() { +// Rd = Rt >> Sa + if (!_Rd_) + return; + +// iFlushRegs(); + + if (IsConst(_Rt_)) { + MapConst(_Rd_, (s32)iRegs[_Rt_].k >> _Sa_); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + if (_Sa_) SAR32ItoR(EAX, _Sa_); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} +//#endif + +/*REC_FUNC(SLLV); +REC_FUNC(SRLV); +REC_FUNC(SRAV); +#if 0*/ +static void recSLLV() { +// Rd = Rt << Rs + if (!_Rd_) + return; + +// iFlushRegs(); + + if (IsConst(_Rt_) && IsConst(_Rs_)) { + MapConst(_Rd_, iRegs[_Rt_].k << iRegs[_Rs_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32ItoR(ECX, iRegs[_Rs_].k); + SHL32CLtoR(EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rt_].k); + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rs_]); + SHL32CLtoR(EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rs_]); + SHL32CLtoR(EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSRLV() { +// Rd = Rt >> Rs + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rt_) && IsConst(_Rs_)) { + MapConst(_Rd_, iRegs[_Rt_].k >> iRegs[_Rs_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32ItoR(ECX, iRegs[_Rs_].k); + SHR32CLtoR(EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rt_].k); + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rs_]); + SHR32CLtoR(EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rs_]); + SHR32CLtoR(EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSRAV() { +// Rd = Rt >> Rs + if (!_Rd_) + return; + +// iFlushRegs(); + + if (IsConst(_Rt_) && IsConst(_Rs_)) { + MapConst(_Rd_, (s32)iRegs[_Rt_].k >> iRegs[_Rs_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32ItoR(ECX, iRegs[_Rs_].k); + SAR32CLtoR(EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rt_].k); + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rs_]); + SAR32CLtoR(EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rs_]); + SAR32CLtoR(EAX); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); + } +} +//#endif + +/*REC_SYS(SYSCALL); +REC_SYS(BREAK); + +#if 0*/ +int dump; +static void recSYSCALL() { +// dump = 1; + iFlushRegs(); + + MOV32ItoR(EAX, pc - 4); + MOV32RtoM((u32)&psxRegs.pc, EAX); + PUSH32I (branch == 1 ? 1 : 0); + PUSH32I (0x20); + CALLFunc ((u32)psxException); + ADD32ItoR(ESP, 8); + + branch = 2; + iRet(); +} + +static void recBREAK() { +} +//#endif + +/*REC_FUNC(MFHI); +REC_FUNC(MTHI); +REC_FUNC(MFLO); +REC_FUNC(MTLO); +#if 0*/ +static void recMFHI() { +// Rd = Hi + if (!_Rd_) + return; + + iRegs[_Rd_].state = ST_UNK; + MOV32MtoR(EAX, (u32)&psxRegs.GPR.n.hi); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); +} + +static void recMTHI() { +// Hi = Rs + + if (IsConst(_Rs_)) { + MOV32ItoM((u32)&psxRegs.GPR.n.hi, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((u32)&psxRegs.GPR.n.hi, EAX); + } +} + +static void recMFLO() { +// Rd = Lo + if (!_Rd_) + return; + + iRegs[_Rd_].state = ST_UNK; + MOV32MtoR(EAX, (u32)&psxRegs.GPR.n.lo); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rd_], EAX); +} + +static void recMTLO() { +// Lo = Rs + + if (IsConst(_Rs_)) { + MOV32ItoM((u32)&psxRegs.GPR.n.lo, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((u32)&psxRegs.GPR.n.lo, EAX); + } +} +//#endif + +/*REC_BRANCH(J); +REC_BRANCH(JR); +REC_BRANCH(JAL); +REC_BRANCH(JALR); +REC_BRANCH(BLTZ); +REC_BRANCH(BGTZ); +REC_BRANCH(BLTZAL); +REC_BRANCH(BGEZAL); +REC_BRANCH(BNE); +REC_BRANCH(BEQ); +REC_BRANCH(BLEZ); +REC_BRANCH(BGEZ);*/ + +//#if 0 +static void recBLTZ() { +// Branch if Rs < 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + + if (bpc == pc+4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k < 0) { + iJump(bpc); + return; + } else { + iJump(pc + 4); + return; + } + } + + CMP32ItoM((u32)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JL32(0); + + iBranch(pc+4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc += 4; +} + +static void recBGTZ() { +// Branch if Rs > 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc + 4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k > 0) { + iJump(bpc); + return; + } else { + iJump(pc + 4); + return; + } + } + + CMP32ItoM((u32)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JG32(0); + + iBranch(pc + 4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc+=4; +} + +static void recBLTZAL() { +// Branch if Rs < 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc + 4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k < 0) { + MOV32ItoM((u32)&psxRegs.GPR.r[31], pc + 4); + iJump(bpc); return; + } else { + iJump(pc + 4); return; + } + } + + CMP32ItoM((u32)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JL32(0); + + iBranch(pc + 4, 1); + + x86SetJ32(j32Ptr[4]); + + MOV32ItoM((u32)&psxRegs.GPR.r[31], pc + 4); + iBranch(bpc, 0); + pc += 4; +} + +static void recBGEZAL() { +// Branch if Rs >= 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc + 4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k >= 0) { + MOV32ItoM((u32)&psxRegs.GPR.r[31], pc + 4); + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMP32ItoM((u32)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JGE32(0); + + iBranch(pc+4, 1); + + x86SetJ32(j32Ptr[4]); + + MOV32ItoM((u32)&psxRegs.GPR.r[31], pc + 4); + iBranch(bpc, 0); + pc+=4; +} + +static void recJ() { +// j target + + iJump(_Target_ * 4 + (pc & 0xf0000000)); +} + +static void recJAL() { +// jal target + + MapConst(31, pc + 4); + + iJump(_Target_ * 4 + (pc & 0xf0000000)); +} + +static void recJR() { +// jr Rs + + if (IsConst(_Rs_)) { + MOV32ItoM((u32)&target, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((u32)&target, EAX); + } + + SetBranch(); +} + +static void recJALR() { +// jalr Rs + + if (IsConst(_Rs_)) { + MOV32ItoM((u32)&target, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((u32)&target, EAX); + } + + if (_Rd_) { + MapConst(_Rd_, pc + 4); + } + + SetBranch(); +} + +static void recBEQ() { +// Branch if Rs == Rt + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc + 4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (_Rs_ == _Rt_) { + iJump(bpc); + } else { + if (IsConst(_Rs_) && IsConst(_Rt_)) { + if (iRegs[_Rs_].k == iRegs[_Rt_].k) { + iJump(bpc); + return; + } else { + iJump(pc + 4); + return; + } + } else if (IsConst(_Rs_)) { + CMP32ItoM((u32)&psxRegs.GPR.r[_Rt_], iRegs[_Rs_].k); + } else if (IsConst(_Rt_)) { + CMP32ItoM((u32)&psxRegs.GPR.r[_Rs_], iRegs[_Rt_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + CMP32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + } + + j32Ptr[4] = JE32(0); + + iBranch(pc + 4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc += 4; + } +} + +static void recBNE() { +// Branch if Rs != Rt + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc + 4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + if (iRegs[_Rs_].k != iRegs[_Rt_].k) { + iJump(bpc); + return; + } else { + iJump(pc + 4); + return; + } + } else if (IsConst(_Rs_)) { + CMP32ItoM((u32)&psxRegs.GPR.r[_Rt_], iRegs[_Rs_].k); + } else if (IsConst(_Rt_)) { + CMP32ItoM((u32)&psxRegs.GPR.r[_Rs_], iRegs[_Rt_].k); + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + CMP32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + } + j32Ptr[4] = JNE32(0); + + iBranch(pc + 4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc += 4; +} + +static void recBLEZ() { +// Branch if Rs <= 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc + 4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k <= 0) { + iJump(bpc); + return; + } else { + iJump(pc + 4); + return; + } + } + + CMP32ItoM((u32)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JLE32(0); + + iBranch(pc + 4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc += 4; +} + +static void recBGEZ() { +// Branch if Rs >= 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc + 4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k >= 0) { + iJump(bpc); + return; + } else { + iJump(pc + 4); + return; + } + } + + CMP32ItoM((u32)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JGE32(0); + + iBranch(pc + 4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc += 4; +} +//#endif + +/*REC_FUNC(MFC0); +REC_SYS(MTC0); +REC_FUNC(CFC0); +REC_SYS(CTC0); +REC_FUNC(RFE); +#if 0*/ +static void recMFC0() { +// Rt = Cop0->Rd + if (!_Rt_) return; + + iRegs[_Rt_].state = ST_UNK; + MOV32MtoR(EAX, (u32)&psxRegs.CP0.r[_Rd_]); + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); +} + +static void recCFC0() { +// Rt = Cop0->Rd + + recMFC0(); +} + +void psxMTC0(); +static void recMTC0() { +// Cop0->Rd = Rt + + if (IsConst(_Rt_)) { + switch (_Rd_) { + case 12: + MOV32ItoM((u32)&psxRegs.CP0.r[_Rd_], iRegs[_Rt_].k); + break; + case 13: + MOV32ItoM((u32)&psxRegs.CP0.r[_Rd_], iRegs[_Rt_].k & ~(0xfc00)); + break; + default: + MOV32ItoM((u32)&psxRegs.CP0.r[_Rd_], iRegs[_Rt_].k); + break; + } + } else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + switch (_Rd_) { + case 13: + AND32ItoR(EAX, ~(0xfc00)); + break; + } + MOV32RtoM((u32)&psxRegs.CP0.r[_Rd_], EAX); + } + + if (_Rd_ == 12 || _Rd_ == 13) { + iFlushRegs(); + MOV32ItoM((u32)&psxRegs.pc, (u32)pc); + CALLFunc((u32)psxTestSWInts); + if (branch == 0) { + branch = 2; + iRet(); + } + } +} + +static void recCTC0() { +// Cop0->Rd = Rt + + recMTC0(); +} + +static void recRFE() { + MOV32MtoR(EAX, (u32)&psxRegs.CP0.n.Status); + MOV32RtoR(ECX, EAX); + AND32ItoR(EAX, 0xfffffff0); + AND32ItoR(ECX, 0x3c); + SHR32ItoR(ECX, 2); + OR32RtoR (EAX, ECX); + MOV32RtoM((u32)&psxRegs.CP0.n.Status, EAX); + + iFlushRegs(); + MOV32ItoM((u32)&psxRegs.pc, (u32)pc); + CALLFunc((u32)psxTestSWInts); + if (branch == 0) { + branch = 2; + iRet(); + } +} +//#endif + +#include "iGte.h" + +// + +static void recHLE() { + iFlushRegs(); + + MOV32ItoR(EAX, (u32)psxHLEt[psxRegs.code & 0xffff]); + CALL32R(EAX); + branch = 2; + iRet(); +} + +// + +static void (*recBSC[64])() = { + recSPECIAL, recREGIMM, recJ , recJAL , recBEQ , recBNE , recBLEZ, recBGTZ, + recADDI , recADDIU , recSLTI, recSLTIU, recANDI, recORI , recXORI, recLUI , + recCOP0 , recNULL , recCOP2, recNULL , recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recNULL, recNULL , recNULL, recNULL, recNULL, recNULL, + recLB , recLH , recLWL , recLW , recLBU , recLHU , recLWR , recNULL, + recSB , recSH , recSWL , recSW , recNULL, recNULL, recSWR , recNULL, + recNULL , recNULL , recLWC2, recNULL , recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recSWC2, recHLE , recNULL, recNULL, recNULL, recNULL +}; + +static void (*recSPC[64])() = { + recSLL , recNULL, recSRL , recSRA , recSLLV , recNULL , recSRLV, recSRAV, + recJR , recJALR, recNULL, recNULL, recSYSCALL, recBREAK, recNULL, recNULL, + recMFHI, recMTHI, recMFLO, recMTLO, recNULL , recNULL , recNULL, recNULL, + recMULT, recMULTU, recDIV, recDIVU, recNULL , recNULL , recNULL, recNULL, + recADD , recADDU, recSUB , recSUBU, recAND , recOR , recXOR , recNOR , + recNULL, recNULL, recSLT , recSLTU, recNULL , recNULL , recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL , recNULL , recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL , recNULL , recNULL, recNULL +}; + +static void (*recREG[32])() = { + recBLTZ , recBGEZ , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recBLTZAL, recBGEZAL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL +}; + +static void (*recCP0[32])() = { + recMFC0, recNULL, recCFC0, recNULL, recMTC0, recNULL, recCTC0, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recRFE , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL +}; + +static void (*recCP2[64])() = { + recBASIC, recRTPS , recNULL , recNULL, recNULL, recNULL , recNCLIP, recNULL, // 00 + recNULL , recNULL , recNULL , recNULL, recOP , recNULL , recNULL , recNULL, // 08 + recDPCS , recINTPL, recMVMVA, recNCDS, recCDP , recNULL , recNCDT , recNULL, // 10 + recNULL , recNULL , recNULL , recNCCS, recCC , recNULL , recNCS , recNULL, // 18 + recNCT , recNULL , recNULL , recNULL, recNULL, recNULL , recNULL , recNULL, // 20 + recSQR , recDCPL , recDPCT , recNULL, recNULL, recAVSZ3, recAVSZ4, recNULL, // 28 + recRTPT , recNULL , recNULL , recNULL, recNULL, recNULL , recNULL , recNULL, // 30 + recNULL , recNULL , recNULL , recNULL, recNULL, recGPF , recGPL , recNCCT // 38 +}; + +static void (*recCP2BSC[32])() = { + recMFC2, recNULL, recCFC2, recNULL, recMTC2, recNULL, recCTC2, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL +}; + +static void recRecompile() { + char *p; + char *ptr; + + dump = 0; + resp = 0; + + /* if x86Ptr reached the mem limit reset whole mem */ + if (((u32)x86Ptr - (u32)recMem) >= (RECMEM_SIZE - 0x10000)) + recReset(); + + x86Align(32); + ptr = x86Ptr; + + PC_REC32(psxRegs.pc) = (u32)x86Ptr; + pc = psxRegs.pc; + pcold = pc; + + for (count = 0; count < 500;) { + p = (char *)PSXM(pc); + if (p == NULL) recError(); + psxRegs.code = *(u32 *)p; +/* + if ((psxRegs.code >> 26) == 0x23) { // LW + int i; + u32 code; + + for (i=1;; i++) { + p = (char *)PSXM(pc+i*4); + if (p == NULL) recError(); + code = *(u32 *)p; + + if ((code >> 26) != 0x23 || + _fRs_(code) != _Rs_ || + _fImm_(code) != (_Imm_+i*4)) + break; + } + if (i > 1) { + recLWBlock(i); + pc = pc + i*4; continue; + } + } + + if ((psxRegs.code >> 26) == 0x2b) { // SW + int i; + u32 code; + + for (i=1;; i++) { + p = (char *)PSXM(pc+i*4); + if (p == NULL) recError(); + code = *(u32 *)p; + + if ((code >> 26) != 0x2b || + _fRs_(code) != _Rs_ || + _fImm_(code) != (_Imm_+i*4)) + break; + } + if (i > 1) { + recSWBlock(i); + pc = pc + i*4; continue; + } + }*/ + + pc += 4; + count++; + recBSC[psxRegs.code >> 26](); + + if (branch) { + branch = 0; + if (dump) iDumpBlock(ptr); + return; + } + } + + iFlushRegs(); + + MOV32ItoM((u32)&psxRegs.pc, pc); + + iRet(); +} + +R3000Acpu psxRec = { + recInit, + recReset, + recExecute, + recExecuteBlock, + recClear, + recShutdown +}; diff --git a/libpcsxcore/ix86/ix86.c b/libpcsxcore/ix86/ix86.c new file mode 100644 index 00000000..d701e899 --- /dev/null +++ b/libpcsxcore/ix86/ix86.c @@ -0,0 +1,1723 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* + * ix86 core v0.5.1 + * Authors: linuzappz + * alexey silinov + */ + +#include "ix86.h" + +s8 *x86Ptr; +u8 *j8Ptr[32]; +u32 *j32Ptr[32]; + +void x86Init() { +} + +void x86SetPtr(char *ptr) { + x86Ptr = ptr; +} + +void x86Shutdown() { +} + +void x86SetJ8(u8 *j8) { + u32 jump = (x86Ptr - (s8*)j8) - 1; + + if (jump > 0x7f) printf("j8 greater than 0x7f!!\n"); + *j8 = (u8)jump; +} + +void x86SetJ32(u32 *j32) { + *j32 = (x86Ptr - (s8*)j32) - 4; +} + +void x86Align(int bytes) { + // fordward align + x86Ptr = (s8*)(((u32)x86Ptr + bytes) & ~(bytes - 1)); +} + +#define SIB 4 +#define DISP32 5 + +/* macros helpers */ + +#define ModRM(mod, rm, reg) \ + write8((mod << 6) | (rm << 3) | (reg)); + +#define SibSB(ss, rm, index) \ + write8((ss << 6) | (rm << 3) | (index)); + +#define SET8R(cc, to) { \ + write8(0x0F); write8(cc); \ + write8((0xC0) | (to)); } + +#define J8Rel(cc, to) { \ + write8(cc); write8(to); return x86Ptr - 1; } + +#define J32Rel(cc, to) { \ + write8(0x0F); write8(cc); write32(to); return (u32*)(x86Ptr - 4); } + +#define CMOV32RtoR(cc, to, from) { \ + write8(0x0F); write8(cc); \ + ModRM(3, to, from); } + +#define CMOV32MtoR(cc, to, from) { \ + write8(0x0F); write8(cc); \ + ModRM(0, to, DISP32); \ + write32(from); } + +/********************/ +/* IX86 intructions */ +/********************/ + +// mov instructions + +/* mov r32 to r32 */ +void MOV32RtoR(int to, int from) { + write8(0x89); + ModRM(3, from, to); +} + +/* mov r32 to m32 */ +void MOV32RtoM(u32 to, int from) { + write8(0x89); + ModRM(0, from, DISP32); + write32(to); +} + +/* mov m32 to r32 */ +void MOV32MtoR(int to, u32 from) { + write8(0x8B); + ModRM(0, to, DISP32); + write32(from); +} + +/* mov [r32] to r32 */ +void MOV32RmtoR(int to, int from) { + write8(0x8B); + ModRM(0, to, from); +} + +/* mov [r32][r32*scale] to r32 */ +void MOV32RmStoR(int to, int from, int from2, int scale) { + write8(0x8B); + ModRM(0, to, 0x4); + SibSB(scale, from2, from); +} + +/* mov r32 to [r32] */ +void MOV32RtoRm(int to, int from) { + write8(0x89); + ModRM(0, from, to); +} + +/* mov r32 to [r32][r32*scale] */ +void MOV32RtoRmS(int to, int to2, int scale, int from) { + write8(0x89); + ModRM(0, from, 0x4); + SibSB(scale, to2, to); +} + +/* mov imm32 to r32 */ +void MOV32ItoR(int to, u32 from) { + write8(0xB8 | to); + write32(from); +} + +/* mov imm32 to m32 */ +void MOV32ItoM(u32 to, u32 from) { + write8(0xC7); + ModRM(0, 0, DISP32); + write32(to); + write32(from); +} + +/* mov r16 to m16 */ +void MOV16RtoM(u32 to, int from) { + write8(0x66); + write8(0x89); + ModRM(0, from, DISP32); + write32(to); +} + +/* mov m16 to r16 */ +void MOV16MtoR(int to, u32 from) { + write8(0x66); + write8(0x8B); + ModRM(0, to, DISP32); + write32(from); +} + +/* mov imm16 to m16 */ +void MOV16ItoM(u32 to, u16 from) { + write8(0x66); + write8(0xC7); + ModRM(0, 0, DISP32); + write32(to); + write16(from); +} + +/* mov r8 to m8 */ +void MOV8RtoM(u32 to, int from) { + write8(0x88); + ModRM(0, from, DISP32); + write32(to); +} + +/* mov m8 to r8 */ +void MOV8MtoR(int to, u32 from) { + write8(0x8A); + ModRM(0, to, DISP32); + write32(from); +} + +/* mov imm8 to m8 */ +void MOV8ItoM(u32 to, u8 from) { + write8(0xC6); + ModRM(0, 0, DISP32); + write32(to); + write8(from); +} + +/* movsx r8 to r32 */ +void MOVSX32R8toR(int to, int from) { + write16(0xBE0F); + ModRM(3, to, from); +} + +/* movsx m8 to r32 */ +void MOVSX32M8toR(int to, u32 from) { + write16(0xBE0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* movsx r16 to r32 */ +void MOVSX32R16toR(int to, int from) { + write16(0xBF0F); + ModRM(3, to, from); +} + +/* movsx m16 to r32 */ +void MOVSX32M16toR(int to, u32 from) { + write16(0xBF0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* movzx r8 to r32 */ +void MOVZX32R8toR(int to, int from) { + write16(0xB60F); + ModRM(3, to, from); +} + +/* movzx m8 to r32 */ +void MOVZX32M8toR(int to, u32 from) { + write16(0xB60F); + ModRM(0, to, DISP32); + write32(from); +} + +/* movzx r16 to r32 */ +void MOVZX32R16toR(int to, int from) { + write16(0xB70F); + ModRM(3, to, from); +} + +/* movzx m16 to r32 */ +void MOVZX32M16toR(int to, u32 from) { + write16(0xB70F); + ModRM(0, to, DISP32); + write32(from); +} + +/* cmovne r32 to r32 */ +void CMOVNE32RtoR(int to, int from) { + CMOV32RtoR(0x45, to, from); +} + +/* cmovne m32 to r32*/ +void CMOVNE32MtoR(int to, u32 from) { + CMOV32MtoR(0x45, to, from); +} + +/* cmove r32 to r32*/ +void CMOVE32RtoR(int to, int from) { + CMOV32RtoR(0x44, to, from); +} + +/* cmove m32 to r32*/ +void CMOVE32MtoR(int to, u32 from) { + CMOV32MtoR(0x44, to, from); +} + +/* cmovg r32 to r32*/ +void CMOVG32RtoR(int to, int from) { + CMOV32RtoR(0x4F, to, from); +} + +/* cmovg m32 to r32*/ +void CMOVG32MtoR(int to, u32 from) { + CMOV32MtoR(0x4F, to, from); +} + +/* cmovge r32 to r32*/ +void CMOVGE32RtoR(int to, int from) { + CMOV32RtoR(0x4D, to, from); +} + +/* cmovge m32 to r32*/ +void CMOVGE32MtoR(int to, u32 from) { + CMOV32MtoR(0x4D, to, from); +} + +/* cmovl r32 to r32*/ +void CMOVL32RtoR(int to, int from) { + CMOV32RtoR(0x4C, to, from); +} + +/* cmovl m32 to r32*/ +void CMOVL32MtoR(int to, u32 from) { + CMOV32MtoR(0x4C, to, from); +} + +/* cmovle r32 to r32*/ +void CMOVLE32RtoR(int to, int from) { + CMOV32RtoR(0x4E, to, from); +} + +/* cmovle m32 to r32*/ +void CMOVLE32MtoR(int to, u32 from) { + CMOV32MtoR(0x4E, to, from); +} + +// arithmic instructions + +/* add imm32 to r32 */ +void ADD32ItoR(int to, u32 from) { + if (to == EAX) { + write8(0x05); + } else { + write8(0x81); + ModRM(3, 0, to); + } + write32(from); +} + +/* add imm32 to m32 */ +void ADD32ItoM(u32 to, u32 from) { + write8(0x81); + ModRM(0, 0, DISP32); + write32(to); + write32(from); +} + +/* add r32 to r32 */ +void ADD32RtoR(int to, int from) { + write8(0x01); + ModRM(3, from, to); +} + +/* add r32 to m32 */ +void ADD32RtoM(u32 to, int from) { + write8(0x01); + ModRM(0, from, DISP32); + write32(to); +} + +/* add m32 to r32 */ +void ADD32MtoR(int to, u32 from) { + write8(0x03); + ModRM(0, to, DISP32); + write32(from); +} + +/* adc imm32 to r32 */ +void ADC32ItoR(int to, u32 from) { + if (to == EAX) { + write8(0x15); + } else { + write8(0x81); + ModRM(3, 2, to); + } + write32(from); +} + +/* adc r32 to r32 */ +void ADC32RtoR(int to, int from) { + write8(0x11); + ModRM(3, from, to); +} + +/* adc m32 to r32 */ +void ADC32MtoR(int to, u32 from) { + write8(0x13); + ModRM(0, to, DISP32); + write32(from); +} + +/* inc r32 */ +void INC32R(int to) { + write8(0x40 + to); +} + +/* inc m32 */ +void INC32M(u32 to) { + write8(0xFF); + ModRM(0, 0, DISP32); + write32(to); +} + +/* sub imm32 to r32 */ +void SUB32ItoR(int to, u32 from) { + if (to == EAX) { + write8(0x2D); + } else { + write8(0x81); + ModRM(3, 5, to); + } + write32(from); +} + +/* sub r32 to r32 */ +void SUB32RtoR(int to, int from) { + write8(0x29); + ModRM(3, from, to); +} + +/* sub m32 to r32 */ +void SUB32MtoR(int to, u32 from) { + write8(0x2B); + ModRM(0, to, DISP32); + write32(from); +} + +/* sbb imm32 to r32 */ +void SBB32ItoR(int to, u32 from) { + if (to == EAX) { + write8(0x1D); + } else { + write8(0x81); + ModRM(3, 3, to); + } + write32(from); +} + +/* sbb r32 to r32 */ +void SBB32RtoR(int to, int from) { + write8(0x19); + ModRM(3, from, to); +} + +/* sbb m32 to r32 */ +void SBB32MtoR(int to, u32 from) { + write8(0x1B); + ModRM(0, to, DISP32); + write32(from); +} + +/* dec r32 */ +void DEC32R(int to) { + write8(0x48 + to); +} + +/* dec m32 */ +void DEC32M(u32 to) { + write8(0xFF); + ModRM(0, 1, DISP32); + write32(to); +} + +/* mul eax by r32 to edx:eax */ +void MUL32R(int from) { + write8(0xF7); + ModRM(3, 4, from); +} + +/* imul eax by r32 to edx:eax */ +void IMUL32R(int from) { + write8(0xF7); + ModRM(3, 5, from); +} + +/* mul eax by m32 to edx:eax */ +void MUL32M(u32 from) { + write8(0xF7); + ModRM(0, 4, DISP32); + write32(from); +} + +/* imul eax by m32 to edx:eax */ +void IMUL32M(u32 from) { + write8(0xF7); + ModRM(0, 5, DISP32); + write32(from); +} + +/* imul r32 by r32 to r32 */ +void IMUL32RtoR(int to, int from) { + write16(0xAF0F); + ModRM(3, to, from); +} + +/* div eax by r32 to edx:eax */ +void DIV32R(int from) { + write8(0xF7); + ModRM(3, 6, from); +} + +/* idiv eax by r32 to edx:eax */ +void IDIV32R(int from) { + write8(0xF7); + ModRM(3, 7, from); +} + +/* div eax by m32 to edx:eax */ +void DIV32M(u32 from) { + write8(0xF7); + ModRM(0, 6, DISP32); + write32(from); +} + +/* idiv eax by m32 to edx:eax */ +void IDIV32M(u32 from) { + write8(0xF7); + ModRM(0, 7, DISP32); + write32(from); +} + +// shifting instructions + +void RCR32ItoR(int to,int from) +{ + if (from==1) + { + write8(0xd1); + write8(0xd8 | to); + } + else + { + write8(0xc1); + write8(0xd8 | to); + write8(from); + } +} + +/* shl imm8 to r32 */ +void SHL32ItoR(int to, u8 from) { + if (from==1) + { + write8(0xd1); + write8(0xe0 | to); + return; + } + write8(0xC1); + ModRM(3, 4, to); + write8(from); +} + +/* shl cl to r32 */ +void SHL32CLtoR(int to) { + write8(0xD3); + ModRM(3, 4, to); +} + +/* shr imm8 to r32 */ +void SHR32ItoR(int to, u8 from) { + if (from==1) + { + write8(0xd1); + write8(0xe8 | to); + return; + } + write8(0xC1); + ModRM(3, 5, to); + write8(from); +} + +/* shr cl to r32 */ +void SHR32CLtoR(int to) { + write8(0xD3); + ModRM(3, 5, to); +} + +/* sar imm8 to r32 */ +void SAR32ItoR(int to, u8 from) { + write8(0xC1); + ModRM(3, 7, to); + write8(from); +} + +/* sar cl to r32 */ +void SAR32CLtoR(int to) { + write8(0xD3); + ModRM(3, 7, to); +} + + +// logical instructions + +/* or imm32 to r32 */ +void OR32ItoR(int to, u32 from) { + if (to == EAX) { + write8(0x0D); + } else { + write8(0x81); + ModRM(3, 1, to); + } + write32(from); +} + +/* or imm32 to m32 */ +void OR32ItoM(u32 to, u32 from) { + write8(0x81); + ModRM(0, 1, DISP32); + write32(to); + write32(from); +} + +/* or r32 to r32 */ +void OR32RtoR(int to, int from) { + write8(0x09); + ModRM(3, from, to); +} + +/* or r32 to m32 */ +void OR32RtoM(u32 to, int from) { + write8(0x09); + ModRM(0, from, DISP32); + write32(to); +} + +/* or m32 to r32 */ +void OR32MtoR(int to, u32 from) { + write8(0x0B); + ModRM(0, to, DISP32); + write32(from); +} + +/* xor imm32 to r32 */ +void XOR32ItoR(int to, u32 from) { + if (to == EAX) { + write8(0x35); + } else { + write8(0x81); + ModRM(3, 6, to); + } + write32(from); +} + +/* xor imm32 to m32 */ +void XOR32ItoM(u32 to, u32 from) { + write8(0x81); + ModRM(0, 6, DISP32); + write32(to); + write32(from); +} + +/* xor r32 to r32 */ +void XOR32RtoR(int to, int from) { + write8(0x31); + ModRM(3, from, to); +} + +/* xor r32 to m32 */ +void XOR32RtoM(u32 to, int from) { + write8(0x31); + ModRM(0, from, DISP32); + write32(to); +} + +/* xor m32 to r32 */ +void XOR32MtoR(int to, u32 from) { + write8(0x33); + ModRM(0, to, DISP32); + write32(from); +} + +/* and imm32 to r32 */ +void AND32ItoR(int to, u32 from) { + if (to == EAX) { + write8(0x25); + } else { + write8(0x81); + ModRM(3, 0x4, to); + } + write32(from); +} + +/* and imm32 to m32 */ +void AND32ItoM(u32 to, u32 from) { + write8(0x81); + ModRM(0, 0x4, DISP32); + write32(to); + write32(from); +} + +/* and r32 to r32 */ +void AND32RtoR(int to, int from) { + write8(0x21); + ModRM(3, from, to); +} + +/* and r32 to m32 */ +void AND32RtoM(u32 to, int from) { + write8(0x21); + ModRM(0, from, DISP32); + write32(to); +} + +/* and m32 to r32 */ +void AND32MtoR(int to, u32 from) { + write8(0x23); + ModRM(0, to, DISP32); + write32(from); +} + +/* not r32 */ +void NOT32R(int from) { + write8(0xF7); + ModRM(3, 2, from); +} + +/* neg r32 */ +void NEG32R(int from) { + write8(0xF7); + ModRM(3, 3, from); +} + +// jump instructions + +/* jmp rel8 */ +u8* JMP8(u8 to) { + write8(0xEB); + write8(to); + return x86Ptr - 1; +} + +/* jmp rel32 */ +u32* JMP32(u32 to) { + write8(0xE9); + write32(to); + return (u32*)(x86Ptr - 4); +} + +/* jmp r32 */ +void JMP32R(int to) { + write8(0xFF); + ModRM(3, 4, to); +} + +/* je rel8 */ +u8* JE8(u8 to) { + J8Rel(0x74, to); +} + +/* jz rel8 */ +u8* JZ8(u8 to) { + J8Rel(0x74, to); +} + +/* jg rel8 */ +u8* JG8(u8 to) { + J8Rel(0x7F, to); +} + +/* jge rel8 */ +u8* JGE8(u8 to) { + J8Rel(0x7D, to); +} + +/* jl rel8 */ +u8* JL8(u8 to) { + J8Rel(0x7C, to); +} + +/* jle rel8 */ +u8* JLE8(u8 to) { + J8Rel(0x7E, to); +} + +/* jne rel8 */ +u8* JNE8(u8 to) { + J8Rel(0x75, to); +} + +/* jnz rel8 */ +u8* JNZ8(u8 to) { + J8Rel(0x75, to); +} + +/* jng rel8 */ +u8* JNG8(u8 to) { + J8Rel(0x7E, to); +} + +/* jnge rel8 */ +u8* JNGE8(u8 to) { + J8Rel(0x7C, to); +} + +/* jnl rel8 */ +u8* JNL8(u8 to) { + J8Rel(0x7D, to); +} + +/* jnle rel8 */ +u8* JNLE8(u8 to) { + J8Rel(0x7F, to); +} + +/* jo rel8 */ +u8* JO8(u8 to) { + J8Rel(0x70, to); +} + +/* jno rel8 */ +u8* JNO8(u8 to) { + J8Rel(0x71, to); +} + +/* je rel32 */ +u32* JE32(u32 to) { + J32Rel(0x84, to); +} + +/* jz rel32 */ +u32* JZ32(u32 to) { + J32Rel(0x84, to); +} + +/* jg rel32 */ +u32* JG32(u32 to) { + J32Rel(0x8F, to); +} + +/* jge rel32 */ +u32* JGE32(u32 to) { + J32Rel(0x8D, to); +} + +/* jl rel32 */ +u32* JL32(u32 to) { + J32Rel(0x8C, to); +} + +/* jle rel32 */ +u32* JLE32(u32 to) { + J32Rel(0x8E, to); +} + +/* jne rel32 */ +u32* JNE32(u32 to) { + J32Rel(0x85, to); +} + +/* jnz rel32 */ +u32* JNZ32(u32 to) { + J32Rel(0x85, to); +} + +/* jng rel32 */ +u32* JNG32(u32 to) { + J32Rel(0x8E, to); +} + +/* jnge rel32 */ +u32* JNGE32(u32 to) { + J32Rel(0x8C, to); +} + +/* jnl rel32 */ +u32* JNL32(u32 to) { + J32Rel(0x8D, to); +} + +/* jnle rel32 */ +u32* JNLE32(u32 to) { + J32Rel(0x8F, to); +} + +/* jo rel32 */ +u32* JO32(u32 to) { + J32Rel(0x80, to); +} + +/* jno rel32 */ +u32* JNO32(u32 to) { + J32Rel(0x81, to); +} + +/* call func */ +void CALLFunc(u32 func) { + CALL32(func - ((u32)x86Ptr + 5)); +} + +/* call rel32 */ +void CALL32(u32 to) { + write8(0xE8); + write32(to); +} + +/* call r32 */ +void CALL32R(int to) { + write8(0xFF); + ModRM(3, 2, to); +} + +/* call m32 */ +void CALL32M(u32 to) { + write8(0xFF); + ModRM(0, 2, DISP32); + write32(to); +} + +// misc instructions + +/* cmp imm32 to r32 */ +void CMP32ItoR(int to, u32 from) { + if (to == EAX) { + write8(0x3D); + } else { + write8(0x81); + ModRM(3, 7, to); + } + write32(from); +} + +/* cmp imm32 to m32 */ +void CMP32ItoM(u32 to, u32 from) { + write8(0x81); + ModRM(0, 7, DISP32); + write32(to); + write32(from); +} + +/* cmp r32 to r32 */ +void CMP32RtoR(int to, int from) { + write8(0x39); + ModRM(3, from, to); +} + +/* cmp m32 to r32 */ +void CMP32MtoR(int to, u32 from) { + write8(0x3B); + ModRM(0, to, DISP32); + write32(from); +} + +/* test imm32 to r32 */ +void TEST32ItoR(int to, u32 from) { + if (to == EAX) { + write8(0xA9); + } else { + write8(0xF7); + ModRM(3, 0, to); + } + write32(from); +} + +/* test r32 to r32 */ +void TEST32RtoR(int to, int from) { + write8(0x85); + ModRM(3, from, to); +} + +void BT32ItoR(int to,int from) +{ + write16(0xba0f); + write8(0xe0 | to); + write8(from); +} + +/* sets r8 */ +void SETS8R(int to) { + SET8R(0x98, to); +} +/* setl r8 */ +void SETL8R(int to) { + SET8R(0x9C, to); +} + +/* setb r8 */ +void SETB8R(int to) { + SET8R(0x92, to); +} + +/* setnz r8 */ +void SETNZ8R(int to) { + SET8R(0x95,to); +} + +/* cbw */ +void CBW() { + write16(0x9866); +} + +/* cwd */ +void CWD() { + write8(0x98); +} + +/* cdq */ +void CDQ() { + write8(0x99); +} + +/* push r32 */ +void PUSH32R(int from) { + write8(0x50 | from); +} + +/* push m32 */ +void PUSH32M(u32 from) { + write8(0xFF); + ModRM(0, 6, DISP32); + write32(from); +} + +/* push imm32 */ +void PUSH32I(u32 from) { + write8(0x68); write32(from); +} + +/* pop r32 */ +void POP32R(int from) { + write8(0x58 | from); +} + +/* pushad */ +void PUSHA32() { + write8(0x60); +} + +/* popad */ +void POPA32() { + write8(0x61); +} + +/* ret */ +void RET() { + write8(0xC3); +} + +/********************/ +/* FPU instructions */ +/********************/ + +//Added:basara 14.01.2003 +/* compare m32 to fpu reg stack */ +void FCOMP32(u32 from) { + write8(0xD8); + ModRM(0, 0x3, DISP32); + write32(from); +} + +void FNSTSWtoAX() { + write16(0xE0DF); +} + +/* fild m32 to fpu reg stack */ +void FILD32(u32 from) { + write8(0xDB); + ModRM(0, 0x0, DISP32); + write32(from); +} + +/* fistp m32 from fpu reg stack */ +void FISTP32(u32 from) { + write8(0xDB); + ModRM(0, 0x3, DISP32); + write32(from); +} + +/* fld m32 to fpu reg stack */ +void FLD32(u32 from) { + write8(0xD9); + ModRM(0, 0x0, DISP32); + write32(from); +} + +/* fstp m32 from fpu reg stack */ +void FSTP32(u32 to) { + write8(0xD9); + ModRM(0, 0x3, DISP32); + write32(to); +} + +// + +/* fldcw fpu control word from m16 */ +void FLDCW(u32 from) { + write8(0xD9); + ModRM(0, 0x5, DISP32); + write32(from); +} + +/* fnstcw fpu control word to m16 */ +void FNSTCW(u32 to) { + write8(0xD9); + ModRM(0, 0x7, DISP32); + write32(to); +} + +// + +/* fadd m32 to fpu reg stack */ +void FADD32(u32 from) { + write8(0xD8); + ModRM(0, 0x0, DISP32); + write32(from); +} + +/* fsub m32 to fpu reg stack */ +void FSUB32(u32 from) { + write8(0xD8); + ModRM(0, 0x4, DISP32); + write32(from); +} + +/* fmul m32 to fpu reg stack */ +void FMUL32(u32 from) { + write8(0xD8); + ModRM(0, 0x1, DISP32); + write32(from); +} + +/* fdiv m32 to fpu reg stack */ +void FDIV32(u32 from) { + write8(0xD8); + ModRM(0, 0x6, DISP32); + write32(from); +} + +/* fabs fpu reg stack */ +void FABS() { + write16(0xE1D9); +} + +/* fsqrt fpu reg stack */ +void FSQRT() { + write16(0xFAD9); +} + +/* fchs fpu reg stack */ +void FCHS() { + write16(0xE0D9); +} + +/********************/ +/* MMX instructions */ +/********************/ + +// r64 = mm + +/* movq m64 to r64 */ +void MOVQMtoR(int to, u32 from) { + write16(0x6F0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* movq r64 to m64 */ +void MOVQRtoM(u32 to, int from) { + write16(0x7F0F); + ModRM(0, from, DISP32); + write32(to); +} + +/* pand r64 to r64 */ +void PANDRtoR(int to, int from) { + write16(0xDB0F); + ModRM(3, to, from); +} + +/* pand r64 to r64 */ +void PANDNRtoR(int to, int from) { + write16(0xDF0F); + ModRM(3, to, from); +} + +/* por r64 to r64 */ +void PORRtoR(int to, int from) { + write16(0xEB0F); + ModRM(3, to, from); +} + +/* pxor r64 to r64 */ +void PXORRtoR(int to, int from) { + write16(0xEF0F); + ModRM(3, to, from); +} + +/* psllq r64 to r64 */ +void PSLLQRtoR(int to, int from) { + write16(0xF30F); + ModRM(3, to, from); +} + +/* psllq m64 to r64 */ +void PSLLQMtoR(int to, u32 from) { + write16(0xF30F); + ModRM(0, to, DISP32); + write32(from); +} + +/* psllq imm8 to r64 */ +void PSLLQItoR(int to, u8 from) { + write16(0x730F); + ModRM(3, 6, to); + write8(from); +} + +/* psrlq r64 to r64 */ +void PSRLQRtoR(int to, int from) { + write16(0xD30F); + ModRM(3, to, from); +} + +/* psrlq m64 to r64 */ +void PSRLQMtoR(int to, u32 from) { + write16(0xD30F); + ModRM(0, to, DISP32); + write32(from); +} + +/* psrlq imm8 to r64 */ +void PSRLQItoR(int to, u8 from) { + write16(0x730F); + ModRM(3, 2, to); + write8(from); +} + +/* paddusb r64 to r64 */ +void PADDUSBRtoR(int to, int from) { + write16(0xDC0F); + ModRM(3, to, from); +} + +/* paddusb m64 to r64 */ +void PADDUSBMtoR(int to, u32 from) { + write16(0xDC0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* paddusw r64 to r64 */ +void PADDUSWRtoR(int to, int from) { + write16(0xDD0F); + ModRM(3, to, from); +} + +/* paddusw m64 to r64 */ +void PADDUSWMtoR(int to, u32 from) { + write16(0xDD0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* paddb r64 to r64 */ +void PADDBRtoR(int to, int from) { + write16(0xFC0F); + ModRM(3, to, from); +} + +/* paddb m64 to r64 */ +void PADDBMtoR(int to, u32 from) { + write16(0xFC0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* paddw r64 to r64 */ +void PADDWRtoR(int to, int from) { + write16(0xFD0F); + ModRM(3, to, from); +} + +/* paddw m64 to r64 */ +void PADDWMtoR(int to, u32 from) { + write16(0xFD0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* paddd r64 to r64 */ +void PADDDRtoR(int to, int from) { + write16(0xFE0F); + ModRM(3, to, from); +} + +/* paddd m64 to r64 */ +void PADDDMtoR(int to, u32 from) { + write16(0xFE0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* emms */ +void EMMS() { + //use femms if we have 3dnow + write16(0x0e0f); + return; +} + +/* femms */ +void FEMMS() { + write16(0x770F); + return; +} + +//Basara:changed +void PADDSBRtoR(int to, int from) { + write16(0xEC0F); + ModRM(3, to, from); +} + +void PADDSWRtoR(int to, int from) { + write16(0xED0F); + ModRM(3, to, from); +} + +void PADDSDRtoR(int to, int from) { + write16(0xEE0F); + ModRM(3, to, from); +} + +void PSUBSBRtoR(int to, int from) { + write16(0xE80F); + ModRM(3, to, from); +} + +void PSUBSWRtoR(int to, int from) { + write16(0xE90F); + ModRM(3, to, from); +} + +void PSUBSDRtoR(int to, int from) { + write16(0xEA0F); + ModRM(3, to, from); +} + +void PSUBBRtoR(int to, int from) { + write16(0xF80F); + ModRM(3, to, from); +} + +void PSUBWRtoR(int to, int from) { + write16(0xF90F); + ModRM(3, to, from); +} + +void PSUBDRtoR(int to, int from) { + write16(0xFA0F); + ModRM(3, to, from); +} + +//changed:basara +//P.s.It's sux.Don't use it offten. +void MOVQ64ItoR(int reg,u64 i) +{ + MOVQMtoR(reg,(u32)(x86Ptr)+2+7); + JMP8(8); + write64(i); +} + +void PSUBUSBRtoR(int to, int from) { + write16(0xD80F); + ModRM(3, to, from); +} + +void PSUBUSWRtoR(int to, int from) { + write16(0xD90F); + ModRM(3, to, from); +} + +void PMAXSWRtoR(int to,int from) +{ + write16(0xEE0F); + ModRM(3, to, from); +} + +void PMINSWRtoR(int to,int from) +{ + write16(0xEA0F); + ModRM(3, to, from); +} + +void PCMPEQBRtoR(int to,int from) +{ + write16(0x740F); + ModRM(3, to, from); +} + +void PCMPEQWRtoR(int to,int from) +{ + write16(0x750F); + ModRM(3, to, from); +} + +void PCMPEQDRtoR(int to,int from) +{ + write16(0x760F); + ModRM(3, to, from); +} + +void PCMPGTBRtoR(int to,int from) +{ + write16(0x640F); + ModRM(3, to, from); +} + +void PCMPGTWRtoR(int to,int from) +{ + write16(0x650F); + ModRM(3, to, from); +} + +void PCMPGTDRtoR(int to,int from) +{ + write16(0x660F); + ModRM(3, to, from); +} + +//Basara:Added 10.01.2003 +void PSRLWItoR(int to,int from) +{ + write16(0x710f); + ModRM(2, 2 , to); + write8(from); +} +void PSRLDItoR(int to,int from) +{ + write16(0x720f); + ModRM(2, 2 , to); + write8(from); +} + +void PSLLWItoR(int to,int from) +{ + write16(0x710f); + ModRM(3, 6 , to); + write8(from); +} + +void PSLLDItoR(int to,int from) +{ + write16(0x720f); + ModRM(3, 6 , to); + write8(from); +} + +void PSRAWItoR(int to,int from) +{ + write16(0x710f); + ModRM(3, 4 , to); + write8(from); +} + +void PSRADItoR(int to,int from) +{ + write16(0x720f); + ModRM(3, 4 , to); + write8(from); +} + +/* por m64 to r64 */ +void PORMtoR(int to, u32 from) { + write16(0xEB0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* pxor m64 to r64 */ +void PXORMtoR(int to, u32 from) { + write16(0xEF0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* pand m64 to r64 */ +void PANDMtoR(int to, u32 from) { + write16(0xDB0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* pandn m64 to r64 */ +void PANDNMtoR(int to, u32 from) { + write16(0xDF0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* movd m32 to r64 */ +void MOVDMtoR(int to, u32 from) { + write16(0x6E0F); + ModRM(0, to, DISP32); + write32(from); +} + +/* movq r64 to m32 */ +void MOVDRtoM(u32 to, int from) { + write16(0x7E0F); + ModRM(0, from, DISP32); + write32(to); +} + +/* movd r32 to r64 */ +void MOVD32RtoR(int to, int from) { + write16(0x6E0F); + ModRM(3, to,from); +} + +/* movq r64 to r32 */ +void MOVD64RtoR(int to, int from) { + write16(0x7E0F); + ModRM(3, from,to); +} + +void MOVQRtoR(int to, int from) { + write16(0x6F0F); + ModRM(3, to,from); +} + +void PUNPCKHDQRtoR(int to, int from) { + write16(0x6A0F); + ModRM(3, to,from); +} + +void PUNPCKLDQRtoR(int to, int from) { + write16(0x620F); + ModRM(3, to,from); +} + +////////////////////////////////////////////////////////////////////////// +// SSE intructions +////////////////////////////////////////////////////////////////////////// + +void MOVAPSMtoR(int to, int from) { + write16(0x280f); + ModRM(0, to, DISP32); + write32(from); +} + +void MOVAPSRtoM(int to, int from) { + write16(0x2b0f); + ModRM(0, from, DISP32); + write32(to); +} + +void MOVAPSRtoR(int to, int from) { + write16(0x290f); + ModRM(3, to,from); +} + +void ORPSMtoR(int to, int from) { + write16(0x560f); + ModRM(0, to, DISP32); + write32(from); +} + +void ORPSRtoR(int to, int from) { + write16(0x560f); + ModRM(3, to,from); +} + +void XORPSMtoR(int to, int from) { + write16(0x570f); + ModRM(0, to, DISP32); + write32(from); +} + +void XORPSRtoR(int to, int from) { + write16(0x570f); + ModRM(3, to,from); +} + +void ANDPSMtoR(int to, int from) { + write16(0x540f); + ModRM(0, to, DISP32); + write32(from); +} + +void ANDPSRtoR(int to, int from) { + write16(0x540f); + ModRM(3, to,from); +} + +/* + 3DNOW intructions +*/ + +void PFCMPEQMtoR(int to, int from) { + write16(0x0f0f); + ModRM(0, to, DISP32); + write32(from); + write8(0xb0); +} + +void PFCMPGTMtoR(int to, int from) { + write16(0x0f0f); + ModRM(0, to, DISP32); + write32(from); + write8(0xa0); +} + +void PFCMPGEMtoR(int to, int from) { + write16(0x0f0f); + ModRM(0, to, DISP32); + write32(from); + write8(0x90); +} + +void PFADDMtoR(int to, int from) { + write16(0x0f0f); + ModRM(0, to, DISP32); + write32(from); + write8(0x9e); +} + +void PFADDRtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to, from); + write8(0x9e); +} + +void PFSUBMtoR(int to, int from) { + write16(0x0f0f); + ModRM(0, to, DISP32); + write32(from); + write8(0x9a); +} + +void PFSUBRtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to, from); + write8(0x9a); +} + +void PFMULMtoR(int to, int from) { + write16(0x0f0f); + ModRM(0, to, DISP32); + write32(from); + write8(0xb4); +} + +void PFMULRtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to,from); + write8(0xb4); +} + +void PFRCPMtoR(int to, int from) { + write16(0x0f0f); + ModRM(0, to, DISP32); + write32(from); + write8(0x96); +} + +void PFRCPRtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to,from); + write8(0x96); +} + +void PFRCPIT1RtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to,from); + write8(0xa6); +} + +void PFRCPIT2RtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to,from); + write8(0xb6); +} + +void PFRSQRTRtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to,from); + write8(0x97); +} + +void PFRSQIT1RtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to,from); + write8(0xa7); +} + +void PF2IDMtoR(int to, int from) { + write16(0x0f0f); + ModRM(0, to, DISP32); + write32(from); + write8(0x1d); +} + +void PF2IDRtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to, from); + write8(0x1d); +} + +void PI2FDMtoR(int to, int from) { + write16(0x0f0f); + ModRM(0, to, DISP32); + write32(from); + write8(0x0d); +} + +void PI2FDRtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to, from); + write8(0x0d); +} + +/* + 3DNOW Extension intructions +*/ + +void PFMAXMtoR(int to, int from) { + write16(0x0f0f); + ModRM(0, to, DISP32); + write32(from); + write8(0xa4); +} + +void PFMAXRtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to, from); + write8(0xa4); +} + +void PFMINMtoR(int to, int from) { + write16(0x0f0f); + ModRM(0, to, DISP32); + write32(from); + write8(0x94); +} + +void PFMINRtoR(int to, int from) { + write16(0x0f0f); + ModRM(3, to, from); + write8(0x94); +} diff --git a/libpcsxcore/ix86/ix86.h b/libpcsxcore/ix86/ix86.h new file mode 100644 index 00000000..2b60dfff --- /dev/null +++ b/libpcsxcore/ix86/ix86.h @@ -0,0 +1,673 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* + * ix86 definitions v0.5.1 + * Authors: linuzappz + * alexey silinov + */ + +#ifndef __IX86_H__ +#define __IX86_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +// include basic types +#include "../psxcommon.h" +#include "../r3000a.h" +#include "../psxhle.h" + +// x86Flags defines +#define X86FLAG_FPU 0x00000001 +#define X86FLAG_VME 0x00000002 +#define X86FLAG_DEBUGEXT 0x00000004 +#define X86FLAG_4MPAGE 0x00000008 +#define X86FLAG_TSC 0x00000010 +#define X86FLAG_MSR 0x00000020 +#define X86FLAG_PAE 0x00000040 +#define X86FLAG_MCHKXCP 0x00000080 +#define X86FLAG_CMPXCHG8B 0x00000100 +#define X86FLAG_APIC 0x00000200 +#define X86FLAG_SYSENTER 0x00000800 +#define X86FLAG_MTRR 0x00001000 +#define X86FLAG_GPE 0x00002000 +#define X86FLAG_MCHKARCH 0x00004000 +#define X86FLAG_CMOV 0x00008000 +#define X86FLAG_PAT 0x00010000 +#define X86FLAG_PSE36 0x00020000 +#define X86FLAG_PN 0x00040000 +#define X86FLAG_MMX 0x00800000 +#define X86FLAG_FXSAVE 0x01000000 +#define X86FLAG_SSE 0x02000000 + +// x86EFlags defines + +#define X86EFLAG_MMXEXT 0x00400000 +#define X86EFLAG_3DNOWEXT 0x40000000 +#define X86EFLAG_3DNOW 0x80000000 + +/* general defines */ +#define write8(val) *(u8 *)x86Ptr = val; x86Ptr++; +#define write16(val) *(u16*)x86Ptr = val; x86Ptr+=2; +#define write32(val) *(u32*)x86Ptr = val; x86Ptr+=4; +#define write64(val) *(u64*)x86Ptr = val; x86Ptr+=8; + +#define EAX 0 +#define EBX 3 +#define ECX 1 +#define EDX 2 +#define ESI 6 +#define EDI 7 +#define EBP 5 +#define ESP 4 + +#define MM0 0 +#define MM1 1 +#define MM2 2 +#define MM3 3 +#define MM4 4 +#define MM5 5 +#define MM6 6 +#define MM7 7 + +#define XMM0 0 +#define XMM1 1 +#define XMM2 2 +#define XMM3 3 +#define XMM4 4 +#define XMM5 5 +#define XMM6 6 +#define XMM7 7 + +extern s8 *x86Ptr; +extern u8 *j8Ptr[32]; +extern u32 *j32Ptr[32]; + +void x86Init(); +void x86SetPtr(char *ptr); +void x86Shutdown(); + +void x86SetJ8(u8 *j8); +void x86SetJ32(u32 *j32); +void x86Align(int bytes); + + +/********************/ +/* IX86 intructions */ +/********************/ + +/* + * scale values: + * 0 - *1 + * 1 - *2 + * 2 - *4 + * 3 - *8 + */ + +//////////////////////////////////// +// mov instructions / +//////////////////////////////////// + +/* mov r32 to r32 */ +void MOV32RtoR(int to, int from); +/* mov r32 to m32 */ +void MOV32RtoM(u32 to, int from); +/* mov m32 to r32 */ +void MOV32MtoR(int to, u32 from); +/* mov [r32] to r32 */ +void MOV32RmtoR(int to, int from); +/* mov [r32][r32*scale] to r32 */ +void MOV32RmStoR(int to, int from, int from2, int scale); +/* mov r32 to [r32] */ +void MOV32RtoRm(int to, int from); +/* mov r32 to [r32][r32*scale] */ +void MOV32RtoRmS(int to, int to2, int scale, int from); +/* mov imm32 to r32 */ +void MOV32ItoR(int to, u32 from); +/* mov imm32 to m32 */ +void MOV32ItoM(u32 to, u32 from); + +/* mov r16 to m16 */ +void MOV16RtoM(u32 to, int from); +/* mov m16 to r16 */ +void MOV16MtoR(int to, u32 from); +/* mov imm16 to m16 */ +void MOV16ItoM(u32 to, u16 from); + +/* mov r8 to m8 */ +void MOV8RtoM(u32 to, int from); +/* mov m8 to r8 */ +void MOV8MtoR(int to, u32 from); +/* mov imm8 to m8 */ +void MOV8ItoM(u32 to, u8 from); + +/* movsx r8 to r32 */ +void MOVSX32R8toR(int to, int from); +/* movsx m8 to r32 */ +void MOVSX32M8toR(int to, u32 from); +/* movsx r16 to r32 */ +void MOVSX32R16toR(int to, int from); +/* movsx m16 to r32 */ +void MOVSX32M16toR(int to, u32 from); + +/* movzx r8 to r32 */ +void MOVZX32R8toR(int to, int from); +/* movzx m8 to r32 */ +void MOVZX32M8toR(int to, u32 from); +/* movzx r16 to r32 */ +void MOVZX32R16toR(int to, int from); +/* movzx m16 to r32 */ +void MOVZX32M16toR(int to, u32 from); + +/* cmovne r32 to r32 */ +void CMOVNE32RtoR(int to, int from); +/* cmovne m32 to r32*/ +void CMOVNE32MtoR(int to, u32 from); +/* cmove r32 to r32*/ +void CMOVE32RtoR(int to, int from); +/* cmove m32 to r32*/ +void CMOVE32MtoR(int to, u32 from); +/* cmovg r32 to r32*/ +void CMOVG32RtoR(int to, int from); +/* cmovg m32 to r32*/ +void CMOVG32MtoR(int to, u32 from); +/* cmovge r32 to r32*/ +void CMOVGE32RtoR(int to, int from); +/* cmovge m32 to r32*/ +void CMOVGE32MtoR(int to, u32 from); +/* cmovl r32 to r32*/ +void CMOVL32RtoR(int to, int from); +/* cmovl m32 to r32*/ +void CMOVL32MtoR(int to, u32 from); +/* cmovle r32 to r32*/ +void CMOVLE32RtoR(int to, int from); +/* cmovle m32 to r32*/ +void CMOVLE32MtoR(int to, u32 from); + +//////////////////////////////////// +// arithmetic instructions / +//////////////////////////////////// + +/* add imm32 to r32 */ +void ADD32ItoR(int to, u32 from); +/* add imm32 to m32 */ +void ADD32ItoM(u32 to, u32 from); +/* add r32 to r32 */ +void ADD32RtoR(int to, int from); +/* add r32 to m32 */ +void ADD32RtoM(u32 to, int from); +/* add m32 to r32 */ +void ADD32MtoR(int to, u32 from); + +/* adc imm32 to r32 */ +void ADC32ItoR(int to, u32 from); +/* adc r32 to r32 */ +void ADC32RtoR(int to, int from); +/* adc m32 to r32 */ +void ADC32MtoR(int to, u32 from); + +/* inc r32 */ +void INC32R(int to); +/* inc m32 */ +void INC32M(u32 to); + +/* sub imm32 to r32 */ +void SUB32ItoR(int to, u32 from); +/* sub r32 to r32 */ +void SUB32RtoR(int to, int from); +/* sub m32 to r32 */ +void SUB32MtoR(int to, u32 from); + +/* sbb imm32 to r32 */ +void SBB32ItoR(int to, u32 from); +/* sbb r32 to r32 */ +void SBB32RtoR(int to, int from); +/* sbb m32 to r32 */ +void SBB32MtoR(int to, u32 from); + +/* dec r32 */ +void DEC32R(int to); +/* dec m32 */ +void DEC32M(u32 to); + +/* mul eax by r32 to edx:eax */ +void MUL32R(int from); +/* mul eax by m32 to edx:eax */ +void MUL32M(u32 from); + +/* imul eax by r32 to edx:eax */ +void IMUL32R(int from); +/* imul eax by m32 to edx:eax */ +void IMUL32M(u32 from); +/* imul r32 by r32 to r32 */ +void IMUL32RtoR(int to, int from); + +/* div eax by r32 to edx:eax */ +void DIV32R(int from); +/* div eax by m32 to edx:eax */ +void DIV32M(u32 from); + +/* idiv eax by r32 to edx:eax */ +void IDIV32R(int from); +/* idiv eax by m32 to edx:eax */ +void IDIV32M(u32 from); + +//////////////////////////////////// +// shifting instructions / +//////////////////////////////////// + +/* shl imm8 to r32 */ +void SHL32ItoR(int to, u8 from); +/* shl cl to r32 */ +void SHL32CLtoR(int to); + +/* shr imm8 to r32 */ +void SHR32ItoR(int to, u8 from); +/* shr cl to r32 */ +void SHR32CLtoR(int to); + +/* sar imm8 to r32 */ +void SAR32ItoR(int to, u8 from); +/* sar cl to r32 */ +void SAR32CLtoR(int to); + +/* sal imm8 to r32 */ +#define SAL32ItoR SHL32ItoR +/* sal cl to r32 */ +#define SAL32CLtoR SHL32CLtoR + +// logical instructions + +/* or imm32 to r32 */ +void OR32ItoR(int to, u32 from); +/* or imm32 to m32 */ +void OR32ItoM(u32 to, u32 from); +/* or r32 to r32 */ +void OR32RtoR(int to, int from); +/* or r32 to m32 */ +void OR32RtoM(u32 to, int from); +/* or m32 to r32 */ +void OR32MtoR(int to, u32 from); + +/* xor imm32 to r32 */ +void XOR32ItoR(int to, u32 from); +/* xor imm32 to m32 */ +void XOR32ItoM(u32 to, u32 from); +/* xor r32 to r32 */ +void XOR32RtoR(int to, int from); +/* xor r32 to m32 */ +void XOR32RtoM(u32 to, int from); +/* xor m32 to r32 */ +void XOR32MtoR(int to, u32 from); + +/* and imm32 to r32 */ +void AND32ItoR(int to, u32 from); +/* and imm32 to m32 */ +void AND32ItoM(u32 to, u32 from); +/* and r32 to r32 */ +void AND32RtoR(int to, int from); +/* and r32 to m32 */ +void AND32RtoM(u32 to, int from); +/* and m32 to r32 */ +void AND32MtoR(int to, u32 from); + +/* not r32 */ +void NOT32R(int from); +/* neg r32 */ +void NEG32R(int from); + +//////////////////////////////////// +// jump instructions / +//////////////////////////////////// + +/* jmp rel8 */ +u8* JMP8(u8 to); + +/* jmp rel32 */ +u32* JMP32(u32 to); +/* jmp r32 */ +void JMP32R(int to); + +/* je rel8 */ +u8* JE8(u8 to); +/* jz rel8 */ +u8* JZ8(u8 to); +/* jg rel8 */ +u8* JG8(u8 to); +/* jge rel8 */ +u8* JGE8(u8 to); +/* jl rel8 */ +u8* JL8(u8 to); +/* jle rel8 */ +u8* JLE8(u8 to); +/* jne rel8 */ +u8* JNE8(u8 to); +/* jnz rel8 */ +u8* JNZ8(u8 to); +/* jng rel8 */ +u8* JNG8(u8 to); +/* jnge rel8 */ +u8* JNGE8(u8 to); +/* jnl rel8 */ +u8* JNL8(u8 to); +/* jnle rel8 */ +u8* JNLE8(u8 to); +/* jo rel8 */ +u8* JO8(u8 to); +/* jno rel8 */ +u8* JNO8(u8 to); + +/* je rel32 */ +u32* JE32(u32 to); +/* jz rel32 */ +u32* JZ32(u32 to); +/* jg rel32 */ +u32* JG32(u32 to); +/* jge rel32 */ +u32* JGE32(u32 to); +/* jl rel32 */ +u32* JL32(u32 to); +/* jle rel32 */ +u32* JLE32(u32 to); +/* jne rel32 */ +u32* JNE32(u32 to); +/* jnz rel32 */ +u32* JNZ32(u32 to); +/* jng rel32 */ +u32* JNG32(u32 to); +/* jnge rel32 */ +u32* JNGE32(u32 to); +/* jnl rel32 */ +u32* JNL32(u32 to); +/* jnle rel32 */ +u32* JNLE32(u32 to); +/* jo rel32 */ +u32* JO32(u32 to); +/* jno rel32 */ +u32* JNO32(u32 to); + +/* call func */ +void CALLFunc(u32 func); // based on CALL32 +/* call rel32 */ +void CALL32(u32 to); +/* call r32 */ +void CALL32R(int to); +/* call m32 */ +void CALL32M(u32 to); + +//////////////////////////////////// +// misc instructions / +//////////////////////////////////// + +/* cmp imm32 to r32 */ +void CMP32ItoR(int to, u32 from); +/* cmp imm32 to m32 */ +void CMP32ItoM(u32 to, u32 from); +/* cmp r32 to r32 */ +void CMP32RtoR(int to, int from); +/* cmp m32 to r32 */ +void CMP32MtoR(int to, u32 from); + +/* test imm32 to r32 */ +void TEST32ItoR(int to, u32 from); +/* test r32 to r32 */ +void TEST32RtoR(int to, int from); +/* sets r8 */ +void SETS8R(int to); +/* setl r8 */ +void SETL8R(int to); +/* setb r8 */ +void SETB8R(int to); + +/* cbw */ +void CBW(); +/* cwd */ +void CWD(); +/* cdq */ +void CDQ(); + +/* push r32 */ +void PUSH32R(int from); +/* push m32 */ +void PUSH32M(u32 from); +/* push imm32 */ +void PUSH32I(u32 from); + +/* pop r32 */ +void POP32R(int from); + +/* pushad */ +void PUSHA32(); +/* popad */ +void POPA32(); + +/* ret */ +void RET(); + +/********************/ +/* FPU instructions */ +/********************/ + +/* fild m32 to fpu reg stack */ +void FILD32(u32 from); +/* fistp m32 from fpu reg stack */ +void FISTP32(u32 from); +/* fld m32 to fpu reg stack */ +void FLD32(u32 from); +/* fstp m32 from fpu reg stack */ +void FSTP32(u32 to); + +/* fldcw fpu control word from m16 */ +void FLDCW(u32 from); +/* fstcw fpu control word to m16 */ +void FNSTCW(u32 to); + +/* fadd m32 to fpu reg stack */ +void FADD32(u32 from); +/* fsub m32 to fpu reg stack */ +void FSUB32(u32 from); +/* fmul m32 to fpu reg stack */ +void FMUL32(u32 from); +/* fdiv m32 to fpu reg stack */ +void FDIV32(u32 from); +/* fabs fpu reg stack */ +void FABS(); +/* fsqrt fpu reg stack */ +void FSQRT(); +/* fchs fpu reg stack */ +void FCHS(); + +/********************/ +/* MMX instructions */ +/********************/ + +// r64 = mm + +/* movq m64 to r64 */ +void MOVQMtoR(int to, u32 from); +/* movq r64 to m64 */ +void MOVQRtoM(u32 to, int from); + +/* pand r64 to r64 */ +void PANDRtoR(int to, int from); +/* pand m64 to r64 */ +void PANDMtoR(int to, u32 from); + +/* pandn r64 to r64 */ +void PANDNRtoR(int to, int from); + +/* pandn r64 to r64 */ +void PANDNMtoR(int to, u32 from); + +/* por r64 to r64 */ +void PORRtoR(int to, int from); +/* por m64 to r64 */ +void PORMtoR(int to, u32 from); + +/* pxor r64 to r64 */ +void PXORRtoR(int to, int from); +/* pxor m64 to r64 */ +void PXORMtoR(int to, u32 from); + +/* psllq r64 to r64 */ +void PSLLQRtoR(int to, int from); +/* psllq m64 to r64 */ +void PSLLQMtoR(int to, u32 from); +/* psllq imm8 to r64 */ +void PSLLQItoR(int to, u8 from); + +/* psrlq r64 to r64 */ +void PSRLQRtoR(int to, int from); +/* psrlq m64 to r64 */ +void PSRLQMtoR(int to, u32 from); +/* psrlq imm8 to r64 */ +void PSRLQItoR(int to, u8 from); + +/* paddusb r64 to r64 */ +void PADDUSBRtoR(int to, int from); +/* paddusb m64 to r64 */ +void PADDUSBMtoR(int to, u32 from); +/* paddusw r64 to r64 */ +void PADDUSWRtoR(int to, int from); +/* paddusw m64 to r64 */ +void PADDUSWMtoR(int to, u32 from); + +/* paddb r64 to r64 */ +void PADDBRtoR(int to, int from); +/* paddb m64 to r64 */ +void PADDBMtoR(int to, u32 from); +/* paddw r64 to r64 */ +void PADDWRtoR(int to, int from); +/* paddw m64 to r64 */ +void PADDWMtoR(int to, u32 from); +/* paddd r64 to r64 */ +void PADDDRtoR(int to, int from); +/* paddd m64 to r64 */ +void PADDDMtoR(int to, u32 from); + +/* emms */ +void EMMS(); +void FEMMS(); +void BT32ItoR(int to,int from); +void RCR32ItoR(int to,int from); + +//Basara:changed +void PADDSBRtoR(int to, int from); +void PADDSWRtoR(int to, int from); +void PADDSDRtoR(int to, int from); +void PSUBSBRtoR(int to, int from); +void PSUBSWRtoR(int to, int from); +void PSUBSDRtoR(int to, int from); + +void PSUBBRtoR(int to, int from); +void PSUBWRtoR(int to, int from); +void PSUBDRtoR(int to, int from); + +void MOVQ64ItoR(int reg,u64 i); //Prototype.Todo add all consts to end of block.not after jr $+8 + +void PMAXSWRtoR(int to,int from); +void PMINSWRtoR(int to,int from); + +void PCMPEQBRtoR(int to,int from); +void PCMPEQWRtoR(int to,int from); +void PCMPEQDRtoR(int to,int from); + +void PCMPGTBRtoR(int to,int from); +void PCMPGTWRtoR(int to,int from); +void PCMPGTDRtoR(int to,int from); + +void PSRLWItoR(int to,int from); +void PSRLDItoR(int to,int from); +void PSLLWItoR(int to,int from); +void PSLLDItoR(int to,int from); +void PSRAWItoR(int to,int from); +void PSRADItoR(int to,int from); + +//Added:basara 11.01.2003 +void FCOMP32(u32 from); +void FNSTSWtoAX(); +void SETNZ8R(int to); + +//Added:basara 14.01.2003 +void PFCMPEQMtoR(int to,int from); +void PFCMPGTMtoR(int to,int from); +void PFCMPGEMtoR(int to,int from); + +void PFADDMtoR(int to,int from); +void PFADDRtoR(int to,int from); + +void PFSUBMtoR(int to,int from); +void PFSUBRtoR(int to,int from); + +void PFMULMtoR(int to,int from); +void PFMULRtoR(int to,int from); + +void PFRCPMtoR(int to,int from); +void PFRCPRtoR(int to,int from); +void PFRCPIT1RtoR(int to,int from); +void PFRCPIT2RtoR(int to,int from); + +void PFRSQRTRtoR(int to,int from); +void PFRSQIT1RtoR(int to,int from); + +void PF2IDMtoR(int to,int from); +void PF2IDRtoR(int to,int from); +void PI2FDMtoR(int to,int from); +void PI2FDRtoR(int to,int from); + +void PFMAXMtoR(int to,int from); +void PFMAXRtoR(int to,int from); +void PFMINMtoR(int to,int from); +void PFMINRtoR(int to,int from); + +void MOVDMtoR(int to, u32 from); +void MOVDRtoM(u32 to, int from); +void MOVD32RtoR(int to, int from); +void MOVD64RtoR(int to, int from); + +void MOVQRtoR(int to,int from); + +//if to==from MMLO=MMHI +void PUNPCKHDQRtoR(int to,int from); + +//if to==from MMHI=MMLO +void PUNPCKLDQRtoR(int to,int from); + +/* + SSE intructions +*/ +void MOVAPSMtoR(int to,int from); +void MOVAPSRtoM(int to,int from); +void MOVAPSRtoR(int to,int from); + +void ORPSMtoR(int to,int from); +void ORPSRtoR(int to,int from); + +void XORPSMtoR(int to,int from); +void XORPSRtoR(int to,int from); + +void ANDPSMtoR(int to,int from); +void ANDPSRtoR(int to,int from); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/ix86_64/README b/libpcsxcore/ix86_64/README new file mode 100644 index 00000000..af24e37f --- /dev/null +++ b/libpcsxcore/ix86_64/README @@ -0,0 +1,2 @@ +This is the AMD64 dynamic recompiler. +Made from opcodes from PCSX2 0.9.3 and the x86 recompiler modified to fit. ie. currently no AMD64/SSE specific code advantages. diff --git a/libpcsxcore/ix86_64/iGte.h b/libpcsxcore/ix86_64/iGte.h new file mode 100644 index 00000000..bcb2f4be --- /dev/null +++ b/libpcsxcore/ix86_64/iGte.h @@ -0,0 +1,79 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __IGTE_H__ +#define __IGTE_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "../r3000a.h" +#include "../psxmem.h" + +#define CP2_FUNC(f) \ +void gte##f(); \ +static void rec##f() { \ + iFlushRegs(); \ + MOV32ItoM((uptr)&psxRegs.code, (u32)psxRegs.code); \ + CALLFunc((uptr)gte##f); \ +/* branch = 2; */\ +} + +#define CP2_FUNCNC(f) \ +void gte##f(); \ +static void rec##f() { \ + iFlushRegs(); \ + CALLFunc((uptr)gte##f); \ +/* branch = 2; */\ +} + +CP2_FUNC(MFC2); +CP2_FUNC(MTC2); +CP2_FUNC(CFC2); +CP2_FUNC(CTC2); +CP2_FUNC(LWC2); +CP2_FUNC(SWC2); +CP2_FUNCNC(RTPS); +CP2_FUNC(OP); +CP2_FUNCNC(NCLIP); +CP2_FUNC(DPCS); +CP2_FUNC(INTPL); +CP2_FUNC(MVMVA); +CP2_FUNCNC(NCDS); +CP2_FUNCNC(NCDT); +CP2_FUNCNC(CDP); +CP2_FUNCNC(NCCS); +CP2_FUNCNC(CC); +CP2_FUNCNC(NCS); +CP2_FUNCNC(NCT); +CP2_FUNC(SQR); +CP2_FUNC(DCPL); +CP2_FUNCNC(DPCT); +CP2_FUNCNC(AVSZ3); +CP2_FUNCNC(AVSZ4); +CP2_FUNCNC(RTPT); +CP2_FUNC(GPF); +CP2_FUNC(GPL); +CP2_FUNCNC(NCCT); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/ix86_64/iR3000A-64.c b/libpcsxcore/ix86_64/iR3000A-64.c new file mode 100644 index 00000000..4ca3e996 --- /dev/null +++ b/libpcsxcore/ix86_64/iR3000A-64.c @@ -0,0 +1,2963 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* i386 assembly functions for R3000A core. +*/ + +#include "ix86-64.h" +#include "../r3000a.h" +#include "../psxhle.h" + +#include + +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + +uptr* psxRecLUT; + +#define PTRMULT (sizeof(uptr) / sizeof(u32)) + +#undef PC_REC +#undef PC_REC8 +#undef PC_REC16 +#undef PC_REC32 +#define PC_REC(x) (psxRecLUT[(x) >> 16] + PTRMULT * ((x) & 0xffff)) +#define PC_RECP(x) (*(uptr *)PC_REC(x)) + +#define RECMEM_SIZE (PTRMULT * 8 * 1024 * 1024) + +static char *recMem; /* the recompiled blocks will be here */ +static char *recRAM; /* and the ptr to the blocks here */ +static char *recROM; /* and here */ + +static u32 pc; /* recompiler pc */ +static u32 pcold; /* recompiler oldpc */ +static int count; /* recompiler intruction count */ +static int branch; /* set for branch */ +static u32 target; /* branch target */ +static u32 resp; + +typedef struct { + int state; + u32 k; + int reg; +} iRegisters; + +static iRegisters iRegs[32]; +static iRegisters iRegsS[32]; + +#define ST_UNK 0 +#define ST_CONST 1 +#define ST_MAPPED 2 + +#define IsConst(reg) (iRegs[reg].state == ST_CONST) +#define IsMapped(reg) (iRegs[reg].state == ST_MAPPED) + +static void (*recBSC[64])(); +static void (*recSPC[64])(); +static void (*recREG[32])(); +static void (*recCP0[32])(); +static void (*recCP2[64])(); +static void (*recCP2BSC[32])(); + +#define STACKSIZE 0x18 +static void StackRes() +{ +#ifdef __x86_64__ + ADD64ItoR(RSP, STACKSIZE); +#else + if (resp) ADD32ItoR(ESP, resp); +#endif +} + +static void MapConst(int reg, u32 _const) { + iRegs[reg].k = _const; + iRegs[reg].state = ST_CONST; +} + +static void iFlushReg(int reg) { + if (IsConst(reg)) { + MOV32ItoM((uptr)&psxRegs.GPR.r[reg], iRegs[reg].k); + } + iRegs[reg].state = ST_UNK; +} + +static void iFlushRegs() { + int i; + + for (i=1; i<32; i++) { + iFlushReg(i); + } +} + +static void iRet() { + /* store cycle */ + count = ((pc - pcold) / 4) * BIAS; + ADD32ItoM((uptr)&psxRegs.cycle, count); + StackRes(); + RET(); +} + +static int iLoadTest() { + u32 tmp; + + // check for load delay + tmp = psxRegs.code >> 26; + switch (tmp) { + case 0x10: // COP0 + switch (_Rs_) { + case 0x00: // MFC0 + case 0x02: // CFC0 + return 1; + } + break; + case 0x12: // COP2 + switch (_Funct_) { + case 0x00: + switch (_Rs_) { + case 0x00: // MFC2 + case 0x02: // CFC2 + return 1; + } + break; + } + break; + case 0x32: // LWC2 + return 1; + default: + if (tmp >= 0x20 && tmp <= 0x26) { // LB/LH/LWL/LW/LBU/LHU/LWR + return 1; + } + break; + } + return 0; +} + +/* set a pending branch */ +static void SetBranch() { + branch = 1; + psxRegs.code = PSXMu32(pc); + pc+=4; + + if (iLoadTest() == 1) { + iFlushRegs(); + MOV32ItoM((uptr)&psxRegs.code, psxRegs.code); + /* store cycle */ + count = ((pc - pcold) / 4) * BIAS; + ADD32ItoM((uptr)&psxRegs.cycle, count); + + //PUSH64M((uptr)&target); + MOV32MtoR(X86ARG2, (uptr)&target); + //PUSHI(_Rt_); + MOV64ItoR(X86ARG1, _Rt_); + CALLFunc((uptr)psxDelayTest); + StackRes(); + RET(); + return; + } + + recBSC[psxRegs.code>>26](); + + iFlushRegs(); + MOV32MtoR(EAX, (uptr)&target); + MOV32RtoM((uptr)&psxRegs.pc, EAX); + CALLFunc((uptr)psxBranchTest); + + iRet(); +} + +static void iJump(u32 branchPC) { + branch = 1; + psxRegs.code = PSXMu32(pc); + pc+=4; + + if (iLoadTest() == 1) { + iFlushRegs(); + MOV32ItoM((uptr)&psxRegs.code, psxRegs.code); + /* store cycle */ + count = ((pc - pcold) / 4) * BIAS; + ADD32ItoM((uptr)&psxRegs.cycle, count); + + //PUSHI(branchPC); + MOV64ItoR(X86ARG2, branchPC); + //PUSHI(_Rt_); + MOV64ItoR(X86ARG1, _Rt_); + CALLFunc((uptr)psxDelayTest); + //ADD32ItoR(ESP, 2*8); + StackRes(); + RET(); + return; + } + + recBSC[psxRegs.code>>26](); + + iFlushRegs(); + MOV32ItoM((uptr)&psxRegs.pc, branchPC); + CALLFunc((uptr)psxBranchTest); + /* store cycle */ + count = ((pc - pcold) / 4) * BIAS; + ADD32ItoM((uptr)&psxRegs.cycle, count); + StackRes(); + + RET(); + //* XXX? + // maybe just happened an interruption, check so + CMP32ItoM((uptr)&psxRegs.pc, branchPC); + j8Ptr[0] = JE8(0); + + RET(); + + x86SetJ8(j8Ptr[0]); + MOV64MtoR(RAX, PC_REC(branchPC)); + TEST64RtoR(RAX,RAX); + j8Ptr[1] = JNE8(0); + + RET(); + + x86SetJ8(j8Ptr[1]); + + RET(); + //JMP32R(EAX); + JMPR(EAX); + //*/ +} + +static void iBranch(u32 branchPC, int savectx) { + u32 respold=0; + + if (savectx) { + respold = resp; + memcpy(iRegsS, iRegs, sizeof(iRegs)); + } + + branch = 1; + psxRegs.code = PSXMu32(pc); + + // the delay test is only made when the branch is taken + // savectx == 0 will mean that :) + if (savectx == 0 && iLoadTest() == 1) { + iFlushRegs(); + MOV32ItoM((uptr)&psxRegs.code, psxRegs.code); + /* store cycle */ + count = (((pc+4) - pcold) / 4) * BIAS; + ADD32ItoM((uptr)&psxRegs.cycle, count); + //if (resp) ADD32ItoR(ESP, resp); + + //PUSHI(branchPC); + MOV64ItoR(X86ARG2, branchPC); + //PUSHI(_Rt_); + MOV64ItoR(X86ARG1,_Rt_); + CALLFunc((uptr)psxDelayTest); + StackRes(); + RET(); + return; + } + + pc+= 4; + recBSC[psxRegs.code>>26](); + + iFlushRegs(); + MOV32ItoM((uptr)&psxRegs.pc, branchPC); + CALLFunc((uptr)psxBranchTest); + /* store cycle */ + count = ((pc - pcold) / 4) * BIAS; + ADD32ItoM((uptr)&psxRegs.cycle, count); + + StackRes(); + + // maybe just happened an interruption, check so + CMP32ItoM((uptr)&psxRegs.pc, branchPC); + j8Ptr[1] = JE8(0); + + RET(); + + x86SetJ8(j8Ptr[1]); + MOV64MtoR(RAX, PC_REC(branchPC)); + TEST64RtoR(RAX, RAX); + j8Ptr[2] = JNE8(0); + + RET(); + + x86SetJ8(j8Ptr[2]); + //JMP32R(EAX); + JMPR(EAX); + + pc-= 4; + if (savectx) { + resp = respold; + memcpy(iRegs, iRegsS, sizeof(iRegs)); + } +} + + +char *txt0 = "EAX = %x : ECX = %x : EDX = %x\n"; +char *txt1 = "EAX = %x\n"; +char *txt2 = "M32 = %x\n"; + +/* +void iLogX86() { + PUSHA32(); + + PUSH32R (EDX); + PUSH32R (ECX); + PUSH32R (EAX); + PUSH32M ((uptr)&txt0); + CALLFunc((uptr)SysPrintf); + ADD32ItoR(ESP, 4*4); + + POPA32(); +} +*/ + +void iLogEAX() { + PUSH64R (EAX); + PUSH64M ((uptr)&txt1); + CALLFunc((uptr)SysPrintf); + ADD32ItoR(ESP, 8*2); +} + +void iLogM32(u32 mem) { + PUSH64M (mem); + PUSH64M ((uptr)&txt2); + CALLFunc((uptr)SysPrintf); + ADD32ItoR(ESP, 8*2); +} + +static void iDumpRegs() { + int i, j; + + printf("%x %x\n", psxRegs.pc, psxRegs.cycle); + for (i = 0; i < 4; i++) { + for (j = 0; j < 8; j++) + printf("%x ", psxRegs.GPR.r[j*i]); + printf("\n"); + } +} + +void iDumpBlock(char *ptr) { + FILE *f; + u32 i; + + SysPrintf("dump1 %x:%x, %x\n", psxRegs.pc, pc, psxRegs.cycle); + + for (i = psxRegs.pc; i < pc; i+=4) + SysPrintf("%s\n", disR3000AF(PSXMu32(i), i)); + + fflush(stdout); + f = fopen("dump1", "w"); + fwrite(ptr, 1, (uptr)x86Ptr - (uptr)ptr, f); + fclose(f); + //system("ndisasm -b64 dump1"); + fflush(stdout); +} + +#define REC_FUNC(f) \ +void psx##f(); \ +static void rec##f() { \ + iFlushRegs(); \ + MOV32ItoM((uptr)&psxRegs.code, (u32)psxRegs.code); \ + MOV32ItoM((uptr)&psxRegs.pc, (u32)pc); \ + CALLFunc((uptr)psx##f); \ +/* branch = 2; */\ +} + +#define REC_SYS(f) \ +void psx##f(); \ +static void rec##f() { \ + iFlushRegs(); \ + MOV32ItoM((uptr)&psxRegs.code, (u32)psxRegs.code); \ + MOV32ItoM((uptr)&psxRegs.pc, (u32)pc); \ + CALLFunc((uptr)psx##f); \ + branch = 2; \ + iRet(); \ +} + +#define REC_BRANCH(f) \ +void psx##f(); \ +static void rec##f() { \ + iFlushRegs(); \ + MOV32ItoM((uptr)&psxRegs.code, (u32)psxRegs.code); \ + MOV32ItoM((uptr)&psxRegs.pc, (u32)pc); \ + CALLFunc((uptr)psx##f); \ + branch = 2; \ + iRet(); \ +} + +static void recRecompile(); + +static int recInit() { + int i; + + psxRecLUT = (uptr*) malloc(0x010000 * sizeof(uptr)); + + recMem = mmap(0, + RECMEM_SIZE + PTRMULT*0x1000, + PROT_EXEC | PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + + recRAM = mmap(0, + 0x280000*PTRMULT, + PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + recROM = &recRAM[0x200000*PTRMULT]; + + if (recRAM == NULL || recROM == NULL || recMem == NULL || psxRecLUT == NULL) { + SysMessage("Error allocating memory"); return -1; + } + memset(recMem, 0, RECMEM_SIZE); + memset(recRAM, 0, 0x200000 * PTRMULT); + memset(recROM, 0, 0x080000 * PTRMULT); + + for (i=0; i<0x80; i++) psxRecLUT[i + 0x0000] = (uptr)&recRAM[PTRMULT*((i & 0x1f) << 16)]; + memcpy(psxRecLUT + 0x8000, psxRecLUT, 0x80 * sizeof(uptr)); + memcpy(psxRecLUT + 0xa000, psxRecLUT, 0x80 * sizeof(uptr)); + + for (i=0; i<0x08; i++) psxRecLUT[i + 0xbfc0] = (uptr)&recROM[PTRMULT*(i << 16)]; + + return 0; +} + +static void recReset() { + memset(recRAM, 0, 0x200000 * PTRMULT); + memset(recROM, 0, 0x080000 * PTRMULT); + + //x86Init(); + cpudetectInit(); + x86SetPtr(recMem); + + branch = 0; + memset(iRegs, 0, sizeof(iRegs)); + iRegs[0].state = ST_CONST; + iRegs[0].k = 0; +} + +static void recShutdown() { + if (recMem == NULL) return; + free(psxRecLUT); + munmap(recMem, RECMEM_SIZE + PTRMULT*0x1000); + munmap(recRAM, 0x280000*PTRMULT); + x86Shutdown(); +} + +static void recError() { + SysReset(); + ClosePlugins(); + SysMessage("Unrecoverable error while running recompiler\n"); + SysRunGui(); +} + +/*__inline*/ static void execute() { + void (*recFunc)(); + uptr *p; + + p = (uptr *)PC_REC(psxRegs.pc); + // if (!p) { recError(); return; } + + if (*p == 0) { + recRecompile(); + } + + if (*p < (uptr)recMem || *p >= (uptr)recMem + RECMEM_SIZE) + { + recError(); + return; + } + recFunc = (void (*)())*p; + (*recFunc)(); +} + +static void recExecute() { + for (;;) execute(); +} + +static void recExecuteBlock() { + execute(); +} + +static void recClear(u32 Addr, u32 Size) { + memset((void*)PC_REC(Addr), 0, Size * sizeof(uptr)); +} + +static void recNULL() { +// SysMessage("recUNK: %8.8x\n", psxRegs.code); +} + +/********************************************************* +* goes to opcodes tables... * +* Format: table[something....] * +*********************************************************/ + +//REC_SYS(SPECIAL); +#if 1 +static void recSPECIAL() { + recSPC[_Funct_](); +} +#endif + +static void recREGIMM() { + recREG[_Rt_](); +} + +static void recCOP0() { + recCP0[_Rs_](); +} + +//REC_SYS(COP2); +#if 1 +static void recCOP2() { + recCP2[_Funct_](); +} +#endif + +static void recBASIC() { + recCP2BSC[_Rs_](); +} + +//end of Tables opcodes... + +/********************************************************* +* Arithmetic with immediate operand * +* Format: OP rt, rs, immediate * +*********************************************************/ + +#if 0 +REC_FUNC(ADDI); +REC_FUNC(ADDIU); +REC_FUNC(ANDI); +REC_FUNC(ORI); +REC_FUNC(XORI); +REC_FUNC(SLTI); +REC_FUNC(SLTIU); +#endif + +#if 1 +static void recADDIU() { +// Rt = Rs + Im + if (!_Rt_) return; + +// iFlushRegs(); + + if (_Rs_ == _Rt_) { + if (IsConst(_Rt_)) { + iRegs[_Rt_].k+= _Imm_; + } else { + if (_Imm_ == 1) { + INC32M((uptr)&psxRegs.GPR.r[_Rt_]); + } else if (_Imm_ == -1) { + DEC32M((uptr)&psxRegs.GPR.r[_Rt_]); + } else if (_Imm_) { + ADD32ItoM((uptr)&psxRegs.GPR.r[_Rt_], _Imm_); + } + } + } else { + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k + _Imm_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + if (_Imm_ == 1) { + INC32R(EAX); + } else if (_Imm_ == -1) { + DEC32R(EAX); + } else if (_Imm_) { + ADD32ItoR(EAX, _Imm_); + } + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + } + } +} + +static void recADDI() { +// Rt = Rs + Im + recADDIU(); +} + +static void recSLTI() { +// Rt = Rs < Im (signed) + if (!_Rt_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + MapConst(_Rt_, (s32)iRegs[_Rs_].k < _Imm_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + CMP32ItoR(EAX, _Imm_); + SETL8R (EAX); + AND32ItoR(EAX, 0xff); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + } +} + +static void recSLTIU() { +// Rt = Rs < Im (unsigned) + if (!_Rt_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k < _ImmU_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + CMP32ItoR(EAX, _Imm_); + SETB8R (EAX); + AND32ItoR(EAX, 0xff); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + } +} + +static void recANDI() { +// Rt = Rs And Im + if (!_Rt_) return; + +// iFlushRegs(); + + if (_Rs_ == _Rt_) { + if (IsConst(_Rt_)) { + iRegs[_Rt_].k&= _ImmU_; + } else { + AND32ItoM((uptr)&psxRegs.GPR.r[_Rt_], _ImmU_); + } + } else { + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k & _ImmU_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + AND32ItoR(EAX, _ImmU_); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + } + } +} + +static void recORI() { +// Rt = Rs Or Im + if (!_Rt_) return; + +// iFlushRegs(); + + if (_Rs_ == _Rt_) { + if (IsConst(_Rt_)) { + iRegs[_Rt_].k|= _ImmU_; + } else { + OR32ItoM((uptr)&psxRegs.GPR.r[_Rt_], _ImmU_); + } + } else { + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k | _ImmU_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + if (_ImmU_) OR32ItoR (EAX, _ImmU_); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + } + } +} + +static void recXORI() { +// Rt = Rs Xor Im + if (!_Rt_) return; + +// iFlushRegs(); + + if (_Rs_ == _Rt_) { + if (IsConst(_Rt_)) { + iRegs[_Rt_].k^= _ImmU_; + } else { + XOR32ItoM((uptr)&psxRegs.GPR.r[_Rt_], _ImmU_); + } + } else { + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k ^ _ImmU_); + } else { + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + XOR32ItoR(EAX, _ImmU_); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + } + } +} +#endif +//end of * Arithmetic with immediate operand + +/********************************************************* +* Load higher 16 bits of the first word in GPR with imm * +* Format: OP rt, immediate * +*********************************************************/ +//REC_FUNC(LUI); +#if 1 +static void recLUI() { +// Rt = Imm << 16 + if (!_Rt_) return; + + MapConst(_Rt_, psxRegs.code << 16); +} +#endif +//End of Load Higher ..... + + +/********************************************************* +* Register arithmetic * +* Format: OP rd, rs, rt * +*********************************************************/ + + +#if 0 +REC_FUNC(ADD); +REC_FUNC(ADDU); +REC_FUNC(SUB); +REC_FUNC(SUBU); +REC_FUNC(AND); +REC_FUNC(OR); +REC_FUNC(XOR); +REC_FUNC(NOR); +REC_FUNC(SLT); +REC_FUNC(SLTU); +#endif + +#if 1 +static void recADDU() { +// Rd = Rs + Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k + iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + if (_Rt_ == _Rd_) { + if (iRegs[_Rs_].k == 1) { + INC32M((uptr)&psxRegs.GPR.r[_Rd_]); + } else if (iRegs[_Rs_].k == -1) { + DEC32M((uptr)&psxRegs.GPR.r[_Rd_]); + } else if (iRegs[_Rs_].k) { + ADD32ItoM((uptr)&psxRegs.GPR.r[_Rd_], iRegs[_Rs_].k); + } + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + if (iRegs[_Rs_].k == 1) { + INC32R(EAX); + } else if (iRegs[_Rs_].k == 0xffffffff) { + DEC32R(EAX); + } else if (iRegs[_Rs_].k) { + ADD32ItoR(EAX, iRegs[_Rs_].k); + } + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + if (_Rs_ == _Rd_) { + if (iRegs[_Rt_].k == 1) { + INC32M((uptr)&psxRegs.GPR.r[_Rd_]); + } else if (iRegs[_Rt_].k == -1) { + DEC32M((uptr)&psxRegs.GPR.r[_Rd_]); + } else if (iRegs[_Rt_].k) { + ADD32ItoM((uptr)&psxRegs.GPR.r[_Rd_], iRegs[_Rt_].k); + } + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + if (iRegs[_Rt_].k == 1) { + INC32R(EAX); + } else if (iRegs[_Rt_].k == 0xffffffff) { + DEC32R(EAX); + } else if (iRegs[_Rt_].k) { + ADD32ItoR(EAX, iRegs[_Rt_].k); + } + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } + } else { + iRegs[_Rd_].state = ST_UNK; + + if (_Rs_ == _Rd_) { // Rd+= Rt + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + ADD32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else if (_Rt_ == _Rd_) { // Rd+= Rs + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + ADD32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else { // Rd = Rs + Rt + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + ADD32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } + } +} + +static void recADD() { +// Rd = Rs + Rt + recADDU(); +} + +static void recSUBU() { +// Rd = Rs - Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k - iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + SUB32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + SUB32ItoR(EAX, iRegs[_Rt_].k); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + SUB32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSUB() { +// Rd = Rs - Rt + recSUBU(); +} + +static void recAND() { +// Rd = Rs And Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k & iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + if (_Rd_ == _Rt_) { // Rd&= Rs + AND32ItoM((uptr)&psxRegs.GPR.r[_Rd_], iRegs[_Rs_].k); + } else { + MOV32ItoR(EAX, iRegs[_Rs_].k); + AND32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + if (_Rd_ == _Rs_) { // Rd&= kRt + AND32ItoM((uptr)&psxRegs.GPR.r[_Rd_], iRegs[_Rt_].k); + } else { // Rd = Rs & kRt + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + AND32ItoR(EAX, iRegs[_Rt_].k); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } + } else { + iRegs[_Rd_].state = ST_UNK; + + if (_Rs_ == _Rd_) { // Rd&= Rt + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + AND32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else if (_Rt_ == _Rd_) { // Rd&= Rs + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + AND32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else { // Rd = Rs & Rt + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + AND32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } + } +} + +static void recOR() { +// Rd = Rs Or Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k | iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + OR32MtoR (EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + OR32ItoR (EAX, iRegs[_Rt_].k); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + OR32MtoR (EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recXOR() { +// Rd = Rs Xor Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k ^ iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + XOR32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + XOR32ItoR(EAX, iRegs[_Rt_].k); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + XOR32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recNOR() { +// Rd = Rs Nor Rt + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, ~(iRegs[_Rs_].k | iRegs[_Rt_].k)); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + OR32MtoR (EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + NOT32R (EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + OR32ItoR (EAX, iRegs[_Rt_].k); + NOT32R (EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + OR32MtoR (EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + NOT32R (EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSLT() { +// Rd = Rs < Rt (signed) + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, (s32)iRegs[_Rs_].k < (s32)iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + CMP32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + SETL8R (EAX); + AND32ItoR(EAX, 0xff); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + CMP32ItoR(EAX, iRegs[_Rt_].k); + SETL8R (EAX); + AND32ItoR(EAX, 0xff); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + CMP32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + SETL8R (EAX); + AND32ItoR(EAX, 0xff); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSLTU() { +// Rd = Rs < Rt (unsigned) + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k < iRegs[_Rt_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rs_].k); + CMP32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + SBB32RtoR(EAX, EAX); + NEG32R (EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + CMP32ItoR(EAX, iRegs[_Rt_].k); + SBB32RtoR(EAX, EAX); + NEG32R (EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + CMP32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + SBB32RtoR(EAX, EAX); + NEG32R (EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} +#endif +//End of * Register arithmetic + +/********************************************************* +* Register mult/div & Register trap logic * +* Format: OP rs, rt * +*********************************************************/ + +#if 0 +REC_FUNC(MULT); +REC_FUNC(MULTU); +REC_FUNC(DIV); +REC_FUNC(DIVU); +#endif + +#if 1 +static void recMULT() { +// Lo/Hi = Rs * Rt (signed) + +// iFlushRegs(); + + if ((IsConst(_Rs_) && iRegs[_Rs_].k == 0) || + (IsConst(_Rt_) && iRegs[_Rt_].k == 0)) { + XOR32RtoR(EAX, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EAX); + return; + } + + if (IsConst(_Rs_)) { + MOV32ItoR(EAX, iRegs[_Rs_].k);// printf("multrsk %x\n", iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + } + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k);// printf("multrtk %x\n", iRegs[_Rt_].k); + IMUL32R (EDX); + } else { + IMUL32M ((uptr)&psxRegs.GPR.r[_Rt_]); + } + MOV32RtoM((uptr)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EDX); +} + +static void recMULTU() { +// Lo/Hi = Rs * Rt (unsigned) + +// iFlushRegs(); + + if ((IsConst(_Rs_) && iRegs[_Rs_].k == 0) || + (IsConst(_Rt_) && iRegs[_Rt_].k == 0)) { + XOR32RtoR(EAX, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EAX); + return; + } + + if (IsConst(_Rs_)) { + MOV32ItoR(EAX, iRegs[_Rs_].k);// printf("multursk %x\n", iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + } + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k);// printf("multurtk %x\n", iRegs[_Rt_].k); + MUL32R (EDX); + } else { + MUL32M ((uptr)&psxRegs.GPR.r[_Rt_]); + } + MOV32RtoM((uptr)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EDX); +} + +static void recDIV() { +// Lo/Hi = Rs / Rt (signed) + +// iFlushRegs(); + + if (IsConst(_Rt_)) { + if (iRegs[_Rt_].k == 0) return; + MOV32ItoR(ECX, iRegs[_Rt_].k);// printf("divrtk %x\n", iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rt_]); + CMP32ItoR(ECX, 0); + j8Ptr[0] = JE8(0); + } + if (IsConst(_Rs_)) { + MOV32ItoR(EAX, iRegs[_Rs_].k);// printf("divrsk %x\n", iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + } + CDQ(); + IDIV32R (ECX); + MOV32RtoM((uptr)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EDX); + if (!IsConst(_Rt_)) { + x86SetJ8(j8Ptr[0]); + } +} + +static void recDIVU() { +// Lo/Hi = Rs / Rt (unsigned) + +// iFlushRegs(); + + if (IsConst(_Rt_)) { + if (iRegs[_Rt_].k == 0) return; + MOV32ItoR(ECX, iRegs[_Rt_].k);// printf("divurtk %x\n", iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rt_]); + CMP32ItoR(ECX, 0); + j8Ptr[0] = JE8(0); + } + if (IsConst(_Rs_)) { + MOV32ItoR(EAX, iRegs[_Rs_].k);// printf("divursk %x\n", iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + } + XOR32RtoR(EDX, EDX); + DIV32R (ECX); + MOV32RtoM((uptr)&psxRegs.GPR.n.lo, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EDX); + if (!IsConst(_Rt_)) { + x86SetJ8(j8Ptr[0]); + } +} +#endif +//End of * Register mult/div & Register trap logic + +#if 0 +REC_FUNC(LB); +REC_FUNC(LBU); +REC_FUNC(LH); +REC_FUNC(LHU); +REC_FUNC(LW); + +REC_FUNC(SB); +REC_FUNC(SH); +REC_FUNC(SW); + +REC_FUNC(LWL); +REC_FUNC(LWR); +REC_FUNC(SWL); +REC_FUNC(SWR); +#endif + + +static void SetArg_OfB(x86IntRegType arg) { + if (IsConst(_Rs_)) +#ifdef __x86_64__ + MOV64ItoR(arg, iRegs[_Rs_].k + _Imm_); +#else + PUSH32I (iRegs[_Rs_].k + _Imm_); +#endif + else { +#ifdef __x86_64__ + MOV32MtoR(arg, (uptr)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) + ADD32ItoR(arg, _Imm_); +#else + if (_Imm_) { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + ADD32ItoR(EAX, _Imm_); + PUSH32R (EAX); + } else { + PUSH32M ((u32)&psxRegs.GPR.r[_Rs_]); + } +#endif + } +#ifndef __x86_64__ + resp += 4; +#endif +} + +#if 1 +static void recLB() { +// Rt = mem[Rs + Im] (signed) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRs8(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVSX32M8toR(EAX, (uptr)&psxM[addr & 0x1fffff]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVSX32M8toR(EAX, (uptr)&psxH[addr & 0xfff]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } +// SysPrintf("unhandled r8 %x\n", addr); + } + + SetArg_OfB(X86ARG1); + CALLFunc((uptr)psxMemRead8); + if (_Rt_) { + iRegs[_Rt_].state = ST_UNK; + MOVSX32R8toR(EAX, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + } +// ADD32ItoR(ESP, 4); +} + +static void recLBU() { +// Rt = mem[Rs + Im] (unsigned) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRu8(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVZX32M8toR(EAX, (uptr)&psxM[addr & 0x1fffff]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVZX32M8toR(EAX, (uptr)&psxH[addr & 0xfff]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } +// SysPrintf("unhandled r8u %x\n", addr); + } + + SetArg_OfB(X86ARG1); + CALLFunc((uptr)psxMemRead8); + if (_Rt_) { + iRegs[_Rt_].state = ST_UNK; + MOVZX32R8toR(EAX, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + } +// ADD32ItoR(ESP, 4); +} + +static void recLH() { +// Rt = mem[Rs + Im] (signed) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRs16(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVSX32M16toR(EAX, (uptr)&psxM[addr & 0x1fffff]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVSX32M16toR(EAX, (uptr)&psxH[addr & 0xfff]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } +// SysPrintf("unhandled r16 %x\n", addr); + } + + SetArg_OfB(X86ARG1); + CALLFunc((uptr)psxMemRead16); + if (_Rt_) { + iRegs[_Rt_].state = ST_UNK; + MOVSX32R16toR(EAX, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + } +// ADD32ItoR(ESP, 4); +} + +static void recLHU() { +// Rt = mem[Rs + Im] (unsigned) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRu16(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVZX32M16toR(EAX, (uptr)&psxM[addr & 0x1fffff]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOVZX32M16toR(EAX, (uptr)&psxH[addr & 0xfff]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80) { + if (addr >= 0x1f801c00 && addr < 0x1f801e00) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + //PUSHI (addr); + MOV64ItoR(X86ARG1, addr); + //CALLFunc ((uptr)SPU_readRegister); + MOV64ItoR(RAX, (uptr)SPU_readRegister); + CALL64R(RAX); + MOVZX32R16toR(EAX, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); +#ifndef __WIN32__ + resp+= 4; +#endif + return; + } + switch (addr) { + case 0x1f801100: case 0x1f801110: case 0x1f801120: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + //PUSHI((addr >> 4) & 0x3); + MOV64ItoR(X86ARG1, (addr >> 4) & 0x3); + CALLFunc((uptr)psxRcntRcount); + MOVZX32R16toR(EAX, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + resp+= 4; + return; + + case 0x1f801104: case 0x1f801114: case 0x1f801124: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOV64ItoR(X86ARG1, (addr >> 4) & 0x3); + CALLFunc((uptr)psxRcntRmode); + MOVZX32R16toR(EAX, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + resp+= 4; + return; + + case 0x1f801108: case 0x1f801118: case 0x1f801128: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOV64ItoR(X86ARG1, (addr >> 4) & 0x3); + CALLFunc((uptr)psxRcntRtarget); + MOVZX32R16toR(EAX, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + resp+= 4; + return; + } + } +// SysPrintf("unhandled r16u %x\n", addr); + } + + SetArg_OfB(X86ARG1); + CALLFunc((uptr)psxMemRead16); + if (_Rt_) { + iRegs[_Rt_].state = ST_UNK; + MOVZX32R16toR(EAX, EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + } +// ADD32ItoR(ESP, 4); +} + +static void recLW() { +// Rt = mem[Rs + Im] (unsigned) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRu32(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxM[addr & 0x1fffff]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxH[addr & 0xfff]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80) { + switch (addr) { + case 0x1f801080: case 0x1f801084: case 0x1f801088: + case 0x1f801090: case 0x1f801094: case 0x1f801098: + case 0x1f8010a0: case 0x1f8010a4: case 0x1f8010a8: + case 0x1f8010b0: case 0x1f8010b4: case 0x1f8010b8: + case 0x1f8010c0: case 0x1f8010c4: case 0x1f8010c8: + case 0x1f8010d0: case 0x1f8010d4: case 0x1f8010d8: + case 0x1f8010e0: case 0x1f8010e4: case 0x1f8010e8: + case 0x1f801070: case 0x1f801074: + case 0x1f8010f0: case 0x1f8010f4: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxH[addr & 0xffff]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + + case 0x1f801810: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + CALLFunc((uptr)GPU_readData); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + + case 0x1f801814: + if (!_Rt_) return; + iRegs[_Rt_].state = ST_UNK; + + CALLFunc((uptr)GPU_readStatus); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + } +// SysPrintf("unhandled r32 %x\n", addr); + } + + SetArg_OfB(X86ARG1); + CALLFunc((uptr)psxMemRead32); + if (_Rt_) { + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + } +// ADD32ItoR(ESP, 4); +} + +extern u32 LWL_MASK[4]; +extern u32 LWL_SHIFT[4]; + +void iLWLk(u32 shift) { + if (IsConst(_Rt_)) { + MOV32ItoR(ECX, iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rt_]); + } + AND32ItoR(ECX, LWL_MASK[shift]); + SHL32ItoR(EAX, LWL_SHIFT[shift]); + OR32RtoR (EAX, ECX); +} + +void recLWL() { +// Rt = Rt Merge mem[Rs + Im] + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (uptr)&psxM[addr & 0x1ffffc]); + iLWLk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (uptr)&psxH[addr & 0xffc]); + iLWLk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + } + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + //PUSH64R (EAX); + AND32ItoR(EAX, ~3); + //PUSH64R (EAX); + MOV32RtoR(X86ARG1, EAX); + CALLFunc((uptr)psxMemRead32); + + if (_Rt_) { + //ADD32ItoR(ESP, 4); + //POP64R (EDX); + if (IsConst(_Rs_)) MOV32ItoR(EDX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EDX, (uptr)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EDX, _Imm_); + } + + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV64ItoR(ECX, (uptr)LWL_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + SHL32CLtoR(EAX); // mem(EAX) << LWL_SHIFT[shift] + + MOV64ItoR(ECX, (uptr)LWL_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (uptr)&psxRegs.GPR.r[_Rt_]); + } + AND32RtoR(EDX, ECX); // _rRt_ & LWL_MASK[shift] + + OR32RtoR(EAX, EDX); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + //} else { + //ADD64ItoR(RSP, 8); + //resp+= 8; + } +} + +/* +static void recLWBlock(int count) { + u32 *code = PSXM(pc); + int i, respsave; +// Rt = mem[Rs + Im] (unsigned) + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + // since bios is readonly it won't change + for (i=0; i> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (uptr)&psxM[addr & 0x1ffffc]); + iLWRk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (uptr)&psxH[addr & 0xffc]); + iLWRk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + } + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + PUSHR(EAX); + AND32ItoR(EAX, ~3); + MOV32RtoR(X86ARG1, EAX); + CALLFunc((uptr)psxMemRead32); + + POPR (EDX); + if (_Rt_) { + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV64ItoR(ECX, (uptr)LWR_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + SHR32CLtoR(EAX); // mem(EAX) >> LWR_SHIFT[shift] + + MOV64ItoR(ECX, (uptr)LWR_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (uptr)&psxRegs.GPR.r[_Rt_]); + } + AND32RtoR(EDX, ECX); // _rRt_ & LWR_MASK[shift] + + OR32RtoR(EAX, EDX); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); + //} else { + //resp+= 8; + } +} + +static void recSB() { +// mem[Rs + Im] = Rt + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (IsConst(_Rt_)) { + MOV8ItoM((uptr)&psxM[addr & 0x1fffff], (u8)iRegs[_Rt_].k); + } else { + MOV8MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV8RtoM((uptr)&psxM[addr & 0x1fffff], EAX); + } + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (IsConst(_Rt_)) { + MOV8ItoM((uptr)&psxH[addr & 0xfff], (u8)iRegs[_Rt_].k); + } else { + MOV8MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV8RtoM((uptr)&psxH[addr & 0xfff], EAX); + } + return; + } +// SysPrintf("unhandled w8 %x\n", addr); + } + + if (IsConst(_Rt_)) { + MOV64ItoR(X86ARG2, iRegs[_Rt_].k); + } else { + MOV32MtoR(X86ARG2, (uptr)&psxRegs.GPR.r[_Rt_]); + } + SetArg_OfB(X86ARG1); + CALLFunc((uptr)psxMemWrite8); +// ADD32ItoR(ESP, 8); +} + +static void recSH() { +// mem[Rs + Im] = Rt + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (IsConst(_Rt_)) { + MOV16ItoM((uptr)&psxM[addr & 0x1fffff], (u16)iRegs[_Rt_].k); + } else { + MOV16MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV16RtoM((uptr)&psxM[addr & 0x1fffff], EAX); + } + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (IsConst(_Rt_)) { + MOV16ItoM((uptr)&psxH[addr & 0xfff], (u16)iRegs[_Rt_].k); + } else { + MOV16MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV16RtoM((uptr)&psxH[addr & 0xfff], EAX); + } + return; + } + if (t == 0x1f80) { + if (addr >= 0x1f801c00 && addr < 0x1f801e00) { + if (IsConst(_Rt_)) { + MOV64ItoR(X86ARG2, iRegs[_Rt_].k); + } else { + MOV32MtoR(X86ARG2, (uptr)&psxRegs.GPR.r[_Rt_]); + } + MOV64ItoR(X86ARG1, addr); + CALLFunc ((uptr)SPU_writeRegister); +#ifndef __WIN32__ + //resp+= 8; +#endif + return; + } + } +// SysPrintf("unhandled w16 %x\n", addr); + } + + if (IsConst(_Rt_)) { + MOV64ItoR(X86ARG2, iRegs[_Rt_].k); + } else { + MOV32MtoR(X86ARG2, (uptr)&psxRegs.GPR.r[_Rt_]); + } + SetArg_OfB(X86ARG1); + CALLFunc((uptr)psxMemWrite16); +// ADD32ItoR(ESP, 8); +} + +static void recSW() { +// mem[Rs + Im] = Rt + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (IsConst(_Rt_)) { + MOV32ItoM((uptr)&psxM[addr & 0x1fffff], iRegs[_Rt_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxM[addr & 0x1fffff], EAX); + } + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (IsConst(_Rt_)) { + MOV32ItoM((uptr)&psxH[addr & 0xfff], iRegs[_Rt_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxH[addr & 0xfff], EAX); + } + return; + } + if (t == 0x1f80) { + switch (addr) { + case 0x1f801080: case 0x1f801084: + case 0x1f801090: case 0x1f801094: + case 0x1f8010a0: case 0x1f8010a4: + case 0x1f8010b0: case 0x1f8010b4: + case 0x1f8010c0: case 0x1f8010c4: + case 0x1f8010d0: case 0x1f8010d4: + case 0x1f8010e0: case 0x1f8010e4: + case 0x1f801074: + case 0x1f8010f0: + if (IsConst(_Rt_)) { + MOV32ItoM((uptr)&psxH[addr & 0xffff], iRegs[_Rt_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32RtoM((uptr)&psxH[addr & 0xffff], EAX); + } + return; + + case 0x1f801810: + if (IsConst(_Rt_)) { + MOV64ItoR(X86ARG1, iRegs[_Rt_].k); + } else { + MOV32MtoR(X86ARG1, (uptr)&psxRegs.GPR.r[_Rt_]); + } + CALLFunc((uptr)GPU_writeData); +#ifndef __WIN32__ + //resp+= 4; +#endif + return; + + case 0x1f801814: + if (IsConst(_Rt_)) { + MOV64ItoR(X86ARG1, iRegs[_Rt_].k); + } else { + MOV32MtoR(X86ARG1, (uptr)&psxRegs.GPR.r[_Rt_]); + } + CALLFunc((uptr)GPU_writeStatus); +#ifndef __WIN32__ + //resp+= 4; +#endif + } + } +// SysPrintf("unhandled w32 %x\n", addr); + } + + if (IsConst(_Rt_)) { + MOV64ItoR(X86ARG2, iRegs[_Rt_].k); + } else { + MOV32MtoR(X86ARG2, (uptr)&psxRegs.GPR.r[_Rt_]); + } + SetArg_OfB(X86ARG1); + CALLFunc((uptr)psxMemWrite32); +// ADD32ItoR(ESP, 8); + //resp+= 8; +} + +/* +static void recSWBlock(int count) { + u32 *code; + int i, respsave; +// mem[Rs + Im] = Rt + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + code = PSXM(pc); + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + for (i=0; i> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (uptr)&psxM[addr & 0x1ffffc]); + iSWLk(addr & 3); + MOV32RtoM((uptr)&psxM[addr & 0x1ffffc], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (uptr)&psxH[addr & 0xffc]); + iSWLk(addr & 3); + MOV32RtoM((uptr)&psxH[addr & 0xffc], EAX); + return; + } + } + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + PUSHR (EAX); + AND32ItoR(EAX, ~3); + MOV32RtoR(X86ARG1, EAX); + + CALLFunc((uptr)psxMemRead32); + + POPR (EDX); + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV64ItoR(ECX, (uptr)SWL_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + AND32RtoR(EAX, ECX); // mem & SWL_MASK[shift] + + MOV64ItoR(ECX, (uptr)SWL_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (uptr)&psxRegs.GPR.r[_Rt_]); + } + SHR32CLtoR(EDX); // _rRt_ >> SWL_SHIFT[shift] + + OR32RtoR (EAX, EDX); + MOV32RtoR(X86ARG2, EAX); + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + AND32ItoR(EAX, ~3); + MOV32RtoR(X86ARG1, EAX); + + CALLFunc((uptr)psxMemWrite32); +// ADD32ItoR(ESP, 8); + //resp+= 8; +} + +extern u32 SWR_MASK[4]; +extern u32 SWR_SHIFT[4]; + +void iSWRk(u32 shift) { + if (IsConst(_Rt_)) { + MOV32ItoR(ECX, iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rt_]); + } + SHL32ItoR(ECX, SWR_SHIFT[shift]); + AND32ItoR(EAX, SWR_MASK[shift]); + OR32RtoR (EAX, ECX); +} + +void recSWR() { +// mem[Rs + Im] = Rt Merge mem[Rs + Im] + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (uptr)&psxM[addr & 0x1ffffc]); + iSWRk(addr & 3); + MOV32RtoM((uptr)&psxM[addr & 0x1ffffc], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (uptr)&psxH[addr & 0xffc]); + iSWRk(addr & 3); + MOV32RtoM((uptr)&psxH[addr & 0xffc], EAX); + return; + } + } + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + PUSHR (EAX); + + AND32ItoR(EAX, ~3); + MOV32RtoR(X86ARG1, EAX); + + CALLFunc((uptr)psxMemRead32); + + POPR (EDX); + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV64ItoR(ECX, (uptr)SWR_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + AND32RtoR(EAX, ECX); // mem & SWR_MASK[shift] + + MOV64ItoR(ECX, (uptr)SWR_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (uptr)&psxRegs.GPR.r[_Rt_]); + } + SHL32CLtoR(EDX); // _rRt_ << SWR_SHIFT[shift] + + OR32RtoR (EAX, EDX); + MOV32RtoR(X86ARG2, EAX); + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + AND32ItoR(EAX, ~3); + MOV32RtoR(X86ARG1, EAX); + CALLFunc((uptr)psxMemWrite32); +// ADD32ItoR(ESP, 8); + //resp+= 8; +} + +#endif + +#if 0 +REC_FUNC(SLL); +REC_FUNC(SRL); +REC_FUNC(SRA); +#endif +#if 1 +static void recSLL() { +// Rd = Rt << Sa + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rt_].k << _Sa_); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + if (_Sa_) SHL32ItoR(EAX, _Sa_); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSRL() { +// Rd = Rt >> Sa + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rt_].k >> _Sa_); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + if (_Sa_) SHR32ItoR(EAX, _Sa_); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSRA() { +// Rd = Rt >> Sa + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rt_)) { + MapConst(_Rd_, (s32)iRegs[_Rt_].k >> _Sa_); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + if (_Sa_) SAR32ItoR(EAX, _Sa_); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} +#endif + +#if 0 +REC_FUNC(SLLV); +REC_FUNC(SRLV); +REC_FUNC(SRAV); +#endif + +#if 1 +static void recSLLV() { +// Rd = Rt << Rs + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rt_) && IsConst(_Rs_)) { + MapConst(_Rd_, iRegs[_Rt_].k << iRegs[_Rs_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32ItoR(ECX, iRegs[_Rs_].k); + SHL32CLtoR(EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rt_].k); + MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rs_]); + SHL32CLtoR(EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rs_]); + SHL32CLtoR(EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSRLV() { +// Rd = Rt >> Rs + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rt_) && IsConst(_Rs_)) { + MapConst(_Rd_, iRegs[_Rt_].k >> iRegs[_Rs_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32ItoR(ECX, iRegs[_Rs_].k); + SHR32CLtoR(EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rt_].k); + MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rs_]); + SHR32CLtoR(EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rs_]); + SHR32CLtoR(EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} + +static void recSRAV() { +// Rd = Rt >> Rs + if (!_Rd_) return; + +// iFlushRegs(); + + if (IsConst(_Rt_) && IsConst(_Rs_)) { + MapConst(_Rd_, (s32)iRegs[_Rt_].k >> iRegs[_Rs_].k); + } else if (IsConst(_Rs_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32ItoR(ECX, iRegs[_Rs_].k); + SAR32CLtoR(EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else if (IsConst(_Rt_)) { + iRegs[_Rd_].state = ST_UNK; + + MOV32ItoR(EAX, iRegs[_Rt_].k); + MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rs_]); + SAR32CLtoR(EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } else { + iRegs[_Rd_].state = ST_UNK; + + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + MOV32MtoR(ECX, (uptr)&psxRegs.GPR.r[_Rs_]); + SAR32CLtoR(EAX); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); + } +} +#endif + +#if 0 +REC_SYS(SYSCALL); +REC_SYS(BREAK); +#endif + +int dump = 0; + +#if 1 +static void recSYSCALL() { +// dump=1; + iFlushRegs(); + + MOV32ItoR(EAX, pc - 4); + MOV32RtoM((uptr)&psxRegs.pc, EAX); + MOV64ItoR(X86ARG2, branch == 1 ? 1 : 0); + MOV64ItoR(X86ARG1, 0x20); + CALLFunc((uptr)psxException); + //ADD32ItoR(ESP, 8); + + branch = 2; + iRet(); +} + +static void recBREAK() { +} +#endif + +#if 0 +REC_FUNC(MFHI); +REC_FUNC(MTHI); +REC_FUNC(MFLO); +REC_FUNC(MTLO); +#endif +#if 1 +static void recMFHI() { +// Rd = Hi + if (!_Rd_) return; + + iRegs[_Rd_].state = ST_UNK; + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.n.hi); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); +} + +static void recMTHI() { +// Hi = Rs + + if (IsConst(_Rs_)) { + MOV32ItoM((uptr)&psxRegs.GPR.n.hi, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((uptr)&psxRegs.GPR.n.hi, EAX); + } +} + +static void recMFLO() { +// Rd = Lo + if (!_Rd_) return; + + iRegs[_Rd_].state = ST_UNK; + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.n.lo); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rd_], EAX); +} + +static void recMTLO() { +// Lo = Rs + + if (IsConst(_Rs_)) { + MOV32ItoM((uptr)&psxRegs.GPR.n.lo, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((uptr)&psxRegs.GPR.n.lo, EAX); + } +} +#endif + +#if 0 +REC_BRANCH(J); +REC_BRANCH(JR); +REC_BRANCH(JAL); +REC_BRANCH(JALR); +REC_BRANCH(BLTZ); +REC_BRANCH(BGTZ); +REC_BRANCH(BLTZAL); +REC_BRANCH(BGEZAL); +REC_BRANCH(BNE); +REC_BRANCH(BEQ); +REC_BRANCH(BLEZ); +REC_BRANCH(BGEZ); +#endif +#if 1 +static void recBLTZ() { +// Branch if Rs < 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + + if (bpc == pc+4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k < 0) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMP32ItoM((uptr)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JL32(0); + + iBranch(pc+4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc+=4; +} + +static void recBGTZ() { +// Branch if Rs > 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc+4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k > 0) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMP32ItoM((uptr)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JG32(0); + + iBranch(pc+4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc+=4; +} + +static void recBLTZAL() { +// Branch if Rs < 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc+4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k < 0) { + MOV32ItoM((uptr)&psxRegs.GPR.r[31], pc + 4); + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMP32ItoM((uptr)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JL32(0); + + iBranch(pc+4, 1); + + x86SetJ32(j32Ptr[4]); + + MOV32ItoM((uptr)&psxRegs.GPR.r[31], pc + 4); + iBranch(bpc, 0); + pc+=4; +} + +static void recBGEZAL() { +// Branch if Rs >= 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc+4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k >= 0) { + MOV32ItoM((uptr)&psxRegs.GPR.r[31], pc + 4); + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMP32ItoM((uptr)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JGE32(0); + + iBranch(pc+4, 1); + + x86SetJ32(j32Ptr[4]); + + MOV32ItoM((uptr)&psxRegs.GPR.r[31], pc + 4); + iBranch(bpc, 0); + pc+=4; +} + +static void recJ() { +// j target + + iJump(_Target_ * 4 + (pc & 0xf0000000)); +} + +static void recJAL() { +// jal target + + MapConst(31, pc + 4); + + iJump(_Target_ * 4 + (pc & 0xf0000000)); +} + +static void recJR() { +// jr Rs + + if (IsConst(_Rs_)) { + MOV32ItoM((uptr)&target, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((uptr)&target, EAX); + } + + SetBranch(); +} + +static void recJALR() { +// jalr Rs + + if (IsConst(_Rs_)) { + MOV32ItoM((uptr)&target, iRegs[_Rs_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + MOV32RtoM((uptr)&target, EAX); + } + + if (_Rd_) { + MapConst(_Rd_, pc + 4); + } + + SetBranch(); +} + +static void recBEQ() { +// Branch if Rs == Rt + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc+4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (_Rs_ == _Rt_) { + iJump(bpc); + } else { + if (IsConst(_Rs_) && IsConst(_Rt_)) { + if (iRegs[_Rs_].k == iRegs[_Rt_].k) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } else if (IsConst(_Rs_)) { + CMP32ItoM((uptr)&psxRegs.GPR.r[_Rt_], iRegs[_Rs_].k); + } else if (IsConst(_Rt_)) { + CMP32ItoM((uptr)&psxRegs.GPR.r[_Rs_], iRegs[_Rt_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + CMP32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + } + + j32Ptr[4] = JE32(0); + + iBranch(pc+4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc+=4; + } +} + +static void recBNE() { +// Branch if Rs != Rt + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc+4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + if (iRegs[_Rs_].k != iRegs[_Rt_].k) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } else if (IsConst(_Rs_)) { + CMP32ItoM((uptr)&psxRegs.GPR.r[_Rt_], iRegs[_Rs_].k); + } else if (IsConst(_Rt_)) { + CMP32ItoM((uptr)&psxRegs.GPR.r[_Rs_], iRegs[_Rt_].k); + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rs_]); + CMP32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + } + j32Ptr[4] = JNE32(0); + + iBranch(pc+4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc+=4; +} + +static void recBLEZ() { +// Branch if Rs <= 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc+4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k <= 0) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMP32ItoM((uptr)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JLE32(0); + + iBranch(pc+4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc+=4; +} + +static void recBGEZ() { +// Branch if Rs >= 0 + u32 bpc = _Imm_ * 4 + pc; + +// iFlushRegs(); + if (bpc == pc+4 && psxTestLoadDelay(_Rs_, PSXMu32(bpc)) == 0) { + return; + } + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k >= 0) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMP32ItoM((uptr)&psxRegs.GPR.r[_Rs_], 0); + j32Ptr[4] = JGE32(0); + + iBranch(pc+4, 1); + + x86SetJ32(j32Ptr[4]); + + iBranch(bpc, 0); + pc+=4; +} +#endif + +#if 0 +REC_FUNC(MFC0); +REC_SYS(MTC0); +REC_FUNC(CFC0); +REC_SYS(CTC0); +REC_FUNC(RFE); +#endif +//REC_SYS(MTC0); +#if 1 +static void recMFC0() { +// Rt = Cop0->Rd + if (!_Rt_) return; + + iRegs[_Rt_].state = ST_UNK; + MOV32MtoR(EAX, (uptr)&psxRegs.CP0.r[_Rd_]); + MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX); +} + +static void recCFC0() { +// Rt = Cop0->Rd + + recMFC0(); +} + +//* +void psxMTC0(); +static void recMTC0() { +// Cop0->Rd = Rt + + if (IsConst(_Rt_)) { + switch (_Rd_) { + case 12: + MOV32ItoM((uptr)&psxRegs.CP0.r[_Rd_], iRegs[_Rt_].k); + break; + case 13: + MOV32ItoM((uptr)&psxRegs.CP0.r[_Rd_], iRegs[_Rt_].k & ~(0xfc00)); + break; + default: + MOV32ItoM((uptr)&psxRegs.CP0.r[_Rd_], iRegs[_Rt_].k); + break; + } + } else { + MOV32MtoR(EAX, (uptr)&psxRegs.GPR.r[_Rt_]); + switch (_Rd_) { + case 13: + AND32ItoR(EAX, ~(0xfc00)); + break; + } + MOV32RtoM((uptr)&psxRegs.CP0.r[_Rd_], EAX); + } + + if (_Rd_ == 12 || _Rd_ == 13) { + iFlushRegs(); + MOV32ItoM((uptr)&psxRegs.pc, (u32)pc); + CALLFunc((uptr)psxTestSWInts); + if (branch == 0) { + branch = 2; + iRet(); + } + } +}//*/ + +static void recCTC0() { +// Cop0->Rd = Rt + + recMTC0(); +} + +static void recRFE() { + MOV32MtoR(EAX, (uptr)&psxRegs.CP0.n.Status); + MOV32RtoR(ECX, EAX); + AND32ItoR(EAX, 0xfffffff0); + AND32ItoR(ECX, 0x3c); + SHR32ItoR(ECX, 2); + OR32RtoR (EAX, ECX); + MOV32RtoM((uptr)&psxRegs.CP0.n.Status, EAX); + + iFlushRegs(); + MOV32ItoM((uptr)&psxRegs.pc, (u32)pc); + CALLFunc((uptr)psxTestSWInts); + if (branch == 0) { + branch = 2; + iRet(); + } +} +#endif + +#include "iGte.h" + +// + +static void recHLE() { + iFlushRegs(); + + CALLFunc((uptr)psxHLEt[psxRegs.code & 0xffff]); + branch = 2; + iRet(); +} + +// + +static void (*recBSC[64])() = { + recSPECIAL, recREGIMM, recJ , recJAL , recBEQ , recBNE , recBLEZ, recBGTZ, + recADDI , recADDIU , recSLTI, recSLTIU, recANDI, recORI , recXORI, recLUI , + recCOP0 , recNULL , recCOP2, recNULL , recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recNULL, recNULL , recNULL, recNULL, recNULL, recNULL, + recLB , recLH , recLWL , recLW , recLBU , recLHU , recLWR , recNULL, + recSB , recSH , recSWL , recSW , recNULL, recNULL, recSWR , recNULL, + recNULL , recNULL , recLWC2, recNULL , recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recSWC2, recHLE , recNULL, recNULL, recNULL, recNULL +}; + +static void (*recSPC[64])() = { + recSLL , recNULL, recSRL , recSRA , recSLLV , recNULL , recSRLV, recSRAV, + recJR , recJALR, recNULL, recNULL, recSYSCALL, recBREAK, recNULL, recNULL, + recMFHI, recMTHI, recMFLO, recMTLO, recNULL , recNULL , recNULL, recNULL, + recMULT, recMULTU, recDIV, recDIVU, recNULL , recNULL , recNULL, recNULL, + recADD , recADDU, recSUB , recSUBU, recAND , recOR , recXOR , recNOR , + recNULL, recNULL, recSLT , recSLTU, recNULL , recNULL , recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL , recNULL , recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL , recNULL , recNULL, recNULL +}; + +static void (*recREG[32])() = { + recBLTZ , recBGEZ , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recBLTZAL, recBGEZAL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL +}; + +static void (*recCP0[32])() = { + recMFC0, recNULL, recCFC0, recNULL, recMTC0, recNULL, recCTC0, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recRFE , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL +}; + +static void (*recCP2[64])() = { + recBASIC, recRTPS , recNULL , recNULL, recNULL, recNULL , recNCLIP, recNULL, // 00 + recNULL , recNULL , recNULL , recNULL, recOP , recNULL , recNULL , recNULL, // 08 + recDPCS , recINTPL, recMVMVA, recNCDS, recCDP , recNULL , recNCDT , recNULL, // 10 + recNULL , recNULL , recNULL , recNCCS, recCC , recNULL , recNCS , recNULL, // 18 + recNCT , recNULL , recNULL , recNULL, recNULL, recNULL , recNULL , recNULL, // 20 + recSQR , recDCPL , recDPCT , recNULL, recNULL, recAVSZ3, recAVSZ4, recNULL, // 28 + recRTPT , recNULL , recNULL , recNULL, recNULL, recNULL , recNULL , recNULL, // 30 + recNULL , recNULL , recNULL , recNULL, recNULL, recGPF , recGPL , recNCCT // 38 +}; + +static void (*recCP2BSC[32])() = { + recMFC2, recNULL, recCFC2, recNULL, recMTC2, recNULL, recCTC2, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL +}; + + +static void recRecompile() { + char *p; + char *ptr; + + dump = 0; + resp = 0; + + /* if x86Ptr reached the mem limit reset whole mem */ + if (((uptr)x86Ptr - (uptr)recMem) >= (RECMEM_SIZE - PTRMULT*0x10000)) + recReset(); + + x86Align(32); + ptr = x86Ptr; + + PC_RECP(psxRegs.pc) = x86Ptr; + pc = psxRegs.pc; + pcold = pc; + + //Make some stack space for function arguments spill (x86-64 calling conventions) + // 0x38 = 7 args, should be plenty... + SUB64ItoR(RSP, STACKSIZE); + + for (count=0; count<500;) { + p = (char *)PSXM(pc); + if (p == NULL) recError(); + psxRegs.code = *(u32 *)p; +/* + if ((psxRegs.code >> 26) == 0x23) { // LW + int i; + u32 code; + + for (i=1;; i++) { + p = (char *)PSXM(pc+i*4); + if (p == NULL) recError(); + code = *(u32 *)p; + + if ((code >> 26) != 0x23 || + _fRs_(code) != _Rs_ || + _fImm_(code) != (_Imm_+i*4)) + break; + } + if (i > 1) { + recLWBlock(i); + pc = pc + i*4; continue; + } + } + + if ((psxRegs.code >> 26) == 0x2b) { // SW + int i; + u32 code; + + for (i=1;; i++) { + p = (char *)PSXM(pc+i*4); + if (p == NULL) recError(); + code = *(u32 *)p; + + if ((code >> 26) != 0x2b || + _fRs_(code) != _Rs_ || + _fImm_(code) != (_Imm_+i*4)) + break; + } + if (i > 1) { + recSWBlock(i); + pc = pc + i*4; continue; + } + }*/ + + pc+=4; count++; + recBSC[psxRegs.code>>26](); + + if (branch) { + branch = 0; + if (dump) iDumpBlock(ptr); + return; + } + } + + iFlushRegs(); + + MOV32ItoM((uptr)&psxRegs.pc, pc); + iRet(); +} + + +R3000Acpu psxRec = { + recInit, + recReset, + recExecute, + recExecuteBlock, + recClear, + recShutdown +}; diff --git a/libpcsxcore/ix86_64/ix86-64.c b/libpcsxcore/ix86_64/ix86-64.c new file mode 100644 index 00000000..0582f351 --- /dev/null +++ b/libpcsxcore/ix86_64/ix86-64.c @@ -0,0 +1,3139 @@ +/* + * ix86 core v0.6.2 + * Authors: linuzappz + * alexey silinov + * goldfinger + * zerofrog(@gmail.com) + */ + +// stop compiling if NORECBUILD build (only for Visual Studio) +#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) + +#include +#include +#include +#include "ix86-64.h" + +#ifdef __x86_64__ + +#ifdef _MSC_VER +// visual studio calling convention +x86IntRegType g_x86savedregs[] = { RBX, RBP, RSI, RDI, R12, R13, R14, R15 }; +x86IntRegType g_x86tempregs[] = { R8, R9, R10, R11, RDX, RCX }; + +// arranged in savedreg -> tempreg order +x86IntRegType g_x86allregs[14] = { RBX, RBP, RSI, RDI, R12, R13, R14, R15, R8, R9, R10, R11, RDX, RCX }; + +#else +// standard calling convention + +// registers saved by called functions (no need to flush them across calls) +x86IntRegType g_x86savedregs[] = { RBX, RBP, R12, R13, R14, R15 }; +// temp registers that need to be saved across calls +x86IntRegType g_x86tempregs[] = { RCX, RDX, R8, R9, R10, R11, RSI, RDI }; + +// arranged in savedreg -> tempreg order +x86IntRegType g_x86allregs[14] = { RBX, RBP, R12, R13, R14, R15, RCX, RDX, R8, R9, R10, R11, RSI, RDI }; + +#endif + +x86IntRegType g_x868bitregs[11] = { RBX, R12, R13, R14, R15, RCX, RDX, R8, R9, R10, R11 }; +x86IntRegType g_x86non8bitregs[3] = { RBP, RSI, RDI }; + +#endif // __x86_64__ + +s8 *x86Ptr; +u8 *j8Ptr[32]; +u32 *j32Ptr[32]; + +void WriteRmOffset(x86IntRegType to, int offset) +{ + if( (to&7) == ESP ) { + if( offset == 0 ) { + ModRM( 0, 0, 4 ); + ModRM( 0, ESP, 4 ); + } + else if( offset < 128 && offset >= -128 ) { + ModRM( 1, 0, 4 ); + ModRM( 0, ESP, 4 ); + write8(offset); + } + else { + ModRM( 2, 0, 4 ); + ModRM( 0, ESP, 4 ); + write32(offset); + } + } + else { + if( offset == 0 ) { + ModRM( 0, 0, to ); + } + else if( offset < 128 && offset >= -128 ) { + ModRM( 1, 0, to ); + write8(offset); + } + else { + ModRM( 2, 0, to ); + write32(offset); + } + } +} + +void WriteRmOffsetFrom(x86IntRegType to, x86IntRegType from, int offset) +{ + if ((from&7) == ESP) { + if( offset == 0 ) { + ModRM( 0, to, 0x4 ); + SibSB( 0, 0x4, 0x4 ); + } + else if( offset < 128 && offset >= -128 ) { + ModRM( 1, to, 0x4 ); + SibSB( 0, 0x4, 0x4 ); + write8(offset); + } + else { + ModRM( 2, to, 0x4 ); + SibSB( 0, 0x4, 0x4 ); + write32(offset); + } + } + else { + if( offset == 0 ) { + ModRM( 0, to, from ); + } + else if( offset < 128 && offset >= -128 ) { + ModRM( 1, to, from ); + write8(offset); + } + else { + ModRM( 2, to, from ); + write32(offset); + } + } +} + +// This function is just for rec debugging purposes +void CheckX86Ptr( void ) +{ +} + +void writeVAROP(unsigned opl, u64 op) +{ + while (opl--) + { + write8(op & 0xFF); + op >>= 8; + } +} + +#define writeVARROP(REX, opl, op) ({ \ + if (opl > 1 && ((op & 0xFF) == 0x66 || (op & 0xFF) == 0xF3 || (op & 0xFF) == 0xF2)) { \ + write8(op & 0xFF); \ + opl --; \ + op >>= 8; \ + } \ + REX; \ + writeVAROP(opl, op); \ + }) + +void MEMADDR_OP(bool w, unsigned opl, u64 op, bool isreg, int reg, uptr p, sptr off) +{ +#ifdef __x86_64__ + sptr pr = MEMADDR_(p, 5 + opl + (w || reg >= 8) + off); + if (SPTR32(pr)) + { + writeVARROP(RexR(w, reg), opl, op); + ModRM(0, reg, DISP32); + write32(pr); + } + else if (UPTR32(p)) + { + writeVARROP(RexR(w, reg), opl, op); + ModRM(0, reg, SIB); + SibSB(0, SIB, DISP32); + write32(p); + } + else + { + assert(!isreg || reg != X86_TEMP); + MOV64ItoR(X86_TEMP, p); + writeVARROP(RexRB(w, reg, X86_TEMP), opl, op); + ModRM(0, reg, X86_TEMP); + } +#else + writeVARROP(RexR(w, reg), opl, op); + ModRM(0, reg, DISP32); + write32(p); +#endif +} + +void SET8R( int cc, int to ) +{ + RexB(0, to); + write8( 0x0F ); + write8( cc ); + write8( 0xC0 | ( to ) ); +} + +u8* J8Rel( int cc, int to ) +{ + write8( cc ); + write8( to ); + return x86Ptr - 1; +} + +u16* J16Rel( int cc, u32 to ) +{ + write16( 0x0F66 ); + write8( cc ); + write16( to ); + return (u16*)( x86Ptr - 2 ); +} + +u32* J32Rel( int cc, u32 to ) +{ + write8( 0x0F ); + write8( cc ); + write32( to ); + return (u32*)( x86Ptr - 4 ); +} + +void CMOV32RtoR( int cc, int to, int from ) +{ + RexRB(0,to, from); + write8( 0x0F ); + write8( cc ); + ModRM( 3, to, from ); +} + +void CMOV32MtoR( int cc, x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, cc), true, to, from, 0); +} + +//////////////////////////////////////////////////// +void x86SetPtr( char* ptr ) +{ + x86Ptr = ptr; +} + +//////////////////////////////////////////////////// +void x86Shutdown( void ) +{ +} + +//////////////////////////////////////////////////// +void x86SetJ8( u8* j8 ) +{ + u32 jump = ( x86Ptr - (s8*)j8 ) - 1; + + if ( jump > 0x7f ) { + assert(0); + SysPrintf( "j8 greater than 0x7f!!\n" ); + } + *j8 = (u8)jump; +} + +void x86SetJ8A( u8* j8 ) +{ + u32 jump = ( x86Ptr - (s8*)j8 ) - 1; + + if ( jump > 0x7f ) { + assert(0); + SysPrintf( "j8 greater than 0x7f!!\n" ); + } + + if( ((uptr)x86Ptr&0xf) > 4 ) { + + uptr newjump = jump + 16-((uptr)x86Ptr&0xf); + + if( newjump <= 0x7f ) { + jump = newjump; + while((uptr)x86Ptr&0xf) *x86Ptr++ = 0x90; + } + } + *j8 = (u8)jump; +} + +void x86SetJ16( u16 *j16 ) +{ + // doesn't work + u32 jump = ( x86Ptr - (s8*)j16 ) - 2; + + if ( jump > 0x7fff ) { + assert(0); + SysPrintf( "j16 greater than 0x7fff!!\n" ); + } + *j16 = (u16)jump; +} + +void x86SetJ16A( u16 *j16 ) +{ + if( ((uptr)x86Ptr&0xf) > 4 ) { + while((uptr)x86Ptr&0xf) *x86Ptr++ = 0x90; + } + x86SetJ16(j16); +} + +//////////////////////////////////////////////////// +void x86SetJ32( u32* j32 ) +{ + *j32 = ( x86Ptr - (s8*)j32 ) - 4; +} + +void x86SetJ32A( u32* j32 ) +{ + while((uptr)x86Ptr&0xf) *x86Ptr++ = 0x90; + x86SetJ32(j32); +} + +//////////////////////////////////////////////////// +void x86Align( int bytes ) +{ + // fordward align + x86Ptr = (s8*)( ( (uptr)x86Ptr + bytes - 1) & ~( bytes - 1 ) ); +} + +/********************/ +/* IX86 intructions */ +/********************/ + +void STC( void ) +{ + write8( 0xF9 ); +} + +void CLC( void ) +{ + write8( 0xF8 ); +} + +//////////////////////////////////// +// mov instructions / +//////////////////////////////////// + +/* mov r64 to r64 */ +void MOV64RtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(1, from, to); + write8( 0x89 ); + ModRM( 3, from, to ); +} + +/* mov r64 to m64 */ +void MOV64RtoM( uptr to, x86IntRegType from ) +{ + if (from == RAX) + { + RexR(1, 0); + write8(0xA3); + write64(to); + } + else + { + MEMADDR_OP(1, VAROP1(0x89), true, from, to, 0); + } +} + +/* mov m64 to r64 */ +void MOV64MtoR( x86IntRegType to, uptr from ) +{ + if (to == RAX) + { + RexR(1, 0); + write8(0xA1); + write64(from); + } + else + { + MEMADDR_OP(1, VAROP1(0x8B), true, to, from, 0); + } +} + +/* mov imm32 to m64 */ +void MOV64I32toM(uptr to, u32 from ) +{ + MEMADDR_OP(1, VAROP1(0xC7), false, 0, to, 4); + write32(from); +} + +// mov imm64 to r64 +void MOV64ItoR( x86IntRegType to, u64 from) +{ + RexB(1, to); + write8( 0xB8 | (to & 0x7) ); + write64( from ); +} + +/* mov imm32 to r64 */ +void MOV64I32toR( x86IntRegType to, s32 from ) +{ + RexB(1, to); + write8( 0xC7 ); + ModRM( 0, 0, to ); + write32( from ); +} + +// mov imm64 to [r64+off] +void MOV64ItoRmOffset( x86IntRegType to, u32 from, int offset) +{ + RexB(1,to); + write8( 0xC7 ); + WriteRmOffset(to, offset); + write32(from); +} + +// mov [r64+offset] to r64 +void MOV64RmOffsettoR( x86IntRegType to, x86IntRegType from, int offset ) +{ + RexRB(1, to, from); + write8( 0x8B ); + WriteRmOffsetFrom(to, from, offset); +} + +/* mov [r64][r64*scale] to r64 */ +void MOV64RmStoR( x86IntRegType to, x86IntRegType from, x86IntRegType from2, int scale) { + RexRXB(1, to, from2, from); + write8( 0x8B ); + ModRM( 0, to, 0x4 ); + SibSB(scale, from2, from ); +} + +/* mov r64 to [r64+offset] */ +void MOV64RtoRmOffset( x86IntRegType to, x86IntRegType from, int offset ) +{ + RexRB(1,from,to); + write8( 0x89 ); + WriteRmOffsetFrom(from, to, offset); +} + +/* mov r64 to [r64][r64*scale] */ +void MOV64RtoRmS( x86IntRegType to, x86IntRegType from, x86IntRegType from2, int scale) { + RexRXB(1, to, from2, from); + write8( 0x89 ); + ModRM( 0, to, 0x4 ); + SibSB(scale, from2, from ); +} + + +/* mov r32 to r32 */ +void MOV32RtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, from, to); + write8( 0x89 ); + ModRM( 3, from, to ); +} + +/* mov r32 to m32 */ +void MOV32RtoM( uptr to, x86IntRegType from ) +{ + if (from == EAX) + { + write8(0xA3); + write64(to); + } + else + { + MEMADDR_OP(0, VAROP1(0x89), true, from, to, 0); + } +} + +/* mov m32 to r32 */ +void MOV32MtoR( x86IntRegType to, uptr from ) +{ + if (to == RAX) + { + write8(0xA1); + write64(from); + } + else + { + MEMADDR_OP(0, VAROP1(0x8B), true, to, from, 0); + } +} + +/* mov [r32] to r32 */ +void MOV32RmtoR( x86IntRegType to, x86IntRegType from ) { + RexRB(0, to, from); + write8(0x8B); + WriteRmOffsetFrom(to, from, 0); +} + +void MOV32RmtoROffset( x86IntRegType to, x86IntRegType from, int offset ) { + RexRB(0, to, from); + write8( 0x8B ); + WriteRmOffsetFrom(to, from, offset); +} + +/* mov [r32+r32*scale] to r32 */ +void MOV32RmStoR( x86IntRegType to, x86IntRegType from, x86IntRegType from2, int scale) { + RexRXB(0,to,from2,from); + write8( 0x8B ); + ModRM( 0, to, 0x4 ); + SibSB(scale, from2, from ); +} + +// mov r32 to [r32< 0x7f ) { + assert( to <= 0xffffffff ); + return (u8*)JMP32( to ); + } else { + return (u8*)JMP8( to ); + } +} + +/* jmp rel8 */ +u8* JMP8( u8 to ) +{ + write8( 0xEB ); + write8( to ); + return x86Ptr - 1; +} + +/* jmp rel32 */ +u32* JMP32( uptr to ) +{ + assert(SPTR32((sptr)to)); + write8( 0xE9 ); + write32( (sptr)to ); + return (u32*)(x86Ptr - 4 ); +} + +/* jmp r32/r64 */ +void JMPR( x86IntRegType to ) +{ + RexB(0, to); + write8( 0xFF ); + ModRM( 3, 4, to ); +} + +// jmp m32 +void JMP32M( uptr to ) +{ + /* FIXME */ + MEMADDR_OP(0, VAROP1(0xFF), false, 4, to, 0); +} + +/* jp rel8 */ +u8* JP8( u8 to ) { + return J8Rel( 0x7A, to ); +} + +/* jnp rel8 */ +u8* JNP8( u8 to ) { + return J8Rel( 0x7B, to ); +} + +/* je rel8 */ +u8* JE8( u8 to ) { + return J8Rel( 0x74, to ); +} + +/* jz rel8 */ +u8* JZ8( u8 to ) +{ + return J8Rel( 0x74, to ); +} + +/* js rel8 */ +u8* JS8( u8 to ) +{ + return J8Rel( 0x78, to ); +} + +/* jns rel8 */ +u8* JNS8( u8 to ) +{ + return J8Rel( 0x79, to ); +} + +/* jg rel8 */ +u8* JG8( u8 to ) +{ + return J8Rel( 0x7F, to ); +} + +/* jge rel8 */ +u8* JGE8( u8 to ) +{ + return J8Rel( 0x7D, to ); +} + +/* jl rel8 */ +u8* JL8( u8 to ) +{ + return J8Rel( 0x7C, to ); +} + +/* ja rel8 */ +u8* JA8( u8 to ) +{ + return J8Rel( 0x77, to ); +} + +u8* JAE8( u8 to ) +{ + return J8Rel( 0x73, to ); +} + +/* jb rel8 */ +u8* JB8( u8 to ) +{ + return J8Rel( 0x72, to ); +} + +/* jbe rel8 */ +u8* JBE8( u8 to ) +{ + return J8Rel( 0x76, to ); +} + +/* jle rel8 */ +u8* JLE8( u8 to ) +{ + return J8Rel( 0x7E, to ); +} + +/* jne rel8 */ +u8* JNE8( u8 to ) +{ + return J8Rel( 0x75, to ); +} + +/* jnz rel8 */ +u8* JNZ8( u8 to ) +{ + return J8Rel( 0x75, to ); +} + +/* jng rel8 */ +u8* JNG8( u8 to ) +{ + return J8Rel( 0x7E, to ); +} + +/* jnge rel8 */ +u8* JNGE8( u8 to ) +{ + return J8Rel( 0x7C, to ); +} + +/* jnl rel8 */ +u8* JNL8( u8 to ) +{ + return J8Rel( 0x7D, to ); +} + +/* jnle rel8 */ +u8* JNLE8( u8 to ) +{ + return J8Rel( 0x7F, to ); +} + +/* jo rel8 */ +u8* JO8( u8 to ) +{ + return J8Rel( 0x70, to ); +} + +/* jno rel8 */ +u8* JNO8( u8 to ) +{ + return J8Rel( 0x71, to ); +} + +// jb rel8 +u16* JB16( u16 to ) +{ + return J16Rel( 0x82, to ); +} + +// jb rel32 +u32* JB32( u32 to ) +{ + return J32Rel( 0x82, to ); +} + +/* je rel32 */ +u32* JE32( u32 to ) +{ + return J32Rel( 0x84, to ); +} + +/* jz rel32 */ +u32* JZ32( u32 to ) +{ + return J32Rel( 0x84, to ); +} + +/* jg rel32 */ +u32* JG32( u32 to ) +{ + return J32Rel( 0x8F, to ); +} + +/* jge rel32 */ +u32* JGE32( u32 to ) +{ + return J32Rel( 0x8D, to ); +} + +/* jl rel32 */ +u32* JL32( u32 to ) +{ + return J32Rel( 0x8C, to ); +} + +/* jle rel32 */ +u32* JLE32( u32 to ) +{ + return J32Rel( 0x8E, to ); +} + +/* jae rel32 */ +u32* JAE32( u32 to ) +{ + return J32Rel( 0x83, to ); +} + +/* jne rel32 */ +u32* JNE32( u32 to ) +{ + return J32Rel( 0x85, to ); +} + +/* jnz rel32 */ +u32* JNZ32( u32 to ) +{ + return J32Rel( 0x85, to ); +} + +/* jng rel32 */ +u32* JNG32( u32 to ) +{ + return J32Rel( 0x8E, to ); +} + +/* jnge rel32 */ +u32* JNGE32( u32 to ) +{ + return J32Rel( 0x8C, to ); +} + +/* jnl rel32 */ +u32* JNL32( u32 to ) +{ + return J32Rel( 0x8D, to ); +} + +/* jnle rel32 */ +u32* JNLE32( u32 to ) +{ + return J32Rel( 0x8F, to ); +} + +/* jo rel32 */ +u32* JO32( u32 to ) +{ + return J32Rel( 0x80, to ); +} + +/* jno rel32 */ +u32* JNO32( u32 to ) +{ + return J32Rel( 0x81, to ); +} + +// js rel32 +u32* JS32( u32 to ) +{ + return J32Rel( 0x88, to ); +} + + +/* call func */ +void CALLFunc( uptr func ) +{ + sptr p = MEMADDR_(func, 5); + if (SPTR32(p)) + { + CALL32(p); + } + else + { + MOV64ItoR(X86_TEMP, func); + CALL64R(X86_TEMP); + } +} + +/* call rel32 */ +void CALL32( s32 to ) +{ + write8( 0xE8 ); + write32( to ); +} + +/* call r32 */ +void CALL32R( x86IntRegType to ) +{ + RexB(0, to); + write8( 0xFF ); + ModRM( 3, 2, to ); +} + +/* call r64 */ +void CALL64R( x86IntRegType to ) +{ + RexB(0, to); + write8( 0xFF ); + ModRM( 3, 2, to ); +} + +//////////////////////////////////// +// misc instructions / +//////////////////////////////////// + +/* cmp imm32 to r64 */ +void CMP64I32toR( x86IntRegType to, u32 from ) +{ + RexB(1, to); + if ( to == EAX ) { + write8( 0x3D ); + } + else { + write8( 0x81 ); + ModRM( 3, 7, to ); + } + write32( from ); +} + +/* cmp m64 to r64 */ +void CMP64MtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(1, VAROP1(0x3B), true, 2, from, 0); +} + +// cmp r64 to r64 +void CMP64RtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(1,from,to); + write8( 0x39 ); + ModRM( 3, from, to ); +} + +/* cmp imm32 to r32 */ +void CMP32ItoR( x86IntRegType to, u32 from ) +{ + RexB(0,to); + if ( to == EAX ) { + write8( 0x3D ); + } + else { + write8( 0x81 ); + ModRM( 3, 7, to ); + } + write32( from ); +} + +/* cmp imm32 to m32 */ +void CMP32ItoM( uptr to, u32 from ) +{ + MEMADDR_OP(0, VAROP1(0x81), false, 7, to, 4); + write32(from); +} + +/* cmp r32 to r32 */ +void CMP32RtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0,from,to); + write8( 0x39 ); + ModRM( 3, from, to ); +} + +/* cmp m32 to r32 */ +void CMP32MtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP1(0x3B), true, to, from, 0); +} + +// cmp imm8 to [r32] +void CMP32I8toRm( x86IntRegType to, u8 from) +{ + RexB(0,to); + write8( 0x83 ); + ModRM( 0, 7, to ); + write8(from); +} + +// cmp imm32 to [r32+off] +void CMP32I8toRmOffset8( x86IntRegType to, u8 from, u8 off) +{ + RexB(0,to); + write8( 0x83 ); + ModRM( 1, 7, to ); + write8(off); + write8(from); +} + +// cmp imm8 to [r32] +void CMP32I8toM( uptr to, u8 from) +{ + MEMADDR_OP(0, VAROP1(0x83), false, 7, to, 1); + write8( from ); +} + +/* cmp imm16 to r16 */ +void CMP16ItoR( x86IntRegType to, u16 from ) +{ + write8( 0x66 ); + RexB(0,to); + if ( to == EAX ) + { + write8( 0x3D ); + } + else + { + write8( 0x81 ); + ModRM( 3, 7, to ); + } + write16( from ); +} + +/* cmp imm16 to m16 */ +void CMP16ItoM( uptr to, u16 from ) +{ + MEMADDR_OP(0, VAROP2(0x66, 0x81), false, 7, to, 2); + write16( from ); +} + +/* cmp r16 to r16 */ +void CMP16RtoR( x86IntRegType to, x86IntRegType from ) +{ + write8( 0x66 ); + RexRB(0,from,to); + write8( 0x39 ); + ModRM( 3, from, to ); +} + +/* cmp m16 to r16 */ +void CMP16MtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x66, 0x3B), true, to, from, 0); +} + +// cmp imm8 to r8 +void CMP8ItoR( x86IntRegType to, u8 from ) +{ + RexB(0,to); + if ( to == EAX ) + { + write8( 0x3C ); + } + else + { + write8( 0x80 ); + ModRM( 3, 7, to ); + } + write8( from ); +} + +// cmp m8 to r8 +void CMP8MtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP1(0x3A), true, to, from, 0); +} + +/* test r64 to r64 */ +void TEST64RtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(1, from, to); + write8( 0x85 ); + ModRM( 3, from, to ); +} + +/* test imm32 to r32 */ +void TEST32ItoR( x86IntRegType to, u32 from ) +{ + RexB(0,to); + if ( to == EAX ) + { + write8( 0xA9 ); + } + else + { + write8( 0xF7 ); + ModRM( 3, 0, to ); + } + write32( from ); +} + +void TEST32ItoM( uptr to, u32 from ) +{ + MEMADDR_OP(0, VAROP1(0xF7), false, 0, to, 4); + write32( from ); +} + +/* test r32 to r32 */ +void TEST32RtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0,from,to); + write8( 0x85 ); + ModRM( 3, from, to ); +} + +// test imm32 to [r32] +void TEST32ItoRm( x86IntRegType to, u32 from ) +{ + RexB(0,to); + write8( 0xF7 ); + ModRM( 0, 0, to ); + write32(from); +} + +// test imm16 to r16 +void TEST16ItoR( x86IntRegType to, u16 from ) +{ + write8(0x66); + RexB(0,to); + if ( to == EAX ) + { + write8( 0xA9 ); + } + else + { + write8( 0xF7 ); + ModRM( 3, 0, to ); + } + write16( from ); +} + +// test r16 to r16 +void TEST16RtoR( x86IntRegType to, x86IntRegType from ) +{ + write8(0x66); + RexRB(0,from,to); + write16( 0x85 ); + ModRM( 3, from, to ); +} + +// test imm8 to r8 +void TEST8ItoR( x86IntRegType to, u8 from ) +{ + RexB(0,to); + if ( to == EAX ) + { + write8( 0xA8 ); + } + else + { + write8( 0xF6 ); + ModRM( 3, 0, to ); + } + write8( from ); +} + +// test imm8 to r8 +void TEST8ItoM( uptr to, u8 from ) +{ + MEMADDR_OP(0, VAROP1(0xF6), false, 0, to, 1); + write8( from ); +} + +/* sets r8 */ +void SETS8R( x86IntRegType to ) +{ + SET8R( 0x98, to ); +} + +/* setl r8 */ +void SETL8R( x86IntRegType to ) +{ + SET8R( 0x9C, to ); +} + +// setge r8 +void SETGE8R( x86IntRegType to ) { SET8R(0x9d, to); } +// setg r8 +void SETG8R( x86IntRegType to ) { SET8R(0x9f, to); } +// seta r8 +void SETA8R( x86IntRegType to ) { SET8R(0x97, to); } +// setae r8 +void SETAE8R( x86IntRegType to ) { SET8R(0x99, to); } +/* setb r8 */ +void SETB8R( x86IntRegType to ) { SET8R( 0x92, to ); } +/* setb r8 */ +void SETNZ8R( x86IntRegType to ) { SET8R( 0x95, to ); } +// setz r8 +void SETZ8R( x86IntRegType to ) { SET8R(0x94, to); } +// sete r8 +void SETE8R( x86IntRegType to ) { SET8R(0x94, to); } + +/* push imm32 */ +void PUSH32I( u32 from ) +{ + //X86_64ASSERT(); //becomes sign extended in x86_64 + write8( 0x68 ); + write32( from ); +} + +#ifdef __x86_64__ + +/* push r64 */ +void PUSH64R( x86IntRegType from ) +{ + RexB(0,from); + //write8( 0x51 | from ); + write8( 0x50 | from ); +} + +/* push m64 */ +void PUSH64M( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xFF), false, 6, from, 0); +} + +/* pop r64 */ +void POP64R( x86IntRegType from ) { + RexB(0,from); + //write8( 0x59 | from ); + write8( 0x58 | from ); +} + +void PUSHR(x86IntRegType from) { PUSH64R(from); } +void POPR(x86IntRegType from) { POP64R(from); } + +#else + +/* push r32 */ +void PUSH32R( x86IntRegType from ) { write8( 0x50 | from ); } + +/* push m32 */ +void PUSH32M( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xFF), false, 6, from, 0); +} + +/* pop r32 */ +void POP32R( x86IntRegType from ) { write8( 0x58 | from ); } + +/* pushad */ +void PUSHA32( void ) { write8( 0x60 ); } + +/* popad */ +void POPA32( void ) { write8( 0x61 ); } + +void PUSHR(x86IntRegType from) { PUSH32R(from); } +void POPR(x86IntRegType from) { POP32R(from); } + +#endif + + +/* pushfd */ +void PUSHFD( void ) { write8( 0x9C ); } +/* popfd */ +void POPFD( void ) { write8( 0x9D ); } + +void RET( void ) { write8( 0xC3 ); } +void RET2( void ) { write16( 0xc3f3 ); } + +void CBW( void ) { write16( 0x9866 ); } +void CWD( void ) { write8( 0x98 ); } +void CDQ( void ) { write8( 0x99 ); } +void CWDE() { write8(0x98); } + +#ifdef __x86_64__ +void CDQE( void ) { RexR(1,0); write8( 0x98 ); } +#endif + +void LAHF() { write8(0x9f); } +void SAHF() { write8(0x9e); } + +void BT32ItoR( x86IntRegType to, x86IntRegType from ) +{ + write16( 0xBA0F ); + write8( 0xE0 | to ); + write8( from ); +} + +void BSRRtoR(x86IntRegType to, x86IntRegType from) +{ + write16( 0xBD0F ); + ModRM( 3, from, to ); +} + +void BSWAP32R( x86IntRegType to ) +{ + write8( 0x0F ); + write8( 0xC8 + to ); +} + +// to = from + offset +void LEA16RtoR(x86IntRegType to, x86IntRegType from, u16 offset) +{ + write8(0x66); + LEA32RtoR(to, from, offset); +} + +void LEA32RtoR(x86IntRegType to, x86IntRegType from, u32 offset) +{ + RexRB(0,to,from); + write8(0x8d); + + if( (from&7) == ESP ) { + if( offset == 0 ) { + ModRM(1, to, from); + write8(0x24); + } + else if( offset < 128 ) { + ModRM(1, to, from); + write8(0x24); + write8(offset); + } + else { + ModRM(2, to, from); + write8(0x24); + write32(offset); + } + } + else { + if( offset == 0 && from != EBP && from!=ESP ) { + ModRM(0, to, from); + } + else if( offset < 128 ) { + ModRM(1, to, from); + write8(offset); + } + else { + ModRM(2, to, from); + write32(offset); + } + } +} + +// to = from0 + from1 +void LEA16RRtoR(x86IntRegType to, x86IntRegType from0, x86IntRegType from1) +{ + write8(0x66); + LEA32RRtoR(to, from0, from1); +} + +void LEA32RRtoR(x86IntRegType to, x86IntRegType from0, x86IntRegType from1) +{ + RexRXB(0, to, from0, from1); + write8(0x8d); + + if( (from1&7) == EBP ) { + ModRM(1, to, 4); + ModRM(0, from0, from1); + write8(0); + } + else { + ModRM(0, to, 4); + ModRM(0, from0, from1); + } +} + +// to = from << scale (max is 3) +void LEA16RStoR(x86IntRegType to, x86IntRegType from, u32 scale) +{ + write8(0x66); + LEA32RStoR(to, from, scale); +} + +void LEA32RStoR(x86IntRegType to, x86IntRegType from, u32 scale) +{ + if( to == from ) { + SHL32ItoR(to, scale); + return; + } + + if( from != ESP ) { + RexRXB(0,to,from,0); + write8(0x8d); + ModRM(0, to, 4); + ModRM(scale, from, 5); + write32(0); + } + else { + assert( to != ESP ); + MOV32RtoR(to, from); + LEA32RStoR(to, to, scale); + } +} + +#endif diff --git a/libpcsxcore/ix86_64/ix86-64.h b/libpcsxcore/ix86_64/ix86-64.h new file mode 100644 index 00000000..009fa5a1 --- /dev/null +++ b/libpcsxcore/ix86_64/ix86-64.h @@ -0,0 +1,1776 @@ +/* + * ix86 definitions v0.6.2 + * Authors: linuzappz + * alexey silinov + * goldfinger + * shadow < shadow@pcsx2.net > + */ + +#ifndef __IX86_H__ +#define __IX86_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "../psxcommon.h" // Basic types header +#include +#include + +#if defined(__MINGW32__) +#define PCSX2_ALIGNED16(x) __declspec(align(16)) x +#else +#define PCSX2_ALIGNED16(x) x __attribute((aligned(16))) +#endif + + +#ifdef __x86_64__ +#define XMMREGS 16 +#define X86REGS 16 +#else +#define XMMREGS 8 +#define X86REGS 8 +#endif + +#define MMXREGS 8 + +#define SIB 4 +#define DISP32 5 + +// general types +typedef int x86IntRegType; +#define EAX 0 +#define EBX 3 +#define ECX 1 +#define EDX 2 +#define ESI 6 +#define EDI 7 +#define EBP 5 +#define ESP 4 + +#ifdef __x86_64__ +#define RAX 0 +#define RBX 3 +#define RCX 1 +#define RDX 2 +#define RSI 6 +#define RDI 7 +#define RBP 5 +#define RSP 4 +#define R8 8 +#define R9 9 +#define R10 10 +#define R11 11 +#define R12 12 +#define R13 13 +#define R14 14 +#define R15 15 + +#define X86_TEMP RAX // don't allocate anything + +#ifdef _MSC_VER +extern x86IntRegType g_x86savedregs[8]; +extern x86IntRegType g_x86tempregs[6]; +#else +extern x86IntRegType g_x86savedregs[6]; +extern x86IntRegType g_x86tempregs[8]; +#endif + +extern x86IntRegType g_x86allregs[14]; // all registers that can be used by the recs +extern x86IntRegType g_x868bitregs[11]; +extern x86IntRegType g_x86non8bitregs[3]; + +#ifdef _MSC_VER +#define X86ARG1 RCX +#define X86ARG2 RDX +#define X86ARG3 R8 +#define X86ARG4 R9 +#else +#define X86ARG1 RDI +#define X86ARG2 RSI +#define X86ARG3 RDX +#define X86ARG4 RCX +#endif + +#else + +#define X86ARG1 EAX +#define X86ARG2 ECX +#define X86ARG3 EDX +#define X86ARG4 EBX + +#endif // __x86_64__ + +#define MM0 0 +#define MM1 1 +#define MM2 2 +#define MM3 3 +#define MM4 4 +#define MM5 5 +#define MM6 6 +#define MM7 7 + +typedef int x86MMXRegType; + +#define XMM0 0 +#define XMM1 1 +#define XMM2 2 +#define XMM3 3 +#define XMM4 4 +#define XMM5 5 +#define XMM6 6 +#define XMM7 7 +#define XMM8 8 +#define XMM9 9 +#define XMM10 10 +#define XMM11 11 +#define XMM12 12 +#define XMM13 13 +#define XMM14 14 +#define XMM15 15 + +typedef int x86SSERegType; + +typedef enum +{ + XMMT_INT = 0, // integer (sse2 only) + XMMT_FPS = 1, // floating point + //XMMT_FPD = 3, // double +} XMMSSEType; + +extern XMMSSEType g_xmmtypes[XMMREGS]; + +void cpudetectInit( void );//this is all that needs to be called and will fill up the below structs + +//cpu capabilities structure +typedef struct { + u32 hasFloatingPointUnit; + u32 hasVirtual8086ModeEnhancements; + u32 hasDebuggingExtensions; + u32 hasPageSizeExtensions; + u32 hasTimeStampCounter; + u32 hasModelSpecificRegisters; + u32 hasPhysicalAddressExtension; + u32 hasCOMPXCHG8BInstruction; + u32 hasAdvancedProgrammableInterruptController; + u32 hasSEPFastSystemCall; + u32 hasMemoryTypeRangeRegisters; + u32 hasPTEGlobalFlag; + u32 hasMachineCheckArchitecture; + u32 hasConditionalMoveAndCompareInstructions; + u32 hasFGPageAttributeTable; + u32 has36bitPageSizeExtension; + u32 hasProcessorSerialNumber; + u32 hasCFLUSHInstruction; + u32 hasDebugStore; + u32 hasACPIThermalMonitorAndClockControl; + u32 hasMultimediaExtensions; + u32 hasFastStreamingSIMDExtensionsSaveRestore; + u32 hasStreamingSIMDExtensions; + u32 hasStreamingSIMD2Extensions; + u32 hasSelfSnoop; + u32 hasHyperThreading; + u32 hasThermalMonitor; + u32 hasIntel64BitArchitecture; + u32 hasStreamingSIMD3Extensions; + //that is only for AMDs + u32 hasMultimediaExtensionsExt; + u32 hasAMD64BitArchitecture; + u32 has3DNOWInstructionExtensionsExt; + u32 has3DNOWInstructionExtensions; +} CAPABILITIES; + +extern CAPABILITIES cpucaps; + +typedef struct { + + u32 x86Family; // Processor Family + u32 x86Model; // Processor Model + u32 x86PType; // Processor Type + u32 x86StepID; // Stepping ID + u32 x86Flags; // Feature Flags + u32 x86EFlags; // Extended Feature Flags + //all the above returns hex values + s8 x86ID[16]; // Vendor ID //the vendor creator (in %s) + s8 x86Type[20]; //cpu type in char format //the cpu type (in %s) + s8 x86Fam[50]; // family in char format //the original cpu name string (in %s) + u32 cpuspeed; // speed of cpu //this will give cpu speed (in %d) +} CPUINFO; + +extern CPUINFO cpuinfo; + +extern s8 *x86Ptr; +extern u8 *j8Ptr[32]; +extern u32 *j32Ptr[32]; + + +#ifdef __x86_64__ +#define X86_64ASSERT() assert(0) +#define MEMADDR_(addr, oplen) (sptr)((uptr)(addr) - ((uptr)x86Ptr + ((u64)(oplen)))) +#define SPTR32(addr) ((addr) < 0x80000000L && (addr) >= -0x80000000L) +#define UPTR32(addr) ((addr) < 0x100000000L) +#define MEMADDR(addr, oplen) ({ sptr _a = MEMADDR_(addr, oplen); assert(SPTR32(_a)); _a; }) +#else +#define X86_64ASSERT() +#define SPTR32(a) 1 +#define UPTR32(a) 1 +#define MEMADDR(addr, oplen) (addr) +#endif + +#ifdef __x86_64__ +#define Rex( w, r, x, b ) write8( 0x40 | ((w) << 3) | ((r) << 2) | ((x) << 1) | (b) ) +#else +#define Rex(w,r,x,b) assert(0) +#endif +#define RexRXB(w, reg, index, base) if(w || (reg) >= 8 || (index) >= 8 || (base) >= 8 ) \ + Rex(w, (reg)>=8, (index)>=8, (base)>=8) +#define RexR(w, reg) RexRXB(w, reg, 0, 0) +#define RexB(w, base) RexRXB(w, 0, 0, base) +#define RexRB(w, reg, base) RexRXB(w, reg, 0, base) + +void x86SetPtr( char *ptr ); +void x86Shutdown( void ); + +void x86SetJ8( u8 *j8 ); +void x86SetJ8A( u8 *j8 ); +void x86SetJ16( u16 *j16 ); +void x86SetJ16A( u16 *j16 ); +void x86SetJ32( u32 *j32 ); +void x86SetJ32A( u32 *j32 ); + +void x86Align( int bytes ); +u64 GetCPUTick( void ); + +// General Helper functions +#define ModRM(mod, rm, reg) write8( ( mod << 6 ) | ( (rm & 7) << 3 ) | ( reg & 7 ) ) +#define SibSB(ss, rm, index) write8( ( ss << 6 ) | ( rm << 3 ) | ( index ) ) +void SET8R( int cc, int to ); +u8* J8Rel( int cc, int to ); +u32* J32Rel( int cc, u32 to ); +void CMOV32RtoR( int cc, int to, int from ); +void CMOV32MtoR( int cc, int to, uptr from ); + +void MEMADDR_OP(bool w, unsigned opl, u64 op, bool isreg, int reg, uptr p, sptr off); + +#define VAROP1(op) 1, op +#define VAROP2(op1, op2) 2, (op1) | ((op2) << 8) + +//****************** +// IX86 intructions +//****************** + +// +// * scale values: +// * 0 - *1 +// * 1 - *2 +// * 2 - *4 +// * 3 - *8 +// + +void STC( void ); +void CLC( void ); + +//////////////////////////////////// +// mov instructions // +//////////////////////////////////// + +// mov r64 to r64 +void MOV64RtoR( x86IntRegType to, x86IntRegType from ); +// mov r64 to m64 +void MOV64RtoM( uptr to, x86IntRegType from ); +// mov m64 to r64 +void MOV64MtoR( x86IntRegType to, uptr from ); +// mov sign ext imm32 to m64 +void MOV64I32toM( uptr to, u32 from ); +// mov sign ext imm32 to r64 +void MOV64I32toR( x86IntRegType to, s32 from); +// mov imm64 to r64 +void MOV64ItoR( x86IntRegType to, u64 from); +// mov imm64 to [r64+off] +void MOV64ItoRmOffset( x86IntRegType to, u32 from, int offset); +// mov [r64+offset] to r64 +void MOV64RmOffsettoR( x86IntRegType to, x86IntRegType from, int offset ); +// mov [r64][r64*scale] to r64 +void MOV64RmStoR( x86IntRegType to, x86IntRegType from, x86IntRegType from2, int scale); +// mov r64 to [r64+offset] +void MOV64RtoRmOffset( x86IntRegType to, x86IntRegType from, int offset ); +// mov r64 to [r64][r64*scale] +void MOV64RtoRmS( x86IntRegType to, x86IntRegType from, x86IntRegType from2, int scale); + +// mov r32 to r32 +void MOV32RtoR( x86IntRegType to, x86IntRegType from ); +// mov r32 to m32 +void MOV32RtoM( uptr to, x86IntRegType from ); +// mov m32 to r32 +void MOV32MtoR( x86IntRegType to, uptr from ); +// mov [r32] to r32 +void MOV32RmtoR( x86IntRegType to, x86IntRegType from ); +void MOV32RmtoROffset( x86IntRegType to, x86IntRegType from, int offset ); +// mov [r32][r32< subtract ST(0) from ST(1), store in ST(1) and POP stack +void FSUBP( void ); +// fmul ST(src) to fpu reg stack ST(0) +void FMUL32Rto0( x86IntRegType src ); +// fmul ST(0) to fpu reg stack ST(src) +void FMUL320toR( x86IntRegType src ); +// fdiv ST(src) to fpu reg stack ST(0) +void FDIV32Rto0( x86IntRegType src ); +// fdiv ST(0) to fpu reg stack ST(src) +void FDIV320toR( x86IntRegType src ); +// fdiv ST(0) to fpu reg stack ST(src), pop stack, store in ST(src) +void FDIV320toRP( x86IntRegType src ); + +// fadd m32 to fpu reg stack +void FADD32( uptr from ); +// fsub m32 to fpu reg stack +void FSUB32( uptr from ); +// fmul m32 to fpu reg stack +void FMUL32( uptr from ); +// fdiv m32 to fpu reg stack +void FDIV32( uptr from ); +// fcomi st, st( i) +void FCOMI( x86IntRegType src ); +// fcomip st, st( i) +void FCOMIP( x86IntRegType src ); +// fucomi st, st( i) +void FUCOMI( x86IntRegType src ); +// fucomip st, st( i) +void FUCOMIP( x86IntRegType src ); +// fcom m32 to fpu reg stack +void FCOM32( uptr from ); +// fabs fpu reg stack +void FABS( void ); +// fsqrt fpu reg stack +void FSQRT( void ); +// ftan fpu reg stack +void FPATAN( void ); +// fsin fpu reg stack +void FSIN( void ); +// fchs fpu reg stack +void FCHS( void ); + +// fcmovb fpu reg to fpu reg stack +void FCMOVB32( x86IntRegType from ); +// fcmove fpu reg to fpu reg stack +void FCMOVE32( x86IntRegType from ); +// fcmovbe fpu reg to fpu reg stack +void FCMOVBE32( x86IntRegType from ); +// fcmovu fpu reg to fpu reg stack +void FCMOVU32( x86IntRegType from ); +// fcmovnb fpu reg to fpu reg stack +void FCMOVNB32( x86IntRegType from ); +// fcmovne fpu reg to fpu reg stack +void FCMOVNE32( x86IntRegType from ); +// fcmovnbe fpu reg to fpu reg stack +void FCMOVNBE32( x86IntRegType from ); +// fcmovnu fpu reg to fpu reg stack +void FCMOVNU32( x86IntRegType from ); +void FCOMP32( uptr from ); +void FNSTSWtoAX( void ); + +// probably a little extreme here, but x86-64 should NOT use MMX +#ifdef __x86_64__ + +#define MMXONLY(code) + +#else + +#define MMXONLY(code) code + +//****************** +// MMX instructions +//****************** + +// r64 = mm + +// movq m64 to r64 +void MOVQMtoR( x86MMXRegType to, uptr from ); +// movq r64 to m64 +void MOVQRtoM( uptr to, x86MMXRegType from ); + +// pand r64 to r64 +void PANDRtoR( x86MMXRegType to, x86MMXRegType from ); +void PANDNRtoR( x86MMXRegType to, x86MMXRegType from ); +// pand m64 to r64 ; +void PANDMtoR( x86MMXRegType to, uptr from ); +// pandn r64 to r64 +void PANDNRtoR( x86MMXRegType to, x86MMXRegType from ); +// pandn r64 to r64 +void PANDNMtoR( x86MMXRegType to, uptr from ); +// por r64 to r64 +void PORRtoR( x86MMXRegType to, x86MMXRegType from ); +// por m64 to r64 +void PORMtoR( x86MMXRegType to, uptr from ); +// pxor r64 to r64 +void PXORRtoR( x86MMXRegType to, x86MMXRegType from ); +// pxor m64 to r64 +void PXORMtoR( x86MMXRegType to, uptr from ); + +// psllq r64 to r64 +void PSLLQRtoR( x86MMXRegType to, x86MMXRegType from ); +// psllq m64 to r64 +void PSLLQMtoR( x86MMXRegType to, uptr from ); +// psllq imm8 to r64 +void PSLLQItoR( x86MMXRegType to, u8 from ); +// psrlq r64 to r64 +void PSRLQRtoR( x86MMXRegType to, x86MMXRegType from ); +// psrlq m64 to r64 +void PSRLQMtoR( x86MMXRegType to, uptr from ); +// psrlq imm8 to r64 +void PSRLQItoR( x86MMXRegType to, u8 from ); + +// paddusb r64 to r64 +void PADDUSBRtoR( x86MMXRegType to, x86MMXRegType from ); +// paddusb m64 to r64 +void PADDUSBMtoR( x86MMXRegType to, uptr from ); +// paddusw r64 to r64 +void PADDUSWRtoR( x86MMXRegType to, x86MMXRegType from ); +// paddusw m64 to r64 +void PADDUSWMtoR( x86MMXRegType to, uptr from ); + +// paddb r64 to r64 +void PADDBRtoR( x86MMXRegType to, x86MMXRegType from ); +// paddb m64 to r64 +void PADDBMtoR( x86MMXRegType to, uptr from ); +// paddw r64 to r64 +void PADDWRtoR( x86MMXRegType to, x86MMXRegType from ); +// paddw m64 to r64 +void PADDWMtoR( x86MMXRegType to, uptr from ); +// paddd r64 to r64 +void PADDDRtoR( x86MMXRegType to, x86MMXRegType from ); +// paddd m64 to r64 +void PADDDMtoR( x86MMXRegType to, uptr from ); +void PADDSBRtoR( x86MMXRegType to, x86MMXRegType from ); +void PADDSWRtoR( x86MMXRegType to, x86MMXRegType from ); + +// paddq m64 to r64 (sse2 only?) +void PADDQMtoR( x86MMXRegType to, uptr from ); +// paddq r64 to r64 (sse2 only?) +void PADDQRtoR( x86MMXRegType to, x86MMXRegType from ); + +void PSUBSBRtoR( x86MMXRegType to, x86MMXRegType from ); +void PSUBSWRtoR( x86MMXRegType to, x86MMXRegType from ); + +void PSUBBRtoR( x86MMXRegType to, x86MMXRegType from ); +void PSUBWRtoR( x86MMXRegType to, x86MMXRegType from ); +void PSUBDRtoR( x86MMXRegType to, x86MMXRegType from ); +void PSUBDMtoR( x86MMXRegType to, uptr from ); + +// psubq m64 to r64 (sse2 only?) +void PSUBQMtoR( x86MMXRegType to, uptr from ); +// psubq r64 to r64 (sse2 only?) +void PSUBQRtoR( x86MMXRegType to, x86MMXRegType from ); + +// pmuludq m64 to r64 (sse2 only?) +void PMULUDQMtoR( x86MMXRegType to, uptr from ); +// pmuludq r64 to r64 (sse2 only?) +void PMULUDQRtoR( x86MMXRegType to, x86MMXRegType from ); + +void PCMPEQBRtoR( x86MMXRegType to, x86MMXRegType from ); +void PCMPEQWRtoR( x86MMXRegType to, x86MMXRegType from ); +void PCMPEQDRtoR( x86MMXRegType to, x86MMXRegType from ); +void PCMPEQDMtoR( x86MMXRegType to, uptr from ); +void PCMPGTBRtoR( x86MMXRegType to, x86MMXRegType from ); +void PCMPGTWRtoR( x86MMXRegType to, x86MMXRegType from ); +void PCMPGTDRtoR( x86MMXRegType to, x86MMXRegType from ); +void PCMPGTDMtoR( x86MMXRegType to, uptr from ); +void PSRLWItoR( x86MMXRegType to, u8 from ); +void PSRLDItoR( x86MMXRegType to, u8 from ); +void PSRLDRtoR( x86MMXRegType to, x86MMXRegType from ); +void PSLLWItoR( x86MMXRegType to, u8 from ); +void PSLLDItoR( x86MMXRegType to, u8 from ); +void PSLLDRtoR( x86MMXRegType to, x86MMXRegType from ); +void PSRAWItoR( x86MMXRegType to, u8 from ); +void PSRADItoR( x86MMXRegType to, u8 from ); +void PSRADRtoR( x86MMXRegType to, x86MMXRegType from ); +void PUNPCKLDQRtoR( x86MMXRegType to, x86MMXRegType from ); +void PUNPCKLDQMtoR( x86MMXRegType to, uptr from ); +void PUNPCKHDQRtoR( x86MMXRegType to, x86MMXRegType from ); +void PUNPCKHDQMtoR( x86MMXRegType to, uptr from ); +void MOVQ64ItoR( x86MMXRegType reg, u64 i ); //Prototype.Todo add all consts to end of block.not after jr $+8 +void MOVQRtoR( x86MMXRegType to, x86MMXRegType from ); +void MOVQRmtoROffset( x86MMXRegType to, x86IntRegType from, u32 offset ); +void MOVQRtoRmOffset( x86IntRegType to, x86MMXRegType from, u32 offset ); +void MOVDMtoMMX( x86MMXRegType to, uptr from ); +void MOVDMMXtoM( uptr to, x86MMXRegType from ); +void MOVD32RtoMMX( x86MMXRegType to, x86IntRegType from ); +void MOVD32RmtoMMX( x86MMXRegType to, x86IntRegType from ); +void MOVD32RmOffsettoMMX( x86MMXRegType to, x86IntRegType from, u32 offset ); +void MOVD32MMXtoR( x86IntRegType to, x86MMXRegType from ); +void MOVD32MMXtoRm( x86IntRegType to, x86MMXRegType from ); +void MOVD32MMXtoRmOffset( x86IntRegType to, x86MMXRegType from, u32 offset ); +void PINSRWRtoMMX( x86MMXRegType to, x86SSERegType from, u8 imm8 ); +void PSHUFWRtoR(x86MMXRegType to, x86MMXRegType from, u8 imm8); +void PSHUFWMtoR(x86MMXRegType to, uptr from, u8 imm8); +void MASKMOVQRtoR(x86MMXRegType to, x86MMXRegType from); + +// emms +void EMMS( void ); + +//**********************************************************************************/ +//PACKSSWB,PACKSSDW: Pack Saturate Signed Word 64bits +//********************************************************************************** +void PACKSSWBMMXtoMMX(x86MMXRegType to, x86MMXRegType from); +void PACKSSDWMMXtoMMX(x86MMXRegType to, x86MMXRegType from); + +void PMOVMSKBMMXtoR(x86IntRegType to, x86MMXRegType from); + +void SSE2_MOVDQ2Q_XMM_to_MM( x86MMXRegType to, x86SSERegType from); +void SSE2_MOVQ2DQ_MM_to_XMM( x86SSERegType to, x86MMXRegType from); + +#endif // !__x86_64__ + +//********************* +// SSE instructions * +//********************* +void SSE_MOVAPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_MOVAPS_XMM_to_M128( uptr to, x86SSERegType from ); +void SSE_MOVAPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); + +void SSE_MOVUPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_MOVUPS_XMM_to_M128( uptr to, x86SSERegType from ); + +void SSE_MOVSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_MOVSS_XMM_to_M32( u32 to, x86SSERegType from ); +void SSE_MOVSS_XMM_to_Rm( x86IntRegType to, x86SSERegType from ); +void SSE_MOVSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_MOVSS_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ); +void SSE_MOVSS_XMM_to_RmOffset( x86IntRegType to, x86SSERegType from, int offset ); + +void SSE2_MOVSD_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); + +void SSE2_MOVQ_M64_to_XMM( x86SSERegType to, uptr from ); +void SSE2_MOVQ_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_MOVQ_XMM_to_M64( u32 to, x86SSERegType from ); + +void SSE_MASKMOVDQU_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); + +void SSE_MOVLPS_M64_to_XMM( x86SSERegType to, uptr from ); +void SSE_MOVLPS_XMM_to_M64( u32 to, x86SSERegType from ); +void SSE_MOVLPS_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ); +void SSE_MOVLPS_XMM_to_RmOffset( x86IntRegType to, x86SSERegType from, int offset ); + +void SSE_MOVHPS_M64_to_XMM( x86SSERegType to, uptr from ); +void SSE_MOVHPS_XMM_to_M64( u32 to, x86SSERegType from ); +void SSE_MOVHPS_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ); +void SSE_MOVHPS_XMM_to_RmOffset( x86IntRegType to, x86SSERegType from, int offset ); + +void SSE_MOVLHPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_MOVHLPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_MOVLPSRmtoR( x86SSERegType to, x86IntRegType from ); +void SSE_MOVLPSRmtoROffset( x86SSERegType to, x86IntRegType from, int offset ); +void SSE_MOVLPSRtoRm( x86SSERegType to, x86IntRegType from ); +void SSE_MOVLPSRtoRmOffset( x86SSERegType to, x86IntRegType from, int offset ); + +void SSE_MOVAPSRmStoR( x86SSERegType to, x86IntRegType from, x86IntRegType from2, int scale ); +void SSE_MOVAPSRtoRmS( x86SSERegType to, x86IntRegType from, x86IntRegType from2, int scale ); +void SSE_MOVAPSRtoRmOffset( x86IntRegType to, x86SSERegType from, int offset ); +void SSE_MOVAPSRmtoROffset( x86SSERegType to, x86IntRegType from, int offset ); +void SSE_MOVUPSRmStoR( x86SSERegType to, x86IntRegType from, x86IntRegType from2, int scale ); +void SSE_MOVUPSRtoRmS( x86SSERegType to, x86IntRegType from, x86IntRegType from2, int scale ); +void SSE_MOVUPSRtoRm( x86IntRegType to, x86IntRegType from ); +void SSE_MOVUPSRmtoR( x86IntRegType to, x86IntRegType from ); + +void SSE_MOVUPSRmtoROffset( x86SSERegType to, x86IntRegType from, int offset ); +void SSE_MOVUPSRtoRmOffset( x86SSERegType to, x86IntRegType from, int offset ); + +void SSE2_MOVDQARtoRmOffset( x86IntRegType to, x86SSERegType from, int offset ); +void SSE2_MOVDQARmtoROffset( x86SSERegType to, x86IntRegType from, int offset ); + +void SSE_RCPPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_RCPPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_RCPSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_RCPSS_M32_to_XMM( x86SSERegType to, uptr from ); + +void SSE_ORPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_ORPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_XORPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_XORPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_ANDPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_ANDPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_ANDNPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_ANDNPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_ADDPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_ADDPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_ADDSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_ADDSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_SUBPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_SUBPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_SUBSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_SUBSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_MULPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_MULPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_MULSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_MULSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPEQSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPEQSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPLTSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPLTSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPLESS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPLESS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPUNORDSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPUNORDSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPNESS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPNESS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPNLTSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPNLTSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPNLESS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPNLESS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPORDSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPORDSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); + +void SSE_UCOMISS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_UCOMISS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); + +#ifndef __x86_64__ +void SSE_PMAXSW_MM_to_MM( x86MMXRegType to, x86MMXRegType from ); +void SSE_PMINSW_MM_to_MM( x86MMXRegType to, x86MMXRegType from ); +void SSE_CVTPI2PS_MM_to_XMM( x86SSERegType to, x86MMXRegType from ); +void SSE_CVTPS2PI_M64_to_MM( x86MMXRegType to, uptr from ); +void SSE_CVTPS2PI_XMM_to_MM( x86MMXRegType to, x86SSERegType from ); +#endif +void SSE_CVTPI2PS_M64_to_XMM( x86SSERegType to, uptr from ); +void SSE_CVTTSS2SI_M32_to_R32(x86IntRegType to, uptr from); +void SSE_CVTTSS2SI_XMM_to_R32(x86IntRegType to, x86SSERegType from); +void SSE_CVTSI2SS_M32_to_XMM(x86SSERegType to, uptr from); +void SSE_CVTSI2SS_R_to_XMM(x86SSERegType to, x86IntRegType from); + +void SSE2_CVTDQ2PS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_CVTDQ2PS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_CVTPS2DQ_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_CVTPS2DQ_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_CVTTPS2DQ_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); + +void SSE_MAXPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_MAXPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_MAXSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_MAXSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_MINPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_MINPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_MINSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_MINSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_RSQRTPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_RSQRTPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_RSQRTSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_RSQRTSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_SQRTPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_SQRTPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_SQRTSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_SQRTSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_UNPCKLPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_UNPCKLPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_UNPCKHPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_UNPCKHPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_SHUFPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from, u8 imm8 ); +void SSE_SHUFPS_M128_to_XMM( x86SSERegType to, uptr from, u8 imm8 ); +void SSE_SHUFPS_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset, u8 imm8 ); +void SSE_CMPEQPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPEQPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPLTPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPLTPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPLEPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPLEPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPUNORDPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPUNORDPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPNEPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPNEPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPNLTPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPNLTPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPNLEPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPNLEPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_CMPORDPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_CMPORDPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_DIVPS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE_DIVPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE_DIVSS_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE_DIVSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +// VectorPath +void SSE2_PSHUFD_XMM_to_XMM( x86SSERegType to, x86SSERegType from, u8 imm8 ); +void SSE2_PSHUFD_M128_to_XMM( x86SSERegType to, uptr from, u8 imm8 ); + +void SSE2_PSHUFLW_XMM_to_XMM( x86SSERegType to, x86SSERegType from, u8 imm8 ); +void SSE2_PSHUFLW_M128_to_XMM( x86SSERegType to, uptr from, u8 imm8 ); +void SSE2_PSHUFHW_XMM_to_XMM( x86SSERegType to, x86SSERegType from, u8 imm8 ); +void SSE2_PSHUFHW_M128_to_XMM( x86SSERegType to, uptr from, u8 imm8 ); + +void SSE_STMXCSR( uptr from ); +void SSE_LDMXCSR( uptr from ); + + +//********************* +// SSE 2 Instructions* +//********************* +void SSE2_MOVDQA_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_MOVDQA_XMM_to_M128( uptr to, x86SSERegType from); +void SSE2_MOVDQA_XMM_to_XMM( x86SSERegType to, x86SSERegType from); + +void SSE2_MOVDQU_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_MOVDQU_XMM_to_M128( uptr to, x86SSERegType from); +void SSE2_MOVDQU_XMM_to_XMM( x86SSERegType to, x86SSERegType from); + +void SSE2_PSRLW_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PSRLW_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PSRLW_I8_to_XMM(x86SSERegType to, u8 imm8); +void SSE2_PSRLD_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PSRLD_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PSRLD_I8_to_XMM(x86SSERegType to, u8 imm8); +void SSE2_PSRLQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PSRLQ_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PSRLQ_I8_to_XMM(x86SSERegType to, u8 imm8); +void SSE2_PSRLDQ_I8_to_XMM(x86SSERegType to, u8 imm8); +void SSE2_PSRAW_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PSRAW_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PSRAW_I8_to_XMM(x86SSERegType to, u8 imm8); +void SSE2_PSRAD_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PSRAD_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PSRAD_I8_to_XMM(x86SSERegType to, u8 imm8); +void SSE2_PSLLW_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PSLLW_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PSLLW_I8_to_XMM(x86SSERegType to, u8 imm8); +void SSE2_PSLLD_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PSLLD_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PSLLD_I8_to_XMM(x86SSERegType to, u8 imm8); +void SSE2_PSLLQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PSLLQ_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PSLLQ_I8_to_XMM(x86SSERegType to, u8 imm8); +void SSE2_PSLLDQ_I8_to_XMM(x86SSERegType to, u8 imm8); +void SSE2_PMAXSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PMAXSW_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PMAXUB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PMAXUB_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PMINSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PMINSW_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PMINUB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PMINUB_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PADDSB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PADDSB_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PADDSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PADDSW_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PSUBSB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PSUBSB_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PSUBSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PSUBSW_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PSUBUSB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PSUBUSB_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PSUBUSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PSUBUSW_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PAND_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PAND_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PANDN_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PANDN_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PXOR_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PXOR_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PADDW_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PADDW_M128_to_XMM(x86SSERegType to, uptr from ); +void SSE2_PADDUSB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PADDUSB_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PADDUSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_PADDUSW_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2_PADDB_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PADDB_M128_to_XMM(x86SSERegType to, uptr from ); +void SSE2_PADDD_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PADDD_M128_to_XMM(x86SSERegType to, uptr from ); +void SSE2_PADDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PADDQ_M128_to_XMM(x86SSERegType to, uptr from ); + +//**********************************************************************************/ +//PACKSSWB,PACKSSDW: Pack Saturate Signed Word +//********************************************************************************** +void SSE2_PACKSSWB_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PACKSSWB_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PACKSSDW_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PACKSSDW_M128_to_XMM(x86SSERegType to, uptr from); + +void SSE2_PACKUSWB_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PACKUSWB_M128_to_XMM(x86SSERegType to, uptr from); + +//**********************************************************************************/ +//PUNPCKHWD: Unpack 16bit high +//********************************************************************************** +void SSE2_PUNPCKLBW_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PUNPCKLBW_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PUNPCKHBW_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PUNPCKHBW_M128_to_XMM(x86SSERegType to, uptr from); + +void SSE2_PUNPCKLWD_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PUNPCKLWD_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PUNPCKHWD_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PUNPCKHWD_M128_to_XMM(x86SSERegType to, uptr from); + +void SSE2_PUNPCKLDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PUNPCKLDQ_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PUNPCKHDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PUNPCKHDQ_M128_to_XMM(x86SSERegType to, uptr from); + +void SSE2_PUNPCKLQDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PUNPCKLQDQ_M128_to_XMM(x86SSERegType to, uptr from); + +void SSE2_PUNPCKHQDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PUNPCKHQDQ_M128_to_XMM(x86SSERegType to, uptr from); + +// mult by half words +void SSE2_PMULLW_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PMULLW_M128_to_XMM(x86SSERegType to, uptr from); +void SSE2_PMULHW_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PMULHW_M128_to_XMM(x86SSERegType to, uptr from); + +void SSE2_PMULUDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE2_PMULUDQ_M128_to_XMM(x86SSERegType to, uptr from); + + +//**********************************************************************************/ +//PMOVMSKB: Create 16bit mask from signs of 8bit integers +//********************************************************************************** +void SSE2_PMOVMSKB_XMM_to_R32(x86IntRegType to, x86SSERegType from); + +void SSE_MOVMSKPS_XMM_to_R32(x86IntRegType to, x86SSERegType from); +void SSE2_MOVMSKPD_XMM_to_R32(x86IntRegType to, x86SSERegType from); + +//**********************************************************************************/ +//PEXTRW,PINSRW: Packed Extract/Insert Word * +//********************************************************************************** +void SSE_PEXTRW_XMM_to_R32(x86IntRegType to, x86SSERegType from, u8 imm8 ); +void SSE_PINSRW_R32_to_XMM(x86SSERegType from, x86IntRegType to, u8 imm8 ); + + +//**********************************************************************************/ +//PSUBx: Subtract Packed Integers * +//********************************************************************************** +void SSE2_PSUBB_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PSUBB_M128_to_XMM(x86SSERegType to, uptr from ); +void SSE2_PSUBW_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PSUBW_M128_to_XMM(x86SSERegType to, uptr from ); +void SSE2_PSUBD_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PSUBD_M128_to_XMM(x86SSERegType to, uptr from ); +void SSE2_PSUBQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PSUBQ_M128_to_XMM(x86SSERegType to, uptr from ); +/////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//PCMPxx: Compare Packed Integers * +//********************************************************************************** +void SSE2_PCMPGTB_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PCMPGTB_M128_to_XMM(x86SSERegType to, uptr from ); +void SSE2_PCMPGTW_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PCMPGTW_M128_to_XMM(x86SSERegType to, uptr from ); +void SSE2_PCMPGTD_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PCMPGTD_M128_to_XMM(x86SSERegType to, uptr from ); +void SSE2_PCMPEQB_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PCMPEQB_M128_to_XMM(x86SSERegType to, uptr from ); +void SSE2_PCMPEQW_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PCMPEQW_M128_to_XMM(x86SSERegType to, uptr from ); +void SSE2_PCMPEQD_XMM_to_XMM(x86SSERegType to, x86SSERegType from ); +void SSE2_PCMPEQD_M128_to_XMM(x86SSERegType to, uptr from ); +//**********************************************************************************/ +//MOVD: Move Dword(32bit) to /from XMM reg * +//********************************************************************************** +void SSE2_MOVD_M32_to_XMM( x86SSERegType to, uptr from ); +void SSE2_MOVD_R_to_XMM( x86SSERegType to, x86IntRegType from ); +void SSE2_MOVD_Rm_to_XMM( x86SSERegType to, x86IntRegType from ); +void SSE2_MOVD_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ); +void SSE2_MOVD_XMM_to_M32( u32 to, x86SSERegType from ); +void SSE2_MOVD_XMM_to_R( x86IntRegType to, x86SSERegType from ); +void SSE2_MOVD_XMM_to_Rm( x86IntRegType to, x86SSERegType from ); +void SSE2_MOVD_XMM_to_RmOffset( x86IntRegType to, x86SSERegType from, int offset ); + +#ifdef __x86_64__ +void SSE2_MOVQ_XMM_to_R( x86IntRegType to, x86SSERegType from ); +void SSE2_MOVQ_R_to_XMM( x86SSERegType to, x86IntRegType from ); +#endif + +//**********************************************************************************/ +//POR : SSE Bitwise OR * +//********************************************************************************** +void SSE2_POR_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2_POR_M128_to_XMM( x86SSERegType to, uptr from ); + +void SSE3_HADDPS_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE3_HADDPS_M128_to_XMM(x86SSERegType to, uptr from); + +void SSE3_MOVSLDUP_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE3_MOVSLDUP_M128_to_XMM(x86SSERegType to, uptr from); +void SSE3_MOVSHDUP_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSE3_MOVSHDUP_M128_to_XMM(x86SSERegType to, uptr from); +//********************* +// SSE-X - uses both SSE,SSE2 code and tries to keep consistensies between the data +// Uses g_xmmtypes to infer the correct type. +//********************* +void SSEX_MOVDQA_M128_to_XMM( x86SSERegType to, uptr from ); +void SSEX_MOVDQA_XMM_to_M128( uptr to, x86SSERegType from ); +void SSEX_MOVDQA_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); + +void SSEX_MOVDQARmtoROffset( x86SSERegType to, x86IntRegType from, int offset ); +void SSEX_MOVDQARtoRmOffset( x86IntRegType to, x86SSERegType from, int offset ); + +void SSEX_MOVDQU_M128_to_XMM( x86SSERegType to, uptr from ); +void SSEX_MOVDQU_XMM_to_M128( uptr to, x86SSERegType from ); +void SSEX_MOVDQU_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); + +void SSEX_MOVD_M32_to_XMM( x86SSERegType to, uptr from ); +void SSEX_MOVD_XMM_to_M32( u32 to, x86SSERegType from ); +void SSEX_MOVD_XMM_to_Rm( x86IntRegType to, x86SSERegType from ); +void SSEX_MOVD_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ); +void SSEX_MOVD_XMM_to_RmOffset( x86IntRegType to, x86SSERegType from, int offset ); + +void SSEX_POR_M128_to_XMM( x86SSERegType to, uptr from ); +void SSEX_POR_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSEX_PXOR_M128_to_XMM( x86SSERegType to, uptr from ); +void SSEX_PXOR_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSEX_PAND_M128_to_XMM( x86SSERegType to, uptr from ); +void SSEX_PAND_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSEX_PANDN_M128_to_XMM( x86SSERegType to, uptr from ); +void SSEX_PANDN_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); + +void SSEX_PUNPCKLDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSEX_PUNPCKLDQ_M128_to_XMM(x86SSERegType to, uptr from); +void SSEX_PUNPCKHDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from); +void SSEX_PUNPCKHDQ_M128_to_XMM(x86SSERegType to, uptr from); + +void SSEX_MOVHLPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); + +//********************* +// 3DNOW instructions * +//********************* +void FEMMS( void ); +void PFCMPEQMtoR( x86IntRegType to, uptr from ); +void PFCMPGTMtoR( x86IntRegType to, uptr from ); +void PFCMPGEMtoR( x86IntRegType to, uptr from ); +void PFADDMtoR( x86IntRegType to, uptr from ); +void PFADDRtoR( x86IntRegType to, x86IntRegType from ); +void PFSUBMtoR( x86IntRegType to, uptr from ); +void PFSUBRtoR( x86IntRegType to, x86IntRegType from ); +void PFMULMtoR( x86IntRegType to, uptr from ); +void PFMULRtoR( x86IntRegType to, x86IntRegType from ); +void PFRCPMtoR( x86IntRegType to, uptr from ); +void PFRCPRtoR( x86IntRegType to, x86IntRegType from ); +void PFRCPIT1RtoR( x86IntRegType to, x86IntRegType from ); +void PFRCPIT2RtoR( x86IntRegType to, x86IntRegType from ); +void PFRSQRTRtoR( x86IntRegType to, x86IntRegType from ); +void PFRSQIT1RtoR( x86IntRegType to, x86IntRegType from ); +void PF2IDMtoR( x86IntRegType to, uptr from ); +void PF2IDRtoR( x86IntRegType to, x86IntRegType from ); +void PI2FDMtoR( x86IntRegType to, uptr from ); +void PI2FDRtoR( x86IntRegType to, x86IntRegType from ); +void PFMAXMtoR( x86IntRegType to, uptr from ); +void PFMAXRtoR( x86IntRegType to, x86IntRegType from ); +void PFMINMtoR( x86IntRegType to, uptr from ); +void PFMINRtoR( x86IntRegType to, x86IntRegType from ); + +void SSE2EMU_MOVSD_XMM_to_XMM( x86SSERegType to, x86SSERegType from); +void SSE2EMU_MOVQ_M64_to_XMM( x86SSERegType to, uptr from); +void SSE2EMU_MOVQ_XMM_to_XMM( x86SSERegType to, x86SSERegType from); +void SSE2EMU_MOVD_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ); +void SSE2EMU_MOVD_XMM_to_RmOffset(x86IntRegType to, x86SSERegType from, int offset ); + +#ifndef __x86_64__ +void SSE2EMU_MOVDQ2Q_XMM_to_MM( x86MMXRegType to, x86SSERegType from); +void SSE2EMU_MOVQ2DQ_MM_to_XMM( x86SSERegType to, x86MMXRegType from); +#endif + +/* SSE2 emulated functions for SSE CPU's by kekko*/ + +void SSE2EMU_PSHUFD_XMM_to_XMM( x86SSERegType to, x86SSERegType from, u8 imm8 ); +void SSE2EMU_MOVD_XMM_to_R( x86IntRegType to, x86SSERegType from ); +void SSE2EMU_CVTPS2DQ_XMM_to_XMM( x86SSERegType to, x86SSERegType from ); +void SSE2EMU_CVTDQ2PS_M128_to_XMM( x86SSERegType to, uptr from ); +void SSE2EMU_MOVD_XMM_to_M32( uptr to, x86SSERegType from ); +void SSE2EMU_MOVD_R_to_XMM( x86SSERegType to, x86IntRegType from ); + +//////////////////////////////////////////////////// +#ifdef _DEBUG +#define WRITECHECK() CheckX86Ptr() +#else +#define WRITECHECK() +#endif + +#define writeVAL(val) ({ \ + WRITECHECK(); \ + *(typeof(val)*)x86Ptr = (val); \ + x86Ptr += sizeof(val); \ + (void)0; \ + }) + +#define write8(val ) writeVAL((u8)(val)) +#define write16(val ) writeVAL((u16)(val)) +#define write32( val ) writeVAL((u32)(val)) +#define write64( val ) writeVAL((u64)(val)) + +#ifdef __cplusplus +} +#endif + +#endif // __IX86_H__ diff --git a/libpcsxcore/ix86_64/ix86_3dnow.c b/libpcsxcore/ix86_64/ix86_3dnow.c new file mode 100644 index 00000000..8fd42333 --- /dev/null +++ b/libpcsxcore/ix86_64/ix86_3dnow.c @@ -0,0 +1,178 @@ +// stop compiling if NORECBUILD build (only for Visual Studio) +#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) + +#include "ix86-64.h" + +/**********************/ +/* 3DNOW instructions */ +/**********************/ + +/* femms */ +void FEMMS( void ) +{ + write16( 0x0E0F ); +} + +void PFCMPEQMtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x0F), true, to, from, 1); + write8( 0xB0 ); +} + +void PFCMPGTMtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x0F), true, to, from, 1); + write8( 0xA0 ); +} + +void PFCMPGEMtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x0F), true, to, from, 1); + write8( 0x90 ); +} + +void PFADDMtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x0F), true, to, from, 1); + write8( 0x9E ); +} + +void PFADDRtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0x9E ); +} + +void PFSUBMtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x0F), true, to, from, 1); + write8( 0x9A ); +} + +void PFSUBRtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0x9A ); +} + +void PFMULMtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x0F), true, to, from, 1); + write8( 0xB4 ); +} + +void PFMULRtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0xB4 ); +} + +void PFRCPMtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x0F), true, to, from, 1); + write8( 0x96 ); +} + +void PFRCPRtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0x96 ); +} + +void PFRCPIT1RtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0xA6 ); +} + +void PFRCPIT2RtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0xB6 ); +} + +void PFRSQRTRtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0x97 ); +} + +void PFRSQIT1RtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0xA7 ); +} + +void PF2IDMtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x0F), true, to, from, 1); + write8( 0x1D ); +} + +void PF2IDRtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0x1D ); +} + +void PI2FDMtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x0F), true, to, from, 1); + write8( 0x0D ); +} + +void PI2FDRtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0x0D ); +} + +void PFMAXMtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x0F), true, to, from, 1); + write8( 0xA4 ); +} + +void PFMAXRtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0xA4 ); +} + +void PFMINMtoR( x86IntRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x0F), true, to, from, 1); + write8( 0x94 ); +} + +void PFMINRtoR( x86IntRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x0F0F ); + ModRM( 3, to, from ); + write8( 0x94 ); +} + +#endif diff --git a/libpcsxcore/ix86_64/ix86_cpudetect.c b/libpcsxcore/ix86_64/ix86_cpudetect.c new file mode 100644 index 00000000..3c014d89 --- /dev/null +++ b/libpcsxcore/ix86_64/ix86_cpudetect.c @@ -0,0 +1,487 @@ +/* Cpudetection lib + * Copyright (C) 2002-2003 Pcsx2 Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ +#if defined (_WIN32) +#include +#endif + +#include +#include + +#include "ix86-64.h" + +#if defined (_MSC_VER) && _MSC_VER >= 1400 + + void __cpuid(int* CPUInfo, int InfoType); + unsigned __int64 __rdtsc(); + + #pragma intrinsic(__cpuid) + #pragma intrinsic(__rdtsc) + +#endif + +CAPABILITIES cpucaps; +CPUINFO cpuinfo; + +#define cpuid(cmd,a,b,c,d) \ + __asm__ __volatile__("cpuid" \ + : "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "0" (cmd)) + +static s32 iCpuId( u32 cmd, u32 *regs ) +{ + int flag=1; + +#if defined (_MSC_VER) && _MSC_VER >= 1400 + + __cpuid( regs, cmd ); + + return 0; + +#elif defined (_MSC_VER) + +#ifdef __x86_64__ + assert(0); +#else // __x86_64__ + __asm + { + push ebx; + push edi; + + pushfd; + pop eax; + mov edx, eax; + xor eax, 1 << 21; + push eax; + popfd; + pushfd; + pop eax; + xor eax, edx; + mov flag, eax; + } + if ( ! flag ) + { + return -1; + } + + __asm + { + mov eax, cmd; + cpuid; + mov edi, [regs] + mov [edi], eax; + mov [edi+4], ebx; + mov [edi+8], ecx; + mov [edi+12], edx; + + pop edi; + pop ebx; + } +#endif // __x86_64__ + return 0; + + +#else + +#ifndef __x86_64__ + // see if we can use cpuid + __asm__ __volatile__ ( + "sub $0x18, %%esp\n" + "pushf\n" + "pop %%eax\n" + "mov %%eax, %%edx\n" + "xor $0x200000, %%eax\n" + "push %%eax\n" + "popf\n" + "pushf\n" + "pop %%eax\n" + "xor %%edx, %%eax\n" + "mov %%eax, %0\n" + "add $0x18, %%esp\n" + : "=r"(flag) : + ); +#endif + + if ( !flag ) + return -1; + + cpuid(cmd, regs[0], regs[1], regs[2], regs[3]); + return 0; +#endif // _MSC_VER +} + +u64 GetCPUTick( void ) +{ +#if defined (_MSC_VER) && _MSC_VER >= 1400 + + return __rdtsc(); + +#elif defined(__MSCW32__) && !defined(__x86_64__) + + __asm rdtsc; + +#else + + u32 _a, _d; + __asm__ __volatile__ ("rdtsc" : "=a"(_a), "=d"(_d)); + return (u64)_a | ((u64)_d << 32); + +#endif +} + +#if defined __LINUX__ + +#include +#include +//* +unsigned long timeGetTime2() +{ + struct timeval tv; + gettimeofday(&tv, 0); // well, maybe there are better ways + return (unsigned long)tv.tv_sec * 1000 + tv.tv_usec/1000; // to do that, but at least it works +} +//*/ +#endif + +s64 CPUSpeedHz( unsigned int time ) +{ + s64 timeStart, + timeStop; + s64 startTick, + endTick; + s64 overhead; + + if( ! cpucaps.hasTimeStampCounter ) + { + return 0; //check if function is supported + } + + overhead = GetCPUTick() - GetCPUTick(); + + timeStart = timeGetTime2( ); + while( timeGetTime2( ) == timeStart ) + { + timeStart = timeGetTime2( ); + } + for(;;) + { + timeStop = timeGetTime2( ); + if ( ( timeStop - timeStart ) > 1 ) + { + startTick = GetCPUTick( ); + break; + } + } + + timeStart = timeStop; + for(;;) + { + timeStop = timeGetTime2( ); + if ( ( timeStop - timeStart ) > time ) + { + endTick = GetCPUTick( ); + break; + } + } + + return (s64)( ( endTick - startTick ) + ( overhead ) ); +} + +//////////////////////////////////////////////////// +void cpudetectInit( void ) +{ + u32 regs[ 4 ]; + u32 cmds; + u32 AMDspeed; + s8 AMDspeedString[10]; + int cputype=0; // Cpu type + //AMD 64 STUFF + u32 x86_64_8BITBRANDID; + u32 x86_64_12BITBRANDID; + memset( cpuinfo.x86ID, 0, sizeof( cpuinfo.x86ID ) ); + cpuinfo.x86Family = 0; + cpuinfo.x86Model = 0; + cpuinfo.x86PType = 0; + cpuinfo.x86StepID = 0; + cpuinfo.x86Flags = 0; + cpuinfo.x86EFlags = 0; + + if ( iCpuId( 0, regs ) == -1 ) return; + + cmds = regs[ 0 ]; + ((u32*)cpuinfo.x86ID)[ 0 ] = regs[ 1 ]; + ((u32*)cpuinfo.x86ID)[ 1 ] = regs[ 3 ]; + ((u32*)cpuinfo.x86ID)[ 2 ] = regs[ 2 ]; + if ( cmds >= 0x00000001 ) + { + if ( iCpuId( 0x00000001, regs ) != -1 ) + { + cpuinfo.x86StepID = regs[ 0 ] & 0xf; + cpuinfo.x86Model = (regs[ 0 ] >> 4) & 0xf; + cpuinfo.x86Family = (regs[ 0 ] >> 8) & 0xf; + cpuinfo.x86PType = (regs[ 0 ] >> 12) & 0x3; + x86_64_8BITBRANDID = regs[1] & 0xff; + cpuinfo.x86Flags = regs[ 3 ]; + } + } + if ( iCpuId( 0x80000000, regs ) != -1 ) + { + cmds = regs[ 0 ]; + if ( cmds >= 0x80000001 ) + { + if ( iCpuId( 0x80000001, regs ) != -1 ) + { + x86_64_12BITBRANDID = regs[1] & 0xfff; + cpuinfo.x86EFlags = regs[ 3 ]; + + } + } + } + switch(cpuinfo.x86PType) + { + case 0: + strcpy( cpuinfo.x86Type, "Standard OEM"); + break; + case 1: + strcpy( cpuinfo.x86Type, "Overdrive"); + break; + case 2: + strcpy( cpuinfo.x86Type, "Dual"); + break; + case 3: + strcpy( cpuinfo.x86Type, "Reserved"); + break; + default: + strcpy( cpuinfo.x86Type, "Unknown"); + break; + } + if ( cpuinfo.x86ID[ 0 ] == 'G' ){ cputype=0;}//trick lines but if you know a way better ;p + if ( cpuinfo.x86ID[ 0 ] == 'A' ){ cputype=1;} + + if ( cputype == 0 ) //intel cpu + { + if( ( cpuinfo.x86Family >= 7 ) && ( cpuinfo.x86Family < 15 ) ) + { + strcpy( cpuinfo.x86Fam, "Intel P6 family (Not PIV and Higher then PPro" ); + } + else + { + switch( cpuinfo.x86Family ) + { + // Start at 486 because if it's below 486 there is no cpuid instruction + case 4: + strcpy( cpuinfo.x86Fam, "Intel 486" ); + break; + case 5: + switch( cpuinfo.x86Model ) + { + case 4: + case 8: // 0.25 µm + strcpy( cpuinfo.x86Fam, "Intel Pentium (MMX)"); + break; + default: + strcpy( cpuinfo.x86Fam, "Intel Pentium" ); + } + break; + case 6: + switch( cpuinfo.x86Model ) + { + case 0: // Pentium pro (P6 A-Step) + case 1: // Pentium pro + strcpy( cpuinfo.x86Fam, "Intel Pentium Pro" ); + break; + + case 2: // 66 MHz FSB + case 5: // Xeon/Celeron (0.25 µm) + case 6: // Internal L2 cache + strcpy( cpuinfo.x86Fam, "Intel Pentium II" ); + break; + + case 7: // Xeon external L2 cache + case 8: // Xeon/Celeron with 256 KB on-die L2 cache + case 10: // Xeon/Celeron with 1 or 2 MB on-die L2 cache + case 11: // Xeon/Celeron with Tualatin core, on-die cache + strcpy( cpuinfo.x86Fam, "Intel Pentium III" ); + break; + case 15: // Core 2 Duo Allendale/Conroe + strcpy( cpuinfo.x86Fam, "Intel Core 2 Duo" ); + break; + + default: + strcpy( cpuinfo.x86Fam, "Intel Pentium Pro (Unknown)" ); + } + break; + case 15: + switch( cpuinfo.x86Model ) + { + case 0: // Willamette (A-Step) + case 1: // Willamette + strcpy( cpuinfo.x86Fam, "Willamette Intel Pentium IV" ); + break; + case 2: // Northwood + strcpy( cpuinfo.x86Fam, "Northwood Intel Pentium IV" ); + break; + + default: + strcpy( cpuinfo.x86Fam, "Intel Pentium IV (Unknown)" ); + break; + } + break; + default: + strcpy( cpuinfo.x86Fam, "Unknown Intel CPU" ); + } + } + } + else if ( cputype == 1 ) //AMD cpu + { + if( cpuinfo.x86Family >= 7 ) + { + if((x86_64_12BITBRANDID !=0) || (x86_64_8BITBRANDID !=0)) + { + if(x86_64_8BITBRANDID == 0 ) + { + switch((x86_64_12BITBRANDID >>6)& 0x3f) + { + case 4: + strcpy(cpuinfo.x86Fam,"AMD Athlon(tm) 64 Processor"); + AMDspeed = 22 + (x86_64_12BITBRANDID & 0x1f); + //AMDspeedString = strtol(AMDspeed, (char**)NULL,10); + sprintf(AMDspeedString," %d",AMDspeed); + strcat(AMDspeedString,"00+"); + strcat(cpuinfo.x86Fam,AMDspeedString); + break; + case 12: + strcpy(cpuinfo.x86Fam,"AMD Opteron(tm) Processor"); + break; + case 5: + strcpy( cpuinfo.x86Fam, "AMD Athlon X2 Processor" ); + AMDspeed = 22 + (x86_64_12BITBRANDID & 0x1f); + //AMDspeedString = strtol(AMDspeed, (char**)NULL,10); + sprintf(AMDspeedString," %d",AMDspeed); + strcat(AMDspeedString,"00+"); + strcat(cpuinfo.x86Fam,AMDspeedString); + break; + case 44: + strcpy( cpuinfo.x86Fam, "AMD Opteron(tm) Dual Core Processor" ); + break; + default: + strcpy(cpuinfo.x86Fam,"Unknown AMD 64 proccesor"); + + } + } + else //8bit brand id is non zero + { + strcpy(cpuinfo.x86Fam,"Unsupported yet AMD64 cpu"); + } + } + else + { + strcpy( cpuinfo.x86Fam, "AMD K7+ Processor" ); + } + } + else + { + switch ( cpuinfo.x86Family ) + { + case 4: + switch( cpuinfo.x86Model ) + { + case 14: + case 15: // Write-back enhanced + strcpy( cpuinfo.x86Fam, "AMD 5x86 Processor" ); + break; + + case 3: // DX2 + case 7: // Write-back enhanced DX2 + case 8: // DX4 + case 9: // Write-back enhanced DX4 + strcpy( cpuinfo.x86Fam, "AMD 486 Processor" ); + break; + + + default: + strcpy( cpuinfo.x86Fam, "AMD Unknown Processor" ); + + } + break; + + case 5: + switch( cpuinfo.x86Model) + { + case 0: // SSA 5 (75, 90 and 100 Mhz) + case 1: // 5k86 (PR 120 and 133 MHz) + case 2: // 5k86 (PR 166 MHz) + case 3: // K5 5k86 (PR 200 MHz) + strcpy( cpuinfo.x86Fam, "AMD K5 Processor" ); + break; + + case 6: + case 7: // (0.25 µm) + case 8: // K6-2 + case 9: // K6-III + case 14: // K6-2+ / K6-III+ + strcpy( cpuinfo.x86Fam, "AMD K6 Series Processor" ); + break; + + default: + strcpy( cpuinfo.x86Fam, "AMD Unknown Processor" ); + } + break; + case 6: + strcpy( cpuinfo.x86Fam, "AMD Athlon XP Processor" ); + break; + default: + strcpy( cpuinfo.x86Fam, "Unknown AMD CPU" ); + } + } + } + //capabilities + cpucaps.hasFloatingPointUnit = ( cpuinfo.x86Flags >> 0 ) & 1; + cpucaps.hasVirtual8086ModeEnhancements = ( cpuinfo.x86Flags >> 1 ) & 1; + cpucaps.hasDebuggingExtensions = ( cpuinfo.x86Flags >> 2 ) & 1; + cpucaps.hasPageSizeExtensions = ( cpuinfo.x86Flags >> 3 ) & 1; + cpucaps.hasTimeStampCounter = ( cpuinfo.x86Flags >> 4 ) & 1; + cpucaps.hasModelSpecificRegisters = ( cpuinfo.x86Flags >> 5 ) & 1; + cpucaps.hasPhysicalAddressExtension = ( cpuinfo.x86Flags >> 6 ) & 1; + cpucaps.hasMachineCheckArchitecture = ( cpuinfo.x86Flags >> 7 ) & 1; + cpucaps.hasCOMPXCHG8BInstruction = ( cpuinfo.x86Flags >> 8 ) & 1; + cpucaps.hasAdvancedProgrammableInterruptController = ( cpuinfo.x86Flags >> 9 ) & 1; + cpucaps.hasSEPFastSystemCall = ( cpuinfo.x86Flags >> 11 ) & 1; + cpucaps.hasMemoryTypeRangeRegisters = ( cpuinfo.x86Flags >> 12 ) & 1; + cpucaps.hasPTEGlobalFlag = ( cpuinfo.x86Flags >> 13 ) & 1; + cpucaps.hasMachineCheckArchitecture = ( cpuinfo.x86Flags >> 14 ) & 1; + cpucaps.hasConditionalMoveAndCompareInstructions = ( cpuinfo.x86Flags >> 15 ) & 1; + cpucaps.hasFGPageAttributeTable = ( cpuinfo.x86Flags >> 16 ) & 1; + cpucaps.has36bitPageSizeExtension = ( cpuinfo.x86Flags >> 17 ) & 1; + cpucaps.hasProcessorSerialNumber = ( cpuinfo.x86Flags >> 18 ) & 1; + cpucaps.hasCFLUSHInstruction = ( cpuinfo.x86Flags >> 19 ) & 1; + cpucaps.hasDebugStore = ( cpuinfo.x86Flags >> 21 ) & 1; + cpucaps.hasACPIThermalMonitorAndClockControl = ( cpuinfo.x86Flags >> 22 ) & 1; + cpucaps.hasMultimediaExtensions = ( cpuinfo.x86Flags >> 23 ) & 1; //mmx + cpucaps.hasFastStreamingSIMDExtensionsSaveRestore = ( cpuinfo.x86Flags >> 24 ) & 1; + cpucaps.hasStreamingSIMDExtensions = ( cpuinfo.x86Flags >> 25 ) & 1; //sse + cpucaps.hasStreamingSIMD2Extensions = ( cpuinfo.x86Flags >> 26 ) & 1; //sse2 + cpucaps.hasSelfSnoop = ( cpuinfo.x86Flags >> 27 ) & 1; + cpucaps.hasHyperThreading = ( cpuinfo.x86Flags >> 28 ) & 1; + cpucaps.hasThermalMonitor = ( cpuinfo.x86Flags >> 29 ) & 1; + cpucaps.hasIntel64BitArchitecture = ( cpuinfo.x86Flags >> 30 ) & 1; + //that is only for AMDs + cpucaps.hasMultimediaExtensionsExt = ( cpuinfo.x86EFlags >> 22 ) & 1; //mmx2 + cpucaps.hasAMD64BitArchitecture = ( cpuinfo.x86EFlags >> 29 ) & 1; //64bit cpu + cpucaps.has3DNOWInstructionExtensionsExt = ( cpuinfo.x86EFlags >> 30 ) & 1; //3dnow+ + cpucaps.has3DNOWInstructionExtensions = ( cpuinfo.x86EFlags >> 31 ) & 1; //3dnow + cpuinfo.cpuspeed = (u32 )(CPUSpeedHz( 1000 ) / 1000000); +} diff --git a/libpcsxcore/ix86_64/ix86_fpu.c b/libpcsxcore/ix86_64/ix86_fpu.c new file mode 100644 index 00000000..ca49eb7c --- /dev/null +++ b/libpcsxcore/ix86_64/ix86_fpu.c @@ -0,0 +1,248 @@ +// stop compiling if NORECBUILD build (only for Visual Studio) +#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) + +#include +#include +#include "ix86-64.h" + +/********************/ +/* FPU instructions */ +/********************/ + +/* fild m32 to fpu reg stack */ +void FILD32( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xDB), false, 0, from, 0); +} + +/* fistp m32 from fpu reg stack */ +void FISTP32( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xDB), false, 3, from, 0); +} + +/* fld m32 to fpu reg stack */ +void FLD32( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xD9), false, 0, from, 0); +} + +// fld st(i) +void FLD(int st) { write16(0xc0d9+(st<<8)); } + +void FLD1() { write16(0xe8d9); } +void FLDL2E() { write16(0xead9); } + +/* fst m32 from fpu reg stack */ +void FST32( uptr to ) +{ + MEMADDR_OP(0, VAROP1(0xD9), false, 2, to, 0); +} + +/* fstp m32 from fpu reg stack */ +void FSTP32( uptr to ) +{ + MEMADDR_OP(0, VAROP1(0xD9), false, 3, to, 0); +} + +// fstp st(i) +void FSTP(int st) { write16(0xd8dd+(st<<8)); } + +/* fldcw fpu control word from m16 */ +void FLDCW( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xD9), false, 5, from, 0); +} + +/* fnstcw fpu control word to m16 */ +void FNSTCW( uptr to ) +{ + MEMADDR_OP(0, VAROP1(0xD9), false, 7, to, 0); +} + +void FNSTSWtoAX( void ) +{ + write16( 0xE0DF ); +} + +void FXAM() +{ + write16(0xe5d9); +} + +void FDECSTP() { write16(0xf6d9); } +void FRNDINT() { write16(0xfcd9); } +void FXCH(int st) { write16(0xc8d9+(st<<8)); } +void F2XM1() { write16(0xf0d9); } +void FSCALE() { write16(0xfdd9); } + +/* fadd ST(src) to fpu reg stack ST(0) */ +void FADD32Rto0( x86IntRegType src ) +{ + write8( 0xD8 ); + write8( 0xC0 + src ); +} + +/* fadd ST(0) to fpu reg stack ST(src) */ +void FADD320toR( x86IntRegType src ) +{ + write8( 0xDC ); + write8( 0xC0 + src ); +} + +/* fsub ST(src) to fpu reg stack ST(0) */ +void FSUB32Rto0( x86IntRegType src ) +{ + write8( 0xD8 ); + write8( 0xE0 + src ); +} + +/* fsub ST(0) to fpu reg stack ST(src) */ +void FSUB320toR( x86IntRegType src ) +{ + write8( 0xDC ); + write8( 0xE8 + src ); +} + +/* fsubp -> substract ST(0) from ST(1), store in ST(1) and POP stack */ +void FSUBP( void ) +{ + write8( 0xDE ); + write8( 0xE9 ); +} + +/* fmul ST(src) to fpu reg stack ST(0) */ +void FMUL32Rto0( x86IntRegType src ) +{ + write8( 0xD8 ); + write8( 0xC8 + src ); +} + +/* fmul ST(0) to fpu reg stack ST(src) */ +void FMUL320toR( x86IntRegType src ) +{ + write8( 0xDC ); + write8( 0xC8 + src ); +} + +/* fdiv ST(src) to fpu reg stack ST(0) */ +void FDIV32Rto0( x86IntRegType src ) +{ + write8( 0xD8 ); + write8( 0xF0 + src ); +} + +/* fdiv ST(0) to fpu reg stack ST(src) */ +void FDIV320toR( x86IntRegType src ) +{ + write8( 0xDC ); + write8( 0xF8 + src ); +} + +void FDIV320toRP( x86IntRegType src ) +{ + write8( 0xDE ); + write8( 0xF8 + src ); +} + +/* fadd m32 to fpu reg stack */ +void FADD32( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xD8), false, 0, from, 0); +} + +/* fsub m32 to fpu reg stack */ +void FSUB32( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xD8), false, 4, from, 0); +} + +/* fmul m32 to fpu reg stack */ +void FMUL32( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xD8), false, 1, from, 0); +} + +/* fdiv m32 to fpu reg stack */ +void FDIV32( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xD8), false, 6, from, 0); +} + +/* fabs fpu reg stack */ +void FABS( void ) +{ + write16( 0xE1D9 ); +} + +/* fsqrt fpu reg stack */ +void FSQRT( void ) +{ + write16( 0xFAD9 ); +} + +void FPATAN(void) { write16(0xf3d9); } +void FSIN(void) { write16(0xfed9); } + +/* fchs fpu reg stack */ +void FCHS( void ) +{ + write16( 0xE0D9 ); +} + +/* fcomi st, st(i) */ +void FCOMI( x86IntRegType src ) +{ + write8( 0xDB ); + write8( 0xF0 + src ); +} + +/* fcomip st, st(i) */ +void FCOMIP( x86IntRegType src ) +{ + write8( 0xDF ); + write8( 0xF0 + src ); +} + +/* fucomi st, st(i) */ +void FUCOMI( x86IntRegType src ) +{ + write8( 0xDB ); + write8( 0xE8 + src ); +} + +/* fucomip st, st(i) */ +void FUCOMIP( x86IntRegType src ) +{ + write8( 0xDF ); + write8( 0xE8 + src ); +} + +/* fcom m32 to fpu reg stack */ +void FCOM32( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xD8), false, 2, from, 0); +} + +/* fcomp m32 to fpu reg stack */ +void FCOMP32( uptr from ) +{ + MEMADDR_OP(0, VAROP1(0xD8), false, 3, from, 0); +} + +#define FCMOV32( low, high ) \ + { \ + write8( low ); \ + write8( high + from ); \ + } + +void FCMOVB32( x86IntRegType from ) { FCMOV32( 0xDA, 0xC0 ); } +void FCMOVE32( x86IntRegType from ) { FCMOV32( 0xDA, 0xC8 ); } +void FCMOVBE32( x86IntRegType from ) { FCMOV32( 0xDA, 0xD0 ); } +void FCMOVU32( x86IntRegType from ) { FCMOV32( 0xDA, 0xD8 ); } +void FCMOVNB32( x86IntRegType from ) { FCMOV32( 0xDB, 0xC0 ); } +void FCMOVNE32( x86IntRegType from ) { FCMOV32( 0xDB, 0xC8 ); } +void FCMOVNBE32( x86IntRegType from ) { FCMOV32( 0xDB, 0xD0 ); } +void FCMOVNU32( x86IntRegType from ) { FCMOV32( 0xDB, 0xD8 ); } + +#endif diff --git a/libpcsxcore/ix86_64/ix86_mmx.c b/libpcsxcore/ix86_64/ix86_mmx.c new file mode 100644 index 00000000..eddbbfcc --- /dev/null +++ b/libpcsxcore/ix86_64/ix86_mmx.c @@ -0,0 +1,646 @@ +// stop compiling if NORECBUILD build (only for Visual Studio) +#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) + +#include "ix86-64.h" + +#include + +/********************/ +/* MMX instructions */ +/********************/ + +// r64 = mm + +/* movq m64 to r64 */ +void MOVQMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x6F), true, to, from, 0); +} + +/* movq r64 to m64 */ +void MOVQRtoM( uptr to, x86MMXRegType from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x7F), true, from, to, 0); +} + +/* pand r64 to r64 */ +void PANDRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xDB0F ); + ModRM( 3, to, from ); +} + +void PANDNRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xDF0F ); + ModRM( 3, to, from ); +} + +/* por r64 to r64 */ +void PORRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xEB0F ); + ModRM( 3, to, from ); +} + +/* pxor r64 to r64 */ +void PXORRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xEF0F ); + ModRM( 3, to, from ); +} + +/* psllq r64 to r64 */ +void PSLLQRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xF30F ); + ModRM( 3, to, from ); +} + +/* psllq m64 to r64 */ +void PSLLQMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xF3), true, to, from, 0); +} + +/* psllq imm8 to r64 */ +void PSLLQItoR( x86MMXRegType to, u8 from ) +{ + RexB(0, to); + write16( 0x730F ); + ModRM( 3, 6, to); + write8( from ); +} + +/* psrlq r64 to r64 */ +void PSRLQRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xD30F ); + ModRM( 3, to, from ); +} + +/* psrlq m64 to r64 */ +void PSRLQMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xD3), true, to, from, 0); +} + +/* psrlq imm8 to r64 */ +void PSRLQItoR( x86MMXRegType to, u8 from ) +{ + RexB(0, to); + write16( 0x730F ); + ModRM( 3, 2, to); + write8( from ); +} + +/* paddusb r64 to r64 */ +void PADDUSBRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xDC0F ); + ModRM( 3, to, from ); +} + +/* paddusb m64 to r64 */ +void PADDUSBMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xDC), true, to, from, 0); +} + +/* paddusw r64 to r64 */ +void PADDUSWRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xDD0F ); + ModRM( 3, to, from ); +} + +/* paddusw m64 to r64 */ +void PADDUSWMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xDD), true, to, from, 0); +} + +/* paddb r64 to r64 */ +void PADDBRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xFC0F ); + ModRM( 3, to, from ); +} + +/* paddb m64 to r64 */ +void PADDBMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xFC), true, to, from, 0); +} + +/* paddw r64 to r64 */ +void PADDWRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xFD0F ); + ModRM( 3, to, from ); +} + +/* paddw m64 to r64 */ +void PADDWMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xFD), true, to, from, 0); +} + +/* paddd r64 to r64 */ +void PADDDRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xFE0F ); + ModRM( 3, to, from ); +} + +/* paddd m64 to r64 */ +void PADDDMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xFE), true, to, from, 0); +} + +/* emms */ +void EMMS( void ) +{ + write16( 0x770F ); +} + +void PADDSBRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xEC0F ); + ModRM( 3, to, from ); +} + +void PADDSWRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xED0F ); + ModRM( 3, to, from ); +} + +// paddq m64 to r64 (sse2 only?) +void PADDQMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xD4), true, to, from, 0); +} + +// paddq r64 to r64 (sse2 only?) +void PADDQRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xD40F ); + ModRM( 3, to, from ); +} + +void PSUBSBRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xE80F ); + ModRM( 3, to, from ); +} + +void PSUBSWRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xE90F ); + ModRM( 3, to, from ); +} + + +void PSUBBRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xF80F ); + ModRM( 3, to, from ); +} + +void PSUBWRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xF90F ); + ModRM( 3, to, from ); +} + +void PSUBDRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xFA0F ); + ModRM( 3, to, from ); +} + +void PSUBDMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xFA), true, to, from, 0); +} + +void PSUBUSBRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xD80F ); + ModRM( 3, to, from ); +} + +void PSUBUSWRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xD90F ); + ModRM( 3, to, from ); +} + +// psubq m64 to r64 (sse2 only?) +void PSUBQMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xFB), true, to, from, 0); +} + +// psubq r64 to r64 (sse2 only?) +void PSUBQRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xFB0F ); + ModRM( 3, to, from ); +} + +// pmuludq m64 to r64 (sse2 only?) +void PMULUDQMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xF4), true, to, from, 0); +} + +// pmuludq r64 to r64 (sse2 only?) +void PMULUDQRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xF40F ); + ModRM( 3, to, from ); +} + +void PCMPEQBRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0x740F ); + ModRM( 3, to, from ); +} + +void PCMPEQWRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0x750F ); + ModRM( 3, to, from ); +} + +void PCMPEQDRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0x760F ); + ModRM( 3, to, from ); +} + +void PCMPEQDMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x76), true, to, from, 0); +} + +void PCMPGTBRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0x640F ); + ModRM( 3, to, from ); +} + +void PCMPGTWRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0x650F ); + ModRM( 3, to, from ); +} + +void PCMPGTDRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0x660F ); + ModRM( 3, to, from ); +} + +void PCMPGTDMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x66), true, to, from, 0); +} + +void PSRLWItoR( x86MMXRegType to, u8 from ) +{ + RexB(0, to); + write16( 0x710F ); + ModRM( 3, 2 , to ); + write8( from ); +} + +void PSRLDItoR( x86MMXRegType to, u8 from ) +{ + RexB(0, to); + write16( 0x720F ); + ModRM( 3, 2 , to ); + write8( from ); +} + +void PSRLDRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xD20F ); + ModRM( 3, to, from ); +} + +void PSLLWItoR( x86MMXRegType to, u8 from ) +{ + RexB(0, to); + write16( 0x710F ); + ModRM( 3, 6 , to ); + write8( from ); +} + +void PSLLDItoR( x86MMXRegType to, u8 from ) +{ + RexB(0, to); + write16( 0x720F ); + ModRM( 3, 6 , to ); + write8( from ); +} + +void PSLLDRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xF20F ); + ModRM( 3, to, from ); +} + +void PSRAWItoR( x86MMXRegType to, u8 from ) +{ + RexB(0, to); + write16( 0x710F ); + ModRM( 3, 4 , to ); + write8( from ); +} + +void PSRADItoR( x86MMXRegType to, u8 from ) +{ + RexB(0, to); + write16( 0x720F ); + ModRM( 3, 4 , to ); + write8( from ); +} + +void PSRADRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0xE20F ); + ModRM( 3, to, from ); +} + +/* por m64 to r64 */ +void PORMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xEB), true, to, from, 0); +} + +/* pxor m64 to r64 */ +void PXORMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xEF), true, to, from, 0); +} + +/* pand m64 to r64 */ +void PANDMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xDB), true, to, from, 0); +} + +void PANDNMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0xDF), true, to, from, 0); +} + +void PUNPCKHDQRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0x6A0F ); + ModRM( 3, to, from ); +} + +void PUNPCKHDQMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x6A), true, to, from, 0); +} + +void PUNPCKLDQRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0x620F ); + ModRM( 3, to, from ); +} + +void PUNPCKLDQMtoR( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x62), true, to, from, 0); +} + +void MOVQ64ItoR( x86MMXRegType reg, u64 i ) +{ + RexR(0, reg); + write16(0x6F0F); + ModRM(0, reg, DISP32); + write32(2); + JMP8( 8 ); + write64( i ); +} + +void MOVQRtoR( x86MMXRegType to, x86MMXRegType from ) +{ + RexRB(0, to, from); + write16( 0x6F0F ); + ModRM( 3, to, from ); +} + +void MOVQRmtoROffset( x86MMXRegType to, x86IntRegType from, u32 offset ) +{ + RexRB(0, to, from); + write16( 0x6F0F ); + + if( offset < 128 ) { + ModRM( 1, to, from ); + write8(offset); + } + else { + ModRM( 2, to, from ); + write32(offset); + } +} + +void MOVQRtoRmOffset( x86IntRegType to, x86MMXRegType from, u32 offset ) +{ + RexRB(0, from, to); + write16( 0x7F0F ); + + if( offset < 128 ) { + ModRM( 1, from , to ); + write8(offset); + } + else { + ModRM( 2, from, to ); + write32(offset); + } +} + +/* movd m32 to r64 */ +void MOVDMtoMMX( x86MMXRegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x6E), true, to, from, 0); +} + +/* movd r64 to m32 */ +void MOVDMMXtoM( uptr to, x86MMXRegType from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x7E), true, from, to, 0); +} + +void MOVD32RtoMMX( x86MMXRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x6E0F ); + ModRM( 3, to, from ); +} + +void MOVD32RmtoMMX( x86MMXRegType to, x86IntRegType from ) +{ + RexRB(0, to, from); + write16( 0x6E0F ); + ModRM( 0, to, from ); +} + +void MOVD32RmOffsettoMMX( x86MMXRegType to, x86IntRegType from, u32 offset ) +{ + RexRB(0, to, from); + write16( 0x6E0F ); + + if( offset < 128 ) { + ModRM( 1, to, from ); + write8(offset); + } + else { + ModRM( 2, to, from ); + write32(offset); + } +} + +void MOVD32MMXtoR( x86IntRegType to, x86MMXRegType from ) +{ + RexRB(0, from, to); + write16( 0x7E0F ); + ModRM( 3, from, to ); +} + +void MOVD32MMXtoRm( x86IntRegType to, x86MMXRegType from ) +{ + RexRB(0, from, to); + write16( 0x7E0F ); + ModRM( 0, from, to ); + if( to >= 4 ) { + // no idea why + assert( to == ESP ); + write8(0x24); + } + +} + +void MOVD32MMXtoRmOffset( x86IntRegType to, x86MMXRegType from, u32 offset ) +{ + RexRB(0, from, to); + write16( 0x7E0F ); + + if( offset < 128 ) { + ModRM( 1, from, to ); + write8(offset); + } + else { + ModRM( 2, from, to ); + write32(offset); + } +} + +///* movd r32 to r64 */ +//void MOVD32MMXtoMMX( x86MMXRegType to, x86MMXRegType from ) +//{ +// write16( 0x6E0F ); +// ModRM( 3, to, from ); +//} +// +///* movq r64 to r32 */ +//void MOVD64MMXtoMMX( x86MMXRegType to, x86MMXRegType from ) +//{ +// write16( 0x7E0F ); +// ModRM( 3, from, to ); +//} + +// untested +void PACKSSWBMMXtoMMX(x86MMXRegType to, x86MMXRegType from) +{ + RexRB(0, to, from); + write16( 0x630F ); + ModRM( 3, to, from ); +} + +void PACKSSDWMMXtoMMX(x86MMXRegType to, x86MMXRegType from) +{ + RexRB(0, to, from); + write16( 0x6B0F ); + ModRM( 3, to, from ); +} + +void PMOVMSKBMMXtoR(x86IntRegType to, x86MMXRegType from) +{ + RexRB(0, to, from); + write16( 0xD70F ); + ModRM( 3, to, from ); +} + +void PINSRWRtoMMX( x86MMXRegType to, x86SSERegType from, u8 imm8 ) +{ + RexRB(0, to, from); + write16( 0xc40f ); + ModRM( 3, to, from ); + write8( imm8 ); +} + +void PSHUFWRtoR(x86MMXRegType to, x86MMXRegType from, u8 imm8) +{ + RexRB(0, to, from); + write16(0x700f); + ModRM( 3, to, from ); + write8(imm8); +} + +void PSHUFWMtoR(x86MMXRegType to, uptr from, u8 imm8) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x70), true, to, from, 1 /* XXX was 0? */); + write8(imm8); +} + +void MASKMOVQRtoR(x86MMXRegType to, x86MMXRegType from) +{ + RexRB(0, to, from); + write16(0xf70f); + ModRM( 3, to, from ); +} + +#endif diff --git a/libpcsxcore/ix86_64/ix86_sse.c b/libpcsxcore/ix86_64/ix86_sse.c new file mode 100644 index 00000000..cb391dca --- /dev/null +++ b/libpcsxcore/ix86_64/ix86_sse.c @@ -0,0 +1,1455 @@ +// stop compiling if NORECBUILD build (only for Visual Studio) +#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD)) + +#include +#include "ix86-64.h" + +PCSX2_ALIGNED16(static unsigned int p[4]); +PCSX2_ALIGNED16(static unsigned int p2[4]); +PCSX2_ALIGNED16(static float f[4]); + + +XMMSSEType g_xmmtypes[XMMREGS] = {0}; + +/********************/ +/* SSE instructions */ +/********************/ + +#define SSEMtoRv( nc, code, overb ) \ + assert( cpucaps.hasStreamingSIMDExtensions ); \ + assert( to < XMMREGS ) ; \ + MEMADDR_OP(0, nc, code, true, to, from, overb) + +#define SSEMtoR( code, overb ) SSEMtoRv(2, code, overb) + +#define SSERtoMv( nc, code, overb ) \ + assert( cpucaps.hasStreamingSIMDExtensions ); \ + assert( from < XMMREGS) ; \ + MEMADDR_OP(0, nc, code, true, from, to, overb) + +#define SSERtoM( code, overb ) SSERtoMv( 2, code, overb ) \ + +#define SSE_SS_MtoR( code, overb ) \ + SSEMtoRv(3, (code << 8) | 0xF3, overb) + +#define SSE_SS_RtoM( code, overb ) \ + SSERtoMv(3, (code << 8) | 0xF3, overb) + +#define SSERtoR( code ) \ + assert( cpucaps.hasStreamingSIMDExtensions ); \ + assert( to < XMMREGS && from < XMMREGS) ; \ + RexRB(0, to, from); \ + write16( code ); \ + ModRM( 3, to, from ); + +#define SSEMtoR66( code ) \ + SSEMtoRv( 3, (code << 8) | 0x66, 0 ) + +#define SSERtoM66( code ) \ + SSERtoMv( 3, (code << 8) | 0x66, 0 ) + +#define SSERtoR66( code ) \ + write8( 0x66 ); \ + SSERtoR( code ); + +#define _SSERtoR66( code ) \ + assert( cpucaps.hasStreamingSIMDExtensions ); \ + assert( to < XMMREGS && from < XMMREGS) ; \ + write8( 0x66 ); \ + RexRB(0, from, to); \ + write16( code ); \ + ModRM( 3, from, to ); + +#define SSE_SS_RtoR( code ) \ + assert( cpucaps.hasStreamingSIMDExtensions ); \ + assert( to < XMMREGS && from < XMMREGS) ; \ + write8( 0xf3 ); \ + RexRB(0, to, from); \ + write16( code ); \ + ModRM( 3, to, from ); + +#define CMPPSMtoR( op ) \ + SSEMtoR( 0xc20f, 1 ); \ + write8( op ); + +#define CMPPSRtoR( op ) \ + SSERtoR( 0xc20f ); \ + write8( op ); + +#define CMPSSMtoR( op ) \ + SSE_SS_MtoR( 0xc20f, 1 ); \ + write8( op ); + +#define CMPSSRtoR( op ) \ + SSE_SS_RtoR( 0xc20f ); \ + write8( op ); + + + +void WriteRmOffset(x86IntRegType to, int offset); +void WriteRmOffsetFrom(x86IntRegType to, x86IntRegType from, int offset); + +/* movups [r32][r32*scale] to xmm1 */ +void SSE_MOVUPSRmStoR( x86SSERegType to, x86IntRegType from, x86IntRegType from2, int scale ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRXB(0, to, from2, from); + write16( 0x100f ); + ModRM( 0, to, 0x4 ); + SibSB( scale, from2, from ); +} + +/* movups xmm1 to [r32][r32*scale] */ +void SSE_MOVUPSRtoRmS( x86SSERegType to, x86IntRegType from, x86IntRegType from2, int scale ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRXB(1, to, from2, from); + write16( 0x110f ); + ModRM( 0, to, 0x4 ); + SibSB( scale, from2, from ); +} + +/* movups [r32] to r32 */ +void SSE_MOVUPSRmtoR( x86IntRegType to, x86IntRegType from ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(0, to, from); + write16( 0x100f ); + ModRM( 0, to, from ); +} + +/* movups r32 to [r32] */ +void SSE_MOVUPSRtoRm( x86IntRegType to, x86IntRegType from ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(0, from, to); + write16( 0x110f ); + ModRM( 0, from, to ); +} + +/* movlps [r32] to r32 */ +void SSE_MOVLPSRmtoR( x86SSERegType to, x86IntRegType from ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(1, to, from); + write16( 0x120f ); + ModRM( 0, to, from ); +} + +void SSE_MOVLPSRmtoROffset( x86SSERegType to, x86IntRegType from, int offset ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(0, to, from); + write16( 0x120f ); + WriteRmOffsetFrom(to, from, offset); +} + +/* movaps r32 to [r32] */ +void SSE_MOVLPSRtoRm( x86IntRegType to, x86IntRegType from ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(0, from, to); + write16( 0x130f ); + ModRM( 0, from, to ); +} + +void SSE_MOVLPSRtoRmOffset( x86SSERegType to, x86IntRegType from, int offset ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(0, from, to); + write16( 0x130f ); + WriteRmOffsetFrom(from, to, offset); +} + +/* movaps [r32][r32*scale] to xmm1 */ +void SSE_MOVAPSRmStoR( x86SSERegType to, x86IntRegType from, x86IntRegType from2, int scale ) +{ + assert( cpucaps.hasStreamingSIMDExtensions && from != EBP ); + RexRXB(0, to, from2, from); + write16( 0x280f ); + ModRM( 0, to, 0x4 ); + SibSB( scale, from2, from ); +} + +/* movaps xmm1 to [r32][r32*scale] */ +void SSE_MOVAPSRtoRmS( x86SSERegType to, x86IntRegType from, x86IntRegType from2, int scale ) +{ + assert( cpucaps.hasStreamingSIMDExtensions && from != EBP ); + RexRXB(0, to, from2, from); + write16( 0x290f ); + ModRM( 0, to, 0x4 ); + SibSB( scale, from2, from ); +} + +// movaps [r32+offset] to r32 +void SSE_MOVAPSRmtoROffset( x86SSERegType to, x86IntRegType from, int offset ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(0, to, from); + write16( 0x280f ); + WriteRmOffsetFrom(to, from, offset); +} + +// movaps r32 to [r32+offset] +void SSE_MOVAPSRtoRmOffset( x86IntRegType to, x86SSERegType from, int offset ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(0, from, to); + write16( 0x290f ); + WriteRmOffsetFrom(from, to, offset); +} + +// movdqa [r32+offset] to r32 +void SSE2_MOVDQARmtoROffset( x86SSERegType to, x86IntRegType from, int offset ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + write8(0x66); + RexRB(0, to, from); + write16( 0x6f0f ); + WriteRmOffsetFrom(to, from, offset); +} + +// movdqa r32 to [r32+offset] +void SSE2_MOVDQARtoRmOffset( x86IntRegType to, x86SSERegType from, int offset ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + write8(0x66); + RexRB(0, from, to); + write16( 0x7f0f ); + WriteRmOffsetFrom(from, to, offset); +} + +// movups [r32+offset] to r32 +void SSE_MOVUPSRmtoROffset( x86SSERegType to, x86IntRegType from, int offset ) +{ + RexRB(0, to, from); + write16( 0x100f ); + WriteRmOffsetFrom(to, from, offset); +} + +// movups r32 to [r32+offset] +void SSE_MOVUPSRtoRmOffset( x86SSERegType to, x86IntRegType from, int offset ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(0, from, to); + write16( 0x110f ); + WriteRmOffsetFrom(from, to, offset); +} + +//**********************************************************************************/ +//MOVAPS: Move aligned Packed Single Precision FP values * +//********************************************************************************** +void SSE_MOVAPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x280f, 0 ); } +void SSE_MOVAPS_XMM_to_M128( uptr to, x86SSERegType from ) { SSERtoM( 0x290f, 0 ); } +void SSE_MOVAPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x280f ); } + +void SSE_MOVUPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x100f, 0 ); } +void SSE_MOVUPS_XMM_to_M128( uptr to, x86SSERegType from ) { SSERtoM( 0x110f, 0 ); } + +void SSE2_MOVSD_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) +{ + if( !cpucaps.hasStreamingSIMD2Extensions ) SSE2EMU_MOVSD_XMM_to_XMM(to, from); + else { + write8(0xf2); + SSERtoR( 0x100f); + } +} + +void SSE2_MOVQ_M64_to_XMM( x86SSERegType to, uptr from ) +{ + if( !cpucaps.hasStreamingSIMD2Extensions ) SSE2EMU_MOVQ_M64_to_XMM(to, from); + else { + SSE_SS_MtoR( 0x7e0f, 0); + } +} + +void SSE2_MOVQ_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) +{ + if( !cpucaps.hasStreamingSIMD2Extensions ) SSE2EMU_MOVQ_XMM_to_XMM(to, from); + else { + SSE_SS_RtoR( 0x7e0f); + } +} + +void SSE2_MOVQ_XMM_to_M64( u32 to, x86SSERegType from ) +{ + if( !cpucaps.hasStreamingSIMD2Extensions ) SSE_MOVLPS_XMM_to_M64(to, from); + else { + SSERtoM66(0xd60f); + } +} + +#ifndef __x86_64__ +void SSE2_MOVDQ2Q_XMM_to_MM( x86MMXRegType to, x86SSERegType from) +{ + if( !cpucaps.hasStreamingSIMD2Extensions ) SSE2EMU_MOVDQ2Q_XMM_to_MM(to, from); + else { + write8(0xf2); + SSERtoR( 0xd60f); + } +} +void SSE2_MOVQ2DQ_MM_to_XMM( x86SSERegType to, x86MMXRegType from) +{ + if( !cpucaps.hasStreamingSIMD2Extensions ) SSE2EMU_MOVQ2DQ_MM_to_XMM(to, from); + else { + SSE_SS_RtoR( 0xd60f); + } +} +#endif + +//**********************************************************************************/ +//MOVSS: Move Scalar Single-Precision FP value * +//********************************************************************************** +void SSE_MOVSS_M32_to_XMM( x86SSERegType to, uptr from ) { SSE_SS_MtoR( 0x100f, 0 ); } +void SSE_MOVSS_XMM_to_M32( u32 to, x86SSERegType from ) { SSE_SS_RtoM( 0x110f, 0 ); } +void SSE_MOVSS_XMM_to_Rm( x86IntRegType to, x86SSERegType from ) +{ + write8(0xf3); + RexRB(0, from, to); + write16(0x110f); + ModRM(0, from, to); +} + +void SSE_MOVSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSE_SS_RtoR( 0x100f ); } + +void SSE_MOVSS_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ) +{ + write8(0xf3); + RexRB(0, to, from); + write16( 0x100f ); + WriteRmOffsetFrom(to, from, offset); +} + +void SSE_MOVSS_XMM_to_RmOffset( x86IntRegType to, x86SSERegType from, int offset ) +{ + write8(0xf3); + RexRB(0, from, to); + write16(0x110f); + WriteRmOffsetFrom(from, to, offset); +} + +void SSE_MASKMOVDQU_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR66( 0xf70f ); } +//**********************************************************************************/ +//MOVLPS: Move low Packed Single-Precision FP * +//********************************************************************************** +void SSE_MOVLPS_M64_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x120f, 0 ); } +void SSE_MOVLPS_XMM_to_M64( u32 to, x86SSERegType from ) { SSERtoM( 0x130f, 0 ); } + +void SSE_MOVLPS_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(0, to, from); + write16( 0x120f ); + WriteRmOffsetFrom(to, from, offset); +} + +void SSE_MOVLPS_XMM_to_RmOffset( x86IntRegType to, x86SSERegType from, int offset ) +{ + RexRB(0, from, to); + write16(0x130f); + WriteRmOffsetFrom(from, to, offset); +} + +///////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//MOVHPS: Move High Packed Single-Precision FP * +//********************************************************************************** +void SSE_MOVHPS_M64_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x160f, 0 ); } +void SSE_MOVHPS_XMM_to_M64( u32 to, x86SSERegType from ) { SSERtoM( 0x170f, 0 ); } + +void SSE_MOVHPS_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(0, to, from); + write16( 0x160f ); + WriteRmOffsetFrom(to, from, offset); +} + +void SSE_MOVHPS_XMM_to_RmOffset( x86IntRegType to, x86SSERegType from, int offset ) +{ + assert( cpucaps.hasStreamingSIMDExtensions ); + RexRB(0, from, to); + write16(0x170f); + WriteRmOffsetFrom(from, to, offset); +} + +///////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//MOVLHPS: Moved packed Single-Precision FP low to high * +//********************************************************************************** +void SSE_MOVLHPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x160f ); } + +////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//MOVHLPS: Moved packed Single-Precision FP High to Low * +//********************************************************************************** +void SSE_MOVHLPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x120f ); } + +/////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//ANDPS: Logical Bit-wise AND for Single FP * +//********************************************************************************** +void SSE_ANDPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x540f, 0 ); } +void SSE_ANDPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x540f ); } + +/////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//ANDNPS : Logical Bit-wise AND NOT of Single-precision FP values * +//********************************************************************************** +void SSE_ANDNPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x550f, 0 ); } +void SSE_ANDNPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR( 0x550f ); } + +///////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//RCPPS : Packed Single-Precision FP Reciprocal * +//********************************************************************************** +void SSE_RCPPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x530f ); } +void SSE_RCPPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x530f, 0 ); } + +void SSE_RCPSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSE_SS_RtoR(0x530f); } +void SSE_RCPSS_M32_to_XMM( x86SSERegType to, uptr from ) { SSE_SS_MtoR(0x530f, 0); } + +////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//ORPS : Bit-wise Logical OR of Single-Precision FP Data * +//********************************************************************************** +void SSE_ORPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x560f, 0 ); } +void SSE_ORPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x560f ); } + +///////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//XORPS : Bitwise Logical XOR of Single-Precision FP Values * +//********************************************************************************** +void SSE_XORPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x570f, 0 ); } +void SSE_XORPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x570f ); } + +/////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//ADDPS : ADD Packed Single-Precision FP Values * +//********************************************************************************** +void SSE_ADDPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x580f, 0 ); } +void SSE_ADDPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x580f ); } + +//////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//ADDSS : ADD Scalar Single-Precision FP Values * +//********************************************************************************** +void SSE_ADDSS_M32_to_XMM( x86SSERegType to, uptr from ) { SSE_SS_MtoR( 0x580f, 0 ); } +void SSE_ADDSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSE_SS_RtoR( 0x580f ); } + +///////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//SUBPS: Packed Single-Precision FP Subtract * +//********************************************************************************** +void SSE_SUBPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x5c0f, 0 ); } +void SSE_SUBPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x5c0f ); } + +/////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//SUBSS : Scalar Single-Precision FP Subtract * +//********************************************************************************** +void SSE_SUBSS_M32_to_XMM( x86SSERegType to, uptr from ) { SSE_SS_MtoR( 0x5c0f, 0 ); } +void SSE_SUBSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSE_SS_RtoR( 0x5c0f ); } + +///////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//MULPS : Packed Single-Precision FP Multiply * +//********************************************************************************** +void SSE_MULPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x590f, 0 ); } +void SSE_MULPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x590f ); } + +//////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//MULSS : Scalar Single-Precision FP Multiply * +//********************************************************************************** +void SSE_MULSS_M32_to_XMM( x86SSERegType to, uptr from ) { SSE_SS_MtoR( 0x590f, 0 ); } +void SSE_MULSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSE_SS_RtoR( 0x590f ); } + +//////////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//Packed Single-Precission FP compare (CMPccPS) * +//********************************************************************************** +//missing SSE_CMPPS_I8_to_XMM +// SSE_CMPPS_M32_to_XMM +// SSE_CMPPS_XMM_to_XMM +void SSE_CMPEQPS_M128_to_XMM( x86SSERegType to, uptr from ) { CMPPSMtoR( 0 ); } +void SSE_CMPEQPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPPSRtoR( 0 ); } +void SSE_CMPLTPS_M128_to_XMM( x86SSERegType to, uptr from ) { CMPPSMtoR( 1 ); } +void SSE_CMPLTPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPPSRtoR( 1 ); } +void SSE_CMPLEPS_M128_to_XMM( x86SSERegType to, uptr from ) { CMPPSMtoR( 2 ); } +void SSE_CMPLEPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPPSRtoR( 2 ); } +void SSE_CMPUNORDPS_M128_to_XMM( x86SSERegType to, uptr from ) { CMPPSMtoR( 3 ); } +void SSE_CMPUNORDPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPPSRtoR( 3 ); } +void SSE_CMPNEPS_M128_to_XMM( x86SSERegType to, uptr from ) { CMPPSMtoR( 4 ); } +void SSE_CMPNEPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPPSRtoR( 4 ); } +void SSE_CMPNLTPS_M128_to_XMM( x86SSERegType to, uptr from ) { CMPPSMtoR( 5 ); } +void SSE_CMPNLTPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPPSRtoR( 5 ); } +void SSE_CMPNLEPS_M128_to_XMM( x86SSERegType to, uptr from ) { CMPPSMtoR( 6 ); } +void SSE_CMPNLEPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPPSRtoR( 6 ); } +void SSE_CMPORDPS_M128_to_XMM( x86SSERegType to, uptr from ) { CMPPSMtoR( 7 ); } +void SSE_CMPORDPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPPSRtoR( 7 ); } + +/////////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//Scalar Single-Precission FP compare (CMPccSS) * +//********************************************************************************** +//missing SSE_CMPSS_I8_to_XMM +// SSE_CMPSS_M32_to_XMM +// SSE_CMPSS_XMM_to_XMM +void SSE_CMPEQSS_M32_to_XMM( x86SSERegType to, uptr from ) { CMPSSMtoR( 0 ); } +void SSE_CMPEQSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPSSRtoR( 0 ); } +void SSE_CMPLTSS_M32_to_XMM( x86SSERegType to, uptr from ) { CMPSSMtoR( 1 ); } +void SSE_CMPLTSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPSSRtoR( 1 ); } +void SSE_CMPLESS_M32_to_XMM( x86SSERegType to, uptr from ) { CMPSSMtoR( 2 ); } +void SSE_CMPLESS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPSSRtoR( 2 ); } +void SSE_CMPUNORDSS_M32_to_XMM( x86SSERegType to, uptr from ) { CMPSSMtoR( 3 ); } +void SSE_CMPUNORDSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPSSRtoR( 3 ); } +void SSE_CMPNESS_M32_to_XMM( x86SSERegType to, uptr from ) { CMPSSMtoR( 4 ); } +void SSE_CMPNESS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPSSRtoR( 4 ); } +void SSE_CMPNLTSS_M32_to_XMM( x86SSERegType to, uptr from ) { CMPSSMtoR( 5 ); } +void SSE_CMPNLTSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPSSRtoR( 5 ); } +void SSE_CMPNLESS_M32_to_XMM( x86SSERegType to, uptr from ) { CMPSSMtoR( 6 ); } +void SSE_CMPNLESS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPSSRtoR( 6 ); } +void SSE_CMPORDSS_M32_to_XMM( x86SSERegType to, uptr from ) { CMPSSMtoR( 7 ); } +void SSE_CMPORDSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { CMPSSRtoR( 7 ); } + +void SSE_UCOMISS_M32_to_XMM( x86SSERegType to, uptr from ) +{ + MEMADDR_OP(0, VAROP2(0x0F, 0x2E), true, to, from, 0); +} + +void SSE_UCOMISS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) +{ + RexRB(0, to, from); + write16( 0x2e0f ); + ModRM( 3, to, from ); +} + +////////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//RSQRTPS : Packed Single-Precision FP Square Root Reciprocal * +//********************************************************************************** +void SSE_RSQRTPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x520f, 0 ); } +void SSE_RSQRTPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR( 0x520f ); } + +///////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//RSQRTSS : Scalar Single-Precision FP Square Root Reciprocal * +//********************************************************************************** +void SSE_RSQRTSS_M32_to_XMM( x86SSERegType to, uptr from ) { SSE_SS_MtoR( 0x520f, 0 ); } +void SSE_RSQRTSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSE_SS_RtoR( 0x520f ); } + +//////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//SQRTPS : Packed Single-Precision FP Square Root * +//********************************************************************************** +void SSE_SQRTPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x510f, 0 ); } +void SSE_SQRTPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR( 0x510f ); } + +////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//SQRTSS : Scalar Single-Precision FP Square Root * +//********************************************************************************** +void SSE_SQRTSS_M32_to_XMM( x86SSERegType to, uptr from ) { SSE_SS_MtoR( 0x510f, 0 ); } +void SSE_SQRTSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSE_SS_RtoR( 0x510f ); } + +//////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//MAXPS: Return Packed Single-Precision FP Maximum * +//********************************************************************************** +void SSE_MAXPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x5f0f, 0 ); } +void SSE_MAXPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x5f0f ); } + +///////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//MAXSS: Return Scalar Single-Precision FP Maximum * +//********************************************************************************** +void SSE_MAXSS_M32_to_XMM( x86SSERegType to, uptr from ) { SSE_SS_MtoR( 0x5f0f, 0 ); } +void SSE_MAXSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSE_SS_RtoR( 0x5f0f ); } + +#ifndef __x86_64__ +///////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//CVTPI2PS: Packed Signed INT32 to Packed Single FP Conversion * +//********************************************************************************** +void SSE_CVTPI2PS_M64_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x2a0f, 0 ); } +void SSE_CVTPI2PS_MM_to_XMM( x86SSERegType to, x86MMXRegType from ) { SSERtoR( 0x2a0f ); } + +/////////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//CVTPS2PI: Packed Single FP to Packed Signed INT32 Conversion * +//********************************************************************************** +void SSE_CVTPS2PI_M64_to_MM( x86MMXRegType to, uptr from ) { SSEMtoR( 0x2d0f, 0 ); } +void SSE_CVTPS2PI_XMM_to_MM( x86MMXRegType to, x86SSERegType from ) { SSERtoR( 0x2d0f ); } +#endif + +void SSE_CVTTSS2SI_M32_to_R32(x86IntRegType to, uptr from) { SSE_SS_MtoR(0x2c0f, 0); } +void SSE_CVTTSS2SI_XMM_to_R32(x86IntRegType to, x86SSERegType from) +{ + write8(0xf3); + RexRB(0, to, from); + write16(0x2c0f); + ModRM(3, to, from); +} + +void SSE_CVTSI2SS_M32_to_XMM(x86SSERegType to, uptr from) { SSE_SS_MtoR(0x2a0f, 0); } +void SSE_CVTSI2SS_R_to_XMM(x86SSERegType to, x86IntRegType from) +{ + write8(0xf3); + RexRB(0, to, from); + write16(0x2a0f); + ModRM(3, to, from); +} + +/////////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//CVTDQ2PS: Packed Signed INT32 to Packed Single Precision FP Conversion * +//********************************************************************************** +void SSE2_CVTDQ2PS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x5b0f, 0 ); } +void SSE2_CVTDQ2PS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x5b0f ); } + +//**********************************************************************************/ +//CVTPS2DQ: Packed Single Precision FP to Packed Signed INT32 Conversion * +//********************************************************************************** +void SSE2_CVTPS2DQ_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR66( 0x5b0f ); } +void SSE2_CVTPS2DQ_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR66( 0x5b0f ); } + +void SSE2_CVTTPS2DQ_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSE_SS_RtoR(0x5b0f); } +///////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//MINPS: Return Packed Single-Precision FP Minimum * +//********************************************************************************** +void SSE_MINPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x5d0f, 0 ); } +void SSE_MINPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x5d0f ); } + +////////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//MINSS: Return Scalar Single-Precision FP Minimum * +//********************************************************************************** +void SSE_MINSS_M32_to_XMM( x86SSERegType to, uptr from ) { SSE_SS_MtoR( 0x5d0f, 0 ); } +void SSE_MINSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSE_SS_RtoR( 0x5d0f ); } + +#ifndef __x86_64__ +/////////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//PMAXSW: Packed Signed Integer Word Maximum * +//********************************************************************************** +//missing + // SSE_PMAXSW_M64_to_MM +// SSE2_PMAXSW_M128_to_XMM +// SSE2_PMAXSW_XMM_to_XMM +void SSE_PMAXSW_MM_to_MM( x86MMXRegType to, x86MMXRegType from ){ SSERtoR( 0xEE0F ); } + +/////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//PMINSW: Packed Signed Integer Word Minimum * +//********************************************************************************** +//missing + // SSE_PMINSW_M64_to_MM +// SSE2_PMINSW_M128_to_XMM +// SSE2_PMINSW_XMM_to_XMM +void SSE_PMINSW_MM_to_MM( x86MMXRegType to, x86MMXRegType from ){ SSERtoR( 0xEA0F ); } +#endif + +////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//SHUFPS: Shuffle Packed Single-Precision FP Values * +//********************************************************************************** +void SSE_SHUFPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from, u8 imm8 ) { SSERtoR( 0xC60F ); write8( imm8 ); } +void SSE_SHUFPS_M128_to_XMM( x86SSERegType to, uptr from, u8 imm8 ) { SSEMtoR( 0xC60F, 1 ); write8( imm8 ); } + +void SSE_SHUFPS_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset, u8 imm8 ) +{ + RexRB(0, to, from); + write16(0xc60f); + WriteRmOffsetFrom(to, from, offset); + write8(imm8); +} + +//////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//PSHUFD: Shuffle Packed DoubleWords * +//********************************************************************************** +void SSE2_PSHUFD_XMM_to_XMM( x86SSERegType to, x86SSERegType from, u8 imm8 ) +{ + if( !cpucaps.hasStreamingSIMD2Extensions ) { + SSE2EMU_PSHUFD_XMM_to_XMM(to, from, imm8); + } + else { + SSERtoR66( 0x700F ); + write8( imm8 ); + } +} +void SSE2_PSHUFD_M128_to_XMM( x86SSERegType to, uptr from, u8 imm8 ) { SSEMtoRv( 3, 0x700F66, 1 ); write8( imm8 ); } + +void SSE2_PSHUFLW_XMM_to_XMM( x86SSERegType to, x86SSERegType from, u8 imm8 ) { write8(0xF2); SSERtoR(0x700F); write8(imm8); } +void SSE2_PSHUFLW_M128_to_XMM( x86SSERegType to, uptr from, u8 imm8 ) { SSEMtoRv(3, 0x700FF2, 1); write8(imm8); } +void SSE2_PSHUFHW_XMM_to_XMM( x86SSERegType to, x86SSERegType from, u8 imm8 ) { SSE_SS_RtoR(0x700F); write8(imm8); } +void SSE2_PSHUFHW_M128_to_XMM( x86SSERegType to, uptr from, u8 imm8 ) { SSE_SS_MtoR(0x700F, 1); write8(imm8); } + +/////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//UNPCKLPS: Unpack and Interleave low Packed Single-Precision FP Data * +//********************************************************************************** +void SSE_UNPCKLPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR(0x140f, 0); } +void SSE_UNPCKLPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x140F ); } + +//////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//UNPCKHPS: Unpack and Interleave High Packed Single-Precision FP Data * +//********************************************************************************** +void SSE_UNPCKHPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR(0x150f, 0); } +void SSE_UNPCKHPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x150F ); } + +//////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//DIVPS : Packed Single-Precision FP Divide * +//********************************************************************************** +void SSE_DIVPS_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR( 0x5e0F, 0 ); } +void SSE_DIVPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR( 0x5e0F ); } + +////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//DIVSS : Scalar Single-Precision FP Divide * +//********************************************************************************** +void SSE_DIVSS_M32_to_XMM( x86SSERegType to, uptr from ) { SSE_SS_MtoR( 0x5e0F, 0 ); } +void SSE_DIVSS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSE_SS_RtoR( 0x5e0F ); } + +///////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//STMXCSR : Store Streaming SIMD Extension Control/Status * +//********************************************************************************** +void SSE_STMXCSR( uptr from ) { + MEMADDR_OP(0, VAROP2(0x0F, 0xAE), false, 3, from, 0); +} + +///////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//LDMXCSR : Load Streaming SIMD Extension Control/Status * +//********************************************************************************** +void SSE_LDMXCSR( uptr from ) { + MEMADDR_OP(0, VAROP2(0x0F, 0xAE), false, 2, from, 0); +} + +///////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//PADDB,PADDW,PADDD : Add Packed Integers * +//********************************************************************************** +void SSE2_PADDB_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xFC0F ); } +void SSE2_PADDB_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0xFC0F ); } +void SSE2_PADDW_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xFD0F ); } +void SSE2_PADDW_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0xFD0F ); } +void SSE2_PADDD_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xFE0F ); } +void SSE2_PADDD_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0xFE0F ); } + +void SSE2_PADDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from ) { SSERtoR66( 0xD40F ); } +void SSE2_PADDQ_M128_to_XMM(x86SSERegType to, uptr from ) { SSEMtoR66( 0xD40F ); } + +/////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//PCMPxx: Compare Packed Integers * +//********************************************************************************** +void SSE2_PCMPGTB_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0x640F ); } +void SSE2_PCMPGTB_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0x640F ); } +void SSE2_PCMPGTW_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0x650F ); } +void SSE2_PCMPGTW_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0x650F ); } +void SSE2_PCMPGTD_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0x660F ); } +void SSE2_PCMPGTD_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0x660F ); } +void SSE2_PCMPEQB_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0x740F ); } +void SSE2_PCMPEQB_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0x740F ); } +void SSE2_PCMPEQW_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0x750F ); } +void SSE2_PCMPEQW_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0x750F ); } +void SSE2_PCMPEQD_XMM_to_XMM(x86SSERegType to, x86SSERegType from ) +{ + if( !cpucaps.hasStreamingSIMD2Extensions ) { + SSE_CMPEQPS_XMM_to_XMM(to, from); + } + else { + SSERtoR66( 0x760F ); + } +} + +void SSE2_PCMPEQD_M128_to_XMM(x86SSERegType to, uptr from ) +{ + if( !cpucaps.hasStreamingSIMD2Extensions ) { + SSE_CMPEQPS_M128_to_XMM(to, from); + } + else { + SSEMtoR66( 0x760F ); + } +} + +//////////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//PEXTRW,PINSRW: Packed Extract/Insert Word * +//********************************************************************************** +void SSE_PEXTRW_XMM_to_R32(x86IntRegType to, x86SSERegType from, u8 imm8 ){ SSERtoR66(0xC50F); write8( imm8 ); } +void SSE_PINSRW_R32_to_XMM(x86SSERegType to, x86IntRegType from, u8 imm8 ){ SSERtoR66(0xC40F); write8( imm8 ); } + +//////////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//PSUBx: Subtract Packed Integers * +//********************************************************************************** +void SSE2_PSUBB_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xF80F ); } +void SSE2_PSUBB_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0xF80F ); } +void SSE2_PSUBW_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xF90F ); } +void SSE2_PSUBW_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0xF90F ); } +void SSE2_PSUBD_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xFA0F ); } +void SSE2_PSUBD_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0xFA0F ); } +void SSE2_PSUBQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xFB0F ); } +void SSE2_PSUBQ_M128_to_XMM(x86SSERegType to, uptr from ){ SSEMtoR66( 0xFB0F ); } + +/////////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//MOVD: Move Dword(32bit) to /from XMM reg * +//********************************************************************************** +void SSE2_MOVD_M32_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR66(0x6E0F); } +void SSE2_MOVD_R_to_XMM( x86SSERegType to, x86IntRegType from ) +{ + if( !cpucaps.hasStreamingSIMD2Extensions ) { + SSE2EMU_MOVD_R_to_XMM(to, from); + } + else { + SSERtoR66(0x6E0F); + } +} + +void SSE2_MOVD_Rm_to_XMM( x86SSERegType to, x86IntRegType from ) +{ + write8(0x66); + RexRB(0, to, from); + write16( 0x6e0f ); + ModRM( 0, to, from); +} + +void SSE2_MOVD_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ) +{ + write8(0x66); + RexRB(0, to, from); + write16( 0x6e0f ); + WriteRmOffsetFrom(to, from, offset); +} + +void SSE2_MOVD_XMM_to_M32( u32 to, x86SSERegType from ) { SSERtoM66(0x7E0F); } +void SSE2_MOVD_XMM_to_R( x86IntRegType to, x86SSERegType from ) { + if( !cpucaps.hasStreamingSIMD2Extensions ) { + SSE2EMU_MOVD_XMM_to_R(to, from); + } + else { + _SSERtoR66(0x7E0F); + } +} + +void SSE2_MOVD_XMM_to_Rm( x86IntRegType to, x86SSERegType from ) +{ + write8(0x66); + RexRB(0, from, to); + write16( 0x7e0f ); + ModRM( 0, from, to ); +} + +void SSE2_MOVD_XMM_to_RmOffset( x86IntRegType to, x86SSERegType from, int offset ) +{ + if( !cpucaps.hasStreamingSIMD2Extensions ) { + SSE2EMU_MOVD_XMM_to_RmOffset(to, from, offset); + } + else { + write8(0x66); + RexRB(0, from, to); + write16( 0x7e0f ); + WriteRmOffsetFrom(from, to, offset); + } +} + +#ifdef __x86_64__ +void SSE2_MOVQ_XMM_to_R( x86IntRegType to, x86SSERegType from ) +{ + assert( from < XMMREGS); + write8( 0x66 ); + RexRB(1, from, to); + write16( 0x7e0f ); + ModRM( 3, from, to ); +} + +void SSE2_MOVQ_R_to_XMM( x86SSERegType to, x86IntRegType from ) +{ + assert( to < XMMREGS); + write8(0x66); + RexRB(1, to, from); + write16( 0x6e0f ); + ModRM( 3, to, from ); +} + +#endif + +//////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//POR : SSE Bitwise OR * +//********************************************************************************** +void SSE2_POR_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR66( 0xEB0F ); } +void SSE2_POR_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR66( 0xEB0F ); } + +// logical and to &= from +void SSE2_PAND_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR66( 0xDB0F ); } +void SSE2_PAND_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR66( 0xDB0F ); } + +// to = (~to) & from +void SSE2_PANDN_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR66( 0xDF0F ); } +void SSE2_PANDN_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR66( 0xDF0F ); } + +///////////////////////////////////////////////////////////////////////////////////// +//**********************************************************************************/ +//PXOR : SSE Bitwise XOR * +//********************************************************************************** +void SSE2_PXOR_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xEF0F ); } +void SSE2_PXOR_M128_to_XMM( x86SSERegType to, uptr from ){ SSEMtoR66( 0xEF0F ); } +/////////////////////////////////////////////////////////////////////////////////////// + +void SSE2_MOVDQA_M128_to_XMM(x86SSERegType to, uptr from) {SSEMtoR66(0x6F0F); } +void SSE2_MOVDQA_XMM_to_M128( uptr to, x86SSERegType from ){SSERtoM66(0x7F0F);} +void SSE2_MOVDQA_XMM_to_XMM( x86SSERegType to, x86SSERegType from) { SSERtoR66(0x6F0F); } + +void SSE2_MOVDQU_M128_to_XMM(x86SSERegType to, uptr from) { SSE_SS_MtoR(0x6F0F, 0); } +void SSE2_MOVDQU_XMM_to_M128( uptr to, x86SSERegType from) { SSE_SS_RtoM(0x7F0F, 0); } +void SSE2_MOVDQU_XMM_to_XMM( x86SSERegType to, x86SSERegType from) { SSE_SS_RtoR(0x6F0F); } + +// shift right logical + +void SSE2_PSRLW_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66(0xD10F); } +void SSE2_PSRLW_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66(0xD10F); } +void SSE2_PSRLW_I8_to_XMM(x86SSERegType to, u8 imm8) +{ + write8( 0x66 ); + RexB(0, to); + write16( 0x710F ); + ModRM( 3, 2 , to ); + write8( imm8 ); +} + +void SSE2_PSRLD_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66(0xD20F); } +void SSE2_PSRLD_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66(0xD20F); } +void SSE2_PSRLD_I8_to_XMM(x86SSERegType to, u8 imm8) +{ + write8( 0x66 ); + RexB(0, to); + write16( 0x720F ); + ModRM( 3, 2 , to ); + write8( imm8 ); +} + +void SSE2_PSRLQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66(0xD30F); } +void SSE2_PSRLQ_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66(0xD30F); } +void SSE2_PSRLQ_I8_to_XMM(x86SSERegType to, u8 imm8) +{ + write8( 0x66 ); + RexB(0, to); + write16( 0x730F ); + ModRM( 3, 2 , to ); + write8( imm8 ); +} + +void SSE2_PSRLDQ_I8_to_XMM(x86SSERegType to, u8 imm8) +{ + write8( 0x66 ); + RexB(0, to); + write16( 0x730F ); + ModRM( 3, 3 , to ); + write8( imm8 ); +} + +// shift right arithmetic + +void SSE2_PSRAW_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66(0xE10F); } +void SSE2_PSRAW_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66(0xE10F); } +void SSE2_PSRAW_I8_to_XMM(x86SSERegType to, u8 imm8) +{ + write8( 0x66 ); + RexB(0, to); + write16( 0x710F ); + ModRM( 3, 4 , to ); + write8( imm8 ); +} + +void SSE2_PSRAD_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66(0xE20F); } +void SSE2_PSRAD_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66(0xE20F); } +void SSE2_PSRAD_I8_to_XMM(x86SSERegType to, u8 imm8) +{ + write8( 0x66 ); + RexB(0, to); + write16( 0x720F ); + ModRM( 3, 4 , to ); + write8( imm8 ); +} + +// shift left logical + +void SSE2_PSLLW_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66(0xF10F); } +void SSE2_PSLLW_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66(0xF10F); } +void SSE2_PSLLW_I8_to_XMM(x86SSERegType to, u8 imm8) +{ + write8( 0x66 ); + RexB(0, to); + write16( 0x710F ); + ModRM( 3, 6 , to ); + write8( imm8 ); +} + +void SSE2_PSLLD_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66(0xF20F); } +void SSE2_PSLLD_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66(0xF20F); } +void SSE2_PSLLD_I8_to_XMM(x86SSERegType to, u8 imm8) +{ + write8( 0x66 ); + RexB(0, to); + write16( 0x720F ); + ModRM( 3, 6 , to ); + write8( imm8 ); +} + +void SSE2_PSLLQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66(0xF30F); } +void SSE2_PSLLQ_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66(0xF30F); } +void SSE2_PSLLQ_I8_to_XMM(x86SSERegType to, u8 imm8) +{ + write8( 0x66 ); + RexB(0, to); + write16( 0x730F ); + ModRM( 3, 6 , to ); + write8( imm8 ); +} + +void SSE2_PSLLDQ_I8_to_XMM(x86SSERegType to, u8 imm8) +{ + write8( 0x66 ); + RexB(0, to); + write16( 0x730F ); + ModRM( 3, 7 , to ); + write8( imm8 ); +} + + +void SSE2_PMAXSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xEE0F ); } +void SSE2_PMAXSW_M128_to_XMM( x86SSERegType to, uptr from ){ SSEMtoR66( 0xEE0F ); } + +void SSE2_PMAXUB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xDE0F ); } +void SSE2_PMAXUB_M128_to_XMM( x86SSERegType to, uptr from ){ SSEMtoR66( 0xDE0F ); } + +void SSE2_PMINSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xEA0F ); } +void SSE2_PMINSW_M128_to_XMM( x86SSERegType to, uptr from ){ SSEMtoR66( 0xEA0F ); } + +void SSE2_PMINUB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xDA0F ); } +void SSE2_PMINUB_M128_to_XMM( x86SSERegType to, uptr from ){ SSEMtoR66( 0xDA0F ); } + +// + +void SSE2_PADDSB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xEC0F ); } +void SSE2_PADDSB_M128_to_XMM( x86SSERegType to, uptr from ){ SSEMtoR66( 0xEC0F ); } + +void SSE2_PADDSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xED0F ); } +void SSE2_PADDSW_M128_to_XMM( x86SSERegType to, uptr from ){ SSEMtoR66( 0xED0F ); } + +void SSE2_PSUBSB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xE80F ); } +void SSE2_PSUBSB_M128_to_XMM( x86SSERegType to, uptr from ){ SSEMtoR66( 0xE80F ); } + +void SSE2_PSUBSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ){ SSERtoR66( 0xE90F ); } +void SSE2_PSUBSW_M128_to_XMM( x86SSERegType to, uptr from ){ SSEMtoR66( 0xE90F ); } + +void SSE2_PSUBUSB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR66( 0xD80F ); } +void SSE2_PSUBUSB_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR66( 0xD80F ); } +void SSE2_PSUBUSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR66( 0xD90F ); } +void SSE2_PSUBUSW_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR66( 0xD90F ); } + +void SSE2_PADDUSB_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR66( 0xDC0F ); } +void SSE2_PADDUSB_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR66( 0xDC0F ); } +void SSE2_PADDUSW_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { SSERtoR66( 0xDD0F ); } +void SSE2_PADDUSW_M128_to_XMM( x86SSERegType to, uptr from ) { SSEMtoR66( 0xDD0F ); } + +//**********************************************************************************/ +//PACKSSWB,PACKSSDW: Pack Saturate Signed Word +//********************************************************************************** +void SSE2_PACKSSWB_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0x630F ); } +void SSE2_PACKSSWB_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0x630F ); } +void SSE2_PACKSSDW_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0x6B0F ); } +void SSE2_PACKSSDW_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0x6B0F ); } + +void SSE2_PACKUSWB_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0x670F ); } +void SSE2_PACKUSWB_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0x670F ); } + +//**********************************************************************************/ +//PUNPCKHWD: Unpack 16bit high +//********************************************************************************** +void SSE2_PUNPCKLBW_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0x600F ); } +void SSE2_PUNPCKLBW_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0x600F ); } + +void SSE2_PUNPCKHBW_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0x680F ); } +void SSE2_PUNPCKHBW_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0x680F ); } + +void SSE2_PUNPCKLWD_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0x610F ); } +void SSE2_PUNPCKLWD_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0x610F ); } +void SSE2_PUNPCKHWD_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0x690F ); } +void SSE2_PUNPCKHWD_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0x690F ); } + +void SSE2_PUNPCKLDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0x620F ); } +void SSE2_PUNPCKLDQ_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0x620F ); } +void SSE2_PUNPCKHDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0x6A0F ); } +void SSE2_PUNPCKHDQ_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0x6A0F ); } + +void SSE2_PUNPCKLQDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0x6C0F ); } +void SSE2_PUNPCKLQDQ_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0x6C0F ); } + +void SSE2_PUNPCKHQDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0x6D0F ); } +void SSE2_PUNPCKHQDQ_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0x6D0F ); } + +void SSE2_PMULLW_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0xD50F ); } +void SSE2_PMULLW_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0xD50F ); } +void SSE2_PMULHW_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0xE50F ); } +void SSE2_PMULHW_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0xE50F ); } + +void SSE2_PMULUDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSERtoR66( 0xF40F ); } +void SSE2_PMULUDQ_M128_to_XMM(x86SSERegType to, uptr from) { SSEMtoR66( 0xF40F ); } + +void SSE2_PMOVMSKB_XMM_to_R32(x86IntRegType to, x86SSERegType from) { SSERtoR66(0xD70F); } + +void SSE_MOVMSKPS_XMM_to_R32(x86IntRegType to, x86SSERegType from) { SSERtoR(0x500F); } +void SSE2_MOVMSKPD_XMM_to_R32(x86IntRegType to, x86SSERegType from) { SSERtoR66(0x500F); } + +void SSE3_HADDPS_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { write8(0xf2); SSERtoR( 0x7c0f ); } +void SSE3_HADDPS_M128_to_XMM(x86SSERegType to, uptr from){ SSEMtoRv( 3, 0x7c0fF2, 0 ); } + +void SSE3_MOVSLDUP_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { + write8(0xf3); + RexRB(0, to, from); + write16( 0x120f); + ModRM( 3, to, from ); +} + +void SSE3_MOVSLDUP_M128_to_XMM(x86SSERegType to, uptr from) { SSE_SS_MtoR(0x120f, 0); } +void SSE3_MOVSHDUP_XMM_to_XMM(x86SSERegType to, x86SSERegType from) { SSE_SS_RtoR(0x160f); } +void SSE3_MOVSHDUP_M128_to_XMM(x86SSERegType to, uptr from) { SSE_SS_MtoR(0x160f, 0); } + +// SSE-X +void SSEX_MOVDQA_M128_to_XMM( x86SSERegType to, uptr from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[to] == XMMT_INT ) SSE2_MOVDQA_M128_to_XMM(to, from); + else SSE_MOVAPS_M128_to_XMM(to, from); +} + +void SSEX_MOVDQA_XMM_to_M128( uptr to, x86SSERegType from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_MOVDQA_XMM_to_M128(to, from); + else SSE_MOVAPS_XMM_to_M128(to, from); +} + +void SSEX_MOVDQA_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_MOVDQA_XMM_to_XMM(to, from); + else SSE_MOVAPS_XMM_to_XMM(to, from); +} + +void SSEX_MOVDQARmtoROffset( x86SSERegType to, x86IntRegType from, int offset ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[to] == XMMT_INT ) SSE2_MOVDQARmtoROffset(to, from, offset); + else SSE_MOVAPSRmtoROffset(to, from, offset); +} + +void SSEX_MOVDQARtoRmOffset( x86IntRegType to, x86SSERegType from, int offset ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_MOVDQARtoRmOffset(to, from, offset); + else SSE_MOVAPSRtoRmOffset(to, from, offset); +} + +void SSEX_MOVDQU_M128_to_XMM( x86SSERegType to, uptr from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[to] == XMMT_INT ) SSE2_MOVDQU_M128_to_XMM(to, from); + else SSE_MOVAPS_M128_to_XMM(to, from); +} + +void SSEX_MOVDQU_XMM_to_M128( uptr to, x86SSERegType from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_MOVDQU_XMM_to_M128(to, from); + else SSE_MOVAPS_XMM_to_M128(to, from); +} + +void SSEX_MOVDQU_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_MOVDQU_XMM_to_XMM(to, from); + else SSE_MOVAPS_XMM_to_XMM(to, from); +} + +void SSEX_MOVD_M32_to_XMM( x86SSERegType to, uptr from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[to] == XMMT_INT ) SSE2_MOVD_M32_to_XMM(to, from); + else SSE_MOVSS_M32_to_XMM(to, from); +} + +void SSEX_MOVD_XMM_to_M32( u32 to, x86SSERegType from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_MOVD_XMM_to_M32(to, from); + else SSE_MOVSS_XMM_to_M32(to, from); +} + +void SSEX_MOVD_XMM_to_Rm( x86IntRegType to, x86SSERegType from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_MOVD_XMM_to_Rm(to, from); + else SSE_MOVSS_XMM_to_Rm(to, from); +} + +void SSEX_MOVD_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[to] == XMMT_INT ) SSE2_MOVD_RmOffset_to_XMM(to, from, offset); + else SSE_MOVSS_RmOffset_to_XMM(to, from, offset); +} + +void SSEX_MOVD_XMM_to_RmOffset( x86IntRegType to, x86SSERegType from, int offset ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_MOVD_XMM_to_RmOffset(to, from, offset); + else SSE_MOVSS_XMM_to_RmOffset(to, from, offset); +} + +void SSEX_POR_M128_to_XMM( x86SSERegType to, uptr from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[to] == XMMT_INT ) SSE2_POR_M128_to_XMM(to, from); + else SSE_ORPS_M128_to_XMM(to, from); +} + +void SSEX_POR_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_POR_XMM_to_XMM(to, from); + else SSE_ORPS_XMM_to_XMM(to, from); +} + +void SSEX_PXOR_M128_to_XMM( x86SSERegType to, uptr from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[to] == XMMT_INT ) SSE2_PXOR_M128_to_XMM(to, from); + else SSE_XORPS_M128_to_XMM(to, from); +} + +void SSEX_PXOR_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_PXOR_XMM_to_XMM(to, from); + else SSE_XORPS_XMM_to_XMM(to, from); +} + +void SSEX_PAND_M128_to_XMM( x86SSERegType to, uptr from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[to] == XMMT_INT ) SSE2_PAND_M128_to_XMM(to, from); + else SSE_ANDPS_M128_to_XMM(to, from); +} + +void SSEX_PAND_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_PAND_XMM_to_XMM(to, from); + else SSE_ANDPS_XMM_to_XMM(to, from); +} + +void SSEX_PANDN_M128_to_XMM( x86SSERegType to, uptr from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[to] == XMMT_INT ) SSE2_PANDN_M128_to_XMM(to, from); + else SSE_ANDNPS_M128_to_XMM(to, from); +} + +void SSEX_PANDN_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_PANDN_XMM_to_XMM(to, from); + else SSE_ANDNPS_XMM_to_XMM(to, from); +} + +void SSEX_PUNPCKLDQ_M128_to_XMM(x86SSERegType to, uptr from) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[to] == XMMT_INT ) SSE2_PUNPCKLDQ_M128_to_XMM(to, from); + else SSE_UNPCKLPS_M128_to_XMM(to, from); +} + +void SSEX_PUNPCKLDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_PUNPCKLDQ_XMM_to_XMM(to, from); + else SSE_UNPCKLPS_XMM_to_XMM(to, from); +} + +void SSEX_PUNPCKHDQ_M128_to_XMM(x86SSERegType to, uptr from) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[to] == XMMT_INT ) SSE2_PUNPCKHDQ_M128_to_XMM(to, from); + else SSE_UNPCKHPS_M128_to_XMM(to, from); +} + +void SSEX_PUNPCKHDQ_XMM_to_XMM(x86SSERegType to, x86SSERegType from) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) SSE2_PUNPCKHDQ_XMM_to_XMM(to, from); + else SSE_UNPCKHPS_XMM_to_XMM(to, from); +} + +void SSEX_MOVHLPS_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) +{ + if( cpucaps.hasStreamingSIMD2Extensions && g_xmmtypes[from] == XMMT_INT ) { + SSE2_PUNPCKHQDQ_XMM_to_XMM(to, from); + if( to != from ) SSE2_PSHUFD_XMM_to_XMM(to, to, 0x4e); + } + else { + SSE_MOVHLPS_XMM_to_XMM(to, from); + } +} + +// SSE2 emulation +void SSE2EMU_MOVSD_XMM_to_XMM( x86SSERegType to, x86SSERegType from) +{ + SSE_SHUFPS_XMM_to_XMM(to, from, 0x4e); + SSE_SHUFPS_XMM_to_XMM(to, to, 0x4e); +} + +void SSE2EMU_MOVQ_M64_to_XMM( x86SSERegType to, uptr from) +{ + SSE_XORPS_XMM_to_XMM(to, to); + SSE_MOVLPS_M64_to_XMM(to, from); +} + +void SSE2EMU_MOVQ_XMM_to_XMM( x86SSERegType to, x86SSERegType from) +{ + SSE_XORPS_XMM_to_XMM(to, to); + SSE2EMU_MOVSD_XMM_to_XMM(to, from); +} + +void SSE2EMU_MOVD_RmOffset_to_XMM( x86SSERegType to, x86IntRegType from, int offset ) +{ + MOV32RmtoROffset(EAX, from, offset); + MOV32ItoM((uptr)p+4, 0); + MOV32ItoM((uptr)p+8, 0); + MOV32RtoM((uptr)p, EAX); + MOV32ItoM((uptr)p+12, 0); + SSE_MOVAPS_M128_to_XMM(to, (uptr)p); +} + +void SSE2EMU_MOVD_XMM_to_RmOffset(x86IntRegType to, x86SSERegType from, int offset ) +{ + SSE_MOVSS_XMM_to_M32((uptr)p, from); + MOV32MtoR(EAX, (uptr)p); + MOV32RtoRmOffset(to, EAX, offset); +} + +#ifndef __x86_64__ +extern void SetMMXstate(); + +void SSE2EMU_MOVDQ2Q_XMM_to_MM( x86MMXRegType to, x86SSERegType from) +{ + SSE_MOVLPS_XMM_to_M64(p, from); + MOVQMtoR(to, p); + SetMMXstate(); +} + +void SSE2EMU_MOVQ2DQ_MM_to_XMM( x86SSERegType to, x86MMXRegType from) +{ + MOVQRtoM(p, from); + SSE_MOVLPS_M64_to_XMM(to, p); + SetMMXstate(); +} +#endif + +/****************************************************************************/ +/* SSE2 Emulated functions for SSE CPU's by kekko */ +/****************************************************************************/ +void SSE2EMU_PSHUFD_XMM_to_XMM( x86SSERegType to, x86SSERegType from, u8 imm8 ) { + MOV64ItoR(EAX, (uptr)&p); + MOV64ItoR(EBX, (uptr)&p2); + SSE_MOVUPSRtoRm(EAX, from); + + MOV32ItoR(ECX, (u32)imm8); + AND32ItoR(ECX, 3); + SHL32ItoR(ECX, 2); + ADD32RtoR(ECX, EAX); + MOV32RmtoR(ECX, ECX); + MOV32RtoRm(EBX, ECX); + + ADD32ItoR(EBX, 4); + MOV32ItoR(ECX, (u32)imm8); + SHR32ItoR(ECX, 2); + AND32ItoR(ECX, 3); + SHL32ItoR(ECX, 2); + ADD32RtoR(ECX, EAX); + MOV32RmtoR(ECX, ECX); + MOV32RtoRm(EBX, ECX); + + ADD32ItoR(EBX, 4); + MOV32ItoR(ECX, (u32)imm8); + SHR32ItoR(ECX, 4); + AND32ItoR(ECX, 3); + SHL32ItoR(ECX, 2); + ADD32RtoR(ECX, EAX); + MOV32RmtoR(ECX, ECX); + MOV32RtoRm(EBX, ECX); + + ADD32ItoR(EBX, 4); + MOV32ItoR(ECX, (u32)imm8); + SHR32ItoR(ECX, 6); + AND32ItoR(ECX, 3); + SHL32ItoR(ECX, 2); + ADD32RtoR(ECX, EAX); + MOV32RmtoR(ECX, ECX); + MOV32RtoRm(EBX, ECX); + + SUB32ItoR(EBX, 12); + + SSE_MOVUPSRmtoR(to, EBX); +} + +void SSE2EMU_MOVD_XMM_to_R( x86IntRegType to, x86SSERegType from ) { + /* XXX? */ + MOV64ItoR(to, (uptr)&p); + SSE_MOVUPSRtoRm(to, from); + MOV32RmtoR(to, to); +} + +#ifndef __x86_64__ +extern void SetFPUstate(); +extern void _freeMMXreg(int mmxreg); +#endif + +void SSE2EMU_CVTPS2DQ_XMM_to_XMM( x86SSERegType to, x86SSERegType from ) { +#ifndef __x86_64__ + SetFPUstate(); + _freeMMXreg(7); +#endif + SSE_MOVAPS_XMM_to_M128((uptr)f, from); + + FLD32((uptr)&f[0]); + FISTP32((uptr)&p2[0]); + FLD32((uptr)&f[1]); + FISTP32((uptr)&p2[1]); + FLD32((uptr)&f[2]); + FISTP32((uptr)&p2[2]); + FLD32((uptr)&f[3]); + FISTP32((uptr)&p2[3]); + + SSE_MOVAPS_M128_to_XMM(to, (uptr)p2); +} + +void SSE2EMU_CVTDQ2PS_M128_to_XMM( x86SSERegType to, uptr from ) { +#ifndef __x86_64__ + SetFPUstate(); + _freeMMXreg(7); +#endif + FILD32(from); + FSTP32((uptr)&f[0]); + FILD32(from+4); + FSTP32((uptr)&f[1]); + FILD32(from+8); + FSTP32((uptr)&f[2]); + FILD32(from+12); + FSTP32((uptr)&f[3]); + + SSE_MOVAPS_M128_to_XMM(to, (uptr)f); +} + +void SSE2EMU_MOVD_XMM_to_M32( uptr to, x86SSERegType from ) { + /* XXX? */ + MOV64ItoR(EAX, (uptr)&p); + SSE_MOVUPSRtoRm(EAX, from); + MOV32RmtoR(EAX, EAX); + MOV32RtoM(to, EAX); +} + +void SSE2EMU_MOVD_R_to_XMM( x86SSERegType to, x86IntRegType from ) { + MOV32ItoM((uptr)p+4, 0); + MOV32ItoM((uptr)p+8, 0); + MOV32RtoM((uptr)p, from); + MOV32ItoM((uptr)p+12, 0); + SSE_MOVAPS_M128_to_XMM(to, (uptr)p); +} + +#endif diff --git a/libpcsxcore/mdec.c b/libpcsxcore/mdec.c new file mode 100644 index 00000000..5e84152a --- /dev/null +++ b/libpcsxcore/mdec.c @@ -0,0 +1,565 @@ +/*************************************************************************** + * Copyright (C) 2010 Gabriele Gorla * + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#include "mdec.h" + +#define DSIZE 8 +#define DSIZE2 (DSIZE * DSIZE) + +#define SCALE(x, n) ((x) >> (n)) +#define SCALER(x, n) (((x) + ((1 << (n)) >> 1)) >> (n)) + +#define AAN_CONST_BITS 12 +#define AAN_PRESCALE_BITS 16 + +#define AAN_CONST_SIZE 24 +#define AAN_CONST_SCALE (AAN_CONST_SIZE - AAN_CONST_BITS) + +#define AAN_PRESCALE_SIZE 20 +#define AAN_PRESCALE_SCALE (AAN_PRESCALE_SIZE-AAN_PRESCALE_BITS) +#define AAN_EXTRA 12 + +#define FIX_1_082392200 SCALER(18159528, AAN_CONST_SCALE) // B6 +#define FIX_1_414213562 SCALER(23726566, AAN_CONST_SCALE) // A4 +#define FIX_1_847759065 SCALER(31000253, AAN_CONST_SCALE) // A2 +#define FIX_2_613125930 SCALER(43840978, AAN_CONST_SCALE) // B2 + +#define MULS(var, const) (SCALE((var) * (const), AAN_CONST_BITS)) + +#define RLE_RUN(a) ((a) >> 10) +#define RLE_VAL(a) (((int)(a) << (sizeof(int) * 8 - 10)) >> (sizeof(int) * 8 - 10)) + +#if 0 +static void printmatrixu8(u8 *m) { + int i; + for(i = 0; i < DSIZE2; i++) { + printf("%3d ",m[i]); + if((i+1) % 8 == 0) printf("\n"); + } +} +#endif + +static inline void fillcol(int *blk, int val) { + blk[0 * DSIZE] = blk[1 * DSIZE] = blk[2 * DSIZE] = blk[3 * DSIZE] + = blk[4 * DSIZE] = blk[5 * DSIZE] = blk[6 * DSIZE] = blk[7 * DSIZE] = val; +} + +static inline void fillrow(int *blk, int val) { + blk[0] = blk[1] = blk[2] = blk[3] + = blk[4] = blk[5] = blk[6] = blk[7] = val; +} + +void idct(int *block,int used_col) { + int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + int z5, z10, z11, z12, z13; + int *ptr; + int i; + + // the block has only the DC coefficient + if (used_col == -1) { + int v = block[0]; + for (i = 0; i < DSIZE2; i++) block[i] = v; + return; + } + + // last_col keeps track of the highest column with non zero coefficients + ptr = block; + for (i = 0; i < DSIZE; i++, ptr++) { + if ((used_col & (1 << i)) == 0) { + // the column is empty or has only the DC coefficient + if (ptr[DSIZE * 0]) { + fillcol(ptr, ptr[0]); + used_col |= (1 << i); + } + continue; + } + + // further optimization could be made by keeping track of + // last_row in rl2blk + z10 = ptr[DSIZE * 0] + ptr[DSIZE * 4]; // s04 + z11 = ptr[DSIZE * 0] - ptr[DSIZE * 4]; // d04 + z13 = ptr[DSIZE * 2] + ptr[DSIZE * 6]; // s26 + z12 = MULS(ptr[DSIZE * 2] - ptr[DSIZE * 6], FIX_1_414213562) - z13; + //^^^^ d26=d26*2*A4-s26 + + tmp0 = z10 + z13; // os07 = s04 + s26 + tmp3 = z10 - z13; // os34 = s04 - s26 + tmp1 = z11 + z12; // os16 = d04 + d26 + tmp2 = z11 - z12; // os25 = d04 - d26 + + z13 = ptr[DSIZE * 3] + ptr[DSIZE * 5]; //s53 + z10 = ptr[DSIZE * 3] - ptr[DSIZE * 5]; //-d53 + z11 = ptr[DSIZE * 1] + ptr[DSIZE * 7]; //s17 + z12 = ptr[DSIZE * 1] - ptr[DSIZE * 7]; //d17 + + tmp7 = z11 + z13; // od07 = s17 + s53 + + z5 = (z12 - z10) * (FIX_1_847759065); + tmp6 = SCALE(z10*(FIX_2_613125930) + z5, AAN_CONST_BITS) - tmp7; + tmp5 = MULS(z11 - z13, FIX_1_414213562) - tmp6; + tmp4 = SCALE(z12*(FIX_1_082392200) - z5, AAN_CONST_BITS) + tmp5; + + // path #1 + //z5 = (z12 - z10)* FIX_1_847759065; + // tmp0 = (d17 + d53) * 2*A2 + + //tmp6 = DESCALE(z10*FIX_2_613125930 + z5, CONST_BITS) - tmp7; + // od16 = (d53*-2*B2 + tmp0) - od07 + + //tmp4 = DESCALE(z12*FIX_1_082392200 - z5, CONST_BITS) + tmp5; + // od34 = (d17*2*B6 - tmp0) + od25 + + // path #2 + + // od34 = d17*2*(B6-A2) - d53*2*A2 + // od16 = d53*2*(A2-B2) + d17*2*A2 + + // end + + // tmp5 = MULS(z11 - z13, FIX_1_414213562) - tmp6; + // od25 = (s17 - s53)*2*A4 - od16 + + ptr[DSIZE * 0] = (tmp0 + tmp7); // os07 + od07 + ptr[DSIZE * 7] = (tmp0 - tmp7); // os07 - od07 + ptr[DSIZE * 1] = (tmp1 + tmp6); // os16 + od16 + ptr[DSIZE * 6] = (tmp1 - tmp6); // os16 - od16 + ptr[DSIZE * 2] = (tmp2 + tmp5); // os25 + od25 + ptr[DSIZE * 5] = (tmp2 - tmp5); // os25 - od25 + ptr[DSIZE * 4] = (tmp3 + tmp4); // os34 + od34 + ptr[DSIZE * 3] = (tmp3 - tmp4); // os34 - od34 + } + + ptr = block; + if (used_col == 1) { + for (i = 0; i < DSIZE; i++) + fillrow(block + DSIZE * i, block[DSIZE * i]); + } else { + for (i = 0; i < DSIZE; i++, ptr += DSIZE) { + z10 = ptr[0] + ptr[4]; + z11 = ptr[0] - ptr[4]; + z13 = ptr[2] + ptr[6]; + z12 = MULS(ptr[2] - ptr[6], FIX_1_414213562) - z13; + + tmp0 = z10 + z13; + tmp3 = z10 - z13; + tmp1 = z11 + z12; + tmp2 = z11 - z12; + + z13 = ptr[3] + ptr[5]; + z10 = ptr[3] - ptr[5]; + z11 = ptr[1] + ptr[7]; + z12 = ptr[1] - ptr[7]; + + tmp7 = z11 + z13; + z5 = (z12 - z10) * FIX_1_847759065; + tmp6 = SCALE(z10 * FIX_2_613125930 + z5, AAN_CONST_BITS) - tmp7; + tmp5 = MULS(z11 - z13, FIX_1_414213562) - tmp6; + tmp4 = SCALE(z12 * FIX_1_082392200 - z5, AAN_CONST_BITS) + tmp5; + + ptr[0] = tmp0 + tmp7; + + ptr[7] = tmp0 - tmp7; + ptr[1] = tmp1 + tmp6; + ptr[6] = tmp1 - tmp6; + ptr[2] = tmp2 + tmp5; + ptr[5] = tmp2 - tmp5; + ptr[4] = tmp3 + tmp4; + ptr[3] = tmp3 - tmp4; + } + } +} + +// mdec0: command register +#define MDEC0_STP 0x02000000 +#define MDEC0_RGB24 0x08000000 +#define MDEC0_SIZE_MASK 0xFFFF + +// mdec1: status register +#define MDEC1_BUSY 0x20000000 +#define MDEC1_DREQ 0x18000000 +#define MDEC1_FIFO 0xc0000000 +#define MDEC1_RGB24 0x02000000 +#define MDEC1_STP 0x00800000 +#define MDEC1_RESET 0x80000000 + +struct { + u32 reg0; + u32 reg1; + unsigned short *rl; + int rlsize; +} mdec; + +static int iq_y[DSIZE2], iq_uv[DSIZE2]; + +static int zscan[DSIZE2] = { + 0 , 1 , 8 , 16, 9 , 2 , 3 , 10, + 17, 24, 32, 25, 18, 11, 4 , 5 , + 12, 19, 26, 33, 40, 48, 41, 34, + 27, 20, 13, 6 , 7 , 14, 21, 28, + 35, 42, 49, 56, 57, 50, 43, 36, + 29, 22, 15, 23, 30, 37, 44, 51, + 58, 59, 52, 45, 38, 31, 39, 46, + 53, 60, 61, 54, 47, 55, 62, 63 +}; + +static int aanscales[DSIZE2] = { + 1048576, 1454417, 1370031, 1232995, 1048576, 823861, 567485, 289301, + 1454417, 2017334, 1900287, 1710213, 1454417, 1142728, 787125, 401273, + 1370031, 1900287, 1790031, 1610986, 1370031, 1076426, 741455, 377991, + 1232995, 1710213, 1610986, 1449849, 1232995, 968758, 667292, 340183, + 1048576, 1454417, 1370031, 1232995, 1048576, 823861, 567485, 289301, + 823861, 1142728, 1076426, 968758, 823861, 647303, 445870, 227303, + 567485, 787125, 741455, 667292, 567485, 445870, 307121, 156569, + 289301, 401273, 377991, 340183, 289301, 227303, 156569, 79818 +}; + +static void iqtab_init(int *iqtab, unsigned char *iq_y) { + int i; + + for (i = 0; i < DSIZE2; i++) { + iqtab[i] = (iq_y[i] * SCALER(aanscales[zscan[i]], AAN_PRESCALE_SCALE)); + } +} + +#define MDEC_END_OF_DATA 0xfe00 + +unsigned short *rl2blk(int *blk, unsigned short *mdec_rl) { + int i, k, q_scale, rl, used_col; + int *iqtab; + + memset(blk, 0, 6 * DSIZE2 * sizeof(int)); + iqtab = iq_uv; + for (i = 0; i < 6; i++) { + // decode blocks (Cr,Cb,Y1,Y2,Y3,Y4) + if (i == 2) iqtab = iq_y; + + rl = SWAP16(*mdec_rl); mdec_rl++; + q_scale = RLE_RUN(rl); + blk[0] = SCALER(iqtab[0] * RLE_VAL(rl), AAN_EXTRA - 3); + for (k = 0, used_col = 0;;) { + rl = SWAP16(*mdec_rl); mdec_rl++; + if (rl == MDEC_END_OF_DATA) break; + k += RLE_RUN(rl) + 1; // skip zero-coefficients + + if (k > 63) { + // printf("run lenght exceeded 64 enties\n"); + break; + } + + // zigzag transformation + blk[zscan[k]] = SCALER(RLE_VAL(rl) * iqtab[k] * q_scale, AAN_EXTRA); + // keep track of used columns to speed up the idtc + used_col |= (zscan[k] > 7) ? 1 << (zscan[k] & 7) : 0; + } + + if (k == 0) used_col = -1; + // used_col is -1 for blocks with only the DC coefficient + // any other value is a bitmask of the columns that have + // at least one non zero cofficient in the rows 1-7 + // single coefficients in row 0 are treted specially + // in the idtc function + idct(blk, used_col); + blk += DSIZE2; + } + return mdec_rl; +} + +// full scale (JPEG) +// Y/Cb/Cr[0...255] -> R/G/B[0...255] +// R = 1.000 * (Y) + 1.400 * (Cr - 128) +// G = 1.000 * (Y) - 0.343 * (Cb - 128) - 0.711 (Cr - 128) +// B = 1.000 * (Y) + 1.765 * (Cb - 128) +#define MULR(a) ((1434 * (a))) +#define MULB(a) ((1807 * (a))) +#define MULG2(a, b) ((-351 * (a) - 728 * (b))) +#define MULY(a) ((a) << 10) + +#define MAKERGB15(r, g, b, a) (SWAP16(a | ((b) << 10) | ((g) << 5) | (r))) +#define SCALE8(c) SCALER(c, 20) +#define SCALE5(c) SCALER(c, 23) + +#define CLAMP5(c) ( ((c) < -16) ? 0 : (((c) > (31 - 16)) ? 31 : ((c) + 16)) ) +#define CLAMP8(c) ( ((c) < -128) ? 0 : (((c) > (255 - 128)) ? 255 : ((c) + 128)) ) + +#define CLAMP_SCALE8(a) (CLAMP8(SCALE8(a))) +#define CLAMP_SCALE5(a) (CLAMP5(SCALE5(a))) + +static inline void putlinebw15(unsigned short *image, int *Yblk) { + int i; + int A = (mdec.reg0 & MDEC0_STP) ? 0x8000 : 0; + + for (i = 0; i < 8; i++, Yblk++) { + int Y = *Yblk; + // missing rounding + image[i] = SWAP16((CLAMP5(Y >> 3) * 0x421) | A); + } +} + +static void putquadrgb15(unsigned short *image, int *Yblk, int Cr, int Cb) { + int Y, R, G, B; + int A = (mdec.reg0 & MDEC0_STP) ? 0x8000 : 0; + R = MULR(Cr); + G = MULG2(Cb, Cr); + B = MULB(Cb); + + // added transparency + Y = MULY(Yblk[0]); + image[0] = MAKERGB15(CLAMP_SCALE5(Y + R), CLAMP_SCALE5(Y + G), CLAMP_SCALE5(Y + B), A); + Y = MULY(Yblk[1]); + image[1] = MAKERGB15(CLAMP_SCALE5(Y + R), CLAMP_SCALE5(Y + G), CLAMP_SCALE5(Y + B), A); + Y = MULY(Yblk[8]); + image[16] = MAKERGB15(CLAMP_SCALE5(Y + R), CLAMP_SCALE5(Y + G), CLAMP_SCALE5(Y + B), A); + Y = MULY(Yblk[9]); + image[17] = MAKERGB15(CLAMP_SCALE5(Y + R), CLAMP_SCALE5(Y + G), CLAMP_SCALE5(Y + B), A); +} + +static void yuv2rgb15(int *blk, unsigned short *image) { + int x, y; + int *Yblk = blk + DSIZE2 * 2; + int *Crblk = blk; + int *Cbblk = blk + DSIZE2; + + if (!Config.Mdec) { + for (y = 0; y < 16; y += 2, Crblk += 4, Cbblk += 4, Yblk += 8, image += 24) { + if (y == 8) Yblk += DSIZE2; + for (x = 0; x < 4; x++, image += 2, Crblk++, Cbblk++, Yblk += 2) { + putquadrgb15(image, Yblk, *Crblk, *Cbblk); + putquadrgb15(image + 8, Yblk + DSIZE2, *(Crblk + 4), *(Cbblk + 4)); + } + } + } else { + for (y = 0; y < 16; y++, Yblk += 8, image += 16) { + if (y == 8) Yblk += DSIZE2; + putlinebw15(image, Yblk); + putlinebw15(image + 8, Yblk + DSIZE2); + } + } +} + +static inline void putlinebw24(unsigned char *image, int *Yblk) { + int i; + unsigned char Y; + for (i = 0; i < 8 * 3; i += 3, Yblk++) { + Y = CLAMP8(*Yblk); + image[i + 0] = Y; + image[i + 1] = Y; + image[i + 2] = Y; + } +} + +static void putquadrgb24(unsigned char *image, int *Yblk, int Cr, int Cb) { + int Y, R, G, B; + + R = MULR(Cr); + G = MULG2(Cb,Cr); + B = MULB(Cb); + + Y = MULY(Yblk[0]); + image[0 * 3 + 0] = CLAMP_SCALE8(Y + R); + image[0 * 3 + 1] = CLAMP_SCALE8(Y + G); + image[0 * 3 + 2] = CLAMP_SCALE8(Y + B); + Y = MULY(Yblk[1]); + image[1 * 3 + 0] = CLAMP_SCALE8(Y + R); + image[1 * 3 + 1] = CLAMP_SCALE8(Y + G); + image[1 * 3 + 2] = CLAMP_SCALE8(Y + B); + Y = MULY(Yblk[8]); + image[16 * 3 + 0] = CLAMP_SCALE8(Y + R); + image[16 * 3 + 1] = CLAMP_SCALE8(Y + G); + image[16 * 3 + 2] = CLAMP_SCALE8(Y + B); + Y = MULY(Yblk[9]); + image[17 * 3 + 0] = CLAMP_SCALE8(Y + R); + image[17 * 3 + 1] = CLAMP_SCALE8(Y + G); + image[17 * 3 + 2] = CLAMP_SCALE8(Y + B); +} + +static void yuv2rgb24(int *blk, unsigned char *image) { + int x, y; + int *Yblk = blk + DSIZE2 * 2; + int *Crblk = blk; + int *Cbblk = blk + DSIZE2; + + if (!Config.Mdec) { + for (y = 0; y < 16; y += 2, Crblk += 4, Cbblk += 4, Yblk += 8, image += 24 * 3) { + if (y == 8) Yblk += DSIZE2; + for (x = 0; x < 4; x++, image += 6, Crblk++, Cbblk++, Yblk += 2) { + putquadrgb24(image, Yblk, *Crblk, *Cbblk); + putquadrgb24(image + 8 * 3, Yblk + DSIZE2, *(Crblk + 4), *(Cbblk + 4)); + } + } + } else { + for (y = 0; y < 16; y++, Yblk += 8, image += 16 * 3) { + if (y == 8) Yblk += DSIZE2; + putlinebw24(image, Yblk); + putlinebw24(image + 8 * 3, Yblk + DSIZE2); + } + } +} + +void mdecInit(void) { + mdec.rl = (u16 *)&psxM[0x100000]; + mdec.reg0 = 0; + mdec.reg1 = 0; +} + +// command register +void mdecWrite0(u32 data) { +#ifdef CDR_LOG + CDR_LOG("mdec0 write %08x\n", data); +#endif + mdec.reg0 = data; +} + +u32 mdecRead0(void) { +#ifdef CDR_LOG + CDR_LOG("mdec0 read %08x\n", mdec.reg0); +#endif + // mame is returning 0 + return mdec.reg0; +} + +// status register +void mdecWrite1(u32 data) { +#ifdef CDR_LOG + CDR_LOG("mdec1 write %08x\n", data); +#endif + if (data & MDEC1_RESET) { // mdec reset + mdec.reg0 = 0; + mdec.reg1 = 0; + } +} + +u32 mdecRead1(void) { + u32 v = mdec.reg1; + v |= (mdec.reg0 & MDEC0_STP) ? MDEC1_STP : 0; + v |= (mdec.reg0 & MDEC0_RGB24) ? MDEC1_RGB24 : 0; +#ifdef CDR_LOG + CDR_LOG("mdec1 read %08x\n", v); +#endif + return v; +} + +void psxDma0(u32 adr, u32 bcr, u32 chcr) { + int cmd = mdec.reg0; + int size; + +#ifdef CDR_LOG + CDR_LOG("DMA0 %08x %08x %08x\n", adr, bcr, chcr); +#endif + + if (chcr != 0x01000201) { + // printf("chcr != 0x01000201\n"); + return; + } + + size = (bcr >> 16) * (bcr & 0xffff); + + switch (cmd >> 28) { + case 0x3: // decode + mdec.rl = (u16 *)PSXM(adr); + mdec.rlsize = mdec.reg0 & MDEC0_SIZE_MASK; + break; + + case 0x4: // quantization table upload + { + u8 *p = (u8 *)PSXM(adr); + // printf("uploading new quantization table\n"); + // printmatrixu8(p); + // printmatrixu8(p + 64); + iqtab_init(iq_y, p); + iqtab_init(iq_uv, p + 64); + } + break; + + case 0x6: // cosine table + // printf("mdec cosine table\n"); + break; + + default: + // printf("mdec unknown command\n"); + break; + } + + HW_DMA0_CHCR &= SWAP32(~0x01000000); + DMA_INTERRUPT(0); +} + +void psxDma1(u32 adr, u32 bcr, u32 chcr) { + int blk[DSIZE2 * 6]; + unsigned short *image; + int size; + +#ifdef CDR_LOG + CDR_LOG("DMA1 %08x %08x %08x (cmd = %08x)\n", adr, bcr, chcr, mdec.reg0); +#endif + + if (chcr != 0x01000200) return; + + size = (bcr >> 16) * (bcr & 0xffff); + + image = (u16 *)PSXM(adr); + + if (mdec.reg0 & MDEC0_RGB24) { // 15-b decoding + // MDECOUTDMA_INT(((size * (1000000 / 9000)) / 4) /** 4*/); + MDECOUTDMA_INT(size / 4); + size = size / ((16 * 16) / 2); + for (; size > 0; size--, image += (16 * 16)) { + mdec.rl = rl2blk(blk, mdec.rl); + yuv2rgb15(blk, image); + } + } else { // 24-b decoding + // MDECOUTDMA_INT(((size * (1000000 / 9000)) / 4) /** 4*/); + MDECOUTDMA_INT(size / 4); + size = size / ((24 * 16) / 2); + for (; size > 0; size--, image += (24 * 16)) { + mdec.rl = rl2blk(blk, mdec.rl); + yuv2rgb24(blk, (u8 *)image); + } + } + + mdec.reg1 |= MDEC1_BUSY; +} + +void mdec1Interrupt() { +#ifdef CDR_LOG + CDR_LOG("mdec1Interrupt\n"); +#endif + if (HW_DMA1_CHCR & SWAP32(0x01000000)) { + // Set a fixed value totaly arbitrarie another sound value is + // PSXCLK / 60 or PSXCLK / 50 since the bug happened at end of frame. + // PSXCLK / 1000 seems good for FF9. (for FF9 need < ~28000) + // CAUTION: commented interrupt-handling may lead to problems, keep an eye ;-) + MDECOUTDMA_INT(PSXCLK / 1000 * BIAS); +// psxRegs.interrupt |= 0x02000000; +// psxRegs.intCycle[5 + 24 + 1] *= 8; +// psxRegs.intCycle[5 + 24] = psxRegs.cycle; + HW_DMA1_CHCR &= SWAP32(~0x01000000); + DMA_INTERRUPT(1); + } else { + mdec.reg1 &= ~MDEC1_BUSY; + } +} + +int mdecFreeze(gzFile f, int Mode) { + gzfreeze(&mdec, sizeof(mdec)); + gzfreeze(iq_y, sizeof(iq_y)); + gzfreeze(iq_uv, sizeof(iq_uv)); + + return 0; +} diff --git a/libpcsxcore/mdec.h b/libpcsxcore/mdec.h new file mode 100644 index 00000000..e191b4e5 --- /dev/null +++ b/libpcsxcore/mdec.h @@ -0,0 +1,45 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __MDEC_H__ +#define __MDEC_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "r3000a.h" +#include "psxhw.h" +#include "psxdma.h" + +void mdecInit(); +void mdecWrite0(u32 data); +void mdecWrite1(u32 data); +u32 mdecRead0(); +u32 mdecRead1(); +void psxDma0(u32 madr, u32 bcr, u32 chcr); +void psxDma1(u32 madr, u32 bcr, u32 chcr); +void mdec1Interrupt(); +int mdecFreeze(gzFile f, int Mode); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c new file mode 100644 index 00000000..ef492440 --- /dev/null +++ b/libpcsxcore/misc.c @@ -0,0 +1,706 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* Miscellaneous functions, including savestates and CD-ROM loading. +*/ + +#include "misc.h" +#include "cdrom.h" +#include "mdec.h" +#include "ppf.h" + +char CdromId[10] = ""; +char CdromLabel[33] = ""; + +// PSX Executable types +#define PSX_EXE 1 +#define CPE_EXE 2 +#define COFF_EXE 3 +#define INVALID_EXE 4 + +#define ISODCL(from, to) (to - from + 1) + +struct iso_directory_record { + char length [ISODCL (1, 1)]; /* 711 */ + char ext_attr_length [ISODCL (2, 2)]; /* 711 */ + char extent [ISODCL (3, 10)]; /* 733 */ + char size [ISODCL (11, 18)]; /* 733 */ + char date [ISODCL (19, 25)]; /* 7 by 711 */ + char flags [ISODCL (26, 26)]; + char file_unit_size [ISODCL (27, 27)]; /* 711 */ + char interleave [ISODCL (28, 28)]; /* 711 */ + char volume_sequence_number [ISODCL (29, 32)]; /* 723 */ + unsigned char name_len [ISODCL (33, 33)]; /* 711 */ + char name [1]; +}; + +void mmssdd( char *b, char *p ) +{ + int m, s, d; +#if defined(__BIGENDIAN__) + int block = (b[0] & 0xff) | ((b[1] & 0xff) << 8) | ((b[2] & 0xff) << 16) | (b[3] << 24); +#else + int block = *((int*)b); +#endif + + block += 150; + m = block / 4500; // minutes + block = block - m * 4500; // minutes rest + s = block / 75; // seconds + d = block - s * 75; // seconds rest + + m = ((m / 10) << 4) | m % 10; + s = ((s / 10) << 4) | s % 10; + d = ((d / 10) << 4) | d % 10; + + p[0] = m; + p[1] = s; + p[2] = d; +} + +#define incTime() \ + time[0] = btoi(time[0]); time[1] = btoi(time[1]); time[2] = btoi(time[2]); \ + time[2]++; \ + if(time[2] == 75) { \ + time[2] = 0; \ + time[1]++; \ + if (time[1] == 60) { \ + time[1] = 0; \ + time[0]++; \ + } \ + } \ + time[0] = itob(time[0]); time[1] = itob(time[1]); time[2] = itob(time[2]); + +#define READTRACK() \ + if (CDR_readTrack(time) == -1) return -1; \ + buf = CDR_getBuffer(); \ + if (buf == NULL) return -1; else CheckPPFCache(buf, time[0], time[1], time[2]); + +#define READDIR(_dir) \ + READTRACK(); \ + memcpy(_dir, buf + 12, 2048); \ + \ + incTime(); \ + READTRACK(); \ + memcpy(_dir + 2048, buf + 12, 2048); + +int GetCdromFile(u8 *mdir, u8 *time, s8 *filename) { + struct iso_directory_record *dir; + char ddir[4096]; + u8 *buf; + int i; + + // only try to scan if a filename is given + if (!strlen(filename)) return -1; + + i = 0; + while (i < 4096) { + dir = (struct iso_directory_record*) &mdir[i]; + if (dir->length[0] == 0) { + return -1; + } + i += dir->length[0]; + + if (dir->flags[0] & 0x2) { // it's a dir + if (!strnicmp((char *)&dir->name[0], filename, dir->name_len[0])) { + if (filename[dir->name_len[0]] != '\\') continue; + + filename += dir->name_len[0] + 1; + + mmssdd(dir->extent, (char *)time); + READDIR(ddir); + i = 0; + mdir = ddir; + } + } else { + if (!strnicmp((char *)&dir->name[0], filename, strlen(filename))) { + mmssdd(dir->extent, (char *)time); + break; + } + } + } + return 0; +} + +int LoadCdrom() { + EXE_HEADER tmpHead; + struct iso_directory_record *dir; + u8 time[4], *buf; + u8 mdir[4096]; + s8 exename[256]; + + if (!Config.HLE) { + psxRegs.pc = psxRegs.GPR.n.ra; + return 0; + } + + time[0] = itob(0); time[1] = itob(2); time[2] = itob(0x10); + + READTRACK(); + + // skip head and sub, and go to the root directory record + dir = (struct iso_directory_record*) &buf[12+156]; + + mmssdd(dir->extent, (char*)time); + + READDIR(mdir); + + // Load SYSTEM.CNF and scan for the main executable + if (GetCdromFile(mdir, time, "SYSTEM.CNF;1") == -1) { + // if SYSTEM.CNF is missing, start an existing PSX.EXE + if (GetCdromFile(mdir, time, "PSX.EXE;1") == -1) return -1; + + READTRACK(); + } + else { + // read the SYSTEM.CNF + READTRACK(); + + sscanf((char *)buf + 12, "BOOT = cdrom:\\%256s", exename); + if (GetCdromFile(mdir, time, exename) == -1) { + sscanf((char *)buf + 12, "BOOT = cdrom:%256s", exename); + if (GetCdromFile(mdir, time, exename) == -1) { + char *ptr = strstr(buf + 12, "cdrom:"); + if (ptr != NULL) { + ptr += 6; + while (*ptr == '\\' || *ptr == '/') ptr++; + strncpy(exename, ptr, 255); + exename[255] = '\0'; + ptr = exename; + while (*ptr != '\0' && *ptr != '\r' && *ptr != '\n') ptr++; + *ptr = '\0'; + if (GetCdromFile(mdir, time, exename) == -1) + return -1; + } else + return -1; + } + } + + // Read the EXE-Header + READTRACK(); + } + + memcpy(&tmpHead, buf + 12, sizeof(EXE_HEADER)); + + psxRegs.pc = SWAP32(tmpHead.pc0); + psxRegs.GPR.n.gp = SWAP32(tmpHead.gp0); + psxRegs.GPR.n.sp = SWAP32(tmpHead.s_addr); + if (psxRegs.GPR.n.sp == 0) psxRegs.GPR.n.sp = 0x801fff00; + + tmpHead.t_size = SWAP32(tmpHead.t_size); + tmpHead.t_addr = SWAP32(tmpHead.t_addr); + + // Read the rest of the main executable + while (tmpHead.t_size) { + void *ptr = (void *)PSXM(tmpHead.t_addr); + + incTime(); + READTRACK(); + + if (ptr != NULL) memcpy(ptr, buf+12, 2048); + + tmpHead.t_size -= 2048; + tmpHead.t_addr += 2048; + } + + return 0; +} + +int LoadCdromFile(const char *filename, EXE_HEADER *head) { + struct iso_directory_record *dir; + u8 time[4],*buf; + u8 mdir[4096], exename[256]; + u32 size, addr; + + sscanf(filename, "cdrom:\\%256s", exename); + + time[0] = itob(0); time[1] = itob(2); time[2] = itob(0x10); + + READTRACK(); + + // skip head and sub, and go to the root directory record + dir = (struct iso_directory_record *)&buf[12 + 156]; + + mmssdd(dir->extent, (char*)time); + + READDIR(mdir); + + if (GetCdromFile(mdir, time, exename) == -1) return -1; + + READTRACK(); + + memcpy(head, buf + 12, sizeof(EXE_HEADER)); + size = head->t_size; + addr = head->t_addr; + + while (size) { + incTime(); + READTRACK(); + + memcpy((void *)PSXM(addr), buf + 12, 2048); + + size -= 2048; + addr += 2048; + } + + return 0; +} + +int CheckCdrom() { + struct iso_directory_record *dir; + unsigned char time[4], *buf; + unsigned char mdir[4096]; + char exename[256]; + int i, c; + + FreePPFCache(); + + time[0] = itob(0); + time[1] = itob(2); + time[2] = itob(0x10); + + READTRACK(); + + CdromLabel[0] = '\0'; + CdromId[0] = '\0'; + + strncpy(CdromLabel, buf + 52, 32); + + // skip head and sub, and go to the root directory record + dir = (struct iso_directory_record *)&buf[12 + 156]; + + mmssdd(dir->extent, (char *)time); + + READDIR(mdir); + + if (GetCdromFile(mdir, time, "SYSTEM.CNF;1") != -1) { + READTRACK(); + + sscanf((char *)buf + 12, "BOOT = cdrom:\\%256s", exename); + if (GetCdromFile(mdir, time, exename) == -1) { + sscanf((char *)buf + 12, "BOOT = cdrom:%256s", exename); + if (GetCdromFile(mdir, time, exename) == -1) { + char *ptr = strstr(buf + 12, "cdrom:"); // possibly the executable is in some subdir + if (ptr != NULL) { + ptr += 6; + while (*ptr == '\\' || *ptr == '/') ptr++; + strncpy(exename, ptr, 255); + exename[255] = '\0'; + ptr = exename; + while (*ptr != '\0' && *ptr != '\r' && *ptr != '\n') ptr++; + *ptr = '\0'; + if (GetCdromFile(mdir, time, exename) == -1) + return -1; // main executable not found + } else + return -1; + } + } + } else if (GetCdromFile(mdir, time, "PSX.EXE;1") != -1) { + strcpy(exename, "PSX.EXE;1"); + strcpy(CdromId, "SLUS99999"); + } else + return -1; // SYSTEM.CNF and PSX.EXE not found + + if (CdromId[0] == '\0') { + i = strlen(exename); + if (i >= 2) { + if (exename[i - 2] == ';') i-= 2; + c = 8; i--; + while (i >= 0 && c >= 0) { + if (isalnum(exename[i])) CdromId[c--] = exename[i]; + i--; + } + } + } + + if (Config.PsxAuto) { // autodetect system (pal or ntsc) + if (strstr(exename, "ES") != NULL) + Config.PsxType = PSX_TYPE_PAL; // pal + else Config.PsxType = PSX_TYPE_NTSC; // ntsc + } + + if (CdromLabel[0] == ' ') { + strncpy(CdromLabel, CdromId, 9); + } + SysPrintf(_("CD-ROM Label: %.32s\n"), CdromLabel); + SysPrintf(_("CD-ROM ID: %.9s\n"), CdromId); + + BuildPPFCache(); + + return 0; +} + +static int PSXGetFileType(FILE *f) { + unsigned long current; + u8 mybuf[2048]; + EXE_HEADER *exe_hdr; + FILHDR *coff_hdr; + + current = ftell(f); + fseek(f, 0L, SEEK_SET); + fread(mybuf, 2048, 1, f); + fseek(f, current, SEEK_SET); + + exe_hdr = (EXE_HEADER *)mybuf; + if (memcmp(exe_hdr->id, "PS-X EXE", 8) == 0) + return PSX_EXE; + + if (mybuf[0] == 'C' && mybuf[1] == 'P' && mybuf[2] == 'E') + return CPE_EXE; + + coff_hdr = (FILHDR *)mybuf; + if (SWAPu16(coff_hdr->f_magic) == 0x0162) + return COFF_EXE; + + return INVALID_EXE; +} + +int Load(const char *ExePath) { + FILE *tmpFile; + EXE_HEADER tmpHead; + int type; + int retval = 0; + u8 opcode; + u32 section_address, section_size; + + strncpy(CdromId, "SLUS99999", 9); + strncpy(CdromLabel, "SLUS_999.99", 11); + + tmpFile = fopen(ExePath, "rb"); + if (tmpFile == NULL) { + SysPrintf(_("Error opening file: %s.\n"), ExePath); + retval = -1; + } else { + type = PSXGetFileType(tmpFile); + switch (type) { + case PSX_EXE: + fread(&tmpHead,sizeof(EXE_HEADER),1,tmpFile); + fseek(tmpFile, 0x800, SEEK_SET); + fread((void *)PSXM(SWAP32(tmpHead.t_addr)), SWAP32(tmpHead.t_size),1,tmpFile); + fclose(tmpFile); + psxRegs.pc = SWAP32(tmpHead.pc0); + psxRegs.GPR.n.gp = SWAP32(tmpHead.gp0); + psxRegs.GPR.n.sp = SWAP32(tmpHead.s_addr); + if (psxRegs.GPR.n.sp == 0) + psxRegs.GPR.n.sp = 0x801fff00; + retval = 0; + break; + case CPE_EXE: + fseek(tmpFile, 6, SEEK_SET); /* Something tells me we should go to 4 and read the "08 00" here... */ + do { + fread(&opcode, 1, 1, tmpFile); + switch (opcode) { + case 1: /* Section loading */ + fread(§ion_address, 4, 1, tmpFile); + fread(§ion_size, 4, 1, tmpFile); + section_address = SWAPu32(section_address); + section_size = SWAPu32(section_size); +#ifdef EMU_LOG + EMU_LOG("Loading %08X bytes from %08X to %08X\n", section_size, ftell(tmpFile), section_address); +#endif + fread(PSXM(section_address), section_size, 1, tmpFile); + break; + case 3: /* register loading (PC only?) */ + fseek(tmpFile, 2, SEEK_CUR); /* unknown field */ + fread(&psxRegs.pc, 4, 1, tmpFile); + psxRegs.pc = SWAPu32(psxRegs.pc); + break; + case 0: /* End of file */ + break; + default: + SysPrintf(_("Unknown CPE opcode %02x at position %08x.\n"), opcode, ftell(tmpFile) - 1); + retval = -1; + break; + } + } while (opcode != 0 && retval == 0); + break; + case COFF_EXE: + SysPrintf(_("COFF files not supported.\n")); + retval = -1; + break; + case INVALID_EXE: + SysPrintf(_("This file does not appear to be a valid PSX file.\n")); + retval = -1; + break; + } + } + + if (retval != 0) { + CdromId[0] = '\0'; + CdromLabel[0] = '\0'; + } + + return retval; +} + +// STATES + +static const char PcsxHeader[32] = "STv4 PCSX v" PACKAGE_VERSION; + +// Savestate Versioning! +// If you make changes to the savestate version, please increment the value below. +static const u32 SaveVersion = 0x8b410004; + +int SaveState(const char *file) { + gzFile f; + GPUFreeze_t *gpufP; + SPUFreeze_t *spufP; + int Size; + unsigned char *pMem; + + f = gzopen(file, "wb"); + if (f == NULL) return -1; + + gzwrite(f, (void *)PcsxHeader, 32); + gzwrite(f, (void *)&SaveVersion, sizeof(u32)); + gzwrite(f, (void *)&Config.HLE, sizeof(boolean)); + + pMem = (unsigned char *)malloc(128 * 96 * 3); + if (pMem == NULL) return -1; + GPU_getScreenPic(pMem); + gzwrite(f, pMem, 128 * 96 * 3); + free(pMem); + + if (Config.HLE) + psxBiosFreeze(1); + + gzwrite(f, psxM, 0x00200000); + gzwrite(f, psxR, 0x00080000); + gzwrite(f, psxH, 0x00010000); + gzwrite(f, (void *)&psxRegs, sizeof(psxRegs)); + + // gpu + gpufP = (GPUFreeze_t *)malloc(sizeof(GPUFreeze_t)); + gpufP->ulFreezeVersion = 1; + GPU_freeze(1, gpufP); + gzwrite(f, gpufP, sizeof(GPUFreeze_t)); + free(gpufP); + + // spu + spufP = (SPUFreeze_t *) malloc(16); + SPU_freeze(2, spufP); + Size = spufP->Size; gzwrite(f, &Size, 4); + free(spufP); + spufP = (SPUFreeze_t *) malloc(Size); + SPU_freeze(1, spufP); + gzwrite(f, spufP, Size); + free(spufP); + + sioFreeze(f, 1); + cdrFreeze(f, 1); + psxHwFreeze(f, 1); + psxRcntFreeze(f, 1); + mdecFreeze(f, 1); + + gzclose(f); + + return 0; +} + +int LoadState(const char *file) { + gzFile f; + GPUFreeze_t *gpufP; + SPUFreeze_t *spufP; + int Size; + char header[32]; + u32 version; + boolean hle; + + f = gzopen(file, "rb"); + if (f == NULL) return -1; + + gzread(f, header, sizeof(header)); + gzread(f, &version, sizeof(u32)); + gzread(f, &hle, sizeof(boolean)); + + if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion || hle != Config.HLE) { + gzclose(f); + return -1; + } + + psxCpu->Reset(); + gzseek(f, 128 * 96 * 3, SEEK_CUR); + + gzread(f, psxM, 0x00200000); + gzread(f, psxR, 0x00080000); + gzread(f, psxH, 0x00010000); + gzread(f, (void *)&psxRegs, sizeof(psxRegs)); + + if (Config.HLE) + psxBiosFreeze(0); + + // gpu + gpufP = (GPUFreeze_t *)malloc(sizeof(GPUFreeze_t)); + gzread(f, gpufP, sizeof(GPUFreeze_t)); + GPU_freeze(0, gpufP); + free(gpufP); + + // spu + gzread(f, &Size, 4); + spufP = (SPUFreeze_t *)malloc(Size); + gzread(f, spufP, Size); + SPU_freeze(0, spufP); + free(spufP); + + sioFreeze(f, 0); + cdrFreeze(f, 0); + psxHwFreeze(f, 0); + psxRcntFreeze(f, 0); + mdecFreeze(f, 0); + + gzclose(f); + + return 0; +} + +int CheckState(const char *file) { + gzFile f; + char header[32]; + u32 version; + boolean hle; + + f = gzopen(file, "rb"); + if (f == NULL) return -1; + + gzread(f, header, sizeof(header)); + gzread(f, &version, sizeof(u32)); + gzread(f, &hle, sizeof(boolean)); + + gzclose(f); + + if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion || hle != Config.HLE) + return -1; + + return 0; +} + +// NET Function Helpers + +int SendPcsxInfo() { + if (NET_recvData == NULL || NET_sendData == NULL) + return 0; + + NET_sendData(&Config.Xa, sizeof(Config.Xa), PSE_NET_BLOCKING); + NET_sendData(&Config.Sio, sizeof(Config.Sio), PSE_NET_BLOCKING); + NET_sendData(&Config.SpuIrq, sizeof(Config.SpuIrq), PSE_NET_BLOCKING); + NET_sendData(&Config.RCntFix, sizeof(Config.RCntFix), PSE_NET_BLOCKING); + NET_sendData(&Config.PsxType, sizeof(Config.PsxType), PSE_NET_BLOCKING); + NET_sendData(&Config.Cpu, sizeof(Config.Cpu), PSE_NET_BLOCKING); + + return 0; +} + +int RecvPcsxInfo() { + int tmp; + + if (NET_recvData == NULL || NET_sendData == NULL) + return 0; + + NET_recvData(&Config.Xa, sizeof(Config.Xa), PSE_NET_BLOCKING); + NET_recvData(&Config.Sio, sizeof(Config.Sio), PSE_NET_BLOCKING); + NET_recvData(&Config.SpuIrq, sizeof(Config.SpuIrq), PSE_NET_BLOCKING); + NET_recvData(&Config.RCntFix, sizeof(Config.RCntFix), PSE_NET_BLOCKING); + NET_recvData(&Config.PsxType, sizeof(Config.PsxType), PSE_NET_BLOCKING); + + SysUpdate(); + + tmp = Config.Cpu; + NET_recvData(&Config.Cpu, sizeof(Config.Cpu), PSE_NET_BLOCKING); + if (tmp != Config.Cpu) { + psxCpu->Shutdown(); +#ifdef PSXREC + if (Config.Cpu == CPU_INTERPRETER) psxCpu = &psxInt; + else psxCpu = &psxRec; +#else + psxCpu = &psxInt; +#endif + if (psxCpu->Init() == -1) { + SysClose(); return -1; + } + psxCpu->Reset(); + } + + return 0; +} + +// remove the leading and trailing spaces in a string +void trim(char *str) { + int pos = 0; + char *dest = str; + + // skip leading blanks + while (str[pos] <= ' ' && str[pos] > 0) + pos++; + + while (str[pos]) { + *(dest++) = str[pos]; + pos++; + } + + *(dest--) = '\0'; // store the null + + // remove trailing blanks + while (dest >= str && *dest <= ' ' && *dest > 0) + *(dest--) = '\0'; +} + +// lookup table for crc calculation +static unsigned short crctab[256] = { + 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, 0x8108, + 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, 0x1231, 0x0210, + 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, 0x9339, 0x8318, 0xB37B, + 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE, 0x2462, 0x3443, 0x0420, 0x1401, + 0x64E6, 0x74C7, 0x44A4, 0x5485, 0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, + 0xF5CF, 0xC5AC, 0xD58D, 0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, + 0x5695, 0x46B4, 0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, + 0xC7BC, 0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823, + 0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B, 0x5AF5, + 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12, 0xDBFD, 0xCBDC, + 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A, 0x6CA6, 0x7C87, 0x4CE4, + 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41, 0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, + 0xAD2A, 0xBD0B, 0x8D68, 0x9D49, 0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, + 0x2E32, 0x1E51, 0x0E70, 0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, + 0x9F59, 0x8F78, 0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, + 0xE16F, 0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067, + 0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E, 0x02B1, + 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256, 0xB5EA, 0xA5CB, + 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D, 0x34E2, 0x24C3, 0x14A0, + 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xA7DB, 0xB7FA, 0x8799, 0x97B8, + 0xE75F, 0xF77E, 0xC71D, 0xD73C, 0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, + 0x7676, 0x4615, 0x5634, 0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, + 0xB98A, 0xA9AB, 0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, + 0x28A3, 0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A, + 0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92, 0xFD2E, + 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9, 0x7C26, 0x6C07, + 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1, 0xEF1F, 0xFF3E, 0xCF5D, + 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8, 0x6E17, 0x7E36, 0x4E55, 0x5E74, + 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0 +}; + +u16 calcCrc(u8 *d, int len) { + u16 crc = 0; + int i; + + for (i = 0; i < len; i++) { + crc = crctab[(crc >> 8) ^ d[i]] ^ (crc << 8); + } + + return ~crc; +} diff --git a/libpcsxcore/misc.h b/libpcsxcore/misc.h new file mode 100644 index 00000000..ae3fc81f --- /dev/null +++ b/libpcsxcore/misc.h @@ -0,0 +1,77 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __MISC_H__ +#define __MISC_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "coff.h" +#include "plugins.h" +#include "r3000a.h" +#include "psxmem.h" + +#undef s_addr + +typedef struct { + unsigned char id[8]; + u32 text; + u32 data; + u32 pc0; + u32 gp0; + u32 t_addr; + u32 t_size; + u32 d_addr; + u32 d_size; + u32 b_addr; + u32 b_size; + u32 s_addr; + u32 s_size; + u32 SavedSP; + u32 SavedFP; + u32 SavedGP; + u32 SavedRA; + u32 SavedS0; +} EXE_HEADER; + +extern char CdromId[10]; +extern char CdromLabel[33]; + +int LoadCdrom(); +int LoadCdromFile(const char *filename, EXE_HEADER *head); +int CheckCdrom(); +int Load(const char *ExePath); + +int SaveState(const char *file); +int LoadState(const char *file); +int CheckState(const char *file); + +int SendPcsxInfo(); +int RecvPcsxInfo(); + +void trim(char *str); +u16 calcCrc(u8 *d, int len); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c new file mode 100644 index 00000000..f965e0d0 --- /dev/null +++ b/libpcsxcore/plugins.c @@ -0,0 +1,815 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* Plugin library callback/access functions. +*/ + +#include "plugins.h" +#include "cdriso.h" + +static char IsoFile[MAXPATHLEN] = ""; +static s64 cdOpenCaseTime = 0; + +GPUupdateLace GPU_updateLace; +GPUinit GPU_init; +GPUshutdown GPU_shutdown; +GPUconfigure GPU_configure; +GPUtest GPU_test; +GPUabout GPU_about; +GPUopen GPU_open; +GPUclose GPU_close; +GPUreadStatus GPU_readStatus; +GPUreadData GPU_readData; +GPUreadDataMem GPU_readDataMem; +GPUwriteStatus GPU_writeStatus; +GPUwriteData GPU_writeData; +GPUwriteDataMem GPU_writeDataMem; +GPUdmaChain GPU_dmaChain; +GPUkeypressed GPU_keypressed; +GPUdisplayText GPU_displayText; +GPUmakeSnapshot GPU_makeSnapshot; +GPUfreeze GPU_freeze; +GPUgetScreenPic GPU_getScreenPic; +GPUshowScreenPic GPU_showScreenPic; +GPUclearDynarec GPU_clearDynarec; +GPUvBlank GPU_vBlank; + +CDRinit CDR_init; +CDRshutdown CDR_shutdown; +CDRopen CDR_open; +CDRclose CDR_close; +CDRtest CDR_test; +CDRgetTN CDR_getTN; +CDRgetTD CDR_getTD; +CDRreadTrack CDR_readTrack; +CDRgetBuffer CDR_getBuffer; +CDRplay CDR_play; +CDRstop CDR_stop; +CDRgetStatus CDR_getStatus; +CDRgetDriveLetter CDR_getDriveLetter; +CDRgetBufferSub CDR_getBufferSub; +CDRconfigure CDR_configure; +CDRabout CDR_about; +CDRsetfilename CDR_setfilename; +CDRreadCDDA CDR_readCDDA; +CDRgetTE CDR_getTE; + +SPUconfigure SPU_configure; +SPUabout SPU_about; +SPUinit SPU_init; +SPUshutdown SPU_shutdown; +SPUtest SPU_test; +SPUopen SPU_open; +SPUclose SPU_close; +SPUplaySample SPU_playSample; +SPUwriteRegister SPU_writeRegister; +SPUreadRegister SPU_readRegister; +SPUwriteDMA SPU_writeDMA; +SPUreadDMA SPU_readDMA; +SPUwriteDMAMem SPU_writeDMAMem; +SPUreadDMAMem SPU_readDMAMem; +SPUplayADPCMchannel SPU_playADPCMchannel; +SPUfreeze SPU_freeze; +SPUregisterCallback SPU_registerCallback; +SPUasync SPU_async; +SPUplayCDDAchannel SPU_playCDDAchannel; + +PADconfigure PAD1_configure; +PADabout PAD1_about; +PADinit PAD1_init; +PADshutdown PAD1_shutdown; +PADtest PAD1_test; +PADopen PAD1_open; +PADclose PAD1_close; +PADquery PAD1_query; +PADreadPort1 PAD1_readPort1; +PADkeypressed PAD1_keypressed; +PADstartPoll PAD1_startPoll; +PADpoll PAD1_poll; +PADsetSensitive PAD1_setSensitive; + +PADconfigure PAD2_configure; +PADabout PAD2_about; +PADinit PAD2_init; +PADshutdown PAD2_shutdown; +PADtest PAD2_test; +PADopen PAD2_open; +PADclose PAD2_close; +PADquery PAD2_query; +PADreadPort2 PAD2_readPort2; +PADkeypressed PAD2_keypressed; +PADstartPoll PAD2_startPoll; +PADpoll PAD2_poll; +PADsetSensitive PAD2_setSensitive; + +NETinit NET_init; +NETshutdown NET_shutdown; +NETopen NET_open; +NETclose NET_close; +NETtest NET_test; +NETconfigure NET_configure; +NETabout NET_about; +NETpause NET_pause; +NETresume NET_resume; +NETqueryPlayer NET_queryPlayer; +NETsendData NET_sendData; +NETrecvData NET_recvData; +NETsendPadData NET_sendPadData; +NETrecvPadData NET_recvPadData; +NETsetInfo NET_setInfo; +NETkeypressed NET_keypressed; + +#ifdef ENABLE_SIO1API + +SIO1init SIO1_init; +SIO1shutdown SIO1_shutdown; +SIO1open SIO1_open; +SIO1close SIO1_close; +SIO1test SIO1_test; +SIO1configure SIO1_configure; +SIO1about SIO1_about; +SIO1pause SIO1_pause; +SIO1resume SIO1_resume; +SIO1keypressed SIO1_keypressed; +SIO1writeData8 SIO1_writeData8; +SIO1writeData16 SIO1_writeData16; +SIO1writeData32 SIO1_writeData32; +SIO1writeStat16 SIO1_writeStat16; +SIO1writeStat32 SIO1_writeStat32; +SIO1writeMode16 SIO1_writeMode16; +SIO1writeMode32 SIO1_writeMode32; +SIO1writeCtrl16 SIO1_writeCtrl16; +SIO1writeCtrl32 SIO1_writeCtrl32; +SIO1writeBaud16 SIO1_writeBaud16; +SIO1writeBaud32 SIO1_writeBaud32; +SIO1readData8 SIO1_readData8; +SIO1readData16 SIO1_readData16; +SIO1readData32 SIO1_readData32; +SIO1readStat16 SIO1_readStat16; +SIO1readStat32 SIO1_readStat32; +SIO1readMode16 SIO1_readMode16; +SIO1readMode32 SIO1_readMode32; +SIO1readCtrl16 SIO1_readCtrl16; +SIO1readCtrl32 SIO1_readCtrl32; +SIO1readBaud16 SIO1_readBaud16; +SIO1readBaud32 SIO1_readBaud32; +SIO1registerCallback SIO1_registerCallback; + +#endif + +static const char *err; + +#define CheckErr(func) { \ + err = SysLibError(); \ + if (err != NULL) { SysMessage(_("Error loading %s: %s"), func, err); return -1; } \ +} + +#define LoadSym(dest, src, name, checkerr) { \ + dest = (src)SysLoadSym(drv, name); \ + if (checkerr) { CheckErr(name); } else SysLibError(); \ +} + +void *hGPUDriver = NULL; + +void CALLBACK GPU__displayText(char *pText) { + SysPrintf("%s\n", pText); +} + +long CALLBACK GPU__configure(void) { return 0; } +long CALLBACK GPU__test(void) { return 0; } +void CALLBACK GPU__about(void) {} +void CALLBACK GPU__makeSnapshot(void) {} +void CALLBACK GPU__keypressed(int key) {} +long CALLBACK GPU__getScreenPic(unsigned char *pMem) { return -1; } +long CALLBACK GPU__showScreenPic(unsigned char *pMem) { return -1; } +void CALLBACK GPU__clearDynarec(void (CALLBACK *callback)(void)) {} +void CALLBACK GPU__vBlank(int val) {} + +#define LoadGpuSym1(dest, name) \ + LoadSym(GPU_##dest, GPU##dest, name, TRUE); + +#define LoadGpuSym0(dest, name) \ + LoadSym(GPU_##dest, GPU##dest, name, FALSE); \ + if (GPU_##dest == NULL) GPU_##dest = (GPU##dest) GPU__##dest; + +#define LoadGpuSymN(dest, name) \ + LoadSym(GPU_##dest, GPU##dest, name, FALSE); + +static int LoadGPUplugin(const char *GPUdll) { + void *drv; + + hGPUDriver = SysLoadLibrary(GPUdll); + if (hGPUDriver == NULL) { + GPU_configure = NULL; + SysMessage (_("Could not load GPU plugin %s!"), GPUdll); return -1; + } + drv = hGPUDriver; + LoadGpuSym1(init, "GPUinit"); + LoadGpuSym1(shutdown, "GPUshutdown"); + LoadGpuSym1(open, "GPUopen"); + LoadGpuSym1(close, "GPUclose"); + LoadGpuSym1(readData, "GPUreadData"); + LoadGpuSym1(readDataMem, "GPUreadDataMem"); + LoadGpuSym1(readStatus, "GPUreadStatus"); + LoadGpuSym1(writeData, "GPUwriteData"); + LoadGpuSym1(writeDataMem, "GPUwriteDataMem"); + LoadGpuSym1(writeStatus, "GPUwriteStatus"); + LoadGpuSym1(dmaChain, "GPUdmaChain"); + LoadGpuSym1(updateLace, "GPUupdateLace"); + LoadGpuSym0(keypressed, "GPUkeypressed"); + LoadGpuSym0(displayText, "GPUdisplayText"); + LoadGpuSym0(makeSnapshot, "GPUmakeSnapshot"); + LoadGpuSym1(freeze, "GPUfreeze"); + LoadGpuSym0(getScreenPic, "GPUgetScreenPic"); + LoadGpuSym0(showScreenPic, "GPUshowScreenPic"); + LoadGpuSym0(clearDynarec, "GPUclearDynarec"); + LoadGpuSym0(vBlank, "GPUvBlank"); + LoadGpuSym0(configure, "GPUconfigure"); + LoadGpuSym0(test, "GPUtest"); + LoadGpuSym0(about, "GPUabout"); + + return 0; +} + +void *hCDRDriver = NULL; + +long CALLBACK CDR__play(unsigned char *sector) { return 0; } +long CALLBACK CDR__stop(void) { return 0; } + +long CALLBACK CDR__getStatus(struct CdrStat *stat) { + if (cdOpenCaseTime < 0 || cdOpenCaseTime > (s64)time(NULL)) + stat->Status = 0x10; + else + stat->Status = 0; + + return 0; +} + +char* CALLBACK CDR__getDriveLetter(void) { return NULL; } +long CALLBACK CDR__configure(void) { return 0; } +long CALLBACK CDR__test(void) { return 0; } +void CALLBACK CDR__about(void) {} +long CALLBACK CDR__setfilename(char*filename) { return 0; } + +#define LoadCdrSym1(dest, name) \ + LoadSym(CDR_##dest, CDR##dest, name, TRUE); + +#define LoadCdrSym0(dest, name) \ + LoadSym(CDR_##dest, CDR##dest, name, FALSE); \ + if (CDR_##dest == NULL) CDR_##dest = (CDR##dest) CDR__##dest; + +#define LoadCdrSymN(dest, name) \ + LoadSym(CDR_##dest, CDR##dest, name, FALSE); + +static int LoadCDRplugin(const char *CDRdll) { + void *drv; + + if (CDRdll == NULL) { + cdrIsoInit(); + return 0; + } + + hCDRDriver = SysLoadLibrary(CDRdll); + if (hCDRDriver == NULL) { + CDR_configure = NULL; + SysMessage (_("Could not load CD-ROM plugin %s!"), CDRdll); return -1; + } + drv = hCDRDriver; + LoadCdrSym1(init, "CDRinit"); + LoadCdrSym1(shutdown, "CDRshutdown"); + LoadCdrSym1(open, "CDRopen"); + LoadCdrSym1(close, "CDRclose"); + LoadCdrSym1(getTN, "CDRgetTN"); + LoadCdrSym1(getTD, "CDRgetTD"); + LoadCdrSym1(readTrack, "CDRreadTrack"); + LoadCdrSym1(getBuffer, "CDRgetBuffer"); + LoadCdrSym1(getBufferSub, "CDRgetBufferSub"); + LoadCdrSym0(play, "CDRplay"); + LoadCdrSym0(stop, "CDRstop"); + LoadCdrSym0(getStatus, "CDRgetStatus"); + LoadCdrSym0(getDriveLetter, "CDRgetDriveLetter"); + LoadCdrSym0(configure, "CDRconfigure"); + LoadCdrSym0(test, "CDRtest"); + LoadCdrSym0(about, "CDRabout"); + LoadCdrSym0(setfilename, "CDRsetfilename"); + LoadCdrSymN(readCDDA, "CDRreadCDDA"); + LoadCdrSymN(getTE, "CDRgetTE"); + + return 0; +} + +void *hSPUDriver = NULL; + +long CALLBACK SPU__configure(void) { return 0; } +void CALLBACK SPU__about(void) {} +long CALLBACK SPU__test(void) { return 0; } + +#define LoadSpuSym1(dest, name) \ + LoadSym(SPU_##dest, SPU##dest, name, TRUE); + +#define LoadSpuSym0(dest, name) \ + LoadSym(SPU_##dest, SPU##dest, name, FALSE); \ + if (SPU_##dest == NULL) SPU_##dest = (SPU##dest) SPU__##dest; + +#define LoadSpuSymN(dest, name) \ + LoadSym(SPU_##dest, SPU##dest, name, FALSE); + +static int LoadSPUplugin(const char *SPUdll) { + void *drv; + + hSPUDriver = SysLoadLibrary(SPUdll); + if (hSPUDriver == NULL) { + SPU_configure = NULL; + SysMessage (_("Could not load SPU plugin %s!"), SPUdll); return -1; + } + drv = hSPUDriver; + LoadSpuSym1(init, "SPUinit"); + LoadSpuSym1(shutdown, "SPUshutdown"); + LoadSpuSym1(open, "SPUopen"); + LoadSpuSym1(close, "SPUclose"); + LoadSpuSym0(configure, "SPUconfigure"); + LoadSpuSym0(about, "SPUabout"); + LoadSpuSym0(test, "SPUtest"); + LoadSpuSym1(writeRegister, "SPUwriteRegister"); + LoadSpuSym1(readRegister, "SPUreadRegister"); + LoadSpuSym1(writeDMA, "SPUwriteDMA"); + LoadSpuSym1(readDMA, "SPUreadDMA"); + LoadSpuSym1(writeDMAMem, "SPUwriteDMAMem"); + LoadSpuSym1(readDMAMem, "SPUreadDMAMem"); + LoadSpuSym1(playADPCMchannel, "SPUplayADPCMchannel"); + LoadSpuSym1(freeze, "SPUfreeze"); + LoadSpuSym1(registerCallback, "SPUregisterCallback"); + LoadSpuSymN(async, "SPUasync"); + LoadSpuSymN(playCDDAchannel, "SPUplayCDDAchannel"); + + return 0; +} + +void *hPAD1Driver = NULL; +void *hPAD2Driver = NULL; + +static unsigned char buf[256]; +unsigned char stdpar[10] = { 0x00, 0x41, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +unsigned char mousepar[8] = { 0x00, 0x12, 0x5a, 0xff, 0xff, 0xff, 0xff }; +unsigned char analogpar[9] = { 0x00, 0xff, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + +static int bufcount, bufc; + +PadDataS padd1, padd2; + +unsigned char _PADstartPoll(PadDataS *pad) { + bufc = 0; + + switch (pad->controllerType) { + case PSE_PAD_TYPE_MOUSE: + mousepar[3] = pad->buttonStatus & 0xff; + mousepar[4] = pad->buttonStatus >> 8; + mousepar[5] = pad->moveX; + mousepar[6] = pad->moveY; + + memcpy(buf, mousepar, 7); + bufcount = 6; + break; + case PSE_PAD_TYPE_NEGCON: // npc101/npc104(slph00001/slph00069) + analogpar[1] = 0x23; + analogpar[3] = pad->buttonStatus & 0xff; + analogpar[4] = pad->buttonStatus >> 8; + analogpar[5] = pad->rightJoyX; + analogpar[6] = pad->rightJoyY; + analogpar[7] = pad->leftJoyX; + analogpar[8] = pad->leftJoyY; + + memcpy(buf, analogpar, 9); + bufcount = 8; + break; + case PSE_PAD_TYPE_ANALOGPAD: // scph1150 + analogpar[1] = 0x73; + analogpar[3] = pad->buttonStatus & 0xff; + analogpar[4] = pad->buttonStatus >> 8; + analogpar[5] = pad->rightJoyX; + analogpar[6] = pad->rightJoyY; + analogpar[7] = pad->leftJoyX; + analogpar[8] = pad->leftJoyY; + + memcpy(buf, analogpar, 9); + bufcount = 8; + break; + case PSE_PAD_TYPE_ANALOGJOY: // scph1110 + analogpar[1] = 0x53; + analogpar[3] = pad->buttonStatus & 0xff; + analogpar[4] = pad->buttonStatus >> 8; + analogpar[5] = pad->rightJoyX; + analogpar[6] = pad->rightJoyY; + analogpar[7] = pad->leftJoyX; + analogpar[8] = pad->leftJoyY; + + memcpy(buf, analogpar, 9); + bufcount = 8; + break; + case PSE_PAD_TYPE_STANDARD: + default: + stdpar[3] = pad->buttonStatus & 0xff; + stdpar[4] = pad->buttonStatus >> 8; + + memcpy(buf, stdpar, 5); + bufcount = 4; + } + + return buf[bufc++]; +} + +unsigned char _PADpoll(unsigned char value) { + if (bufc > bufcount) return 0; + return buf[bufc++]; +} + +unsigned char CALLBACK PAD1__startPoll(int pad) { + PadDataS padd; + + PAD1_readPort1(&padd); + + return _PADstartPoll(&padd); +} + +unsigned char CALLBACK PAD1__poll(unsigned char value) { + return _PADpoll(value); +} + +long CALLBACK PAD1__configure(void) { return 0; } +void CALLBACK PAD1__about(void) {} +long CALLBACK PAD1__test(void) { return 0; } +long CALLBACK PAD1__query(void) { return 3; } +long CALLBACK PAD1__keypressed() { return 0; } + +#define LoadPad1Sym1(dest, name) \ + LoadSym(PAD1_##dest, PAD##dest, name, TRUE); + +#define LoadPad1SymN(dest, name) \ + LoadSym(PAD1_##dest, PAD##dest, name, FALSE); + +#define LoadPad1Sym0(dest, name) \ + LoadSym(PAD1_##dest, PAD##dest, name, FALSE); \ + if (PAD1_##dest == NULL) PAD1_##dest = (PAD##dest) PAD1__##dest; + +static int LoadPAD1plugin(const char *PAD1dll) { + void *drv; + + hPAD1Driver = SysLoadLibrary(PAD1dll); + if (hPAD1Driver == NULL) { + PAD1_configure = NULL; + SysMessage (_("Could not load Controller 1 plugin %s!"), PAD1dll); return -1; + } + drv = hPAD1Driver; + LoadPad1Sym1(init, "PADinit"); + LoadPad1Sym1(shutdown, "PADshutdown"); + LoadPad1Sym1(open, "PADopen"); + LoadPad1Sym1(close, "PADclose"); + LoadPad1Sym0(query, "PADquery"); + LoadPad1Sym1(readPort1, "PADreadPort1"); + LoadPad1Sym0(configure, "PADconfigure"); + LoadPad1Sym0(test, "PADtest"); + LoadPad1Sym0(about, "PADabout"); + LoadPad1Sym0(keypressed, "PADkeypressed"); + LoadPad1Sym0(startPoll, "PADstartPoll"); + LoadPad1Sym0(poll, "PADpoll"); + LoadPad1SymN(setSensitive, "PADsetSensitive"); + + return 0; +} + +unsigned char CALLBACK PAD2__startPoll(int pad) { + PadDataS padd; + + PAD2_readPort2(&padd); + + return _PADstartPoll(&padd); +} + +unsigned char CALLBACK PAD2__poll(unsigned char value) { + return _PADpoll(value); +} + +long CALLBACK PAD2__configure(void) { return 0; } +void CALLBACK PAD2__about(void) {} +long CALLBACK PAD2__test(void) { return 0; } +long CALLBACK PAD2__query(void) { return PSE_PAD_USE_PORT1 | PSE_PAD_USE_PORT2; } +long CALLBACK PAD2__keypressed() { return 0; } + +#define LoadPad2Sym1(dest, name) \ + LoadSym(PAD2_##dest, PAD##dest, name, TRUE); + +#define LoadPad2Sym0(dest, name) \ + LoadSym(PAD2_##dest, PAD##dest, name, FALSE); \ + if (PAD2_##dest == NULL) PAD2_##dest = (PAD##dest) PAD2__##dest; + +#define LoadPad2SymN(dest, name) \ + LoadSym(PAD2_##dest, PAD##dest, name, FALSE); + +static int LoadPAD2plugin(const char *PAD2dll) { + void *drv; + + hPAD2Driver = SysLoadLibrary(PAD2dll); + if (hPAD2Driver == NULL) { + PAD2_configure = NULL; + SysMessage (_("Could not load Controller 2 plugin %s!"), PAD2dll); return -1; + } + drv = hPAD2Driver; + LoadPad2Sym1(init, "PADinit"); + LoadPad2Sym1(shutdown, "PADshutdown"); + LoadPad2Sym1(open, "PADopen"); + LoadPad2Sym1(close, "PADclose"); + LoadPad2Sym0(query, "PADquery"); + LoadPad2Sym1(readPort2, "PADreadPort2"); + LoadPad2Sym0(configure, "PADconfigure"); + LoadPad2Sym0(test, "PADtest"); + LoadPad2Sym0(about, "PADabout"); + LoadPad2Sym0(keypressed, "PADkeypressed"); + LoadPad2Sym0(startPoll, "PADstartPoll"); + LoadPad2Sym0(poll, "PADpoll"); + LoadPad2SymN(setSensitive, "PADsetSensitive"); + + return 0; +} + +void *hNETDriver = NULL; + +void CALLBACK NET__setInfo(netInfo *info) {} +void CALLBACK NET__keypressed(int key) {} +long CALLBACK NET__configure(void) { return 0; } +long CALLBACK NET__test(void) { return 0; } +void CALLBACK NET__about(void) {} + +#define LoadNetSym1(dest, name) \ + LoadSym(NET_##dest, NET##dest, name, TRUE); + +#define LoadNetSymN(dest, name) \ + LoadSym(NET_##dest, NET##dest, name, FALSE); + +#define LoadNetSym0(dest, name) \ + LoadSym(NET_##dest, NET##dest, name, FALSE); \ + if (NET_##dest == NULL) NET_##dest = (NET##dest) NET__##dest; + +static int LoadNETplugin(const char *NETdll) { + void *drv; + + hNETDriver = SysLoadLibrary(NETdll); + if (hNETDriver == NULL) { + SysMessage (_("Could not load NetPlay plugin %s!"), NETdll); return -1; + } + drv = hNETDriver; + LoadNetSym1(init, "NETinit"); + LoadNetSym1(shutdown, "NETshutdown"); + LoadNetSym1(open, "NETopen"); + LoadNetSym1(close, "NETclose"); + LoadNetSymN(sendData, "NETsendData"); + LoadNetSymN(recvData, "NETrecvData"); + LoadNetSym1(sendPadData, "NETsendPadData"); + LoadNetSym1(recvPadData, "NETrecvPadData"); + LoadNetSym1(queryPlayer, "NETqueryPlayer"); + LoadNetSym1(pause, "NETpause"); + LoadNetSym1(resume, "NETresume"); + LoadNetSym0(setInfo, "NETsetInfo"); + LoadNetSym0(keypressed, "NETkeypressed"); + LoadNetSym0(configure, "NETconfigure"); + LoadNetSym0(test, "NETtest"); + LoadNetSym0(about, "NETabout"); + + return 0; +} + +#ifdef ENABLE_SIO1API + +void *hSIO1Driver = NULL; + +long CALLBACK SIO1__init(void) { return 0; } +long CALLBACK SIO1__shutdown(void) { return 0; } +long CALLBACK SIO1__open(void) { return 0; } +long CALLBACK SIO1__close(void) { return 0; } +long CALLBACK SIO1__configure(void) { return 0; } +long CALLBACK SIO1__test(void) { return 0; } +void CALLBACK SIO1__about(void) {} +void CALLBACK SIO1__pause(void) {} +void CALLBACK SIO1__resume(void) {} +long CALLBACK SIO1__keypressed(int key) { return 0; } +void CALLBACK SIO1__writeData8(unsigned char val) {} +void CALLBACK SIO1__writeData16(unsigned short val) {} +void CALLBACK SIO1__writeData32(unsigned long val) {} +void CALLBACK SIO1__writeStat16(unsigned short val) {} +void CALLBACK SIO1__writeStat32(unsigned long val) {} +void CALLBACK SIO1__writeMode16(unsigned short val) {} +void CALLBACK SIO1__writeMode32(unsigned long val) {} +void CALLBACK SIO1__writeCtrl16(unsigned short val) {} +void CALLBACK SIO1__writeCtrl32(unsigned long val) {} +void CALLBACK SIO1__writeBaud16(unsigned short val) {} +void CALLBACK SIO1__writeBaud32(unsigned long val) {} +unsigned char CALLBACK SIO1__readData8(void) { return 0; } +unsigned short CALLBACK SIO1__readData16(void) { return 0; } +unsigned long CALLBACK SIO1__readData32(void) { return 0; } +unsigned short CALLBACK SIO1__readStat16(void) { return 0; } +unsigned long CALLBACK SIO1__readStat32(void) { return 0; } +unsigned short CALLBACK SIO1__readMode16(void) { return 0; } +unsigned long CALLBACK SIO1__readMode32(void) { return 0; } +unsigned short CALLBACK SIO1__readCtrl16(void) { return 0; } +unsigned long CALLBACK SIO1__readCtrl32(void) { return 0; } +unsigned short CALLBACK SIO1__readBaud16(void) { return 0; } +unsigned long CALLBACK SIO1__readBaud32(void) { return 0; } +void CALLBACK SIO1__registerCallback(void (CALLBACK *callback)(void)) {}; + +void CALLBACK SIO1irq(void) { + psxHu32ref(0x1070) |= SWAPu32(0x100); +} + +#define LoadSio1Sym1(dest, name) \ + LoadSym(SIO1_##dest, SIO1##dest, name, TRUE); + +#define LoadSio1SymN(dest, name) \ + LoadSym(SIO1_##dest, SIO1##dest, name, FALSE); + +#define LoadSio1Sym0(dest, name) \ + LoadSym(SIO1_##dest, SIO1##dest, name, FALSE); \ + if (SIO1_##dest == NULL) SIO1_##dest = (SIO1##dest) SIO1__##dest; + +static int LoadSIO1plugin(const char *SIO1dll) { + void *drv; + + hSIO1Driver = SysLoadLibrary(SIO1dll); + if (hSIO1Driver == NULL) { + SysMessage (_("Could not load SIO1 plugin %s!"), SIO1dll); return -1; + } + drv = hSIO1Driver; + + LoadSio1Sym0(init, "SIO1init"); + LoadSio1Sym0(shutdown, "SIO1shutdown"); + LoadSio1Sym0(open, "SIO1open"); + LoadSio1Sym0(close, "SIO1close"); + LoadSio1Sym0(pause, "SIO1pause"); + LoadSio1Sym0(resume, "SIO1resume"); + LoadSio1Sym0(keypressed, "SIO1keypressed"); + LoadSio1Sym0(configure, "SIO1configure"); + LoadSio1Sym0(test, "SIO1test"); + LoadSio1Sym0(about, "SIO1about"); + LoadSio1Sym0(writeData8, "SIO1writeData8"); + LoadSio1Sym0(writeData16, "SIO1writeData16"); + LoadSio1Sym0(writeData32, "SIO1writeData32"); + LoadSio1Sym0(writeStat16, "SIO1writeStat16"); + LoadSio1Sym0(writeStat32, "SIO1writeStat32"); + LoadSio1Sym0(writeMode16, "SIO1writeMode16"); + LoadSio1Sym0(writeMode32, "SIO1writeMode32"); + LoadSio1Sym0(writeCtrl16, "SIO1writeCtrl16"); + LoadSio1Sym0(writeCtrl32, "SIO1writeCtrl32"); + LoadSio1Sym0(writeBaud16, "SIO1writeBaud16"); + LoadSio1Sym0(writeBaud32, "SIO1writeBaud32"); + LoadSio1Sym0(readData16, "SIO1readData16"); + LoadSio1Sym0(readData32, "SIO1readData32"); + LoadSio1Sym0(readStat16, "SIO1readStat16"); + LoadSio1Sym0(readStat32, "SIO1readStat32"); + LoadSio1Sym0(readMode16, "SIO1readMode16"); + LoadSio1Sym0(readMode32, "SIO1readMode32"); + LoadSio1Sym0(readCtrl16, "SIO1readCtrl16"); + LoadSio1Sym0(readCtrl32, "SIO1readCtrl32"); + LoadSio1Sym0(readBaud16, "SIO1readBaud16"); + LoadSio1Sym0(readBaud32, "SIO1readBaud32"); + LoadSio1Sym0(registerCallback, "SIO1registerCallback"); + + return 0; +} + +#endif + +void CALLBACK clearDynarec(void) { + psxCpu->Reset(); +} + +int LoadPlugins() { + int ret; + char Plugin[MAXPATHLEN]; + + ReleasePlugins(); + + if (UsingIso()) { + LoadCDRplugin(NULL); + } else { + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Cdr); + if (LoadCDRplugin(Plugin) == -1) return -1; + } + + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Gpu); + if (LoadGPUplugin(Plugin) == -1) return -1; + + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Spu); + if (LoadSPUplugin(Plugin) == -1) return -1; + + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Pad1); + if (LoadPAD1plugin(Plugin) == -1) return -1; + + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Pad2); + if (LoadPAD2plugin(Plugin) == -1) return -1; + + if (strcmp("Disabled", Config.Net) == 0 || strcmp("", Config.Net) == 0) + Config.UseNet = FALSE; + else { + Config.UseNet = TRUE; + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Net); + if (LoadNETplugin(Plugin) == -1) Config.UseNet = FALSE; + } + +#ifdef ENABLE_SIO1API + sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Sio1); + if (LoadSIO1plugin(Plugin) == -1) return -1; +#endif + + ret = CDR_init(); + if (ret < 0) { SysMessage (_("Error initializing CD-ROM plugin: %d"), ret); return -1; } + ret = GPU_init(); + if (ret < 0) { SysMessage (_("Error initializing GPU plugin: %d"), ret); return -1; } + ret = SPU_init(); + if (ret < 0) { SysMessage (_("Error initializing SPU plugin: %d"), ret); return -1; } + ret = PAD1_init(1); + if (ret < 0) { SysMessage (_("Error initializing Controller 1 plugin: %d"), ret); return -1; } + ret = PAD2_init(2); + if (ret < 0) { SysMessage (_("Error initializing Controller 2 plugin: %d"), ret); return -1; } + + if (Config.UseNet) { + ret = NET_init(); + if (ret < 0) { SysMessage (_("Error initializing NetPlay plugin: %d"), ret); return -1; } + } + +#ifdef ENABLE_SIO1API + ret = SIO1_init(); + if (ret < 0) { SysMessage (_("Error initializing SIO1 plugin: %d"), ret); return -1; } +#endif + + SysPrintf(_("Plugins loaded.\n")); + return 0; +} + +void ReleasePlugins() { + if (Config.UseNet) { + int ret = NET_close(); + if (ret < 0) Config.UseNet = FALSE; + } + NetOpened = FALSE; + + if (hCDRDriver != NULL || cdrIsoActive()) CDR_shutdown(); + if (hGPUDriver != NULL) GPU_shutdown(); + if (hSPUDriver != NULL) SPU_shutdown(); + if (hPAD1Driver != NULL) PAD1_shutdown(); + if (hPAD2Driver != NULL) PAD2_shutdown(); + + if (Config.UseNet && hNETDriver != NULL) NET_shutdown(); + + if (hCDRDriver != NULL) SysCloseLibrary(hCDRDriver); hCDRDriver = NULL; + if (hGPUDriver != NULL) SysCloseLibrary(hGPUDriver); hGPUDriver = NULL; + if (hSPUDriver != NULL) SysCloseLibrary(hSPUDriver); hSPUDriver = NULL; + if (hPAD1Driver != NULL) SysCloseLibrary(hPAD1Driver); hPAD1Driver = NULL; + if (hPAD2Driver != NULL) SysCloseLibrary(hPAD2Driver); hPAD2Driver = NULL; + + if (Config.UseNet && hNETDriver != NULL) { + SysCloseLibrary(hNETDriver); hNETDriver = NULL; + } + +#ifdef ENABLE_SIO1API + if (hSIO1Driver != NULL) { + SIO1_shutdown(); + SysCloseLibrary(hSIO1Driver); + hSIO1Driver = NULL; + } +#endif +} + +void SetIsoFile(const char *filename) { + if (filename == NULL) { + IsoFile[0] = '\0'; + return; + } + strncpy(IsoFile, filename, MAXPATHLEN); +} + +const char *GetIsoFile(void) { + return IsoFile; +} + +boolean UsingIso(void) { + return (IsoFile[0] != '\0'); +} + +void SetCdOpenCaseTime(s64 time) { + cdOpenCaseTime = time; +} diff --git a/libpcsxcore/plugins.h b/libpcsxcore/plugins.h new file mode 100644 index 00000000..9c24ecef --- /dev/null +++ b/libpcsxcore/plugins.h @@ -0,0 +1,411 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __PLUGINS_H__ +#define __PLUGINS_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" + +//#define ENABLE_SIO1API 1 + +#ifndef _WIN32 + +typedef void* HWND; +#define CALLBACK + +typedef long (*GPUopen)(unsigned long *, char *, char *); +typedef long (*SPUopen)(void); +typedef long (*PADopen)(unsigned long *); +typedef long (*NETopen)(unsigned long *); +typedef long (*SIO1open)(unsigned long *); + +#else + +#include + +typedef long (CALLBACK* GPUopen)(HWND); +typedef long (CALLBACK* SPUopen)(HWND); +typedef long (CALLBACK* PADopen)(HWND); +typedef long (CALLBACK* NETopen)(HWND); +typedef long (CALLBACK* SIO1open)(HWND); + +#endif + +#include "spu.h" + +#include "psemu_plugin_defs.h" +#include "decode_xa.h" + +int LoadPlugins(); +void ReleasePlugins(); +int OpenPlugins(); +void ClosePlugins(); + +typedef unsigned long (CALLBACK* PSEgetLibType)(void); +typedef unsigned long (CALLBACK* PSEgetLibVersion)(void); +typedef char *(CALLBACK* PSEgetLibName)(void); + +// GPU Functions +typedef long (CALLBACK* GPUinit)(void); +typedef long (CALLBACK* GPUshutdown)(void); +typedef long (CALLBACK* GPUclose)(void); +typedef void (CALLBACK* GPUwriteStatus)(uint32_t); +typedef void (CALLBACK* GPUwriteData)(uint32_t); +typedef void (CALLBACK* GPUwriteDataMem)(uint32_t *, int); +typedef uint32_t (CALLBACK* GPUreadStatus)(void); +typedef uint32_t (CALLBACK* GPUreadData)(void); +typedef void (CALLBACK* GPUreadDataMem)(uint32_t *, int); +typedef long (CALLBACK* GPUdmaChain)(uint32_t *,uint32_t); +typedef void (CALLBACK* GPUupdateLace)(void); +typedef long (CALLBACK* GPUconfigure)(void); +typedef long (CALLBACK* GPUtest)(void); +typedef void (CALLBACK* GPUabout)(void); +typedef void (CALLBACK* GPUmakeSnapshot)(void); +typedef void (CALLBACK* GPUkeypressed)(int); +typedef void (CALLBACK* GPUdisplayText)(char *); +typedef struct { + uint32_t ulFreezeVersion; + uint32_t ulStatus; + uint32_t ulControl[256]; + unsigned char psxVRam[1024*512*2]; +} GPUFreeze_t; +typedef long (CALLBACK* GPUfreeze)(uint32_t, GPUFreeze_t *); +typedef long (CALLBACK* GPUgetScreenPic)(unsigned char *); +typedef long (CALLBACK* GPUshowScreenPic)(unsigned char *); +typedef void (CALLBACK* GPUclearDynarec)(void (CALLBACK *callback)(void)); +typedef void (CALLBACK* GPUvBlank)(int); + +// GPU function pointers +extern GPUupdateLace GPU_updateLace; +extern GPUinit GPU_init; +extern GPUshutdown GPU_shutdown; +extern GPUconfigure GPU_configure; +extern GPUtest GPU_test; +extern GPUabout GPU_about; +extern GPUopen GPU_open; +extern GPUclose GPU_close; +extern GPUreadStatus GPU_readStatus; +extern GPUreadData GPU_readData; +extern GPUreadDataMem GPU_readDataMem; +extern GPUwriteStatus GPU_writeStatus; +extern GPUwriteData GPU_writeData; +extern GPUwriteDataMem GPU_writeDataMem; +extern GPUdmaChain GPU_dmaChain; +extern GPUkeypressed GPU_keypressed; +extern GPUdisplayText GPU_displayText; +extern GPUmakeSnapshot GPU_makeSnapshot; +extern GPUfreeze GPU_freeze; +extern GPUgetScreenPic GPU_getScreenPic; +extern GPUshowScreenPic GPU_showScreenPic; +extern GPUclearDynarec GPU_clearDynarec; +extern GPUvBlank GPU_vBlank; + +// CD-ROM Functions +typedef long (CALLBACK* CDRinit)(void); +typedef long (CALLBACK* CDRshutdown)(void); +typedef long (CALLBACK* CDRopen)(void); +typedef long (CALLBACK* CDRclose)(void); +typedef long (CALLBACK* CDRgetTN)(unsigned char *); +typedef long (CALLBACK* CDRgetTD)(unsigned char, unsigned char *); +typedef long (CALLBACK* CDRreadTrack)(unsigned char *); +typedef unsigned char* (CALLBACK* CDRgetBuffer)(void); +typedef unsigned char* (CALLBACK* CDRgetBufferSub)(void); +typedef long (CALLBACK* CDRconfigure)(void); +typedef long (CALLBACK* CDRtest)(void); +typedef void (CALLBACK* CDRabout)(void); +typedef long (CALLBACK* CDRplay)(unsigned char *); +typedef long (CALLBACK* CDRstop)(void); +typedef long (CALLBACK* CDRsetfilename)(char *); +struct CdrStat { + uint32_t Type; + uint32_t Status; + unsigned char Time[3]; +}; +typedef long (CALLBACK* CDRgetStatus)(struct CdrStat *); +typedef char* (CALLBACK* CDRgetDriveLetter)(void); +struct SubQ { + char res0[12]; + unsigned char ControlAndADR; + unsigned char TrackNumber; + unsigned char IndexNumber; + unsigned char TrackRelativeAddress[3]; + unsigned char Filler; + unsigned char AbsoluteAddress[3]; + unsigned char CRC[2]; + char res1[72]; +}; +typedef long (CALLBACK* CDRreadCDDA)(unsigned char, unsigned char, unsigned char, unsigned char *); +typedef long (CALLBACK* CDRgetTE)(unsigned char, unsigned char *, unsigned char *, unsigned char *); + +// CD-ROM function pointers +extern CDRinit CDR_init; +extern CDRshutdown CDR_shutdown; +extern CDRopen CDR_open; +extern CDRclose CDR_close; +extern CDRtest CDR_test; +extern CDRgetTN CDR_getTN; +extern CDRgetTD CDR_getTD; +extern CDRreadTrack CDR_readTrack; +extern CDRgetBuffer CDR_getBuffer; +extern CDRgetBufferSub CDR_getBufferSub; +extern CDRplay CDR_play; +extern CDRstop CDR_stop; +extern CDRgetStatus CDR_getStatus; +extern CDRgetDriveLetter CDR_getDriveLetter; +extern CDRconfigure CDR_configure; +extern CDRabout CDR_about; +extern CDRsetfilename CDR_setfilename; +extern CDRreadCDDA CDR_readCDDA; +extern CDRgetTE CDR_getTE; + +// SPU Functions +typedef long (CALLBACK* SPUinit)(void); +typedef long (CALLBACK* SPUshutdown)(void); +typedef long (CALLBACK* SPUclose)(void); +typedef void (CALLBACK* SPUplaySample)(unsigned char); +typedef void (CALLBACK* SPUwriteRegister)(unsigned long, unsigned short); +typedef unsigned short (CALLBACK* SPUreadRegister)(unsigned long); +typedef void (CALLBACK* SPUwriteDMA)(unsigned short); +typedef unsigned short (CALLBACK* SPUreadDMA)(void); +typedef void (CALLBACK* SPUwriteDMAMem)(unsigned short *, int); +typedef void (CALLBACK* SPUreadDMAMem)(unsigned short *, int); +typedef void (CALLBACK* SPUplayADPCMchannel)(xa_decode_t *); +typedef void (CALLBACK* SPUregisterCallback)(void (CALLBACK *callback)(void)); +typedef long (CALLBACK* SPUconfigure)(void); +typedef long (CALLBACK* SPUtest)(void); +typedef void (CALLBACK* SPUabout)(void); +typedef struct { + unsigned char PluginName[8]; + uint32_t PluginVersion; + uint32_t Size; + unsigned char SPUPorts[0x200]; + unsigned char SPURam[0x80000]; + xa_decode_t xa; + unsigned char *SPUInfo; +} SPUFreeze_t; +typedef long (CALLBACK* SPUfreeze)(uint32_t, SPUFreeze_t *); +typedef void (CALLBACK* SPUasync)(uint32_t); +typedef void (CALLBACK* SPUplayCDDAchannel)(short *, int); + +// SPU function pointers +extern SPUconfigure SPU_configure; +extern SPUabout SPU_about; +extern SPUinit SPU_init; +extern SPUshutdown SPU_shutdown; +extern SPUtest SPU_test; +extern SPUopen SPU_open; +extern SPUclose SPU_close; +extern SPUplaySample SPU_playSample; +extern SPUwriteRegister SPU_writeRegister; +extern SPUreadRegister SPU_readRegister; +extern SPUwriteDMA SPU_writeDMA; +extern SPUreadDMA SPU_readDMA; +extern SPUwriteDMAMem SPU_writeDMAMem; +extern SPUreadDMAMem SPU_readDMAMem; +extern SPUplayADPCMchannel SPU_playADPCMchannel; +extern SPUfreeze SPU_freeze; +extern SPUregisterCallback SPU_registerCallback; +extern SPUasync SPU_async; +extern SPUplayCDDAchannel SPU_playCDDAchannel; + +// PAD Functions +typedef long (CALLBACK* PADconfigure)(void); +typedef void (CALLBACK* PADabout)(void); +typedef long (CALLBACK* PADinit)(long); +typedef long (CALLBACK* PADshutdown)(void); +typedef long (CALLBACK* PADtest)(void); +typedef long (CALLBACK* PADclose)(void); +typedef long (CALLBACK* PADquery)(void); +typedef long (CALLBACK* PADreadPort1)(PadDataS*); +typedef long (CALLBACK* PADreadPort2)(PadDataS*); +typedef long (CALLBACK* PADkeypressed)(void); +typedef unsigned char (CALLBACK* PADstartPoll)(int); +typedef unsigned char (CALLBACK* PADpoll)(unsigned char); +typedef void (CALLBACK* PADsetSensitive)(int); + +// PAD function pointers +extern PADconfigure PAD1_configure; +extern PADabout PAD1_about; +extern PADinit PAD1_init; +extern PADshutdown PAD1_shutdown; +extern PADtest PAD1_test; +extern PADopen PAD1_open; +extern PADclose PAD1_close; +extern PADquery PAD1_query; +extern PADreadPort1 PAD1_readPort1; +extern PADkeypressed PAD1_keypressed; +extern PADstartPoll PAD1_startPoll; +extern PADpoll PAD1_poll; +extern PADsetSensitive PAD1_setSensitive; + +extern PADconfigure PAD2_configure; +extern PADabout PAD2_about; +extern PADinit PAD2_init; +extern PADshutdown PAD2_shutdown; +extern PADtest PAD2_test; +extern PADopen PAD2_open; +extern PADclose PAD2_close; +extern PADquery PAD2_query; +extern PADreadPort2 PAD2_readPort2; +extern PADkeypressed PAD2_keypressed; +extern PADstartPoll PAD2_startPoll; +extern PADpoll PAD2_poll; +extern PADsetSensitive PAD2_setSensitive; + +// NET Functions +typedef long (CALLBACK* NETinit)(void); +typedef long (CALLBACK* NETshutdown)(void); +typedef long (CALLBACK* NETclose)(void); +typedef long (CALLBACK* NETconfigure)(void); +typedef long (CALLBACK* NETtest)(void); +typedef void (CALLBACK* NETabout)(void); +typedef void (CALLBACK* NETpause)(void); +typedef void (CALLBACK* NETresume)(void); +typedef long (CALLBACK* NETqueryPlayer)(void); +typedef long (CALLBACK* NETsendData)(void *, int, int); +typedef long (CALLBACK* NETrecvData)(void *, int, int); +typedef long (CALLBACK* NETsendPadData)(void *, int); +typedef long (CALLBACK* NETrecvPadData)(void *, int); + +typedef struct { + char EmuName[32]; + char CdromID[9]; // ie. 'SCPH12345', no \0 trailing character + char CdromLabel[11]; + void *psxMem; + GPUshowScreenPic GPU_showScreenPic; + GPUdisplayText GPU_displayText; + PADsetSensitive PAD_setSensitive; + char GPUpath[256]; // paths must be absolute + char SPUpath[256]; + char CDRpath[256]; + char MCD1path[256]; + char MCD2path[256]; + char BIOSpath[256]; // 'HLE' for internal bios + char Unused[1024]; +} netInfo; + +typedef long (CALLBACK* NETsetInfo)(netInfo *); +typedef long (CALLBACK* NETkeypressed)(int); + +// NET function pointers +extern NETinit NET_init; +extern NETshutdown NET_shutdown; +extern NETopen NET_open; +extern NETclose NET_close; +extern NETtest NET_test; +extern NETconfigure NET_configure; +extern NETabout NET_about; +extern NETpause NET_pause; +extern NETresume NET_resume; +extern NETqueryPlayer NET_queryPlayer; +extern NETsendData NET_sendData; +extern NETrecvData NET_recvData; +extern NETsendPadData NET_sendPadData; +extern NETrecvPadData NET_recvPadData; +extern NETsetInfo NET_setInfo; +extern NETkeypressed NET_keypressed; + +#ifdef ENABLE_SIO1API + +// SIO1 Functions (link cable) +typedef long (CALLBACK* SIO1init)(void); +typedef long (CALLBACK* SIO1shutdown)(void); +typedef long (CALLBACK* SIO1close)(void); +typedef long (CALLBACK* SIO1configure)(void); +typedef long (CALLBACK* SIO1test)(void); +typedef void (CALLBACK* SIO1about)(void); +typedef void (CALLBACK* SIO1pause)(void); +typedef void (CALLBACK* SIO1resume)(void); +typedef long (CALLBACK* SIO1keypressed)(int); +typedef void (CALLBACK* SIO1writeData8)(unsigned char); +typedef void (CALLBACK* SIO1writeData16)(unsigned short); +typedef void (CALLBACK* SIO1writeData32)(unsigned long); +typedef void (CALLBACK* SIO1writeStat16)(unsigned short); +typedef void (CALLBACK* SIO1writeStat32)(unsigned long); +typedef void (CALLBACK* SIO1writeMode16)(unsigned short); +typedef void (CALLBACK* SIO1writeMode32)(unsigned long); +typedef void (CALLBACK* SIO1writeCtrl16)(unsigned short); +typedef void (CALLBACK* SIO1writeCtrl32)(unsigned long); +typedef void (CALLBACK* SIO1writeBaud16)(unsigned short); +typedef void (CALLBACK* SIO1writeBaud32)(unsigned long); +typedef unsigned char (CALLBACK* SIO1readData8)(void); +typedef unsigned short (CALLBACK* SIO1readData16)(void); +typedef unsigned long (CALLBACK* SIO1readData32)(void); +typedef unsigned short (CALLBACK* SIO1readStat16)(void); +typedef unsigned long (CALLBACK* SIO1readStat32)(void); +typedef unsigned short (CALLBACK* SIO1readMode16)(void); +typedef unsigned long (CALLBACK* SIO1readMode32)(void); +typedef unsigned short (CALLBACK* SIO1readCtrl16)(void); +typedef unsigned long (CALLBACK* SIO1readCtrl32)(void); +typedef unsigned short (CALLBACK* SIO1readBaud16)(void); +typedef unsigned long (CALLBACK* SIO1readBaud32)(void); +typedef void (CALLBACK* SIO1registerCallback)(void (CALLBACK *callback)(void)); + +// SIO1 function pointers +extern SIO1init SIO1_init; +extern SIO1shutdown SIO1_shutdown; +extern SIO1open SIO1_open; +extern SIO1close SIO1_close; +extern SIO1test SIO1_test; +extern SIO1configure SIO1_configure; +extern SIO1about SIO1_about; +extern SIO1pause SIO1_pause; +extern SIO1resume SIO1_resume; +extern SIO1keypressed SIO1_keypressed; +extern SIO1writeData8 SIO1_writeData8; +extern SIO1writeData16 SIO1_writeData16; +extern SIO1writeData32 SIO1_writeData32; +extern SIO1writeStat16 SIO1_writeStat16; +extern SIO1writeStat32 SIO1_writeStat32; +extern SIO1writeMode16 SIO1_writeMode16; +extern SIO1writeMode32 SIO1_writeMode32; +extern SIO1writeCtrl16 SIO1_writeCtrl16; +extern SIO1writeCtrl32 SIO1_writeCtrl32; +extern SIO1writeBaud16 SIO1_writeBaud16; +extern SIO1writeBaud32 SIO1_writeBaud32; +extern SIO1readData8 SIO1_readData8; +extern SIO1readData16 SIO1_readData16; +extern SIO1readData32 SIO1_readData32; +extern SIO1readStat16 SIO1_readStat16; +extern SIO1readStat32 SIO1_readStat32; +extern SIO1readMode16 SIO1_readMode16; +extern SIO1readMode32 SIO1_readMode32; +extern SIO1readCtrl16 SIO1_readCtrl16; +extern SIO1readCtrl32 SIO1_readCtrl32; +extern SIO1readBaud16 SIO1_readBaud16; +extern SIO1readBaud32 SIO1_readBaud32; +extern SIO1registerCallback SIO1_registerCallback; + +#endif + +void CALLBACK clearDynarec(void); + +void SetIsoFile(const char *filename); +const char *GetIsoFile(void); +boolean UsingIso(void); +void SetCdOpenCaseTime(s64 time); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/ppc/pGte.h b/libpcsxcore/ppc/pGte.h new file mode 100644 index 00000000..a968460b --- /dev/null +++ b/libpcsxcore/ppc/pGte.h @@ -0,0 +1,91 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifndef PGET_H +#define PGET_H + +#ifdef __cplusplus +extern "C" { +#endif + +int psxCP2time[64] = { + 2, 16 , 1 , 1, 1, 1 , 8, 1, // 00 + 1 , 1 , 1 , 1, 6 , 1 , 1 , 1, // 08 + 8 , 8, 8, 19, 13 , 1 , 44 , 1, // 10 + 1 , 1 , 1 , 17, 11 , 1 , 14 , 1, // 18 + 30 , 1 , 1 , 1, 1, 1 , 1 , 1, // 20 + 5 , 8 , 17 , 1, 1, 5, 6, 1, // 28 + 23 , 1 , 1 , 1, 1, 1 , 1 , 1, // 30 + 1 , 1 , 1 , 1, 1, 6 , 5 , 39 // 38 +}; + +#define CP2_FUNC(f) \ +void gte##f(); \ +static void rec##f() { \ + if (pc < cop2readypc) idlecyclecount += (cop2readypc - pc)>>2; \ + iFlushRegs(0); \ + LIW(0, (u32)psxRegs.code); \ + STW(0, OFFSET(&psxRegs, &psxRegs.code), GetHWRegSpecial(PSXREGS)); \ + FlushAllHWReg(); \ + CALLFunc ((u32)gte##f); \ + cop2readypc = pc + psxCP2time[_fFunct_(psxRegs.code)]<<2; \ +} + +#define CP2_FUNCNC(f) \ +void gte##f(); \ +static void rec##f() { \ + if (pc < cop2readypc) idlecyclecount += (cop2readypc - pc)>>2; \ + iFlushRegs(0); \ + CALLFunc ((u32)gte##f); \ +/* branch = 2; */\ + cop2readypc = pc + psxCP2time[_fFunct_(psxRegs.code)]; \ +} + +CP2_FUNC(MFC2); +CP2_FUNC(MTC2); +CP2_FUNC(CFC2); +CP2_FUNC(CTC2); +CP2_FUNC(LWC2); +CP2_FUNC(SWC2); +CP2_FUNCNC(RTPS); +CP2_FUNC(OP); +CP2_FUNCNC(NCLIP); +CP2_FUNC(DPCS); +CP2_FUNC(INTPL); +CP2_FUNC(MVMVA); +CP2_FUNCNC(NCDS); +CP2_FUNCNC(NCDT); +CP2_FUNCNC(CDP); +CP2_FUNCNC(NCCS); +CP2_FUNCNC(CC); +CP2_FUNCNC(NCS); +CP2_FUNCNC(NCT); +CP2_FUNC(SQR); +CP2_FUNC(DCPL); +CP2_FUNCNC(DPCT); +CP2_FUNCNC(AVSZ3); +CP2_FUNCNC(AVSZ4); +CP2_FUNCNC(RTPT); +CP2_FUNC(GPF); +CP2_FUNC(GPL); +CP2_FUNCNC(NCCT); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/ppc/pR3000A.c b/libpcsxcore/ppc/pR3000A.c new file mode 100644 index 00000000..93745f82 --- /dev/null +++ b/libpcsxcore/ppc/pR3000A.c @@ -0,0 +1,3540 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifdef _MSC_VER_ +#pragma warning(disable:4244) +#pragma warning(disable:4761) +#endif +#include +#include +#include +#include +#include + +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + +#include "../psxcommon.h" +#include "ppc.h" +#include "reguse.h" +#include "../r3000a.h" +#include "../psxhle.h" + +//#define NO_CONSTANT + +u32 *psxRecLUT; + +#undef _Op_ +#define _Op_ _fOp_(psxRegs.code) +#undef _Funct_ +#define _Funct_ _fFunct_(psxRegs.code) +#undef _Rd_ +#define _Rd_ _fRd_(psxRegs.code) +#undef _Rt_ +#define _Rt_ _fRt_(psxRegs.code) +#undef _Rs_ +#define _Rs_ _fRs_(psxRegs.code) +#undef _Sa_ +#define _Sa_ _fSa_(psxRegs.code) +#undef _Im_ +#define _Im_ _fIm_(psxRegs.code) +#undef _Target_ +#define _Target_ _fTarget_(psxRegs.code) + +#undef _Imm_ +#define _Imm_ _fImm_(psxRegs.code) +#undef _ImmU_ +#define _ImmU_ _fImmU_(psxRegs.code) + +#undef PC_REC +#undef PC_REC8 +#undef PC_REC16 +#undef PC_REC32 +#define PC_REC(x) (psxRecLUT[x >> 16] + (x & 0xffff)) +#define PC_REC8(x) (*(u8 *)PC_REC(x)) +#define PC_REC16(x) (*(u16*)PC_REC(x)) +#define PC_REC32(x) (*(u32*)PC_REC(x)) + +#define OFFSET(X,Y) ((u32)(Y)-(u32)(X)) + +#define RECMEM_SIZE (12*1024*1024) + +static char *recMem; /* the recompiled blocks will be here */ +static char *recRAM; /* and the ptr to the blocks here */ +static char *recROM; /* and here */ + +static u32 pc; /* recompiler pc */ +static u32 pcold; /* recompiler oldpc */ +static int count; /* recompiler intruction count */ +static int branch; /* set for branch */ +static u32 target; /* branch target */ +static u32 resp; + +u32 cop2readypc = 0; +u32 idlecyclecount = 0; + +#define NUM_REGISTERS 34 +typedef struct { + int state; + u32 k; + int reg; +} iRegisters; + +static iRegisters iRegs[34]; + +#define ST_UNK 0x00 +#define ST_CONST 0x01 +#define ST_MAPPED 0x02 + +#ifdef NO_CONSTANT +#define IsConst(reg) 0 +#else +#define IsConst(reg) (iRegs[reg].state & ST_CONST) +#endif +#define IsMapped(reg) (iRegs[reg].state & ST_MAPPED) + +static void (*recBSC[64])(); +static void (*recSPC[64])(); +static void (*recREG[32])(); +static void (*recCP0[32])(); +static void (*recCP2[64])(); +static void (*recCP2BSC[32])(); + +#define REG_LO 32 +#define REG_HI 33 + +// Hardware register usage +#define HWUSAGE_NONE 0x00 + +#define HWUSAGE_READ 0x01 +#define HWUSAGE_WRITE 0x02 +#define HWUSAGE_CONST 0x04 +#define HWUSAGE_ARG 0x08 /* used as an argument for a function call */ + +#define HWUSAGE_RESERVED 0x10 /* won't get flushed when flushing all regs */ +#define HWUSAGE_SPECIAL 0x20 /* special purpose register */ +#define HWUSAGE_HARDWIRED 0x40 /* specific hardware register mapping that is never disposed */ +#define HWUSAGE_INITED 0x80 +#define HWUSAGE_PSXREG 0x100 + +// Remember to invalidate the special registers if they are modified by compiler +enum { + ARG1 = 3, + ARG2 = 4, + ARG3 = 5, + PSXREGS, // ptr + PSXMEM, // ptr + CYCLECOUNT, // ptr + PSXPC, // ptr + TARGETPTR, // ptr + TARGET, // ptr + RETVAL, + REG_RZERO, + REG_WZERO +}; + +typedef struct { + int code; + u32 k; + int usage; + int lastUsed; + + void (*flush)(int hwreg); + int private; +} HWRegister; +static HWRegister HWRegisters[NUM_HW_REGISTERS]; +static int HWRegUseCount; +static int DstCPUReg; +static int UniqueRegAlloc; + +static int GetFreeHWReg(); +static void InvalidateCPURegs(); +static void DisposeHWReg(int index); +static void FlushHWReg(int index); +static void FlushAllHWReg(); +static void MapPsxReg32(int reg); +static void FlushPsxReg32(int hwreg); +static int UpdateHWRegUsage(int hwreg, int usage); +static int GetHWReg32(int reg); +static int PutHWReg32(int reg); +static int GetSpecialIndexFromHWRegs(int which); +static int GetHWRegFromCPUReg(int cpureg); +static int MapRegSpecial(int which); +static void FlushRegSpecial(int hwreg); +static int GetHWRegSpecial(int which); +static int PutHWRegSpecial(int which); +static void recRecompile(); +static void recError(); + +#pragma mark --- Generic register mapping --- + +static int GetFreeHWReg() +{ + int i, least, index; + + if (DstCPUReg != -1) { + index = GetHWRegFromCPUReg(DstCPUReg); + DstCPUReg = -1; + } else { + // LRU algorith with a twist ;) + for (i=0; i= 13) { + index = i; + break; + } + else if (HWRegisters[i].lastUsed < least) { + least = HWRegisters[i].lastUsed; + index = i; + } + } + } + + // Cycle the registers + if (HWRegisters[index].usage == HWUSAGE_NONE) { + for (; i= 13 && + HWRegisters[i].lastUsed < least) { + least = HWRegisters[i].lastUsed; + index = i; + break; + } + } + } + } + } + +/* if (HWRegisters[index].code < 13 && HWRegisters[index].code > 3) { + SysPrintf("Allocating volatile register %i\n", HWRegisters[index].code); + } + if (HWRegisters[index].usage != HWUSAGE_NONE) { + SysPrintf("RegUse too big. Flushing %i\n", HWRegisters[index].code); + }*/ + if (HWRegisters[index].usage & (HWUSAGE_RESERVED | HWUSAGE_HARDWIRED)) { + if (HWRegisters[index].usage & HWUSAGE_RESERVED) { + SysPrintf("Error! Trying to map a new register to a reserved register (r%i)", + HWRegisters[index].code); + } + if (HWRegisters[index].usage & HWUSAGE_HARDWIRED) { + SysPrintf("Error! Trying to map a new register to a hardwired register (r%i)", + HWRegisters[index].code); + } + } + + if (HWRegisters[index].lastUsed != 0) { + UniqueRegAlloc = 0; + } + + // Make sure the register is really flushed! + FlushHWReg(index); + HWRegisters[index].usage = HWUSAGE_NONE; + HWRegisters[index].flush = NULL; + + return index; +} + +static void FlushHWReg(int index) +{ + if (index < 0) return; + if (HWRegisters[index].usage == HWUSAGE_NONE) return; + + if (HWRegisters[index].flush) { + HWRegisters[index].usage |= HWUSAGE_RESERVED; + HWRegisters[index].flush(index); + HWRegisters[index].flush = NULL; + } + + if (HWRegisters[index].usage & HWUSAGE_HARDWIRED) { + HWRegisters[index].usage &= ~(HWUSAGE_READ | HWUSAGE_WRITE); + } else { + HWRegisters[index].usage = HWUSAGE_NONE; + } +} + +// get rid of a mapped register without flushing the contents to the memory +static void DisposeHWReg(int index) +{ + if (index < 0) return; + if (HWRegisters[index].usage == HWUSAGE_NONE) return; + + HWRegisters[index].usage &= ~(HWUSAGE_READ | HWUSAGE_WRITE); + if (HWRegisters[index].usage == HWUSAGE_NONE) { + SysPrintf("Error! not correctly disposing register (r%i)", HWRegisters[index].code); + } + + FlushHWReg(index); +} + +// operated on cpu registers +__inline static void FlushCPURegRange(int start, int end) +{ + int i; + + if (end <= 0) end = 31; + if (start <= 0) start = 0; + + for (i=0; i= start && HWRegisters[i].code <= end) + if (HWRegisters[i].flush) + FlushHWReg(i); + } + + for (i=0; i= start && HWRegisters[i].code <= end) + FlushHWReg(i); + } +} + +static void FlushAllHWReg() +{ + FlushCPURegRange(0,31); +} + +static void InvalidateCPURegs() +{ + FlushCPURegRange(0,12); +} + +#pragma mark --- Mapping utility functions --- + +static void MoveHWRegToCPUReg(int cpureg, int hwreg) +{ + int dstreg; + + if (HWRegisters[hwreg].code == cpureg) + return; + + dstreg = GetHWRegFromCPUReg(cpureg); + + HWRegisters[dstreg].usage &= ~(HWUSAGE_HARDWIRED | HWUSAGE_ARG); + if (HWRegisters[hwreg].usage & (HWUSAGE_READ | HWUSAGE_WRITE)) { + FlushHWReg(dstreg); + MR(HWRegisters[dstreg].code, HWRegisters[hwreg].code); + } else { + if (HWRegisters[dstreg].usage & (HWUSAGE_READ | HWUSAGE_WRITE)) { + MR(HWRegisters[hwreg].code, HWRegisters[dstreg].code); + } + else if (HWRegisters[dstreg].usage != HWUSAGE_NONE) { + FlushHWReg(dstreg); + } + } + + HWRegisters[dstreg].code = HWRegisters[hwreg].code; + HWRegisters[hwreg].code = cpureg; +} + +static int UpdateHWRegUsage(int hwreg, int usage) +{ + HWRegisters[hwreg].lastUsed = ++HWRegUseCount; + if (usage & HWUSAGE_WRITE) { + HWRegisters[hwreg].usage &= ~HWUSAGE_CONST; + } + if (!(usage & HWUSAGE_INITED)) { + HWRegisters[hwreg].usage &= ~HWUSAGE_INITED; + } + HWRegisters[hwreg].usage |= usage; + + return HWRegisters[hwreg].code; +} + +static int GetHWRegFromCPUReg(int cpureg) +{ + int i; + for (i=0; i= 0) { + if (HWRegisters[index].usage & HWUSAGE_WRITE) + break; + } + index = MapRegSpecial(which); + HWRegisters[index].flush = NULL; + break; + default: + if (index == -1) { + usage |= HWUSAGE_INITED; + index = MapRegSpecial(which); + + HWRegisters[index].usage |= HWUSAGE_RESERVED; + switch (which) { + case ARG1: + case ARG2: + case ARG3: + MoveHWRegToCPUReg(3+(which-ARG1), index); + /*reg = GetHWRegFromCPUReg(3+(which-ARG1)); + + if (HWRegisters[reg].usage != HWUSAGE_NONE) { + HWRegisters[reg].usage &= ~(HWUSAGE_HARDWIRED | HWUSAGE_ARG); + if (HWRegisters[reg].flush != NULL && HWRegisters[reg].usage & (HWUSAGE_WRITE | HWUSAGE_READ)) { + MR(HWRegisters[index].code, HWRegisters[reg].code); + } else { + FlushHWReg(reg); + } + } + HWRegisters[reg].code = HWRegisters[index].code; + if (!(HWRegisters[index].code >= 3 && HWRegisters[index].code <=31)) + SysPrintf("Error! Register allocation"); + HWRegisters[index].code = 3+(which-ARG1);*/ + HWRegisters[index].flush = NULL; + + usage |= HWUSAGE_RESERVED | HWUSAGE_HARDWIRED | HWUSAGE_ARG; + break; + } + } + HWRegisters[index].usage &= ~HWUSAGE_RESERVED; + break; + } + + DstCPUReg = -1; + + return UpdateHWRegUsage(index, usage); +} + +#pragma mark --- --- + +static void MapConst(int reg, u32 _const) { + if (reg == 0) + return; + if (IsConst(reg) && iRegs[reg].k == _const) + return; + + DisposeHWReg(iRegs[reg].reg); + iRegs[reg].k = _const; + iRegs[reg].state = ST_CONST; +} + +static void MapCopy(int dst, int src) +{ + // do it the lazy way for now + MR(PutHWReg32(dst), GetHWReg32(src)); +} + +static void iFlushReg(u32 nextpc, int reg) { + if (!IsMapped(reg) && IsConst(reg)) { + GetHWReg32(reg); + } + if (IsMapped(reg)) { + if (nextpc) { + int use = nextPsxRegUse(nextpc, reg); + if ((use & REGUSE_RW) == REGUSE_WRITE) { + DisposeHWReg(iRegs[reg].reg); + } else { + FlushHWReg(iRegs[reg].reg); + } + } else { + FlushHWReg(iRegs[reg].reg); + } + } +} + +static void iFlushRegs(u32 nextpc) { + int i; + + for (i=1; i> 26; + switch (tmp) { + case 0x10: // COP0 + switch (_Rs_) { + case 0x00: // MFC0 + case 0x02: // CFC0 + return 1; + } + break; + case 0x12: // COP2 + switch (_Funct_) { + case 0x00: + switch (_Rs_) { + case 0x00: // MFC2 + case 0x02: // CFC2 + return 1; + } + break; + } + break; + case 0x32: // LWC2 + return 1; + default: + if (tmp >= 0x20 && tmp <= 0x26) { // LB/LH/LWL/LW/LBU/LHU/LWR + return 1; + } + break; + } + return 0; +} + +/* set a pending branch */ +static void SetBranch() { + int treg; + branch = 1; + psxRegs.code = PSXMu32(pc); + pc+=4; + + if (iLoadTest() == 1) { + iFlushRegs(0); + LIW(0, psxRegs.code); + STW(0, OFFSET(&psxRegs, &psxRegs.code), GetHWRegSpecial(PSXREGS)); + /* store cycle */ + count = (idlecyclecount + (pc - pcold) / 4) * BIAS; + ADDI(PutHWRegSpecial(CYCLECOUNT), GetHWRegSpecial(CYCLECOUNT), count); + + treg = GetHWRegSpecial(TARGET); + MR(PutHWRegSpecial(ARG2), treg); + DisposeHWReg(GetHWRegFromCPUReg(treg)); + LIW(PutHWRegSpecial(ARG1), _Rt_); + LIW(GetHWRegSpecial(PSXPC), pc); + FlushAllHWReg(); + CALLFunc((u32)psxDelayTest); + + Return(); + return; + } + + recBSC[psxRegs.code>>26](); + + iFlushRegs(0); + treg = GetHWRegSpecial(TARGET); + MR(PutHWRegSpecial(PSXPC), GetHWRegSpecial(TARGET)); // FIXME: this line should not be needed + DisposeHWReg(GetHWRegFromCPUReg(treg)); + FlushAllHWReg(); + + count = (idlecyclecount + (pc - pcold) / 4) * BIAS; + ADDI(PutHWRegSpecial(CYCLECOUNT), GetHWRegSpecial(CYCLECOUNT), count); + FlushAllHWReg(); + CALLFunc((u32)psxBranchTest); + + // TODO: don't return if target is compiled + Return(); +} + +static void iJump(u32 branchPC) { + u32 *b1, *b2; + branch = 1; + psxRegs.code = PSXMu32(pc); + pc+=4; + + if (iLoadTest() == 1) { + iFlushRegs(0); + LIW(0, psxRegs.code); + STW(0, OFFSET(&psxRegs, &psxRegs.code), GetHWRegSpecial(PSXREGS)); + /* store cycle */ + count = (idlecyclecount + (pc - pcold) / 4) * BIAS; + ADDI(PutHWRegSpecial(CYCLECOUNT), GetHWRegSpecial(CYCLECOUNT), count); + + LIW(PutHWRegSpecial(ARG2), branchPC); + LIW(PutHWRegSpecial(ARG1), _Rt_); + LIW(GetHWRegSpecial(PSXPC), pc); + FlushAllHWReg(); + CALLFunc((u32)psxDelayTest); + + Return(); + return; + } + + recBSC[psxRegs.code>>26](); + + iFlushRegs(branchPC); + LIW(PutHWRegSpecial(PSXPC), branchPC); + FlushAllHWReg(); + + count = (idlecyclecount + (pc - pcold) / 4) * BIAS; + //if (/*psxRegs.code == 0 &&*/ count == 2 && branchPC == pcold) { + // LIW(PutHWRegSpecial(CYCLECOUNT), 0); + //} else { + ADDI(PutHWRegSpecial(CYCLECOUNT), GetHWRegSpecial(CYCLECOUNT), count); + //} + FlushAllHWReg(); + CALLFunc((u32)psxBranchTest); + + if (!Config.HLE && Config.PsxOut && + ((branchPC & 0x1fffff) == 0xa0 || + (branchPC & 0x1fffff) == 0xb0 || + (branchPC & 0x1fffff) == 0xc0)) + CALLFunc((u32)psxJumpTest); + + // always return for now... + //Return(); + + // maybe just happened an interruption, check so + LIW(0, branchPC); + CMPLW(GetHWRegSpecial(PSXPC), 0); + BNE_L(b1); + + LIW(3, PC_REC(branchPC)); + LWZ(3, 0, 3); + CMPLWI(3, 0); + BNE_L(b2); + + B_DST(b1); + Return(); + + // next bit is already compiled - jump right to it + B_DST(b2); + MTCTR(3); + BCTR(); +} + +static void iBranch(u32 branchPC, int savectx) { + HWRegister HWRegistersS[NUM_HW_REGISTERS]; + iRegisters iRegsS[NUM_REGISTERS]; + int HWRegUseCountS = 0; + u32 respold=0; + u32 *b1, *b2; + + if (savectx) { + respold = resp; + memcpy(iRegsS, iRegs, sizeof(iRegs)); + memcpy(HWRegistersS, HWRegisters, sizeof(HWRegisters)); + HWRegUseCountS = HWRegUseCount; + } + + branch = 1; + psxRegs.code = PSXMu32(pc); + + // the delay test is only made when the branch is taken + // savectx == 0 will mean that :) + if (savectx == 0 && iLoadTest() == 1) { + iFlushRegs(0); + LIW(0, psxRegs.code); + STW(0, OFFSET(&psxRegs, &psxRegs.code), GetHWRegSpecial(PSXREGS)); + /* store cycle */ + count = (idlecyclecount + ((pc+4) - pcold) / 4) * BIAS; + ADDI(PutHWRegSpecial(CYCLECOUNT), GetHWRegSpecial(CYCLECOUNT), count); + + LIW(PutHWRegSpecial(ARG2), branchPC); + LIW(PutHWRegSpecial(ARG1), _Rt_); + LIW(GetHWRegSpecial(PSXPC), pc); + FlushAllHWReg(); + CALLFunc((u32)psxDelayTest); + + Return(); + return; + } + + pc+= 4; + recBSC[psxRegs.code>>26](); + + iFlushRegs(branchPC); + LIW(PutHWRegSpecial(PSXPC), branchPC); + FlushAllHWReg(); + + /* store cycle */ + count = (idlecyclecount + (pc - pcold) / 4) * BIAS; + //if (/*psxRegs.code == 0 &&*/ count == 2 && branchPC == pcold) { + // LIW(PutHWRegSpecial(CYCLECOUNT), 0); + //} else { + ADDI(PutHWRegSpecial(CYCLECOUNT), GetHWRegSpecial(CYCLECOUNT), count); + //} + FlushAllHWReg(); + CALLFunc((u32)psxBranchTest); + + // always return for now... + //Return(); + + LIW(0, branchPC); + CMPLW(GetHWRegSpecial(PSXPC), 0); + BNE_L(b1); + + LIW(3, PC_REC(branchPC)); + LWZ(3, 0, 3); + CMPLWI(3, 0); + BNE_L(b2); + + B_DST(b1); + Return(); + + B_DST(b2); + MTCTR(3); + BCTR(); + + // maybe just happened an interruption, check so +/* CMP32ItoM((u32)&psxRegs.pc, branchPC); + j8Ptr[1] = JE8(0); + RET(); + + x86SetJ8(j8Ptr[1]); + MOV32MtoR(EAX, PC_REC(branchPC)); + TEST32RtoR(EAX, EAX); + j8Ptr[2] = JNE8(0); + RET(); + + x86SetJ8(j8Ptr[2]); + JMP32R(EAX);*/ + + pc-= 4; + if (savectx) { + resp = respold; + memcpy(iRegs, iRegsS, sizeof(iRegs)); + memcpy(HWRegisters, HWRegistersS, sizeof(HWRegisters)); + HWRegUseCount = HWRegUseCountS; + } +} + + +static void iDumpRegs() { + int i, j; + + printf("%lx %lx\n", psxRegs.pc, psxRegs.cycle); + for (i=0; i<4; i++) { + for (j=0; j<8; j++) + printf("%lx ", psxRegs.GPR.r[j*i]); + printf("\n"); + } +} + +void iDumpBlock(char *ptr) { +/* FILE *f; + u32 i; + + SysPrintf("dump1 %x:%x, %x\n", psxRegs.pc, pc, psxCurrentCycle); + + for (i = psxRegs.pc; i < pc; i+=4) + SysPrintf("%s\n", disR3000AF(PSXMu32(i), i)); + + fflush(stdout); + f = fopen("dump1", "w"); + fwrite(ptr, 1, (u32)x86Ptr - (u32)ptr, f); + fclose(f); + system("ndisasmw -u dump1"); + fflush(stdout);*/ +} + +#define REC_FUNC(f) \ +void psx##f(); \ +static void rec##f() { \ + iFlushRegs(0); \ + LIW(PutHWRegSpecial(ARG1), (u32)psxRegs.code); \ + STW(GetHWRegSpecial(ARG1), OFFSET(&psxRegs, &psxRegs.code), GetHWRegSpecial(PSXREGS)); \ + LIW(PutHWRegSpecial(PSXPC), (u32)pc); \ + FlushAllHWReg(); \ + CALLFunc((u32)psx##f); \ +/* branch = 2; */\ +} + +#define REC_SYS(f) \ +void psx##f(); \ +static void rec##f() { \ + iFlushRegs(0); \ + LIW(PutHWRegSpecial(ARG1), (u32)psxRegs.code); \ + STW(GetHWRegSpecial(ARG1), OFFSET(&psxRegs, &psxRegs.code), GetHWRegSpecial(PSXREGS)); \ + LIW(PutHWRegSpecial(PSXPC), (u32)pc); \ + FlushAllHWReg(); \ + CALLFunc((u32)psx##f); \ + branch = 2; \ + iRet(); \ +} + +#define REC_BRANCH(f) \ +void psx##f(); \ +static void rec##f() { \ + iFlushRegs(0); \ + LIW(PutHWRegSpecial(ARG1), (u32)psxRegs.code); \ + STW(GetHWRegSpecial(ARG1), OFFSET(&psxRegs, &psxRegs.code), GetHWRegSpecial(PSXREGS)); \ + LIW(PutHWRegSpecial(PSXPC), (u32)pc); \ + FlushAllHWReg(); \ + CALLFunc((u32)psx##f); \ + branch = 2; \ + iRet(); \ +} + +static void freeMem(int all) +{ + if (recMem) free(recMem); + if (recRAM) free(recRAM); + if (recROM) free(recROM); + recMem = recRAM = recROM = 0; + + if (all && psxRecLUT) { + free(psxRecLUT); psxRecLUT = NULL; + } +} + +static int allocMem() { + int i; + + freeMem(0); + + if (psxRecLUT==NULL) + psxRecLUT = (u32*) malloc(0x010000 * 4); + + recMem = (char*) malloc(RECMEM_SIZE); + //recMem = mmap(NULL, RECMEM_SIZE, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); + recRAM = (char*) malloc(0x200000); + recROM = (char*) malloc(0x080000); + if (recRAM == NULL || recROM == NULL || recMem == NULL/*(void *)-1*/ || psxRecLUT == NULL) { + freeMem(1); + SysMessage("Error allocating memory"); return -1; + } + + for (i=0; i<0x80; i++) psxRecLUT[i + 0x0000] = (u32)&recRAM[(i & 0x1f) << 16]; + memcpy(psxRecLUT + 0x8000, psxRecLUT, 0x80 * 4); + memcpy(psxRecLUT + 0xa000, psxRecLUT, 0x80 * 4); + + for (i=0; i<0x08; i++) psxRecLUT[i + 0xbfc0] = (u32)&recROM[i << 16]; + + return 0; +} + +static int recInit() { + return allocMem(); +} + +static void recReset() { + memset(recRAM, 0, 0x200000); + memset(recROM, 0, 0x080000); + + ppcInit(); + ppcSetPtr((u32 *)recMem); + + branch = 0; + memset(iRegs, 0, sizeof(iRegs)); + iRegs[0].state = ST_CONST; + iRegs[0].k = 0; +} + +static void recShutdown() { + freeMem(1); + ppcShutdown(); +} + +static void recError() { + SysReset(); + ClosePlugins(); + SysMessage("Unrecoverable error while running recompiler\n"); + SysRunGui(); +} + +__inline static void execute() { + void (**recFunc)(); + char *p; + + p = (char*)PC_REC(psxRegs.pc); + /*if (p != NULL)*/ recFunc = (void (**)()) (u32)p; + /*else { recError(); return; }*/ + + if (*recFunc == 0) { + recRecompile(); + } + recRun(*recFunc, (u32)&psxRegs, (u32)&psxM); +} + +static void recExecute() { + for (;;) execute(); +} + +static void recExecuteBlock() { + execute(); +} + +static void recClear(u32 Addr, u32 Size) { + memset((void*)PC_REC(Addr), 0, Size * 4); +} + +static void recNULL() { +// SysMessage("recUNK: %8.8x\n", psxRegs.code); +} + +/********************************************************* +* goes to opcodes tables... * +* Format: table[something....] * +*********************************************************/ + +//REC_SYS(SPECIAL); +static void recSPECIAL() { + recSPC[_Funct_](); +} + +static void recREGIMM() { + recREG[_Rt_](); +} + +static void recCOP0() { + recCP0[_Rs_](); +} + +//REC_SYS(COP2); +static void recCOP2() { + recCP2[_Funct_](); +} + +static void recBASIC() { + recCP2BSC[_Rs_](); +} + +//end of Tables opcodes... + +#pragma mark - Arithmetic with immediate operand - +/********************************************************* +* Arithmetic with immediate operand * +* Format: OP rt, rs, immediate * +*********************************************************/ + +#if 0 +/*REC_FUNC(ADDI); +REC_FUNC(ADDIU); +REC_FUNC(ANDI); +REC_FUNC(ORI); +REC_FUNC(XORI); +REC_FUNC(SLTI); +REC_FUNC(SLTIU);*/ +#else +static void recADDIU() { +// Rt = Rs + Im + if (!_Rt_) return; + + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k + _Imm_); + } else { + if (_Imm_ == 0) { + MapCopy(_Rt_, _Rs_); + } else { + ADDI(PutHWReg32(_Rt_), GetHWReg32(_Rs_), _Imm_); + } + } +} + +static void recADDI() { +// Rt = Rs + Im + recADDIU(); +} + +//REC_FUNC(SLTI); +//REC_FUNC(SLTIU); +//CR0: SIGN | POSITIVE | ZERO | SOVERFLOW | SOVERFLOW | OVERFLOW | CARRY +static void recSLTI() { +// Rt = Rs < Im (signed) + if (!_Rt_) return; + + if (IsConst(_Rs_)) { + MapConst(_Rt_, (s32)iRegs[_Rs_].k < _Imm_); + } else { + if (_Imm_ == 0) { + SRWI(PutHWReg32(_Rt_), GetHWReg32(_Rs_), 31); + } else { + int reg; + CMPWI(GetHWReg32(_Rs_), _Imm_); + reg = PutHWReg32(_Rt_); + LI(reg, 1); + BLT(1); + LI(reg, 0); + } + } +} + +static void recSLTIU() { +// Rt = Rs < Im (unsigned) + if (!_Rt_) return; + + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k < _ImmU_); + } else { + int reg; + CMPLWI(GetHWReg32(_Rs_), _Imm_); + reg = PutHWReg32(_Rt_); + LI(reg, 1); + BLT(1); + LI(reg, 0); + } +} + +static void recANDI() { +// Rt = Rs And Im + if (!_Rt_) return; + + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k & _ImmU_); + } else { + ANDI_(PutHWReg32(_Rt_), GetHWReg32(_Rs_), _ImmU_); + } +} + +static void recORI() { +// Rt = Rs Or Im + if (!_Rt_) return; + + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k | _ImmU_); + } else { + if (_Imm_ == 0) { + MapCopy(_Rt_, _Rs_); + } else { + ORI(PutHWReg32(_Rt_), GetHWReg32(_Rs_), _ImmU_); + } + } +} + +static void recXORI() { +// Rt = Rs Xor Im + if (!_Rt_) return; + + if (IsConst(_Rs_)) { + MapConst(_Rt_, iRegs[_Rs_].k ^ _ImmU_); + } else { + XORI(PutHWReg32(_Rt_), GetHWReg32(_Rs_), _ImmU_); + } +} +#endif +//end of * Arithmetic with immediate operand + +/********************************************************* +* Load higher 16 bits of the first word in GPR with imm * +* Format: OP rt, immediate * +*********************************************************/ +//REC_FUNC(LUI); +//#if 0*/ +static void recLUI() { +// Rt = Imm << 16 + if (!_Rt_) return; + + MapConst(_Rt_, psxRegs.code << 16); +} +//#endif +//End of Load Higher ..... + +#pragma mark - Register arithmetic - +/********************************************************* +* Register arithmetic * +* Format: OP rd, rs, rt * +*********************************************************/ + +#if 0 +/*REC_FUNC(ADD); +REC_FUNC(ADDU); +REC_FUNC(SUB); +REC_FUNC(SUBU); +REC_FUNC(AND); +REC_FUNC(OR); +REC_FUNC(XOR); +REC_FUNC(NOR); +REC_FUNC(SLT); +REC_FUNC(SLTU);*/ +#else +static void recADDU() { +// Rd = Rs + Rt + if (!_Rd_) return; + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k + iRegs[_Rt_].k); + } else if (IsConst(_Rs_) && !IsMapped(_Rs_)) { + if ((s32)(s16)iRegs[_Rs_].k == (s32)iRegs[_Rs_].k) { + ADDI(PutHWReg32(_Rd_), GetHWReg32(_Rt_), (s16)iRegs[_Rs_].k); + } else if ((iRegs[_Rs_].k & 0xffff) == 0) { + ADDIS(PutHWReg32(_Rd_), GetHWReg32(_Rt_), iRegs[_Rs_].k>>16); + } else { + ADD(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } else if (IsConst(_Rt_) && !IsMapped(_Rt_)) { + if ((s32)(s16)iRegs[_Rt_].k == (s32)iRegs[_Rt_].k) { + ADDI(PutHWReg32(_Rd_), GetHWReg32(_Rs_), (s16)iRegs[_Rt_].k); + } else if ((iRegs[_Rt_].k & 0xffff) == 0) { + ADDIS(PutHWReg32(_Rd_), GetHWReg32(_Rs_), iRegs[_Rt_].k>>16); + } else { + ADD(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } else { + ADD(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } +} + +static void recADD() { +// Rd = Rs + Rt + recADDU(); +} + +static void recSUBU() { +// Rd = Rs - Rt + if (!_Rd_) return; + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k - iRegs[_Rt_].k); + } else if (IsConst(_Rt_) && !IsMapped(_Rt_)) { + if ((s32)(s16)(-iRegs[_Rt_].k) == (s32)(-iRegs[_Rt_].k)) { + ADDI(PutHWReg32(_Rd_), GetHWReg32(_Rs_), -iRegs[_Rt_].k); + } else if (((-iRegs[_Rt_].k) & 0xffff) == 0) { + ADDIS(PutHWReg32(_Rd_), GetHWReg32(_Rs_), (-iRegs[_Rt_].k)>>16); + } else { + SUB(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } else { + SUB(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } +} + +static void recSUB() { +// Rd = Rs - Rt + recSUBU(); +} + +static void recAND() { +// Rd = Rs And Rt + if (!_Rd_) return; + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k & iRegs[_Rt_].k); + } else if (IsConst(_Rs_) && !IsMapped(_Rs_)) { + // TODO: implement shifted (ANDIS) versions of these + if ((iRegs[_Rs_].k & 0xffff) == iRegs[_Rs_].k) { + ANDI_(PutHWReg32(_Rd_), GetHWReg32(_Rt_), iRegs[_Rs_].k); + } else { + AND(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } else if (IsConst(_Rt_) && !IsMapped(_Rt_)) { + if ((iRegs[_Rt_].k & 0xffff) == iRegs[_Rt_].k) { + ANDI_(PutHWReg32(_Rd_), GetHWReg32(_Rs_), iRegs[_Rt_].k); + } else { + AND(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } else { + AND(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } +} + +static void recOR() { +// Rd = Rs Or Rt + if (!_Rd_) return; + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k | iRegs[_Rt_].k); + } + else { + if (_Rs_ == _Rt_) { + MapCopy(_Rd_, _Rs_); + } + else if (IsConst(_Rs_) && !IsMapped(_Rs_)) { + if ((iRegs[_Rs_].k & 0xffff) == iRegs[_Rs_].k) { + ORI(PutHWReg32(_Rd_), GetHWReg32(_Rt_), iRegs[_Rs_].k); + } else { + OR(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } + else if (IsConst(_Rt_) && !IsMapped(_Rt_)) { + if ((iRegs[_Rt_].k & 0xffff) == iRegs[_Rt_].k) { + ORI(PutHWReg32(_Rd_), GetHWReg32(_Rs_), iRegs[_Rt_].k); + } else { + OR(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } else { + OR(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } +} + +static void recXOR() { +// Rd = Rs Xor Rt + if (!_Rd_) return; + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k ^ iRegs[_Rt_].k); + } else if (IsConst(_Rs_) && !IsMapped(_Rs_)) { + if ((iRegs[_Rs_].k & 0xffff) == iRegs[_Rs_].k) { + XORI(PutHWReg32(_Rd_), GetHWReg32(_Rt_), iRegs[_Rs_].k); + } else { + XOR(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } else if (IsConst(_Rt_) && !IsMapped(_Rt_)) { + if ((iRegs[_Rt_].k & 0xffff) == iRegs[_Rt_].k) { + XORI(PutHWReg32(_Rd_), GetHWReg32(_Rs_), iRegs[_Rt_].k); + } else { + XOR(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } else { + XOR(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } +} + +static void recNOR() { +// Rd = Rs Nor Rt + if (!_Rd_) return; + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, ~(iRegs[_Rs_].k | iRegs[_Rt_].k)); + } /*else if (IsConst(_Rs_) && !IsMapped(_Rs_)) { + if ((iRegs[_Rs_].k & 0xffff) == iRegs[_Rs_].k) { + NORI(PutHWReg32(_Rd_), GetHWReg32(_Rt_), iRegs[_Rs_].k); + } else { + NOR(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } else if (IsConst(_Rt_) && !IsMapped(_Rt_)) { + if ((iRegs[_Rt_].k & 0xffff) == iRegs[_Rt_].k) { + NORI(PutHWReg32(_Rd_), GetHWReg32(_Rs_), iRegs[_Rt_].k); + } else { + NOR(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } */else { + NOR(PutHWReg32(_Rd_), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } +} + +static void recSLT() { +// Rd = Rs < Rt (signed) + if (!_Rd_) return; + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, (s32)iRegs[_Rs_].k < (s32)iRegs[_Rt_].k); + } else { // TODO: add immidiate cases + int reg; + CMPW(GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + reg = PutHWReg32(_Rd_); + LI(reg, 1); + BLT(1); + LI(reg, 0); + } +} + +static void recSLTU() { +// Rd = Rs < Rt (unsigned) + if (!_Rd_) return; + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rs_].k < iRegs[_Rt_].k); + } else { // TODO: add immidiate cases + SUBFC(PutHWReg32(_Rd_), GetHWReg32(_Rt_), GetHWReg32(_Rs_)); + SUBFE(PutHWReg32(_Rd_), GetHWReg32(_Rd_), GetHWReg32(_Rd_)); + NEG(PutHWReg32(_Rd_), GetHWReg32(_Rd_)); + } +} +#endif +//End of * Register arithmetic + +#pragma mark - mult/div & Register trap logic - +/********************************************************* +* Register mult/div & Register trap logic * +* Format: OP rs, rt * +*********************************************************/ + +#if 0 +REC_FUNC(MULT); +REC_FUNC(MULTU); +REC_FUNC(DIV); +REC_FUNC(DIVU); +#else + +int DoShift(u32 k) +{ + u32 i; + for (i=0; i<30; i++) { + if (k == (1ul << i)) + return i; + } + return -1; +} + +//REC_FUNC(MULT); + +// FIXME: doesn't work in GT - wrong way marker +static void recMULT() { +// Lo/Hi = Rs * Rt (signed) + s32 k; int r; + int usehi, uselo; + + if ((IsConst(_Rs_) && iRegs[_Rs_].k == 0) || + (IsConst(_Rt_) && iRegs[_Rt_].k == 0)) { + MapConst(REG_LO, 0); + MapConst(REG_HI, 0); + return; + } + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + u64 res = (s64)((s64)(s32)iRegs[_Rs_].k * (s64)(s32)iRegs[_Rt_].k); + MapConst(REG_LO, (res & 0xffffffff)); + MapConst(REG_HI, ((res >> 32) & 0xffffffff)); + return; + } + + if (IsConst(_Rs_)) { + k = (s32)iRegs[_Rs_].k; + r = _Rt_; + } else if (IsConst(_Rt_)) { + k = (s32)iRegs[_Rt_].k; + r = _Rs_; + } else { + r = -1; + k = 0; + } + + // FIXME: this should not be needed!!! +// uselo = isPsxRegUsed(pc, REG_LO); +// usehi = isPsxRegUsed(pc, REG_HI); + uselo = 1; //isPsxRegUsed(pc, REG_LO); + usehi = 1; //isPsxRegUsed(pc, REG_HI); + + + if (r != -1) { + int shift = DoShift(k); + if (shift != -1) { + if (uselo) { + SLWI(PutHWReg32(REG_LO), GetHWReg32(r), shift) + } + if (usehi) { + SRAWI(PutHWReg32(REG_HI), GetHWReg32(r), 31-shift); + } + } else { + //if ((s32)(s16)k == k) { + // MULLWI(PutHWReg32(REG_LO), GetHWReg32(r), k); + // MULHWI(PutHWReg32(REG_HI), GetHWReg32(r), k); + //} else + { + if (uselo) { + MULLW(PutHWReg32(REG_LO), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + if (usehi) { + MULHW(PutHWReg32(REG_HI), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } + } + } else { + if (uselo) { + MULLW(PutHWReg32(REG_LO), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + if (usehi) { + MULHW(PutHWReg32(REG_HI), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } +} + +static void recMULTU() { +// Lo/Hi = Rs * Rt (unsigned) + u32 k; int r; + int usehi, uselo; + + if ((IsConst(_Rs_) && iRegs[_Rs_].k == 0) || + (IsConst(_Rt_) && iRegs[_Rt_].k == 0)) { + MapConst(REG_LO, 0); + MapConst(REG_HI, 0); + return; + } + + if (IsConst(_Rs_) && IsConst(_Rt_)) { + u64 res = (u64)((u64)(u32)iRegs[_Rs_].k * (u64)(u32)iRegs[_Rt_].k); + MapConst(REG_LO, (res & 0xffffffff)); + MapConst(REG_HI, ((res >> 32) & 0xffffffff)); + return; + } + + if (IsConst(_Rs_)) { + k = (s32)iRegs[_Rs_].k; + r = _Rt_; + } else if (IsConst(_Rt_)) { + k = (s32)iRegs[_Rt_].k; + r = _Rs_; + } else { + r = -1; + k = 0; + } + + uselo = isPsxRegUsed(pc, REG_LO); + usehi = isPsxRegUsed(pc, REG_HI); + + if (r != -1) { + int shift = DoShift(k); + if (shift != -1) { + if (uselo) { + SLWI(PutHWReg32(REG_LO), GetHWReg32(r), shift); + } + if (usehi) { + SRWI(PutHWReg32(REG_HI), GetHWReg32(r), 31-shift); + } + } else { + { + if (uselo) { + MULLW(PutHWReg32(REG_LO), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + if (usehi) { + MULHWU(PutHWReg32(REG_HI), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } + } + } else { + if (uselo) { + MULLW(PutHWReg32(REG_LO), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + if (usehi) { + MULHWU(PutHWReg32(REG_HI), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } +} + +static void recDIV() { +// Lo/Hi = Rs / Rt (signed) + int usehi; + + if (IsConst(_Rs_) && iRegs[_Rs_].k == 0) { + MapConst(REG_LO, 0); + MapConst(REG_HI, 0); + return; + } + if (IsConst(_Rt_) && IsConst(_Rs_)) { + MapConst(REG_LO, (s32)iRegs[_Rs_].k / (s32)iRegs[_Rt_].k); + MapConst(REG_HI, (s32)iRegs[_Rs_].k % (s32)iRegs[_Rt_].k); + return; + } + + usehi = isPsxRegUsed(pc, REG_HI); + + if (IsConst(_Rt_)) { + int shift = DoShift(iRegs[_Rt_].k); + if (shift != -1) { + SRAWI(PutHWReg32(REG_LO), GetHWReg32(_Rs_), shift); + ADDZE(PutHWReg32(REG_LO), GetHWReg32(REG_LO)); + if (usehi) { + RLWINM(PutHWReg32(REG_HI), GetHWReg32(_Rs_), 0, 31-shift, 31); + } + } else if (iRegs[_Rt_].k == 3) { + // http://the.wall.riscom.net/books/proc/ppc/cwg/code2.html + LIS(PutHWReg32(REG_HI), 0x5555); + ADDI(PutHWReg32(REG_HI), GetHWReg32(REG_HI), 0x5556); + MULHW(PutHWReg32(REG_LO), GetHWReg32(REG_HI), GetHWReg32(_Rs_)); + SRWI(PutHWReg32(REG_HI), GetHWReg32(_Rs_), 31); + ADD(PutHWReg32(REG_LO), GetHWReg32(REG_LO), GetHWReg32(REG_HI)); + if (usehi) { + MULLI(PutHWReg32(REG_HI), GetHWReg32(REG_LO), 3); + SUB(PutHWReg32(REG_HI), GetHWReg32(_Rs_), GetHWReg32(REG_HI)); + } + } else { + DIVW(PutHWReg32(REG_LO), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + if (usehi) { + if ((iRegs[_Rt_].k & 0x7fff) == iRegs[_Rt_].k) { + MULLI(PutHWReg32(REG_HI), GetHWReg32(REG_LO), iRegs[_Rt_].k); + } else { + MULLW(PutHWReg32(REG_HI), GetHWReg32(REG_LO), GetHWReg32(_Rt_)); + } + SUB(PutHWReg32(REG_HI), GetHWReg32(_Rs_), GetHWReg32(REG_HI)); + } + } + } else { + DIVW(PutHWReg32(REG_LO), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + if (usehi) { + MULLW(PutHWReg32(REG_HI), GetHWReg32(REG_LO), GetHWReg32(_Rt_)); + SUB(PutHWReg32(REG_HI), GetHWReg32(_Rs_), GetHWReg32(REG_HI)); + } + } +} + +static void recDIVU() { +// Lo/Hi = Rs / Rt (unsigned) + int usehi; + + if (IsConst(_Rs_) && iRegs[_Rs_].k == 0) { + MapConst(REG_LO, 0); + MapConst(REG_HI, 0); + return; + } + if (IsConst(_Rt_) && IsConst(_Rs_)) { + MapConst(REG_LO, (u32)iRegs[_Rs_].k / (u32)iRegs[_Rt_].k); + MapConst(REG_HI, (u32)iRegs[_Rs_].k % (u32)iRegs[_Rt_].k); + return; + } + + usehi = isPsxRegUsed(pc, REG_HI); + + if (IsConst(_Rt_)) { + int shift = DoShift(iRegs[_Rt_].k); + if (shift != -1) { + SRWI(PutHWReg32(REG_LO), GetHWReg32(_Rs_), shift); + if (usehi) { + RLWINM(PutHWReg32(REG_HI), GetHWReg32(_Rs_), 0, 31-shift, 31); + } + } else { + DIVWU(PutHWReg32(REG_LO), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + if (usehi) { + MULLW(PutHWReg32(REG_HI), GetHWReg32(_Rt_), GetHWReg32(REG_LO)); + SUB(PutHWReg32(REG_HI), GetHWReg32(_Rs_), GetHWReg32(REG_HI)); + } + } + } else { + DIVWU(PutHWReg32(REG_LO), GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + if (usehi) { + MULLW(PutHWReg32(REG_HI), GetHWReg32(_Rt_), GetHWReg32(REG_LO)); + SUB(PutHWReg32(REG_HI), GetHWReg32(_Rs_), GetHWReg32(REG_HI)); + } + } +} +#endif +//End of * Register mult/div & Register trap logic + +#pragma mark - memory access - + +#if 0 +REC_FUNC(LB); +REC_FUNC(LBU); +REC_FUNC(LH); +REC_FUNC(LHU); +REC_FUNC(LW); + +REC_FUNC(SB); +REC_FUNC(SH); +REC_FUNC(SW); + +REC_FUNC(LWL); +REC_FUNC(LWR); +REC_FUNC(SWL); +REC_FUNC(SWR); +#else +static void preMemRead() +{ + int rs; + + ReserveArgs(1); + if (_Rs_ != _Rt_) { + DisposeHWReg(iRegs[_Rt_].reg); + } + rs = GetHWReg32(_Rs_); + if (rs != 3 || _Imm_ != 0) { + ADDI(PutHWRegSpecial(ARG1), rs, _Imm_); + } + if (_Rs_ == _Rt_) { + DisposeHWReg(iRegs[_Rt_].reg); + } + InvalidateCPURegs(); + //FlushAllHWReg(); +} + +static void preMemWrite(int size) +{ + int rs; + + ReserveArgs(2); + rs = GetHWReg32(_Rs_); + if (rs != 3 || _Imm_ != 0) { + ADDI(PutHWRegSpecial(ARG1), rs, _Imm_); + } + if (size == 1) { + RLWINM(PutHWRegSpecial(ARG2), GetHWReg32(_Rt_), 0, 24, 31); + //ANDI_(PutHWRegSpecial(ARG2), GetHWReg32(_Rt_), 0xff); + } else if (size == 2) { + RLWINM(PutHWRegSpecial(ARG2), GetHWReg32(_Rt_), 0, 16, 31); + //ANDI_(PutHWRegSpecial(ARG2), GetHWReg32(_Rt_), 0xffff); + } else { + MR(PutHWRegSpecial(ARG2), GetHWReg32(_Rt_)); + } + + InvalidateCPURegs(); + //FlushAllHWReg(); +} + +static void recLB() { +// Rt = mem[Rs + Im] (signed) + + /*if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRs8(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + + addr = (u32)&psxM[addr & 0x1fffff]; + LIW(PutHWReg32(_Rt_), ((addr>>16)<<16)+(addr&0x8000<<1)); // FIXME: is this correct? + LBZ(PutHWReg32(_Rt_), addr&0xffff, GetHWReg32(_Rt_)); + EXTSB(PutHWReg32(_Rt_), GetHWReg32(_Rt_)); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + + addr = (u32)&psxH[addr & 0xfff]; + LIW(PutHWReg32(_Rt_), ((addr>>16)<<16)+(addr&0x8000<<1)); // FIXME: is this correct? + LBZ(PutHWReg32(_Rt_), addr&0xffff, GetHWReg32(_Rt_)); + EXTSB(PutHWReg32(_Rt_), GetHWReg32(_Rt_)); + return; + } + // SysPrintf("unhandled r8 %x\n", addr); + }*/ + + preMemRead(); + CALLFunc((u32)psxMemRead8); + if (_Rt_) { + EXTSB(PutHWReg32(_Rt_), GetHWRegSpecial(RETVAL)); + DisposeHWReg(GetSpecialIndexFromHWRegs(RETVAL)); + } +} + +static void recLBU() { +// Rt = mem[Rs + Im] (unsigned) + + /*if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRu8(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + + addr = (u32)&psxM[addr & 0x1fffff]; + LIW(PutHWReg32(_Rt_), ((addr>>16)<<16)+(addr&0x8000<<1)); // FIXME: is this correct? + LBZ(PutHWReg32(_Rt_), addr&0xffff, GetHWReg32(_Rt_)); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + + addr = (u32)&psxH[addr & 0xfff]; + LIW(PutHWReg32(_Rt_), ((addr>>16)<<16)+(addr&0x8000<<1)); // FIXME: is this correct? + LBZ(PutHWReg32(_Rt_), addr&0xffff, GetHWReg32(_Rt_)); + return; + } + // SysPrintf("unhandled r8 %x\n", addr); + }*/ + + preMemRead(); + CALLFunc((u32)psxMemRead8); + + if (_Rt_) { + SetDstCPUReg(3); + PutHWReg32(_Rt_); + } +} + +static void recLH() { +// Rt = mem[Rs + Im] (signed) + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRs16(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + + LIW(PutHWReg32(_Rt_), (u32)&psxM[addr & 0x1fffff]); + LHBRX(PutHWReg32(_Rt_), 0, GetHWReg32(_Rt_)); + EXTSH(PutHWReg32(_Rt_), GetHWReg32(_Rt_)); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + + LIW(PutHWReg32(_Rt_), (u32)&psxH[addr & 0xfff]); + LHBRX(PutHWReg32(_Rt_), 0, GetHWReg32(_Rt_)); + EXTSH(PutHWReg32(_Rt_), GetHWReg32(_Rt_)); + return; + } + // SysPrintf("unhandled r16 %x\n", addr); + } + + preMemRead(); + CALLFunc((u32)psxMemRead16); + if (_Rt_) { + EXTSH(PutHWReg32(_Rt_), GetHWRegSpecial(RETVAL)); + DisposeHWReg(GetSpecialIndexFromHWRegs(RETVAL)); + } +} + +static void recLHU() { +// Rt = mem[Rs + Im] (unsigned) + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRu16(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + + LIW(PutHWReg32(_Rt_), (u32)&psxM[addr & 0x1fffff]); + LHBRX(PutHWReg32(_Rt_), 0, GetHWReg32(_Rt_)); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + + LIW(PutHWReg32(_Rt_), (u32)&psxH[addr & 0xfff]); + LHBRX(PutHWReg32(_Rt_), 0, GetHWReg32(_Rt_)); + return; + } + if (t == 0x1f80) { + if (addr >= 0x1f801c00 && addr < 0x1f801e00) { + if (!_Rt_) return; + + ReserveArgs(1); + LIW(PutHWRegSpecial(ARG1), addr); + DisposeHWReg(iRegs[_Rt_].reg); + InvalidateCPURegs(); + CALLFunc((u32)SPU_readRegister); + + SetDstCPUReg(3); + PutHWReg32(_Rt_); + return; + } + switch (addr) { + case 0x1f801100: case 0x1f801110: case 0x1f801120: + if (!_Rt_) return; + + ReserveArgs(1); + LIW(PutHWRegSpecial(ARG1), (addr >> 4) & 0x3); + DisposeHWReg(iRegs[_Rt_].reg); + InvalidateCPURegs(); + CALLFunc((u32)psxRcntRcount); + + SetDstCPUReg(3); + PutHWReg32(_Rt_); + return; + + case 0x1f801104: case 0x1f801114: case 0x1f801124: + if (!_Rt_) return; + + ReserveArgs(1); + LIW(PutHWRegSpecial(ARG1), (addr >> 4) & 0x3); + DisposeHWReg(iRegs[_Rt_].reg); + InvalidateCPURegs(); + CALLFunc((u32)psxRcntRmode); + + SetDstCPUReg(3); + PutHWReg32(_Rt_); + return; + + case 0x1f801108: case 0x1f801118: case 0x1f801128: + if (!_Rt_) return; + + ReserveArgs(1); + LIW(PutHWRegSpecial(ARG1), (addr >> 4) & 0x3); + DisposeHWReg(iRegs[_Rt_].reg); + InvalidateCPURegs(); + CALLFunc((u32)psxRcntRtarget); + + SetDstCPUReg(3); + PutHWReg32(_Rt_); + return; + } + } + // SysPrintf("unhandled r16u %x\n", addr); + } + + preMemRead(); + CALLFunc((u32)psxMemRead16); + if (_Rt_) { + SetDstCPUReg(3); + PutHWReg32(_Rt_); + } +} + +static void recLW() { +// Rt = mem[Rs + Im] (unsigned) + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + if (!_Rt_) return; + // since bios is readonly it won't change + MapConst(_Rt_, psxRu32(addr)); + return; + } + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (!_Rt_) return; + + LIW(PutHWReg32(_Rt_), (u32)&psxM[addr & 0x1fffff]); + LWBRX(PutHWReg32(_Rt_), 0, GetHWReg32(_Rt_)); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (!_Rt_) return; + + LIW(PutHWReg32(_Rt_), (u32)&psxH[addr & 0xfff]); + LWBRX(PutHWReg32(_Rt_), 0, GetHWReg32(_Rt_)); + return; + } + if (t == 0x1f80) { + switch (addr) { + case 0x1f801080: case 0x1f801084: case 0x1f801088: + case 0x1f801090: case 0x1f801094: case 0x1f801098: + case 0x1f8010a0: case 0x1f8010a4: case 0x1f8010a8: + case 0x1f8010b0: case 0x1f8010b4: case 0x1f8010b8: + case 0x1f8010c0: case 0x1f8010c4: case 0x1f8010c8: + case 0x1f8010d0: case 0x1f8010d4: case 0x1f8010d8: + case 0x1f8010e0: case 0x1f8010e4: case 0x1f8010e8: + case 0x1f801070: case 0x1f801074: + case 0x1f8010f0: case 0x1f8010f4: + if (!_Rt_) return; + + LIW(PutHWReg32(_Rt_), (u32)&psxH[addr & 0xffff]); + LWBRX(PutHWReg32(_Rt_), 0, GetHWReg32(_Rt_)); + return; + + case 0x1f801810: + if (!_Rt_) return; + + DisposeHWReg(iRegs[_Rt_].reg); + InvalidateCPURegs(); + CALLFunc((u32)GPU_readData); + + SetDstCPUReg(3); + PutHWReg32(_Rt_); + return; + + case 0x1f801814: + if (!_Rt_) return; + + DisposeHWReg(iRegs[_Rt_].reg); + InvalidateCPURegs(); + CALLFunc((u32)GPU_readStatus); + + SetDstCPUReg(3); + PutHWReg32(_Rt_); + return; + } + } +// SysPrintf("unhandled r32 %x\n", addr); + } + + preMemRead(); + CALLFunc((u32)psxMemRead32); + if (_Rt_) { + SetDstCPUReg(3); + PutHWReg32(_Rt_); + } +} + +REC_FUNC(LWL); +REC_FUNC(LWR); +REC_FUNC(SWL); +REC_FUNC(SWR); +/*extern u32 LWL_MASK[4]; +extern u32 LWL_SHIFT[4]; + +void iLWLk(u32 shift) { + if (IsConst(_Rt_)) { + MOV32ItoR(ECX, iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rt_]); + } + AND32ItoR(ECX, LWL_MASK[shift]); + SHL32ItoR(EAX, LWL_SHIFT[shift]); + OR32RtoR (EAX, ECX); +} + +void recLWL() { +// Rt = Rt Merge mem[Rs + Im] + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (u32)&psxM[addr & 0x1ffffc]); + iLWLk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (u32)&psxH[addr & 0xffc]); + iLWLk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + } + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + PUSH32R (EAX); + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + CALLFunc((u32)psxMemRead32); + + if (_Rt_) { + ADD32ItoR(ESP, 4); + POP32R (EDX); + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV32ItoR(ECX, (u32)LWL_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + SHL32CLtoR(EAX); // mem(EAX) << LWL_SHIFT[shift] + + MOV32ItoR(ECX, (u32)LWL_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (u32)&psxRegs.GPR.r[_Rt_]); + } + AND32RtoR(EDX, ECX); // _rRt_ & LWL_MASK[shift] + + OR32RtoR(EAX, EDX); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } else { +// ADD32ItoR(ESP, 8); + resp+= 8; + } +} + +static void recLWBlock(int count) { + u32 *code = PSXM(pc); + int i, respsave; +// Rt = mem[Rs + Im] (unsigned) + +// iFlushRegs(0); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0xfff0) == 0xbfc0) { + // since bios is readonly it won't change + for (i=0; i> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (u32)&psxM[addr & 0x1ffffc]); + iLWRk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (u32)&psxH[addr & 0xffc]); + iLWRk(addr & 3); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + return; + } + } + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + PUSH32R (EAX); + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + CALLFunc((u32)psxMemRead32); + + if (_Rt_) { + ADD32ItoR(ESP, 4); + POP32R (EDX); + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV32ItoR(ECX, (u32)LWR_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + SHR32CLtoR(EAX); // mem(EAX) >> LWR_SHIFT[shift] + + MOV32ItoR(ECX, (u32)LWR_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (u32)&psxRegs.GPR.r[_Rt_]); + } + AND32RtoR(EDX, ECX); // _rRt_ & LWR_MASK[shift] + + OR32RtoR(EAX, EDX); + + iRegs[_Rt_].state = ST_UNK; + MOV32RtoM((u32)&psxRegs.GPR.r[_Rt_], EAX); + } else { +// ADD32ItoR(ESP, 8); + resp+= 8; + } +}*/ + +static void recSB() { +// mem[Rs + Im] = Rt + + /*if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (IsConst(_Rt_)) { + MOV8ItoM((u32)&psxM[addr & 0x1fffff], (u8)iRegs[_Rt_].k); + } else { + MOV8MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV8RtoM((u32)&psxM[addr & 0x1fffff], EAX); + } + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (IsConst(_Rt_)) { + MOV8ItoM((u32)&psxH[addr & 0xfff], (u8)iRegs[_Rt_].k); + } else { + MOV8MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV8RtoM((u32)&psxH[addr & 0xfff], EAX); + } + return; + } +// SysPrintf("unhandled w8 %x\n", addr); + }*/ + + preMemWrite(1); + CALLFunc((u32)psxMemWrite8); +} + +static void recSH() { +// mem[Rs + Im] = Rt + + /*if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + if (IsConst(_Rt_)) { + MOV16ItoM((u32)&psxM[addr & 0x1fffff], (u16)iRegs[_Rt_].k); + } else { + MOV16MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV16RtoM((u32)&psxM[addr & 0x1fffff], EAX); + } + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + if (IsConst(_Rt_)) { + MOV16ItoM((u32)&psxH[addr & 0xfff], (u16)iRegs[_Rt_].k); + } else { + MOV16MtoR(EAX, (u32)&psxRegs.GPR.r[_Rt_]); + MOV16RtoM((u32)&psxH[addr & 0xfff], EAX); + } + return; + } + if (t == 0x1f80) { + if (addr >= 0x1f801c00 && addr < 0x1f801e00) { + if (IsConst(_Rt_)) { + PUSH32I(iRegs[_Rt_].k); + } else { + PUSH32M((u32)&psxRegs.GPR.r[_Rt_]); + } + PUSH32I (addr); + CALL32M ((u32)&SPU_writeRegister); +#ifndef __WIN32__ + resp+= 8; +#endif + return; + } + } +// SysPrintf("unhandled w16 %x\n", addr); + }*/ + + preMemWrite(2); + CALLFunc((u32)psxMemWrite16); +} + +static void recSW() { +// mem[Rs + Im] = Rt + u32 *b1, *b2; +#if 0 + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + LIW(0, addr & 0x1fffff); + STWBRX(GetHWReg32(_Rt_), GetHWRegSpecial(PSXMEM), 0); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + LIW(0, (u32)&psxH[addr & 0xfff]); + STWBRX(GetHWReg32(_Rt_), 0, 0); + return; + } + if (t == 0x1f80) { + switch (addr) { + case 0x1f801080: case 0x1f801084: + case 0x1f801090: case 0x1f801094: + case 0x1f8010a0: case 0x1f8010a4: + case 0x1f8010b0: case 0x1f8010b4: + case 0x1f8010c0: case 0x1f8010c4: + case 0x1f8010d0: case 0x1f8010d4: + case 0x1f8010e0: case 0x1f8010e4: + case 0x1f801074: + case 0x1f8010f0: + LIW(0, (u32)&psxH[addr & 0xffff]); + STWBRX(GetHWReg32(_Rt_), 0, 0); + return; + +/* case 0x1f801810: + if (IsConst(_Rt_)) { + PUSH32I(iRegs[_Rt_].k); + } else { + PUSH32M((u32)&psxRegs.GPR.r[_Rt_]); + } + CALL32M((u32)&GPU_writeData); +#ifndef __WIN32__ + resp+= 4; +#endif + return; + + case 0x1f801814: + if (IsConst(_Rt_)) { + PUSH32I(iRegs[_Rt_].k); + } else { + PUSH32M((u32)&psxRegs.GPR.r[_Rt_]); + } + CALL32M((u32)&GPU_writeStatus); +#ifndef __WIN32__ + resp+= 4; +#endif*/ + } + } +// SysPrintf("unhandled w32 %x\n", addr); + } + +/* LIS(0, 0x0079 + ((_Imm_ <= 0) ? 1 : 0)); + CMPLW(GetHWReg32(_Rs_), 0); + BGE_L(b1); + + //SaveContext(); + ADDI(0, GetHWReg32(_Rs_), _Imm_); + RLWINM(0, GetHWReg32(_Rs_), 0, 11, 31); + STWBRX(GetHWReg32(_Rt_), GetHWRegSpecial(PSXMEM), 0); + B_L(b2); + + B_DST(b1);*/ +#endif + preMemWrite(4); + CALLFunc((u32)psxMemWrite32); + + //B_DST(b2); +} + +/* +static void recSWBlock(int count) { + u32 *code; + int i, respsave; +// mem[Rs + Im] = Rt + +// iFlushRegs(); + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + code = PSXM(pc); + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + for (i=0; i> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (u32)&psxM[addr & 0x1ffffc]); + iSWLk(addr & 3); + MOV32RtoM((u32)&psxM[addr & 0x1ffffc], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (u32)&psxH[addr & 0xffc]); + iSWLk(addr & 3); + MOV32RtoM((u32)&psxH[addr & 0xffc], EAX); + return; + } + } + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + PUSH32R (EAX); + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + + CALLFunc((u32)psxMemRead32); + + ADD32ItoR(ESP, 4); + POP32R (EDX); + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV32ItoR(ECX, (u32)SWL_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + AND32RtoR(EAX, ECX); // mem & SWL_MASK[shift] + + MOV32ItoR(ECX, (u32)SWL_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (u32)&psxRegs.GPR.r[_Rt_]); + } + SHR32CLtoR(EDX); // _rRt_ >> SWL_SHIFT[shift] + + OR32RtoR (EAX, EDX); + PUSH32R (EAX); + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + + CALLFunc((u32)psxMemWrite32); +// ADD32ItoR(ESP, 8); + resp+= 8; +} + +extern u32 SWR_MASK[4]; +extern u32 SWR_SHIFT[4]; + +void iSWRk(u32 shift) { + if (IsConst(_Rt_)) { + MOV32ItoR(ECX, iRegs[_Rt_].k); + } else { + MOV32MtoR(ECX, (u32)&psxRegs.GPR.r[_Rt_]); + } + SHL32ItoR(ECX, SWR_SHIFT[shift]); + AND32ItoR(EAX, SWR_MASK[shift]); + OR32RtoR (EAX, ECX); +} + +void recSWR() { +// mem[Rs + Im] = Rt Merge mem[Rs + Im] + + if (IsConst(_Rs_)) { + u32 addr = iRegs[_Rs_].k + _Imm_; + int t = addr >> 16; + + if ((t & 0x1fe0) == 0 && (t & 0x1fff) != 0) { + MOV32MtoR(EAX, (u32)&psxM[addr & 0x1ffffc]); + iSWRk(addr & 3); + MOV32RtoM((u32)&psxM[addr & 0x1ffffc], EAX); + return; + } + if (t == 0x1f80 && addr < 0x1f801000) { + MOV32MtoR(EAX, (u32)&psxH[addr & 0xffc]); + iSWRk(addr & 3); + MOV32RtoM((u32)&psxH[addr & 0xffc], EAX); + return; + } + } + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + PUSH32R (EAX); + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + + CALLFunc((u32)psxMemRead32); + + ADD32ItoR(ESP, 4); + POP32R (EDX); + AND32ItoR(EDX, 0x3); // shift = addr & 3; + + MOV32ItoR(ECX, (u32)SWR_MASK); + MOV32RmStoR(ECX, ECX, EDX, 2); + AND32RtoR(EAX, ECX); // mem & SWR_MASK[shift] + + MOV32ItoR(ECX, (u32)SWR_SHIFT); + MOV32RmStoR(ECX, ECX, EDX, 2); + if (IsConst(_Rt_)) { + MOV32ItoR(EDX, iRegs[_Rt_].k); + } else { + MOV32MtoR(EDX, (u32)&psxRegs.GPR.r[_Rt_]); + } + SHL32CLtoR(EDX); // _rRt_ << SWR_SHIFT[shift] + + OR32RtoR (EAX, EDX); + PUSH32R (EAX); + + if (IsConst(_Rs_)) MOV32ItoR(EAX, iRegs[_Rs_].k + _Imm_); + else { + MOV32MtoR(EAX, (u32)&psxRegs.GPR.r[_Rs_]); + if (_Imm_) ADD32ItoR(EAX, _Imm_); + } + AND32ItoR(EAX, ~3); + PUSH32R (EAX); + + CALLFunc((u32)psxMemWrite32); +// ADD32ItoR(ESP, 8); + resp+= 8; +}*/ +#endif + +#if 0 +/*REC_FUNC(SLL); +REC_FUNC(SRL); +REC_FUNC(SRA);*/ +#else +static void recSLL() { +// Rd = Rt << Sa + if (!_Rd_) return; + + if (IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rt_].k << _Sa_); + } else { + SLWI(PutHWReg32(_Rd_), GetHWReg32(_Rt_), _Sa_); + } +} + +static void recSRL() { +// Rd = Rt >> Sa + if (!_Rd_) return; + + if (IsConst(_Rt_)) { + MapConst(_Rd_, iRegs[_Rt_].k >> _Sa_); + } else { + SRWI(PutHWReg32(_Rd_), GetHWReg32(_Rt_), _Sa_); + } +} + +static void recSRA() { +// Rd = Rt >> Sa + if (!_Rd_) return; + + if (IsConst(_Rt_)) { + MapConst(_Rd_, (s32)iRegs[_Rt_].k >> _Sa_); + } else { + SRAWI(PutHWReg32(_Rd_), GetHWReg32(_Rt_), _Sa_); + } +} +#endif + +#pragma mark - shift ops - +#if 0 +/*REC_FUNC(SLLV); +REC_FUNC(SRLV); +REC_FUNC(SRAV);*/ +#else +static void recSLLV() { +// Rd = Rt << Rs + if (!_Rd_) return; + + if (IsConst(_Rt_) && IsConst(_Rs_)) { + MapConst(_Rd_, iRegs[_Rt_].k << iRegs[_Rs_].k); + } else if (IsConst(_Rs_) && !IsMapped(_Rs_)) { + SLWI(PutHWReg32(_Rd_), GetHWReg32(_Rt_), iRegs[_Rs_].k); + } else { + SLW(PutHWReg32(_Rd_), GetHWReg32(_Rt_), GetHWReg32(_Rs_)); + } +} + +static void recSRLV() { +// Rd = Rt >> Rs + if (!_Rd_) return; + + if (IsConst(_Rt_) && IsConst(_Rs_)) { + MapConst(_Rd_, iRegs[_Rt_].k >> iRegs[_Rs_].k); + } else if (IsConst(_Rs_) && !IsMapped(_Rs_)) { + SRWI(PutHWReg32(_Rd_), GetHWReg32(_Rt_), iRegs[_Rs_].k); + } else { + SRW(PutHWReg32(_Rd_), GetHWReg32(_Rt_), GetHWReg32(_Rs_)); + } +} + +static void recSRAV() { +// Rd = Rt >> Rs + if (!_Rd_) return; + + if (IsConst(_Rt_) && IsConst(_Rs_)) { + MapConst(_Rd_, (s32)iRegs[_Rt_].k >> iRegs[_Rs_].k); + } else if (IsConst(_Rs_) && !IsMapped(_Rs_)) { + SRAWI(PutHWReg32(_Rd_), GetHWReg32(_Rt_), iRegs[_Rs_].k); + } else { + SRAW(PutHWReg32(_Rd_), GetHWReg32(_Rt_), GetHWReg32(_Rs_)); + } +} +#endif + +//REC_SYS(SYSCALL); +//REC_SYS(BREAK); + +//#if 0*/ +/*int dump;*/ +static void recSYSCALL() { +// dump=1; + iFlushRegs(0); + + ReserveArgs(2); + LIW(PutHWRegSpecial(PSXPC), pc - 4); + LIW(PutHWRegSpecial(ARG1), 0x20); + LIW(PutHWRegSpecial(ARG2), (branch == 1 ? 1 : 0)); + FlushAllHWReg(); + CALLFunc ((u32)psxException); + + branch = 2; + iRet(); +} + +static void recBREAK() { +} +//#endif + +#if 0 +/*REC_FUNC(MFHI); +REC_FUNC(MTHI); +REC_FUNC(MFLO); +REC_FUNC(MTLO);*/ +#else +static void recMFHI() { +// Rd = Hi + if (!_Rd_) return; + + if (IsConst(REG_HI)) { + MapConst(_Rd_, iRegs[REG_HI].k); + } else { + MapCopy(_Rd_, REG_HI); + } +} + +static void recMTHI() { +// Hi = Rs + + if (IsConst(_Rs_)) { + MapConst(REG_HI, iRegs[_Rs_].k); + } else { + MapCopy(REG_HI, _Rs_); + } +} + +static void recMFLO() { +// Rd = Lo + if (!_Rd_) return; + + if (IsConst(REG_LO)) { + MapConst(_Rd_, iRegs[REG_LO].k); + } else { + MapCopy(_Rd_, REG_LO); + } +} + +static void recMTLO() { +// Lo = Rs + + if (IsConst(_Rs_)) { + MapConst(REG_LO, iRegs[_Rs_].k); + } else { + MapCopy(REG_LO, _Rs_); + } +} +#endif + +#pragma mark - branch ops - +#if 0 +/*REC_BRANCH(J); +REC_BRANCH(JR); +REC_BRANCH(JAL); +REC_BRANCH(JALR); +REC_BRANCH(BLTZ); +REC_BRANCH(BGTZ); +REC_BRANCH(BLTZAL); +REC_BRANCH(BGEZAL); +REC_BRANCH(BNE); +REC_BRANCH(BEQ); +REC_BRANCH(BLEZ); +REC_BRANCH(BGEZ);*/ +#else +static void recBLTZ() { +// Branch if Rs < 0 + u32 bpc = _Imm_ * 4 + pc; + u32 *b; + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k < 0) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMPWI(GetHWReg32(_Rs_), 0); + BLT_L(b); + + iBranch(pc+4, 1); + + B_DST(b); + + iBranch(bpc, 0); + pc+=4; +} + +static void recBGTZ() { +// Branch if Rs > 0 + u32 bpc = _Imm_ * 4 + pc; + u32 *b; + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k > 0) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMPWI(GetHWReg32(_Rs_), 0); + BGT_L(b); + + iBranch(pc+4, 1); + + B_DST(b); + + iBranch(bpc, 0); + pc+=4; +} + +static void recBLTZAL() { +// Branch if Rs < 0 + u32 bpc = _Imm_ * 4 + pc; + u32 *b; + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k < 0) { + MapConst(31, pc + 4); + + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMPWI(GetHWReg32(_Rs_), 0); + BLT_L(b); + + iBranch(pc+4, 1); + + B_DST(b); + + MapConst(31, pc + 4); + + iBranch(bpc, 0); + pc+=4; +} + +static void recBGEZAL() { +// Branch if Rs >= 0 + u32 bpc = _Imm_ * 4 + pc; + u32 *b; + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k >= 0) { + MapConst(31, pc + 4); + + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMPWI(GetHWReg32(_Rs_), 0); + BGE_L(b); + + iBranch(pc+4, 1); + + B_DST(b); + + MapConst(31, pc + 4); + + iBranch(bpc, 0); + pc+=4; +} + +static void recJ() { +// j target + + iJump(_Target_ * 4 + (pc & 0xf0000000)); +} + +static void recJAL() { +// jal target + MapConst(31, pc + 4); + + iJump(_Target_ * 4 + (pc & 0xf0000000)); +} + +static void recJR() { +// jr Rs + + if (IsConst(_Rs_)) { + iJump(iRegs[_Rs_].k); + //LIW(PutHWRegSpecial(TARGET), iRegs[_Rs_].k); + } else { + MR(PutHWRegSpecial(TARGET), GetHWReg32(_Rs_)); + SetBranch(); + } +} + +static void recJALR() { +// jalr Rs + + if (_Rd_) { + MapConst(_Rd_, pc + 4); + } + + if (IsConst(_Rs_)) { + iJump(iRegs[_Rs_].k); + //LIW(PutHWRegSpecial(TARGET), iRegs[_Rs_].k); + } else { + MR(PutHWRegSpecial(TARGET), GetHWReg32(_Rs_)); + SetBranch(); + } +} + +static void recBEQ() { +// Branch if Rs == Rt + u32 bpc = _Imm_ * 4 + pc; + u32 *b; + + if (_Rs_ == _Rt_) { + iJump(bpc); + } + else { + if (IsConst(_Rs_) && IsConst(_Rt_)) { + if (iRegs[_Rs_].k == iRegs[_Rt_].k) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + else if (IsConst(_Rs_) && !IsMapped(_Rs_)) { + if ((iRegs[_Rs_].k & 0xffff) == iRegs[_Rs_].k) { + CMPLWI(GetHWReg32(_Rt_), iRegs[_Rs_].k); + } + else if ((s32)(s16)iRegs[_Rs_].k == (s32)iRegs[_Rs_].k) { + CMPWI(GetHWReg32(_Rt_), iRegs[_Rs_].k); + } + else { + CMPLW(GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } + else if (IsConst(_Rt_) && !IsMapped(_Rt_)) { + if ((iRegs[_Rt_].k & 0xffff) == iRegs[_Rt_].k) { + CMPLWI(GetHWReg32(_Rs_), iRegs[_Rt_].k); + } + else if ((s32)(s16)iRegs[_Rt_].k == (s32)iRegs[_Rt_].k) { + CMPWI(GetHWReg32(_Rs_), iRegs[_Rt_].k); + } + else { + CMPLW(GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } + else { + CMPLW(GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + + BEQ_L(b); + + iBranch(pc+4, 1); + + B_DST(b); + + iBranch(bpc, 0); + pc+=4; + } +} + +static void recBNE() { +// Branch if Rs != Rt + u32 bpc = _Imm_ * 4 + pc; + u32 *b; + + if (_Rs_ == _Rt_) { + iJump(pc+4); + } + else { + if (IsConst(_Rs_) && IsConst(_Rt_)) { + if (iRegs[_Rs_].k != iRegs[_Rt_].k) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + else if (IsConst(_Rs_) && !IsMapped(_Rs_)) { + if ((iRegs[_Rs_].k & 0xffff) == iRegs[_Rs_].k) { + CMPLWI(GetHWReg32(_Rt_), iRegs[_Rs_].k); + } + else if ((s32)(s16)iRegs[_Rs_].k == (s32)iRegs[_Rs_].k) { + CMPWI(GetHWReg32(_Rt_), iRegs[_Rs_].k); + } + else { + CMPLW(GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } + else if (IsConst(_Rt_) && !IsMapped(_Rt_)) { + if ((iRegs[_Rt_].k & 0xffff) == iRegs[_Rt_].k) { + CMPLWI(GetHWReg32(_Rs_), iRegs[_Rt_].k); + } + else if ((s32)(s16)iRegs[_Rt_].k == (s32)iRegs[_Rt_].k) { + CMPWI(GetHWReg32(_Rs_), iRegs[_Rt_].k); + } + else { + CMPLW(GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + } + else { + CMPLW(GetHWReg32(_Rs_), GetHWReg32(_Rt_)); + } + + BNE_L(b); + + iBranch(pc+4, 1); + + B_DST(b); + + iBranch(bpc, 0); + pc+=4; + } +} + +static void recBLEZ() { +// Branch if Rs <= 0 + u32 bpc = _Imm_ * 4 + pc; + u32 *b; + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k <= 0) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMPWI(GetHWReg32(_Rs_), 0); + BLE_L(b); + + iBranch(pc+4, 1); + + B_DST(b); + + iBranch(bpc, 0); + pc+=4; +} + +static void recBGEZ() { +// Branch if Rs >= 0 + u32 bpc = _Imm_ * 4 + pc; + u32 *b; + + if (IsConst(_Rs_)) { + if ((s32)iRegs[_Rs_].k >= 0) { + iJump(bpc); return; + } else { + iJump(pc+4); return; + } + } + + CMPWI(GetHWReg32(_Rs_), 0); + BGE_L(b); + + iBranch(pc+4, 1); + + B_DST(b); + + iBranch(bpc, 0); + pc+=4; +} +#endif + +#if 1 +//REC_FUNC(MFC0); +//REC_SYS(MTC0); +//REC_FUNC(CFC0); +//REC_SYS(CTC0); +REC_FUNC(RFE); +//#else +static void recMFC0() { +// Rt = Cop0->Rd + if (!_Rt_) return; + + LWZ(PutHWReg32(_Rt_), OFFSET(&psxRegs, &psxRegs.CP0.r[_Rd_]), GetHWRegSpecial(PSXREGS)); +} + +static void recCFC0() { +// Rt = Cop0->Rd + + recMFC0(); +} + +static void recMTC0() { +// Cop0->Rd = Rt + + /*if (IsConst(_Rt_)) { + switch (_Rd_) { + case 12: + MOV32ItoM((u32)&psxRegs.CP0.r[_Rd_], iRegs[_Rt_].k); + break; + case 13: + MOV32ItoM((u32)&psxRegs.CP0.r[_Rd_], iRegs[_Rt_].k & ~(0xfc00)); + break; + default: + MOV32ItoM((u32)&psxRegs.CP0.r[_Rd_], iRegs[_Rt_].k); + break; + } + } else*/ { + switch (_Rd_) { + case 13: + RLWINM(0,GetHWReg32(_Rt_),0,22,15); // & ~(0xfc00) + STW(0, OFFSET(&psxRegs, &psxRegs.CP0.r[_Rd_]), GetHWRegSpecial(PSXREGS)); + break; + default: + STW(GetHWReg32(_Rt_), OFFSET(&psxRegs, &psxRegs.CP0.r[_Rd_]), GetHWRegSpecial(PSXREGS)); + break; + } + } + + if (_Rd_ == 12 || _Rd_ == 13) { + iFlushRegs(0); + LIW(PutHWRegSpecial(PSXPC), (u32)pc); + FlushAllHWReg(); + CALLFunc((u32)psxTestSWInts); + if(_Rd_ == 12) { + LWZ(0, OFFSET(&psxRegs, &psxRegs.interrupt), GetHWRegSpecial(PSXREGS)); + ORIS(0, 0, 0x8000); + STW(0, OFFSET(&psxRegs, &psxRegs.interrupt), GetHWRegSpecial(PSXREGS)); + } + branch = 2; + iRet(); + } +} + +static void recCTC0() { +// Cop0->Rd = Rt + + recMTC0(); +} +#else +static void recRFE() { + // TODO: implement multiple temp registers or cop0 registers + RLWINM(t1,Status,0,0,27); + RLWINM(Status,Status,30,28,31); + OR(Status,t1,Status); + + MOV32MtoR(EAX, (u32)&psxRegs.CP0.n.Status); + MOV32RtoR(ECX, EAX); + AND32ItoR(EAX, 0xfffffff0); + AND32ItoR(ECX, 0x3c); + SHR32ItoR(ECX, 2); + OR32RtoR (EAX, ECX); + MOV32RtoM((u32)&psxRegs.CP0.n.Status, EAX); + CALLFunc((u32)psxExceptionTest); +} +#endif + +#if 0 +#define CP2_FUNC(f) \ +void gte##f(); \ +static void rec##f() { \ + iFlushRegs(0); \ + LIW(0, (u32)psxRegs.code); \ + STW(0, OFFSET(&psxRegs, &psxRegs.code), GetHWRegSpecial(PSXREGS)); \ + FlushAllHWReg(); \ + CALLFunc ((u32)gte##f); \ +} +CP2_FUNC(LWC2); +CP2_FUNC(SWC2); + +#else +#include "pGte.h" +#endif +// + +static void recHLE() { + iFlushRegs(0); + FlushAllHWReg(); + + if ((psxRegs.code & 0x3ffffff) == (psxRegs.code & 0x7)) { + CALLFunc((u32)psxHLEt[psxRegs.code & 0x7]); + } else { + // somebody else must have written to current opcode for this to happen!!!! + CALLFunc((u32)psxHLEt[0]); // call dummy function + } + + count = (idlecyclecount + (pc - pcold) / 4 + 20) * BIAS; + ADDI(PutHWRegSpecial(CYCLECOUNT), GetHWRegSpecial(CYCLECOUNT), count); + FlushAllHWReg(); + CALLFunc((u32)psxBranchTest); + Return(); + + branch = 2; +} + +// + +static void (*recBSC[64])() = { + recSPECIAL, recREGIMM, recJ , recJAL , recBEQ , recBNE , recBLEZ, recBGTZ, + recADDI , recADDIU , recSLTI, recSLTIU, recANDI, recORI , recXORI, recLUI , + recCOP0 , recNULL , recCOP2, recNULL , recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recNULL, recNULL , recNULL, recNULL, recNULL, recNULL, + recLB , recLH , recLWL , recLW , recLBU , recLHU , recLWR , recNULL, + recSB , recSH , recSWL , recSW , recNULL, recNULL, recSWR , recNULL, + recNULL , recNULL , recLWC2, recNULL , recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recSWC2, recHLE , recNULL, recNULL, recNULL, recNULL +}; + +static void (*recSPC[64])() = { + recSLL , recNULL, recSRL , recSRA , recSLLV , recNULL , recSRLV, recSRAV, + recJR , recJALR, recNULL, recNULL, recSYSCALL, recBREAK, recNULL, recNULL, + recMFHI, recMTHI, recMFLO, recMTLO, recNULL , recNULL , recNULL, recNULL, + recMULT, recMULTU, recDIV, recDIVU, recNULL , recNULL , recNULL, recNULL, + recADD , recADDU, recSUB , recSUBU, recAND , recOR , recXOR , recNOR , + recNULL, recNULL, recSLT , recSLTU, recNULL , recNULL , recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL , recNULL , recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL , recNULL , recNULL, recNULL +}; + +static void (*recREG[32])() = { + recBLTZ , recBGEZ , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recBLTZAL, recBGEZAL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL , recNULL , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL +}; + +static void (*recCP0[32])() = { + recMFC0, recNULL, recCFC0, recNULL, recMTC0, recNULL, recCTC0, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recRFE , recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL +}; + +static void (*recCP2[64])() = { + recBASIC, recRTPS , recNULL , recNULL, recNULL, recNULL , recNCLIP, recNULL, // 00 + recNULL , recNULL , recNULL , recNULL, recOP , recNULL , recNULL , recNULL, // 08 + recDPCS , recINTPL, recMVMVA, recNCDS, recCDP , recNULL , recNCDT , recNULL, // 10 + recNULL , recNULL , recNULL , recNCCS, recCC , recNULL , recNCS , recNULL, // 18 + recNCT , recNULL , recNULL , recNULL, recNULL, recNULL , recNULL , recNULL, // 20 + recSQR , recDCPL , recDPCT , recNULL, recNULL, recAVSZ3, recAVSZ4, recNULL, // 28 + recRTPT , recNULL , recNULL , recNULL, recNULL, recNULL , recNULL , recNULL, // 30 + recNULL , recNULL , recNULL , recNULL, recNULL, recGPF , recGPL , recNCCT // 38 +}; + +static void (*recCP2BSC[32])() = { + recMFC2, recNULL, recCFC2, recNULL, recMTC2, recNULL, recCTC2, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, + recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL, recNULL +}; + +static void recRecompile() { + //static int recCount = 0; + char *p; + u32 *ptr; + int i; + + cop2readypc = 0; + idlecyclecount = 0; + + // initialize state variables + UniqueRegAlloc = 1; + HWRegUseCount = 0; + DstCPUReg = -1; + memset(HWRegisters, 0, sizeof(HWRegisters)); + for (i=0; i= (RECMEM_SIZE - 0x10000)) + recReset(); + + ppcAlign(/*32*/4); + ptr = ppcPtr; + + // give us write access + //mprotect(recMem, RECMEM_SIZE, PROT_EXEC|PROT_READ|PROT_WRITE); + + // tell the LUT where to find us + PC_REC32(psxRegs.pc) = (u32)ppcPtr; + + pcold = pc = psxRegs.pc; + + //SysPrintf("RecCount: %i\n", recCount++); + + for (count=0; count<500;) { + p = (char *)PSXM(pc); + if (p == NULL) recError(); + psxRegs.code = SWAP32(*(u32 *)p); +/* + if ((psxRegs.code >> 26) == 0x23) { // LW + int i; + u32 code; + + for (i=1;; i++) { + p = (char *)PSXM(pc+i*4); + if (p == NULL) recError(); + code = *(u32 *)p; + + if ((code >> 26) != 0x23 || + _fRs_(code) != _Rs_ || + _fImm_(code) != (_Imm_+i*4)) + break; + } + if (i > 1) { + recLWBlock(i); + pc = pc + i*4; continue; + } + } + + if ((psxRegs.code >> 26) == 0x2b) { // SW + int i; + u32 code; + + for (i=1;; i++) { + p = (char *)PSXM(pc+i*4); + if (p == NULL) recError(); + code = *(u32 *)p; + + if ((code >> 26) != 0x2b || + _fRs_(code) != _Rs_ || + _fImm_(code) != (_Imm_+i*4)) + break; + } + if (i > 1) { + recSWBlock(i); + pc = pc + i*4; continue; + } + }*/ + + pc+=4; count++; +// iFlushRegs(0); // test + recBSC[psxRegs.code>>26](); + + if (branch) { + branch = 0; + //if (dump) iDumpBlock(ptr); + goto done; + } + } + + iFlushRegs(pc); + + LIW(PutHWRegSpecial(PSXPC), pc); + + iRet(); + +done:; +#if 0 + MakeDataExecutable(ptr, ((u8*)ppcPtr)-((u8*)ptr)); +#else + u32 a = (u32)(u8*)ptr; + while(a < (u32)(u8*)ppcPtr) { + __asm__ __volatile__("icbi 0,%0" : : "r" (a)); + __asm__ __volatile__("dcbst 0,%0" : : "r" (a)); + a += 4; + } + __asm__ __volatile__("sync"); + __asm__ __volatile__("isync"); +#endif + +#if 1 + sprintf((char *)ppcPtr, "PC=%08x", pcold); + ppcPtr += strlen((char *)ppcPtr); +#endif + + //mprotect(recMem, RECMEM_SIZE, PROT_EXEC|PROT_READ/*|PROT_WRITE*/); +} + + +R3000Acpu psxRec = { + recInit, + recReset, + recExecute, + recExecuteBlock, + recClear, + recShutdown +}; + diff --git a/libpcsxcore/ppc/pasm.s b/libpcsxcore/ppc/pasm.s new file mode 100644 index 00000000..96891b42 --- /dev/null +++ b/libpcsxcore/ppc/pasm.s @@ -0,0 +1,124 @@ + + +#define OLD_REGISTER_OFFSET (19*4) +#define SP_SIZE (OLD_REGISTER_OFFSET+4+8) + +/*asm void recRun(register void (*func)(), register u32 hw1, register u32 hw2)*/ + .text + .align 4 + .globl recRun +recRun: + /* prologue code */ + mflr r0 + stmw r13, -(32-13)*4(r1) + stw r0, 4(r1) + stwu r1, -((32-13)*4+8)(r1) + + /* execute code */ + mtctr r3 + mr r31, r4 + mr r30, r5 + bctrl +/* +} +asm void returnPC() +{*/ + .text + .align 4 + .globl returnPC +returnPC: + // end code + lwz r0, (32-13)*4+8+4(r1) + addi r1, r1, (32-13)*4+8 + mtlr r0 + lmw r13, -(32-13)*4(r1) + blr +//}*/ + +// Memory functions that only works with a linear memory + + .text + .align 4 + .globl dynMemRead8 +dynMemRead8: +// assumes that memory pointer is in r30 + addis r2,r3,-0x1f80 + srwi. r4,r2,16 + bne+ .norm8 + cmplwi r2,0x1000 + blt- .norm8 + b psxHwRead8 +.norm8: + clrlwi r5,r3,3 + lbzx r3,r5,r30 + blr + + .text + .align 4 + .globl dynMemRead16 +dynMemRead16: +// assumes that memory pointer is in r30 + addis r2,r3,-0x1f80 + srwi. r4,r2,16 + bne+ .norm16 + cmplwi r2,0x1000 + blt- .norm16 + b psxHwRead16 +.norm16: + clrlwi r5,r3,3 + lhbrx r3,r5,r30 + blr + + .text + .align 4 + .globl dynMemRead32 +dynMemRead32: +// assumes that memory pointer is in r30 + addis r2,r3,-0x1f80 + srwi. r4,r2,16 + bne+ .norm32 + cmplwi r2,0x1000 + blt- .norm32 + b psxHwRead32 +.norm32: + clrlwi r5,r3,3 + lwbrx r3,r5,r30 + blr + +/* + N P Z + 0 0 0 X +- 0 0 1 X + 1 0 0 X + 1 0 1 X + +P | (!N & Z) +P | !(N | !Z) +*/ + + .text + .align 4 + .globl dynMemWrite32 +dynMemWrite32: +// assumes that memory pointer is in r30 + addis r2,r3,-0x1f80 + srwi. r5,r2,16 + bne+ .normw32 + cmplwi r2,0x1000 + blt .normw32 + b psxHwWrite32 +.normw32: + mtcrf 0xFF, r3 + clrlwi r5,r3,3 + crandc 0, 2, 0 + cror 2, 1, 0 + bne+ .okw32 + // write test + li r2,0x0130 + addis r2,r2,0xfffe + cmplw r3,r2 + bnelr +.okw32: + stwbrx r4,r5,r30 + blr + diff --git a/libpcsxcore/ppc/ppc.c b/libpcsxcore/ppc/ppc.c new file mode 100644 index 00000000..efaf8b6d --- /dev/null +++ b/libpcsxcore/ppc/ppc.c @@ -0,0 +1,32 @@ +/* + * ix86 core v0.5.1 + * Authors: linuzappz + * alexey silinov + */ + +#include +#include + +#include "ppc.h" + +// General Purpose hardware registers +int cpuHWRegisters[NUM_HW_REGISTERS] = { + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 +}; + +u32 *ppcPtr; + +void ppcInit() { +} +void ppcSetPtr(u32 *ptr) { + ppcPtr = ptr; +} +void ppcAlign(int bytes) { + // forward align + ppcPtr = (u32*)(((u32)ppcPtr + bytes) & ~(bytes - 1)); +} + +void ppcShutdown() { +} + diff --git a/libpcsxcore/ppc/ppc.h b/libpcsxcore/ppc/ppc.h new file mode 100644 index 00000000..a6134d4f --- /dev/null +++ b/libpcsxcore/ppc/ppc.h @@ -0,0 +1,60 @@ +/* + * ppc definitions v0.5.1 + * Authors: linuzappz + * alexey silinov + */ + +#ifndef __PPC_H__ +#define __PPC_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +// include basic types +#include "../psxcommon.h" +#include "ppc_mnemonics.h" + +#define NUM_HW_REGISTERS 29 + +/* general defines */ +#define write8(val) *(u8 *)ppcPtr = val; ppcPtr++; +#define write16(val) *(u16*)ppcPtr = val; ppcPtr+=2; +#define write32(val) *(u32*)ppcPtr = val; ppcPtr+=4; +#define write64(val) *(u64*)ppcPtr = val; ppcPtr+=8; + +#define CALLFunc(FUNC) \ +{ \ + u32 _func = (FUNC); \ + ReleaseArgs(); \ + if ((_func & 0x1fffffc) == _func) { \ + BLA(_func); \ + } else { \ + LIW(0, _func); \ + MTCTR(0); \ + BCTRL(); \ + } \ +} + +extern int cpuHWRegisters[NUM_HW_REGISTERS]; + +extern u32 *ppcPtr; +extern u8 *j8Ptr[32]; +extern u32 *j32Ptr[32]; + +void ppcInit(); +void ppcSetPtr(u32 *ptr); +void ppcShutdown(); + +void ppcAlign(int bytes); +void returnPC(); +void recRun(void (*func)(), u32 hw1, u32 hw2); +u8 dynMemRead8(u32 mem); +u16 dynMemRead16(u32 mem); +u32 dynMemRead32(u32 mem); +void dynMemWrite32(u32 mem, u32 val); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/ppc/ppc_mnemonics.h b/libpcsxcore/ppc/ppc_mnemonics.h new file mode 100644 index 00000000..3cc65258 --- /dev/null +++ b/libpcsxcore/ppc/ppc_mnemonics.h @@ -0,0 +1,529 @@ +// ppc_mnemonics.h + +#define INSTR (*(ppcPtr)++) + +/* Link register related */ +#define MFLR(REG) \ + {int _reg = (REG); \ + INSTR = (0x7C0802A6 | (_reg << 21));} + +#define MTLR(REG) \ + {int _reg = (REG); \ + INSTR = (0x7C0803A6 | (_reg << 21));} + +#define MTCTR(REG) \ + {int _reg = (REG); \ + INSTR = (0x7C0903A6 | (_reg << 21));} + +#define BLR() \ + {INSTR = (0x4E800020);} + +#define BGTLR() \ + {INSTR = (0x4D810020);} + + +/* Load ops */ +#define LI(REG, IMM) \ + {int _reg = (REG); \ + INSTR = (0x38000000 | (_reg << 21) | ((IMM) & 0xffff));} + +#define LIS(REG_DST, IMM) \ + {int _dst = (REG_DST); \ + INSTR = (0x3C000000 | (_dst << 21) | ((IMM) & 0xffff));} + +#define LWZ(REG_DST, OFFSET, REG) \ + {int _reg = (REG); int _dst=(REG_DST); \ + INSTR = (0x80000000 | (_dst << 21) | (_reg << 16) | ((OFFSET) & 0xffff));} + +#define LWZX(REG_DST, REG, REG_OFF) \ + {int _reg = (REG), _off = (REG_OFF); int _dst=(REG_DST); \ + INSTR = (0x7C00002E | (_dst << 21) | (_reg << 16) | (_off << 11));} + +#define LWBRX(REG_DST, REG, REG_OFF) \ + {int _reg = (REG), _off = (REG_OFF); int _dst=(REG_DST); \ + INSTR = (0x7C00042C | (_dst << 21) | (_reg << 16) | (_off << 11));} + +#define LHZ(REG_DST, OFFSET, REG) \ + {int _reg = (REG); int _dst=(REG_DST); \ + INSTR = (0xA0000000 | (_dst << 21) | (_reg << 16) | ((OFFSET) & 0xffff));} + +#define LHA(REG_DST, OFFSET, REG) \ + {int _reg = (REG); int _dst=(REG_DST); \ + INSTR = (0xA8000000 | (_dst << 21) | (_reg << 16) | ((OFFSET) & 0xffff));} + +#define LHBRX(REG_DST, REG, REG_OFF) \ + {int _reg = (REG), _off = (REG_OFF); int _dst=(REG_DST); \ + INSTR = (0x7C00062C | (_dst << 21) | (_reg << 16) | (_off << 11));} + +#define LBZ(REG_DST, OFFSET, REG) \ + {int _reg = (REG); int _dst=(REG_DST); \ + INSTR = (0x88000000 | (_dst << 21) | (_reg << 16) | ((OFFSET) & 0xffff));} + +#define LMW(REG_DST, OFFSET, REG) \ + {int _reg = (REG); int _dst=(REG_DST); \ + INSTR = (0xB8000000 | (_dst << 21) | (_reg << 16) | ((OFFSET) & 0xffff));} + + + +/* Store ops */ +#define STMW(REG_SRC, OFFSET, REG) \ + {int _reg = (REG), _src=(REG_SRC); \ + INSTR = (0xBC000000 | (_src << 21) | (_reg << 16) | ((OFFSET) & 0xffff));} + +#define STW(REG_SRC, OFFSET, REG) \ + {int _reg = (REG), _src=(REG_SRC); \ + INSTR = (0x90000000 | (_src << 21) | (_reg << 16) | ((OFFSET) & 0xffff));} + +#define STWBRX(REG_SRC, REG, REG_OFF) \ + {int _reg = (REG), _src=(REG_SRC), _off = (REG_OFF); \ + INSTR = (0x7C00052C | (_src << 21) | (_reg << 16) | (_off << 11));} + +#define STH(REG_SRC, OFFSET, REG) \ + {int _reg = (REG), _src=(REG_SRC); \ + INSTR = (0xB0000000 | (_src << 21) | (_reg << 16) | ((OFFSET) & 0xffff));} + +#define STHBRX(REG_SRC, REG, REG_OFF) \ + {int _reg = (REG), _src=(REG_SRC), _off = (REG_OFF); \ + INSTR = (0x7C00072C | (_src << 21) | (_reg << 16) | (_off << 11));} + +#define STB(REG_SRC, OFFSET, REG) \ + {int _reg = (REG), _src=(REG_SRC); \ + INSTR = (0x98000000 | (_src << 21) | (_reg << 16) | ((OFFSET) & 0xffff));} + +#define STWU(REG_SRC, OFFSET, REG) \ + {int _reg = (REG), _src=(REG_SRC); \ + INSTR = (0x94000000 | (_src << 21) | (_reg << 16) | ((OFFSET) & 0xffff));} + + +/* Arithmic ops */ +#define ADDI(REG_DST, REG_SRC, IMM) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x38000000 | (_dst << 21) | (_src << 16) | ((IMM) & 0xffff));} + +#define ADDIS(REG_DST, REG_SRC, IMM) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x3C000000 | (_dst << 21) | (_src << 16) | ((IMM) & 0xffff));} + +#define MR(REG_DST, REG_SRC) \ + {int __src = (REG_SRC); int __dst=(REG_DST); \ + if (__src != __dst) {ADDI(__dst, __src, 0)}} + +#define ADD(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000214 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define ADDO(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000614 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define ADDEO(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000514 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define ADDE(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000114 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define ADDCO(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000414 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define ADDIC(REG_DST, REG_SRC, IMM) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x30000000 | (_dst << 21) | (_src << 16) | ((IMM) & 0xffff));} + +#define ADDIC_(REG_DST, REG_SRC, IMM) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x34000000 | (_dst << 21) | (_src << 16) | ((IMM) & 0xffff));} + +#define ADDZE(REG_DST, REG_SRC) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x7C000194 | (_dst << 21) | (_src << 16));} + +#define SUBF(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000050 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define SUBFO(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000450 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define SUBFC(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000010 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define SUBFE(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000110 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define SUBFCO(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000410 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define SUBFCO_(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000411 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define SUB(REG_DST, REG1, REG2) \ + {SUBF(REG_DST, REG2, REG1)} + +#define SUBO(REG_DST, REG1, REG2) \ + {SUBFO(REG_DST, REG2, REG1)} + +#define SUBCO(REG_DST, REG1, REG2) \ + {SUBFCO(REG_DST, REG2, REG1)} + +#define SUBCO_(REG_DST, REG1, REG2) \ + {SUBFCO_(REG_DST, REG2, REG1)} + +#define SRAWI(REG_DST, REG_SRC, SHIFT) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x7C000670 | (_src << 21) | (_dst << 16) | (SHIFT << 11));} + +#define MULHW(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000096 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define MULLW(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C0001D6 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define MULHWU(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000016 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define MULLI(REG_DST, REG_SRC, IMM) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x1C000000 | (_dst << 21) | (_src << 16) | ((IMM) & 0xffff));} + +#define DIVW(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C0003D6 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + +#define DIVWU(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000396 | (_dst << 21) | (_reg1 << 16) | (_reg2 << 11));} + + +/* Branch ops */ +#define B_FROM(VAR) VAR = ppcPtr +#define B_DST(VAR) *VAR = *VAR | (((s16)((u32)ppcPtr - (u32)VAR)) & 0xfffc) + +#define B(DST) \ + {INSTR = (0x48000000 | (((s32)(((DST)+1)<<2)) & 0x3fffffc));} + +#define B_L(VAR) \ + {B_FROM(VAR); INSTR = (0x48000000);} + +#define BA(DST) \ + {INSTR = (0x48000002 | ((s32)((DST) & 0x3fffffc)));} + +#define BLA(DST) \ + {INSTR = (0x48000003 | ((s32)((DST) & 0x3fffffc)));} + +#define BNS(DST) \ + {INSTR = (0x40830000 | (((s16)(((DST)+1)<<2)) & 0xfffc));} + +#define BNE(DST) \ + {INSTR = (0x40820000 | (((s16)(((DST)+1)<<2)) & 0xfffc));} + +#define BNE_L(VAR) \ + {B_FROM(VAR); INSTR = (0x40820000);} + +#define BEQ(DST) \ + {INSTR = (0x41820000 | (((s16)(((DST)+1)<<2)) & 0xfffc));} + +#define BEQ_L(VAR) \ + {B_FROM(VAR); INSTR = (0x41820000);} + +#define BLT(DST) \ + {INSTR = (0x41800000 | (((s16)(((DST)+1)<<2)) & 0xfffc));} + +#define BLT_L(VAR) \ + {B_FROM(VAR); INSTR = (0x41800000);} + +#define BGT(DST) \ + {INSTR = (0x41810000 | (((s16)(((DST)+1)<<2)) & 0xfffc));} + +#define BGT_L(VAR) \ + {B_FROM(VAR); INSTR = (0x41810000);} + +#define BGE(DST) \ + {INSTR = (0x40800000 | (((s16)(((DST)+1)<<2)) & 0xfffc));} + +#define BGE_L(VAR) \ + {B_FROM(VAR); INSTR = (0x40800000);} + +#define BLE(DST) \ + {INSTR = (0x40810000 | (((s16)(((DST)+1)<<2)) & 0xfffc));} + +#define BLE_L(VAR) \ + {B_FROM(VAR); INSTR = (0x40810000);} + +#define BCTRL() \ + {INSTR = (0x4E800421);} + +#define BCTR() \ + {INSTR = (0x4E800420);} + + +/* compare ops */ +#define CMPLWI(REG, IMM) \ + {int _reg = (REG); \ + INSTR = (0x28000000 | (_reg << 16) | ((IMM) & 0xffff));} + +#define CMPLWI2(REG, IMM) \ + {int _reg = (REG); \ + INSTR = (0x29000000 | (_reg << 16) | ((IMM) & 0xffff));} + +#define CMPLWI7(REG, IMM) \ + {int _reg = (REG); \ + INSTR = (0x2B800000 | (_reg << 16) | ((IMM) & 0xffff));} + +#define CMPLW(REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); \ + INSTR = (0x7C000040 | (_reg1 << 16) | (_reg2 << 11));} + +#define CMPLW1(REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); \ + INSTR = (0x7C800040 | (_reg1 << 16) | (_reg2 << 11));} + +#define CMPLW2(REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); \ + INSTR = (0x7D000040 | (_reg1 << 16) | (_reg2 << 11));} + +#define CMPW(REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); \ + INSTR = (0x7C000000 | (_reg1 << 16) | (_reg2 << 11));} + +#define CMPW1(REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); \ + INSTR = (0x7C800000 | (_reg1 << 16) | (_reg2 << 11));} + +#define CMPW2(REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); \ + INSTR = (0x7D000000 | (_reg1 << 16) | (_reg2 << 11));} + +#define CMPWI(REG, IMM) \ + {int _reg = (REG); \ + INSTR = (0x2C000000 | (_reg << 16) | ((IMM) & 0xffff));} + +#define CMPWI2(REG, IMM) \ + {int _reg = (REG); \ + INSTR = (0x2D000000 | (_reg << 16) | ((IMM) & 0xffff));} + +#define MTCRF(MASK, REG) \ + {int _reg = (REG); \ + INSTR = (0x7C000120 | (_reg << 21) | (((MASK)&0xff)<<12));} + +#define MFCR(REG) \ + {int _reg = (REG); \ + INSTR = (0x7C000026 | (_reg << 21));} + +#define CROR(CR_DST, CR1, CR2) \ + {INSTR = (0x4C000382 | ((CR_DST) << 21) | ((CR1) << 16) | ((CR2) << 11));} + +#define CRXOR(CR_DST, CR1, CR2) \ + {INSTR = (0x4C000182 | ((CR_DST) << 21) | ((CR1) << 16) | ((CR2) << 11));} + +#define CRNAND(CR_DST, CR1, CR2) \ + {INSTR = (0x4C0001C2 | ((CR_DST) << 21) | ((CR1) << 16) | ((CR2) << 11));} + +#define CRANDC(CR_DST, CR1, CR2) \ + {INSTR = (0x4C000102 | ((CR_DST) << 21) | ((CR1) << 16) | ((CR2) << 11));} + + +/* shift ops */ +#define RLWINM(REG_DST, REG_SRC, SHIFT, START, END) \ + {int _src = (REG_SRC); int _dst = (REG_DST); \ + INSTR = (0x54000000 | (_src << 21) | (_dst << 16) | (SHIFT << 11) | (START << 6) | (END << 1));} + +#define RLWINM_(REG_DST, REG_SRC, SHIFT, START, END) \ + {int _src = (REG_SRC); int _dst = (REG_DST); \ + INSTR = (0x54000001 | (_src << 21) | (_dst << 16) | (SHIFT << 11) | (START << 6) | (END << 1));} + +#define CLRRWI(REG_DST, REG_SRC, LEN) \ + RLWINM(REG_DST, REG_SRC, 0, 0, 31-LEN) + +#define SLWI(REG_DST, REG_SRC, SHIFT) \ + {int _shift = (SHIFT); \ + if (_shift==0) {MR(REG_DST, REG_SRC)} else \ + {RLWINM(REG_DST, REG_SRC, _shift, 0, 31-_shift)}} + +#define SRWI(REG_DST, REG_SRC, SHIFT) \ + {int _shift = (SHIFT); \ + if (_shift==0) {MR(REG_DST, REG_SRC)} else \ + RLWINM(REG_DST, REG_SRC, 32-_shift, _shift, 31)} + +#define SLW(REG_DST, REG_SRC, REG_SHIFT) \ + {int _src = (REG_SRC), _shift = (REG_SHIFT); int _dst = (REG_DST); \ + INSTR = (0x7C000030 | (_src << 21) | (_dst << 16) | (_shift << 11));} + +#define SRW(REG_DST, REG_SRC, REG_SHIFT) \ + {int _src = (REG_SRC), _shift = (REG_SHIFT); int _dst = (REG_DST); \ + INSTR = (0x7C000430 | (_src << 21) | (_dst << 16) | (_shift << 11));} + +#define SRAW(REG_DST, REG_SRC, REG_SHIFT) \ + {int _src = (REG_SRC), _shift = (REG_SHIFT); int _dst = (REG_DST); \ + INSTR = (0x7C000630 | (_src << 21) | (_dst << 16) | (_shift << 11));} + +#define SRAWI(REG_DST, REG_SRC, SHIFT) \ + {int _src = (REG_SRC); int _dst = (REG_DST); int _shift = (SHIFT); \ + if (_shift==0) {MR(REG_DST, REG_SRC)} else \ + INSTR = (0x7C000670 | (_src << 21) | (_dst << 16) | (_shift << 11));} + +#define RLWNM(REG_DST, REG_SRC, REG_SHIFT, START, END) \ + {int _src = (REG_SRC), _shift = (REG_SHIFT); int _dst = (REG_DST); \ + INSTR = (0x5C000000 | (_src << 21) | (_dst << 16) | (_shift << 11) | (START << 6) | (END << 1));} + +/* other ops */ +#define ORI(REG_DST, REG_SRC, IMM) \ + {int _src = (REG_SRC), _imm = (IMM); int _dst = (REG_DST); \ + if (!((_imm == 0) && ((_src^_dst) == 0))) \ + INSTR = (0x60000000 | (_src << 21) | (_dst << 16) | (_imm & 0xffff));} + +#define ORIS(REG_DST, REG_SRC, IMM) \ + {int _src = (REG_SRC), _imm = (IMM); int _dst = (REG_DST); \ + if (!((_imm == 0) && ((_src^_dst) == 0))) \ + INSTR = (0x64000000 | (_src << 21) | (_dst << 16) | (_imm & 0xffff));} + +#define OR(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000378 | (_reg1 << 21) | (_dst << 16) | (_reg2 << 11));} + +#define OR_(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000379 | (_reg1 << 21) | (_dst << 16) | (_reg2 << 11));} + +#define XORI(REG_DST, REG_SRC, IMM) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x68000000 | (_src << 21) | (_dst << 16) | ((IMM) & 0xffff));} + +#define XOR(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000278 | (_reg1 << 21) | (_dst << 16) | (_reg2 << 11));} + +#define XOR_(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000279 | (_reg1 << 21) | (_dst << 16) | (_reg2 << 11));} + +#define ANDI_(REG_DST, REG_SRC, IMM) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x70000000 | (_src << 21) | (_dst << 16) | ((IMM) & 0xffff));} + +#define AND(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C000038 | (_reg1 << 21) | (_dst << 16) | (_reg2 << 11));} + +#define NOR(REG_DST, REG1, REG2) \ + {int _reg1 = (REG1), _reg2 = (REG2); int _dst=(REG_DST); \ + INSTR = (0x7C0000f8 | (_reg1 << 21) | (_dst << 16) | (_reg2 << 11));} + +#define NEG(REG_DST, REG_SRC) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x7C0000D0 | (_dst << 21) | (_src << 16));} + +#define NOP() \ + {INSTR = 0x60000000;} + +#define MCRXR(CR_DST) \ + {INSTR = (0x7C000400 | (CR_DST << 23));} + +#define EXTSB(REG_DST, REG_SRC) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x7C000774 | (_src << 21) | (_dst << 16));} + +#define EXTSH(REG_DST, REG_SRC) \ + {int _src = (REG_SRC); int _dst=(REG_DST); \ + INSTR = (0x7C000734 | (_src << 21) | (_dst << 16));} + + +/* floating point ops */ +#define FDIVS(FPR_DST, FPR1, FPR2) \ + {INSTR = (0xEC000024 | (FPR_DST << 21) | (FPR1 << 16) | (FPR2 << 11));} + +#define FDIV(FPR_DST, FPR1, FPR2) \ + {INSTR = (0xFC000024 | (FPR_DST << 21) | (FPR1 << 16) | (FPR2 << 11));} + +#define FMULS(FPR_DST, FPR1, FPR2) \ + {INSTR = (0xEC000032 | (FPR_DST << 21) | (FPR1 << 16) | (FPR2 << 11));} + +#define FMUL(FPR_DST, FPR1, FPR2) \ + {INSTR = (0xFC000032 | (FPR_DST << 21) | (FPR1 << 16) | (FPR2 << 11));} + +#define FADDS(FPR_DST, FPR1, FPR2) \ + {INSTR = (0xEC00002A | (FPR_DST << 21) | (FPR1 << 16) | (FPR2 << 11));} + +#define FADD(FPR_DST, FPR1, FPR2) \ + {INSTR = (0xFC00002A | (FPR_DST << 21) | (FPR1 << 16) | (FPR2 << 11));} + +#define FRSP(FPR_DST, FPR_SRC) \ + {INSTR = (0xFC000018 | (FPR_DST << 21) | (FPR_SRC << 11));} + +#define FCTIW(FPR_DST, FPR_SRC) \ + {INSTR = (0xFC00001C | (FPR_DST << 21) | (FPR_SRC << 11));} + + +#define LFS(FPR_DST, OFFSET, REG) \ + {INSTR = (0xC0000000 | (FPR_DST << 21) | (REG << 16) | ((OFFSET) & 0xffff));} + +#define STFS(FPR_DST, OFFSET, REG) \ + {INSTR = (0xD0000000 | (FPR_DST << 21) | (REG << 16) | ((OFFSET) & 0xffff));} + +#define LFD(FPR_DST, OFFSET, REG) \ + {INSTR = (0xC8000000 | (FPR_DST << 21) | (REG << 16) | ((OFFSET) & 0xffff));} + +#define STFD(FPR_DST, OFFSET, REG) \ + {INSTR = (0xD8000000 | (FPR_DST << 21) | (REG << 16) | ((OFFSET) & 0xffff));} + + + +/* extra combined opcodes */ +#if 1 +#define LIW(REG, IMM) /* Load Immidiate Word */ \ +{ \ + int __reg = (REG); u32 __imm = (u32)(IMM); \ + if ((s32)__imm == (s32)((s16)__imm)) \ + { \ + LI(__reg, (s32)((s16)__imm)); \ + } else if (__reg == 0) { \ + LIS(__reg, (((u32)__imm)>>16)); \ + if ((((u32)__imm) & 0xffff) != 0) \ + { \ + ORI(__reg, __reg, __imm); \ + } \ + } else { \ + if ((((u32)__imm) & 0xffff) == 0) { \ + LIS(__reg, (((u32)__imm)>>16)); \ + } else { \ + LI(__reg, __imm); \ + if ((__imm & 0x8000) == 0) { \ + ADDIS(__reg, __reg, ((u32)__imm)>>16); \ + } else { \ + ADDIS(__reg, __reg, ((((u32)__imm)>>16) & 0xffff) + 1); \ + } \ + } \ + /*if ((((u32)__imm) & 0xffff) != 0) \ + { \ + ORI(__reg, __reg, __imm); \ + }*/ \ + } \ +} +#else +#define LIW(REG, IMM) /* Load Immidiate Word */ \ +{ \ + int __reg = (REG); u32 __imm = (u32)(IMM); \ + if ((s32)__imm == (s32)((s16)__imm)) \ + { \ + LI(__reg, (s32)((s16)__imm)); \ + } \ + else \ + { \ + LIS(__reg, (((u32)__imm)>>16)); \ + if ((((u32)__imm) & 0xffff) != 0) \ + { \ + ORI(__reg, __reg, __imm); \ + } \ + } \ +} +#endif diff --git a/libpcsxcore/ppc/reguse.c b/libpcsxcore/ppc/reguse.c new file mode 100644 index 00000000..47d70a54 --- /dev/null +++ b/libpcsxcore/ppc/reguse.c @@ -0,0 +1,419 @@ + +#include "../psxcommon.h" +#include "reguse.h" + +#include "../r3000a.h" + +//#define SAME_CYCLE_MODE + +static const int useBSC[64] = { + /*recSPECIAL*/ REGUSE_SUB | REGUSE_SPECIAL, + /*recREGIMM*/ REGUSE_SUB | REGUSE_REGIMM, + /*recJ*/ REGUSE_JUMP, + /*recJAL*/ REGUSE_JUMP | REGUSE_R31_W, + /*recBEQ*/ REGUSE_BRANCH | REGUSE_RS_R | REGUSE_RT_R, + /*recBNE*/ REGUSE_BRANCH | REGUSE_RS_R | REGUSE_RT_R, + /*recBLEZ*/ REGUSE_BRANCH | REGUSE_RS_R, + /*recBGTZ*/ REGUSE_BRANCH | REGUSE_RS_R, + /*recADDI*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_W, + /*recADDIU*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_W, + /*recSLTI*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_W, + /*recSLTIU*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_W, + /*recANDI*/ REGUSE_LOGIC | REGUSE_RS_R | REGUSE_RT_W, + /*recORI*/ REGUSE_LOGIC | REGUSE_RS_R | REGUSE_RT_W, + /*recXORI*/ REGUSE_LOGIC | REGUSE_RS_R | REGUSE_RT_W, + /*recLUI*/ REGUSE_ACC | REGUSE_RT_W, + /*recCOP0*/ REGUSE_SUB | REGUSE_COP0, + REGUSE_NONE, + /*recCOP2*/ REGUSE_SUB | REGUSE_COP2, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + /*recLB*/ REGUSE_MEM_R | REGUSE_RS_R | REGUSE_RT_W, + /*recLH*/ REGUSE_MEM_R | REGUSE_RS_R | REGUSE_RT_W, + /*recLWL*/ REGUSE_MEM_R | REGUSE_RS_R | REGUSE_RT, + /*recLW*/ REGUSE_MEM_R | REGUSE_RS_R | REGUSE_RT_W, + /*recLBU*/ REGUSE_MEM_R | REGUSE_RS_R | REGUSE_RT_W, + /*recLHU*/ REGUSE_MEM_R | REGUSE_RS_R | REGUSE_RT_W, + /*recLWR*/ REGUSE_MEM_R | REGUSE_RS_R | REGUSE_RT, + REGUSE_NONE, + /*recSB*/ REGUSE_MEM_W | REGUSE_RS_R | REGUSE_RT_R, + /*recSH*/ REGUSE_MEM_W | REGUSE_RS_R | REGUSE_RT_R, + /*recSWL*/ REGUSE_MEM | REGUSE_RS_R | REGUSE_RT_R, + /*recSW*/ REGUSE_MEM_W | REGUSE_RS_R | REGUSE_RT_R, + REGUSE_NONE, REGUSE_NONE, + /*recSWR*/ REGUSE_MEM | REGUSE_RS_R | REGUSE_RT_R, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + /*recLWC2*/ REGUSE_MEM_R | REGUSE_RS_R | REGUSE_COP2_RT_W, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, + /*recSWC2*/ REGUSE_MEM_W | REGUSE_RS_R | REGUSE_COP2_RT_R, + /*recHLE*/ REGUSE_UNKNOWN, // TODO: can this be done in a better way + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE +}; + +static const int useSPC[64] = { + /*recSLL*/ REGUSE_ACC | REGUSE_RT_R | REGUSE_RD_W, + REGUSE_NONE, + /*recSRL*/ REGUSE_ACC | REGUSE_RT_R | REGUSE_RD_W, + /*recSRA*/ REGUSE_ACC | REGUSE_RT_R | REGUSE_RD_W, + /*recSLLV*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + REGUSE_NONE, + /*recSRLV*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + /*recSRAV*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + /*recJR*/ REGUSE_JUMPR | REGUSE_RS_R, + /*recJALR*/ REGUSE_JUMPR | REGUSE_RS_R | REGUSE_RD_W, + REGUSE_NONE, REGUSE_NONE, + /*rSYSCALL*/ REGUSE_SYS | REGUSE_PC | REGUSE_COP0_STATUS | REGUSE_EXCEPTION, + /*recBREAK*/ REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, + /*recMFHI*/ REGUSE_LOGIC | REGUSE_RD_W | REGUSE_HI_R, + /*recMTHI*/ REGUSE_LOGIC | REGUSE_RS_R | REGUSE_HI_W, + /*recMFLO*/ REGUSE_LOGIC | REGUSE_RD_W | REGUSE_LO_R, + /*recMTLO*/ REGUSE_LOGIC | REGUSE_RS_R | REGUSE_LO_W, + REGUSE_NONE, REGUSE_NONE , REGUSE_NONE, REGUSE_NONE, + /*recMULT*/ REGUSE_MULT | REGUSE_RS_R | REGUSE_RT_R | REGUSE_LO_W | REGUSE_HI_W, + /*recMULTU*/ REGUSE_MULT | REGUSE_RS_R | REGUSE_RT_R | REGUSE_LO_W | REGUSE_HI_W, + /*recDIV*/ REGUSE_MULT | REGUSE_RS_R | REGUSE_RT_R | REGUSE_LO_W | REGUSE_HI_W, + /*recDIVU*/ REGUSE_MULT | REGUSE_RS_R | REGUSE_RT_R | REGUSE_LO_W | REGUSE_HI_W, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + /*recADD*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + /*recADDU*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + /*recSUB*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + /*recSUBU*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + /*recAND*/ REGUSE_LOGIC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + /*recOR*/ REGUSE_LOGIC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + /*recXOR*/ REGUSE_LOGIC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + /*recNOR*/ REGUSE_LOGIC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + REGUSE_NONE, REGUSE_NONE, + /*recSLT*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + /*recSLTU*/ REGUSE_ACC | REGUSE_RS_R | REGUSE_RT_R | REGUSE_RD_W, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE +}; + +static const int useREGIMM[32] = { + /*recBLTZ*/ REGUSE_BRANCH | REGUSE_RS_R, + /*recBGEZ*/ REGUSE_BRANCH | REGUSE_RS_R, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, + /*recBLTZAL*/REGUSE_BRANCH | REGUSE_RS_R | REGUSE_R31_W, + /*recBGEZAL*/REGUSE_BRANCH | REGUSE_RS_R | REGUSE_R31_W, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE +}; + +static const int useCP0[32] = { + /*recMFC0*/ REGUSE_LOGIC | REGUSE_RT_W | REGUSE_COP0_RD_R, + REGUSE_NONE, + /*recCFC0*/ REGUSE_LOGIC | REGUSE_RT_W | REGUSE_COP0_RD_R, + REGUSE_NONE, + /*recMTC0*/ REGUSE_LOGIC | REGUSE_RT_R | REGUSE_COP0_RD_W, + REGUSE_NONE, + /*recCTC0*/ REGUSE_LOGIC | REGUSE_RT_R | REGUSE_COP0_RD_W, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + /*recRFE*/ REGUSE_LOGIC | REGUSE_COP0_STATUS, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE +}; + +// TODO: make more explicit +static const int useCP2[64] = { + /*recBASIC*/ REGUSE_SUB | REGUSE_BASIC, + /*recRTPS*/ REGUSE_GTE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + /*recNCLIP*/ REGUSE_GTE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + /*recOP*/ REGUSE_GTE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + /*recDPCS*/ REGUSE_GTE, + /*recINTPL*/ REGUSE_GTE, + /*recMVMVA*/ REGUSE_GTE, + /*recNCDS*/ REGUSE_GTE, + /*recCDP*/ REGUSE_GTE, + REGUSE_NONE, + /*recNCDT*/ REGUSE_GTE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + /*recNCCS*/ REGUSE_GTE, + /*recCC*/ REGUSE_GTE, + REGUSE_NONE, + /*recNCS*/ REGUSE_GTE, + REGUSE_NONE, + /*recNCT*/ REGUSE_GTE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, + /*recSQR*/ REGUSE_GTE, + /*recDCPL*/ REGUSE_GTE, + /*recDPCT*/ REGUSE_GTE, + REGUSE_NONE, REGUSE_NONE, + /*recAVSZ3*/ REGUSE_GTE, + /*recAVSZ4*/ REGUSE_GTE, + REGUSE_NONE, + /*recRTPT*/ REGUSE_GTE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, REGUSE_NONE, + /*recGPF*/ REGUSE_GTE, + /*recGPL*/ REGUSE_GTE, + /*recNCCT*/ REGUSE_GTE +}; + +static const int useCP2BSC[32] = { + /*recMFC2*/ REGUSE_LOGIC | REGUSE_RT_W | REGUSE_COP2_RD_R, + REGUSE_NONE, + /*recCFC2*/ REGUSE_LOGIC | REGUSE_RT_W | REGUSE_COP2_RD_R, + REGUSE_NONE, + /*recMTC2*/ REGUSE_LOGIC | REGUSE_RT_R | REGUSE_COP2_RD_W, + REGUSE_NONE, + /*recCTC2*/ REGUSE_LOGIC | REGUSE_RT_R | REGUSE_COP2_RD_W, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE, + REGUSE_NONE +}; + +static int getRegUse(u32 code) __attribute__ ((__pure__)); +static int getRegUse(u32 code) +{ + int use = useBSC[code>>26]; + + switch (use & REGUSE_SUBMASK) { + case REGUSE_NONE: + break; + case REGUSE_SPECIAL: + use = useSPC[_fFunct_(code)]; + break; + case REGUSE_REGIMM: + use = useREGIMM[_fRt_(code)]; + break; + case REGUSE_COP0: + use = useCP0[_fRs_(code)]; + break; + case REGUSE_COP2: + use = useCP2[_fFunct_(code)]; + if ((use & REGUSE_SUBMASK) == REGUSE_BASIC) + use = useCP2BSC[_fRs_(code)]; + break; + default: + use = REGUSE_UNKNOWN; + break; + } + + if ((use & REGUSE_COP0_RD_W)) { + if (_fRd_(code) == 12 || _fRd_(code) == 13) { + use = REGUSE_UNKNOWN; + } + } + + return use; +} + +/* returns how psxreg is used in the code instruction */ +int useOfPsxReg(u32 code, int use, int psxreg) +{ + int retval = REGUSE_NONE; + + // get use if it wasn't supplied + if (-1 == use) use = getRegUse(code); + + // if we don't know what the usage is, assume it's read from + if (REGUSE_UNKNOWN == use) return REGUSE_READ; + + if (psxreg < 32) { + // check for 3 standard types + if ((use & REGUSE_RT) && _fRt_(code) == (u32)psxreg) { + retval |= ((use & REGUSE_RT_R) ? REGUSE_READ:0) | ((use & REGUSE_RT_W) ? REGUSE_WRITE:0); + } + if ((use & REGUSE_RS) && _fRs_(code) == (u32)psxreg) { + retval |= ((use & REGUSE_RS_R) ? REGUSE_READ:0) | ((use & REGUSE_RS_W) ? REGUSE_WRITE:0); + } + if ((use & REGUSE_RD) && _fRd_(code) == (u32)psxreg) { + retval |= ((use & REGUSE_RD_R) ? REGUSE_READ:0) | ((use & REGUSE_RD_W) ? REGUSE_WRITE:0); + } + // some instructions explicitly writes to r31 + if ((use & REGUSE_R31_W) && 31 == psxreg) { + retval |= REGUSE_WRITE; + } + } else if (psxreg == 32) { // Special register LO + retval |= ((use & REGUSE_LO_R) ? REGUSE_READ:0) | ((use & REGUSE_LO_W) ? REGUSE_WRITE:0); + } else if (psxreg == 33) { // Special register HI + retval |= ((use & REGUSE_HI_R) ? REGUSE_READ:0) | ((use & REGUSE_HI_W) ? REGUSE_WRITE:0); + } + + return retval; +} + +//#define NOREGUSE_FOLLOW + +static int _nextPsxRegUse(u32 pc, int psxreg, int numInstr) __attribute__ ((__pure__, __unused__)); +static int _nextPsxRegUse(u32 pc, int psxreg, int numInstr) +{ + u32 *ptr, code, bPC = 0; + int i, use, reguse = 0; + + for (i=0; i= 2) break; // only follow 1 branch + } + if (reguse == REGUSE_NONE) return reguse; + + if (bPC) { + reguse1 = reguse; + pc = bPC; bPC = 0; + b = 1; + goto retry; + } + + return reguse1 | reguse; +#endif +} + +int isPsxRegUsed(u32 pc, int psxreg) +{ + int use = nextPsxRegUse(pc, psxreg); + + if (use == REGUSE_NONE) + return 2; // unknown use - assume it is used + else if (use & REGUSE_READ) + return 1; // the next use is a read + else + return 0; // the next use is a write, i.e. current value is not important +} diff --git a/libpcsxcore/ppc/reguse.h b/libpcsxcore/ppc/reguse.h new file mode 100644 index 00000000..de42dece --- /dev/null +++ b/libpcsxcore/ppc/reguse.h @@ -0,0 +1,83 @@ +#ifndef __REGUSE_H__ +#define __REGUSE_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +// include basic types +#include "../psxcommon.h" + +#define REGUSE_NONE 0x0000 +#define REGUSE_UNKNOWN 0x0001 + +//sub functions +#define REGUSE_SPECIAL 0x0002 +#define REGUSE_REGIMM 0x0004 +#define REGUSE_COP0 0x0006 +#define REGUSE_COP2 0x0008 +#define REGUSE_BASIC 0x000a +#define REGUSE_SUBMASK 0x000e /* sub function mask */ + +#define REGUSE_ACC 0x0010 /* accumulator */ +#define REGUSE_LOGIC 0x0020 /* logic operations */ +#define REGUSE_MULT 0x0030 /* multiplier */ +#define REGUSE_JUMP 0x0040 /* jump to dest */ +#define REGUSE_JUMPR 0x0050 /* jump to reg */ +#define REGUSE_BRANCH 0x0060 /* branch */ +#define REGUSE_MEM_R 0x0070 /* read from memory */ +#define REGUSE_MEM_W 0x0080 /* write to memory */ +#define REGUSE_MEM 0x0090 /* read and write to memory */ +#define REGUSE_SYS 0x00a0 /* syscall */ +#define REGUSE_GTE 0x00b0 /* gte operation */ +#define REGUSE_SUB 0x00f0 /* sub usage */ +#define REGUSE_TYPEM 0x00f0 /* type mask */ + + +#define REGUSE_RS_R 0x0100 +#define REGUSE_RS_W 0x0200 +#define REGUSE_RS (REGUSE_RS_R | REGUSE_RS_W) +#define REGUSE_RT_R 0x0400 +#define REGUSE_RT_W 0x0800 +#define REGUSE_RT (REGUSE_RT_R | REGUSE_RT_W) +#define REGUSE_RD_R 0x1000 +#define REGUSE_RD_W 0x2000 +#define REGUSE_RD (REGUSE_RD_R | REGUSE_RD_W) + +#define REGUSE_R31_W 0x4000 /* writes to link register (r31) */ +#define REGUSE_PC 0x8000 /* reads pc */ + +#define REGUSE_LO_R 0x10000 +#define REGUSE_LO_W 0x20000 +#define REGUSE_LO (REGUSE_LO_R | REGUSE_LO_W) +#define REGUSE_HI_R 0x40000 +#define REGUSE_HI_W 0x80000 +#define REGUSE_HI (REGUSE_HI_R | REGUSE_HI_W) + +#define REGUSE_COP0_RD_R 0x100000 +#define REGUSE_COP0_RD_W 0x200000 +#define REGUSE_COP0_RD (REGUSE_COP0_RD_R | REGUSE_COP0_RD_W) +#define REGUSE_COP0_STATUS 0x400000 +#define REGUSE_EXCEPTION 0x800000 + +#define REGUSE_COP2_RT_R 0x1000000 +#define REGUSE_COP2_RT_W 0x2000000 +#define REGUSE_COP2_RT (REGUSE_COP2_RT_R | REGUSE_COP2_RT_W) +#define REGUSE_COP2_RD_R 0x4000000 +#define REGUSE_COP2_RD_W 0x8000000 +#define REGUSE_COP2_RD (REGUSE_COP2_RD_R | REGUSE_COP2_RD_W) + + +// specific register use +#define REGUSE_READ 1 +#define REGUSE_WRITE 2 +#define REGUSE_RW 3 + +int useOfPsxReg(u32 code, int use, int psxreg) __attribute__ ((__pure__));; +int nextPsxRegUse(u32 pc, int psxreg) __attribute__ ((__pure__));; +int isPsxRegUsed(u32 pc, int psxreg) __attribute__ ((__pure__));; + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/ppf.c b/libpcsxcore/ppf.c new file mode 100644 index 00000000..45c8733c --- /dev/null +++ b/libpcsxcore/ppf.c @@ -0,0 +1,332 @@ +/* PPF Patch Support for PCSX-Reloaded + * Copyright (c) 2009, Wei Mingzhi . + * + * Based on P.E.Op.S CDR Plugin by Pete Bernert. + * Copyright (c) 2002, Pete Bernert. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include "psxcommon.h" +#include "ppf.h" +#include "cdrom.h" + +typedef struct tagPPF_DATA { + s32 addr; + s32 pos; + s32 anz; + struct tagPPF_DATA *pNext; +} PPF_DATA; + +typedef struct tagPPF_CACHE { + s32 addr; + struct tagPPF_DATA *pNext; +} PPF_CACHE; + +static PPF_CACHE *ppfCache = NULL; +static PPF_DATA *ppfHead = NULL, *ppfLast = NULL; +static int iPPFNum = 0; + +// using a linked data list, and address array +static void FillPPFCache() { + PPF_DATA *p; + PPF_CACHE *pc; + s32 lastaddr; + + p = ppfHead; + lastaddr = -1; + iPPFNum = 0; + + while (p != NULL) { + if (p->addr != lastaddr) iPPFNum++; + lastaddr = p->addr; + p = p->pNext; + } + + if (iPPFNum <= 0) return; + + pc = ppfCache = (PPF_CACHE *)malloc(iPPFNum * sizeof(PPF_CACHE)); + + iPPFNum--; + p = ppfHead; + lastaddr = -1; + + while (p != NULL) { + if (p->addr != lastaddr) { + pc->addr = p->addr; + pc->pNext = p; + pc++; + } + lastaddr = p->addr; + p = p->pNext; + } +} + +void FreePPFCache() { + PPF_DATA *p = ppfHead; + void *pn; + + while (p != NULL) { + pn = p->pNext; + free(p); + p = (PPF_DATA *)pn; + } + ppfHead = NULL; + ppfLast = NULL; + + if (ppfCache != NULL) free(ppfCache); + ppfCache = NULL; +} + +void CheckPPFCache(unsigned char *pB, unsigned char m, unsigned char s, unsigned char f) { + PPF_CACHE *pcstart, *pcend, *pcpos; + int addr = MSF2SECT(btoi(m), btoi(s), btoi(f)), pos, anz, start; + + if (ppfCache == NULL) return; + + pcstart = ppfCache; + if (addr < pcstart->addr) return; + pcend = ppfCache + iPPFNum; + if (addr > pcend->addr) return; + + while (1) { + if (addr == pcend->addr) { pcpos = pcend; break; } + + pcpos = pcstart + (pcend - pcstart) / 2; + if (pcpos == pcstart) break; + if (addr < pcpos->addr) { + pcend = pcpos; + continue; + } + if (addr > pcpos->addr) { + pcstart = pcpos; + continue; + } + break; + } + + if (addr == pcpos->addr) { + PPF_DATA *p = pcpos->pNext; + while (p != NULL && p->addr == addr) { + pos = p->pos - (CD_FRAMESIZE_RAW - DATA_SIZE); + anz = p->anz; + if (pos < 0) { start = -pos; pos = 0; anz -= start; } + else start = 0; + memcpy(pB + pos, (unsigned char *)(p + 1) + start, anz); + p = p->pNext; + } + } +} + +static void AddToPPF(s32 ladr, s32 pos, s32 anz, unsigned char *ppfmem) { + if (ppfHead == NULL) { + ppfHead = (PPF_DATA *)malloc(sizeof(PPF_DATA) + anz); + ppfHead->addr = ladr; + ppfHead->pNext = NULL; + ppfHead->pos = pos; + ppfHead->anz = anz; + memcpy(ppfHead + 1, ppfmem, anz); + iPPFNum = 1; + ppfLast = ppfHead; + } else { + PPF_DATA *p = ppfHead; + PPF_DATA *plast = NULL; + PPF_DATA *padd; + + if (ladr > ppfLast->addr || (ladr == ppfLast->addr && pos > ppfLast->pos)) { + p = NULL; + plast = ppfLast; + } else { + while (p != NULL) { + if (ladr < p->addr) break; + if (ladr == p->addr) { + while (p && ladr == p->addr && pos > p->pos) { + plast = p; + p = p->pNext; + } + break; + } + plast = p; + p = p->pNext; + } + } + + padd = (PPF_DATA *)malloc(sizeof(PPF_DATA) + anz); + padd->addr = ladr; + padd->pNext = p; + padd->pos = pos; + padd->anz = anz; + memcpy(padd + 1, ppfmem, anz); + iPPFNum++; + if (plast == NULL) ppfHead = padd; + else plast->pNext = padd; + + if (padd->pNext == NULL) ppfLast = padd; + } +} + +void BuildPPFCache() { + FILE *ppffile; + char buffer[12]; + char method, undo = 0, blockcheck = 0; + int dizlen, dizyn; + unsigned char ppfmem[512]; + char szPPF[MAXPATHLEN]; + int count, seekpos, pos; + u32 anz; // use 32-bit to avoid stupid overflows + s32 ladr, off, anx; + + FreePPFCache(); + + // Generate filename in the format of SLUS_123.45 + buffer[0] = toupper(CdromId[0]); + buffer[1] = toupper(CdromId[1]); + buffer[2] = toupper(CdromId[2]); + buffer[3] = toupper(CdromId[3]); + buffer[4] = '_'; + buffer[5] = CdromId[4]; + buffer[6] = CdromId[5]; + buffer[7] = CdromId[6]; + buffer[8] = '.'; + buffer[9] = CdromId[7]; + buffer[10] = CdromId[8]; + buffer[11] = '\0'; + + sprintf(szPPF, "%s%s", Config.PatchesDir, buffer); + + ppffile = fopen(szPPF, "rb"); + if (ppffile == NULL) return; + + memset(buffer, 0, 5); + fread(buffer, 3, 1, ppffile); + + if (strcmp(buffer, "PPF") != 0) { + SysPrintf(_("Invalid PPF patch: %s.\n"), szPPF); + fclose(ppffile); + return; + } + + fseek(ppffile, 5, SEEK_SET); + method = fgetc(ppffile); + + switch (method) { + case 0: // ppf1 + fseek(ppffile, 0, SEEK_END); + count = ftell(ppffile); + count -= 56; + seekpos = 56; + break; + + case 1: // ppf2 + fseek(ppffile, -8, SEEK_END); + + memset(buffer, 0, 5); + fread(buffer, 4, 1, ppffile); + + if (strcmp(".DIZ", buffer) != 0) { + dizyn = 0; + } else { + fread(&dizlen, 4, 1, ppffile); + dizlen = SWAP32(dizlen); + dizyn = 1; + } + + fseek(ppffile, 0, SEEK_END); + count = ftell(ppffile); + + if (dizyn == 0) { + count -= 1084; + seekpos = 1084; + } else { + count -= 1084; + count -= 38; + count -= dizlen; + seekpos = 1084; + } + break; + + case 2: // ppf3 + fseek(ppffile, 57, SEEK_SET); + blockcheck = fgetc(ppffile); + undo = fgetc(ppffile); + + fseek(ppffile, -6, SEEK_END); + memset(buffer, 0, 5); + fread(buffer, 4, 1, ppffile); + dizlen = 0; + + if (strcmp(".DIZ", buffer) == 0) { + fseek(ppffile, -2, SEEK_END); + fread(&dizlen, 2, 1, ppffile); + dizlen = SWAP32(dizlen); + dizlen += 36; + } + + fseek(ppffile, 0, SEEK_END); + count = ftell(ppffile); + count -= dizlen; + + if (blockcheck) { + seekpos = 1084; + count -= 1084; + } else { + seekpos = 60; + count -= 60; + } + break; + + default: + fclose(ppffile); + SysPrintf(_("Unsupported PPF version (%d).\n"), method + 1); + return; + } + + // now do the data reading + do { + fseek(ppffile, seekpos, SEEK_SET); + fread(&pos, 4, 1, ppffile); + pos = SWAP32(pos); + + if (method == 2) fread(buffer, 4, 1, ppffile); // skip 4 bytes on ppf3 (no int64 support here) + + anz = fgetc(ppffile); + fread(ppfmem, anz, 1, ppffile); + + ladr = pos / CD_FRAMESIZE_RAW; + off = pos % CD_FRAMESIZE_RAW; + + if (off + anz > CD_FRAMESIZE_RAW) { + anx = off + anz - CD_FRAMESIZE_RAW; + anz -= (unsigned char)anx; + AddToPPF(ladr + 1, 0, anx, &ppfmem[anz]); + } + + AddToPPF(ladr, off, anz, ppfmem); // add to link list + + if (method == 2) { + if (undo) anz += anz; + anz += 4; + } + + seekpos = seekpos + 5 + anz; + count = count - 5 - anz; + } while (count != 0); // loop til end + + fclose(ppffile); + + FillPPFCache(); // build address array + + SysPrintf(_("Loaded PPF %d.0 patch: %s.\n"), method + 1, szPPF); +} diff --git a/libpcsxcore/ppf.h b/libpcsxcore/ppf.h new file mode 100644 index 00000000..f578028b --- /dev/null +++ b/libpcsxcore/ppf.h @@ -0,0 +1,33 @@ +/* PPF Patch Support for PCSX-Reloaded + * Copyright (c) 2009, Wei Mingzhi . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifndef __PPF_H__ +#define __PPF_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +void BuildPPFCache(); +void FreePPFCache(); +void CheckPPFCache(unsigned char *pB, unsigned char m, unsigned char s, unsigned char f); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/psemu_plugin_defs.h b/libpcsxcore/psemu_plugin_defs.h new file mode 100644 index 00000000..d1b05ac3 --- /dev/null +++ b/libpcsxcore/psemu_plugin_defs.h @@ -0,0 +1,285 @@ +#ifndef _PSEMU_PLUGIN_DEFS_H +#define _PSEMU_PLUGIN_DEFS_H + +#ifdef __cplusplus +extern "C" { +#endif + +// header version +#define _PPDK_HEADER_VERSION 3 + +#define PLUGIN_VERSION 1 + +// plugin type returned by PSEgetLibType (types can be merged if plugin is multi type!) +#define PSE_LT_CDR 1 +#define PSE_LT_GPU 2 +#define PSE_LT_SPU 4 +#define PSE_LT_PAD 8 +#define PSE_LT_NET 16 + +// DLL function return codes +#define PSE_ERR_SUCCESS 0 // every function in DLL if completed sucessfully should return this value +#define PSE_ERR_FATAL -1 // undefined error but fatal one, that kills all functionality + +// XXX_Init return values +// Those return values apply to all libraries +// currently obsolete - preserved for compatibilty + +#define PSE_INIT_ERR_SUCCESS 0 // initialization went OK +#define PSE_INIT_ERR_NOTCONFIGURED -2 // this driver is not configured +#define PSE_INIT_ERR_NOHARDWARE -3 // this driver can not operate properly on this hardware or hardware is not detected + +/* GPU PlugIn */ + +// GPU_Test return values + +// sucess, everything configured, and went OK. +#define PSE_GPU_ERR_SUCCESS 0 + +// ERRORS +// this error might be returned as critical error but none of below +#define PSE_GPU_ERR -20 + + +// this driver is not configured +#define PSE_GPU_ERR_NOTCONFIGURED PSE_GPU_ERR - 1 +// this driver failed Init +#define PSE_GPU_ERR_INIT PSE_GPU_ERR - 2 + +// WARNINGS +// this warning might be returned as undefined warning but allowing driver to continue +#define PSE_GPU_WARN 20 + +// GPU_Query - will be implemented soon + +typedef struct +{ + uint32_t flags; + uint32_t status; + void* window; + unsigned char reserved[100]; +} gpuQueryS; + +// gpuQueryS.flags +// if driver can operate in both modes it must support GPU_changeMode(); +#define PSE_GPU_FLAGS_FULLSCREEN 1 // this driver can operate in fullscreen mode +#define PSE_GPU_FLAGS_WINDOWED 2 // this driver can operate in windowed mode + +// gpuQueryS.status +#define PSE_GPU_STATUS_WINDOWWRONG 1 // this driver cannot operate in this windowed mode + +// GPU_Query End - will be implemented in v2 + + +/* CDR PlugIn */ + +// CDR_Test return values + +// sucess, everything configured, and went OK. +#define PSE_CDR_ERR_SUCCESS 0 + +// general failure (error undefined) +#define PSE_CDR_ERR_FAILURE -1 + +// ERRORS +#define PSE_CDR_ERR -40 +// this driver is not configured +#define PSE_CDR_ERR_NOTCONFIGURED PSE_CDR_ERR - 0 +// if this driver is unable to read data from medium +#define PSE_CDR_ERR_NOREAD PSE_CDR_ERR - 1 + +// WARNINGS +#define PSE_CDR_WARN 40 +// if this driver emulates lame mode ie. can read only 2048 tracks and sector header is emulated +// this might happen to CDROMS that do not support RAW mode reading - surelly it will kill many games +#define PSE_CDR_WARN_LAMECD PSE_CDR_WARN + 0 + + + + +/* SPU PlugIn */ + +// some info retricted (now!) + +// sucess, everything configured, and went OK. +#define PSE_SPU_ERR_SUCCESS 0 + +// ERRORS +// this error might be returned as critical error but none of below +#define PSE_SPU_ERR -60 + +// this driver is not configured +#define PSE_SPU_ERR_NOTCONFIGURED PSE_SPU_ERR - 1 +// this driver failed Init +#define PSE_SPU_ERR_INIT PSE_SPU_ERR - 2 + + +// WARNINGS +// this warning might be returned as undefined warning but allowing driver to continue +#define PSE_SPU_WARN 60 + + + + +/* PAD PlugIn */ + +/* + + functions that must be exported from PAD Plugin + + long PADinit(long flags); // called only once when PSEmu Starts + void PADshutdown(void); // called when PSEmu exits + long PADopen(PadInitS *); // called when PSEmu is running program + long PADclose(void); + long PADconfigure(void); + void PADabout(void); + long PADtest(void); // called from Configure Dialog and after PADopen(); + long PADquery(void); + + unsigned char PADstartPoll(int); + unsigned char PADpoll(unsigned char); + +*/ + +// PADquery responses (notice - values ORed) +// PSEmu will use them also in PADinit to tell Plugin which Ports will use +// notice that PSEmu will call PADinit and PADopen only once when they are from +// same plugin + +// might be used in port 1 +#define PSE_PAD_USE_PORT1 1 +// might be used in port 2 +#define PSE_PAD_USE_PORT2 2 + + + +// MOUSE SCPH-1030 +#define PSE_PAD_TYPE_MOUSE 1 +// NEGCON - 16 button analog controller SLPH-00001 +#define PSE_PAD_TYPE_NEGCON 2 +// GUN CONTROLLER - gun controller SLPH-00014 from Konami +#define PSE_PAD_TYPE_GUN 3 +// STANDARD PAD SCPH-1080, SCPH-1150 +#define PSE_PAD_TYPE_STANDARD 4 +// ANALOG JOYSTICK SCPH-1110 +#define PSE_PAD_TYPE_ANALOGJOY 5 +// GUNCON - gun controller SLPH-00034 from Namco +#define PSE_PAD_TYPE_GUNCON 6 +// ANALOG CONTROLLER SCPH-1150 +#define PSE_PAD_TYPE_ANALOGPAD 7 + + +// sucess, everything configured, and went OK. +#define PSE_PAD_ERR_SUCCESS 0 +// general plugin failure (undefined error) +#define PSE_PAD_ERR_FAILURE -1 + + +// ERRORS +// this error might be returned as critical error but none of below +#define PSE_PAD_ERR -80 +// this driver is not configured +#define PSE_PAD_ERR_NOTCONFIGURED PSE_PAD_ERR - 1 +// this driver failed Init +#define PSE_PAD_ERR_INIT PSE_PAD_ERR - 2 + + +// WARNINGS +// this warning might be returned as undefined warning but allowing driver to continue +#define PSE_PAD_WARN 80 + + +typedef struct +{ + // controler type - fill it withe predefined values above + unsigned char controllerType; + + // status of buttons - every controller fills this field + unsigned short buttonStatus; + + // for analog pad fill those next 4 bytes + // values are analog in range 0-255 where 127 is center position + unsigned char rightJoyX, rightJoyY, leftJoyX, leftJoyY; + + // for mouse fill those next 2 bytes + // values are in range -128 - 127 + unsigned char moveX, moveY; + + unsigned char reserved[91]; + +} PadDataS; + +/* NET PlugIn v2 */ +/* Added by linuzappz@pcsx.net */ + +/* Modes bits for NETsendData/NETrecvData */ +#define PSE_NET_BLOCKING 0x00000000 +#define PSE_NET_NONBLOCKING 0x00000001 + +/* note: unsupported fields should be zeroed. + +typedef struct { + char EmuName[32]; + char CdromID[9]; // ie. 'SCPH12345', no \0 trailing character + char CdromLabel[11]; + void *psxMem; + GPUshowScreenPic GPU_showScreenPic; + GPUdisplayText GPU_displayText; + PADsetSensitive PAD_setSensitive; + char GPUpath[256]; + char SPUpath[256]; + char CDRpath[256]; + char MCD1path[256]; + char MCD2path[256]; + char BIOSpath[256]; // 'HLE' for internal bios + char Unused[1024]; +} netInfo; + +*/ + +/* + basic funcs: + + long NETopen(HWND hWnd) + opens the connection. + shall return 0 on success, else -1. + -1 is also returned if the user selects offline mode. + + long NETclose() + closes the connection. + shall return 0 on success, else -1. + + void NETpause() + this is called when the user paused the emulator. + + void NETresume() + this is called when the user resumed the emulator. + + long NETqueryPlayer() + returns player number + + long NETsendPadData(void *pData, int Size) + this should be called for the first pad only on each side. + + long NETrecvPadData(void *pData, int Pad) + call this for Pad 1/2 to get the data sent by the above func. + + extended funcs: + + long NETsendData(void *pData, int Size, int Mode) + sends Size bytes from pData to the other side. + + long NETrecvData(void *pData, int Size, int Mode) + receives Size bytes from pData to the other side. + + void NETsetInfo(netInfo *info); + sets the netInfo struct. + + void NETkeypressed(int key) (linux only) + key is a XK_?? (X11) keycode. +*/ + +#ifdef __cplusplus +} +#endif +#endif // _PSEMU_PLUGIN_DEFS_H diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c new file mode 100644 index 00000000..f2751b86 --- /dev/null +++ b/libpcsxcore/psxbios.c @@ -0,0 +1,2810 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* + * Internal simulated HLE BIOS. + */ + +// TODO: implement all system calls, count the exact CPU cycles of system calls. + +#include "psxbios.h" +#include "psxhw.h" + +char *biosA0n[256] = { +// 0x00 + "open", "lseek", "read", "write", + "close", "ioctl", "exit", "sys_a0_07", + "getc", "putc", "todigit", "atof", + "strtoul", "strtol", "abs", "labs", +// 0x10 + "atoi", "atol", "atob", "setjmp", + "longjmp", "strcat", "strncat", "strcmp", + "strncmp", "strcpy", "strncpy", "strlen", + "index", "rindex", "strchr", "strrchr", +// 0x20 + "strpbrk", "strspn", "strcspn", "strtok", + "strstr", "toupper", "tolower", "bcopy", + "bzero", "bcmp", "memcpy", "memset", + "memmove", "memcmp", "memchr", "rand", +// 0x30 + "srand", "qsort", "strtod", "malloc", + "free", "lsearch", "bsearch", "calloc", + "realloc", "InitHeap", "_exit", "getchar", + "putchar", "gets", "puts", "printf", +// 0x40 + "sys_a0_40", "LoadTest", "Load", "Exec", + "FlushCache", "InstallInterruptHandler", "GPU_dw", "mem2vram", + "SendGPUStatus", "GPU_cw", "GPU_cwb", "SendPackets", + "sys_a0_4c", "GetGPUStatus", "GPU_sync", "sys_a0_4f", +// 0x50 + "sys_a0_50", "LoadExec", "GetSysSp", "sys_a0_53", + "_96_init()", "_bu_init()", "_96_remove()", "sys_a0_57", + "sys_a0_58", "sys_a0_59", "sys_a0_5a", "dev_tty_init", + "dev_tty_open", "sys_a0_5d", "dev_tty_ioctl","dev_cd_open", +// 0x60 + "dev_cd_read", "dev_cd_close", "dev_cd_firstfile", "dev_cd_nextfile", + "dev_cd_chdir", "dev_card_open", "dev_card_read", "dev_card_write", + "dev_card_close", "dev_card_firstfile", "dev_card_nextfile","dev_card_erase", + "dev_card_undelete","dev_card_format", "dev_card_rename", "dev_card_6f", +// 0x70 + "_bu_init", "_96_init", "_96_remove", "sys_a0_73", + "sys_a0_74", "sys_a0_75", "sys_a0_76", "sys_a0_77", + "_96_CdSeekL", "sys_a0_79", "sys_a0_7a", "sys_a0_7b", + "_96_CdGetStatus", "sys_a0_7d", "_96_CdRead", "sys_a0_7f", +// 0x80 + "sys_a0_80", "sys_a0_81", "sys_a0_82", "sys_a0_83", + "sys_a0_84", "_96_CdStop", "sys_a0_86", "sys_a0_87", + "sys_a0_88", "sys_a0_89", "sys_a0_8a", "sys_a0_8b", + "sys_a0_8c", "sys_a0_8d", "sys_a0_8e", "sys_a0_8f", +// 0x90 + "sys_a0_90", "sys_a0_91", "sys_a0_92", "sys_a0_93", + "sys_a0_94", "sys_a0_95", "AddCDROMDevice", "AddMemCardDevide", + "DisableKernelIORedirection", "EnableKernelIORedirection", "sys_a0_9a", "sys_a0_9b", + "SetConf", "GetConf", "sys_a0_9e", "SetMem", +// 0xa0 + "_boot", "SystemError", "EnqueueCdIntr", "DequeueCdIntr", + "sys_a0_a4", "ReadSector", "get_cd_status", "bufs_cb_0", + "bufs_cb_1", "bufs_cb_2", "bufs_cb_3", "_card_info", + "_card_load", "_card_auto", "bufs_cd_4", "sys_a0_af", +// 0xb0 + "sys_a0_b0", "sys_a0_b1", "do_a_long_jmp", "sys_a0_b3", + "?? sub_function", +}; + +char *biosB0n[256] = { +// 0x00 + "SysMalloc", "sys_b0_01", "sys_b0_02", "sys_b0_03", + "sys_b0_04", "sys_b0_05", "sys_b0_06", "DeliverEvent", + "OpenEvent", "CloseEvent", "WaitEvent", "TestEvent", + "EnableEvent", "DisableEvent", "OpenTh", "CloseTh", +// 0x10 + "ChangeTh", "sys_b0_11", "InitPAD", "StartPAD", + "StopPAD", "PAD_init", "PAD_dr", "ReturnFromExecption", + "ResetEntryInt", "HookEntryInt", "sys_b0_1a", "sys_b0_1b", + "sys_b0_1c", "sys_b0_1d", "sys_b0_1e", "sys_b0_1f", +// 0x20 + "UnDeliverEvent", "sys_b0_21", "sys_b0_22", "sys_b0_23", + "sys_b0_24", "sys_b0_25", "sys_b0_26", "sys_b0_27", + "sys_b0_28", "sys_b0_29", "sys_b0_2a", "sys_b0_2b", + "sys_b0_2c", "sys_b0_2d", "sys_b0_2e", "sys_b0_2f", +// 0x30 + "sys_b0_30", "sys_b0_31", "open", "lseek", + "read", "write", "close", "ioctl", + "exit", "sys_b0_39", "getc", "putc", + "getchar", "putchar", "gets", "puts", +// 0x40 + "cd", "format", "firstfile", "nextfile", + "rename", "delete", "undelete", "AddDevice", + "RemoteDevice", "PrintInstalledDevices", "InitCARD", "StartCARD", + "StopCARD", "sys_b0_4d", "_card_write", "_card_read", +// 0x50 + "_new_card", "Krom2RawAdd", "sys_b0_52", "sys_b0_53", + "_get_errno", "_get_error", "GetC0Table", "GetB0Table", + "_card_chan", "sys_b0_59", "sys_b0_5a", "ChangeClearPAD", + "_card_status", "_card_wait", +}; + +char *biosC0n[256] = { +// 0x00 + "InitRCnt", "InitException", "SysEnqIntRP", "SysDeqIntRP", + "get_free_EvCB_slot", "get_free_TCB_slot", "ExceptionHandler", "InstallExeptionHandler", + "SysInitMemory", "SysInitKMem", "ChangeClearRCnt", "SystemError", + "InitDefInt", "sys_c0_0d", "sys_c0_0e", "sys_c0_0f", +// 0x10 + "sys_c0_10", "sys_c0_11", "InstallDevices", "FlushStfInOutPut", + "sys_c0_14", "_cdevinput", "_cdevscan", "_circgetc", + "_circputc", "ioabort", "sys_c0_1a", "KernelRedirect", + "PatchAOTable", +}; + +//#define r0 (psxRegs.GPR.n.r0) +#define at (psxRegs.GPR.n.at) +#define v0 (psxRegs.GPR.n.v0) +#define v1 (psxRegs.GPR.n.v1) +#define a0 (psxRegs.GPR.n.a0) +#define a1 (psxRegs.GPR.n.a1) +#define a2 (psxRegs.GPR.n.a2) +#define a3 (psxRegs.GPR.n.a3) +#define t0 (psxRegs.GPR.n.t0) +#define t1 (psxRegs.GPR.n.t1) +#define t2 (psxRegs.GPR.n.t2) +#define t3 (psxRegs.GPR.n.t3) +#define t4 (psxRegs.GPR.n.t4) +#define t5 (psxRegs.GPR.n.t5) +#define t6 (psxRegs.GPR.n.t6) +#define t7 (psxRegs.GPR.n.t7) +#define t8 (psxRegs.GPR.n.t8) +#define t9 (psxRegs.GPR.n.t9) +#define s0 (psxRegs.GPR.n.s0) +#define s1 (psxRegs.GPR.n.s1) +#define s2 (psxRegs.GPR.n.s2) +#define s3 (psxRegs.GPR.n.s3) +#define s4 (psxRegs.GPR.n.s4) +#define s5 (psxRegs.GPR.n.s5) +#define s6 (psxRegs.GPR.n.s6) +#define s7 (psxRegs.GPR.n.s7) +#define k0 (psxRegs.GPR.n.k0) +#define k1 (psxRegs.GPR.n.k1) +#define gp (psxRegs.GPR.n.gp) +#define sp (psxRegs.GPR.n.sp) +#define fp (psxRegs.GPR.n.s8) +#define ra (psxRegs.GPR.n.ra) +#define pc0 (psxRegs.pc) + +#define Ra0 ((char *)PSXM(a0)) +#define Ra1 ((char *)PSXM(a1)) +#define Ra2 ((char *)PSXM(a2)) +#define Ra3 ((char *)PSXM(a3)) +#define Rv0 ((char *)PSXM(v0)) +#define Rsp ((char *)PSXM(sp)) + +typedef struct { + u32 desc; + s32 status; + s32 mode; + u32 fhandler; +} EvCB[32]; + +#define EvStUNUSED 0x0000 +#define EvStWAIT 0x1000 +#define EvStACTIVE 0x2000 +#define EvStALREADY 0x4000 + +#define EvMdINTR 0x1000 +#define EvMdNOINTR 0x2000 + +/* +typedef struct { + s32 next; + s32 func1; + s32 func2; + s32 pad; +} SysRPst; +*/ + +typedef struct { + s32 status; + s32 mode; + u32 reg[32]; + u32 func; +} TCB; + +typedef struct { + u32 _pc0; + u32 gp0; + u32 t_addr; + u32 t_size; + u32 d_addr; + u32 d_size; + u32 b_addr; + u32 b_size; + u32 S_addr; + u32 s_size; + u32 _sp, _fp, _gp, ret, base; +} EXEC; + +struct DIRENTRY { + char name[20]; + s32 attr; + s32 size; + u32 next; + s32 head; + char system[4]; +}; + +typedef struct { + char name[32]; + u32 mode; + u32 offset; + u32 size; + u32 mcfile; +} FileDesc; + +static u32 *jmp_int = NULL; +static int *pad_buf = NULL; +static char *pad_buf1 = NULL, *pad_buf2 = NULL; +static int pad_buf1len, pad_buf2len; + +static u32 regs[35]; +static EvCB *Event; +static EvCB *HwEV; // 0xf0 +static EvCB *EvEV; // 0xf1 +static EvCB *RcEV; // 0xf2 +static EvCB *UeEV; // 0xf3 +static EvCB *SwEV; // 0xf4 +static EvCB *ThEV; // 0xff +static u32 *heap_addr = NULL; +static u32 *heap_end = NULL; +static u32 SysIntRP[8]; +static int CardState = -1; +static TCB Thread[8]; +static int CurThread = 0; +static FileDesc FDesc[32]; + +boolean hleSoftCall = FALSE; + +static inline void softCall(u32 pc) { + pc0 = pc; + ra = 0x80001000; + + hleSoftCall = TRUE; + + while (pc0 != 0x80001000) psxCpu->ExecuteBlock(); + + hleSoftCall = FALSE; +} + +static inline void softCall2(u32 pc) { + u32 sra = ra; + pc0 = pc; + ra = 0x80001000; + + hleSoftCall = TRUE; + + while (pc0 != 0x80001000) psxCpu->ExecuteBlock(); + ra = sra; + + hleSoftCall = FALSE; +} + +static inline void DeliverEvent(u32 ev, u32 spec) { + if (Event[ev][spec].status != EvStACTIVE) return; + +// Event[ev][spec].status = EvStALREADY; + if (Event[ev][spec].mode == EvMdINTR) { + softCall2(Event[ev][spec].fhandler); + } else Event[ev][spec].status = EvStALREADY; +} + +static inline void SaveRegs() { + memcpy(regs, psxRegs.GPR.r, 32*4); + regs[32] = psxRegs.GPR.n.lo; + regs[33] = psxRegs.GPR.n.hi; + regs[34] = psxRegs.pc; +} + +static inline void LoadRegs() { + memcpy(psxRegs.GPR.r, regs, 32*4); + psxRegs.GPR.n.lo = regs[32]; + psxRegs.GPR.n.hi = regs[33]; +} + +/* * +// * +// * +// System calls A0 */ + + +void psxBios_abs() { // 0x0e + if ((s32)a0 < 0) v0 = -(s32)a0; + else v0 = a0; + pc0 = ra; +} + +void psxBios_labs() { // 0x0f + psxBios_abs(); +} + +void psxBios_atoi() { // 0x10 + s32 n = 0, f = 0; + char *p = (char *)Ra0; + + for (;;p++) { + switch (*p) { + case ' ': case '\t': continue; + case '-': f++; + case '+': p++; + } + break; + } + + while (*p >= '0' && *p <= '9') { + n = n * 10 + *p++ - '0'; + } + + v0 = (f ? -n : n); + pc0 = ra; +} + +void psxBios_atol() { // 0x11 + psxBios_atoi(); +} + +void psxBios_setjmp() { // 0x13 + u32 *jmp_buf = (u32 *)Ra0; + int i; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x13]); +#endif + + jmp_buf[0] = ra; + jmp_buf[1] = sp; + jmp_buf[2] = fp; + for (i = 0; i < 8; i++) // s0-s7 + jmp_buf[3 + i] = psxRegs.GPR.r[16 + i]; + jmp_buf[11] = gp; + + v0 = 0; pc0 = ra; +} + +void psxBios_longjmp() { // 0x14 + u32 *jmp_buf = (u32 *)Ra0; + int i; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x14]); +#endif + + ra = jmp_buf[0]; /* ra */ + sp = jmp_buf[1]; /* sp */ + fp = jmp_buf[2]; /* fp */ + for (i = 0; i < 8; i++) // s0-s7 + psxRegs.GPR.r[16 + i] = jmp_buf[3 + i]; + gp = jmp_buf[11]; /* gp */ + + v0 = a1; pc0 = ra; +} + +void psxBios_strcat() { // 0x15 + char *p1 = (char *)Ra0, *p2 = (char *)Ra1; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %s, %s\n", biosA0n[0x15], Ra0, Ra1); +#endif + + while (*p1++); + --p1; + while ((*p1++ = *p2++) != '\0'); + + v0 = a0; pc0 = ra; +} + +void psxBios_strncat() { // 0x16 + char *p1 = (char *)Ra0, *p2 = (char *)Ra1; + s32 n = a2; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %s (%x), %s (%x), %d\n", biosA0n[0x16], Ra0, a0, Ra1, a1, a2); +#endif + + while (*p1++); + --p1; + while ((*p1++ = *p2++) != '\0') { + if (--n < 0) { + *--p1 = '\0'; + break; + } + } + + v0 = a0; pc0 = ra; +} + +void psxBios_strcmp() { // 0x17 + char *p1 = (char *)Ra0, *p2 = (char *)Ra1; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %s (%x), %s (%x)\n", biosA0n[0x17], Ra0, a0, Ra1, a1); +#endif + + while (*p1 == *p2++) { + if (*p1++ == '\0') { + v0 = 0; + pc0 = ra; + return; + } + } + + v0 = (*p1 - *--p2); + pc0 = ra; +} + +void psxBios_strncmp() { // 0x18 + char *p1 = (char *)Ra0, *p2 = (char *)Ra1; + s32 n = a2; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %s (%x), %s (%x), %d\n", biosA0n[0x18], Ra0, a0, Ra1, a1, a2); +#endif + + while (--n >= 0 && *p1 == *p2++) { + if (*p1++ == '\0') { + v0 = 0; + pc0 = ra; + return; + } + } + + v0 = (n < 0 ? 0 : *p1 - *--p2); + pc0 = ra; +} + +void psxBios_strcpy() { // 0x19 + char *p1 = (char *)Ra0, *p2 = (char *)Ra1; + while ((*p1++ = *p2++) != '\0'); + + v0 = a0; pc0 = ra; +} + +void psxBios_strncpy() { // 0x1a + char *p1 = (char *)Ra0, *p2 = (char *)Ra1; + s32 n = a2, i; + + for (i = 0; i < n; i++) { + if ((*p1++ = *p2++) == '\0') { + while (++i < n) { + *p1++ = '\0'; + } + v0 = a0; pc0 = ra; + return; + } + } + + v0 = a0; pc0 = ra; +} + +void psxBios_strlen() { // 0x1b + char *p = (char *)Ra0; + v0 = 0; + while (*p++) v0++; + pc0 = ra; +} + +void psxBios_index() { // 0x1c + char *p = (char *)Ra0; + + do { + if (*p == a1) { + v0 = a0 + (p - (char *)Ra0); + pc0 = ra; + return; + } + } while (*p++ != '\0'); + + v0 = 0; pc0 = ra; +} + +void psxBios_rindex() { // 0x1d + char *p = (char *)Ra0; + + v0 = 0; + + do { + if (*p == a1) + v0 = a0 + (p - (char *)Ra0); + } while (*p++ != '\0'); + + pc0 = ra; +} + +void psxBios_strchr() { // 0x1e + psxBios_index(); +} + +void psxBios_strrchr() { // 0x1f + psxBios_rindex(); +} + +void psxBios_strpbrk() { // 0x20 + char *p1 = (char *)Ra0, *p2 = (char *)Ra1, *scanp, c, sc; + + while ((c = *p1++) != '\0') { + for (scanp = p2; (sc = *scanp++) != '\0';) { + if (sc == c) { + v0 = a0 + (p1 - 1 - (char *)Ra0); + pc0 = ra; + return; + } + } + } + + // BUG: return a0 instead of NULL if not found + v0 = a0; pc0 = ra; +} + +void psxBios_strspn() { // 0x21 + char *p1, *p2; + + for (p1 = (char *)Ra0; *p1 != '\0'; p1++) { + for (p2 = (char *)Ra1; *p2 != '\0' && *p2 != *p1; p2++); + if (*p2 == '\0') break; + } + + v0 = p1 - (char *)Ra0; pc0 = ra; +} + +void psxBios_strcspn() { // 0x22 + char *p1, *p2; + + for (p1 = (char *)Ra0; *p1 != '\0'; p1++) { + for (p2 = (char *)Ra1; *p2 != '\0' && *p2 != *p1; p2++); + if (*p2 != '\0') break; + } + + v0 = p1 - (char *)Ra0; pc0 = ra; +} + +void psxBios_strtok() { // 0x23 + char *pcA0 = (char *)Ra0; + char *pcRet = strtok(pcA0, (char *)Ra1); + if (pcRet) + v0 = a0 + pcRet - pcA0; + else + v0 = 0; + pc0 = ra; +} + +void psxBios_strstr() { // 0x24 + char *p = (char *)Ra0, *p1, *p2; + + while (*p != '\0') { + p1 = p; + p2 = (char *)Ra1; + + while (*p1 != '\0' && *p2 != '\0' && *p1 == *p2) { + p1++; p2++; + } + + if (*p2 == '\0') { + v0 = a0 + (p - (char *)Ra0); + pc0 = ra; + return; + } + + p++; + } + + v0 = 0; pc0 = ra; +} + +void psxBios_toupper() { // 0x25 + v0 = (s8)(a0 & 0xff); + if (v0 >= 'a' && v0 <= 'z') v0 -= 'a' - 'A'; + pc0 = ra; +} + +void psxBios_tolower() { // 0x26 + v0 = (s8)(a0 & 0xff); + if (v0 >= 'A' && v0 <= 'Z') v0 += 'a' - 'A'; + pc0 = ra; +} + +void psxBios_bcopy() { // 0x27 + char *p1 = (char *)Ra1, *p2 = (char *)Ra0; + while (a2-- > 0) *p1++ = *p2++; + + pc0 = ra; +} + +void psxBios_bzero() { // 0x28 + char *p = (char *)Ra0; + while (a1-- > 0) *p++ = '\0'; + + pc0 = ra; +} + +void psxBios_bcmp() { // 0x29 + char *p1 = (char *)Ra0, *p2 = (char *)Ra1; + + if (a0 == 0 || a1 == 0) { v0 = 0; pc0 = ra; return; } + + while (a2-- > 0) { + if (*p1++ != *p2++) { + v0 = *p1 - *p2; // BUG: compare the NEXT byte + pc0 = ra; + return; + } + } + + v0 = 0; pc0 = ra; +} + +void psxBios_memcpy() { // 0x2a + char *p1 = (char *)Ra0, *p2 = (char *)Ra1; + while (a2-- > 0) *p1++ = *p2++; + + v0 = a0; pc0 = ra; +} + +void psxBios_memset() { // 0x2b + char *p = (char *)Ra0; + while (a2-- > 0) *p++ = (char)a1; + + v0 = a0; pc0 = ra; +} + +void psxBios_memmove() { // 0x2c + char *p1 = (char *)Ra0, *p2 = (char *)Ra1; + + if (p2 <= p1 && p2 + a2 > p1) { + a2++; // BUG: copy one more byte here + p1 += a2; + p2 += a2; + while (a2-- > 0) *--p1 = *--p2; + } else { + while (a2-- > 0) *p1++ = *p2++; + } + + v0 = a0; pc0 = ra; +} + +void psxBios_memcmp() { // 0x2d + psxBios_bcmp(); +} + +void psxBios_memchr() { // 0x2e + char *p = (char *)Ra0; + + while (a2-- > 0) { + if (*p++ != (s8)a1) continue; + v0 = a0 + (p - (char *)Ra0 - 1); + pc0 = ra; + return; + } + + v0 = 0; pc0 = ra; +} + +void psxBios_rand() { // 0x2f + u32 s = psxMu32(0x9010) * 1103515245 + 12345; + v0 = (s >> 16) & 0x7fff; + psxMu32ref(0x9010) = SWAPu32(s); + pc0 = ra; +} + +void psxBios_srand() { // 0x30 + psxMu32ref(0x9010) = SWAPu32(a0); + pc0 = ra; +} + +static u32 qscmpfunc, qswidth; + +static inline int qscmp(char *a, char *b) { + u32 sa0 = a0; + + a0 = sa0 + (a - (char *)PSXM(sa0)); + a1 = sa0 + (b - (char *)PSXM(sa0)); + + softCall2(qscmpfunc); + + a0 = sa0; + return (s32)v0; +} + +static inline void qexchange(char *i, char *j) { + char t; + int n = qswidth; + + do { + t = *i; + *i++ = *j; + *j++ = t; + } while (--n); +} + +static inline void q3exchange(char *i, char *j, char *k) { + char t; + int n = qswidth; + + do { + t = *i; + *i++ = *k; + *k++ = *j; + *j++ = t; + } while (--n); +} + +static void qsort_main(char *a, char *l) { + char *i, *j, *lp, *hp; + int c; + unsigned int n; + +start: + if ((n = l - a) <= qswidth) + return; + n = qswidth * (n / (2 * qswidth)); + hp = lp = a + n; + i = a; + j = l - qswidth; + while (TRUE) { + if (i < lp) { + if ((c = qscmp(i, lp)) == 0) { + qexchange(i, lp -= qswidth); + continue; + } + if (c < 0) { + i += qswidth; + continue; + } + } + +loop: + if (j > hp) { + if ((c = qscmp(hp, j)) == 0) { + qexchange(hp += qswidth, j); + goto loop; + } + if (c > 0) { + if (i == lp) { + q3exchange(i, hp += qswidth, j); + i = lp += qswidth; + goto loop; + } + qexchange(i, j); + j -= qswidth; + i += qswidth; + continue; + } + j -= qswidth; + goto loop; + } + + if (i == lp) { + if (lp - a >= l - hp) { + qsort_main(hp + qswidth, l); + l = lp; + } else { + qsort_main(a, lp); + a = hp + qswidth; + } + goto start; + } + + q3exchange(j, lp -= qswidth, i); + j = hp -= qswidth; + } +} + +void psxBios_qsort() { // 0x31 + qswidth = a2; + qscmpfunc = a3; + qsort_main((char *)Ra0, (char *)Ra0 + a1 * a2); + + pc0 = ra; +} + +void psxBios_malloc() { // 0x33 + unsigned int *chunk, *newchunk; + unsigned int dsize, csize, cstat; + int colflag; +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x33]); +#endif + + // scan through heap and combine free chunks of space + chunk = heap_addr; + colflag = 0; + while(chunk < heap_end) { + // get size and status of actual chunk + csize = ((u32)*chunk) & 0xfffffffc; + cstat = ((u32)*chunk) & 1; + + // it's a free chunk + if(cstat == 1) { + if(colflag == 0) { + newchunk = chunk; + dsize = csize; + colflag = 1; // let's begin a new collection of free memory + } + else dsize += (csize+4); // add the new size including header + } + // not a free chunk: did we start a collection ? + else { + if(colflag == 1) { // collection is over + colflag = 0; + *newchunk = SWAP32(dsize | 1); + } + } + + // next chunk + chunk = (u32*)((uptr)chunk + csize + 4); + } + // if neccessary free memory on end of heap + if (colflag == 1) + *newchunk = SWAP32(dsize | 1); + + chunk = heap_addr; + csize = ((u32)*chunk) & 0xfffffffc; + cstat = ((u32)*chunk) & 1; + dsize = (a0 + 3) & 0xfffffffc; + + // exit on uninitialized heap + if (chunk == NULL) { + SysPrintf("malloc %x,%x: Uninitialized Heap!\n", v0, a0); + v0 = 0; + pc0 = ra; + return; + } + + // search an unused chunk that is big enough until the end of the heap + while ((dsize > csize || cstat == 0) && chunk < heap_end ) { + chunk = (u32*)((uptr)chunk + csize + 4); + csize = ((u32)*chunk) & 0xfffffffc; + cstat = ((u32)*chunk) & 1; + } + + // catch out of memory + if(chunk >= heap_end) { SysPrintf("malloc %x,%x: Out of memory error!\n", v0, a0); v0 = 0; pc0 = ra; return; } + + // allocate memory + if(dsize == csize) { + // chunk has same size + *chunk &= 0xfffffffc; + } + else { + // split free chunk + *chunk = SWAP32(dsize); + newchunk = (u32*)((uptr)chunk + dsize + 4); + *newchunk = SWAP32((csize - dsize - 4) & 0xfffffffc | 1); + } + + // return pointer to allocated memory + v0 = ((unsigned long)chunk - (unsigned long)psxM) + 4; + v0|= 0x80000000; + SysPrintf ("malloc %x,%x\n", v0, a0); + pc0 = ra; +} + +void psxBios_free() { // 0x34 + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x34]); +#endif + + SysPrintf("free %x: %x bytes\n", a0, *(u32*)(Ra0-4)); + + *(u32*)(Ra0-4) |= 1; // set chunk to free + pc0 = ra; +} + +void psxBios_calloc() { // 0x37 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x37]); +#endif + + a0 = a0 * a1; + psxBios_malloc(); + memset(Rv0, 0, a0); +} + +void psxBios_realloc() { // 0x38 + u32 block = a0; + u32 size = a1; +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x38]); +#endif + + a0 = block; + psxBios_free(); + a0 = size; + psxBios_malloc(); +} + + +/* InitHeap(void *block , int n) */ +void psxBios_InitHeap() { // 0x39 + unsigned int size; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x39]); +#endif + + if (((a0 & 0x1fffff) + a1)>= 0x200000) size = 0x1ffffc - (a0 & 0x1fffff); + else size = a1; + + size &= 0xfffffffc; + + heap_addr = (u32 *)Ra0; + heap_end = (u32 *)((u8 *)heap_addr + size); + *heap_addr = SWAP32(size | 1); + + SysPrintf("InitHeap %x,%x : %x %x\n",a0,a1, (uptr)heap_addr-(uptr)psxM, size); + + pc0 = ra; +} + +void psxBios_getchar() { //0x3b + v0 = getchar(); pc0 = ra; +} + +void psxBios_printf() { // 0x3f + char tmp[1024]; + char tmp2[1024]; + u32 save[4]; + char *ptmp = tmp; + int n=1, i=0, j; + + memcpy(save, (char*)PSXM(sp), 4 * 4); + psxMu32ref(sp) = SWAP32((u32)a0); + psxMu32ref(sp + 4) = SWAP32((u32)a1); + psxMu32ref(sp + 8) = SWAP32((u32)a2); + psxMu32ref(sp + 12) = SWAP32((u32)a3); + + while (Ra0[i]) { + switch (Ra0[i]) { + case '%': + j = 0; + tmp2[j++] = '%'; +_start: + switch (Ra0[++i]) { + case '.': + case 'l': + tmp2[j++] = Ra0[i]; goto _start; + default: + if (Ra0[i] >= '0' && Ra0[i] <= '9') { + tmp2[j++] = Ra0[i]; + goto _start; + } + break; + } + tmp2[j++] = Ra0[i]; + tmp2[j] = 0; + + switch (Ra0[i]) { + case 'f': case 'F': + ptmp += sprintf(ptmp, tmp2, (float)psxMu32(sp + n * 4)); n++; break; + case 'a': case 'A': + case 'e': case 'E': + case 'g': case 'G': + ptmp += sprintf(ptmp, tmp2, (double)psxMu32(sp + n * 4)); n++; break; + case 'p': + case 'i': + case 'd': case 'D': + case 'o': case 'O': + case 'x': case 'X': + ptmp += sprintf(ptmp, tmp2, (unsigned int)psxMu32(sp + n * 4)); n++; break; + case 'c': + ptmp += sprintf(ptmp, tmp2, (unsigned char)psxMu32(sp + n * 4)); n++; break; + case 's': + ptmp += sprintf(ptmp, tmp2, (char*)PSXM(psxMu32(sp + n * 4))); n++; break; + case '%': + *ptmp++ = Ra0[i]; break; + } + i++; + break; + default: + *ptmp++ = Ra0[i++]; + } + } + *ptmp = 0; + + memcpy((char*)PSXM(sp), save, 4 * 4); + + SysPrintf(tmp); + + pc0 = ra; +} + +/* + * long Load(char *name, struct EXEC *header); + */ + +void psxBios_Load() { // 0x42 + EXE_HEADER eheader; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %s, %x\n", biosA0n[0x42], Ra0, a1); +#endif + + if (LoadCdromFile(Ra0, &eheader) == 0) { + memcpy(Ra1, ((char*)&eheader)+16, sizeof(EXEC)); + v0 = 1; + } else v0 = 0; + + pc0 = ra; +} + +/* + * int Exec(struct EXEC *header , int argc , char **argv); + */ + +void psxBios_Exec() { // 43 + EXEC *header = (EXEC*)Ra0; + u32 tmp; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x, %x, %x\n", biosA0n[0x43], a0, a1, a2); +#endif + + header->_sp = sp; + header->_fp = fp; + header->_sp = sp; + header->_gp = gp; + header->ret = ra; + header->base = s0; + + if (header->S_addr != 0) { + tmp = header->S_addr + header->s_size; + sp = tmp; + fp = sp; + } + + gp = header->gp0; + + s0 = a0; + + a0 = a1; + a1 = a2; + + ra = 0x8000; + pc0 = header->_pc0; +} + +void psxBios_FlushCache() { // 44 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x44]); +#endif + + pc0 = ra; +} + +void psxBios_GPU_dw() { // 0x46 + int size; + s32 *ptr; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x46]); +#endif + + GPU_writeData(0xa0000000); + GPU_writeData((a1<<16)|(a0&0xffff)); + GPU_writeData((a3<<16)|(a2&0xffff)); + size = (a2*a3+1)/2; + ptr = (s32*)PSXM(Rsp[4]); //that is correct? + do { + GPU_writeData(SWAP32(*ptr)); + ptr++; + } while(--size); + + pc0 = ra; +} + +void psxBios_mem2vram() { // 0x47 + int size; + + GPU_writeData(0xa0000000); + GPU_writeData((a1<<16)|(a0&0xffff)); + GPU_writeData((a3<<16)|(a2&0xffff)); + size = (a2*a3+1)/2; + GPU_writeStatus(0x04000002); + psxHwWrite32(0x1f8010f4,0); + psxHwWrite32(0x1f8010f0,psxHwRead32(0x1f8010f0)|0x800); + psxHwWrite32(0x1f8010a0,Rsp[4]);//might have a buggy... + psxHwWrite32(0x1f8010a4,((size/16)<<16)|16); + psxHwWrite32(0x1f8010a8,0x01000201); + + pc0 = ra; +} + +void psxBios_SendGPU() { // 0x48 + GPU_writeStatus(a0); + pc0 = ra; +} + +void psxBios_GPU_cw() { // 0x49 + GPU_writeData(a0); + pc0 = ra; +} + +void psxBios_GPU_cwb() { // 0x4a + s32 *ptr = (s32*)Ra0; + int size = a1; + while(size--) { + GPU_writeData(SWAP32(*ptr)); + ptr++; + } + + pc0 = ra; +} + +void psxBios_GPU_SendPackets() { //4b: + GPU_writeStatus(0x04000002); + psxHwWrite32(0x1f8010f4,0); + psxHwWrite32(0x1f8010f0,psxHwRead32(0x1f8010f0)|0x800); + psxHwWrite32(0x1f8010a0,a0); + psxHwWrite32(0x1f8010a4,0); + psxHwWrite32(0x1f8010a8,0x010000401); + pc0 = ra; +} + +void psxBios_sys_a0_4c() { // 0x4c GPU relate + psxHwWrite32(0x1f8010a8,0x00000401); + GPU_writeData(0x0400000); + GPU_writeData(0x0200000); + GPU_writeData(0x0100000); + + pc0 = ra; +} + +void psxBios_GPU_GetGPUStatus() { // 0x4d + v0 = GPU_readStatus(); + pc0 = ra; +} + +#undef s_addr + +void psxBios_LoadExec() { // 51 + EXEC *header = (EXEC*)PSXM(0xf000); + u32 s_addr, s_size; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %s: %x,%x\n", biosA0n[0x51], Ra0, a1, a2); +#endif + s_addr = a1; s_size = a2; + + a1 = 0xf000; + psxBios_Load(); + + header->S_addr = s_addr; + header->s_size = s_size; + + a0 = 0xf000; a1 = 0; a2 = 0; + psxBios_Exec(); +} + +void psxBios__bu_init() { // 70 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x70]); +#endif + + DeliverEvent(0x11, 0x2); // 0xf0000011, 0x0004 + DeliverEvent(0x81, 0x2); // 0xf4000001, 0x0004 + + pc0 = ra; +} + +void psxBios__96_init() { // 71 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x71]); +#endif + + pc0 = ra; +} + +void psxBios__96_remove() { // 72 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosA0n[0x72]); +#endif + + pc0 = ra; +} + +void psxBios_SetMem() { // 9f + u32 new = psxHu32(0x1060); + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x, %x\n", biosA0n[0x9f], a0, a1); +#endif + + switch(a0) { + case 2: + psxHu32ref(0x1060) = SWAP32(new); + psxMu32ref(0x060) = a0; + SysPrintf("Change effective memory : %d MBytes\n",a0); + break; + + case 8: + psxHu32ref(0x1060) = SWAP32(new | 0x300); + psxMu32ref(0x060) = a0; + SysPrintf("Change effective memory : %d MBytes\n",a0); + + default: + SysPrintf("Effective memory must be 2/8 MBytes\n"); + break; + } + + pc0 = ra; +} + +void psxBios__card_info() { // ab +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x\n", biosA0n[0xab], a0); +#endif + +// DeliverEvent(0x11, 0x2); // 0xf0000011, 0x0004 + DeliverEvent(0x81, 0x2); // 0xf4000001, 0x0004 + + v0 = 1; pc0 = ra; +} + +void psxBios__card_load() { // ac +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x\n", biosA0n[0xac], a0); +#endif + +// DeliverEvent(0x11, 0x2); // 0xf0000011, 0x0004 + DeliverEvent(0x81, 0x2); // 0xf4000001, 0x0004 + + v0 = 1; pc0 = ra; +} + +/* System calls B0 */ + +void psxBios_SetRCnt() { // 02 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x02]); +#endif + + a0&= 0x3; + if (a0 != 3) { + u32 mode=0; + + psxRcntWtarget(a0, a1); + if (a2&0x1000) mode|= 0x050; // Interrupt Mode + if (a2&0x0100) mode|= 0x008; // Count to 0xffff + if (a2&0x0010) mode|= 0x001; // Timer stop mode + if (a0 == 2) { if (a2&0x0001) mode|= 0x200; } // System Clock mode + else { if (a2&0x0001) mode|= 0x100; } // System Clock mode + + psxRcntWmode(a0, mode); + } + pc0 = ra; +} + +void psxBios_GetRCnt() { // 03 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x03]); +#endif + + a0&= 0x3; + if (a0 != 3) v0 = psxRcntRcount(a0); + else v0 = 0; + pc0 = ra; +} + +void psxBios_StartRCnt() { // 04 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x04]); +#endif + + a0&= 0x3; + if (a0 != 3) psxHu32ref(0x1074)|= SWAP32((u32)((1<<(a0+4)))); + else psxHu32ref(0x1074)|= SWAPu32(0x1); + v0 = 1; pc0 = ra; +} + +void psxBios_StopRCnt() { // 05 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x05]); +#endif + + a0&= 0x3; + if (a0 != 3) psxHu32ref(0x1074)&= SWAP32((u32)(~(1<<(a0+4)))); + else psxHu32ref(0x1074)&= SWAPu32(~0x1); + pc0 = ra; +} + +void psxBios_ResetRCnt() { // 06 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x06]); +#endif + + a0&= 0x3; + if (a0 != 3) { + psxRcntWmode(a0, 0); + psxRcntWtarget(a0, 0); + psxRcntWcount(a0, 0); + } + pc0 = ra; +} + + +/* gets ev for use with Event */ +#define GetEv() \ + ev = (a0 >> 24) & 0xf; \ + if (ev == 0xf) ev = 0x5; \ + ev*= 32; \ + ev+= a0&0x1f; + +/* gets spec for use with Event */ +#define GetSpec() \ + spec = 0; \ + switch (a1) { \ + case 0x0301: spec = 16; break; \ + case 0x0302: spec = 17; break; \ + default: \ + for (i=0; i<16; i++) if (a1 & (1 << i)) { spec = i; break; } \ + break; \ + } + +void psxBios_DeliverEvent() { // 07 + int ev, spec; + int i; + + GetEv(); + GetSpec(); + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s %x,%x\n", biosB0n[0x07], ev, spec); +#endif + + DeliverEvent(ev, spec); + + pc0 = ra; +} + +void psxBios_OpenEvent() { // 08 + int ev, spec; + int i; + + GetEv(); + GetSpec(); + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s %x,%x (class:%x, spec:%x, mode:%x, func:%x)\n", biosB0n[0x08], ev, spec, a0, a1, a2, a3); +#endif + + Event[ev][spec].status = EvStWAIT; + Event[ev][spec].mode = a2; + Event[ev][spec].fhandler = a3; + + v0 = ev | (spec << 8); + pc0 = ra; +} + +void psxBios_CloseEvent() { // 09 + int ev, spec; + + ev = a0 & 0xff; + spec = (a0 >> 8) & 0xff; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s %x,%x\n", biosB0n[0x09], ev, spec); +#endif + + Event[ev][spec].status = EvStUNUSED; + + v0 = 1; pc0 = ra; +} + +void psxBios_WaitEvent() { // 0a + int ev, spec; + + ev = a0 & 0xff; + spec = (a0 >> 8) & 0xff; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s %x,%x\n", biosB0n[0x0a], ev, spec); +#endif + + Event[ev][spec].status = EvStACTIVE; + + v0 = 1; pc0 = ra; +} + +void psxBios_TestEvent() { // 0b + int ev, spec; + + ev = a0 & 0xff; + spec = (a0 >> 8) & 0xff; + + if (Event[ev][spec].status == EvStALREADY) { + Event[ev][spec].status = EvStACTIVE; v0 = 1; + } else v0 = 0; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s %x,%x: %x\n", biosB0n[0x0b], ev, spec, v0); +#endif + + pc0 = ra; +} + +void psxBios_EnableEvent() { // 0c + int ev, spec; + + ev = a0 & 0xff; + spec = (a0 >> 8) & 0xff; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s %x,%x\n", biosB0n[0x0c], ev, spec); +#endif + + Event[ev][spec].status = EvStACTIVE; + + v0 = 1; pc0 = ra; +} + +void psxBios_DisableEvent() { // 0d + int ev, spec; + + ev = a0 & 0xff; + spec = (a0 >> 8) & 0xff; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s %x,%x\n", biosB0n[0x0d], ev, spec); +#endif + + Event[ev][spec].status = EvStWAIT; + + v0 = 1; pc0 = ra; +} + +/* + * long OpenTh(long (*func)(), unsigned long sp, unsigned long gp); + */ + +void psxBios_OpenTh() { // 0e + int th; + + for (th=1; th<8; th++) + if (Thread[th].status == 0) break; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x0e], th); +#endif + + Thread[th].status = 1; + Thread[th].func = a0; + Thread[th].reg[29] = a1; + Thread[th].reg[28] = a2; + + v0 = th; pc0 = ra; +} + +/* + * int CloseTh(long thread); + */ + +void psxBios_CloseTh() { // 0f + int th = a0 & 0xff; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x0f], th); +#endif + + if (Thread[th].status == 0) { + v0 = 0; + } else { + Thread[th].status = 0; + v0 = 1; + } + + pc0 = ra; +} + +/* + * int ChangeTh(long thread); + */ + +void psxBios_ChangeTh() { // 10 + int th = a0 & 0xff; + +#ifdef PSXBIOS_LOG +// PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x10], th); +#endif + + if (Thread[th].status == 0 || CurThread == th) { + v0 = 0; + + pc0 = ra; + } else { + v0 = 1; + + if (Thread[CurThread].status == 2) { + Thread[CurThread].status = 1; + Thread[CurThread].func = ra; + memcpy(Thread[CurThread].reg, psxRegs.GPR.r, 32*4); + } + + memcpy(psxRegs.GPR.r, Thread[th].reg, 32*4); + pc0 = Thread[th].func; + Thread[th].status = 2; + CurThread = th; + } +} + +void psxBios_InitPAD() { // 0x12 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x12]); +#endif + + pad_buf1 = (char*)Ra0; + pad_buf1len = a1; + pad_buf2 = (char*)Ra2; + pad_buf2len = a3; + + v0 = 1; pc0 = ra; +} + +void psxBios_StartPAD() { // 13 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x13]); +#endif + + psxHwWrite16(0x1f801074, (unsigned short)(psxHwRead16(0x1f801074) | 0x1)); + psxRegs.CP0.n.Status |= 0x401; + pc0 = ra; +} + +void psxBios_StopPAD() { // 14 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x14]); +#endif + + pad_buf1 = NULL; + pad_buf2 = NULL; + pc0 = ra; +} + +void psxBios_PAD_init() { // 15 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x15]); +#endif + psxHwWrite16(0x1f801074, (u16)(psxHwRead16(0x1f801074) | 0x1)); + pad_buf = (int *)Ra1; + *pad_buf = -1; + psxRegs.CP0.n.Status |= 0x401; + pc0 = ra; +} + +void psxBios_PAD_dr() { // 16 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x16]); +#endif + + v0 = -1; pc0 = ra; +} + +void psxBios_ReturnFromException() { // 17 + LoadRegs(); + + pc0 = psxRegs.CP0.n.EPC; + if (psxRegs.CP0.n.Cause & 0x80000000) pc0 += 4; + + psxRegs.CP0.n.Status = (psxRegs.CP0.n.Status & 0xfffffff0) | + ((psxRegs.CP0.n.Status & 0x3c) >> 2); +} + +void psxBios_ResetEntryInt() { // 18 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x18]); +#endif + + jmp_int = NULL; + pc0 = ra; +} + +void psxBios_HookEntryInt() { // 19 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x19]); +#endif + + jmp_int = (u32*)Ra0; + pc0 = ra; +} + +void psxBios_UnDeliverEvent() { // 0x20 + int ev, spec; + int i; + + GetEv(); + GetSpec(); + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s %x,%x\n", biosB0n[0x20], ev, spec); +#endif + + if (Event[ev][spec].status == EvStALREADY && + Event[ev][spec].mode == EvMdNOINTR) + Event[ev][spec].status = EvStACTIVE; + + pc0 = ra; +} + +#define buopen(mcd) { \ + strcpy(FDesc[1 + mcd].name, Ra0+5); \ + FDesc[1 + mcd].offset = 0; \ + FDesc[1 + mcd].mode = a1; \ + \ + for (i=1; i<16; i++) { \ + ptr = Mcd##mcd##Data + 128 * i; \ + if ((*ptr & 0xF0) != 0x50) continue; \ + if (strcmp(FDesc[1 + mcd].name, ptr+0xa)) continue; \ + FDesc[1 + mcd].mcfile = i; \ + SysPrintf("open %s\n", ptr+0xa); \ + v0 = 1 + mcd; \ + break; \ + } \ + if (a1 & 0x200 && v0 == -1) { /* FCREAT */ \ + for (i=1; i<16; i++) { \ + int j, xor = 0; \ + \ + ptr = Mcd##mcd##Data + 128 * i; \ + if ((*ptr & 0xF0) == 0x50) continue; \ + ptr[0] = 0x50 | (u8)(a1 >> 16); \ + ptr[4] = 0x00; \ + ptr[5] = 0x20; \ + ptr[6] = 0x00; \ + ptr[7] = 0x00; \ + ptr[8] = 'B'; \ + ptr[9] = 'I'; \ + strcpy(ptr+0xa, FDesc[1 + mcd].name); \ + for (j=0; j<127; j++) xor^= ptr[j]; \ + ptr[127] = xor; \ + FDesc[1 + mcd].mcfile = i; \ + SysPrintf("openC %s\n", ptr); \ + v0 = 1 + mcd; \ + SaveMcd(Config.Mcd##mcd, Mcd##mcd##Data, 128 * i, 128); \ + break; \ + } \ + } \ +} + +/* + * int open(char *name , int mode); + */ + +void psxBios_open() { // 0x32 + int i; + char *ptr; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %s,%x\n", biosB0n[0x32], Ra0, a1); +#endif + + v0 = -1; + + if (!strncmp(Ra0, "bu00", 4)) { + buopen(1); + } + + if (!strncmp(Ra0, "bu10", 4)) { + buopen(2); + } + + pc0 = ra; +} + +/* + * int lseek(int fd , int offset , int whence); + */ + +void psxBios_lseek() { // 0x33 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x, %x, %x\n", biosB0n[0x33], a0, a1, a2); +#endif + + switch (a2) { + case 0: // SEEK_SET + FDesc[a0].offset = a1; + v0 = a1; +// DeliverEvent(0x11, 0x2); // 0xf0000011, 0x0004 +// DeliverEvent(0x81, 0x2); // 0xf4000001, 0x0004 + break; + + case 1: // SEEK_CUR + FDesc[a0].offset+= a1; + v0 = FDesc[a0].offset; + break; + } + + pc0 = ra; +} + +#define buread(mcd) { \ + SysPrintf("read %d: %x,%x (%s)\n", FDesc[1 + mcd].mcfile, FDesc[1 + mcd].offset, a2, Mcd##mcd##Data + 128 * FDesc[1 + mcd].mcfile + 0xa); \ + ptr = Mcd##mcd##Data + 8192 * FDesc[1 + mcd].mcfile + FDesc[1 + mcd].offset; \ + memcpy(Ra1, ptr, a2); \ + if (FDesc[1 + mcd].mode & 0x8000) v0 = 0; \ + else v0 = a2; \ + FDesc[1 + mcd].offset += v0; \ + DeliverEvent(0x11, 0x2); /* 0xf0000011, 0x0004 */ \ + DeliverEvent(0x81, 0x2); /* 0xf4000001, 0x0004 */ \ +} + +/* + * int read(int fd , void *buf , int nbytes); + */ + +void psxBios_read() { // 0x34 + char *ptr; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x, %x, %x\n", biosB0n[0x34], a0, a1, a2); +#endif + + v0 = -1; + + switch (a0) { + case 2: buread(1); break; + case 3: buread(2); break; + } + + pc0 = ra; +} + +#define buwrite(mcd) { \ + u32 offset = + 8192 * FDesc[1 + mcd].mcfile + FDesc[1 + mcd].offset; \ + SysPrintf("write %d: %x,%x\n", FDesc[1 + mcd].mcfile, FDesc[1 + mcd].offset, a2); \ + ptr = Mcd##mcd##Data + offset; \ + memcpy(ptr, Ra1, a2); \ + FDesc[1 + mcd].offset += a2; \ + SaveMcd(Config.Mcd##mcd, Mcd##mcd##Data, offset, a2); \ + if (FDesc[1 + mcd].mode & 0x8000) v0 = 0; \ + else v0 = a2; \ + DeliverEvent(0x11, 0x2); /* 0xf0000011, 0x0004 */ \ + DeliverEvent(0x81, 0x2); /* 0xf4000001, 0x0004 */ \ +} + +/* + * int write(int fd , void *buf , int nbytes); + */ + +void psxBios_write() { // 0x35/0x03 + char *ptr; + + if (a0 == 1) { // stdout + char *ptr = Ra1; + + while (a2 > 0) { + SysPrintf("%c", *ptr++); a2--; + } + pc0 = ra; return; + } +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x,%x,%x\n", biosB0n[0x35], a0, a1, a2); +#endif + + v0 = -1; + + switch (a0) { + case 2: buwrite(1); break; + case 3: buwrite(2); break; + } + + pc0 = ra; +} + +/* + * int close(int fd); + */ + +void psxBios_close() { // 0x36 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x36], a0); +#endif + + v0 = a0; + pc0 = ra; +} + +void psxBios_putchar() { // 3d + SysPrintf("%c", (char)a0); + pc0 = ra; +} + +void psxBios_puts() { // 3e/3f + SysPrintf(Ra0); + pc0 = ra; +} + +char ffile[64], *pfile; +int nfile; + +#define bufile(mcd) { \ + while (nfile < 16) { \ + int match=1; \ + \ + ptr = Mcd##mcd##Data + 128 * nfile; \ + nfile++; \ + if ((*ptr & 0xF0) != 0x50) continue; \ + ptr+= 0xa; \ + if (pfile[0] == 0) { \ + strcpy(dir->name, ptr); \ + } else for (i=0; i<20; i++) { \ + if (pfile[i] == ptr[i]) { \ + dir->name[i] = ptr[i]; \ + if (ptr[i] == 0) break; else continue; } \ + if (pfile[i] == '?') { \ + dir->name[i] = ptr[i]; continue; } \ + if (pfile[i] == '*') { \ + strcpy(dir->name+i, ptr+i); break; } \ + match = 0; break; \ + } \ + SysPrintf("%d : %s = %s + %s (match=%d)\n", nfile, dir->name, pfile, ptr, match); \ + if (match == 0) continue; \ + dir->size = 8192; \ + v0 = _dir; \ + break; \ + } \ +} + +/* + * struct DIRENTRY* firstfile(char *name,struct DIRENTRY *dir); + */ + +void psxBios_firstfile() { // 42 + struct DIRENTRY *dir = (struct DIRENTRY *)Ra1; + u32 _dir = a1; + char *ptr; + int i; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %s\n", biosB0n[0x42], Ra0); +#endif + + v0 = 0; + + strcpy(ffile, Ra0); + pfile = ffile+5; + nfile = 1; + if (!strncmp(Ra0, "bu00", 4)) { + bufile(1); + v0 = _dir; + } + + if (!strncmp(Ra0, "bu10", 4)) { + bufile(2); + v0 = _dir; + } + + pc0 = ra; +} + +/* + * struct DIRENTRY* nextfile(struct DIRENTRY *dir); + */ + +void psxBios_nextfile() { // 43 + struct DIRENTRY *dir = (struct DIRENTRY *)Ra0; + u32 _dir = a0; + char *ptr; + int i; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %s\n", biosB0n[0x43], dir->name); +#endif + + v0 = 0; + + if (!strncmp(ffile, "bu00", 4)) { + bufile(1); + } + + if (!strncmp(ffile, "bu10", 4)) { + bufile(2); + } + + pc0 = ra; +} + +#define burename(mcd) { \ + for (i=1; i<16; i++) { \ + int namelen, j, xor = 0; \ + ptr = Mcd##mcd##Data + 128 * i; \ + if ((*ptr & 0xF0) != 0x50) continue; \ + if (strcmp(Ra0+5, ptr+0xa)) continue; \ + namelen = strlen(Ra1+5); \ + memcpy(ptr+0xa, Ra1+5, namelen); \ + memset(ptr+0xa+namelen, 0, 0x75-namelen); \ + for (j=0; j<127; j++) xor^= ptr[j]; \ + ptr[127] = xor; \ + SaveMcd(Config.Mcd##mcd, Mcd##mcd##Data, 128 * i + 0xa, 0x76); \ + v0 = 1; \ + break; \ + } \ +} + +/* + * int rename(char *old, char *new); + */ + +void psxBios_rename() { // 44 + char *ptr; + int i; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %s,%s\n", biosB0n[0x44], Ra0, Ra1); +#endif + + v0 = 0; + + if (!strncmp(Ra0, "bu00", 4) && !strncmp(Ra1, "bu00", 4)) { + burename(1); + } + + if (!strncmp(Ra0, "bu10", 4) && !strncmp(Ra1, "bu10", 4)) { + burename(2); + } + + pc0 = ra; +} + + +#define budelete(mcd) { \ + for (i=1; i<16; i++) { \ + ptr = Mcd##mcd##Data + 128 * i; \ + if ((*ptr & 0xF0) != 0x50) continue; \ + if (strcmp(Ra0+5, ptr+0xa)) continue; \ + *ptr = (*ptr & 0xf) | 0xA0; \ + SaveMcd(Config.Mcd##mcd, Mcd##mcd##Data, 128 * i, 1); \ + SysPrintf("delete %s\n", ptr+0xa); \ + v0 = 1; \ + break; \ + } \ +} + +/* + * int delete(char *name); + */ + +void psxBios_delete() { // 45 + char *ptr; + int i; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %s\n", biosB0n[0x45], Ra0); +#endif + + v0 = 0; + + if (!strncmp(Ra0, "bu00", 4)) { + budelete(1); + } + + if (!strncmp(Ra0, "bu10", 4)) { + budelete(2); + } + + pc0 = ra; +} + +void psxBios_InitCARD() { // 4a +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x4a], a0); +#endif + + CardState = 0; + + pc0 = ra; +} + +void psxBios_StartCARD() { // 4b +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x4b]); +#endif + + if (CardState == 0) CardState = 1; + + pc0 = ra; +} + +void psxBios_StopCARD() { // 4c +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x4c]); +#endif + + if (CardState == 1) CardState = 0; + + pc0 = ra; +} + +void psxBios__card_write() { // 0x4e + int port; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x,%x,%x\n", biosB0n[0x4e], a0, a1, a2); +#endif + + port = a0 >> 4; + + if (port == 0) { + memcpy(Mcd1Data + a1 * 128, Ra2, 128); + SaveMcd(Config.Mcd1, Mcd1Data, a1 * 128, 128); + } else { + memcpy(Mcd2Data + a1 * 128, Ra2, 128); + SaveMcd(Config.Mcd2, Mcd2Data, a1 * 128, 128); + } + + DeliverEvent(0x11, 0x2); // 0xf0000011, 0x0004 +// DeliverEvent(0x81, 0x2); // 0xf4000001, 0x0004 + + v0 = 1; pc0 = ra; +} + +void psxBios__card_read() { // 0x4f + int port; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x4f]); +#endif + + port = a0 >> 4; + + if (port == 0) { + memcpy(Ra2, Mcd1Data + a1 * 128, 128); + } else { + memcpy(Ra2, Mcd2Data + a1 * 128, 128); + } + + DeliverEvent(0x11, 0x2); // 0xf0000011, 0x0004 +// DeliverEvent(0x81, 0x2); // 0xf4000001, 0x0004 + + v0 = 1; pc0 = ra; +} + +void psxBios__new_card() { // 0x50 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x50]); +#endif + + pc0 = ra; +} + +void psxBios_Krom2RawAdd() { // 0x51 + int i = 0; + + const u32 table_8140[][2] = { + {0x8140, 0x0000}, {0x8180, 0x0762}, {0x81ad, 0x0cc6}, {0x81b8, 0x0ca8}, + {0x81c0, 0x0f00}, {0x81c8, 0x0d98}, {0x81cf, 0x10c2}, {0x81da, 0x0e6a}, + {0x81e9, 0x13ce}, {0x81f0, 0x102c}, {0x81f8, 0x1590}, {0x81fc, 0x111c}, + {0x81fd, 0x1626}, {0x824f, 0x113a}, {0x8259, 0x20ee}, {0x8260, 0x1266}, + {0x827a, 0x24cc}, {0x8281, 0x1572}, {0x829b, 0x28aa}, {0x829f, 0x187e}, + {0x82f2, 0x32dc}, {0x8340, 0x2238}, {0x837f, 0x4362}, {0x8380, 0x299a}, + {0x8397, 0x4632}, {0x839f, 0x2c4c}, {0x83b7, 0x49f2}, {0x83bf, 0x2f1c}, + {0x83d7, 0x4db2}, {0x8440, 0x31ec}, {0x8461, 0x5dde}, {0x8470, 0x35ca}, + {0x847f, 0x6162}, {0x8480, 0x378c}, {0x8492, 0x639c}, {0x849f, 0x39a8}, + {0xffff, 0} + }; + + const u32 table_889f[][2] = { + {0x889f, 0x3d68}, {0x8900, 0x40ec}, {0x897f, 0x4fb0}, {0x8a00, 0x56f4}, + {0x8a7f, 0x65b8}, {0x8b00, 0x6cfc}, {0x8b7f, 0x7bc0}, {0x8c00, 0x8304}, + {0x8c7f, 0x91c8}, {0x8d00, 0x990c}, {0x8d7f, 0xa7d0}, {0x8e00, 0xaf14}, + {0x8e7f, 0xbdd8}, {0x8f00, 0xc51c}, {0x8f7f, 0xd3e0}, {0x9000, 0xdb24}, + {0x907f, 0xe9e8}, {0x9100, 0xf12c}, {0x917f, 0xfff0}, {0x9200, 0x10734}, + {0x927f, 0x115f8}, {0x9300, 0x11d3c}, {0x937f, 0x12c00}, {0x9400, 0x13344}, + {0x947f, 0x14208}, {0x9500, 0x1494c}, {0x957f, 0x15810}, {0x9600, 0x15f54}, + {0x967f, 0x16e18}, {0x9700, 0x1755c}, {0x977f, 0x18420}, {0x9800, 0x18b64}, + {0xffff, 0} + }; + + if (a0 >= 0x8140 && a0 <= 0x84be) { + while (table_8140[i][0] <= a0) i++; + a0 -= table_8140[i - 1][0]; + v0 = 0xbfc66000 + (a0 * 0x1e + table_8140[i - 1][1]); + } else if (a0 >= 0x889f && a0 <= 0x9872) { + while (table_889f[i][0] <= a0) i++; + a0 -= table_889f[i - 1][0]; + v0 = 0xbfc66000 + (a0 * 0x1e + table_889f[i - 1][1]); + } else { + v0 = 0xffffffff; + } + + pc0 = ra; +} + +void psxBios_GetC0Table() { // 56 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x56]); +#endif + + v0 = 0x674; pc0 = ra; +} + +void psxBios_GetB0Table() { // 57 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x57]); +#endif + + v0 = 0x874; pc0 = ra; +} + +void psxBios_ChangeClearPad() { // 5b +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x5b], a0); +#endif + + pc0 = ra; +} + +/* System calls C0 */ + +/* + * int SysEnqIntRP(int index , long *queue); + */ + +void psxBios_SysEnqIntRP() { // 02 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x\n", biosC0n[0x02] ,a0); +#endif + + SysIntRP[a0] = a1; + + v0 = 0; pc0 = ra; +} + +/* + * int SysDeqIntRP(int index , long *queue); + */ + +void psxBios_SysDeqIntRP() { // 03 +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x\n", biosC0n[0x03], a0); +#endif + + SysIntRP[a0] = 0; + + v0 = 0; pc0 = ra; +} + +void psxBios_ChangeClearRCnt() { // 0a + u32 *ptr; + +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x, %x\n", biosC0n[0x0a], a0, a1); +#endif + + ptr = (u32*)PSXM((a0 << 2) + 0x8600); + v0 = *ptr; + *ptr = a1; + +// psxRegs.CP0.n.Status|= 0x404; + pc0 = ra; +} + +void psxBios_dummy() { +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("unk %x call: %x\n", pc0 & 0x1fffff, t1); +#endif + pc0 = ra; +} + +void (*biosA0[256])(); +void (*biosB0[256])(); +void (*biosC0[256])(); + +#include "sjisfont.h" + +void psxBiosInit() { + u32 base, size; + u32 *ptr; + int i; + uLongf len; + + for(i = 0; i < 256; i++) { + biosA0[i] = NULL; + biosB0[i] = NULL; + biosC0[i] = NULL; + } + biosA0[0x3e] = psxBios_puts; + biosA0[0x3f] = psxBios_printf; + + biosB0[0x3d] = psxBios_putchar; + biosB0[0x3f] = psxBios_puts; + + if (!Config.HLE) return; + + for(i = 0; i < 256; i++) { + if (biosA0[i] == NULL) biosA0[i] = psxBios_dummy; + if (biosB0[i] == NULL) biosB0[i] = psxBios_dummy; + if (biosC0[i] == NULL) biosC0[i] = psxBios_dummy; + } + + biosA0[0x00] = psxBios_open; + biosA0[0x01] = psxBios_lseek; + biosA0[0x02] = psxBios_read; + biosA0[0x03] = psxBios_write; + biosA0[0x04] = psxBios_close; + //biosA0[0x05] = psxBios_ioctl; + //biosA0[0x06] = psxBios_exit; + //biosA0[0x07] = psxBios_sys_a0_07; + //biosA0[0x08] = psxBios_getc; + //biosA0[0x09] = psxBios_putc; + //biosA0[0x0a] = psxBios_todigit; + //biosA0[0x0b] = psxBios_atof; + //biosA0[0x0c] = psxBios_strtoul; + //biosA0[0x0d] = psxBios_strtol; + biosA0[0x0e] = psxBios_abs; + biosA0[0x0f] = psxBios_labs; + biosA0[0x10] = psxBios_atoi; + biosA0[0x11] = psxBios_atol; + //biosA0[0x12] = psxBios_atob; + biosA0[0x13] = psxBios_setjmp; + biosA0[0x14] = psxBios_longjmp; + biosA0[0x15] = psxBios_strcat; + biosA0[0x16] = psxBios_strncat; + biosA0[0x17] = psxBios_strcmp; + biosA0[0x18] = psxBios_strncmp; + biosA0[0x19] = psxBios_strcpy; + biosA0[0x1a] = psxBios_strncpy; + biosA0[0x1b] = psxBios_strlen; + biosA0[0x1c] = psxBios_index; + biosA0[0x1d] = psxBios_rindex; + biosA0[0x1e] = psxBios_strchr; + biosA0[0x1f] = psxBios_strrchr; + biosA0[0x20] = psxBios_strpbrk; + biosA0[0x21] = psxBios_strspn; + biosA0[0x22] = psxBios_strcspn; + biosA0[0x23] = psxBios_strtok; + biosA0[0x24] = psxBios_strstr; + biosA0[0x25] = psxBios_toupper; + biosA0[0x26] = psxBios_tolower; + biosA0[0x27] = psxBios_bcopy; + biosA0[0x28] = psxBios_bzero; + biosA0[0x29] = psxBios_bcmp; + biosA0[0x2a] = psxBios_memcpy; + biosA0[0x2b] = psxBios_memset; + biosA0[0x2c] = psxBios_memmove; + biosA0[0x2d] = psxBios_memcmp; + biosA0[0x2e] = psxBios_memchr; + biosA0[0x2f] = psxBios_rand; + biosA0[0x30] = psxBios_srand; + biosA0[0x31] = psxBios_qsort; + //biosA0[0x32] = psxBios_strtod; + biosA0[0x33] = psxBios_malloc; + biosA0[0x34] = psxBios_free; + //biosA0[0x35] = psxBios_lsearch; + //biosA0[0x36] = psxBios_bsearch; + biosA0[0x37] = psxBios_calloc; + biosA0[0x38] = psxBios_realloc; + biosA0[0x39] = psxBios_InitHeap; + //biosA0[0x3a] = psxBios__exit; + biosA0[0x3b] = psxBios_getchar; + biosA0[0x3c] = psxBios_putchar; + //biosA0[0x3d] = psxBios_gets; + //biosA0[0x40] = psxBios_sys_a0_40; + //biosA0[0x41] = psxBios_LoadTest; + biosA0[0x42] = psxBios_Load; + biosA0[0x43] = psxBios_Exec; + biosA0[0x44] = psxBios_FlushCache; + //biosA0[0x45] = psxBios_InstallInterruptHandler; + biosA0[0x46] = psxBios_GPU_dw; + biosA0[0x47] = psxBios_mem2vram; + biosA0[0x48] = psxBios_SendGPU; + biosA0[0x49] = psxBios_GPU_cw; + biosA0[0x4a] = psxBios_GPU_cwb; + biosA0[0x4b] = psxBios_GPU_SendPackets; + biosA0[0x4c] = psxBios_sys_a0_4c; + biosA0[0x4d] = psxBios_GPU_GetGPUStatus; + //biosA0[0x4e] = psxBios_GPU_sync; + //biosA0[0x4f] = psxBios_sys_a0_4f; + //biosA0[0x50] = psxBios_sys_a0_50; + biosA0[0x51] = psxBios_LoadExec; + //biosA0[0x52] = psxBios_GetSysSp; + //biosA0[0x53] = psxBios_sys_a0_53; + //biosA0[0x54] = psxBios__96_init_a54; + //biosA0[0x55] = psxBios__bu_init_a55; + //biosA0[0x56] = psxBios__96_remove_a56; + //biosA0[0x57] = psxBios_sys_a0_57; + //biosA0[0x58] = psxBios_sys_a0_58; + //biosA0[0x59] = psxBios_sys_a0_59; + //biosA0[0x5a] = psxBios_sys_a0_5a; + //biosA0[0x5b] = psxBios_dev_tty_init; + //biosA0[0x5c] = psxBios_dev_tty_open; + //biosA0[0x5d] = psxBios_sys_a0_5d; + //biosA0[0x5e] = psxBios_dev_tty_ioctl; + //biosA0[0x5f] = psxBios_dev_cd_open; + //biosA0[0x60] = psxBios_dev_cd_read; + //biosA0[0x61] = psxBios_dev_cd_close; + //biosA0[0x62] = psxBios_dev_cd_firstfile; + //biosA0[0x63] = psxBios_dev_cd_nextfile; + //biosA0[0x64] = psxBios_dev_cd_chdir; + //biosA0[0x65] = psxBios_dev_card_open; + //biosA0[0x66] = psxBios_dev_card_read; + //biosA0[0x67] = psxBios_dev_card_write; + //biosA0[0x68] = psxBios_dev_card_close; + //biosA0[0x69] = psxBios_dev_card_firstfile; + //biosA0[0x6a] = psxBios_dev_card_nextfile; + //biosA0[0x6b] = psxBios_dev_card_erase; + //biosA0[0x6c] = psxBios_dev_card_undelete; + //biosA0[0x6d] = psxBios_dev_card_format; + //biosA0[0x6e] = psxBios_dev_card_rename; + //biosA0[0x6f] = psxBios_dev_card_6f; + biosA0[0x70] = psxBios__bu_init; + biosA0[0x71] = psxBios__96_init; + biosA0[0x72] = psxBios__96_remove; + //biosA0[0x73] = psxBios_sys_a0_73; + //biosA0[0x74] = psxBios_sys_a0_74; + //biosA0[0x75] = psxBios_sys_a0_75; + //biosA0[0x76] = psxBios_sys_a0_76; + //biosA0[0x77] = psxBios_sys_a0_77; + //biosA0[0x78] = psxBios__96_CdSeekL; + //biosA0[0x79] = psxBios_sys_a0_79; + //biosA0[0x7a] = psxBios_sys_a0_7a; + //biosA0[0x7b] = psxBios_sys_a0_7b; + //biosA0[0x7c] = psxBios__96_CdGetStatus; + //biosA0[0x7d] = psxBios_sys_a0_7d; + //biosA0[0x7e] = psxBios__96_CdRead; + //biosA0[0x7f] = psxBios_sys_a0_7f; + //biosA0[0x80] = psxBios_sys_a0_80; + //biosA0[0x81] = psxBios_sys_a0_81; + //biosA0[0x82] = psxBios_sys_a0_82; + //biosA0[0x83] = psxBios_sys_a0_83; + //biosA0[0x84] = psxBios_sys_a0_84; + //biosA0[0x85] = psxBios__96_CdStop; + //biosA0[0x86] = psxBios_sys_a0_86; + //biosA0[0x87] = psxBios_sys_a0_87; + //biosA0[0x88] = psxBios_sys_a0_88; + //biosA0[0x89] = psxBios_sys_a0_89; + //biosA0[0x8a] = psxBios_sys_a0_8a; + //biosA0[0x8b] = psxBios_sys_a0_8b; + //biosA0[0x8c] = psxBios_sys_a0_8c; + //biosA0[0x8d] = psxBios_sys_a0_8d; + //biosA0[0x8e] = psxBios_sys_a0_8e; + //biosA0[0x8f] = psxBios_sys_a0_8f; + //biosA0[0x90] = psxBios_sys_a0_90; + //biosA0[0x91] = psxBios_sys_a0_91; + //biosA0[0x92] = psxBios_sys_a0_92; + //biosA0[0x93] = psxBios_sys_a0_93; + //biosA0[0x94] = psxBios_sys_a0_94; + //biosA0[0x95] = psxBios_sys_a0_95; + //biosA0[0x96] = psxBios_AddCDROMDevice; + //biosA0[0x97] = psxBios_AddMemCardDevide; + //biosA0[0x98] = psxBios_DisableKernelIORedirection; + //biosA0[0x99] = psxBios_EnableKernelIORedirection; + //biosA0[0x9a] = psxBios_sys_a0_9a; + //biosA0[0x9b] = psxBios_sys_a0_9b; + //biosA0[0x9c] = psxBios_SetConf; + //biosA0[0x9d] = psxBios_GetConf; + //biosA0[0x9e] = psxBios_sys_a0_9e; + biosA0[0x9f] = psxBios_SetMem; + //biosA0[0xa0] = psxBios__boot; + //biosA0[0xa1] = psxBios_SystemError; + //biosA0[0xa2] = psxBios_EnqueueCdIntr; + //biosA0[0xa3] = psxBios_DequeueCdIntr; + //biosA0[0xa4] = psxBios_sys_a0_a4; + //biosA0[0xa5] = psxBios_ReadSector; + //biosA0[0xa6] = psxBios_get_cd_status; + //biosA0[0xa7] = psxBios_bufs_cb_0; + //biosA0[0xa8] = psxBios_bufs_cb_1; + //biosA0[0xa9] = psxBios_bufs_cb_2; + //biosA0[0xaa] = psxBios_bufs_cb_3; + biosA0[0xab] = psxBios__card_info; + biosA0[0xac] = psxBios__card_load; + //biosA0[0axd] = psxBios__card_auto; + //biosA0[0xae] = psxBios_bufs_cd_4; + //biosA0[0xaf] = psxBios_sys_a0_af; + //biosA0[0xb0] = psxBios_sys_a0_b0; + //biosA0[0xb1] = psxBios_sys_a0_b1; + //biosA0[0xb2] = psxBios_do_a_long_jmp + //biosA0[0xb3] = psxBios_sys_a0_b3; + //biosA0[0xb4] = psxBios_sub_function; +//*******************B0 CALLS**************************** + //biosB0[0x00] = psxBios_SysMalloc; + //biosB0[0x01] = psxBios_sys_b0_01; + biosB0[0x02] = psxBios_SetRCnt; + biosB0[0x03] = psxBios_GetRCnt; + biosB0[0x04] = psxBios_StartRCnt; + biosB0[0x05] = psxBios_StopRCnt; + biosB0[0x06] = psxBios_ResetRCnt; + biosB0[0x07] = psxBios_DeliverEvent; + biosB0[0x08] = psxBios_OpenEvent; + biosB0[0x09] = psxBios_CloseEvent; + biosB0[0x0a] = psxBios_WaitEvent; + biosB0[0x0b] = psxBios_TestEvent; + biosB0[0x0c] = psxBios_EnableEvent; + biosB0[0x0d] = psxBios_DisableEvent; + biosB0[0x0e] = psxBios_OpenTh; + biosB0[0x0f] = psxBios_CloseTh; + biosB0[0x10] = psxBios_ChangeTh; + //biosB0[0x11] = psxBios_psxBios_b0_11; + biosB0[0x12] = psxBios_InitPAD; + biosB0[0x13] = psxBios_StartPAD; + biosB0[0x14] = psxBios_StopPAD; + biosB0[0x15] = psxBios_PAD_init; + biosB0[0x16] = psxBios_PAD_dr; + biosB0[0x17] = psxBios_ReturnFromException; + biosB0[0x18] = psxBios_ResetEntryInt; + biosB0[0x19] = psxBios_HookEntryInt; + //biosB0[0x1a] = psxBios_sys_b0_1a; + //biosB0[0x1b] = psxBios_sys_b0_1b; + //biosB0[0x1c] = psxBios_sys_b0_1c; + //biosB0[0x1d] = psxBios_sys_b0_1d; + //biosB0[0x1e] = psxBios_sys_b0_1e; + //biosB0[0x1f] = psxBios_sys_b0_1f; + biosB0[0x20] = psxBios_UnDeliverEvent; + //biosB0[0x21] = psxBios_sys_b0_21; + //biosB0[0x22] = psxBios_sys_b0_22; + //biosB0[0x23] = psxBios_sys_b0_23; + //biosB0[0x24] = psxBios_sys_b0_24; + //biosB0[0x25] = psxBios_sys_b0_25; + //biosB0[0x26] = psxBios_sys_b0_26; + //biosB0[0x27] = psxBios_sys_b0_27; + //biosB0[0x28] = psxBios_sys_b0_28; + //biosB0[0x29] = psxBios_sys_b0_29; + //biosB0[0x2a] = psxBios_sys_b0_2a; + //biosB0[0x2b] = psxBios_sys_b0_2b; + //biosB0[0x2c] = psxBios_sys_b0_2c; + //biosB0[0x2d] = psxBios_sys_b0_2d; + //biosB0[0x2e] = psxBios_sys_b0_2e; + //biosB0[0x2f] = psxBios_sys_b0_2f; + //biosB0[0x30] = psxBios_sys_b0_30; + //biosB0[0x31] = psxBios_sys_b0_31; + biosB0[0x32] = psxBios_open; + biosB0[0x33] = psxBios_lseek; + biosB0[0x34] = psxBios_read; + biosB0[0x35] = psxBios_write; + biosB0[0x36] = psxBios_close; + //biosB0[0x37] = psxBios_ioctl; + //biosB0[0x38] = psxBios_exit; + //biosB0[0x39] = psxBios_sys_b0_39; + //biosB0[0x3a] = psxBios_getc; + //biosB0[0x3b] = psxBios_putc; + biosB0[0x3c] = psxBios_getchar; + //biosB0[0x3e] = psxBios_gets; + //biosB0[0x40] = psxBios_cd; + //biosB0[0x41] = psxBios_format; + biosB0[0x42] = psxBios_firstfile; + biosB0[0x43] = psxBios_nextfile; + biosB0[0x44] = psxBios_rename; + biosB0[0x45] = psxBios_delete; + //biosB0[0x46] = psxBios_undelete; + //biosB0[0x47] = psxBios_AddDevice; + //biosB0[0x48] = psxBios_RemoteDevice; + //biosB0[0x49] = psxBios_PrintInstalledDevices; + biosB0[0x4a] = psxBios_InitCARD; + biosB0[0x4b] = psxBios_StartCARD; + biosB0[0x4c] = psxBios_StopCARD; + //biosB0[0x4d] = psxBios_sys_b0_4d; + biosB0[0x4e] = psxBios__card_write; + biosB0[0x4f] = psxBios__card_read; + biosB0[0x50] = psxBios__new_card; + biosB0[0x51] = psxBios_Krom2RawAdd; + //biosB0[0x52] = psxBios_sys_b0_52; + //biosB0[0x53] = psxBios_sys_b0_53; + //biosB0[0x54] = psxBios__get_errno; + //biosB0[0x55] = psxBios__get_error; + biosB0[0x56] = psxBios_GetC0Table; + biosB0[0x57] = psxBios_GetB0Table; + //biosB0[0x58] = psxBios__card_chan; + //biosB0[0x59] = psxBios_sys_b0_59; + //biosB0[0x5a] = psxBios_sys_b0_5a; + biosB0[0x5b] = psxBios_ChangeClearPad; + //biosB0[0x5c] = psxBios__card_status; + //biosB0[0x5d] = psxBios__card_wait; +//*******************C0 CALLS**************************** + //biosC0[0x00] = psxBios_InitRCnt; + //biosC0[0x01] = psxBios_InitException; + biosC0[0x02] = psxBios_SysEnqIntRP; + biosC0[0x03] = psxBios_SysDeqIntRP; + //biosC0[0x04] = psxBios_get_free_EvCB_slot; + //biosC0[0x05] = psxBios_get_free_TCB_slot; + //biosC0[0x06] = psxBios_ExceptionHandler; + //biosC0[0x07] = psxBios_InstallExeptionHandler; + //biosC0[0x08] = psxBios_SysInitMemory; + //biosC0[0x09] = psxBios_SysInitKMem; + biosC0[0x0a] = psxBios_ChangeClearRCnt; + //biosC0[0x0b] = psxBios_SystemError; + //biosC0[0x0c] = psxBios_InitDefInt; + //biosC0[0x0d] = psxBios_sys_c0_0d; + //biosC0[0x0e] = psxBios_sys_c0_0e; + //biosC0[0x0f] = psxBios_sys_c0_0f; + //biosC0[0x10] = psxBios_sys_c0_10; + //biosC0[0x11] = psxBios_sys_c0_11; + //biosC0[0x12] = psxBios_InstallDevices; + //biosC0[0x13] = psxBios_FlushStfInOutPut; + //biosC0[0x14] = psxBios_sys_c0_14; + //biosC0[0x15] = psxBios__cdevinput; + //biosC0[0x16] = psxBios__cdevscan; + //biosC0[0x17] = psxBios__circgetc; + //biosC0[0x18] = psxBios__circputc; + //biosC0[0x19] = psxBios_ioabort; + //biosC0[0x1a] = psxBios_sys_c0_1a + //biosC0[0x1b] = psxBios_KernelRedirect; + //biosC0[0x1c] = psxBios_PatchAOTable; +//************** THE END *************************************** +/**/ + base = 0x1000; + size = sizeof(EvCB) * 32; + Event = (void *)&psxR[base]; base += size * 6; + memset(Event, 0, size * 6); + HwEV = Event; + EvEV = Event + 32; + RcEV = Event + 32 * 2; + UeEV = Event + 32 * 3; + SwEV = Event + 32 * 4; + ThEV = Event + 32 * 5; + + ptr = (u32 *)&psxM[0x0874]; // b0 table + ptr[0] = SWAPu32(0x4c54 - 0x884); + + ptr = (u32 *)&psxM[0x0674]; // c0 table + ptr[6] = SWAPu32(0xc80); + + memset(SysIntRP, 0, sizeof(SysIntRP)); + memset(Thread, 0, sizeof(Thread)); + Thread[0].status = 2; // main thread + + psxMu32ref(0x0150) = SWAPu32(0x160); + psxMu32ref(0x0154) = SWAPu32(0x320); + psxMu32ref(0x0160) = SWAPu32(0x248); + strcpy((char *)&psxM[0x248], "bu"); +/* psxMu32ref(0x0ca8) = SWAPu32(0x1f410004); + psxMu32ref(0x0cf0) = SWAPu32(0x3c020000); + psxMu32ref(0x0cf4) = SWAPu32(0x2442641c); + psxMu32ref(0x09e0) = SWAPu32(0x43d0); + psxMu32ref(0x4d98) = SWAPu32(0x946f000a); +*/ + // opcode HLE + psxRu32ref(0x0000) = SWAPu32((0x3b << 26) | 4); + psxMu32ref(0x0000) = SWAPu32((0x3b << 26) | 0); + psxMu32ref(0x00a0) = SWAPu32((0x3b << 26) | 1); + psxMu32ref(0x00b0) = SWAPu32((0x3b << 26) | 2); + psxMu32ref(0x00c0) = SWAPu32((0x3b << 26) | 3); + psxMu32ref(0x4c54) = SWAPu32((0x3b << 26) | 0); + psxMu32ref(0x8000) = SWAPu32((0x3b << 26) | 5); + psxMu32ref(0x07a0) = SWAPu32((0x3b << 26) | 0); + psxMu32ref(0x0884) = SWAPu32((0x3b << 26) | 0); + psxMu32ref(0x0894) = SWAPu32((0x3b << 26) | 0); + + // initial stack pointer for BIOS interrupt + psxMu32ref(0x6c80) = SWAPu32(0x000085c8); + + // initial RNG seed + psxMu32ref(0x9010) = SWAPu32(0xac20cc00); + + // fonts + len = 0x80000 - 0x66000; + uncompress((Bytef *)(psxR + 0x66000), &len, font_8140, sizeof(font_8140)); + len = 0x80000 - 0x69d68; + uncompress((Bytef *)(psxR + 0x69d68), &len, font_889f, sizeof(font_889f)); + + // memory size 2 MB + psxHu32ref(0x1060) = SWAPu32(0x00000b88); + + hleSoftCall = FALSE; +} + +void psxBiosShutdown() { +} + +#define psxBios_PADpoll(pad) { \ + PAD##pad##_startPoll(pad); \ + pad_buf##pad[0] = 0; \ + pad_buf##pad[1] = PAD##pad##_poll(0x42); \ + if (!(pad_buf##pad[1] & 0x0f)) { \ + bufcount = 32; \ + } else { \ + bufcount = (pad_buf##pad[1] & 0x0f) * 2; \ + } \ + PAD##pad##_poll(0); \ + i = 2; \ + while (bufcount--) { \ + pad_buf##pad[i++] = PAD##pad##_poll(0); \ + } \ +} + +void biosInterrupt() { + int i, bufcount; + +// if (psxHu32(0x1070) & 0x1) { // Vsync + if (pad_buf != NULL) { + u32 *buf = (u32*)pad_buf; + + if (!Config.UseNet) { + PAD1_startPoll(1); + if (PAD1_poll(0x42) == 0x23) { + PAD1_poll(0); + *buf = PAD1_poll(0) << 8; + *buf |= PAD1_poll(0); + PAD1_poll(0); + *buf &= ~((PAD1_poll(0) > 0x20) ? 1 << 6 : 0); + *buf &= ~((PAD1_poll(0) > 0x20) ? 1 << 7 : 0); + } else { + PAD1_poll(0); + *buf = PAD1_poll(0) << 8; + *buf|= PAD1_poll(0); + } + + PAD2_startPoll(2); + if (PAD2_poll(0x42) == 0x23) { + PAD2_poll(0); + *buf |= PAD2_poll(0) << 24; + *buf |= PAD2_poll(0) << 16; + PAD2_poll(0); + *buf &= ~((PAD2_poll(0) > 0x20) ? 1 << 22 : 0); + *buf &= ~((PAD2_poll(0) > 0x20) ? 1 << 23 : 0); + } else { + PAD2_poll(0); + *buf |= PAD2_poll(0) << 24; + *buf |= PAD2_poll(0) << 16; + } + } else { + u16 data; + + PAD1_startPoll(1); + PAD1_poll(0x42); + PAD1_poll(0); + data = PAD1_poll(0) << 8; + data |= PAD1_poll(0); + + if (NET_sendPadData(&data, 2) == -1) + netError(); + + if (NET_recvPadData(&((u16*)buf)[0], 1) == -1) + netError(); + if (NET_recvPadData(&((u16*)buf)[1], 2) == -1) + netError(); + } + } + if (Config.UseNet && pad_buf1 != NULL && pad_buf2 != NULL) { + psxBios_PADpoll(1); + + if (NET_sendPadData(pad_buf1, i) == -1) + netError(); + + if (NET_recvPadData(pad_buf1, 1) == -1) + netError(); + if (NET_recvPadData(pad_buf2, 2) == -1) + netError(); + } else { + if (pad_buf1) { + psxBios_PADpoll(1); + } + + if (pad_buf2) { + psxBios_PADpoll(2); + } + } + + if (psxHu32(0x1070) & 0x1) { // Vsync + if (RcEV[3][1].status == EvStACTIVE) { + softCall(RcEV[3][1].fhandler); +// hwWrite32(0x1f801070, ~(1)); + } + } + + if (psxHu32(0x1070) & 0x70) { // Rcnt 0,1,2 + int i; + + for (i = 0; i < 3; i++) { + if (psxHu32(0x1070) & (1 << (i + 4))) { + if (RcEV[i][1].status == EvStACTIVE) { + softCall(RcEV[i][1].fhandler); + } + psxHwWrite32(0x1f801070, ~(1 << (i + 4))); + } + } + } +} + +void psxBiosException() { + int i; + + switch (psxRegs.CP0.n.Cause & 0x3c) { + case 0x00: // Interrupt +#ifdef PSXCPU_LOG +// PSXCPU_LOG("interrupt\n"); +#endif + SaveRegs(); + + sp = psxMu32(0x6c80); // create new stack for interrupt handlers + + biosInterrupt(); + + for (i = 0; i < 8; i++) { + if (SysIntRP[i]) { + u32 *queue = (u32 *)PSXM(SysIntRP[i]); + + s0 = queue[2]; + softCall(queue[1]); + } + } + + if (jmp_int != NULL) { + int i; + + psxHwWrite32(0x1f801070, 0xffffffff); + + ra = jmp_int[0]; + sp = jmp_int[1]; + fp = jmp_int[2]; + for (i = 0; i < 8; i++) // s0-s7 + psxRegs.GPR.r[16 + i] = jmp_int[3 + i]; + gp = jmp_int[11]; + + v0 = 1; + pc0 = ra; + return; + } + psxHwWrite16(0x1f801070, 0); + break; + + case 0x20: // Syscall +#ifdef PSXCPU_LOG + PSXCPU_LOG("syscall exp %x\n", a0); +#endif + switch (a0) { + case 1: // EnterCritical - disable irq's + psxRegs.CP0.n.Status &= ~0x404; +v0=1; // HDHOSHY experimental patch: Spongebob, Coldblood, fearEffect, Medievil2, Martian Gothic + break; + + case 2: // ExitCritical - enable irq's + psxRegs.CP0.n.Status |= 0x404; + break; + } + pc0 = psxRegs.CP0.n.EPC + 4; + + psxRegs.CP0.n.Status = (psxRegs.CP0.n.Status & 0xfffffff0) | + ((psxRegs.CP0.n.Status & 0x3c) >> 2); + return; + + default: +#ifdef PSXCPU_LOG + PSXCPU_LOG("unknown bios exception!\n"); +#endif + break; + } + + pc0 = psxRegs.CP0.n.EPC; + if (psxRegs.CP0.n.Cause & 0x80000000) pc0+=4; + + psxRegs.CP0.n.Status = (psxRegs.CP0.n.Status & 0xfffffff0) | + ((psxRegs.CP0.n.Status & 0x3c) >> 2); +} + +#define bfreeze(ptr, size) { \ + if (Mode == 1) memcpy(&psxR[base], ptr, size); \ + if (Mode == 0) memcpy(ptr, &psxR[base], size); \ + base += size; \ +} + +#define bfreezes(ptr) bfreeze(ptr, sizeof(ptr)) +#define bfreezel(ptr) bfreeze(ptr, sizeof(*ptr)) + +#define bfreezepsxMptr(ptr, type) { \ + if (Mode == 1) { \ + if (ptr) psxRu32ref(base) = SWAPu32((s8 *)(ptr) - psxM); \ + else psxRu32ref(base) = 0; \ + } else { \ + if (psxRu32(base) != 0) ptr = (type *)(psxM + psxRu32(base)); \ + else (ptr) = NULL; \ + } \ + base += sizeof(u32); \ +} + +void psxBiosFreeze(int Mode) { + u32 base = 0x40000; + + bfreezepsxMptr(jmp_int, u32); + bfreezepsxMptr(pad_buf, int); + bfreezepsxMptr(pad_buf1, char); + bfreezepsxMptr(pad_buf2, char); + bfreezepsxMptr(heap_addr, u32); + bfreezel(&pad_buf1len); + bfreezel(&pad_buf2len); + bfreezes(regs); + bfreezes(SysIntRP); + bfreezel(&CardState); + bfreezes(Thread); + bfreezel(&CurThread); + bfreezes(FDesc); +} diff --git a/libpcsxcore/psxbios.h b/libpcsxcore/psxbios.h new file mode 100644 index 00000000..635b35a5 --- /dev/null +++ b/libpcsxcore/psxbios.h @@ -0,0 +1,51 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __PSXBIOS_H__ +#define __PSXBIOS_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "r3000a.h" +#include "psxmem.h" +#include "misc.h" +#include "sio.h" + +extern char *biosA0n[256]; +extern char *biosB0n[256]; +extern char *biosC0n[256]; + +void psxBiosInit(); +void psxBiosShutdown(); +void psxBiosException(); +void psxBiosFreeze(int Mode); + +extern void (*biosA0[256])(); +extern void (*biosB0[256])(); +extern void (*biosC0[256])(); + +extern boolean hleSoftCall; + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/psxcommon.c b/libpcsxcore/psxcommon.c new file mode 100644 index 00000000..f118c2db --- /dev/null +++ b/libpcsxcore/psxcommon.c @@ -0,0 +1,76 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#include "psxcommon.h" +#include "r3000a.h" +#include "psxbios.h" + +#include "cheat.h" +#include "ppf.h" + +PcsxConfig Config; +boolean NetOpened = FALSE; + +int Log = 0; +FILE *emuLog = NULL; + +int EmuInit() { + return psxInit(); +} + +void EmuReset() { + FreeCheatSearchResults(); + FreeCheatSearchMem(); + + psxReset(); +} + +void EmuShutdown() { + ClearAllCheats(); + FreeCheatSearchResults(); + FreeCheatSearchMem(); + + FreePPFCache(); + + psxShutdown(); +} + +void EmuUpdate() { + // Do not allow hotkeys inside a softcall from HLE BIOS + if (!Config.HLE || !hleSoftCall) + SysUpdate(); + + ApplyCheats(); +} + +void __Log(char *fmt, ...) { + va_list list; +#ifdef LOG_STDOUT + char tmp[1024]; +#endif + + va_start(list, fmt); +#ifndef LOG_STDOUT + vfprintf(emuLog, fmt, list); +#else + vsprintf(tmp, fmt, list); + SysPrintf(tmp); +#endif + va_end(list); +} diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h new file mode 100644 index 00000000..500c44ad --- /dev/null +++ b/libpcsxcore/psxcommon.h @@ -0,0 +1,169 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* This file contains common definitions and includes for all parts of the +* emulator core. +*/ + +#ifndef __PSXCOMMON_H__ +#define __PSXCOMMON_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "config.h" + +// System includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Define types +typedef int8_t s8; +typedef int16_t s16; +typedef int32_t s32; +typedef int64_t s64; +typedef intptr_t sptr; + +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; +typedef uintptr_t uptr; + +typedef uint8_t boolean; + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +// Local includes +#include "system.h" +#include "debug.h" + +#if defined (__LINUX__) || defined (__MACOSX__) +#define strnicmp strncasecmp +#endif +#define __inline inline + +// Enables NLS/internationalization if active +#ifdef ENABLE_NLS + +#include + +#undef _ +#define _(String) gettext(String) +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +# define N_(String) (String) +#endif + +#else + +#define _(msgid) msgid +#define N_(msgid) msgid + +#endif + +extern FILE *emuLog; +extern int Log; + +void __Log(char *fmt, ...); + +typedef struct { + char Gpu[MAXPATHLEN]; + char Spu[MAXPATHLEN]; + char Cdr[MAXPATHLEN]; + char Pad1[MAXPATHLEN]; + char Pad2[MAXPATHLEN]; + char Net[MAXPATHLEN]; + char Sio1[MAXPATHLEN]; + char Mcd1[MAXPATHLEN]; + char Mcd2[MAXPATHLEN]; + char Bios[MAXPATHLEN]; + char BiosDir[MAXPATHLEN]; + char PluginsDir[MAXPATHLEN]; + char PatchesDir[MAXPATHLEN]; + boolean Xa; + boolean Sio; + boolean Mdec; + boolean PsxAuto; + boolean Cdda; + boolean HLE; + boolean Debug; + boolean PsxOut; + boolean SpuIrq; + boolean RCntFix; + boolean UseNet; + boolean VSyncWA; + u8 Cpu; // CPU_DYNAREC or CPU_INTERPRETER + u8 PsxType; // PSX_TYPE_NTSC or PSX_TYPE_PAL +#ifdef _WIN32 + char Lang[256]; +#endif +} PcsxConfig; + +extern PcsxConfig Config; +extern boolean NetOpened; + +#define gzfreeze(ptr, size) { \ + if (Mode == 1) gzwrite(f, ptr, size); \ + if (Mode == 0) gzread(f, ptr, size); \ +} + +// Make the timing events trigger faster as we are currently assuming everything +// takes one cycle, which is not the case on real hardware. +// FIXME: Count the proper cycle and get rid of this +#define BIAS 2 +#define PSXCLK 33868800 /* 33.8688 MHz */ + +enum { + PSX_TYPE_NTSC = 0, + PSX_TYPE_PAL +}; // PSX Types + +enum { + CPU_DYNAREC = 0, + CPU_INTERPRETER +}; // CPU Types + +int EmuInit(); +void EmuReset(); +void EmuShutdown(); +void EmuUpdate(); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c new file mode 100644 index 00000000..ebfe6296 --- /dev/null +++ b/libpcsxcore/psxcounters.c @@ -0,0 +1,480 @@ +/*************************************************************************** + * Copyright (C) 2010 by Blade_Arma * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* + * Internal PSX counters. + */ + +#include "psxcounters.h" + +/******************************************************************************/ + +typedef struct Rcnt +{ + u16 mode, target; + u32 rate, irq, counterState, irqState; + u32 cycle, cycleStart; +} Rcnt; + +enum +{ + Rc0Gate = 0x0001, // 0 not implemented + Rc1Gate = 0x0001, // 0 not implemented + Rc2Disable = 0x0001, // 0 partially implemented + RcUnknown1 = 0x0002, // 1 ? + RcUnknown2 = 0x0004, // 2 ? + RcCountToTarget = 0x0008, // 3 + RcIrqOnTarget = 0x0010, // 4 + RcIrqOnOverflow = 0x0020, // 5 + RcIrqRegenerate = 0x0040, // 6 + RcUnknown7 = 0x0080, // 7 ? + Rc0PixelClock = 0x0100, // 8 fake implementation + Rc1HSyncClock = 0x0100, // 8 + Rc2Unknown8 = 0x0100, // 8 ? + Rc0Unknown9 = 0x0200, // 9 ? + Rc1Unknown9 = 0x0200, // 9 ? + Rc2OneEighthClock = 0x0200, // 9 + RcUnknown10 = 0x0400, // 10 ? + RcCountEqTarget = 0x0800, // 11 + RcOverflow = 0x1000, // 12 + RcUnknown13 = 0x2000, // 13 ? (always zero) + RcUnknown14 = 0x4000, // 14 ? (always zero) + RcUnknown15 = 0x8000, // 15 ? (always zero) +}; + +#define CounterQuantity ( 4 ) +//static const u32 CounterQuantity = 4; + +static const u32 CountToOverflow = 0; +static const u32 CountToTarget = 1; + +static const u32 FrameRate[] = { 60, 50 }; +static const u32 VBlankStart[] = { 240, 256 }; +static const u32 HSyncTotal[] = { 262, 312 }; +static const u32 SpuUpdInterval[] = { 23, 22 }; + +static const s32 VerboseLevel = 0; + +/******************************************************************************/ + +static Rcnt rcnts[ CounterQuantity ]; + +static u32 hSyncCount = 0; +static u32 spuSyncCount = 0; + +u32 psxNextCounter = 0, psxNextsCounter = 0; + +/******************************************************************************/ + +static inline +void setIrq( u32 irq ) +{ + psxHu32ref(0x1070) |= SWAPu32(irq); +} + +static +void verboseLog( s32 level, const char *str, ... ) +{ + if( level <= VerboseLevel ) + { + va_list va; + char buf[ 4096 ]; + + va_start( va, str ); + vsprintf( buf, str, va ); + va_end( va ); + + printf( buf ); + fflush( stdout ); + } +} + +/******************************************************************************/ + +static inline +void _psxRcntWcount( u32 index, u32 value ) +{ + if( value > 0xffff ) + { + verboseLog( 1, "[RCNT %i] wcount > 0xffff: %x\n", index, value ); + value &= 0xffff; + } + + rcnts[index].cycleStart = psxRegs.cycle; + rcnts[index].cycleStart -= value * rcnts[index].rate; + + // TODO: <=. + if( value < rcnts[index].target ) + { + rcnts[index].cycle = rcnts[index].target * rcnts[index].rate; + rcnts[index].counterState = CountToTarget; + } + else + { + rcnts[index].cycle = 0xffff * rcnts[index].rate; + rcnts[index].counterState = CountToOverflow; + } +} + +static inline +u32 _psxRcntRcount( u32 index ) +{ + u32 count; + + count = psxRegs.cycle; + count -= rcnts[index].cycleStart; + count /= rcnts[index].rate; + + if( count > 0xffff ) + { + verboseLog( 1, "[RCNT %i] rcount > 0xffff: %x\n", index, count ); + count &= 0xffff; + } + + return count; +} + +/******************************************************************************/ + +static +void psxRcntSet() +{ + s32 countToUpdate; + u32 i; + + psxNextsCounter = psxRegs.cycle; + psxNextCounter = 0x7fffffff; + + for( i = 0; i < CounterQuantity; ++i ) + { + countToUpdate = rcnts[i].cycle - (psxNextsCounter - rcnts[i].cycleStart); + + if( countToUpdate < 0 ) + { + psxNextCounter = 0; + break; + } + + if( countToUpdate < (s32)psxNextCounter ) + { + psxNextCounter = countToUpdate; + } + } +} + +/******************************************************************************/ + +static +void psxRcntReset( u32 index ) +{ + u32 count; + + if( rcnts[index].counterState == CountToTarget ) + { + if( rcnts[index].mode & RcCountToTarget ) + { + count = psxRegs.cycle; + count -= rcnts[index].cycleStart; + count /= rcnts[index].rate; + count -= rcnts[index].target; + } + else + { + count = _psxRcntRcount( index ); + } + + _psxRcntWcount( index, count ); + + if( rcnts[index].mode & RcIrqOnTarget ) + { + if( (rcnts[index].mode & RcIrqRegenerate) || (!rcnts[index].irqState) ) + { + verboseLog( 3, "[RCNT %i] irq: %x\n", index, count ); + setIrq( rcnts[index].irq ); + rcnts[index].irqState = 1; + } + } + + rcnts[index].mode |= RcCountEqTarget; + } + else if( rcnts[index].counterState == CountToOverflow ) + { + count = psxRegs.cycle; + count -= rcnts[index].cycleStart; + count /= rcnts[index].rate; + count -= 0xffff; + + _psxRcntWcount( index, count ); + + if( rcnts[index].mode & RcIrqOnOverflow ) + { + if( (rcnts[index].mode & RcIrqRegenerate) || (!rcnts[index].irqState) ) + { + verboseLog( 3, "[RCNT %i] irq: %x\n", index, count ); + setIrq( rcnts[index].irq ); + rcnts[index].irqState = 1; + } + } + + rcnts[index].mode |= RcOverflow; + } + + rcnts[index].mode |= RcUnknown10; + + psxRcntSet(); +} + +void psxRcntUpdate() +{ + u32 cycle; + + cycle = psxRegs.cycle; + + // rcnt 0. + if( cycle - rcnts[0].cycleStart >= rcnts[0].cycle ) + { + psxRcntReset( 0 ); + } + + // rcnt 1. + if( cycle - rcnts[1].cycleStart >= rcnts[1].cycle ) + { + psxRcntReset( 1 ); + } + + // rcnt 2. + if( cycle - rcnts[2].cycleStart >= rcnts[2].cycle ) + { + psxRcntReset( 2 ); + } + + // rcnt base. + if( cycle - rcnts[3].cycleStart >= rcnts[3].cycle ) + { + psxRcntReset( 3 ); + + spuSyncCount++; + hSyncCount++; + + // Update spu. + if( spuSyncCount >= SpuUpdInterval[Config.PsxType] ) + { + spuSyncCount = 0; + + if( SPU_async ) + { + SPU_async( SpuUpdInterval[Config.PsxType] * rcnts[3].target ); + } + } + + // VSync irq. + if( hSyncCount == VBlankStart[Config.PsxType] ) + { + GPU_vBlank( 1 ); + + // For the best times. :D + //setIrq( 0x01 ); + } + + // Update lace. (with InuYasha fix) + if( hSyncCount >= (Config.VSyncWA ? HSyncTotal[Config.PsxType] / BIAS : HSyncTotal[Config.PsxType]) ) + { + hSyncCount = 0; + + GPU_vBlank( 0 ); + setIrq( 0x01 ); + + GPU_updateLace(); + EmuUpdate(); + } + } + + DebugVSync(); +} + +/******************************************************************************/ + +void psxRcntWcount( u32 index, u32 value ) +{ + verboseLog( 2, "[RCNT %i] wcount: %x\n", index, value ); + + psxRcntUpdate(); + + _psxRcntWcount( index, value ); + psxRcntSet(); +} + +void psxRcntWmode( u32 index, u32 value ) +{ + verboseLog( 1, "[RCNT %i] wmode: %x\n", index, value ); + + psxRcntUpdate(); + + rcnts[index].mode = value; + rcnts[index].irqState = 0; + + switch( index ) + { + case 0: + if( value & Rc0PixelClock ) + { + rcnts[index].rate = 5; + } + else + { + rcnts[index].rate = 1; + } + break; + case 1: + if( value & Rc1HSyncClock ) + { + rcnts[index].rate = (PSXCLK / (FrameRate[Config.PsxType] * HSyncTotal[Config.PsxType])); + } + else + { + rcnts[index].rate = 1; + } + break; + case 2: + if( value & Rc2OneEighthClock ) + { + rcnts[index].rate = 8; + } + else + { + rcnts[index].rate = 1; + } + + // TODO: wcount must work. + if( value & Rc2Disable ) + { + rcnts[index].rate = 0xffffffff; + } + break; + } + + _psxRcntWcount( index, 0 ); + psxRcntSet(); +} + +void psxRcntWtarget( u32 index, u32 value ) +{ + verboseLog( 1, "[RCNT %i] wtarget: %x\n", index, value ); + + psxRcntUpdate(); + + rcnts[index].target = value; + + _psxRcntWcount( index, _psxRcntRcount( index ) ); + psxRcntSet(); +} + +/******************************************************************************/ + +u32 psxRcntRcount( u32 index ) +{ + u32 count; + + psxRcntUpdate(); + + count = _psxRcntRcount( index ); + + // Parasite Eve 2 fix. + if( Config.RCntFix ) + { + if( index == 2 ) + { + if( rcnts[index].counterState == CountToTarget ) + { + count /= BIAS; + } + } + } + + verboseLog( 2, "[RCNT %i] rcount: %x\n", index, count ); + + return count; +} + +u32 psxRcntRmode( u32 index ) +{ + u16 mode; + + psxRcntUpdate(); + + mode = rcnts[index].mode; + rcnts[index].mode &= 0xe7ff; + + verboseLog( 2, "[RCNT %i] rmode: %x\n", index, mode ); + + return mode; +} + +u32 psxRcntRtarget( u32 index ) +{ + verboseLog( 2, "[RCNT %i] rtarget: %x\n", index, rcnts[index].target ); + + return rcnts[index].target; +} + +/******************************************************************************/ + +void psxRcntInit() +{ + s32 i; + + // rcnt 0. + rcnts[0].rate = 1; + rcnts[0].irq = 0x10; + + // rcnt 1. + rcnts[1].rate = 1; + rcnts[1].irq = 0x20; + + // rcnt 2. + rcnts[2].rate = 1; + rcnts[2].irq = 0x40; + + // rcnt base. + rcnts[3].rate = 1; + rcnts[3].mode = RcCountToTarget; + rcnts[3].target = (PSXCLK / (FrameRate[Config.PsxType] * HSyncTotal[Config.PsxType])); + + for( i = 0; i < CounterQuantity; ++i ) + { + _psxRcntWcount( i, 0 ); + } + + psxRcntSet(); +} + +/******************************************************************************/ + +s32 psxRcntFreeze( gzFile f, s32 Mode ) +{ + gzfreeze( &rcnts, sizeof(rcnts) ); + gzfreeze( &hSyncCount, sizeof(hSyncCount) ); + gzfreeze( &spuSyncCount, sizeof(spuSyncCount) ); + gzfreeze( &psxNextCounter, sizeof(psxNextCounter) ); + gzfreeze( &psxNextsCounter, sizeof(psxNextsCounter) ); + + return 0; +} + +/******************************************************************************/ diff --git a/libpcsxcore/psxcounters.h b/libpcsxcore/psxcounters.h new file mode 100644 index 00000000..bccb2e4d --- /dev/null +++ b/libpcsxcore/psxcounters.h @@ -0,0 +1,50 @@ +/*************************************************************************** + * Copyright (C) 2010 by Blade_Arma * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __PSXCOUNTERS_H__ +#define __PSXCOUNTERS_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "r3000a.h" +#include "psxmem.h" +#include "plugins.h" + +extern u32 psxNextCounter, psxNextsCounter; + +void psxRcntInit(); +void psxRcntUpdate(); + +void psxRcntWcount(u32 index, u32 value); +void psxRcntWmode(u32 index, u32 value); +void psxRcntWtarget(u32 index, u32 value); + +u32 psxRcntRcount(u32 index); +u32 psxRcntRmode(u32 index); +u32 psxRcntRtarget(u32 index); + +s32 psxRcntFreeze(gzFile f, s32 Mode); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/psxdma.c b/libpcsxcore/psxdma.c new file mode 100644 index 00000000..f59f268e --- /dev/null +++ b/libpcsxcore/psxdma.c @@ -0,0 +1,174 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* Handles PSX DMA functions. +*/ + +#include "psxdma.h" + +// Dma0/1 in Mdec.c +// Dma3 in CdRom.c + +void spuInterrupt() { + HW_DMA4_CHCR &= SWAP32(~0x01000000); + DMA_INTERRUPT(4); +} + +void psxDma4(u32 madr, u32 bcr, u32 chcr) { // SPU + u16 *ptr; + u32 size; + + switch (chcr) { + case 0x01000201: //cpu to spu transfer +#ifdef PSXDMA_LOG + PSXDMA_LOG("*** DMA4 SPU - mem2spu *** %x addr = %x size = %x\n", chcr, madr, bcr); +#endif + ptr = (u16 *)PSXM(madr); + if (ptr == NULL) { +#ifdef CPU_LOG + CPU_LOG("*** DMA4 SPU - mem2spu *** NULL Pointer!!!\n"); +#endif + break; + } + SPU_writeDMAMem(ptr, (bcr >> 16) * (bcr & 0xffff) * 2); + SPUDMA_INT((bcr >> 16) * (bcr & 0xffff) / 2); + return; + + case 0x01000200: //spu to cpu transfer +#ifdef PSXDMA_LOG + PSXDMA_LOG("*** DMA4 SPU - spu2mem *** %x addr = %x size = %x\n", chcr, madr, bcr); +#endif + ptr = (u16 *)PSXM(madr); + if (ptr == NULL) { +#ifdef CPU_LOG + CPU_LOG("*** DMA4 SPU - spu2mem *** NULL Pointer!!!\n"); +#endif + break; + } + size = (bcr >> 16) * (bcr & 0xffff) * 2; + SPU_readDMAMem(ptr, size); + psxCpu->Clear(madr, size); + break; + +#ifdef PSXDMA_LOG + default: + PSXDMA_LOG("*** DMA4 SPU - unknown *** %x addr = %x size = %x\n", chcr, madr, bcr); + break; +#endif + } + + HW_DMA4_CHCR &= SWAP32(~0x01000000); + DMA_INTERRUPT(4); +} + +void psxDma2(u32 madr, u32 bcr, u32 chcr) { // GPU + u32 *ptr; + u32 size; + + switch(chcr) { + case 0x01000200: // vram2mem +#ifdef PSXDMA_LOG + PSXDMA_LOG("*** DMA2 GPU - vram2mem *** %x addr = %x size = %x\n", chcr, madr, bcr); +#endif + ptr = (u32 *)PSXM(madr); + if (ptr == NULL) { +#ifdef CPU_LOG + CPU_LOG("*** DMA2 GPU - vram2mem *** NULL Pointer!!!\n"); +#endif + break; + } + size = (bcr >> 16) * (bcr & 0xffff); + GPU_readDataMem(ptr, size); + psxCpu->Clear(madr, size); + break; + + case 0x01000201: // mem2vram +#ifdef PSXDMA_LOG + PSXDMA_LOG("*** DMA 2 - GPU mem2vram *** %x addr = %x size = %x\n", chcr, madr, bcr); +#endif + ptr = (u32 *)PSXM(madr); + if (ptr == NULL) { +#ifdef CPU_LOG + CPU_LOG("*** DMA2 GPU - mem2vram *** NULL Pointer!!!\n"); +#endif + break; + } + size = (bcr >> 16) * (bcr & 0xffff); + GPU_writeDataMem(ptr, size); + GPUDMA_INT(size / 4); + return; + + case 0x01000401: // dma chain +#ifdef PSXDMA_LOG + PSXDMA_LOG("*** DMA 2 - GPU dma chain *** %x addr = %x size = %x\n", chcr, madr, bcr); +#endif + GPU_dmaChain((u32 *)psxM, madr & 0x1fffff); + break; + +#ifdef PSXDMA_LOG + default: + PSXDMA_LOG("*** DMA 2 - GPU unknown *** %x addr = %x size = %x\n", chcr, madr, bcr); + break; +#endif + } + + HW_DMA2_CHCR &= SWAP32(~0x01000000); + DMA_INTERRUPT(2); +} + +void gpuInterrupt() { + HW_DMA2_CHCR &= SWAP32(~0x01000000); + DMA_INTERRUPT(2); +} + +void psxDma6(u32 madr, u32 bcr, u32 chcr) { + u32 *mem = (u32 *)PSXM(madr); + +#ifdef PSXDMA_LOG + PSXDMA_LOG("*** DMA6 OT *** %x addr = %x size = %x\n", chcr, madr, bcr); +#endif + + if (chcr == 0x11000002) { + if (mem == NULL) { +#ifdef CPU_LOG + CPU_LOG("*** DMA6 OT *** NULL Pointer!!!\n"); +#endif + HW_DMA6_CHCR &= SWAP32(~0x01000000); + DMA_INTERRUPT(6); + return; + } + + while (bcr--) { + *mem-- = SWAP32((madr - 4) & 0xffffff); + madr -= 4; + } + mem++; *mem = 0xffffff; + } +#ifdef PSXDMA_LOG + else { + // Unknown option + PSXDMA_LOG("*** DMA6 OT - unknown *** %x addr = %x size = %x\n", chcr, madr, bcr); + } +#endif + + HW_DMA6_CHCR &= SWAP32(~0x01000000); + DMA_INTERRUPT(6); +} + diff --git a/libpcsxcore/psxdma.h b/libpcsxcore/psxdma.h new file mode 100644 index 00000000..0db6533f --- /dev/null +++ b/libpcsxcore/psxdma.h @@ -0,0 +1,60 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __PSXDMA_H__ +#define __PSXDMA_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "r3000a.h" +#include "psxhw.h" +#include "psxmem.h" + +#define GPUDMA_INT(eCycle) { \ + psxRegs.interrupt |= 0x01000000; \ + psxRegs.intCycle[3 + 24 + 1] = eCycle; \ + psxRegs.intCycle[3 + 24] = psxRegs.cycle; \ +} + +#define SPUDMA_INT(eCycle) { \ + psxRegs.interrupt |= 0x04000000; \ + psxRegs.intCycle[1 + 24 + 1] = eCycle; \ + psxRegs.intCycle[1 + 24] = psxRegs.cycle; \ +} + +#define MDECOUTDMA_INT(eCycle) { \ + psxRegs.interrupt |= 0x02000000; \ + psxRegs.intCycle[5 + 24 + 1] = eCycle; \ + psxRegs.intCycle[5 + 24] = psxRegs.cycle; \ +} + +void psxDma2(u32 madr, u32 bcr, u32 chcr); +void psxDma3(u32 madr, u32 bcr, u32 chcr); +void psxDma4(u32 madr, u32 bcr, u32 chcr); +void psxDma6(u32 madr, u32 bcr, u32 chcr); +void gpuInterrupt(); +void spuInterrupt(); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/psxhle.c b/libpcsxcore/psxhle.c new file mode 100644 index 00000000..83362ecd --- /dev/null +++ b/libpcsxcore/psxhle.c @@ -0,0 +1,96 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* Internal PSX HLE functions. +*/ + +#include "psxhle.h" + +static void hleDummy() { + psxRegs.pc = psxRegs.GPR.n.ra; + + psxBranchTest(); +} + +static void hleA0() { + u32 call = psxRegs.GPR.n.t1 & 0xff; + + if (biosA0[call]) biosA0[call](); + + psxBranchTest(); +} + +static void hleB0() { + u32 call = psxRegs.GPR.n.t1 & 0xff; + + if (biosB0[call]) biosB0[call](); + + psxBranchTest(); +} + +static void hleC0() { + u32 call = psxRegs.GPR.n.t1 & 0xff; + + if (biosC0[call]) biosC0[call](); + + psxBranchTest(); +} + +static void hleBootstrap() { // 0xbfc00000 + SysPrintf("hleBootstrap\n"); + CheckCdrom(); + LoadCdrom(); + SysPrintf("CdromLabel: \"%s\": PC = %8.8lx (SP = %8.8lx)\n", CdromLabel, psxRegs.pc, psxRegs.GPR.n.sp); +} + +typedef struct { + u32 _pc0; + u32 gp0; + u32 t_addr; + u32 t_size; + u32 d_addr; + u32 d_size; + u32 b_addr; + u32 b_size; + u32 S_addr; + u32 s_size; + u32 _sp,_fp,_gp,ret,base; +} EXEC; + +static void hleExecRet() { + EXEC *header = (EXEC*)PSXM(psxRegs.GPR.n.s0); + + SysPrintf("ExecRet %x: %x\n", psxRegs.GPR.n.s0, header->ret); + + psxRegs.GPR.n.ra = header->ret; + psxRegs.GPR.n.sp = header->_sp; + psxRegs.GPR.n.s8 = header->_fp; + psxRegs.GPR.n.gp = header->_gp; + psxRegs.GPR.n.s0 = header->base; + + psxRegs.GPR.n.v0 = 1; + psxRegs.pc = psxRegs.GPR.n.ra; +} + +void (*psxHLEt[256])() = { + hleDummy, hleA0, hleB0, hleC0, + hleBootstrap, hleExecRet, + hleDummy, hleDummy +}; diff --git a/libpcsxcore/psxhle.h b/libpcsxcore/psxhle.h new file mode 100644 index 00000000..eef78e80 --- /dev/null +++ b/libpcsxcore/psxhle.h @@ -0,0 +1,36 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __PSXHLE_H__ +#define __PSXHLE_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "r3000a.h" +#include "plugins.h" + +extern void (*psxHLEt[256])(); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c new file mode 100644 index 00000000..9123f76c --- /dev/null +++ b/libpcsxcore/psxhw.c @@ -0,0 +1,741 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* Functions for PSX hardware control. +*/ + +#include "psxhw.h" +#include "mdec.h" +#include "cdrom.h" + +void psxHwReset() { + if (Config.Sio) psxHu32ref(0x1070) |= SWAP32(0x80); + if (Config.SpuIrq) psxHu32ref(0x1070) |= SWAP32(0x200); + + memset(psxH, 0, 0x10000); + + mdecInit(); // initialize mdec decoder + cdrReset(); + psxRcntInit(); +} + +u8 psxHwRead8(u32 add) { + unsigned char hard; + + switch (add) { + case 0x1f801040: hard = sioRead8();break; +#ifdef ENABLE_SIO1API + case 0x1f801050: hard = SIO1_readData8(); break; +#endif + case 0x1f801800: hard = cdrRead0(); break; + case 0x1f801801: hard = cdrRead1(); break; + case 0x1f801802: hard = cdrRead2(); break; + case 0x1f801803: hard = cdrRead3(); break; + default: + hard = psxHu8(add); +#ifdef PSXHW_LOG + PSXHW_LOG("*Unkwnown 8bit read at address %x\n", add); +#endif + return hard; + } + +#ifdef PSXHW_LOG + PSXHW_LOG("*Known 8bit read at address %x value %x\n", add, hard); +#endif + return hard; +} + +u16 psxHwRead16(u32 add) { + unsigned short hard; + + switch (add) { +#ifdef PSXHW_LOG + case 0x1f801070: PSXHW_LOG("IREG 16bit read %x\n", psxHu16(0x1070)); + return psxHu16(0x1070); +#endif +#ifdef PSXHW_LOG + case 0x1f801074: PSXHW_LOG("IMASK 16bit read %x\n", psxHu16(0x1074)); + return psxHu16(0x1074); +#endif + + case 0x1f801040: + hard = sioRead8(); + hard|= sioRead8() << 8; +#ifdef PAD_LOG + PAD_LOG("sio read16 %x; ret = %x\n", add&0xf, hard); +#endif + return hard; + case 0x1f801044: + hard = sioReadStat16(); +#ifdef PAD_LOG + PAD_LOG("sio read16 %x; ret = %x\n", add&0xf, hard); +#endif + return hard; + case 0x1f801048: + hard = sioReadMode16(); +#ifdef PAD_LOG + PAD_LOG("sio read16 %x; ret = %x\n", add&0xf, hard); +#endif + return hard; + case 0x1f80104a: + hard = sioReadCtrl16(); +#ifdef PAD_LOG + PAD_LOG("sio read16 %x; ret = %x\n", add&0xf, hard); +#endif + return hard; + case 0x1f80104e: + hard = sioReadBaud16(); +#ifdef PAD_LOG + PAD_LOG("sio read16 %x; ret = %x\n", add&0xf, hard); +#endif + return hard; +#ifdef ENABLE_SIO1API + case 0x1f801050: + hard = SIO1_readData16(); + return hard; + case 0x1f801054: + hard = SIO1_readStat16(); + return hard; + case 0x1f80105a: + hard = SIO1_readCtrl16(); + return hard; + case 0x1f80105e: + hard = SIO1_readBaud16(); + return hard; +#endif + case 0x1f801100: + hard = psxRcntRcount(0); +#ifdef PSXHW_LOG + PSXHW_LOG("T0 count read16: %x\n", hard); +#endif + return hard; + case 0x1f801104: + hard = psxRcntRmode(0); +#ifdef PSXHW_LOG + PSXHW_LOG("T0 mode read16: %x\n", hard); +#endif + return hard; + case 0x1f801108: + hard = psxRcntRtarget(0); +#ifdef PSXHW_LOG + PSXHW_LOG("T0 target read16: %x\n", hard); +#endif + return hard; + case 0x1f801110: + hard = psxRcntRcount(1); +#ifdef PSXHW_LOG + PSXHW_LOG("T1 count read16: %x\n", hard); +#endif + return hard; + case 0x1f801114: + hard = psxRcntRmode(1); +#ifdef PSXHW_LOG + PSXHW_LOG("T1 mode read16: %x\n", hard); +#endif + return hard; + case 0x1f801118: + hard = psxRcntRtarget(1); +#ifdef PSXHW_LOG + PSXHW_LOG("T1 target read16: %x\n", hard); +#endif + return hard; + case 0x1f801120: + hard = psxRcntRcount(2); +#ifdef PSXHW_LOG + PSXHW_LOG("T2 count read16: %x\n", hard); +#endif + return hard; + case 0x1f801124: + hard = psxRcntRmode(2); +#ifdef PSXHW_LOG + PSXHW_LOG("T2 mode read16: %x\n", hard); +#endif + return hard; + case 0x1f801128: + hard = psxRcntRtarget(2); +#ifdef PSXHW_LOG + PSXHW_LOG("T2 target read16: %x\n", hard); +#endif + return hard; + + //case 0x1f802030: hard = //int_2000???? + //case 0x1f802040: hard =//dip switches...?? + + default: + if (add >= 0x1f801c00 && add < 0x1f801e00) { + hard = SPU_readRegister(add); + } else { + hard = psxHu16(add); +#ifdef PSXHW_LOG + PSXHW_LOG("*Unkwnown 16bit read at address %x\n", add); +#endif + } + return hard; + } + +#ifdef PSXHW_LOG + PSXHW_LOG("*Known 16bit read at address %x value %x\n", add, hard); +#endif + return hard; +} + +u32 psxHwRead32(u32 add) { + u32 hard; + + switch (add) { + case 0x1f801040: + hard = sioRead8(); + hard |= sioRead8() << 8; + hard |= sioRead8() << 16; + hard |= sioRead8() << 24; +#ifdef PAD_LOG + PAD_LOG("sio read32 ;ret = %x\n", hard); +#endif + return hard; +#ifdef ENABLE_SIO1API + case 0x1f801050: + hard = SIO1_readData32(); + return hard; +#endif +#ifdef PSXHW_LOG + case 0x1f801060: + PSXHW_LOG("RAM size read %x\n", psxHu32(0x1060)); + return psxHu32(0x1060); +#endif +#ifdef PSXHW_LOG + case 0x1f801070: PSXHW_LOG("IREG 32bit read %x\n", psxHu32(0x1070)); + return psxHu32(0x1070); +#endif +#ifdef PSXHW_LOG + case 0x1f801074: PSXHW_LOG("IMASK 32bit read %x\n", psxHu32(0x1074)); + return psxHu32(0x1074); +#endif + + case 0x1f801810: + hard = GPU_readData(); +#ifdef PSXHW_LOG + PSXHW_LOG("GPU DATA 32bit read %x\n", hard); +#endif + return hard; + case 0x1f801814: + hard = GPU_readStatus(); +#ifdef PSXHW_LOG + PSXHW_LOG("GPU STATUS 32bit read %x\n", hard); +#endif + return hard; + + case 0x1f801820: hard = mdecRead0(); break; + case 0x1f801824: hard = mdecRead1(); break; + +#ifdef PSXHW_LOG + case 0x1f8010a0: + PSXHW_LOG("DMA2 MADR 32bit read %x\n", psxHu32(0x10a0)); + return SWAPu32(HW_DMA2_MADR); + case 0x1f8010a4: + PSXHW_LOG("DMA2 BCR 32bit read %x\n", psxHu32(0x10a4)); + return SWAPu32(HW_DMA2_BCR); + case 0x1f8010a8: + PSXHW_LOG("DMA2 CHCR 32bit read %x\n", psxHu32(0x10a8)); + return SWAPu32(HW_DMA2_CHCR); +#endif + +#ifdef PSXHW_LOG + case 0x1f8010b0: + PSXHW_LOG("DMA3 MADR 32bit read %x\n", psxHu32(0x10b0)); + return SWAPu32(HW_DMA3_MADR); + case 0x1f8010b4: + PSXHW_LOG("DMA3 BCR 32bit read %x\n", psxHu32(0x10b4)); + return SWAPu32(HW_DMA3_BCR); + case 0x1f8010b8: + PSXHW_LOG("DMA3 CHCR 32bit read %x\n", psxHu32(0x10b8)); + return SWAPu32(HW_DMA3_CHCR); +#endif + +#ifdef PSXHW_LOG +/* case 0x1f8010f0: + PSXHW_LOG("DMA PCR 32bit read %x\n", psxHu32(0x10f0)); + return SWAPu32(HW_DMA_PCR); // dma rest channel + case 0x1f8010f4: + PSXHW_LOG("DMA ICR 32bit read %x\n", psxHu32(0x10f4)); + return SWAPu32(HW_DMA_ICR); // interrupt enabler?*/ +#endif + + // time for rootcounters :) + case 0x1f801100: + hard = psxRcntRcount(0); +#ifdef PSXHW_LOG + PSXHW_LOG("T0 count read32: %x\n", hard); +#endif + return hard; + case 0x1f801104: + hard = psxRcntRmode(0); +#ifdef PSXHW_LOG + PSXHW_LOG("T0 mode read32: %x\n", hard); +#endif + return hard; + case 0x1f801108: + hard = psxRcntRtarget(0); +#ifdef PSXHW_LOG + PSXHW_LOG("T0 target read32: %x\n", hard); +#endif + return hard; + case 0x1f801110: + hard = psxRcntRcount(1); +#ifdef PSXHW_LOG + PSXHW_LOG("T1 count read32: %x\n", hard); +#endif + return hard; + case 0x1f801114: + hard = psxRcntRmode(1); +#ifdef PSXHW_LOG + PSXHW_LOG("T1 mode read32: %x\n", hard); +#endif + return hard; + case 0x1f801118: + hard = psxRcntRtarget(1); +#ifdef PSXHW_LOG + PSXHW_LOG("T1 target read32: %x\n", hard); +#endif + return hard; + case 0x1f801120: + hard = psxRcntRcount(2); +#ifdef PSXHW_LOG + PSXHW_LOG("T2 count read32: %x\n", hard); +#endif + return hard; + case 0x1f801124: + hard = psxRcntRmode(2); +#ifdef PSXHW_LOG + PSXHW_LOG("T2 mode read32: %x\n", hard); +#endif + return hard; + case 0x1f801128: + hard = psxRcntRtarget(2); +#ifdef PSXHW_LOG + PSXHW_LOG("T2 target read32: %x\n", hard); +#endif + return hard; + + default: + hard = psxHu32(add); +#ifdef PSXHW_LOG + PSXHW_LOG("*Unkwnown 32bit read at address %x\n", add); +#endif + return hard; + } +#ifdef PSXHW_LOG + PSXHW_LOG("*Known 32bit read at address %x\n", add); +#endif + return hard; +} + +void psxHwWrite8(u32 add, u8 value) { + switch (add) { + case 0x1f801040: sioWrite8(value); break; +#ifdef ENABLE_SIO1API + case 0x1f801050: SIO1_writeData8(value); break; +#endif + case 0x1f801800: cdrWrite0(value); break; + case 0x1f801801: cdrWrite1(value); break; + case 0x1f801802: cdrWrite2(value); break; + case 0x1f801803: cdrWrite3(value); break; + + default: + psxHu8(add) = value; +#ifdef PSXHW_LOG + PSXHW_LOG("*Unknown 8bit write at address %x value %x\n", add, value); +#endif + return; + } + psxHu8(add) = value; +#ifdef PSXHW_LOG + PSXHW_LOG("*Known 8bit write at address %x value %x\n", add, value); +#endif +} + +void psxHwWrite16(u32 add, u16 value) { + switch (add) { + case 0x1f801040: + sioWrite8((unsigned char)value); + sioWrite8((unsigned char)(value>>8)); +#ifdef PAD_LOG + PAD_LOG ("sio write16 %x, %x\n", add&0xf, value); +#endif + return; + case 0x1f801044: + sioWriteStat16(value); +#ifdef PAD_LOG + PAD_LOG ("sio write16 %x, %x\n", add&0xf, value); +#endif + return; + case 0x1f801048: + sioWriteMode16(value); +#ifdef PAD_LOG + PAD_LOG ("sio write16 %x, %x\n", add&0xf, value); +#endif + return; + case 0x1f80104a: // control register + sioWriteCtrl16(value); +#ifdef PAD_LOG + PAD_LOG ("sio write16 %x, %x\n", add&0xf, value); +#endif + return; + case 0x1f80104e: // baudrate register + sioWriteBaud16(value); +#ifdef PAD_LOG + PAD_LOG ("sio write16 %x, %x\n", add&0xf, value); +#endif + return; +#ifdef ENABLE_SIO1API + case 0x1f801050: + SIO1_writeData16(value); + return; + case 0x1f801054: + SIO1_writeStat16(value); + return; + case 0x1f80105a: + SIO1_writeCtrl16(value); + return; + case 0x1f80105e: + SIO1_writeBaud16(value); + return; +#endif + case 0x1f801070: +#ifdef PSXHW_LOG + PSXHW_LOG("IREG 16bit write %x\n", value); +#endif + if (Config.Sio) psxHu16ref(0x1070) |= SWAPu16(0x80); + if (Config.SpuIrq) psxHu16ref(0x1070) |= SWAPu16(0x200); + psxHu16ref(0x1070) &= SWAPu16((psxHu16(0x1074) & value)); + return; + + case 0x1f801074: +#ifdef PSXHW_LOG + PSXHW_LOG("IMASK 16bit write %x\n", value); +#endif + psxHu16ref(0x1074) = SWAPu16(value); + return; + + case 0x1f801100: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 0 COUNT 16bit write %x\n", value); +#endif + psxRcntWcount(0, value); return; + case 0x1f801104: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 0 MODE 16bit write %x\n", value); +#endif + psxRcntWmode(0, value); return; + case 0x1f801108: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 0 TARGET 16bit write %x\n", value); +#endif + psxRcntWtarget(0, value); return; + + case 0x1f801110: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 1 COUNT 16bit write %x\n", value); +#endif + psxRcntWcount(1, value); return; + case 0x1f801114: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 1 MODE 16bit write %x\n", value); +#endif + psxRcntWmode(1, value); return; + case 0x1f801118: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 1 TARGET 16bit write %x\n", value); +#endif + psxRcntWtarget(1, value); return; + + case 0x1f801120: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 2 COUNT 16bit write %x\n", value); +#endif + psxRcntWcount(2, value); return; + case 0x1f801124: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 2 MODE 16bit write %x\n", value); +#endif + psxRcntWmode(2, value); return; + case 0x1f801128: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 2 TARGET 16bit write %x\n", value); +#endif + psxRcntWtarget(2, value); return; + + default: + if (add>=0x1f801c00 && add<0x1f801e00) { + SPU_writeRegister(add, value); + return; + } + + psxHu16ref(add) = SWAPu16(value); +#ifdef PSXHW_LOG + PSXHW_LOG("*Unknown 16bit write at address %x value %x\n", add, value); +#endif + return; + } + psxHu16ref(add) = SWAPu16(value); +#ifdef PSXHW_LOG + PSXHW_LOG("*Known 16bit write at address %x value %x\n", add, value); +#endif +} + +#define DmaExec(n) { \ + HW_DMA##n##_CHCR = SWAPu32(value); \ +\ + if (SWAPu32(HW_DMA##n##_CHCR) & 0x01000000 && SWAPu32(HW_DMA_PCR) & (8 << (n * 4))) { \ + psxDma##n(SWAPu32(HW_DMA##n##_MADR), SWAPu32(HW_DMA##n##_BCR), SWAPu32(HW_DMA##n##_CHCR)); \ + } \ +} + +void psxHwWrite32(u32 add, u32 value) { + switch (add) { + case 0x1f801040: + sioWrite8((unsigned char)value); + sioWrite8((unsigned char)((value&0xff) >> 8)); + sioWrite8((unsigned char)((value&0xff) >> 16)); + sioWrite8((unsigned char)((value&0xff) >> 24)); +#ifdef PAD_LOG + PAD_LOG("sio write32 %x\n", value); +#endif + return; +#ifdef ENABLE_SIO1API + case 0x1f801050: + SIO1_writeData32(value); + return; +#endif +#ifdef PSXHW_LOG + case 0x1f801060: + PSXHW_LOG("RAM size write %x\n", value); + psxHu32ref(add) = SWAPu32(value); + return; // Ram size +#endif + + case 0x1f801070: +#ifdef PSXHW_LOG + PSXHW_LOG("IREG 32bit write %x\n", value); +#endif + if (Config.Sio) psxHu32ref(0x1070) |= SWAPu32(0x80); + if (Config.SpuIrq) psxHu32ref(0x1070) |= SWAPu32(0x200); + psxHu32ref(0x1070) &= SWAPu32((psxHu32(0x1074) & value)); + return; + case 0x1f801074: +#ifdef PSXHW_LOG + PSXHW_LOG("IMASK 32bit write %x\n", value); +#endif + psxHu32ref(0x1074) = SWAPu32(value); + return; + +#ifdef PSXHW_LOG + case 0x1f801080: + PSXHW_LOG("DMA0 MADR 32bit write %x\n", value); + HW_DMA0_MADR = SWAPu32(value); return; // DMA0 madr + case 0x1f801084: + PSXHW_LOG("DMA0 BCR 32bit write %x\n", value); + HW_DMA0_BCR = SWAPu32(value); return; // DMA0 bcr +#endif + case 0x1f801088: +#ifdef PSXHW_LOG + PSXHW_LOG("DMA0 CHCR 32bit write %x\n", value); +#endif + DmaExec(0); // DMA0 chcr (MDEC in DMA) + return; + +#ifdef PSXHW_LOG + case 0x1f801090: + PSXHW_LOG("DMA1 MADR 32bit write %x\n", value); + HW_DMA1_MADR = SWAPu32(value); return; // DMA1 madr + case 0x1f801094: + PSXHW_LOG("DMA1 BCR 32bit write %x\n", value); + HW_DMA1_BCR = SWAPu32(value); return; // DMA1 bcr +#endif + case 0x1f801098: +#ifdef PSXHW_LOG + PSXHW_LOG("DMA1 CHCR 32bit write %x\n", value); +#endif + DmaExec(1); // DMA1 chcr (MDEC out DMA) + return; + +#ifdef PSXHW_LOG + case 0x1f8010a0: + PSXHW_LOG("DMA2 MADR 32bit write %x\n", value); + HW_DMA2_MADR = SWAPu32(value); return; // DMA2 madr + case 0x1f8010a4: + PSXHW_LOG("DMA2 BCR 32bit write %x\n", value); + HW_DMA2_BCR = SWAPu32(value); return; // DMA2 bcr +#endif + case 0x1f8010a8: +#ifdef PSXHW_LOG + PSXHW_LOG("DMA2 CHCR 32bit write %x\n", value); +#endif + DmaExec(2); // DMA2 chcr (GPU DMA) + return; + +#ifdef PSXHW_LOG + case 0x1f8010b0: + PSXHW_LOG("DMA3 MADR 32bit write %x\n", value); + HW_DMA3_MADR = SWAPu32(value); return; // DMA3 madr + case 0x1f8010b4: + PSXHW_LOG("DMA3 BCR 32bit write %x\n", value); + HW_DMA3_BCR = SWAPu32(value); return; // DMA3 bcr +#endif + case 0x1f8010b8: +#ifdef PSXHW_LOG + PSXHW_LOG("DMA3 CHCR 32bit write %x\n", value); +#endif + DmaExec(3); // DMA3 chcr (CDROM DMA) + + return; + +#ifdef PSXHW_LOG + case 0x1f8010c0: + PSXHW_LOG("DMA4 MADR 32bit write %x\n", value); + HW_DMA4_MADR = SWAPu32(value); return; // DMA4 madr + case 0x1f8010c4: + PSXHW_LOG("DMA4 BCR 32bit write %x\n", value); + HW_DMA4_BCR = SWAPu32(value); return; // DMA4 bcr +#endif + case 0x1f8010c8: +#ifdef PSXHW_LOG + PSXHW_LOG("DMA4 CHCR 32bit write %x\n", value); +#endif + DmaExec(4); // DMA4 chcr (SPU DMA) + return; + +#if 0 + case 0x1f8010d0: break; //DMA5write_madr(); + case 0x1f8010d4: break; //DMA5write_bcr(); + case 0x1f8010d8: break; //DMA5write_chcr(); // Not needed +#endif + +#ifdef PSXHW_LOG + case 0x1f8010e0: + PSXHW_LOG("DMA6 MADR 32bit write %x\n", value); + HW_DMA6_MADR = SWAPu32(value); return; // DMA6 bcr + case 0x1f8010e4: + PSXHW_LOG("DMA6 BCR 32bit write %x\n", value); + HW_DMA6_BCR = SWAPu32(value); return; // DMA6 bcr +#endif + case 0x1f8010e8: +#ifdef PSXHW_LOG + PSXHW_LOG("DMA6 CHCR 32bit write %x\n", value); +#endif + DmaExec(6); // DMA6 chcr (OT clear) + return; + +#ifdef PSXHW_LOG + case 0x1f8010f0: + PSXHW_LOG("DMA PCR 32bit write %x\n", value); + HW_DMA_PCR = SWAPu32(value); + return; +#endif + + case 0x1f8010f4: +#ifdef PSXHW_LOG + PSXHW_LOG("DMA ICR 32bit write %x\n", value); +#endif + { + u32 tmp = (~value) & SWAPu32(HW_DMA_ICR); + HW_DMA_ICR = SWAPu32(((tmp ^ value) & 0xffffff) ^ tmp); + return; + } + + case 0x1f801810: +#ifdef PSXHW_LOG + PSXHW_LOG("GPU DATA 32bit write %x\n", value); +#endif + GPU_writeData(value); return; + case 0x1f801814: +#ifdef PSXHW_LOG + PSXHW_LOG("GPU STATUS 32bit write %x\n", value); +#endif + GPU_writeStatus(value); return; + + case 0x1f801820: + mdecWrite0(value); break; + case 0x1f801824: + mdecWrite1(value); break; + + case 0x1f801100: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 0 COUNT 32bit write %x\n", value); +#endif + psxRcntWcount(0, value & 0xffff); return; + case 0x1f801104: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 0 MODE 32bit write %x\n", value); +#endif + psxRcntWmode(0, value); return; + case 0x1f801108: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 0 TARGET 32bit write %x\n", value); +#endif + psxRcntWtarget(0, value & 0xffff); return; // HW_DMA_ICR&= SWAP32((~value)&0xff000000); + + case 0x1f801110: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 1 COUNT 32bit write %x\n", value); +#endif + psxRcntWcount(1, value & 0xffff); return; + case 0x1f801114: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 1 MODE 32bit write %x\n", value); +#endif + psxRcntWmode(1, value); return; + case 0x1f801118: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 1 TARGET 32bit write %x\n", value); +#endif + psxRcntWtarget(1, value & 0xffff); return; + + case 0x1f801120: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 2 COUNT 32bit write %x\n", value); +#endif + psxRcntWcount(2, value & 0xffff); return; + case 0x1f801124: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 2 MODE 32bit write %x\n", value); +#endif + psxRcntWmode(2, value); return; + case 0x1f801128: +#ifdef PSXHW_LOG + PSXHW_LOG("COUNTER 2 TARGET 32bit write %x\n", value); +#endif + psxRcntWtarget(2, value & 0xffff); return; + + default: + psxHu32ref(add) = SWAPu32(value); +#ifdef PSXHW_LOG + PSXHW_LOG("*Unknown 32bit write at address %x value %x\n", add, value); +#endif + return; + } + psxHu32ref(add) = SWAPu32(value); +#ifdef PSXHW_LOG + PSXHW_LOG("*Known 32bit write at address %x value %x\n", add, value); +#endif +} + +int psxHwFreeze(gzFile f, int Mode) { + return 0; +} diff --git a/libpcsxcore/psxhw.h b/libpcsxcore/psxhw.h new file mode 100644 index 00000000..cd4e928c --- /dev/null +++ b/libpcsxcore/psxhw.h @@ -0,0 +1,78 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __PSXHW_H__ +#define __PSXHW_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "r3000a.h" +#include "psxmem.h" +#include "sio.h" +#include "psxcounters.h" + +#define HW_DMA0_MADR (psxHu32ref(0x1080)) // MDEC in DMA +#define HW_DMA0_BCR (psxHu32ref(0x1084)) +#define HW_DMA0_CHCR (psxHu32ref(0x1088)) + +#define HW_DMA1_MADR (psxHu32ref(0x1090)) // MDEC out DMA +#define HW_DMA1_BCR (psxHu32ref(0x1094)) +#define HW_DMA1_CHCR (psxHu32ref(0x1098)) + +#define HW_DMA2_MADR (psxHu32ref(0x10a0)) // GPU DMA +#define HW_DMA2_BCR (psxHu32ref(0x10a4)) +#define HW_DMA2_CHCR (psxHu32ref(0x10a8)) + +#define HW_DMA3_MADR (psxHu32ref(0x10b0)) // CDROM DMA +#define HW_DMA3_BCR (psxHu32ref(0x10b4)) +#define HW_DMA3_CHCR (psxHu32ref(0x10b8)) + +#define HW_DMA4_MADR (psxHu32ref(0x10c0)) // SPU DMA +#define HW_DMA4_BCR (psxHu32ref(0x10c4)) +#define HW_DMA4_CHCR (psxHu32ref(0x10c8)) + +#define HW_DMA6_MADR (psxHu32ref(0x10e0)) // GPU DMA (OT) +#define HW_DMA6_BCR (psxHu32ref(0x10e4)) +#define HW_DMA6_CHCR (psxHu32ref(0x10e8)) + +#define HW_DMA_PCR (psxHu32ref(0x10f0)) +#define HW_DMA_ICR (psxHu32ref(0x10f4)) + +#define DMA_INTERRUPT(n) \ + if (SWAPu32(HW_DMA_ICR) & (1 << (16 + n))) { \ + HW_DMA_ICR |= SWAP32(1 << (24 + n)); \ + psxHu32ref(0x1070) |= SWAP32(8); \ + } + +void psxHwReset(); +u8 psxHwRead8(u32 add); +u16 psxHwRead16(u32 add); +u32 psxHwRead32(u32 add); +void psxHwWrite8(u32 add, u8 value); +void psxHwWrite16(u32 add, u16 value); +void psxHwWrite32(u32 add, u32 value); +int psxHwFreeze(gzFile f, int Mode); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/psxinterpreter.c b/libpcsxcore/psxinterpreter.c new file mode 100644 index 00000000..1f4b46cd --- /dev/null +++ b/libpcsxcore/psxinterpreter.c @@ -0,0 +1,804 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* + * PSX assembly interpreter. + */ + +#include "psxcommon.h" +#include "r3000a.h" +#include "gte.h" +#include "psxhle.h" + +static int branch = 0; +static int branch2 = 0; +static u32 branchPC; + +// These macros are used to assemble the repassembler functions + +#ifdef PSXCPU_LOG +#define debugI() PSXCPU_LOG("%s\n", disR3000AF(psxRegs.code, psxRegs.pc)); +#else +#define debugI() +#endif + +inline void execI(); + +// Subsets +void (*psxBSC[64])(); +void (*psxSPC[64])(); +void (*psxREG[32])(); +void (*psxCP0[32])(); +void (*psxCP2[64])(); +void (*psxCP2BSC[32])(); + +static void delayRead(int reg, u32 bpc) { + u32 rold, rnew; + +// SysPrintf("delayRead at %x!\n", psxRegs.pc); + + rold = psxRegs.GPR.r[reg]; + psxBSC[psxRegs.code >> 26](); // branch delay load + rnew = psxRegs.GPR.r[reg]; + + psxRegs.pc = bpc; + + psxBranchTest(); + + psxRegs.GPR.r[reg] = rold; + execI(); // first branch opcode + psxRegs.GPR.r[reg] = rnew; + + branch = 0; +} + +static void delayWrite(int reg, u32 bpc) { + +/* SysPrintf("delayWrite at %x!\n", psxRegs.pc); + + SysPrintf("%s\n", disR3000AF(psxRegs.code, psxRegs.pc-4)); + SysPrintf("%s\n", disR3000AF(PSXMu32(bpc), bpc));*/ + + // no changes from normal behavior + + psxBSC[psxRegs.code >> 26](); + + branch = 0; + psxRegs.pc = bpc; + + psxBranchTest(); +} + +static void delayReadWrite(int reg, u32 bpc) { + +// SysPrintf("delayReadWrite at %x!\n", psxRegs.pc); + + // the branch delay load is skipped + + branch = 0; + psxRegs.pc = bpc; + + psxBranchTest(); +} + +// this defines shall be used with the tmp +// of the next func (instead of _Funct_...) +#define _tFunct_ ((tmp ) & 0x3F) // The funct part of the instruction register +#define _tRd_ ((tmp >> 11) & 0x1F) // The rd part of the instruction register +#define _tRt_ ((tmp >> 16) & 0x1F) // The rt part of the instruction register +#define _tRs_ ((tmp >> 21) & 0x1F) // The rs part of the instruction register +#define _tSa_ ((tmp >> 6) & 0x1F) // The sa part of the instruction register + +int psxTestLoadDelay(int reg, u32 tmp) { + if (tmp == 0) return 0; // NOP + switch (tmp >> 26) { + case 0x00: // SPECIAL + switch (_tFunct_) { + case 0x00: // SLL + case 0x02: case 0x03: // SRL/SRA + if (_tRd_ == reg && _tRt_ == reg) return 1; else + if (_tRt_ == reg) return 2; else + if (_tRd_ == reg) return 3; + break; + + case 0x08: // JR + if (_tRs_ == reg) return 2; + break; + case 0x09: // JALR + if (_tRd_ == reg && _tRs_ == reg) return 1; else + if (_tRs_ == reg) return 2; else + if (_tRd_ == reg) return 3; + break; + + // SYSCALL/BREAK just a break; + + case 0x20: case 0x21: case 0x22: case 0x23: + case 0x24: case 0x25: case 0x26: case 0x27: + case 0x2a: case 0x2b: // ADD/ADDU... + case 0x04: case 0x06: case 0x07: // SLLV... + if (_tRd_ == reg && (_tRt_ == reg || _tRs_ == reg)) return 1; else + if (_tRt_ == reg || _tRs_ == reg) return 2; else + if (_tRd_ == reg) return 3; + break; + + case 0x10: case 0x12: // MFHI/MFLO + if (_tRd_ == reg) return 3; + break; + case 0x11: case 0x13: // MTHI/MTLO + if (_tRs_ == reg) return 2; + break; + + case 0x18: case 0x19: + case 0x1a: case 0x1b: // MULT/DIV... + if (_tRt_ == reg || _tRs_ == reg) return 2; + break; + } + break; + + case 0x01: // REGIMM + switch (_tRt_) { + case 0x00: case 0x02: + case 0x10: case 0x12: // BLTZ/BGEZ... + if (_tRs_ == reg) return 2; + break; + } + break; + + // J would be just a break; + case 0x03: // JAL + if (31 == reg) return 3; + break; + + case 0x04: case 0x05: // BEQ/BNE + if (_tRs_ == reg || _tRt_ == reg) return 2; + break; + + case 0x06: case 0x07: // BLEZ/BGTZ + if (_tRs_ == reg) return 2; + break; + + case 0x08: case 0x09: case 0x0a: case 0x0b: + case 0x0c: case 0x0d: case 0x0e: // ADDI/ADDIU... + if (_tRt_ == reg && _tRs_ == reg) return 1; else + if (_tRs_ == reg) return 2; else + if (_tRt_ == reg) return 3; + break; + + case 0x0f: // LUI + if (_tRt_ == reg) return 3; + break; + + case 0x10: // COP0 + switch (_tFunct_) { + case 0x00: // MFC0 + if (_tRt_ == reg) return 3; + break; + case 0x02: // CFC0 + if (_tRt_ == reg) return 3; + break; + case 0x04: // MTC0 + if (_tRt_ == reg) return 2; + break; + case 0x06: // CTC0 + if (_tRt_ == reg) return 2; + break; + // RFE just a break; + } + break; + + case 0x12: // COP2 + switch (_tFunct_) { + case 0x00: + switch (_tRs_) { + case 0x00: // MFC2 + if (_tRt_ == reg) return 3; + break; + case 0x02: // CFC2 + if (_tRt_ == reg) return 3; + break; + case 0x04: // MTC2 + if (_tRt_ == reg) return 2; + break; + case 0x06: // CTC2 + if (_tRt_ == reg) return 2; + break; + } + break; + // RTPS... break; + } + break; + + case 0x22: case 0x26: // LWL/LWR + if (_tRt_ == reg) return 3; else + if (_tRs_ == reg) return 2; + break; + + case 0x20: case 0x21: case 0x23: + case 0x24: case 0x25: // LB/LH/LW/LBU/LHU + if (_tRt_ == reg && _tRs_ == reg) return 1; else + if (_tRs_ == reg) return 2; else + if (_tRt_ == reg) return 3; + break; + + case 0x28: case 0x29: case 0x2a: + case 0x2b: case 0x2e: // SB/SH/SWL/SW/SWR + if (_tRt_ == reg || _tRs_ == reg) return 2; + break; + + case 0x32: case 0x3a: // LWC2/SWC2 + if (_tRs_ == reg) return 2; + break; + } + + return 0; +} + +void psxDelayTest(int reg, u32 bpc) { + u32 *code; + u32 tmp; + + code = (u32 *)PSXM(bpc); + tmp = ((code == NULL) ? 0 : SWAP32(*code)); + branch = 1; + + switch (psxTestLoadDelay(reg, tmp)) { + case 1: + delayReadWrite(reg, bpc); return; + case 2: + delayRead(reg, bpc); return; + case 3: + delayWrite(reg, bpc); return; + } + psxBSC[psxRegs.code >> 26](); + + branch = 0; + psxRegs.pc = bpc; + + psxBranchTest(); +} + +__inline void doBranch(u32 tar) { + u32 *code; + u32 tmp; + + branch2 = branch = 1; + branchPC = tar; + + code = (u32 *)PSXM(psxRegs.pc); + psxRegs.code = ((code == NULL) ? 0 : SWAP32(*code)); + + debugI(); + + psxRegs.pc += 4; + psxRegs.cycle += BIAS; + + // check for load delay + tmp = psxRegs.code >> 26; + switch (tmp) { + case 0x10: // COP0 + switch (_Rs_) { + case 0x00: // MFC0 + case 0x02: // CFC0 + psxDelayTest(_Rt_, branchPC); + return; + } + break; + case 0x12: // COP2 + switch (_Funct_) { + case 0x00: + switch (_Rs_) { + case 0x00: // MFC2 + case 0x02: // CFC2 + psxDelayTest(_Rt_, branchPC); + return; + } + break; + } + break; + case 0x32: // LWC2 + psxDelayTest(_Rt_, branchPC); + return; + default: + if (tmp >= 0x20 && tmp <= 0x26) { // LB/LH/LWL/LW/LBU/LHU/LWR + psxDelayTest(_Rt_, branchPC); + return; + } + break; + } + + psxBSC[psxRegs.code >> 26](); + + branch = 0; + psxRegs.pc = branchPC; + + psxBranchTest(); +} + +/********************************************************* +* Arithmetic with immediate operand * +* Format: OP rt, rs, immediate * +*********************************************************/ +void psxADDI() { if (!_Rt_) return; _rRt_ = _u32(_rRs_) + _Imm_ ; } // Rt = Rs + Im (Exception on Integer Overflow) +void psxADDIU() { if (!_Rt_) return; _rRt_ = _u32(_rRs_) + _Imm_ ; } // Rt = Rs + Im +void psxANDI() { if (!_Rt_) return; _rRt_ = _u32(_rRs_) & _ImmU_; } // Rt = Rs And Im +void psxORI() { if (!_Rt_) return; _rRt_ = _u32(_rRs_) | _ImmU_; } // Rt = Rs Or Im +void psxXORI() { if (!_Rt_) return; _rRt_ = _u32(_rRs_) ^ _ImmU_; } // Rt = Rs Xor Im +void psxSLTI() { if (!_Rt_) return; _rRt_ = _i32(_rRs_) < _Imm_ ; } // Rt = Rs < Im (Signed) +void psxSLTIU() { if (!_Rt_) return; _rRt_ = _u32(_rRs_) < ((u32)_Imm_); } // Rt = Rs < Im (Unsigned) + +/********************************************************* +* Register arithmetic * +* Format: OP rd, rs, rt * +*********************************************************/ +void psxADD() { if (!_Rd_) return; _rRd_ = _u32(_rRs_) + _u32(_rRt_); } // Rd = Rs + Rt (Exception on Integer Overflow) +void psxADDU() { if (!_Rd_) return; _rRd_ = _u32(_rRs_) + _u32(_rRt_); } // Rd = Rs + Rt +void psxSUB() { if (!_Rd_) return; _rRd_ = _u32(_rRs_) - _u32(_rRt_); } // Rd = Rs - Rt (Exception on Integer Overflow) +void psxSUBU() { if (!_Rd_) return; _rRd_ = _u32(_rRs_) - _u32(_rRt_); } // Rd = Rs - Rt +void psxAND() { if (!_Rd_) return; _rRd_ = _u32(_rRs_) & _u32(_rRt_); } // Rd = Rs And Rt +void psxOR() { if (!_Rd_) return; _rRd_ = _u32(_rRs_) | _u32(_rRt_); } // Rd = Rs Or Rt +void psxXOR() { if (!_Rd_) return; _rRd_ = _u32(_rRs_) ^ _u32(_rRt_); } // Rd = Rs Xor Rt +void psxNOR() { if (!_Rd_) return; _rRd_ =~(_u32(_rRs_) | _u32(_rRt_)); }// Rd = Rs Nor Rt +void psxSLT() { if (!_Rd_) return; _rRd_ = _i32(_rRs_) < _i32(_rRt_); } // Rd = Rs < Rt (Signed) +void psxSLTU() { if (!_Rd_) return; _rRd_ = _u32(_rRs_) < _u32(_rRt_); } // Rd = Rs < Rt (Unsigned) + +/********************************************************* +* Register mult/div & Register trap logic * +* Format: OP rs, rt * +*********************************************************/ +void psxDIV() { + if (_i32(_rRt_) != 0) { + _i32(_rLo_) = _i32(_rRs_) / _i32(_rRt_); + _i32(_rHi_) = _i32(_rRs_) % _i32(_rRt_); + } +} + +void psxDIVU() { + if (_rRt_ != 0) { + _rLo_ = _rRs_ / _rRt_; + _rHi_ = _rRs_ % _rRt_; + } +} + +void psxMULT() { + u64 res = (s64)((s64)_i32(_rRs_) * (s64)_i32(_rRt_)); + + psxRegs.GPR.n.lo = (u32)(res & 0xffffffff); + psxRegs.GPR.n.hi = (u32)((res >> 32) & 0xffffffff); +} + +void psxMULTU() { + u64 res = (u64)((u64)_u32(_rRs_) * (u64)_u32(_rRt_)); + + psxRegs.GPR.n.lo = (u32)(res & 0xffffffff); + psxRegs.GPR.n.hi = (u32)((res >> 32) & 0xffffffff); +} + +/********************************************************* +* Register branch logic * +* Format: OP rs, offset * +*********************************************************/ +#define RepZBranchi32(op) if(_i32(_rRs_) op 0) doBranch(_BranchTarget_); +#define RepZBranchLinki32(op) if(_i32(_rRs_) op 0) { _SetLink(31); doBranch(_BranchTarget_); } + +void psxBGEZ() { RepZBranchi32(>=) } // Branch if Rs >= 0 +void psxBGEZAL() { RepZBranchLinki32(>=) } // Branch if Rs >= 0 and link +void psxBGTZ() { RepZBranchi32(>) } // Branch if Rs > 0 +void psxBLEZ() { RepZBranchi32(<=) } // Branch if Rs <= 0 +void psxBLTZ() { RepZBranchi32(<) } // Branch if Rs < 0 +void psxBLTZAL() { RepZBranchLinki32(<) } // Branch if Rs < 0 and link + +/********************************************************* +* Shift arithmetic with constant shift * +* Format: OP rd, rt, sa * +*********************************************************/ +void psxSLL() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) << _Sa_; } // Rd = Rt << sa +void psxSRA() { if (!_Rd_) return; _i32(_rRd_) = _i32(_rRt_) >> _Sa_; } // Rd = Rt >> sa (arithmetic) +void psxSRL() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) >> _Sa_; } // Rd = Rt >> sa (logical) + +/********************************************************* +* Shift arithmetic with variant register shift * +* Format: OP rd, rt, rs * +*********************************************************/ +void psxSLLV() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) << _u32(_rRs_); } // Rd = Rt << rs +void psxSRAV() { if (!_Rd_) return; _i32(_rRd_) = _i32(_rRt_) >> _u32(_rRs_); } // Rd = Rt >> rs (arithmetic) +void psxSRLV() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) >> _u32(_rRs_); } // Rd = Rt >> rs (logical) + +/********************************************************* +* Load higher 16 bits of the first word in GPR with imm * +* Format: OP rt, immediate * +*********************************************************/ +void psxLUI() { if (!_Rt_) return; _u32(_rRt_) = psxRegs.code << 16; } // Upper halfword of Rt = Im + +/********************************************************* +* Move from HI/LO to GPR * +* Format: OP rd * +*********************************************************/ +void psxMFHI() { if (!_Rd_) return; _rRd_ = _rHi_; } // Rd = Hi +void psxMFLO() { if (!_Rd_) return; _rRd_ = _rLo_; } // Rd = Lo + +/********************************************************* +* Move to GPR to HI/LO & Register jump * +* Format: OP rs * +*********************************************************/ +void psxMTHI() { _rHi_ = _rRs_; } // Hi = Rs +void psxMTLO() { _rLo_ = _rRs_; } // Lo = Rs + +/********************************************************* +* Special purpose instructions * +* Format: OP * +*********************************************************/ +void psxBREAK() { + // Break exception - psx rom doens't handles this +} + +void psxSYSCALL() { + psxRegs.pc -= 4; + psxException(0x20, branch); +} + +void psxRFE() { +// SysPrintf("psxRFE\n"); + psxRegs.CP0.n.Status = (psxRegs.CP0.n.Status & 0xfffffff0) | + ((psxRegs.CP0.n.Status & 0x3c) >> 2); +} + +/********************************************************* +* Register branch logic * +* Format: OP rs, rt, offset * +*********************************************************/ +#define RepBranchi32(op) if(_i32(_rRs_) op _i32(_rRt_)) doBranch(_BranchTarget_); + +void psxBEQ() { RepBranchi32(==) } // Branch if Rs == Rt +void psxBNE() { RepBranchi32(!=) } // Branch if Rs != Rt + +/********************************************************* +* Jump to target * +* Format: OP target * +*********************************************************/ +void psxJ() { doBranch(_JumpTarget_); } +void psxJAL() { _SetLink(31); doBranch(_JumpTarget_); } + +/********************************************************* +* Register jump * +* Format: OP rs, rd * +*********************************************************/ +void psxJR() { + doBranch(_u32(_rRs_)); + psxJumpTest(); +} + +void psxJALR() { + u32 temp = _u32(_rRs_); + if (_Rd_) { _SetLink(_Rd_); } + doBranch(temp); +} + +/********************************************************* +* Load and store for GPR * +* Format: OP rt, offset(base) * +*********************************************************/ + +#define _oB_ (_u32(_rRs_) + _Imm_) + +void psxLB() { + if (_Rt_) { + _i32(_rRt_) = (signed char)psxMemRead8(_oB_); + } else { + psxMemRead8(_oB_); + } +} + +void psxLBU() { + if (_Rt_) { + _u32(_rRt_) = psxMemRead8(_oB_); + } else { + psxMemRead8(_oB_); + } +} + +void psxLH() { + if (_Rt_) { + _i32(_rRt_) = (short)psxMemRead16(_oB_); + } else { + psxMemRead16(_oB_); + } +} + +void psxLHU() { + if (_Rt_) { + _u32(_rRt_) = psxMemRead16(_oB_); + } else { + psxMemRead16(_oB_); + } +} + +void psxLW() { + if (_Rt_) { + _u32(_rRt_) = psxMemRead32(_oB_); + } else { + psxMemRead32(_oB_); + } +} + +u32 LWL_MASK[4] = { 0xffffff, 0xffff, 0xff, 0 }; +u32 LWL_SHIFT[4] = { 24, 16, 8, 0 }; + +void psxLWL() { + u32 addr = _oB_; + u32 shift = addr & 3; + u32 mem = psxMemRead32(addr & ~3); + + if (!_Rt_) return; + _u32(_rRt_) = ( _u32(_rRt_) & LWL_MASK[shift]) | + ( mem << LWL_SHIFT[shift]); + + /* + Mem = 1234. Reg = abcd + + 0 4bcd (mem << 24) | (reg & 0x00ffffff) + 1 34cd (mem << 16) | (reg & 0x0000ffff) + 2 234d (mem << 8) | (reg & 0x000000ff) + 3 1234 (mem ) | (reg & 0x00000000) + */ +} + +u32 LWR_MASK[4] = { 0, 0xff000000, 0xffff0000, 0xffffff00 }; +u32 LWR_SHIFT[4] = { 0, 8, 16, 24 }; + +void psxLWR() { + u32 addr = _oB_; + u32 shift = addr & 3; + u32 mem = psxMemRead32(addr & ~3); + + if (!_Rt_) return; + _u32(_rRt_) = ( _u32(_rRt_) & LWR_MASK[shift]) | + ( mem >> LWR_SHIFT[shift]); + + /* + Mem = 1234. Reg = abcd + + 0 1234 (mem ) | (reg & 0x00000000) + 1 a123 (mem >> 8) | (reg & 0xff000000) + 2 ab12 (mem >> 16) | (reg & 0xffff0000) + 3 abc1 (mem >> 24) | (reg & 0xffffff00) + */ +} + +void psxSB() { psxMemWrite8 (_oB_, _u8 (_rRt_)); } +void psxSH() { psxMemWrite16(_oB_, _u16(_rRt_)); } +void psxSW() { psxMemWrite32(_oB_, _u32(_rRt_)); } + +u32 SWL_MASK[4] = { 0xffffff00, 0xffff0000, 0xff000000, 0 }; +u32 SWL_SHIFT[4] = { 24, 16, 8, 0 }; + +void psxSWL() { + u32 addr = _oB_; + u32 shift = addr & 3; + u32 mem = psxMemRead32(addr & ~3); + + psxMemWrite32(addr & ~3, (_u32(_rRt_) >> SWL_SHIFT[shift]) | + ( mem & SWL_MASK[shift]) ); + /* + Mem = 1234. Reg = abcd + + 0 123a (reg >> 24) | (mem & 0xffffff00) + 1 12ab (reg >> 16) | (mem & 0xffff0000) + 2 1abc (reg >> 8) | (mem & 0xff000000) + 3 abcd (reg ) | (mem & 0x00000000) + */ +} + +u32 SWR_MASK[4] = { 0, 0xff, 0xffff, 0xffffff }; +u32 SWR_SHIFT[4] = { 0, 8, 16, 24 }; + +void psxSWR() { + u32 addr = _oB_; + u32 shift = addr & 3; + u32 mem = psxMemRead32(addr & ~3); + + psxMemWrite32(addr & ~3, (_u32(_rRt_) << SWR_SHIFT[shift]) | + ( mem & SWR_MASK[shift]) ); + + /* + Mem = 1234. Reg = abcd + + 0 abcd (reg ) | (mem & 0x00000000) + 1 bcd4 (reg << 8) | (mem & 0x000000ff) + 2 cd34 (reg << 16) | (mem & 0x0000ffff) + 3 d234 (reg << 24) | (mem & 0x00ffffff) + */ +} + +/********************************************************* +* Moves between GPR and COPx * +* Format: OP rt, fs * +*********************************************************/ +void psxMFC0() { if (!_Rt_) return; _i32(_rRt_) = (int)_rFs_; } +void psxCFC0() { if (!_Rt_) return; _i32(_rRt_) = (int)_rFs_; } + +void psxTestSWInts() { + // the next code is untested, if u know please + // tell me if it works ok or not (linuzappz) + if (psxRegs.CP0.n.Cause & psxRegs.CP0.n.Status & 0x0300 && + psxRegs.CP0.n.Status & 0x1) { + psxException(psxRegs.CP0.n.Cause, branch); + } +} + +__inline void MTC0(int reg, u32 val) { +// SysPrintf("MTC0 %d: %x\n", reg, val); + switch (reg) { + case 12: // Status + psxRegs.CP0.r[12] = val; + psxTestSWInts(); + break; + + case 13: // Cause + psxRegs.CP0.n.Cause = val & ~(0xfc00); + psxTestSWInts(); + break; + + default: + psxRegs.CP0.r[reg] = val; + break; + } +} + +void psxMTC0() { MTC0(_Rd_, _u32(_rRt_)); } +void psxCTC0() { MTC0(_Rd_, _u32(_rRt_)); } + +/********************************************************* +* Unknow instruction (would generate an exception) * +* Format: ? * +*********************************************************/ +void psxNULL() { +#ifdef PSXCPU_LOG + PSXCPU_LOG("psx: Unimplemented op %x\n", psxRegs.code); +#endif +} + +void psxSPECIAL() { + psxSPC[_Funct_](); +} + +void psxREGIMM() { + psxREG[_Rt_](); +} + +void psxCOP0() { + psxCP0[_Rs_](); +} + +void psxCOP2() { + psxCP2[_Funct_](); +} + +void psxBASIC() { + psxCP2BSC[_Rs_](); +} + +void psxHLE() { +// psxHLEt[psxRegs.code & 0xffff](); + psxHLEt[psxRegs.code & 0x07](); // HDHOSHY experimental patch +} + +void (*psxBSC[64])() = { + psxSPECIAL, psxREGIMM, psxJ , psxJAL , psxBEQ , psxBNE , psxBLEZ, psxBGTZ, + psxADDI , psxADDIU , psxSLTI, psxSLTIU, psxANDI, psxORI , psxXORI, psxLUI , + psxCOP0 , psxNULL , psxCOP2, psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, + psxNULL , psxNULL , psxNULL, psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, + psxLB , psxLH , psxLWL , psxLW , psxLBU , psxLHU , psxLWR , psxNULL, + psxSB , psxSH , psxSWL , psxSW , psxNULL, psxNULL, psxSWR , psxNULL, + psxNULL , psxNULL , gteLWC2, psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, + psxNULL , psxNULL , gteSWC2, psxHLE , psxNULL, psxNULL, psxNULL, psxNULL +}; + + +void (*psxSPC[64])() = { + psxSLL , psxNULL , psxSRL , psxSRA , psxSLLV , psxNULL , psxSRLV, psxSRAV, + psxJR , psxJALR , psxNULL, psxNULL, psxSYSCALL, psxBREAK, psxNULL, psxNULL, + psxMFHI, psxMTHI , psxMFLO, psxMTLO, psxNULL , psxNULL , psxNULL, psxNULL, + psxMULT, psxMULTU, psxDIV , psxDIVU, psxNULL , psxNULL , psxNULL, psxNULL, + psxADD , psxADDU , psxSUB , psxSUBU, psxAND , psxOR , psxXOR , psxNOR , + psxNULL, psxNULL , psxSLT , psxSLTU, psxNULL , psxNULL , psxNULL, psxNULL, + psxNULL, psxNULL , psxNULL, psxNULL, psxNULL , psxNULL , psxNULL, psxNULL, + psxNULL, psxNULL , psxNULL, psxNULL, psxNULL , psxNULL , psxNULL, psxNULL +}; + +void (*psxREG[32])() = { + psxBLTZ , psxBGEZ , psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, + psxNULL , psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, + psxBLTZAL, psxBGEZAL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, + psxNULL , psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL +}; + +void (*psxCP0[32])() = { + psxMFC0, psxNULL, psxCFC0, psxNULL, psxMTC0, psxNULL, psxCTC0, psxNULL, + psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, + psxRFE , psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, + psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL +}; + +void (*psxCP2[64])() = { + psxBASIC, gteRTPS , psxNULL , psxNULL, psxNULL, psxNULL , gteNCLIP, psxNULL, // 00 + psxNULL , psxNULL , psxNULL , psxNULL, gteOP , psxNULL , psxNULL , psxNULL, // 08 + gteDPCS , gteINTPL, gteMVMVA, gteNCDS, gteCDP , psxNULL , gteNCDT , psxNULL, // 10 + psxNULL , psxNULL , psxNULL , gteNCCS, gteCC , psxNULL , gteNCS , psxNULL, // 18 + gteNCT , psxNULL , psxNULL , psxNULL, psxNULL, psxNULL , psxNULL , psxNULL, // 20 + gteSQR , gteDCPL , gteDPCT , psxNULL, psxNULL, gteAVSZ3, gteAVSZ4, psxNULL, // 28 + gteRTPT , psxNULL , psxNULL , psxNULL, psxNULL, psxNULL , psxNULL , psxNULL, // 30 + psxNULL , psxNULL , psxNULL , psxNULL, psxNULL, gteGPF , gteGPL , gteNCCT // 38 +}; + +void (*psxCP2BSC[32])() = { + gteMFC2, psxNULL, gteCFC2, psxNULL, gteMTC2, psxNULL, gteCTC2, psxNULL, + psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, + psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, + psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL +}; + + +/////////////////////////////////////////// + +static int intInit() { + return 0; +} + +static void intReset() { +} + +static void intExecute() { + for (;;) + execI(); +} + +static void intExecuteBlock() { + branch2 = 0; + while (!branch2) execI(); +} + +static void intClear(u32 Addr, u32 Size) { +} + +static void intShutdown() { +} + +// interpreter execution +inline void execI() { + u32 *code = (u32 *)PSXM(psxRegs.pc); + psxRegs.code = ((code == NULL) ? 0 : SWAP32(*code)); + + debugI(); + + if (Config.Debug) ProcessDebug(); + + psxRegs.pc += 4; + psxRegs.cycle += BIAS; + + psxBSC[psxRegs.code >> 26](); +} + +R3000Acpu psxInt = { + intInit, + intReset, + intExecute, + intExecuteBlock, + intClear, + intShutdown +}; diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c new file mode 100644 index 00000000..fc4a90e9 --- /dev/null +++ b/libpcsxcore/psxmem.c @@ -0,0 +1,348 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* PSX memory functions. +*/ + +// TODO: Implement caches & cycle penalty. + +#include "psxmem.h" +#include "r3000a.h" +#include "psxhw.h" +#include + +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + +s8 *psxM = NULL; // Kernel & User Memory (2 Meg) +s8 *psxP = NULL; // Parallel Port (64K) +s8 *psxR = NULL; // BIOS ROM (512K) +s8 *psxH = NULL; // Scratch Pad (1K) & Hardware Registers (8K) + +u8 **psxMemWLUT = NULL; +u8 **psxMemRLUT = NULL; + +/* Playstation Memory Map (from Playstation doc by Joshua Walker) +0x0000_0000-0x0000_ffff Kernel (64K) +0x0001_0000-0x001f_ffff User Memory (1.9 Meg) + +0x1f00_0000-0x1f00_ffff Parallel Port (64K) + +0x1f80_0000-0x1f80_03ff Scratch Pad (1024 bytes) + +0x1f80_1000-0x1f80_2fff Hardware Registers (8K) + +0x1fc0_0000-0x1fc7_ffff BIOS (512K) + +0x8000_0000-0x801f_ffff Kernel and User Memory Mirror (2 Meg) Cached +0x9fc0_0000-0x9fc7_ffff BIOS Mirror (512K) Cached + +0xa000_0000-0xa01f_ffff Kernel and User Memory Mirror (2 Meg) Uncached +0xbfc0_0000-0xbfc7_ffff BIOS Mirror (512K) Uncached +*/ + +int psxMemInit() { + int i; + + psxMemRLUT = (u8 **)malloc(0x10000 * sizeof(void *)); + psxMemWLUT = (u8 **)malloc(0x10000 * sizeof(void *)); + memset(psxMemRLUT, 0, 0x10000 * sizeof(void *)); + memset(psxMemWLUT, 0, 0x10000 * sizeof(void *)); + + psxM = mmap(0, 0x00220000, + PROT_WRITE | PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + + psxP = &psxM[0x200000]; + psxH = &psxM[0x210000]; + + psxR = (s8 *)malloc(0x00080000); + + if (psxMemRLUT == NULL || psxMemWLUT == NULL || + psxM == NULL || psxP == NULL || psxH == NULL) { + SysMessage(_("Error allocating memory!")); + return -1; + } + +// MemR + for (i = 0; i < 0x80; i++) psxMemRLUT[i + 0x0000] = (u8 *)&psxM[(i & 0x1f) << 16]; + + memcpy(psxMemRLUT + 0x8000, psxMemRLUT, 0x80 * sizeof(void *)); + memcpy(psxMemRLUT + 0xa000, psxMemRLUT, 0x80 * sizeof(void *)); + + psxMemRLUT[0x1f00] = (u8 *)psxP; + psxMemRLUT[0x1f80] = (u8 *)psxH; + + for (i = 0; i < 0x08; i++) psxMemRLUT[i + 0x1fc0] = (u8 *)&psxR[i << 16]; + + memcpy(psxMemRLUT + 0x9fc0, psxMemRLUT + 0x1fc0, 0x08 * sizeof(void *)); + memcpy(psxMemRLUT + 0xbfc0, psxMemRLUT + 0x1fc0, 0x08 * sizeof(void *)); + +// MemW + for (i = 0; i < 0x80; i++) psxMemWLUT[i + 0x0000] = (u8 *)&psxM[(i & 0x1f) << 16]; + + memcpy(psxMemWLUT + 0x8000, psxMemWLUT, 0x80 * sizeof(void *)); + memcpy(psxMemWLUT + 0xa000, psxMemWLUT, 0x80 * sizeof(void *)); + + psxMemWLUT[0x1f00] = (u8 *)psxP; + psxMemWLUT[0x1f80] = (u8 *)psxH; + + return 0; +} + +void psxMemReset() { + FILE *f = NULL; + char bios[1024]; + + memset(psxM, 0, 0x00200000); + memset(psxP, 0, 0x00010000); + + if (strcmp(Config.Bios, "HLE") != 0) { + sprintf(bios, "%s/%s", Config.BiosDir, Config.Bios); + f = fopen(bios, "rb"); + + if (f == NULL) { + SysMessage(_("Could not open BIOS:\"%s\". Enabling HLE Bios!\n"), bios); + memset(psxR, 0, 0x80000); + Config.HLE = TRUE; + } else { + fread(psxR, 1, 0x80000, f); + fclose(f); + Config.HLE = FALSE; + } + } else Config.HLE = TRUE; +} + +void psxMemShutdown() { + munmap(psxM, 0x00220000); + + free(psxR); + free(psxMemRLUT); + free(psxMemWLUT); +} + +static int writeok = 1; + +u8 psxMemRead8(u32 mem) { + char *p; + u32 t; + + t = mem >> 16; + if (t == 0x1f80) { + if (mem < 0x1f801000) + return psxHu8(mem); + else + return psxHwRead8(mem); + } else { + p = (char *)(psxMemRLUT[t]); + if (p != NULL) { + if (Config.Debug) + DebugCheckBP((mem & 0xffffff) | 0x80000000, R1); + return *(u8 *)(p + (mem & 0xffff)); + } else { +#ifdef PSXMEM_LOG + PSXMEM_LOG("err lb %8.8lx\n", mem); +#endif + return 0; + } + } +} + +u16 psxMemRead16(u32 mem) { + char *p; + u32 t; + + t = mem >> 16; + if (t == 0x1f80) { + if (mem < 0x1f801000) + return psxHu16(mem); + else + return psxHwRead16(mem); + } else { + p = (char *)(psxMemRLUT[t]); + if (p != NULL) { + if (Config.Debug) + DebugCheckBP((mem & 0xffffff) | 0x80000000, R2); + return SWAPu16(*(u16 *)(p + (mem & 0xffff))); + } else { +#ifdef PSXMEM_LOG + PSXMEM_LOG("err lh %8.8lx\n", mem); +#endif + return 0; + } + } +} + +u32 psxMemRead32(u32 mem) { + char *p; + u32 t; + + t = mem >> 16; + if (t == 0x1f80) { + if (mem < 0x1f801000) + return psxHu32(mem); + else + return psxHwRead32(mem); + } else { + p = (char *)(psxMemRLUT[t]); + if (p != NULL) { + if (Config.Debug) + DebugCheckBP((mem & 0xffffff) | 0x80000000, R4); + return SWAPu32(*(u32 *)(p + (mem & 0xffff))); + } else { +#ifdef PSXMEM_LOG + if (writeok) { PSXMEM_LOG("err lw %8.8lx\n", mem); } +#endif + return 0; + } + } +} + +void psxMemWrite8(u32 mem, u8 value) { + char *p; + u32 t; + + t = mem >> 16; + if (t == 0x1f80) { + if (mem < 0x1f801000) + psxHu8(mem) = value; + else + psxHwWrite8(mem, value); + } else { + p = (char *)(psxMemWLUT[t]); + if (p != NULL) { + if (Config.Debug) + DebugCheckBP((mem & 0xffffff) | 0x80000000, W1); + *(u8 *)(p + (mem & 0xffff)) = value; +#ifdef PSXREC + psxCpu->Clear((mem & (~3)), 1); +#endif + } else { +#ifdef PSXMEM_LOG + PSXMEM_LOG("err sb %8.8lx\n", mem); +#endif + } + } +} + +void psxMemWrite16(u32 mem, u16 value) { + char *p; + u32 t; + + t = mem >> 16; + if (t == 0x1f80) { + if (mem < 0x1f801000) + psxHu16ref(mem) = SWAPu16(value); + else + psxHwWrite16(mem, value); + } else { + p = (char *)(psxMemWLUT[t]); + if (p != NULL) { + if (Config.Debug) + DebugCheckBP((mem & 0xffffff) | 0x80000000, W2); + *(u16 *)(p + (mem & 0xffff)) = SWAPu16(value); +#ifdef PSXREC + psxCpu->Clear((mem & (~1)), 1); +#endif + } else { +#ifdef PSXMEM_LOG + PSXMEM_LOG("err sh %8.8lx\n", mem); +#endif + } + } +} + +void psxMemWrite32(u32 mem, u32 value) { + char *p; + u32 t; + +// if ((mem&0x1fffff) == 0x71E18 || value == 0x48088800) SysPrintf("t2fix!!\n"); + t = mem >> 16; + if (t == 0x1f80) { + if (mem < 0x1f801000) + psxHu32ref(mem) = SWAPu32(value); + else + psxHwWrite32(mem, value); + } else { + p = (char *)(psxMemWLUT[t]); + if (p != NULL) { + if (Config.Debug) + DebugCheckBP((mem & 0xffffff) | 0x80000000, W4); + *(u32 *)(p + (mem & 0xffff)) = SWAPu32(value); +#ifdef PSXREC + psxCpu->Clear(mem, 1); +#endif + } else { + if (mem != 0xfffe0130) { +#ifdef PSXREC + if (!writeok) + psxCpu->Clear(mem, 1); +#endif + +#ifdef PSXMEM_LOG + if (writeok) { PSXMEM_LOG("err sw %8.8lx\n", mem); } +#endif + } else { + int i; + + switch (value) { + case 0x800: case 0x804: + if (writeok == 0) break; + writeok = 0; + memset(psxMemWLUT + 0x0000, 0, 0x80 * sizeof(void *)); + memset(psxMemWLUT + 0x8000, 0, 0x80 * sizeof(void *)); + memset(psxMemWLUT + 0xa000, 0, 0x80 * sizeof(void *)); + break; + case 0x00: case 0x1e988: + if (writeok == 1) break; + writeok = 1; + for (i = 0; i < 0x80; i++) psxMemWLUT[i + 0x0000] = (void *)&psxM[(i & 0x1f) << 16]; + memcpy(psxMemWLUT + 0x8000, psxMemWLUT, 0x80 * sizeof(void *)); + memcpy(psxMemWLUT + 0xa000, psxMemWLUT, 0x80 * sizeof(void *)); + break; + default: +#ifdef PSXMEM_LOG + PSXMEM_LOG("unk %8.8lx = %x\n", mem, value); +#endif + break; + } + } + } + } +} + +void *psxMemPointer(u32 mem) { + char *p; + u32 t; + + t = mem >> 16; + if (t == 0x1f80) { + if (mem < 0x1f801000) + return (void *)&psxH[mem]; + else + return NULL; + } else { + p = (char *)(psxMemWLUT[t]); + if (p != NULL) { + return (void *)(p + (mem & 0xffff)); + } + return NULL; + } +} diff --git a/libpcsxcore/psxmem.h b/libpcsxcore/psxmem.h new file mode 100644 index 00000000..d9fee002 --- /dev/null +++ b/libpcsxcore/psxmem.h @@ -0,0 +1,144 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __PSXMEMORY_H__ +#define __PSXMEMORY_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" + +#if defined(__BIGENDIAN__) + +#define _SWAP16(b) ((((unsigned char *)&(b))[0] & 0xff) | (((unsigned char *)&(b))[1] & 0xff) << 8) +#define _SWAP32(b) ((((unsigned char *)&(b))[0] & 0xff) | ((((unsigned char *)&(b))[1] & 0xff) << 8) | ((((unsigned char *)&(b))[2] & 0xff) << 16) | (((unsigned char *)&(b))[3] << 24)) + +#define SWAP16(v) ((((v) & 0xff00) >> 8) +(((v) & 0xff) << 8)) +#define SWAP32(v) ((((v) & 0xff000000ul) >> 24) + (((v) & 0xff0000ul) >> 8) + (((v) & 0xff00ul)<<8) +(((v) & 0xfful) << 24)) +#define SWAPu32(v) SWAP32((u32)(v)) +#define SWAPs32(v) SWAP32((s32)(v)) + +#define SWAPu16(v) SWAP16((u16)(v)) +#define SWAPs16(v) SWAP16((s16)(v)) + +#else + +#define SWAP16(b) (b) +#define SWAP32(b) (b) + +#define SWAPu16(b) (b) +#define SWAPu32(b) (b) + +#endif + +extern s8 *psxM; +#define psxMs8(mem) psxM[(mem) & 0x1fffff] +#define psxMs16(mem) (SWAP16(*(s16 *)&psxM[(mem) & 0x1fffff])) +#define psxMs32(mem) (SWAP32(*(s32 *)&psxM[(mem) & 0x1fffff])) +#define psxMu8(mem) (*(u8 *)&psxM[(mem) & 0x1fffff]) +#define psxMu16(mem) (SWAP16(*(u16 *)&psxM[(mem) & 0x1fffff])) +#define psxMu32(mem) (SWAP32(*(u32 *)&psxM[(mem) & 0x1fffff])) + +#define psxMs8ref(mem) psxM[(mem) & 0x1fffff] +#define psxMs16ref(mem) (*(s16 *)&psxM[(mem) & 0x1fffff]) +#define psxMs32ref(mem) (*(s32 *)&psxM[(mem) & 0x1fffff]) +#define psxMu8ref(mem) (*(u8 *)&psxM[(mem) & 0x1fffff]) +#define psxMu16ref(mem) (*(u16 *)&psxM[(mem) & 0x1fffff]) +#define psxMu32ref(mem) (*(u32 *)&psxM[(mem) & 0x1fffff]) + +extern s8 *psxP; +#define psxPs8(mem) psxP[(mem) & 0xffff] +#define psxPs16(mem) (SWAP16(*(s16 *)&psxP[(mem) & 0xffff])) +#define psxPs32(mem) (SWAP32(*(s32 *)&psxP[(mem) & 0xffff])) +#define psxPu8(mem) (*(u8 *)&psxP[(mem) & 0xffff]) +#define psxPu16(mem) (SWAP16(*(u16 *)&psxP[(mem) & 0xffff])) +#define psxPu32(mem) (SWAP32(*(u32 *)&psxP[(mem) & 0xffff])) + +#define psxPs8ref(mem) psxP[(mem) & 0xffff] +#define psxPs16ref(mem) (*(s16 *)&psxP[(mem) & 0xffff]) +#define psxPs32ref(mem) (*(s32 *)&psxP[(mem) & 0xffff]) +#define psxPu8ref(mem) (*(u8 *)&psxP[(mem) & 0xffff]) +#define psxPu16ref(mem) (*(u16 *)&psxP[(mem) & 0xffff]) +#define psxPu32ref(mem) (*(u32 *)&psxP[(mem) & 0xffff]) + +extern s8 *psxR; +#define psxRs8(mem) psxR[(mem) & 0x7ffff] +#define psxRs16(mem) (SWAP16(*(s16 *)&psxR[(mem) & 0x7ffff])) +#define psxRs32(mem) (SWAP32(*(s32 *)&psxR[(mem) & 0x7ffff])) +#define psxRu8(mem) (*(u8* )&psxR[(mem) & 0x7ffff]) +#define psxRu16(mem) (SWAP16(*(u16 *)&psxR[(mem) & 0x7ffff])) +#define psxRu32(mem) (SWAP32(*(u32 *)&psxR[(mem) & 0x7ffff])) + +#define psxRs8ref(mem) psxR[(mem) & 0x7ffff] +#define psxRs16ref(mem) (*(s16*)&psxR[(mem) & 0x7ffff]) +#define psxRs32ref(mem) (*(s32*)&psxR[(mem) & 0x7ffff]) +#define psxRu8ref(mem) (*(u8 *)&psxR[(mem) & 0x7ffff]) +#define psxRu16ref(mem) (*(u16*)&psxR[(mem) & 0x7ffff]) +#define psxRu32ref(mem) (*(u32*)&psxR[(mem) & 0x7ffff]) + +extern s8 *psxH; +#define psxHs8(mem) psxH[(mem) & 0xffff] +#define psxHs16(mem) (SWAP16(*(s16 *)&psxH[(mem) & 0xffff])) +#define psxHs32(mem) (SWAP32(*(s32 *)&psxH[(mem) & 0xffff])) +#define psxHu8(mem) (*(u8 *)&psxH[(mem) & 0xffff]) +#define psxHu16(mem) (SWAP16(*(u16 *)&psxH[(mem) & 0xffff])) +#define psxHu32(mem) (SWAP32(*(u32 *)&psxH[(mem) & 0xffff])) + +#define psxHs8ref(mem) psxH[(mem) & 0xffff] +#define psxHs16ref(mem) (*(s16 *)&psxH[(mem) & 0xffff]) +#define psxHs32ref(mem) (*(s32 *)&psxH[(mem) & 0xffff]) +#define psxHu8ref(mem) (*(u8 *)&psxH[(mem) & 0xffff]) +#define psxHu16ref(mem) (*(u16 *)&psxH[(mem) & 0xffff]) +#define psxHu32ref(mem) (*(u32 *)&psxH[(mem) & 0xffff]) + +extern u8 **psxMemWLUT; +extern u8 **psxMemRLUT; + +#define PSXM(mem) (psxMemRLUT[(mem) >> 16] == 0 ? NULL : (u8*)(psxMemRLUT[(mem) >> 16] + ((mem) & 0xffff))) +#define PSXMs8(mem) (*(s8 *)PSXM(mem)) +#define PSXMs16(mem) (SWAP16(*(s16 *)PSXM(mem))) +#define PSXMs32(mem) (SWAP32(*(s32 *)PSXM(mem))) +#define PSXMu8(mem) (*(u8 *)PSXM(mem)) +#define PSXMu16(mem) (SWAP16(*(u16 *)PSXM(mem))) +#define PSXMu32(mem) (SWAP32(*(u32 *)PSXM(mem))) + +#define PSXMu32ref(mem) (*(u32 *)PSXM(mem)) + +#if !defined(PSXREC) && (defined(__x86_64__) || defined(__i386__) || defined(__ppc__)) && !defined(NOPSXREC) +#define PSXREC +#endif + +int psxMemInit(); +void psxMemReset(); +void psxMemShutdown(); + +u8 psxMemRead8 (u32 mem); +u16 psxMemRead16(u32 mem); +u32 psxMemRead32(u32 mem); +void psxMemWrite8 (u32 mem, u8 value); +void psxMemWrite16(u32 mem, u16 value); +void psxMemWrite32(u32 mem, u32 value); +void *psxMemPointer(u32 mem); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c new file mode 100644 index 00000000..8c6289e6 --- /dev/null +++ b/libpcsxcore/r3000a.c @@ -0,0 +1,202 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* R3000A CPU functions. +*/ + +#include "r3000a.h" +#include "cdrom.h" +#include "mdec.h" +#include "gte.h" + +R3000Acpu *psxCpu = NULL; +psxRegisters psxRegs; + +int psxInit() { + SysPrintf(_("Running PCSX Version %s (%s).\n"), PACKAGE_VERSION, __DATE__); + +#ifdef PSXREC + if (Config.Cpu == CPU_INTERPRETER) { + psxCpu = &psxInt; + } else psxCpu = &psxRec; +#else + psxCpu = &psxInt; +#endif + + Log = 0; + + if (psxMemInit() == -1) return -1; + + return psxCpu->Init(); +} + +void psxReset() { + psxCpu->Reset(); + + psxMemReset(); + + memset(&psxRegs, 0, sizeof(psxRegs)); + + psxRegs.pc = 0xbfc00000; // Start in bootstrap + + psxRegs.CP0.r[12] = 0x10900000; // COP0 enabled | BEV = 1 | TS = 1 + psxRegs.CP0.r[15] = 0x00000002; // PRevID = Revision ID, same as R3000A + + psxHwReset(); + psxBiosInit(); + + if (!Config.HLE) + psxExecuteBios(); + +#ifdef EMU_LOG + EMU_LOG("*BIOS END*\n"); +#endif + Log = 0; +} + +void psxShutdown() { + psxMemShutdown(); + psxBiosShutdown(); + + psxCpu->Shutdown(); +} + +void psxException(u32 code, u32 bd) { + // Set the Cause + psxRegs.CP0.n.Cause = code; + + // Set the EPC & PC + if (bd) { +#ifdef PSXCPU_LOG + PSXCPU_LOG("bd set!!!\n"); +#endif + SysPrintf("bd set!!!\n"); + psxRegs.CP0.n.Cause |= 0x80000000; + psxRegs.CP0.n.EPC = (psxRegs.pc - 4); + } else + psxRegs.CP0.n.EPC = (psxRegs.pc); + + if (psxRegs.CP0.n.Status & 0x400000) + psxRegs.pc = 0xbfc00180; + else + psxRegs.pc = 0x80000080; + + // Set the Status + psxRegs.CP0.n.Status = (psxRegs.CP0.n.Status &~0x3f) | + ((psxRegs.CP0.n.Status & 0xf) << 2); + + if (!Config.HLE && (((PSXMu32(psxRegs.CP0.n.EPC) >> 24) & 0xfe) == 0x4a)) { + // "hokuto no ken" / "Crash Bandicot 2" ... fix + PSXMu32ref(psxRegs.CP0.n.EPC)&= SWAPu32(~0x02000000); + } + + if (Config.HLE) psxBiosException(); +} + +void psxBranchTest() { + if ((psxRegs.cycle - psxNextsCounter) >= psxNextCounter) + psxRcntUpdate(); + + if (psxRegs.interrupt) { + if ((psxRegs.interrupt & 0x80) && !Config.Sio) { // sio + if ((psxRegs.cycle - psxRegs.intCycle[7]) >= psxRegs.intCycle[7 + 1]) { + psxRegs.interrupt &= ~0x80; + sioInterrupt(); + } + } + if (psxRegs.interrupt & 0x04) { // cdr + if ((psxRegs.cycle - psxRegs.intCycle[2]) >= psxRegs.intCycle[2 + 1]) { + psxRegs.interrupt &= ~0x04; + cdrInterrupt(); + } + } + if (psxRegs.interrupt & 0x040000) { // cdr read + if ((psxRegs.cycle - psxRegs.intCycle[2 + 16]) >= psxRegs.intCycle[2 + 16 + 1]) { + psxRegs.interrupt &= ~0x040000; + cdrReadInterrupt(); + } + } + if (psxRegs.interrupt & 0x01000000) { // gpu dma + if ((psxRegs.cycle - psxRegs.intCycle[3 + 24]) >= psxRegs.intCycle[3 + 24 + 1]) { + psxRegs.interrupt &= ~0x01000000; + gpuInterrupt(); + } + } + if (psxRegs.interrupt & 0x02000000) { // mdec out dma + if ((psxRegs.cycle - psxRegs.intCycle[5 + 24]) >= psxRegs.intCycle[5 + 24 + 1]) { + psxRegs.interrupt &= ~0x02000000; + mdec1Interrupt(); + } + } + if (psxRegs.interrupt & 0x04000000) { // spu dma + if ((psxRegs.cycle - psxRegs.intCycle[1 + 24]) >= psxRegs.intCycle[1 + 24 + 1]) { + psxRegs.interrupt &= ~0x04000000; + spuInterrupt(); + } + } + } + + if (psxHu32(0x1070) & psxHu32(0x1074)) { + if ((psxRegs.CP0.n.Status & 0x401) == 0x401) { +#ifdef PSXCPU_LOG + PSXCPU_LOG("Interrupt: %x %x\n", psxHu32(0x1070), psxHu32(0x1074)); +#endif +// SysPrintf("Interrupt (%x): %x %x\n", psxRegs.cycle, psxHu32(0x1070), psxHu32(0x1074)); + psxException(0x400, 0); + } + } +} + +void psxJumpTest() { + if (!Config.HLE && Config.PsxOut) { + u32 call = psxRegs.GPR.n.t1 & 0xff; + switch (psxRegs.pc & 0x1fffff) { + case 0xa0: +#ifdef PSXBIOS_LOG + if (call != 0x28 && call != 0xe) { + PSXBIOS_LOG("Bios call a0: %s (%x) %x,%x,%x,%x\n", biosA0n[call], call, psxRegs.GPR.n.a0, psxRegs.GPR.n.a1, psxRegs.GPR.n.a2, psxRegs.GPR.n.a3); } +#endif + if (biosA0[call]) + biosA0[call](); + break; + case 0xb0: +#ifdef PSXBIOS_LOG + if (call != 0x17 && call != 0xb) { + PSXBIOS_LOG("Bios call b0: %s (%x) %x,%x,%x,%x\n", biosB0n[call], call, psxRegs.GPR.n.a0, psxRegs.GPR.n.a1, psxRegs.GPR.n.a2, psxRegs.GPR.n.a3); } +#endif + if (biosB0[call]) + biosB0[call](); + break; + case 0xc0: +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("Bios call c0: %s (%x) %x,%x,%x,%x\n", biosC0n[call], call, psxRegs.GPR.n.a0, psxRegs.GPR.n.a1, psxRegs.GPR.n.a2, psxRegs.GPR.n.a3); +#endif + if (biosC0[call]) + biosC0[call](); + break; + } + } +} + +void psxExecuteBios() { + while (psxRegs.pc != 0x80030000) + psxCpu->ExecuteBlock(); +} + diff --git a/libpcsxcore/r3000a.h b/libpcsxcore/r3000a.h new file mode 100644 index 00000000..51cd37cc --- /dev/null +++ b/libpcsxcore/r3000a.h @@ -0,0 +1,246 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __R3000A_H__ +#define __R3000A_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "psxmem.h" +#include "psxcounters.h" +#include "psxbios.h" + +typedef struct { + int (*Init)(); + void (*Reset)(); + void (*Execute)(); /* executes up to a break */ + void (*ExecuteBlock)(); /* executes up to a jump */ + void (*Clear)(u32 Addr, u32 Size); + void (*Shutdown)(); +} R3000Acpu; + +extern R3000Acpu *psxCpu; +extern R3000Acpu psxInt; +#if (defined(__x86_64__) || defined(__i386__) || defined(__sh__) || defined(__ppc__)) && !defined(NOPSXREC) +extern R3000Acpu psxRec; +#define PSXREC +#endif + +typedef union { +#if defined(__BIGENDIAN__) + struct { u8 h3, h2, h, l; } b; + struct { s8 h3, h2, h, l; } sb; + struct { u16 h, l; } w; + struct { s16 h, l; } sw; +#else + struct { u8 l, h, h2, h3; } b; + struct { u16 l, h; } w; + struct { s8 l, h, h2, h3; } sb; + struct { s16 l, h; } sw; +#endif +} PAIR; + +typedef union { + struct { + u32 r0, at, v0, v1, a0, a1, a2, a3, + t0, t1, t2, t3, t4, t5, t6, t7, + s0, s1, s2, s3, s4, s5, s6, s7, + t8, t9, k0, k1, gp, sp, s8, ra, lo, hi; + } n; + u32 r[34]; /* Lo, Hi in r[32] and r[33] */ + PAIR p[34]; +} psxGPRRegs; + +typedef union { + struct { + u32 Index, Random, EntryLo0, EntryLo1, + Context, PageMask, Wired, Reserved0, + BadVAddr, Count, EntryHi, Compare, + Status, Cause, EPC, PRid, + Config, LLAddr, WatchLO, WatchHI, + XContext, Reserved1, Reserved2, Reserved3, + Reserved4, Reserved5, ECC, CacheErr, + TagLo, TagHi, ErrorEPC, Reserved6; + } n; + u32 r[32]; + PAIR p[32]; +} psxCP0Regs; + +typedef struct { + short x, y; +} SVector2D; + +typedef struct { + short z, pad; +} SVector2Dz; + +typedef struct { + short x, y, z, pad; +} SVector3D; + +typedef struct { + short x, y, z, pad; +} LVector3D; + +typedef struct { + unsigned char r, g, b, c; +} CBGR; + +typedef struct { + short m11, m12, m13, m21, m22, m23, m31, m32, m33, pad; +} SMatrix3D; + +typedef union { + struct { + SVector3D v0, v1, v2; + CBGR rgb; + s32 otz; + s32 ir0, ir1, ir2, ir3; + SVector2D sxy0, sxy1, sxy2, sxyp; + SVector2Dz sz0, sz1, sz2, sz3; + CBGR rgb0, rgb1, rgb2; + s32 reserved; + s32 mac0, mac1, mac2, mac3; + u32 irgb, orgb; + s32 lzcs, lzcr; + } n; + u32 r[32]; + PAIR p[32]; +} psxCP2Data; + +typedef union { + struct { + SMatrix3D rMatrix; + s32 trX, trY, trZ; + SMatrix3D lMatrix; + s32 rbk, gbk, bbk; + SMatrix3D cMatrix; + s32 rfc, gfc, bfc; + s32 ofx, ofy; + s32 h; + s32 dqa, dqb; + s32 zsf3, zsf4; + s32 flag; + } n; + u32 r[32]; + PAIR p[32]; +} psxCP2Ctrl; + +typedef struct { + psxGPRRegs GPR; /* General Purpose Registers */ + psxCP0Regs CP0; /* Coprocessor0 Registers */ + psxCP2Data CP2D; /* Cop2 data registers */ + psxCP2Ctrl CP2C; /* Cop2 control registers */ + u32 pc; /* Program counter */ + u32 code; /* The instruction */ + u32 cycle; + u32 interrupt; + u32 intCycle[32]; +} psxRegisters; + +extern psxRegisters psxRegs; + +#if defined(__BIGENDIAN__) + +#define _i32(x) *(s32 *)&x +#define _u32(x) x + +#define _i16(x) (((short *)&x)[1]) +#define _u16(x) (((unsigned short *)&x)[1]) + +#define _i8(x) (((char *)&x)[3]) +#define _u8(x) (((unsigned char *)&x)[3]) + +#else + +#define _i32(x) *(s32 *)&x +#define _u32(x) x + +#define _i16(x) *(short *)&x +#define _u16(x) *(unsigned short *)&x + +#define _i8(x) *(char *)&x +#define _u8(x) *(unsigned char *)&x + +#endif + +/**** R3000A Instruction Macros ****/ +#define _PC_ psxRegs.pc // The next PC to be executed + +#define _fOp_(code) ((code >> 26) ) // The opcode part of the instruction register +#define _fFunct_(code) ((code ) & 0x3F) // The funct part of the instruction register +#define _fRd_(code) ((code >> 11) & 0x1F) // The rd part of the instruction register +#define _fRt_(code) ((code >> 16) & 0x1F) // The rt part of the instruction register +#define _fRs_(code) ((code >> 21) & 0x1F) // The rs part of the instruction register +#define _fSa_(code) ((code >> 6) & 0x1F) // The sa part of the instruction register +#define _fIm_(code) ((u16)code) // The immediate part of the instruction register +#define _fTarget_(code) (code & 0x03ffffff) // The target part of the instruction register + +#define _fImm_(code) ((s16)code) // sign-extended immediate +#define _fImmU_(code) (code&0xffff) // zero-extended immediate + +#define _Op_ _fOp_(psxRegs.code) +#define _Funct_ _fFunct_(psxRegs.code) +#define _Rd_ _fRd_(psxRegs.code) +#define _Rt_ _fRt_(psxRegs.code) +#define _Rs_ _fRs_(psxRegs.code) +#define _Sa_ _fSa_(psxRegs.code) +#define _Im_ _fIm_(psxRegs.code) +#define _Target_ _fTarget_(psxRegs.code) + +#define _Imm_ _fImm_(psxRegs.code) +#define _ImmU_ _fImmU_(psxRegs.code) + +#define _rRs_ psxRegs.GPR.r[_Rs_] // Rs register +#define _rRt_ psxRegs.GPR.r[_Rt_] // Rt register +#define _rRd_ psxRegs.GPR.r[_Rd_] // Rd register +#define _rSa_ psxRegs.GPR.r[_Sa_] // Sa register +#define _rFs_ psxRegs.CP0.r[_Rd_] // Fs register + +#define _c2dRs_ psxRegs.CP2D.r[_Rs_] // Rs cop2 data register +#define _c2dRt_ psxRegs.CP2D.r[_Rt_] // Rt cop2 data register +#define _c2dRd_ psxRegs.CP2D.r[_Rd_] // Rd cop2 data register +#define _c2dSa_ psxRegs.CP2D.r[_Sa_] // Sa cop2 data register + +#define _rHi_ psxRegs.GPR.n.hi // The HI register +#define _rLo_ psxRegs.GPR.n.lo // The LO register + +#define _JumpTarget_ ((_Target_ * 4) + (_PC_ & 0xf0000000)) // Calculates the target during a jump instruction +#define _BranchTarget_ ((s16)_Im_ * 4 + _PC_) // Calculates the target during a branch instruction + +#define _SetLink(x) psxRegs.GPR.r[x] = _PC_ + 4; // Sets the return address in the link register + +int psxInit(); +void psxReset(); +void psxShutdown(); +void psxException(u32 code, u32 bd); +void psxBranchTest(); +void psxExecuteBios(); +int psxTestLoadDelay(int reg, u32 tmp); +void psxDelayTest(int reg, u32 bpc); +void psxTestSWInts(); +void psxJumpTest(); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/sio.c b/libpcsxcore/sio.c new file mode 100644 index 00000000..977c71d1 --- /dev/null +++ b/libpcsxcore/sio.c @@ -0,0 +1,775 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* SIO functions. +*/ + +#include "sio.h" +#include + +// Status Flags +#define TX_RDY 0x0001 +#define RX_RDY 0x0002 +#define TX_EMPTY 0x0004 +#define PARITY_ERR 0x0008 +#define RX_OVERRUN 0x0010 +#define FRAMING_ERR 0x0020 +#define SYNC_DETECT 0x0040 +#define DSR 0x0080 +#define CTS 0x0100 +#define IRQ 0x0200 + +// Control Flags +#define TX_PERM 0x0001 +#define DTR 0x0002 +#define RX_PERM 0x0004 +#define BREAK 0x0008 +#define RESET_ERR 0x0010 +#define RTS 0x0020 +#define SIO_RESET 0x0040 + +// *** FOR WORKS ON PADS AND MEMORY CARDS ***** + +static unsigned char buf[256]; +unsigned char cardh[4] = { 0x00, 0x00, 0x5a, 0x5d }; + +// Transfer Ready and the Buffer is Empty +// static unsigned short StatReg = 0x002b; +static unsigned short StatReg = TX_RDY | TX_EMPTY; +static unsigned short ModeReg; +static unsigned short CtrlReg; +static unsigned short BaudReg; + +static unsigned int bufcount; +static unsigned int parp; +static unsigned int mcdst, rdwr; +static unsigned char adrH, adrL; +static unsigned int padst; + +char Mcd1Data[MCD_SIZE], Mcd2Data[MCD_SIZE]; + +// clk cycle byte +// 4us * 8bits = (PSXCLK / 1000000) * 32; (linuzappz) +// TODO: add SioModePrescaler and BaudReg +static inline void SIO_INT() { + if (!Config.Sio) { + psxRegs.interrupt |= 0x80; + psxRegs.intCycle[7 + 1] = 400; + psxRegs.intCycle[7] = psxRegs.cycle; + } +} + +void sioWrite8(unsigned char value) { +#ifdef PAD_LOG + PAD_LOG("sio write8 %x\n", value); +#endif + switch (padst) { + case 1: SIO_INT(); + if ((value & 0x40) == 0x40) { + padst = 2; parp = 1; + if (!Config.UseNet) { + switch (CtrlReg & 0x2002) { + case 0x0002: + buf[parp] = PAD1_poll(value); + break; + case 0x2002: + buf[parp] = PAD2_poll(value); + break; + } + }/* else { +// SysPrintf("%x: %x, %x, %x, %x\n", CtrlReg&0x2002, buf[2], buf[3], buf[4], buf[5]); + }*/ + + if (!(buf[parp] & 0x0f)) { + bufcount = 2 + 32; + } else { + bufcount = 2 + (buf[parp] & 0x0f) * 2; + } + if (buf[parp] == 0x41) { + switch (value) { + case 0x43: + buf[1] = 0x43; + break; + case 0x45: + buf[1] = 0xf3; + break; + } + } + } + else padst = 0; + return; + case 2: + parp++; +/* if (buf[1] == 0x45) { + buf[parp] = 0; + SIO_INT(); + return; + }*/ + if (!Config.UseNet) { + switch (CtrlReg & 0x2002) { + case 0x0002: buf[parp] = PAD1_poll(value); break; + case 0x2002: buf[parp] = PAD2_poll(value); break; + } + } + + if (parp == bufcount) { padst = 0; return; } + SIO_INT(); + return; + } + + switch (mcdst) { + case 1: + SIO_INT(); + if (rdwr) { parp++; return; } + parp = 1; + switch (value) { + case 0x52: rdwr = 1; break; + case 0x57: rdwr = 2; break; + default: mcdst = 0; + } + return; + case 2: // address H + SIO_INT(); + adrH = value; + *buf = 0; + parp = 0; + bufcount = 1; + mcdst = 3; + return; + case 3: // address L + SIO_INT(); + adrL = value; + *buf = adrH; + parp = 0; + bufcount = 1; + mcdst = 4; + return; + case 4: + SIO_INT(); + parp = 0; + switch (rdwr) { + case 1: // read + buf[0] = 0x5c; + buf[1] = 0x5d; + buf[2] = adrH; + buf[3] = adrL; + switch (CtrlReg & 0x2002) { + case 0x0002: + memcpy(&buf[4], Mcd1Data + (adrL | (adrH << 8)) * 128, 128); + break; + case 0x2002: + memcpy(&buf[4], Mcd2Data + (adrL | (adrH << 8)) * 128, 128); + break; + } + { + char xor = 0; + int i; + for (i = 2; i < 128 + 4; i++) + xor ^= buf[i]; + buf[132] = xor; + } + buf[133] = 0x47; + bufcount = 133; + break; + case 2: // write + buf[0] = adrL; + buf[1] = value; + buf[129] = 0x5c; + buf[130] = 0x5d; + buf[131] = 0x47; + bufcount = 131; + break; + } + mcdst = 5; + return; + case 5: + parp++; + if (rdwr == 2) { + if (parp < 128) buf[parp + 1] = value; + } + SIO_INT(); + return; + } + + switch (value) { + case 0x01: // start pad + StatReg |= RX_RDY; // Transfer is Ready + + if (!Config.UseNet) { + switch (CtrlReg & 0x2002) { + case 0x0002: buf[0] = PAD1_startPoll(1); break; + case 0x2002: buf[0] = PAD2_startPoll(2); break; + } + } else { + if ((CtrlReg & 0x2002) == 0x0002) { + int i, j; + + PAD1_startPoll(1); + buf[0] = 0; + buf[1] = PAD1_poll(0x42); + if (!(buf[1] & 0x0f)) { + bufcount = 32; + } else { + bufcount = (buf[1] & 0x0f) * 2; + } + buf[2] = PAD1_poll(0); + i = 3; + j = bufcount; + while (j--) { + buf[i++] = PAD1_poll(0); + } + bufcount+= 3; + + if (NET_sendPadData(buf, bufcount) == -1) + netError(); + + if (NET_recvPadData(buf, 1) == -1) + netError(); + if (NET_recvPadData(buf + 128, 2) == -1) + netError(); + } else { + memcpy(buf, buf + 128, 32); + } + } + + bufcount = 2; + parp = 0; + padst = 1; + SIO_INT(); + return; + case 0x81: // start memcard + StatReg |= RX_RDY; + memcpy(buf, cardh, 4); + parp = 0; + bufcount = 3; + mcdst = 1; + rdwr = 0; + SIO_INT(); + return; + } +} + +void sioWriteStat16(unsigned short value) { +} + +void sioWriteMode16(unsigned short value) { + ModeReg = value; +} + +void sioWriteCtrl16(unsigned short value) { + CtrlReg = value & ~RESET_ERR; + if (value & RESET_ERR) StatReg &= ~IRQ; + if ((CtrlReg & SIO_RESET) || (!CtrlReg)) { + padst = 0; mcdst = 0; parp = 0; + StatReg = TX_RDY | TX_EMPTY; + psxRegs.interrupt &= ~0x80; + } +} + +void sioWriteBaud16(unsigned short value) { + BaudReg = value; +} + +unsigned char sioRead8() { + unsigned char ret = 0; + + if ((StatReg & RX_RDY)/* && (CtrlReg & RX_PERM)*/) { +// StatReg &= ~RX_OVERRUN; + ret = buf[parp]; + if (parp == bufcount) { + StatReg &= ~RX_RDY; // Receive is not Ready now + if (mcdst == 5) { + mcdst = 0; + if (rdwr == 2) { + switch (CtrlReg & 0x2002) { + case 0x0002: + memcpy(Mcd1Data + (adrL | (adrH << 8)) * 128, &buf[1], 128); + SaveMcd(Config.Mcd1, Mcd1Data, (adrL | (adrH << 8)) * 128, 128); + break; + case 0x2002: + memcpy(Mcd2Data + (adrL | (adrH << 8)) * 128, &buf[1], 128); + SaveMcd(Config.Mcd2, Mcd2Data, (adrL | (adrH << 8)) * 128, 128); + break; + } + } + } + if (padst == 2) padst = 0; + if (mcdst == 1) { + mcdst = 2; + StatReg|= RX_RDY; + } + } + } + +#ifdef PAD_LOG + PAD_LOG("sio read8 ;ret = %x\n", ret); +#endif + return ret; +} + +unsigned short sioReadStat16() { + return StatReg; +} + +unsigned short sioReadMode16() { + return ModeReg; +} + +unsigned short sioReadCtrl16() { + return CtrlReg; +} + +unsigned short sioReadBaud16() { + return BaudReg; +} + +void netError() { + ClosePlugins(); + SysMessage(_("Connection closed!\n")); + + CdromId[0] = '\0'; + CdromLabel[0] = '\0'; + + SysRunGui(); +} + +void sioInterrupt() { +#ifdef PAD_LOG + PAD_LOG("Sio Interrupt (CP0.Status = %x)\n", psxRegs.CP0.n.Status); +#endif +// SysPrintf("Sio Interrupt\n"); + StatReg |= IRQ; + psxHu32ref(0x1070) |= SWAPu32(0x80); +} + +void LoadMcd(int mcd, char *str) { + FILE *f; + char *data = NULL; + + if (mcd == 1) data = Mcd1Data; + if (mcd == 2) data = Mcd2Data; + + if (*str == 0) { + sprintf(str, "memcards/card%d.mcd", mcd); + SysPrintf(_("No memory card value was specified - creating a default card %s\n"), str); + } + f = fopen(str, "rb"); + if (f == NULL) { + SysPrintf(_("The memory card %s doesn't exist - creating it\n"), str); + CreateMcd(str); + f = fopen(str, "rb"); + if (f != NULL) { + struct stat buf; + + if (stat(str, &buf) != -1) { + if (buf.st_size == MCD_SIZE + 64) + fseek(f, 64, SEEK_SET); + else if(buf.st_size == MCD_SIZE + 3904) + fseek(f, 3904, SEEK_SET); + } + fread(data, 1, MCD_SIZE, f); + fclose(f); + } + else + SysMessage(_("Memory card %s failed to load!\n"), str); + } + else { + struct stat buf; + SysPrintf(_("Loading memory card %s\n"), str); + if (stat(str, &buf) != -1) { + if (buf.st_size == MCD_SIZE + 64) + fseek(f, 64, SEEK_SET); + else if(buf.st_size == MCD_SIZE + 3904) + fseek(f, 3904, SEEK_SET); + } + fread(data, 1, MCD_SIZE, f); + fclose(f); + } +} + +void LoadMcds(char *mcd1, char *mcd2) { + LoadMcd(1, mcd1); + LoadMcd(2, mcd2); +} + +void SaveMcd(char *mcd, char *data, uint32_t adr, int size) { + FILE *f; + + f = fopen(mcd, "r+b"); + if (f != NULL) { + struct stat buf; + + if (stat(mcd, &buf) != -1) { + if (buf.st_size == MCD_SIZE + 64) + fseek(f, adr + 64, SEEK_SET); + else if (buf.st_size == MCD_SIZE + 3904) + fseek(f, adr + 3904, SEEK_SET); + else + fseek(f, adr, SEEK_SET); + } else + fseek(f, adr, SEEK_SET); + + fwrite(data + adr, 1, size, f); + fclose(f); + return; + } + +#if 0 + // try to create it again if we can't open it + f = fopen(mcd, "wb"); + if (f != NULL) { + fwrite(data, 1, MCD_SIZE, f); + fclose(f); + } +#endif + + ConvertMcd(mcd, data); +} + +void CreateMcd(char *mcd) { + FILE *f; + struct stat buf; + int s = MCD_SIZE; + int i = 0, j; + + f = fopen(mcd, "wb"); + if (f == NULL) + return; + + if (stat(mcd, &buf) != -1) { + if ((buf.st_size == MCD_SIZE + 3904) || strstr(mcd, ".gme")) { + s = s + 3904; + fputc('1', f); + s--; + fputc('2', f); + s--; + fputc('3', f); + s--; + fputc('-', f); + s--; + fputc('4', f); + s--; + fputc('5', f); + s--; + fputc('6', f); + s--; + fputc('-', f); + s--; + fputc('S', f); + s--; + fputc('T', f); + s--; + fputc('D', f); + s--; + for (i = 0; i < 7; i++) { + fputc(0, f); + s--; + } + fputc(1, f); + s--; + fputc(0, f); + s--; + fputc(1, f); + s--; + fputc('M', f); + s--; + fputc('Q', f); + s--; + for (i = 0; i < 14; i++) { + fputc(0xa0, f); + s--; + } + fputc(0, f); + s--; + fputc(0xff, f); + while (s-- > (MCD_SIZE + 1)) + fputc(0, f); + } else if ((buf.st_size == MCD_SIZE + 64) || strstr(mcd, ".mem") || strstr(mcd, ".vgs")) { + s = s + 64; + fputc('V', f); + s--; + fputc('g', f); + s--; + fputc('s', f); + s--; + fputc('M', f); + s--; + for (i = 0; i < 3; i++) { + fputc(1, f); + s--; + fputc(0, f); + s--; + fputc(0, f); + s--; + fputc(0, f); + s--; + } + fputc(0, f); + s--; + fputc(2, f); + while (s-- > (MCD_SIZE + 1)) + fputc(0, f); + } + } + fputc('M', f); + s--; + fputc('C', f); + s--; + while (s-- > (MCD_SIZE - 127)) + fputc(0, f); + fputc(0xe, f); + s--; + + for (i = 0; i < 15; i++) { // 15 blocks + fputc(0xa0, f); + s--; + fputc(0x00, f); + s--; + fputc(0x00, f); + s--; + fputc(0x00, f); + s--; + fputc(0x00, f); + s--; + fputc(0x00, f); + s--; + fputc(0x00, f); + s--; + fputc(0x00, f); + s--; + fputc(0xff, f); + s--; + fputc(0xff, f); + s--; + for (j = 0; j < 117; j++) { + fputc(0x00, f); + s--; + } + fputc(0xa0, f); + s--; + } + + for (i = 0; i < 20; i++) { + fputc(0xff, f); + s--; + fputc(0xff, f); + s--; + fputc(0xff, f); + s--; + fputc(0xff, f); + s--; + fputc(0x00, f); + s--; + fputc(0x00, f); + s--; + fputc(0x00, f); + s--; + fputc(0x00, f); + s--; + fputc(0xff, f); + s--; + fputc(0xff, f); + s--; + for (j = 0; j < 118; j++) { + fputc(0x00, f); + s--; + } + } + + while ((s--) >= 0) + fputc(0, f); + + fclose(f); +} + +void ConvertMcd(char *mcd, char *data) { + FILE *f; + int i = 0; + int s = MCD_SIZE; + + if (strstr(mcd, ".gme")) { + f = fopen(mcd, "wb"); + if (f != NULL) { + fwrite(data - 3904, 1, MCD_SIZE + 3904, f); + fclose(f); + } + f = fopen(mcd, "r+"); + s = s + 3904; + fputc('1', f); s--; + fputc('2', f); s--; + fputc('3', f); s--; + fputc('-', f); s--; + fputc('4', f); s--; + fputc('5', f); s--; + fputc('6', f); s--; + fputc('-', f); s--; + fputc('S', f); s--; + fputc('T', f); s--; + fputc('D', f); s--; + for (i = 0; i < 7; i++) { + fputc(0, f); s--; + } + fputc(1, f); s--; + fputc(0, f); s--; + fputc(1, f); s--; + fputc('M', f); s--; + fputc('Q', f); s--; + for(i=0;i<14;i++) { + fputc(0xa0, f); s--; + } + fputc(0, f); s--; + fputc(0xff, f); + while (s-- > (MCD_SIZE+1)) fputc(0, f); + fclose(f); + } else if(strstr(mcd, ".mem") || strstr(mcd,".vgs")) { + f = fopen(mcd, "wb"); + if (f != NULL) { + fwrite(data-64, 1, MCD_SIZE+64, f); + fclose(f); + } + f = fopen(mcd, "r+"); + s = s + 64; + fputc('V', f); s--; + fputc('g', f); s--; + fputc('s', f); s--; + fputc('M', f); s--; + for(i=0;i<3;i++) { + fputc(1, f); s--; + fputc(0, f); s--; + fputc(0, f); s--; + fputc(0, f); s--; + } + fputc(0, f); s--; + fputc(2, f); + while (s-- > (MCD_SIZE+1)) fputc(0, f); + fclose(f); + } else { + f = fopen(mcd, "wb"); + if (f != NULL) { + fwrite(data, 1, MCD_SIZE, f); + fclose(f); + } + } +} + +void GetMcdBlockInfo(int mcd, int block, McdBlock *Info) { + unsigned char *data = NULL, *ptr, *str, *sstr; + unsigned short clut[16]; + unsigned short c; + int i, x; + + memset(Info, 0, sizeof(McdBlock)); + + if (mcd == 1) data = Mcd1Data; + if (mcd == 2) data = Mcd2Data; + + ptr = data + block * 8192 + 2; + + Info->IconCount = *ptr & 0x3; + + ptr += 2; + + x = 0; + + str = Info->Title; + sstr = Info->sTitle; + + for (i = 0; i < 48; i++) { + c = *(ptr) << 8; + c |= *(ptr + 1); + if (!c) break; + + // Convert ASCII characters to half-width + if (c >= 0x8281 && c <= 0x829A) + c = (c - 0x8281) + 'a'; + else if (c >= 0x824F && c <= 0x827A) + c = (c - 0x824F) + '0'; + else if (c == 0x8140) c = ' '; + else if (c == 0x8143) c = ','; + else if (c == 0x8144) c = '.'; + else if (c == 0x8146) c = ':'; + else if (c == 0x8147) c = ';'; + else if (c == 0x8148) c = '?'; + else if (c == 0x8149) c = '!'; + else if (c == 0x815E) c = '/'; + else if (c == 0x8168) c = '"'; + else if (c == 0x8169) c = '('; + else if (c == 0x816A) c = ')'; + else if (c == 0x816D) c = '['; + else if (c == 0x816E) c = ']'; + else if (c == 0x817C) c = '-'; + else { + str[i] = ' '; + sstr[x++] = *ptr++; sstr[x++] = *ptr++; + continue; + } + + str[i] = sstr[x++] = c; + ptr += 2; + } + + trim(str); + trim(sstr); + + ptr = data + block * 8192 + 0x60; // icon palette data + + for (i = 0; i < 16; i++) { + clut[i] = *((unsigned short *)ptr); + ptr += 2; + } + + for (i = 0; i < Info->IconCount; i++) { + short *icon = &Info->Icon[i * 16 * 16]; + + ptr = data + block * 8192 + 128 + 128 * i; // icon data + + for (x = 0; x < 16 * 16; x++) { + icon[x++] = clut[*ptr & 0xf]; + icon[x] = clut[*ptr >> 4]; + ptr++; + } + } + + ptr = data + block * 128; + + Info->Flags = *ptr; + + ptr += 0xa; + strncpy(Info->ID, ptr, 12); + ptr += 12; + strncpy(Info->Name, ptr, 16); +} + +int sioFreeze(gzFile f, int Mode) { + gzfreeze(buf, sizeof(buf)); + gzfreeze(&StatReg, sizeof(StatReg)); + gzfreeze(&ModeReg, sizeof(ModeReg)); + gzfreeze(&CtrlReg, sizeof(CtrlReg)); + gzfreeze(&BaudReg, sizeof(BaudReg)); + gzfreeze(&bufcount, sizeof(bufcount)); + gzfreeze(&parp, sizeof(parp)); + gzfreeze(&mcdst, sizeof(mcdst)); + gzfreeze(&rdwr, sizeof(rdwr)); + gzfreeze(&adrH, sizeof(adrH)); + gzfreeze(&adrL, sizeof(adrL)); + gzfreeze(&padst, sizeof(padst)); + + return 0; +} diff --git a/libpcsxcore/sio.h b/libpcsxcore/sio.h new file mode 100644 index 00000000..cc8d925b --- /dev/null +++ b/libpcsxcore/sio.h @@ -0,0 +1,76 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + + +#ifndef _SIO_H_ +#define _SIO_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "r3000a.h" +#include "psxmem.h" +#include "plugins.h" +#include "psemu_plugin_defs.h" + +#define MCD_SIZE (1024 * 8 * 16) + +extern char Mcd1Data[MCD_SIZE], Mcd2Data[MCD_SIZE]; + +void sioWrite8(unsigned char value); +void sioWriteStat16(unsigned short value); +void sioWriteMode16(unsigned short value); +void sioWriteCtrl16(unsigned short value); +void sioWriteBaud16(unsigned short value); + +unsigned char sioRead8(); +unsigned short sioReadStat16(); +unsigned short sioReadMode16(); +unsigned short sioReadCtrl16(); +unsigned short sioReadBaud16(); + +void netError(); + +void sioInterrupt(); +int sioFreeze(gzFile f, int Mode); + +void LoadMcd(int mcd, char *str); +void LoadMcds(char *mcd1, char *mcd2); +void SaveMcd(char *mcd, char *data, uint32_t adr, int size); +void CreateMcd(char *mcd); +void ConvertMcd(char *mcd, char *data); + +typedef struct { + char Title[48 + 1]; // Title in ASCII + char sTitle[48 * 2 + 1]; // Title in Shift-JIS + char ID[12 + 1]; + char Name[16 + 1]; + int IconCount; + short Icon[16 * 16 * 3]; + unsigned char Flags; +} McdBlock; + +void GetMcdBlockInfo(int mcd, int block, McdBlock *info); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/sjisfont.h b/libpcsxcore/sjisfont.h new file mode 100644 index 00000000..105d6243 --- /dev/null +++ b/libpcsxcore/sjisfont.h @@ -0,0 +1,6956 @@ +// +// This file is adapted from: +// +// Shinonome 14dot font for JISX 0208, 1983/1990 +// +// The original is k14goth by +// Yasuyuki Furukawa , 2000. +// (Public Domain) +// +// > Donated by H. Kagotani ; +// > public domainfont from Japan +// > JIS X 0208-1990 design is made by +// > TAKADA Toshihiro . +// > Modified for gothic like by Yasuyuki Furukawa +// +// Modified and Maintained by /efont/. +// +// (c) /efont/ -- Efont Open Laboratory 2001 +// http://openlab.ring.gr.jp/efont/ +// +// Converted to binary format by Wei Mingzhi . +// + +const unsigned char font_8140[] = { + 0x78, 0xda, 0xad, 0x3b, 0x3b, 0x90, 0x1b, 0xc9, + 0x75, 0x3d, 0x9f, 0x05, 0x1a, 0xcb, 0xe1, 0x4e, + 0x03, 0x0b, 0x9f, 0x66, 0xa5, 0x3d, 0xa2, 0x77, + 0x09, 0x89, 0xb8, 0x2b, 0x07, 0x73, 0xe2, 0x95, + 0x0a, 0xb6, 0xb7, 0x84, 0xd1, 0x99, 0xb6, 0x97, + 0xf6, 0x05, 0x0c, 0x18, 0x28, 0x9c, 0x40, 0xa5, + 0x52, 0xa0, 0x2a, 0xc1, 0x55, 0x57, 0x65, 0x06, + 0xb4, 0x31, 0xe1, 0x86, 0x08, 0x18, 0x28, 0x44, + 0x78, 0xa1, 0x43, 0x87, 0x13, 0x6e, 0xa8, 0xe0, + 0x02, 0x85, 0x13, 0x28, 0x50, 0xa0, 0x60, 0x02, + 0x06, 0x08, 0x58, 0x45, 0xbf, 0xd7, 0x3d, 0x3d, + 0xdd, 0x3d, 0x3f, 0x52, 0x3e, 0xcf, 0x2b, 0x82, + 0x18, 0xbc, 0xe9, 0xe9, 0xd7, 0xaf, 0xdf, 0xff, + 0xf5, 0x12, 0xf2, 0xd7, 0x5e, 0x09, 0xe1, 0x84, + 0x01, 0x74, 0x5f, 0x31, 0xb9, 0x05, 0x88, 0x7b, + 0xb0, 0x29, 0x00, 0x87, 0x37, 0x90, 0x01, 0x7c, + 0xf3, 0x72, 0x88, 0x97, 0x39, 0x1d, 0xcf, 0x7a, + 0x00, 0xcd, 0x6f, 0x7d, 0x58, 0x87, 0xb8, 0x35, + 0x66, 0x9c, 0xd1, 0x84, 0x71, 0x04, 0x20, 0x04, + 0xde, 0x8c, 0xa0, 0x9e, 0x87, 0xef, 0x59, 0x05, + 0x44, 0x81, 0xa6, 0x80, 0xc1, 0xca, 0x78, 0x2f, + 0xed, 0xc3, 0x2b, 0x77, 0x32, 0x8f, 0xf8, 0xbd, + 0x63, 0x47, 0x38, 0x7b, 0xd6, 0x87, 0x0d, 0xd2, + 0x20, 0xed, 0xdf, 0x0f, 0x58, 0x5b, 0xe6, 0x27, + 0xb4, 0x87, 0xb0, 0xf7, 0xef, 0xc8, 0xff, 0xe9, + 0x32, 0xc7, 0x05, 0x92, 0xba, 0xa4, 0x63, 0xf1, + 0x9c, 0xec, 0x83, 0xa4, 0x17, 0xab, 0xc7, 0xe6, + 0x1d, 0x3b, 0xa8, 0xc7, 0x76, 0x61, 0xe1, 0xf2, + 0x13, 0x04, 0x9a, 0xd1, 0x6c, 0x6a, 0xad, 0x57, + 0xad, 0x98, 0xb1, 0x34, 0x08, 0x0b, 0xb5, 0x4f, + 0xbb, 0x9a, 0x62, 0x17, 0xc0, 0x2b, 0x7d, 0xee, + 0x73, 0x9a, 0xcc, 0x60, 0x2f, 0x1b, 0xb4, 0xa1, + 0xf0, 0xf2, 0x51, 0x32, 0xc9, 0x26, 0x64, 0x96, + 0xcd, 0x49, 0x84, 0xb7, 0x4a, 0x36, 0xf2, 0x28, + 0xe6, 0x14, 0x86, 0xf9, 0x0a, 0xf0, 0x2e, 0x8a, + 0xc7, 0x79, 0x53, 0x07, 0x36, 0xe5, 0xc7, 0xf1, + 0xae, 0x7d, 0x35, 0xdf, 0x85, 0x0b, 0x25, 0x54, + 0x10, 0x21, 0xe4, 0xd1, 0x35, 0x6f, 0x89, 0x62, + 0x2d, 0x83, 0xdf, 0x7c, 0xc0, 0x39, 0xf6, 0x0f, + 0xc6, 0x75, 0x49, 0xae, 0xe9, 0x2f, 0x18, 0x29, + 0xac, 0x17, 0x67, 0xfd, 0x40, 0x88, 0x33, 0x00, + 0xf6, 0xf5, 0x34, 0x7e, 0x1a, 0xf7, 0xaf, 0x88, + 0x25, 0xac, 0xa9, 0xd2, 0x72, 0x01, 0xbc, 0x5b, + 0x1d, 0x62, 0xb9, 0x05, 0x7d, 0x76, 0xe0, 0xce, + 0x61, 0x5e, 0x8c, 0xd0, 0x85, 0x7c, 0x4a, 0xa6, + 0x00, 0xd7, 0xe4, 0x59, 0xf7, 0x58, 0xc5, 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0x38, 0xf3, 0x95, 0xf1, 0xce, + 0x41, 0xfb, 0x98, 0x2b, 0x66, 0xdc, 0x14, 0x3e, + 0xf9, 0x92, 0x7c, 0x4d, 0xff, 0x8d, 0xc5, 0xd5, + 0xbc, 0x11, 0x5d, 0xb2, 0xaf, 0xf8, 0x57, 0xc9, + 0x32, 0xbb, 0x20, 0x6e, 0xea, 0xef, 0x27, 0x74, + 0x4a, 0xf9, 0x3e, 0xa9, 0xa2, 0x01, 0x97, 0x23, + 0x2c, 0x8e, 0xca, 0x59, 0x6d, 0x4a, 0xf4, 0x95, + 0x08, 0x88, 0x3d, 0x13, 0x96, 0x72, 0x4a, 0x4e, + 0x89, 0xbf, 0x3e, 0x65, 0x53, 0xce, 0x73, 0x9e, + 0x4f, 0xf9, 0x59, 0x64, 0xee, 0xd1, 0x45, 0xfc, + 0xe9, 0xd6, 0x03, 0xea, 0x3e, 0xdd, 0x5e, 0xc4, + 0xe6, 0x8e, 0x79, 0x59, 0x90, 0x32, 0xf6, 0xf8, + 0x7e, 0x79, 0xff, 0xec, 0xfe, 0xf6, 0xee, 0xf9, + 0xfe, 0x49, 0xaa, 0xbd, 0x20, 0xee, 0x90, 0x9f, + 0x60, 0xc4, 0x02, 0xdf, 0xf2, 0x11, 0xee, 0x12, + 0x78, 0x70, 0xfc, 0xcd, 0xcb, 0xb4, 0x7f, 0x76, + 0xb3, 0xd7, 0xaf, 0xe3, 0x28, 0x48, 0x7d, 0x58, + 0xf7, 0xe9, 0xe1, 0x72, 0xab, 0xf6, 0xdf, 0x11, + 0xf3, 0x7a, 0xd9, 0xee, 0xdd, 0xe6, 0x18, 0x16, + 0xe3, 0x3c, 0x2c, 0xce, 0x0a, 0x8d, 0x55, 0x33, + 0xa3, 0xf6, 0x20, 0xe0, 0xb7, 0x20, 0xf5, 0x32, + 0x8d, 0x0d, 0x8b, 0x45, 0xb9, 0x28, 0x37, 0x47, + 0x04, 0xfc, 0x16, 0x16, 0x26, 0x36, 0x48, 0xcf, +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xdf, 0x18, 0x9b, 0x57, 0x49, 0x0d, + 0x3c, 0xb4, 0xc9, 0x9b, 0x58, 0x35, 0xaf, 0x1a, + 0x6f, 0xcf, 0xac, 0xe6, 0x55, 0xe3, 0xed, 0x99, + 0x39, 0xd3, 0x80, 0x1f, 0x14, 0x74, 0x9f, 0xb4, + 0x72, 0x11, 0xf3, 0xa9, 0x66, 0xa4, 0x6b, 0xcb, + 0x8e, 0x11, 0x75, 0x0d, 0xc8, 0x86, 0xc9, 0xcd, + 0x9a, 0x32, 0xd6, 0x4c, 0xe3, 0x76, 0x25, 0xa1, + 0xf0, 0xaf, 0x23, 0x10, 0x43, 0xaa, 0x36, 0x65, + 0x42, 0x37, 0x25, 0x52, 0x6c, 0x05, 0xed, 0x42, + 0x2b, 0x17, 0x65, 0xf7, 0xcc, 0x8b, 0x42, 0xb1, + 0xc9, 0xfa, 0x66, 0xc6, 0xde, 0x8d, 0x28, 0xd7, + 0xe4, 0x73, 0x3b, 0x96, 0xd0, 0xba, 0x10, 0x16, + 0x71, 0x94, 0xf4, 0x26, 0x50, 0x4e, 0xee, 0x62, + 0x62, 0xc9, 0xbd, 0xc3, 0x28, 0xf5, 0x21, 0x5b, + 0x0a, 0x92, 0x20, 0x3f, 0xc9, 0x3c, 0x4b, 0x57, + 0x22, 0xe0, 0x56, 0x00, 0x34, 0x8f, 0x12, 0xb7, + 0x25, 0x75, 0x9b, 0xb2, 0xf9, 0x69, 0x86, 0x94, + 0x97, 0xf0, 0xaf, 0xc6, 0x25, 0xe0, 0x13, 0x6a, + 0x8e, 0x38, 0xcc, 0xe5, 0x98, 0xa1, 0x60, 0x44, + 0x3a, 0x25, 0x14, 0x76, 0xca, 0xe5, 0x4e, 0xcd, + 0x67, 0xf3, 0x37, 0xfd, 0x5c, 0x3d, 0xb6, 0xf2, + 0xe9, 0xd2, 0x97, 0x5c, 0x93, 0x6f, 0x44, 0xe4, + 0xe2, 0x37, 0x32, 0x3f, 0x06, 0x3a, 0x7b, 0x45, + 0x67, 0xac, 0x2b, 0x03, 0x1c, 0xc5, 0x93, 0x84, + 0x65, 0x2c, 0x9b, 0x24, 0xa3, 0x46, 0xac, 0x6c, + 0x7b, 0x5c, 0xcb, 0x1b, 0xe7, 0x72, 0x46, 0x91, + 0x15, 0x0b, 0xcb, 0x0d, 0x20, 0xe2, 0x65, 0xe4, + 0xd6, 0x28, 0x45, 0x1a, 0xa7, 0xe4, 0x22, 0xbb, + 0xc8, 0x82, 0x3c, 0xc8, 0x47, 0xe9, 0x28, 0x45, + 0x1f, 0xe3, 0x27, 0x17, 0x19, 0xe6, 0xc8, 0x98, + 0x37, 0x78, 0x96, 0x54, 0x86, 0x05, 0xce, 0x55, + 0x79, 0x2b, 0xbe, 0x4c, 0x7e, 0x9d, 0xfd, 0x3a, + 0xfb, 0x31, 0xf9, 0x21, 0xf1, 0xd8, 0xe8, 0xdb, + 0xb3, 0xbf, 0x7c, 0xf2, 0x97, 0xd9, 0xb7, 0x57, + 0x92, 0x0e, 0xcc, 0x39, 0x8a, 0x71, 0xb1, 0xc8, + 0x2e, 0xed, 0x6f, 0x75, 0x0a, 0xa4, 0xe0, 0x24, + 0xc7, 0x3d, 0x84, 0xb7, 0x67, 0x27, 0x10, 0xf1, + 0x12, 0x95, 0x95, 0xe7, 0x4e, 0x0a, 0x11, 0x6a, + 0xec, 0x30, 0x84, 0x31, 0x0f, 0x49, 0x58, 0x63, + 0x71, 0x75, 0x13, 0xbe, 0x28, 0x27, 0x5c, 0xd9, + 0x13, 0x3b, 0x77, 0x57, 0x38, 0xa7, 0x71, 0x27, + 0x74, 0x3b, 0x1f, 0x27, 0x08, 0x5e, 0xe2, 0x58, + 0xf0, 0x31, 0xf9, 0xa0, 0x8e, 0x55, 0x14, 0x28, + 0x1f, 0xa8, 0xa4, 0x79, 0xdc, 0x90, 0x67, 0x8d, + 0x55, 0x9a, 0x2f, 0x39, 0x2f, 0x75, 0x41, 0x6b, + 0x8a, 0xc6, 0xc2, 0x88, 0xa4, 0x65, 0x37, 0x12, + 0xd8, 0x45, 0x88, 0xd8, 0x61, 0x76, 0xc8, 0xbc, + 0x16, 0xa5, 0xd8, 0xbf, 0x42, 0x6b, 0x8a, 0xcc, + 0x10, 0x1e, 0x64, 0x41, 0x22, 0x35, 0xd0, 0x1c, + 0xeb, 0xe5, 0xb0, 0x04, 0xc0, 0x9e, 0xe7, 0x73, + 0x1e, 0xa1, 0x05, 0x61, 0x3e, 0xf7, 0x72, 0x6d, + 0x25, 0xc1, 0xca, 0x88, 0xdc, 0xa9, 0x2b, 0x3e, + 0xae, 0xa8, 0x02, 0x39, 0x56, 0xf4, 0x99, 0x6f, + 0xd6, 0x75, 0x15, 0x9a, 0x8e, 0x0f, 0xa4, 0x81, + 0x75, 0x5a, 0x52, 0xa3, 0xe5, 0x06, 0xec, 0x46, + 0x46, 0x53, 0x0a, 0xb4, 0xd0, 0x34, 0xcc, 0x69, + 0x4c, 0xf1, 0x8a, 0x17, 0x35, 0x55, 0xde, 0x1f, + 0x82, 0x18, 0x8c, 0xa7, 0xb6, 0xc0, 0x2c, 0x30, + 0x68, 0xde, 0x10, 0x96, 0x33, 0x61, 0x1b, 0xab, + 0x8b, 0x33, 0xc3, 0x02, 0x6f, 0x72, 0x86, 0x54, + 0x41, 0x8e, 0xba, 0xc0, 0x6f, 0x68, 0x06, 0xf9, + 0xa6, 0x68, 0x61, 0xb3, 0x05, 0xe8, 0x91, 0x34, + 0x92, 0x6b, 0x6d, 0xf7, 0x0f, 0xa0, 0x7f, 0x5c, + 0xcc, 0x79, 0xe4, 0x1c, 0x8d, 0x34, 0xc4, 0x13, + 0x07, 0x15, 0x60, 0xae, 0xb7, 0xca, 0x64, 0x2f, + 0x0a, 0xf5, 0x6d, 0x5d, 0xc7, 0xc1, 0xe3, 0x8e, + 0xec, 0x67, 0xac, 0x15, 0xb4, 0xb0, 0xb3, 0x4c, + 0x8a, 0x3c, 0xad, 0x91, 0xeb, 0x02, 0xa8, 0x02, + 0x3d, 0xfc, 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7, 0x24, 0x3f, 0x05, 0x6f, + 0x25, 0xd9, 0x19, 0x24, 0x3f, 0xca, 0xda, 0x63, + 0x85, 0xdc, 0x92, 0x86, 0x65, 0x48, 0x51, 0x9a, + 0xc6, 0x09, 0xcd, 0x05, 0x8f, 0x01, 0x68, 0x3e, + 0x4e, 0xbb, 0xc6, 0x82, 0xcc, 0xc2, 0xd8, 0xc0, + 0xb4, 0x57, 0x19, 0x58, 0x14, 0xa0, 0x75, 0x91, + 0x6b, 0x5b, 0x7c, 0xd6, 0xac, 0x5d, 0x71, 0x9a, + 0x4b, 0x59, 0xa5, 0x24, 0xcc, 0x40, 0x7a, 0x78, + 0x98, 0x1b, 0x34, 0x67, 0xa7, 0x49, 0x50, 0x8b, + 0x8f, 0xce, 0x09, 0x65, 0xc6, 0x3a, 0xea, 0xe1, + 0x95, 0xaa, 0xbf, 0xda, 0x96, 0x72, 0x5a, 0xcd, + 0x8d, 0xbe, 0x97, 0x6e, 0x71, 0xce, 0x09, 0x79, + 0x40, 0x02, 0xe4, 0x99, 0xf1, 0xe6, 0xd1, 0xb0, + 0x96, 0x89, 0xeb, 0xb7, 0xf9, 0x53, 0x7e, 0x5d, + 0xc3, 0x7f, 0x34, 0x32, 0xd5, 0x0b, 0x83, 0xcf, + 0xe6, 0x9b, 0x9b, 0x36, 0xad, 0x19, 0xb9, 0xe1, + 0x85, 0x16, 0x96, 0xd6, 0x7b, 0xf4, 0x20, 0xa3, + 0x75, 0x16, 0x2b, 0xc6, 0xda, 0xbb, 0x60, 0xd9, + 0x68, 0x22, 0x79, 0x95, 0xa8, 0x6a, 0xce, 0x65, + 0x83, 0xe6, 0x10, 0x24, 0x42, 0xc4, 0x99, 0x60, + 0xfd, 0xe3, 0x24, 0xcc, 0xcc, 0x52, 0x61, 0x63, + 0x8f, 0x8c, 0x1d, 0x54, 0x59, 0xb9, 0xe1, 0x8f, + 0x52, 0xef, 0xbf, 0x6d, 0xac, 0x94, 0x6a, 0x94, + 0x6b, 0x94,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8, 0x84, 0x61, 0x06, 0x8c, + 0x36, 0xa7, 0xf2, 0xbf, 0x09, 0xf6, 0x8c, 0xfd, + 0x2a, 0x76, 0x3a, 0x85, 0x6f, 0xba, 0x32, 0x52, + 0x75, 0x6e, 0xa5, 0xaf, 0xcf, 0x03, 0x51, 0xcc, + 0xf3, 0xf6, 0x58, 0xa7, 0xa8, 0xfd, 0x42, 0x65, + 0xe5, 0x5e, 0x8b, 0x78, 0x12, 0xf3, 0xac, 0x15, + 0xbf, 0x05, 0xf7, 0x2d, 0x4b, 0xae, 0x61, 0xa6, + 0xc6, 0x8a, 0x1a, 0x74, 0x87, 0xad, 0x93, 0x76, + 0xe7, 0x51, 0x71, 0xc2, 0x46, 0xa0, 0xe3, 0xe0, + 0xfd, 0xb9, 0x9f, 0x68, 0xdd, 0xbf, 0x2c, 0x7e, + 0xc7, 0x02, 0x30, 0x2c, 0x11, 0xc0, 0x0a, 0x44, + 0x1a, 0xe2, 0x70, 0x65, 0xf9, 0xab, 0x6c, 0xdd, + 0x83, 0x3d, 0x98, 0x89, 0x88, 0x61, 0x75, 0x7f, + 0x11, 0x2b, 0x6b, 0x16, 0x66, 0x8e, 0x9c, 0x93, + 0x8f, 0xf8, 0x24, 0x1f, 0x8b, 0x37, 0x3d, 0x66, + 0xc9, 0xba, 0xee, 0x93, 0xe7, 0x97, 0xc4, 0x8f, + 0x42, 0x1e, 0xe5, 0x57, 0x98, 0x9d, 0x67, 0x38, + 0x97, 0x94, 0x0d, 0x5d, 0x9d, 0x42, 0xba, 0x42, + 0xd8, 0x65, 0x90, 0x94, 0x3b, 0xbe, 0xe7, 0xad, + 0x4a, 0x14, 0xd6, 0xfa, 0x5c, 0xe0, 0x83, 0x8c, + 0x10, 0xd4, 0xb5, 0x2b, 0x09, 0xc8, 0x8a, 0xfc, + 0xdd, 0xad, 0xba, 0xad, 0x71, 0xf3, 0x04, 0x80, + 0xe0, 0xee, 0xa7, 0xcd, 0x4a, 0x03, 0x57, 0x98, + 0x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bb, 0x6a, 0x3e, 0xed, + 0xc0, 0xca, 0x3e, 0x40, 0x95, 0x07, 0x88, 0x6c, + 0x18, 0x6c, 0x65, 0x6a, 0x50, 0xbd, 0xf9, 0xae, + 0x0f, 0x5b, 0xe5, 0x62, 0xaf, 0x20, 0x76, 0x67, + 0x98, 0x03, 0x55, 0xf1, 0x55, 0xa9, 0x23, 0x28, + 0x80, 0x26, 0xf6, 0x68, 0x96, 0xf2, 0x29, 0xee, + 0x3b, 0x27, 0xad, 0x3d, 0xc2, 0x79, 0x21, 0x11, + 0x10, 0x76, 0x49, 0x45, 0xe2, 0x1a, 0x2b, 0xf4, + 0xbe, 0x44, 0x79, 0x79, 0xca, 0xc9, 0xa1, 0x81, + 0x9d, 0x63, 0x84, 0xd3, 0x8b, 0x25, 0xa8, 0x17, + 0xd2, 0x6f, 0xec, 0x4a, 0xa7, 0x3e, 0x1f, 0xa0, + 0xc6, 0x92, 0x6f, 0x9c, 0x37, 0xbd, 0x58, 0xd3, + 0x6a, 0xf1, 0x19, 0x58, 0x4a, 0x6a, 0xd9, 0x49, + 0x90, 0x2c, 0x3a, 0xa3, 0x53, 0x3a, 0xa1, 0x94, + 0x91, 0xb6, 0x0e, 0x82, 0xe4, 0xdc, 0xce, 0x9f, + 0xf1, 0x25, 0x56, 0x48, 0x12, 0x15, 0xff, 0x46, + 0x46, 0xa7, 0xa6, 0xee, 0x84, 0x57, 0xd1, 0xb1, + 0x96, 0x3a, 0x88, 0x64, 0xdf, 0xf6, 0x62, 0x8d, + 0x1a, 0xf2, 0x18, 0x32, 0x47, 0xe0, 0x58, 0x7d, + 0x6f, 0xc7, 0xed, 0x67, 0x90, 0x7d, 0xd3, 0x44, + 0x47, 0xf0, 0x66, 0x9f, 0x5d, 0xbd, 0xb5, 0xbd, + 0x5e, 0xb3, 0x8f, 0xb1, 0x3b, 0xb6, 0x2d, 0x20, + 0xc1, 0x6a, 0x0a, 0xf2, 0x38, 0x71, 0xb9, 0xcf, + 0xa2, 0x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49, 0x15, 0x99, + 0xd5, 0x31, 0xa3, 0x0b, 0xd6, 0xea, 0xef, 0x31, + 0xd6, 0x4b, 0xea, 0xa8, 0xad, 0x95, 0xb5, 0x85, + 0xb5, 0xb5, 0x5c, 0x34, 0xde, 0xac, 0xed, 0x28, + 0xc9, 0x76, 0x1d, 0xa7, 0x69, 0xe4, 0xc8, 0x6a, + 0x7c, 0x12, 0x1a, 0xb5, 0xde, 0x66, 0xf7, 0x70, + 0x63, 0x78, 0x06, 0xa9, 0x81, 0xb5, 0x6c, 0x59, + 0xd6, 0xdb, 0xee, 0xc3, 0x68, 0x4b, 0xa9, 0xfd, + 0x76, 0x75, 0xee, 0xed, 0x0e, 0x60, 0x4f, 0xf7, + 0xf4, 0xc0, 0x72, 0x4e, 0x3a, 0xf2, 0x7d, 0x91, + 0xed, 0xd3, 0x64, 0x92, 0x9d, 0x59, 0xf2, 0x6c, + 0x96, 0x98, 0xf1, 0xae, 0x63, 0x4d, 0xa5, 0x1c, + 0x6b, 0xc4, 0x93, 0xd6, 0x48, 0x1d, 0xd5, 0x04, + 0xd6, 0xd9, 0x9e, 0x45, 0x7d, 0x6a, 0x43, 0x59, + 0x1f, 0x63, 0xde, 0x02, 0x23, 0x28, 0x37, 0x93, + 0xfb, 0x67, 0x73, 0x72, 0x51, 0xf9, 0xd7, 0xb0, + 0xe8, 0xd0, 0x32, 0xa1, 0x4a, 0x23, 0x5a, 0x25, + 0xa8, 0x0d, 0x5e, 0x55, 0xf2, 0x3c, 0x18, 0x23, + 0x89, 0xc8, 0xbf, 0x10, 0xbd, 0x3f, 0x11, 0x11, + 0xb3, 0xbc, 0x55, 0x71, 0xc3, 0x4e, 0x53, 0x86, + 0x75, 0x26, 0xcd, 0xe7, 0xef, 0xd3, 0xe5, 0x59, + 0x14, 0x68, 0xa7, 0xec, 0xda, 0xcb, 0xe5, 0x60, + 0x2f, 0xdc, 0x38, 0x29, 0x31, 0xd8, 0xe5, 0x19, + 0xae, 0xc6, 0x0f, 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 0xbb, 0xe2, 0xfd, + 0xda, 0xae, 0x08, 0x9a, 0x31, 0xd6, 0x0c, 0x0b, + 0x11, 0x10, 0x24, 0xcd, 0xca, 0x08, 0x31, 0xb2, + 0x3e, 0x80, 0xac, 0xd9, 0x23, 0xf0, 0x63, 0x3f, + 0x3f, 0xc1, 0x18, 0x0a, 0x60, 0x6a, 0xd8, 0x05, + 0x4f, 0xe6, 0x1d, 0x39, 0x76, 0xcf, 0x5d, 0x79, + 0x72, 0x3b, 0xa1, 0x71, 0x33, 0x5a, 0x14, 0xf1, + 0xaf, 0x58, 0x71, 0x70, 0xff, 0x20, 0xb6, 0x79, + 0x45, 0x2b, 0xac, 0xec, 0xfc, 0xd3, 0x7a, 0x87, + 0xfc, 0x54, 0xe6, 0x96, 0xbe, 0xe4, 0x56, 0xbd, + 0x62, 0xab, 0x8e, 0x98, 0x7b, 0xe8, 0x21, 0x65, + 0xaf, 0x2f, 0xb7, 0x69, 0x0e, 0xe8, 0x79, 0x79, + 0x2d, 0xde, 0x2b, 0xed, 0x6c, 0xdc, 0xcc, 0x60, + 0x6b, 0x9e, 0x04, 0x1d, 0x3b, 0xe8, 0x94, 0xa3, + 0xac, 0xda, 0xfd, 0x6c, 0xda, 0xea, 0x88, 0xc1, + 0xfe, 0xe6, 0x53, 0xc5, 0xaf, 0x36, 0xaf, 0x92, + 0xaa, 0x9a, 0xd0, 0xe4, 0x73, 0x26, 0x4f, 0x05, + 0x3e, 0x4c, 0x50, 0x7f, 0x67, 0x5c, 0x4a, 0xa6, + 0x8a, 0x54, 0x47, 0x10, 0x43, 0x38, 0xe8, 0x79, + 0x31, 0x5e, 0x14, 0xe7, 0x5f, 0x27, 0x58, 0x73, + 0x55, 0x19, 0xa1, 0x18, 0x1b, 0x1f, 0x9e, 0x33, + 0x8c, 0x35, 0x70, 0xec, 0x39, 0xf8, 0x2a, 0xdf, + 0x3a, 0x39, 0x82, 0x1a, 0x30, 0x45, 0xab, 0xc1, + 0xaf, 0xf9, 0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00, 0x1b, 0x6b, 0xde, 0xbd, 0x6f, 0x71, + 0xd2, 0x9a, 0x09, 0xde, 0x3c, 0x8c, 0x1d, 0x98, + 0x17, 0x56, 0x34, 0x3c, 0xef, 0x00, 0x76, 0x90, + 0x1b, 0xc3, 0x6f, 0x16, 0x74, 0x0d, 0x52, 0x65, + 0xef, 0x82, 0xd7, 0xa0, 0xcb, 0x1e, 0x6b, 0xef, + 0xdf, 0xd0, 0xfe, 0xb6, 0xdf, 0xdc, 0x90, 0xb9, + 0x0f, 0x48, 0xdd, 0xc0, 0xbc, 0x2d, 0xa9, 0x6b, + 0xd0, 0x3c, 0x28, 0x39, 0xf6, 0x9b, 0xff, 0x17, + 0x09, 0x45, 0x3c, 0x28 +}; + +const unsigned char font_889f[] = { + 0x78, 0xda, 0x74, 0xbd, 0x3f, 0x78, 0xdb, 0x46, + 0xb6, 0x36, 0x0e, 0x52, 0xb0, 0x35, 0x94, 0x68, + 0x6b, 0x48, 0x82, 0x22, 0xf5, 0xc7, 0xe2, 0x88, + 0x82, 0x24, 0x88, 0xb2, 0x63, 0xf8, 0xbf, 0xec, + 0x48, 0x24, 0x6c, 0x33, 0x09, 0x64, 0x7b, 0xd7, + 0x88, 0x23, 0x6d, 0xfc, 0xdd, 0x9b, 0xbd, 0xa1, + 0xb3, 0xde, 0xbd, 0xbe, 0xf7, 0xd9, 0xef, 0x5b, + 0xc5, 0xf1, 0xfd, 0x2e, 0x9d, 0xd0, 0x22, 0x0b, + 0x15, 0x28, 0x52, 0xa0, 0x50, 0xe1, 0x62, 0x0b, + 0x16, 0x2a, 0x50, 0xa4, 0x50, 0xb1, 0x85, 0x8b, + 0x2d, 0x54, 0xa4, 0x60, 0x91, 0x42, 0x45, 0x8a, + 0x14, 0x5b, 0xe8, 0xf9, 0x1e, 0x17, 0x2a, 0xb6, + 0x60, 0xe1, 0x62, 0x0a, 0x14, 0xbf, 0x73, 0x66, + 0x00, 0x92, 0x72, 0xee, 0xcf, 0xf3, 0x40, 0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0xbc, 0x86, 0x17, 0xd5, 0x9a, 0xe5, + 0xe3, 0x1e, 0xad, 0xc5, 0xba, 0x67, 0x1f, 0x7c, + 0xc3, 0xa9, 0x95, 0x81, 0x23, 0x17, 0xe4, 0xad, + 0x05, 0xeb, 0x36, 0x5c, 0x8d, 0x6a, 0x35, 0x03, + 0xb8, 0x06, 0x96, 0x32, 0x46, 0x3a, 0xaa, 0x53, + 0xe8, 0x3e, 0x49, 0x16, 0xba, 0x31, 0x25, 0xde, + 0x4a, 0xd6, 0xcc, 0x3c, 0x9e, 0x95, 0xe7, 0xe1, + 0x68, 0x55, 0xb8, 0xee, 0xea, 0xae, 0x51, 0x37, + 0xe1, 0xa3, 0x2a, 0x62, 0xae, 0x54, 0x6b, 0xa2, + 0xfb, 0x7f, 0x59, 0xaa, 0x9b, 0x72, 0x5e, 0xc1, + 0x31, 0xc5, 0xaf, 0xdb, 0x37, 0xf8, 0x23, 0x3b, + 0x13, 0xd0, 0x2a, 0x5d, 0x15, 0xb3, 0xc1, 0xe3, + 0xad, 0x42, 0x37, 0xed, 0x15, 0xba, 0xf1, 0x56, + 0x33, 0x88, 0x29, 0x9a, 0xa7, 0xb9, 0xba, 0x5e, + 0xd5, 0x87, 0x8e, 0xe0, 0x8e, 0x94, 0x0c, 0x4f, + 0x93, 0x26, 0x4f, 0xe3, 0xf7, 0xda, 0xa4, 0xf7, + 0xcd, 0xb1, 0x66, 0xe5, 0x78, 0x1e, 0xae, 0xcc, + 0x54, 0xf0, 0xec, 0x28, 0x1f, 0x21, 0x77, 0x79, + 0x51, 0x99, 0x0b, 0xe2, 0x4e, 0xfc, 0x75, 0xe6, + 0x6d, 0xda, 0x9a, 0xe7, 0xba, 0xf5, 0x30, 0xb0, + 0x70, 0x15, 0x14, 0xc2, 0x89, 0x4b, 0xdc, 0x6d, + 0x77, 0x84, 0x8f, 0xb8, 0x62, 0xf0, 0x74, 0x2b, + 0xad, 0x16, 0xd5, 0xe8, 0x8e, 0x4e, 0x59, 0x63, + 0x47, 0x71, 0x98, 0x4b, 0x98, 0xe7, 0x23, 0xc5, + 0x1a, 0xeb, 0x12, 0xf8, 0x9d, 0x62, 0xc1, 0xe8, + 0xdd, 0x11, 0xde, 0x41, 0xa1, 0x4b, 0xe1, 0x1f, + 0x7c, 0x85, 0xcf, 0x63, 0x8a, 0x25, 0xd7, 0xd7, + 0x9c, 0xb1, 0xe7, 0xdf, 0x6d, 0xb3, 0xe5, 0xa0, + 0xec, 0x94, 0x5e, 0x57, 0x9e, 0xaa, 0xf4, 0xf2, + 0xd3, 0x12, 0x31, 0xcc, 0xdb, 0x07, 0x72, 0x9e, + 0x13, 0xc1, 0xb6, 0x4b, 0xec, 0x69, 0x67, 0x2a, + 0x98, 0x64, 0x06, 0x5b, 0x0a, 0x6c, 0x39, 0xf7, + 0x62, 0xf9, 0x0b, 0x01, 0xac, 0x93, 0x18, 0x39, + 0x2e, 0xbf, 0x33, 0x18, 0x0f, 0x7b, 0x92, 0xd3, + 0x74, 0x88, 0x5b, 0xd9, 0x28, 0x9a, 0x65, 0xaf, + 0xe8, 0x94, 0x1d, 0x32, 0xdd, 0xec, 0x12, 0x8a, + 0x43, 0xcc, 0x46, 0x37, 0x45, 0x5f, 0xb1, 0x14, + 0x4b, 0xf1, 0x94, 0x7b, 0xce, 0x7d, 0xee, 0xa4, + 0x9d, 0x34, 0xd3, 0x9c, 0xac, 0x5b, 0x56, 0x23, + 0xc9, 0xb1, 0x55, 0x5b, 0x3d, 0xcb, 0xd3, 0x6e, + 0xda, 0x2d, 0xb9, 0xd5, 0x7d, 0xb5, 0x45, 0x76, + 0xe8, 0x4e, 0xad, 0x31, 0x38, 0x1b, 0x69, 0x71, + 0x76, 0x15, 0xd6, 0xe9, 0x34, 0xfc, 0x3f, 0x13, + 0xd4, 0x7a, 0x12, 0x5b, 0x86, 0xfb, 0x29, 0xb5, + 0x4a, 0xad, 0x72, 0xcb, 0x68, 0x25, 0x5b, 0x23, + 0xad, 0xb1, 0xd6, 0x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x82, 0xd2, + 0x2a, 0x04, 0x29, 0x58, 0xa9, 0x74, 0x5b, 0xf3, + 0x0a, 0x81, 0xe6, 0xe5, 0x40, 0x0b, 0x2c, 0x76, + 0xad, 0x1d, 0xa5, 0x21, 0xdf, 0x39, 0x17, 0x34, + 0x54, 0xad, 0x2a, 0x76, 0x88, 0xb7, 0xe5, 0xa5, + 0xbc, 0x54, 0x8d, 0x9a, 0xb4, 0x73, 0x03, 0xaf, + 0x0a, 0xe4, 0xe7, 0x3b, 0xbe, 0x4e, 0xed, 0xf6, + 0xc3, 0xa0, 0xae, 0xac, 0x77, 0xd7, 0x29, 0x1e, + 0x2f, 0x69, 0xac, 0xab, 0x0c, 0x7c, 0xee, 0x97, + 0xef, 0xe0, 0x13, 0x5b, 0x43, 0xb5, 0x73, 0x74, + 0xf0, 0x9a, 0x15, 0xa5, 0xcc, 0x8b, 0x6e, 0x99, + 0x97, 0xf9, 0x2c, 0xb9, 0x78, 0x5c, 0x74, 0x61, + 0x2f, 0xd9, 0x8b, 0x1d, 0x3c, 0x50, 0x33, 0x68, + 0xb0, 0x06, 0xcd, 0x20, 0xab, 0x9e, 0xd3, 0x09, + 0xab, 0x04, 0x25, 0xbb, 0x6c, 0x93, 0xee, 0xb6, + 0x07, 0x8a, 0xa4, 0x9a, 0xd8, 0x89, 0xde, 0x79, + 0xa8, 0x75, 0xca, 0x9a, 0x30, 0x9f, 0x24, 0x63, + 0xa1, 0xd4, 0xa2, 0xdc, 0xe2, 0xfb, 0xe2, 0x4f, + 0x69, 0xb8, 0x7b, 0xea, 0xc1, 0x90, 0xff, 0xcc, + 0x71, 0x23, 0x6f, 0x3f, 0xd9, 0xc1, 0x99, 0x24, + 0xb0, 0x8f, 0x88, 0x4d, 0x6d, 0xd8, 0x55, 0xb6, + 0x63, 0xe3, 0xce, 0x87, 0x01, 0x72, 0x99, 0x52, + 0xd2, 0x28, 0x1b, 0x2d, 0x1c, 0x14, 0x66, 0xc4, + 0xa4, 0x8f, 0xe4, 0x1c, 0x82, 0x04, 0x52, 0x0b, + 0xe4, 0x18, 0xcf, 0x5a, 0x38, 0x40, 0xcf, 0xb4, + 0xcc, 0xce, 0xa7, 0x76, 0xc6, 0xc9, 0xa2, 0x74, + 0xd2, 0x94, 0x93, 0x72, 0xc7, 0xf1, 0x9d, 0xad, + 0xd1, 0x2e, 0xf1, 0xe0, 0xac, 0x72, 0xa5, 0xfb, + 0x88, 0x66, 0xba, 0x94, 0xc1, 0x3e, 0x66, 0xf0, + 0x4a, 0x46, 0x99, 0xdc, 0xfb, 0x8c, 0x14, 0xed, + 0xa2, 0x0d, 0x77, 0x0b, 0x5f, 0x2b, 0xbc, 0x68, + 0xeb, 0xb6, 0x61, 0x4b, 0xbd, 0x21, 0xef, 0x28, + 0xa6, 0x54, 0xba, 0x31, 0x5a, 0xe9, 0xce, 0x82, + 0xd6, 0x9c, 0x53, 0xe3, 0x3b, 0xea, 0xe3, 0xbc, + 0x59, 0x13, 0x9a, 0xb0, 0x70, 0x20, 0xef, 0x18, + 0x67, 0x4f, 0xae, 0xe2, 0x98, 0x45, 0x0f, 0x86, + 0xcc, 0x55, 0x5c, 0x41, 0x47, 0xb1, 0xe1, 0x53, + 0xac, 0x42, 0x27, 0x6d, 0x17, 0x3a, 0xda, 0xa1, + 0xb6, 0x5f, 0x30, 0x53, 0x7a, 0xf1, 0xe7, 0xf3, + 0xdf, 0x5b, 0xb8, 0x46, 0xa4, 0x42, 0x66, 0xe1, + 0x60, 0x41, 0x99, 0x30, 0xbb, 0x62, 0xe8, 0xc6, + 0x07, 0xe4, 0x02, 0xb9, 0x46, 0xaa, 0x24, 0x09, + 0xf3, 0x8c, 0x73, 0x94, 0x62, 0x13, 0xc1, 0x0d, + 0x76, 0x8d, 0x5d, 0xe2, 0x9f, 0xca, 0xdd, 0x86, + 0x5f, 0x03, 0x29, 0x39, 0x15, 0x8e, 0xba, 0x41, + 0x6a, 0x68, 0x79, 0xcc, 0x13, 0x7d, 0x47, 0xea, + 0x2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xc2, 0x3c, 0x8b, 0x43, 0xea, + 0xd1, 0xe8, 0x40, 0xcd, 0x20, 0x34, 0x6c, 0x4d, + 0xae, 0x22, 0x4a, 0xed, 0x57, 0x49, 0xbc, 0x32, + 0xdc, 0x15, 0xab, 0x54, 0xae, 0xbe, 0x5c, 0xff, + 0x21, 0xa2, 0xba, 0xd3, 0xde, 0xd3, 0x1a, 0x5c, + 0x35, 0x3b, 0xe5, 0x9d, 0x26, 0x2b, 0x62, 0xef, + 0xaf, 0x05, 0x31, 0x1d, 0xce, 0xea, 0x6b, 0xb0, + 0x12, 0xab, 0x5c, 0x11, 0xfa, 0x4c, 0xe7, 0xab, + 0xae, 0xf2, 0x1a, 0xf7, 0xe0, 0x5c, 0x97, 0x82, + 0xd4, 0xc5, 0x40, 0x72, 0xbe, 0x06, 0x99, 0xc3, + 0xf5, 0x83, 0x9d, 0xca, 0x16, 0x18, 0x6a, 0x7e, + 0x3c, 0x9b, 0x76, 0x32, 0xdd, 0xb1, 0x20, 0x4e, + 0xbf, 0xe9, 0xa6, 0x41, 0x2a, 0xf1, 0x98, 0xa2, + 0x0b, 0x44, 0x9c, 0x85, 0x6b, 0x2e, 0x2a, 0x45, + 0x65, 0xb1, 0xab, 0x83, 0x16, 0x84, 0x6b, 0xb7, + 0x66, 0x59, 0x91, 0x9e, 0x07, 0x71, 0xad, 0x04, + 0xd2, 0x2e, 0xe0, 0x90, 0x73, 0x28, 0x6d, 0x04, + 0xca, 0x3f, 0xb5, 0x98, 0xd5, 0x97, 0xd8, 0xb8, + 0x35, 0x69, 0xa9, 0xde, 0x10, 0xac, 0x54, 0xf2, + 0x20, 0x05, 0x3a, 0x25, 0x4f, 0x6a, 0x38, 0x59, + 0x16, 0x75, 0x70, 0x8f, 0x51, 0xab, 0xd9, 0x49, + 0x77, 0xd2, 0x7e, 0xc6, 0x1f, 0x37, 0xf3, 0xbb, + 0x7f, 0xb8, 0x9a, 0x7c, 0xa0, 0xf4, 0xf6, 0x6f, + 0x9c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, 0x94, 0x63, 0x48, + 0x58, 0xf6, 0x04, 0x9f, 0x01, 0x4d, 0xd1, 0xe4, + 0xcb, 0xac, 0xc2, 0x4b, 0x76, 0xe5, 0x99, 0xfa, + 0xcb, 0xe5, 0x5f, 0x96, 0x9f, 0x19, 0xf6, 0xed, + 0x7d, 0xf8, 0x5c, 0x98, 0x7f, 0xd5, 0x24, 0xcf, + 0x9a, 0x3b, 0x12, 0xb1, 0x49, 0xed, 0x45, 0x77, + 0xd8, 0x8e, 0xd5, 0xc0, 0xfb, 0x3d, 0xad, 0xac, + 0x70, 0xe6, 0x32, 0xb7, 0xec, 0x32, 0x37, 0xfc, + 0xde, 0x45, 0x8d, 0x0f, 0x03, 0xfe, 0x0d, 0xf1, + 0x6f, 0xed, 0x7b, 0x30, 0x00, 0xd9, 0xe1, 0x77, + 0xff, 0xde, 0xeb, 0xef, 0xf2, 0x71, 0x31, 0x17, + 0xfd, 0xfd, 0x7b, 0x52, 0x96, 0x0b, 0xdd, 0xd3, + 0xb5, 0x15, 0xb1, 0x07, 0x9b, 0xfc, 0x0e, 0xc1, + 0x21, 0xbf, 0x7f, 0x44, 0x6c, 0xd7, 0x79, 0x86, + 0xe2, 0x81, 0x98, 0x91, 0x02, 0x22, 0x4b, 0xd9, + 0x29, 0xfb, 0x95, 0x3d, 0xcf, 0xe7, 0xed, 0x79, + 0xfb, 0xe5, 0xb3, 0xf5, 0xd7, 0x67, 0x5e, 0x67, + 0xc9, 0xac, 0xb4, 0x74, 0xb4, 0x49, 0x63, 0x30, + 0x2a, 0xa8, 0x18, 0xe1, 0x6b, 0x2c, 0x1c, 0x71, + 0x3a, 0x4d, 0xa5, 0x8e, 0xd5, 0x40, 0xa6, 0x96, + 0x82, 0xed, 0xbd, 0x39, 0xa3, 0x0c, 0x6b, 0x51, + 0xae, 0x19, 0x8e, 0xee, 0x7d, 0x48, 0xbe, 0x82, + 0xb9, 0xa2, 0x49, 0xf2, 0x62, 0x6c, 0xa7, 0xea, + 0x16,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, + 0x37, 0xcc, 0x35, 0x92, 0x05, 0x64, 0x87, 0xde, + 0x4a, 0x95, 0x54, 0xf3, 0x02, 0x23, 0xf1, 0xad, + 0xd6, 0xe7, 0xc1, 0x06, 0xff, 0xdc, 0xdd, 0xa8, + 0x6f, 0xb4, 0x7f, 0xe7, 0xff, 0x97, 0x9f, 0xd8, + 0x27, 0xed, 0x5c, 0xa8, 0x61, 0x62, 0x7c, 0x8d, + 0xcc, 0xc3, 0xaa, 0xcf, 0xf7, 0xbe, 0xae, 0x71, + 0xc5, 0x03, 0x6f, 0x06, 0xd6, 0x37, 0xed, 0xbd, + 0x0a, 0x6e, 0xbd, 0xd9, 0xfc, 0x59, 0xa2, 0xfe, + 0x32, 0x9d, 0x0b, 0xca, 0x5e, 0xd9, 0xd1, 0x9d, + 0x32, 0xad, 0x45, 0x76, 0xc1, 0x12, 0x16, 0x3a, + 0x60, 0xe4, 0x03, 0x9b, 0x19, 0x15, 0x61, 0x9f, + 0x37, 0x85, 0x75, 0x46, 0xc9, 0x99, 0x01, 0x49, + 0xd9, 0x76, 0x97, 0x83, 0xca, 0x06, 0xe0, 0x6f, + 0x45, 0xe5, 0x97, 0x9d, 0x12, 0x33, 0x0e, 0xef, + 0x26, 0x05, 0x36, 0xb3, 0x53, 0x9c, 0x3a, 0x0d, + 0x07, 0xa4, 0x95, 0xe9, 0x07, 0xf5, 0xd7, 0xeb, + 0x47, 0x67, 0x5b, 0x5a, 0xb8, 0xf7, 0xd1, 0xf3, + 0x62, 0xca, 0xc5, 0xfa, 0x92, 0x73, 0xd1, 0x81, + 0x23, 0x30, 0xcc, 0x92, 0xb9, 0xe4, 0x2c, 0x6f, + 0x3c, 0xd8, 0xbd, 0x84, 0xaf, 0x75, 0x88, 0x3d, + 0x16, 0x58, 0xd6, 0x1c, 0xa0, 0x90, 0xb8, 0x0d, + 0x9e, 0x85, 0x3d, 0x02, 0x3a, 0x2d, 0x0d, 0xb8, + 0xa4, 0xf8, 0x58, 0x4c, 0x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, + 0x81, 0xab, 0x60, 0x63, 0x56, 0xec, 0xa8, 0x8c, + 0x92, 0x43, 0x0b, 0x80, 0x20, 0x0b, 0x2c, 0x65, + 0x17, 0x88, 0x4a, 0x9b, 0x5e, 0x4a, 0x2f, 0xa8, + 0x59, 0x02, 0x3e, 0x9f, 0x97, 0x64, 0x12, 0x3f, + 0xd7, 0x2d, 0xa9, 0x7d, 0xbf, 0xb5, 0x41, 0x03, + 0x58, 0xe8, 0x59, 0x83, 0x26, 0x14, 0x92, 0x13, + 0x13, 0x48, 0x46, 0x62, 0x19, 0xf8, 0xca, 0x71, + 0x66, 0x95, 0x83, 0xa1, 0xea, 0xea, 0x55, 0xd8, + 0x60, 0x78, 0x55, 0xe1, 0x75, 0xdd, 0x56, 0x4f, + 0xa2, 0x61, 0x44, 0xd7, 0x43, 0x28, 0xb3, 0xca, + 0x98, 0x12, 0x23, 0x31, 0xb7, 0xe9, 0x9d, 0xaa, + 0x9d, 0xb2, 0x12, 0x80, 0x54, 0xf1, 0x2c, 0x6a, + 0x06, 0x7a, 0x00, 0x77, 0xa2, 0xdc, 0x3d, 0x60, + 0x36, 0xb3, 0x87, 0xbb, 0xf4, 0x08, 0xd6, 0xd6, + 0x01, 0x34, 0x5a, 0xb5, 0x2c, 0xeb, 0x00, 0xe5, + 0x0a, 0x90, 0x2c, 0xbf, 0x03, 0xf3, 0x34, 0xc7, + 0x51, 0x36, 0x00, 0x15, 0x99, 0xa0, 0xa8, 0x7f, + 0x5e, 0x4c, 0x32, 0xbc, 0x2a, 0xd0, 0xd4, 0xcd, + 0x00, 0xd0, 0x35, 0xcc, 0xec, 0x36, 0x68, 0x0e, + 0xb4, 0xf1, 0xd3, 0xb5, 0x5a, 0x28, 0xed, 0xb0, + 0x2a, 0x07, 0xc2, 0xc3, 0xe0, 0x49, 0x37, 0x03, + 0xba, 0xe5, 0xc1, 0x96, 0xf4, 0x59, 0xe4, 0x0e, + 0x65, 0xca, 0x7c, 0xb0, 0xc2, 0x8a,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 0x71, 0x36, 0x15, 0x7c, + 0x75, 0x18, 0x37, 0xe3, 0x9d, 0xa1, 0xa0, 0x87, + 0x18, 0x85, 0xff, 0xd3, 0xc7, 0xf7, 0x31, 0x35, + 0xa6, 0x2a, 0x81, 0x12, 0x5a, 0x41, 0xdc, 0x9f, + 0x12, 0xb3, 0xc4, 0x84, 0x87, 0x74, 0xb6, 0x35, + 0x74, 0xb0, 0x2a, 0x74, 0x4e, 0x7d, 0x1a, 0x74, + 0x02, 0x80, 0x8d, 0x35, 0x76, 0x6a, 0x05, 0xac, + 0x02, 0xcb, 0xc2, 0x7b, 0xe7, 0x15, 0x69, 0xcb, + 0x40, 0xc7, 0x2a, 0x05, 0x9e, 0x02, 0x3f, 0xfc, + 0xe3, 0x7d, 0x75, 0x27, 0xdf, 0x78, 0x72, 0x32, + 0x26, 0x83, 0x1a, 0x24, 0x68, 0xb4, 0x53, 0x0e, + 0xf8, 0x56, 0xa0, 0x41, 0xae, 0x60, 0x34, 0x07, + 0x2d, 0x63, 0xd5, 0x5c, 0x85, 0xb3, 0xe0, 0xf5, + 0x67, 0x3a, 0xdb, 0x76, 0x8a, 0xc2, 0xef, 0xc0, + 0x67, 0xfc, 0x1a, 0x70, 0x4f, 0xda, 0xd3, 0x6a, + 0xf9, 0xee, 0x15, 0x94, 0x1c, 0xb8, 0x96, 0x04, + 0xbb, 0xcd, 0x66, 0x69, 0x11, 0x76, 0x74, 0xee, + 0x1d, 0xa0, 0x4b, 0xf8, 0xa9, 0x48, 0xef, 0x76, + 0x2d, 0x25, 0x92, 0xab, 0xaa, 0x7a, 0x11, 0xf0, + 0xcb, 0x90, 0xd0, 0x74, 0x69, 0xd8, 0x6f, 0xcc, + 0xbb, 0x4b, 0x1e, 0x88, 0x5d, 0x86, 0xbb, 0x3b, + 0xa3, 0xc4, 0x0f, 0x92, 0xe6, 0x25, 0x12, 0x03, + 0x69, 0xcf, 0xb0, 0x62, 0x4f, 0xda, 0x11, 0x23, + 0x8d, 0xd4, 0x47, 0xdc, 0x65, 0x7a, 0x9e, 0x2d, + 0x09, 0x9c, 0x79, 0xa6, 0x9e, 0xb1, 0x33, 0xf6, + 0x6c, 0xfd, 0xb6, 0x50, 0xde, 0xb0, 0x27, 0xdb, + 0x39, 0x7e, 0xdd, 0xbf, 0xe5, 0x83, 0xe4, 0x58, + 0x79, 0x2b, 0x07, 0x78, 0x84, 0x59, 0x9f, 0x04, + 0xca, 0x00, 0x16, 0x1d, 0x7b, 0x5b, 0x37, 0x46, + 0xf7, 0x27, 0xdb, 0xff, 0xb9, 0x37, 0xfa, 0x57, + 0xcd, 0x03, 0xcd, 0x5f, 0xb5, 0x84, 0x0f, 0x7b, + 0x9f, 0x9b, 0x22, 0xe2, 0xb4, 0x0e, 0x96, 0x77, + 0xa2, 0x6b, 0x74, 0x1e, 0xda, 0x09, 0x33, 0x41, + 0x2f, 0x75, 0xd0, 0xc3, 0x05, 0x5c, 0xd7, 0xd5, + 0xe8, 0x1f, 0x01, 0x85, 0x4c, 0x05, 0xba, 0xd5, + 0x78, 0x9b, 0x79, 0xb6, 0xb2, 0x7f, 0x63, 0xeb, + 0xaa, 0xff, 0x99, 0x4e, 0x0f, 0xd0, 0x67, 0x6f, + 0xb2, 0xcd, 0x7a, 0xd3, 0xdb, 0x64, 0x80, 0x73, + 0xfc, 0xa6, 0x0f, 0xfa, 0xb0, 0x55, 0x6e, 0xe9, + 0x3b, 0x33, 0x22, 0x26, 0xd3, 0xd3, 0xcf, 0xc2, + 0xa6, 0xa5, 0x01, 0x15, 0x6c, 0xec, 0x27, 0x45, + 0xc4, 0x86, 0x35, 0x7a, 0x76, 0x90, 0xa3, 0x2d, + 0x11, 0x91, 0x00, 0x90, 0x8d, 0x0f, 0xec, 0x62, + 0x24, 0x1b, 0xd6, 0x9c, 0xb0, 0x03, 0x88, 0x58, + 0x9f, 0x13, 0x98, 0x6b, 0x37, 0x75, 0x38, 0xb3, + 0x9f, 0x77, 0x17, 0x5a, 0x62, 0x05, 0xb7, 0x08, + 0x85, 0x3b, 0xf0, 0x8a, 0xee, 0xef, 0x49, 0x42, + 0x85, 0xfd, 0x0b, 0x6b, 0x39, 0xed, 0xe6, 0xdd, + 0xb3, 0x7c, 0x4b, 0x68, 0xfe, 0x02, 0x7f, 0xee, + 0x26, 0xf7, 0xf3, 0x3b, 0x5f, 0x35, 0xc6, 0x0e, + 0x60, 0xce, 0x39, 0xe2, 0xa0, 0x2c, 0xe0, 0x15, + 0x44, 0x41, 0x31, 0x8c, 0xe8, 0x80, 0xdc, 0x35, + 0xbb, 0x59, 0x11, 0x2d, 0xc9, 0xf1, 0x49, 0xff, + 0x2b, 0x3f, 0xee, 0x0f, 0xc6, 0x36, 0x9b, 0xe0, + 0x89, 0x10, 0x77, 0xac, 0x3a, 0xc2, 0x46, 0x18, + 0x48, 0xa8, 0x55, 0x64, 0x77, 0x68, 0x92, 0xca, + 0x88, 0x1c, 0x01, 0x95, 0xb9, 0x18, 0x30, 0xd0, + 0x02, 0x09, 0x8e, 0xce, 0x2b, 0x06, 0xaf, 0xe0, + 0x25, 0x02, 0xf5, 0x2d, 0x73, 0x8c, 0x5b, 0x2c, + 0x83, 0x76, 0x1f, 0x01, 0x2f, 0x1f, 0x75, 0x6a, + 0xd2, 0xce, 0xbb, 0x4f, 0xc8, 0x69, 0x21, 0x93, + 0xab, 0x75, 0xdd, 0x8e, 0xc6, 0x62, 0xe7, 0x24, + 0x1a, 0x91, 0x18, 0x2e, 0xd2, 0x73, 0xa8, 0xe9, + 0x86, 0x94, 0xbe, 0xae, 0x43, 0x5c, 0x57, 0xe8, + 0x4e, 0x38, 0x59, 0x27, 0x0b, 0x88, 0x22, 0xe3, + 0x65, 0x9d, 0x09, 0x13, 0xf7, 0x86, 0x8c, 0x4f, + 0x82, 0x07, 0x00, 0x32, 0xbb, 0x18, 0x54, 0x85, + 0xaf, 0x36, 0xc5, 0x0d, 0xcb, 0x16, 0x3f, 0x8d, + 0x09, 0x1f, 0x56, 0x46, 0x7b, 0x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, 0x58, 0x68, 0x95, 0x02, 0x73, 0x63, 0xf6, + 0x87, 0x4a, 0xb5, 0x18, 0xc6, 0x81, 0x65, 0x74, + 0x24, 0x76, 0x22, 0xe2, 0x00, 0x6b, 0x44, 0x42, + 0xdd, 0x8e, 0x6b, 0xeb, 0xa2, 0x4c, 0x2f, 0x19, + 0x38, 0x04, 0x42, 0x12, 0x9a, 0x90, 0x8a, 0x15, + 0xb9, 0xcb, 0x31, 0x0e, 0x14, 0x07, 0xe9, 0x00, + 0xfc, 0x25, 0x66, 0x99, 0x09, 0xcf, 0x3a, 0xda, + 0x29, 0x2a, 0xbb, 0x6a, 0x10, 0x3f, 0xbf, 0xff, + 0x47, 0x76, 0xa6, 0xa6, 0x39, 0x4f, 0xbd, 0x53, + 0xc2, 0x2e, 0xa0, 0x1c, 0x21, 0xf2, 0xa4, 0xca, + 0xa5, 0xee, 0xa7, 0x20, 0xb3, 0x18, 0xe5, 0xcb, + 0xda, 0x59, 0x7d, 0x42, 0xa3, 0x02, 0x8d, 0x14, + 0x38, 0x25, 0x70, 0xa0, 0x4e, 0xb3, 0xd2, 0x66, + 0xa1, 0x43, 0x5b, 0x8b, 0x5d, 0xd6, 0xfa, 0x52, + 0xae, 0x11, 0xd8, 0xec, 0x14, 0xcd, 0x05, 0x2b, + 0xca, 0xb5, 0xee, 0x35, 0xfa, 0xe9, 0xfb, 0xaf, + 0x65, 0x95, 0x40, 0xf7, 0x16, 0x83, 0x55, 0x05, + 0x31, 0xec, 0x1a, 0xe2, 0x58, 0xae, 0xfb, 0xf3, + 0x7b, 0x0b, 0xbb, 0x0f, 0xb6, 0xa4, 0x6c, 0x50, + 0xaf, 0x51, 0x43, 0xd9, 0xb8, 0x05, 0xab, 0x7b, + 0xdd, 0xc6, 0xf5, 0x45, 0x39, 0x49, 0x3f, 0x96, + 0x1a, 0xc9, 0x80, 0x51, 0xb6, 0x96, 0x84, 0xc4, + 0x9d, 0x05, 0x5c, 0x83, 0xbf, 0x1b, 0x95, 0x52, + 0xa7, 0x54, 0x8e, 0x00, 0xeb, 0xb4, 0x50, 0x72, + 0xd1, 0x8f, 0xa1, 0x8a, 0x94, 0xf6, 0x82, 0x90, + 0x76, 0xf4, 0x59, 0xc7, 0xf0, 0x6a, 0xdb, 0x57, + 0x5f, 0x7f, 0xf9, 0x0e, 0xe3, 0x8f, 0x78, 0x50, + 0xd0, 0x0c, 0xb4, 0x21, 0xdd, 0xa3, 0x02, 0xcc, + 0x64, 0xd5, 0x6e, 0x76, 0x54, 0x7b, 0x51, 0xee, + 0x97, 0xad, 0x55, 0xab, 0x26, 0x62, 0xd7, 0xfd, + 0x68, 0x4f, 0xfa, 0x70, 0xda, 0x44, 0xe9, 0x38, + 0x19, 0x51, 0x47, 0x54, 0x7f, 0xb7, 0x5b, 0xa4, + 0x73, 0x42, 0xba, 0x73, 0x5c, 0xa0, 0x7a, 0x43, + 0x7a, 0x8b, 0x6a, 0x7e, 0xea, 0xf8, 0x39, 0xe8, + 0xee, 0x14, 0x6f, 0x90, 0x14, 0xcf, 0x93, 0x6b, + 0xfc, 0xaa, 0xf5, 0xc8, 0x4f, 0xef, 0x68, 0xbb, + 0x74, 0x4b, 0xee, 0x41, 0xd8, 0xb5, 0xec, 0x64, + 0xfc, 0x4b, 0x7a, 0xc4, 0x03, 0xf8, 0xb5, 0x15, + 0xb3, 0x62, 0x4c, 0xf8, 0xaf, 0x3d, 0xb9, 0x84, + 0x77, 0x46, 0x5f, 0x1c, 0xb0, 0x04, 0xf1, 0xf2, + 0x6d, 0xe3, 0xc0, 0x6e, 0xc9, 0xa8, 0x22, 0xd9, + 0x81, 0xd1, 0x90, 0x16, 0x76, 0x44, 0xc1, 0x28, + 0xff, 0x65, 0xf7, 0x91, 0x9b, 0x96, 0x71, 0x6d, + 0xa6, 0x39, 0x13, 0x32, 0x8a, 0x88, 0x9e, 0x1a, + 0x68, 0x91, 0x4c, 0xe7, 0x32, 0xcc, 0x30, 0xce, + 0x6f, 0xa6, 0x43, 0x65, 0x50, 0x1c, 0x24, 0x67, + 0x04, 0xc7, 0x4a, 0xc1, 0x4f, 0xfb, 0x97, 0x7d, + 0xb8, 0x56, 0x31, 0x34, 0x18, 0x13, 0x6f, 0x24, + 0xca, 0x85, 0xd7, 0xb6, 0x71, 0x27, 0x82, 0x9d, + 0x0a, 0xcf, 0xe2, 0x08, 0x31, 0xb0, 0x58, 0x11, + 0xb4, 0x5e, 0xa6, 0x25, 0x76, 0x81, 0x25, 0xa3, + 0x9f, 0x39, 0x19, 0xdb, 0x94, 0xa3, 0xd1, 0xac, + 0x26, 0x7a, 0x23, 0x55, 0x4d, 0x35, 0x66, 0x95, + 0x8f, 0xa3, 0x68, 0x0a, 0x15, 0x68, 0x36, 0x1c, + 0x05, 0xe9, 0xa3, 0x0a, 0x2f, 0x35, 0x26, 0x76, + 0x28, 0xa2, 0x61, 0x39, 0x4f, 0x42, 0x7e, 0x95, + 0x4a, 0x3d, 0x61, 0x5f, 0xa9, 0x47, 0x73, 0x35, + 0x18, 0xe7, 0x19, 0x3b, 0x5a, 0xb5, 0x86, 0xa2, + 0x3c, 0x8e, 0xb0, 0xb0, 0x69, 0xb5, 0xf9, 0x4e, + 0xb7, 0xf4, 0xb7, 0x8b, 0xcf, 0xea, 0xfb, 0xf7, + 0xb7, 0x92, 0x7e, 0x4e, 0xaf, 0x31, 0xe5, 0xa0, + 0xef, 0xe1, 0x7e, 0xf9, 0x2e, 0xae, 0x9c, 0xb1, + 0xaf, 0x74, 0xce, 0xec, 0x5f, 0x6e, 0xab, 0x5e, + 0xde, 0xad, 0xed, 0x48, 0x0f, 0x57, 0x9e, 0x53, + 0x7b, 0xef, 0xde, 0x0c, 0xc6, 0x8e, 0x9e, 0x7f, + 0xa1, 0x5a, 0x13, 0x80, 0x7e, 0xe3, 0x34, 0xe9, + 0xad, 0x80, 0xee, 0x4e, 0xd0, 0x6d, 0x8f, 0x78, + 0xd3, 0xd3, 0x93, 0x5b, 0xcb, 0x9e, 0x4d, 0xa3, + 0xfc, 0x82, 0xa2, 0x0c, 0xbf, 0x79, 0xe1, 0x6e, + 0xb8, 0x9f, 0xbf, 0xd9, 0x50, 0x5e, 0x28, 0x9f, + 0xd7, 0x37, 0xec, 0x0d, 0xe3, 0x73, 0xf3, 0x05, + 0x55, 0x0d, 0xf5, 0xc7, 0x48, 0xae, 0x7a, 0x38, + 0xe3, 0x04, 0xbe, 0x16, 0x32, 0x89, 0x38, 0x45, + 0x58, 0xb1, 0xdf, 0xf0, 0xf7, 0xcf, 0x2a, 0x56, + 0xd3, 0x8a, 0x5b, 0xb7, 0xac, 0x52, 0x70, 0xcb, + 0x1f, 0x32, 0x9b, 0xe0, 0xab, 0xde, 0xaa, 0x95, + 0x9c, 0x5b, 0x80, 0x90, 0x4f, 0x0b, 0x1b, 0x8a, + 0xeb, 0x6b, 0x91, 0xb9, 0x0e, 0xee, 0x7d, 0xb1, + 0xfb, 0x3b, 0xa1, 0xd5, 0x08, 0x33, 0x62, 0x31, + 0x92, 0x22, 0x18, 0x77, 0x9e, 0x6d, 0x15, 0x5b, + 0x71, 0x74, 0xee, 0x19, 0xa1, 0x94, 0xd4, 0x84, + 0x26, 0x1c, 0x0a, 0x1a, 0xf0, 0xb7, 0xa9, 0xe3, + 0x94, 0xf1, 0xca, 0x48, 0xe1, 0x38, 0x9e, 0x46, + 0x0f, 0x86, 0x28, 0x79, 0x69, 0x9d, 0x53, 0xf4, + 0xd5, 0x56, 0xc2, 0x49, 0x38, 0x19, 0x3e, 0x49, + 0xae, 0x1f, 0xff, 0x0e, 0x57, 0xff, 0x38, 0x4d, + 0xd2, 0x88, 0xbe, 0xcc, 0xd8, 0x41, 0xa1, 0x1f, + 0x67, 0x1c, 0xf0, 0x16, 0x84, 0xc4, 0x02, 0x4a, + 0xf8, 0x06, 0x56, 0x21, 0xc7, 0x1b, 0x16, 0x7d, + 0xfb, 0xe1, 0xb3, 0xab, 0xfb, 0x9f, 0x6f, 0x39, + 0x7e, 0x46, 0x07, 0xd4, 0x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7f, 0xef, 0xd3, 0xbd, 0x77, 0xa6, + 0x35, 0xba, 0x9f, 0xf1, 0x1b, 0xbe, 0xb8, 0xe6, + 0x76, 0xc3, 0x77, 0x8e, 0xa7, 0xf6, 0x35, 0x6f, + 0xe6, 0x6f, 0xb5, 0x9f, 0xf0, 0x9a, 0x11, 0x65, + 0xe2, 0x0e, 0x1d, 0xe7, 0x17, 0x8f, 0xec, 0x5f, + 0xad, 0x82, 0x02, 0xb8, 0x0c, 0x3e, 0x27, 0x98, + 0xf7, 0xb6, 0xbd, 0x64, 0x90, 0x04, 0x8f, 0x51, + 0x03, 0xcb, 0x57, 0xf5, 0xd4, 0x20, 0x29, 0x51, + 0xdf, 0xb3, 0xdc, 0xde, 0xe4, 0x9e, 0x01, 0x7e, + 0x9a, 0xde, 0x5e, 0xf5, 0xf5, 0xe3, 0x8a, 0x67, + 0xec, 0xea, 0x3f, 0x94, 0x7f, 0x7a, 0x22, 0xde, + 0x59, 0xca, 0xe9, 0x02, 0xb7, 0x50, 0x47, 0x28, + 0x85, 0x23, 0x38, 0x00, 0xb1, 0x44, 0x78, 0x32, + 0x16, 0x22, 0xb5, 0xa7, 0x0f, 0xa2, 0xf8, 0xf9, + 0xc9, 0x98, 0xb9, 0x3c, 0xfb, 0xef, 0x3f, 0x85, + 0xd9, 0x60, 0x2b, 0xce, 0xd4, 0xc3, 0x0a, 0xee, + 0x60, 0x05, 0x6d, 0xb6, 0x6e, 0xdb, 0x6e, 0xc5, + 0x2c, 0xb5, 0x4b, 0xbc, 0x02, 0x18, 0xa9, 0x12, + 0x80, 0xa7, 0x09, 0xe3, 0xe3, 0x5e, 0xfe, 0x88, + 0x89, 0xbd, 0x37, 0x88, 0x1a, 0x23, 0x84, 0x8c, + 0x38, 0x27, 0x6d, 0x37, 0x85, 0x45, 0x06, 0xbd, + 0x7e, 0x78, 0xce, 0x79, 0xf2, 0x2c, 0xde, 0x50, + 0xab, 0x04, 0xf3, 0xce, 0x22, 0x37, 0x0e, 0xfe, + 0xba, 0xb4, 0x05, 0x98, 0xc9, 0xeb, 0xfc, 0xc1, + 0x39, 0xc3, 0x62, 0x87, 0xa7, 0x93, 0x61, 0x1c, + 0x98, 0x8c, 0x1c, 0xa3, 0xa5, 0xb8, 0xe5, 0x8f, + 0xf8, 0xf7, 0x8e, 0x4b, 0x80, 0xb1, 0x23, 0xff, + 0x88, 0x86, 0x51, 0x94, 0x15, 0xfb, 0x2a, 0x8c, + 0xcf, 0x02, 0x98, 0xf7, 0x36, 0xf5, 0xc0, 0xde, + 0x12, 0x4d, 0x95, 0x36, 0x15, 0x3c, 0xd5, 0xf6, + 0xca, 0xc1, 0x0d, 0xf3, 0xea, 0x03, 0x27, 0xb4, + 0x28, 0x91, 0x4d, 0x49, 0x09, 0x74, 0x3d, 0x89, + 0x68, 0xc3, 0xb9, 0xe4, 0x7c, 0x1e, 0xa0, 0xad, + 0xcb, 0x05, 0x1a, 0xee, 0xdf, 0x9a, 0x40, 0x14, + 0xe8, 0xf1, 0xb1, 0x5b, 0xc6, 0x75, 0xff, 0xfa, + 0xfe, 0xa3, 0x76, 0x86, 0xa5, 0x59, 0xda, 0xd1, + 0xbc, 0x29, 0x32, 0x8d, 0xef, 0x2c, 0xae, 0x19, + 0xfc, 0x5f, 0xff, 0xba, 0xf0, 0x62, 0xe0, 0x7f, + 0x9d, 0x8c, 0x73, 0x8e, 0xa5, 0x0e, 0x31, 0x97, + 0xda, 0xcf, 0x96, 0x0a, 0x8d, 0xe1, 0x34, 0x0f, + 0xe1, 0xb5, 0x7a, 0x71, 0xa3, 0xf8, 0xfd, 0x6d, + 0x35, 0xca, 0xa4, 0x6f, 0xa3, 0xa7, 0x20, 0x66, + 0x75, 0xcb, 0xa5, 0x30, 0x52, 0x24, 0x4d, 0xae, + 0x22, 0xae, 0x6b, 0x35, 0xd0, 0x3e, 0x07, 0xa7, + 0xe8, 0x2b, 0xef, 0x8e, 0x67, 0x39, 0x56, 0xad, + 0xca, 0xaa, 0xb5, 0xd5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, 0x4d, 0x6d, 0x3f, 0x7b, 0x38, + 0xbe, 0x31, 0xbd, 0x9b, 0x4a, 0x4a, 0xaf, 0x3c, + 0x4b, 0x5f, 0x39, 0x39, 0xf8, 0x8b, 0xb5, 0xe0, + 0x86, 0x79, 0xdd, 0xdc, 0x34, 0x37, 0x0f, 0xc7, + 0x7f, 0x8e, 0xce, 0x02, 0x26, 0x64, 0x77, 0x58, + 0x91, 0x17, 0xd9, 0x50, 0x10, 0xc7, 0x9d, 0xc0, + 0x51, 0x33, 0xde, 0x97, 0xb9, 0x27, 0xb4, 0x50, + 0x80, 0x51, 0x53, 0x80, 0xca, 0x75, 0xe5, 0x8f, + 0x5c, 0xa7, 0x8b, 0xc1, 0x3c, 0x5d, 0xf5, 0x64, + 0x4c, 0x55, 0xb2, 0x3b, 0xe4, 0xf5, 0xc6, 0xad, + 0x4a, 0x57, 0x21, 0x83, 0x31, 0x37, 0xd8, 0x81, + 0xab, 0x8b, 0x07, 0xeb, 0x20, 0x7b, 0xb9, 0x20, + 0x45, 0x2e, 0x91, 0xcf, 0x3b, 0x29, 0xc4, 0x17, + 0x9d, 0x71, 0x81, 0x27, 0x31, 0xaf, 0x01, 0x98, + 0xc2, 0x52, 0x9c, 0x35, 0x4f, 0x69, 0xaf, 0x3e, + 0x53, 0xec, 0x55, 0x6f, 0xde, 0xd4, 0xed, 0xb5, + 0x1d, 0xd4, 0xc0, 0x70, 0xe7, 0x60, 0x9f, 0xd2, + 0xbc, 0xa8, 0xfc, 0x3e, 0x40, 0xbd, 0x07, 0x9e, + 0x35, 0x07, 0xcf, 0xda, 0x19, 0x0b, 0xb6, 0x84, + 0xf6, 0x2e, 0xb3, 0xb9, 0xe0, 0x03, 0x90, 0xa5, + 0xa6, 0x77, 0xa7, 0xbd, 0xfd, 0xac, 0x68, 0xc3, + 0x3a, 0x99, 0x65, 0xbb, 0xb8, 0xb3, 0xa8, 0x86, + 0x7c, 0x15, 0xfb, 0x8e, 0x1d, 0x45, 0x98, 0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 0xdb, 0x7f, 0x5b, 0x7e, 0x57, 0x7e, + 0x53, 0x3a, 0xac, 0x74, 0x4f, 0x81, 0x27, 0x5c, + 0xea, 0x18, 0x3f, 0x5a, 0x3b, 0xc8, 0x09, 0x1c, + 0x5d, 0x19, 0x21, 0x77, 0xdf, 0x14, 0xc9, 0x1c, + 0xf8, 0x02, 0x99, 0x60, 0x5c, 0x2f, 0xed, 0xce, + 0x6f, 0x7c, 0x54, 0xb5, 0x55, 0xb4, 0x47, 0x84, + 0x34, 0xed, 0x75, 0x40, 0xf5, 0x04, 0xd9, 0x44, + 0xf0, 0x1d, 0x51, 0x20, 0xac, 0x0f, 0x01, 0x1c, + 0x2d, 0xa2, 0xd3, 0x43, 0xdd, 0x6f, 0xe9, 0xfd, + 0xee, 0x3d, 0x38, 0xec, 0xd6, 0x3a, 0xff, 0xed, + 0xb3, 0xfb, 0xee, 0xb7, 0x24, 0x6e, 0xc4, 0x8e, + 0x15, 0x33, 0x62, 0x58, 0xe5, 0xdb, 0xd7, 0xe8, + 0x0d, 0x7e, 0x55, 0x75, 0x84, 0xa7, 0xd5, 0x67, + 0x58, 0x89, 0x38, 0xf0, 0x41, 0x43, 0xde, 0xa1, + 0x35, 0x6d, 0x7d, 0x03, 0xe8, 0x03, 0x47, 0x86, + 0x0b, 0xe6, 0x1e, 0x21, 0xe6, 0xe8, 0x81, 0x05, + 0xd6, 0x67, 0x11, 0xbc, 0x04, 0xc4, 0x52, 0x69, + 0x82, 0x9f, 0x7a, 0x57, 0x64, 0xc3, 0x07, 0x63, + 0x14, 0x70, 0xcd, 0x7c, 0xdc, 0x9e, 0x72, 0xe1, + 0xac, 0x71, 0xfb, 0x18, 0xe5, 0xb9, 0x9f, 0x97, + 0x5c, 0x0c, 0x54, 0xf0, 0xce, 0x26, 0x69, 0x46, + 0xfc, 0xe5, 0x1d, 0x7a, 0xa7, 0x97, 0x3d, 0xec, + 0xef, 0x91, 0x61, 0x9e, 0xef, 0xfc, 0x85, 0x10, + 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b0, 0x18, 0x97, + 0xc9, 0x67, 0x1c, 0xb5, 0x2b, 0x1e, 0xa9, 0xd7, + 0x22, 0x33, 0x65, 0x20, 0xf7, 0x7c, 0xea, 0xf8, + 0xba, 0x71, 0xe3, 0xf0, 0xca, 0xc6, 0xe6, 0x3f, + 0xf3, 0x3b, 0x29, 0x27, 0x6b, 0x67, 0x35, 0x19, + 0xd9, 0x06, 0xaf, 0xaa, 0x9b, 0x62, 0xe0, 0x1b, + 0xa3, 0xff, 0x6b, 0x4c, 0x3e, 0x7e, 0x6e, 0x4b, + 0xae, 0x78, 0x8a, 0x5e, 0x4f, 0xca, 0xdc, 0x84, + 0x94, 0xda, 0xb4, 0x5b, 0x00, 0x5f, 0x72, 0xc6, + 0xc9, 0xb0, 0x19, 0xf6, 0x15, 0xd8, 0x41, 0xcc, + 0x3e, 0x08, 0x8d, 0xe8, 0x62, 0xe4, 0x23, 0xef, + 0x02, 0x4a, 0xe2, 0x25, 0xf7, 0x04, 0x82, 0x02, + 0x4d, 0x28, 0x91, 0x31, 0x66, 0xb2, 0x27, 0x05, + 0x9b, 0xd7, 0x96, 0x3b, 0x33, 0x8c, 0xb8, 0x82, + 0xae, 0x53, 0x47, 0xdf, 0x4d, 0xd0, 0x73, 0x74, + 0xaa, 0xbb, 0xac, 0x2c, 0xf1, 0xfe, 0x0e, 0x95, + 0x5e, 0x0c, 0xb1, 0xca, 0x81, 0xe2, 0x57, 0x4c, + 0x05, 0xe6, 0x29, 0x59, 0x03, 0xbf, 0xcc, 0x5b, + 0x17, 0x71, 0x7e, 0x61, 0x61, 0x2d, 0x03, 0xae, + 0x4a, 0xf3, 0x0b, 0xe6, 0x55, 0xf6, 0x25, 0xd3, + 0x58, 0x01, 0xf0, 0x57, 0x41, 0xd8, 0xee, 0x28, + 0xf7, 0x84, 0x19, 0x83, 0xe1, 0x80, 0x84, 0x1e, + 0x5b, 0x94, 0x41, 0x48, 0x31, 0x98, 0xe5, 0xe0, + 0x36, 0x43, 0xec, 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0x29, + 0x65, 0x56, 0xe9, 0x63, 0xaf, 0x54, 0xc8, 0xfc, + 0x10, 0x2b, 0xd8, 0x26, 0x5e, 0x85, 0xcc, 0x05, + 0x65, 0x7b, 0xee, 0x59, 0xf9, 0x17, 0xf2, 0x4b, + 0xf3, 0x59, 0xe2, 0x19, 0xe8, 0x8e, 0x5f, 0x42, + 0x4c, 0x68, 0xe1, 0x40, 0x66, 0x19, 0x7e, 0xd5, + 0xc3, 0xf1, 0x00, 0xed, 0x20, 0xec, 0xea, 0x35, + 0x67, 0x3e, 0xb8, 0x66, 0x5e, 0x38, 0xba, 0xf0, + 0x45, 0xf3, 0x48, 0x57, 0x2e, 0xf0, 0x0b, 0xcf, + 0x2e, 0x3c, 0x9b, 0x7f, 0xf6, 0x30, 0x18, 0x64, + 0x3b, 0x44, 0xbb, 0xb8, 0x82, 0x6c, 0x87, 0x9d, + 0xbc, 0xd8, 0xbf, 0x18, 0x7f, 0x2e, 0x83, 0x14, + 0xa2, 0x2d, 0xac, 0xf0, 0x67, 0xc8, 0x1f, 0x70, + 0xca, 0x8e, 0xb1, 0x5b, 0xd1, 0xe2, 0xc9, 0xbe, + 0x4f, 0x27, 0xa3, 0x97, 0x22, 0x82, 0x39, 0x10, + 0xbd, 0x54, 0xc4, 0x1e, 0x04, 0x59, 0xb7, 0x0a, + 0xff, 0x43, 0x7c, 0x52, 0x01, 0xec, 0x9a, 0x35, + 0x72, 0x1c, 0xbd, 0x29, 0xc1, 0x17, 0xe5, 0xb4, + 0x93, 0xeb, 0x65, 0x5a, 0x31, 0x06, 0x3b, 0xe9, + 0x2d, 0xfe, 0x63, 0xa1, 0xf6, 0xdd, 0x41, 0xfa, + 0xaf, 0xcd, 0x83, 0xb4, 0xb2, 0xc9, 0x6f, 0x3e, + 0xbb, 0xf4, 0xac, 0x20, 0x78, 0xf5, 0x27, 0xa3, + 0x01, 0x92, 0x55, 0x00, 0xfe, 0x35, 0x7c, 0x95, + 0x9a, 0xbf, 0x7f, 0x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x21, 0x72, + 0xe4, 0x1e, 0x50, 0xc1, 0xfd, 0x38, 0xc7, 0xbe, + 0xd2, 0x55, 0x9d, 0x20, 0xf7, 0xa3, 0x85, 0x79, + 0xca, 0x75, 0xf0, 0x35, 0x96, 0xba, 0x63, 0x7f, + 0x9f, 0xde, 0xbb, 0xf8, 0x77, 0xdb, 0xc2, 0xa8, + 0x5f, 0xd1, 0xbe, 0x2b, 0x50, 0xc3, 0x4b, 0xe4, + 0xe1, 0xd3, 0xf0, 0x2b, 0x5f, 0xb7, 0xd7, 0x9d, + 0x97, 0x2c, 0xe6, 0xc4, 0xdc, 0xd3, 0xea, 0xe0, + 0x55, 0x49, 0x3b, 0x3c, 0x06, 0xfb, 0x0c, 0xac, + 0x24, 0xfd, 0x24, 0x62, 0x65, 0xf1, 0x07, 0xad, + 0x52, 0x6b, 0xaa, 0xf5, 0xe7, 0x60, 0x62, 0x9f, + 0x98, 0x15, 0x73, 0xd6, 0xac, 0x38, 0xb3, 0x1b, + 0x95, 0xdd, 0x59, 0x19, 0x83, 0x02, 0x0d, 0xa9, + 0x05, 0xe7, 0xbc, 0x71, 0xae, 0x79, 0x60, 0x8f, + 0x42, 0x2c, 0x7a, 0xd7, 0x9c, 0x8e, 0xce, 0xda, + 0x69, 0x47, 0x0b, 0x34, 0x4f, 0xfe, 0x85, 0xc6, + 0xd1, 0xef, 0xaa, 0x82, 0xed, 0x11, 0x77, 0x04, + 0x7e, 0x3c, 0xcc, 0x11, 0x6f, 0xba, 0x1a, 0x48, + 0xad, 0xc6, 0xb3, 0xee, 0x1c, 0x67, 0xce, 0x6d, + 0x57, 0x72, 0xf2, 0xd1, 0x4f, 0x29, 0x5a, 0x1a, + 0xf8, 0x27, 0xb0, 0xce, 0xee, 0x65, 0x58, 0xa1, + 0x9b, 0xe0, 0x89, 0x3c, 0x70, 0xaf, 0xc8, 0xfc, + 0x6f, 0x50, 0xa4, 0x3a, 0xbb, 0x28, 0x34, 0x16, + 0x1e, 0x0b, 0xf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99, 0xb5, + 0xbf, 0x7b, 0x17, 0x03, 0xd9, 0x24, 0x5e, 0xb2, + 0x9d, 0xae, 0xce, 0xfe, 0xed, 0x63, 0xb9, 0xbe, + 0x47, 0xf0, 0x19, 0x32, 0xae, 0x48, 0xc6, 0xf8, + 0xfb, 0x99, 0xd6, 0x5c, 0xa0, 0x55, 0x5f, 0xbd, + 0x13, 0xde, 0x8d, 0x5d, 0x10, 0xec, 0x3d, 0x1a, + 0xce, 0xbb, 0xd0, 0xa2, 0x5d, 0xe2, 0x35, 0x31, + 0x0b, 0xe7, 0x4d, 0xc2, 0x30, 0x60, 0xac, 0xd3, + 0x84, 0x36, 0xa2, 0x25, 0x93, 0xc2, 0x3a, 0xb7, + 0x52, 0xe0, 0x11, 0x64, 0x02, 0xea, 0x4d, 0x77, + 0xe1, 0x5d, 0xe1, 0x00, 0x7d, 0xe9, 0x54, 0x05, + 0xef, 0x0b, 0xfc, 0xee, 0x00, 0xb9, 0x01, 0x65, + 0x38, 0x40, 0xcb, 0x9a, 0x86, 0xa9, 0x3b, 0x0b, + 0xce, 0xad, 0xdd, 0x27, 0x42, 0xd7, 0xa5, 0x95, + 0x74, 0x1d, 0x11, 0x59, 0xba, 0x2e, 0xd0, 0x99, + 0xf8, 0x59, 0xb3, 0x31, 0x83, 0x74, 0x3b, 0x2f, + 0x7d, 0x0d, 0xf8, 0x5c, 0xb8, 0x8f, 0xe9, 0x2e, + 0x7c, 0x6e, 0xd7, 0x40, 0xb6, 0xbe, 0x87, 0xde, + 0xfe, 0x48, 0x18, 0xeb, 0x8b, 0x83, 0x16, 0x4c, + 0x98, 0xb8, 0x3e, 0x92, 0x35, 0xd4, 0xcf, 0x10, + 0x21, 0x7f, 0x79, 0xfc, 0xdd, 0xf6, 0xcf, 0x29, + 0x7b, 0xf2, 0xe7, 0x1b, 0x8d, 0xab, 0xce, 0x95, + 0xe0, 0x11, 0xfb, 0xcc, 0xd0, 0xf6, 0xb5, 0x07, + 0x13, 0x3b, 0x61, 0x15, 0x09, 0xd8, 0x71, 0x03, + 0x50, 0xb7, 0xa1, 0x3c, 0x0c, 0x92, 0x55, 0x8c, + 0x76, 0x61, 0x2e, 0x9c, 0xc9, 0xfb, 0xdd, 0xaa, + 0x38, 0x69, 0x27, 0xb9, 0xd1, 0xdc, 0x9d, 0x48, + 0xfe, 0x6f, 0xf0, 0xe9, 0xfe, 0xb7, 0x93, 0x35, + 0x9f, 0x9a, 0x6a, 0x67, 0x4a, 0x8d, 0x18, 0x47, + 0x54, 0xb9, 0x78, 0x64, 0x29, 0x95, 0xa3, 0x18, + 0x8b, 0x81, 0xbf, 0x72, 0x5a, 0x3b, 0xa5, 0xe5, + 0x93, 0x98, 0xe3, 0x0b, 0xed, 0xaf, 0x32, 0xdf, + 0x65, 0x60, 0x05, 0x15, 0x91, 0xad, 0x84, 0x2d, + 0x9a, 0x64, 0x82, 0x7d, 0x17, 0xad, 0x51, 0xd6, + 0xf8, 0xee, 0x5d, 0x7c, 0xaf, 0x19, 0x94, 0xdd, + 0x92, 0x5d, 0x76, 0xc0, 0x83, 0xdb, 0x88, 0x61, + 0x0e, 0x08, 0x3c, 0x4d, 0x72, 0xb0, 0x8d, 0x48, + 0x2f, 0x48, 0xc2, 0x3c, 0x97, 0x3c, 0xdb, 0x03, + 0xfc, 0x49, 0x47, 0x04, 0x5f, 0x45, 0xa9, 0x15, + 0x5a, 0xfd, 0x08, 0xc1, 0x5f, 0xfe, 0x09, 0xbe, + 0x47, 0x4b, 0x5a, 0xd1, 0x61, 0x45, 0x64, 0x4b, + 0x0f, 0x57, 0xcc, 0x44, 0x07, 0x63, 0x0c, 0xa4, + 0x3d, 0xcd, 0xa7, 0xfc, 0x92, 0x6f, 0xfb, 0xe4, + 0x4d, 0x2f, 0x6e, 0x06, 0xd8, 0xfb, 0x39, 0xd1, + 0x48, 0x92, 0xa7, 0x5b, 0xaf, 0x00, 0xa7, 0x9f, + 0x07, 0x3d, 0x51, 0xda, 0xb1, 0x1b, 0x88, 0x64, + 0xd2, 0x6c, 0xb2, 0x5d, 0x6a, 0x3f, 0x6c, 0x6b, + 0x8d, 0xac, 0xbd, 0xd6, 0xf9, 0xca, 0x98, 0x37, + 0x2a, 0xfb, 0x25, 0x6f, 0xd9, 0xbc, 0xdc, 0x29, + 0xee, 0x44, 0x1e, 0x3d, 0x78, 0x56, 0x30, 0x5f, + 0x4d, 0x89, 0x7e, 0xda, 0x59, 0x96, 0xd5, 0x8b, + 0x7a, 0x75, 0x5a, 0xc6, 0x55, 0x00, 0x7f, 0xc3, + 0x07, 0xa0, 0xce, 0x2d, 0xb7, 0xf0, 0x28, 0xb6, + 0x8a, 0x3b, 0xe5, 0x86, 0x94, 0xf6, 0x08, 0x31, + 0xca, 0xca, 0xb5, 0x93, 0xd6, 0x0a, 0xaf, 0xaa, + 0x2c, 0x60, 0x3a, 0x78, 0xae, 0x2d, 0xa3, 0x75, + 0xb1, 0x65, 0xec, 0xac, 0xec, 0x18, 0x8d, 0x90, + 0xd9, 0x25, 0xf0, 0x55, 0xa2, 0x0b, 0xf3, 0xe3, + 0xc8, 0x83, 0x38, 0x20, 0x83, 0xbb, 0x20, 0x77, + 0x49, 0xa9, 0x73, 0xee, 0xeb, 0xcb, 0xc1, 0x79, + 0xb0, 0x1e, 0x4d, 0x1f, 0x74, 0x92, 0x9f, 0xe5, + 0xe3, 0x6c, 0x3e, 0x60, 0x00, 0xa1, 0xa4, 0xc4, + 0x6a, 0x42, 0x52, 0x85, 0xd5, 0x10, 0x87, 0xe1, + 0xcd, 0x6b, 0x1f, 0x8a, 0xf8, 0xb3, 0xc2, 0x2a, + 0xe0, 0xeb, 0x96, 0x19, 0x58, 0x5d, 0x17, 0xbe, + 0x93, 0xf8, 0x71, 0x09, 0x66, 0xab, 0x78, 0x7c, + 0x47, 0xb0, 0x76, 0x25, 0x3f, 0xa7, 0x9f, 0x3d, + 0x06, 0x5f, 0x90, 0x25, 0x9c, 0x44, 0x90, 0x52, + 0x19, 0x56, 0x0a, 0x28, 0x43, 0x07, 0xc9, 0x56, + 0xf3, 0xe8, 0x84, 0x9f, 0x49, 0x0b, 0xef, 0x24, + 0x93, 0x6d, 0x44, 0x78, 0x44, 0x60, 0x2d, 0x3c, + 0xd3, 0xfb, 0x14, 0xf4, 0x55, 0x26, 0xc8, 0x6e, + 0x4c, 0x83, 0xbf, 0x97, 0x56, 0x31, 0x5a, 0x9b, + 0xa0, 0xa4, 0x3d, 0x26, 0x74, 0x03, 0x66, 0xf0, + 0x33, 0x7e, 0x4a, 0x2f, 0x04, 0x29, 0x3f, 0x47, + 0x53, 0x7f, 0xce, 0xa8, 0x51, 0x34, 0x0f, 0x3c, + 0x42, 0xac, 0x3b, 0xc2, 0xaa, 0x37, 0x47, 0x77, + 0x4e, 0xb3, 0x11, 0xe7, 0x92, 0x1b, 0x57, 0x07, + 0x30, 0xff, 0x8f, 0x82, 0x0d, 0x74, 0x20, 0x0f, + 0x12, 0x7a, 0xa9, 0xaa, 0x39, 0x6c, 0xa8, 0x46, + 0xa5, 0xbd, 0xb8, 0xba, 0x76, 0x34, 0x67, 0x94, + 0x8c, 0xd2, 0xfe, 0x87, 0xf4, 0xd6, 0xd5, 0xe5, + 0x07, 0x0f, 0xbe, 0x37, 0xd5, 0x28, 0x07, 0xd4, + 0x0c, 0x39, 0x03, 0xe7, 0xc8, 0x16, 0x56, 0x56, + 0xd5, 0x68, 0x2d, 0xe5, 0x21, 0x7e, 0xd6, 0x94, + 0x6c, 0x30, 0x6e, 0x34, 0xbc, 0x8c, 0x97, 0x6e, + 0x64, 0x5e, 0x9f, 0x73, 0xfe, 0xfb, 0x1f, 0x29, + 0x27, 0xe3, 0xa4, 0x61, 0xfe, 0x6e, 0x26, 0xa5, + 0xf7, 0x24, 0xfc, 0xa7, 0xc6, 0x8c, 0x9f, 0x31, + 0x67, 0x58, 0x1a, 0x70, 0x6e, 0xda, 0x49, 0x79, + 0xb3, 0xe4, 0x8e, 0x2a, 0xef, 0x68, 0x39, 0x30, + 0xac, 0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x3d, 0xb7, 0x72, 0x3c, + 0x4c, 0x46, 0x3a, 0x97, 0x8d, 0x38, 0x68, 0x7e, + 0xad, 0xa5, 0xb5, 0x00, 0xd3, 0x75, 0xce, 0x3d, + 0x1e, 0x7d, 0x5c, 0x3e, 0x5e, 0xe6, 0xe5, 0x63, + 0xc0, 0x93, 0x8f, 0x47, 0xd0, 0x17, 0x35, 0x95, + 0x13, 0x3e, 0x57, 0xbf, 0x56, 0xb3, 0x8f, 0x37, + 0xa2, 0xdc, 0x14, 0x66, 0xa7, 0x6c, 0x66, 0x5b, + 0x76, 0xeb, 0xa5, 0x12, 0x57, 0xe3, 0x6a, 0x4c, + 0x48, 0x5d, 0x1c, 0xa4, 0xfc, 0x91, 0xf1, 0x25, + 0x1c, 0x9f, 0x75, 0xfe, 0xed, 0xb1, 0xd3, 0xfa, + 0x32, 0xd8, 0x6a, 0xc5, 0xac, 0xd3, 0x66, 0x3e, + 0x19, 0x59, 0x49, 0x98, 0x21, 0x6b, 0xda, 0x9a, + 0xe2, 0x93, 0xe0, 0xa5, 0xf4, 0x22, 0x09, 0x44, + 0x56, 0x62, 0xd2, 0x36, 0xac, 0x7e, 0x67, 0xca, + 0xb9, 0x7a, 0x00, 0xde, 0x97, 0xff, 0xd9, 0xca, + 0xa3, 0x63, 0xc1, 0x2c, 0x08, 0xb1, 0x99, 0x22, + 0x6a, 0x49, 0x57, 0x01, 0x71, 0xae, 0x46, 0x5c, + 0x78, 0x64, 0xc0, 0xcb, 0x0c, 0x2f, 0x7a, 0x00, + 0xab, 0x84, 0x51, 0xf0, 0xa9, 0x2e, 0xf3, 0x47, + 0x22, 0xbf, 0x3f, 0xe3, 0x2a, 0x3d, 0xe6, 0x0f, + 0x7a, 0xfc, 0x18, 0xb1, 0x99, 0x66, 0x53, 0x41, + 0x89, 0x19, 0x6c, 0xa0, 0x7a, 0xf4, 0x44, 0xd5, + 0x1b, 0x7e, 0x7d, 0xb9, 0x3a, 0x7c, 0x70, 0xa6, + 0x76, 0x29, 0x2f, 0xeb, 0x62, 0x48, 0x9d, 0x88, + 0x48, 0x3c, 0xc6, 0xe2, 0x89, 0x88, 0x31, 0x64, + 0xb6, 0x5e, 0x59, 0x31, 0x11, 0x65, 0x8a, 0x6a, + 0x0f, 0x3f, 0x79, 0x9b, 0xb4, 0x2e, 0xb7, 0x86, + 0x5a, 0xc9, 0xad, 0xc1, 0x88, 0x7b, 0x4c, 0xb9, + 0xb9, 0x82, 0x79, 0xe8, 0x9b, 0x46, 0xf4, 0x15, + 0xf6, 0x2f, 0xbf, 0x08, 0x9f, 0xfe, 0x58, 0x78, + 0xa9, 0x31, 0x94, 0x9c, 0x20, 0x7d, 0x5c, 0x08, + 0x39, 0x81, 0x1a, 0xc8, 0xa1, 0xae, 0x7c, 0x22, + 0xae, 0x39, 0x4e, 0x67, 0x29, 0x56, 0x58, 0x29, + 0x16, 0x46, 0x41, 0x04, 0x4b, 0x1d, 0x2b, 0x23, + 0x5a, 0x8b, 0x32, 0x47, 0x1f, 0x46, 0x6b, 0xa3, + 0x78, 0xed, 0x40, 0x66, 0x5c, 0x89, 0xf0, 0xe4, + 0xd0, 0x11, 0xd6, 0x2c, 0x88, 0x7c, 0xd4, 0x41, + 0x8c, 0xc5, 0x99, 0x8a, 0x35, 0x53, 0xb8, 0x17, + 0xc4, 0x00, 0xe9, 0x39, 0xaa, 0x30, 0x51, 0x89, + 0x27, 0xf8, 0xbe, 0x11, 0xe3, 0x37, 0xf2, 0xf1, + 0x72, 0x81, 0x69, 0x39, 0x47, 0x92, 0xb3, 0x9d, + 0xb6, 0xb1, 0x2e, 0x93, 0x5a, 0x92, 0x61, 0x85, + 0x5c, 0x63, 0xd5, 0x3a, 0xdd, 0x1d, 0x11, 0x31, + 0x07, 0xd2, 0x46, 0x0f, 0x77, 0x8e, 0x3e, 0x10, + 0xb6, 0x7b, 0xb8, 0xfb, 0x92, 0xae, 0x33, 0x18, + 0x7c, 0xdd, 0x5d, 0x77, 0xef, 0x39, 0xdf, 0x3a, + 0xf0, 0xb9, 0x4e, 0x42, 0x30, 0x8e, 0xde, 0x8f, + 0x06, 0x48, 0xfd, 0xd5, 0x97, 0x2c, 0xf8, 0x8a, + 0xcc, 0x9f, 0xae, 0xcc, 0xa5, 0x46, 0x44, 0x21, + 0x45, 0xd4, 0xf1, 0x01, 0x82, 0x3a, 0x20, 0xad, + 0x0a, 0xfc, 0x05, 0x78, 0x5a, 0xbf, 0xf2, 0xe8, + 0x89, 0x85, 0xfa, 0xac, 0xd9, 0x20, 0xee, 0x3d, + 0x77, 0xd9, 0x39, 0xef, 0x4c, 0x9b, 0x93, 0xac, + 0x64, 0xda, 0x0e, 0x71, 0xa7, 0x42, 0xd4, 0x27, + 0x3d, 0x60, 0xf0, 0x9c, 0xc9, 0x24, 0x59, 0x22, + 0x46, 0x18, 0x74, 0x11, 0xd2, 0xce, 0x24, 0xcf, + 0x02, 0xae, 0xce, 0xbd, 0xe4, 0x26, 0x9c, 0xa1, + 0xda, 0x29, 0xe4, 0xf9, 0x91, 0x98, 0x3a, 0x24, + 0xa6, 0x39, 0x07, 0x78, 0x0d, 0x2b, 0xb5, 0xe6, + 0xea, 0x43, 0x44, 0x44, 0x82, 0x6a, 0x3a, 0xd3, + 0x1d, 0xdb, 0xfd, 0x4c, 0x8d, 0xf8, 0x75, 0x9f, + 0x04, 0x0c, 0x99, 0xb7, 0x38, 0x1b, 0xa2, 0x8a, + 0x73, 0x96, 0xc9, 0xdc, 0x53, 0x4c, 0x68, 0xe0, + 0x4b, 0xad, 0xb8, 0x75, 0xc6, 0xfc, 0x3a, 0x89, + 0xdc, 0xda, 0x74, 0xbb, 0x68, 0xa9, 0x2c, 0x4f, + 0x45, 0xad, 0xa5, 0xa3, 0xd8, 0x0d, 0xac, 0xd8, + 0x06, 0x4c, 0xfd, 0xea, 0x59, 0x6a, 0x8b, 0x3a, + 0xda, 0xe1, 0x84, 0xfd, 0x27, 0xf4, 0x9d, 0x7a, + 0x7c, 0xa4, 0xea, 0x4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+ 0x11, 0x88, 0xb2, 0x09, 0x25, 0xbd, 0x95, 0x06, + 0x29, 0xc5, 0x6c, 0x69, 0xd6, 0x99, 0x72, 0x9e, + 0x7b, 0xe9, 0xdd, 0xac, 0x36, 0x91, 0xa4, 0x07, + 0x38, 0xcf, 0x51, 0xc6, 0x44, 0xb5, 0x48, 0xad, + 0xf0, 0xfa, 0x89, 0xa8, 0x7e, 0x92, 0x51, 0x81, + 0xa1, 0xb0, 0x52, 0xfe, 0x9e, 0x32, 0x07, 0xbe, + 0xc9, 0x68, 0x77, 0x44, 0xc9, 0xf0, 0xd9, 0x13, + 0xb8, 0x2e, 0xda, 0xdd, 0xa9, 0xe3, 0x02, 0x66, + 0x54, 0x2d, 0x8c, 0x73, 0xce, 0x3b, 0xb3, 0x96, + 0xcc, 0xe1, 0x2a, 0xad, 0x55, 0x40, 0x20, 0x4d, + 0x1e, 0xb3, 0xca, 0xa0, 0x47, 0x2a, 0x42, 0xab, + 0x49, 0x0f, 0x5e, 0xfa, 0xce, 0x18, 0xbd, 0x40, + 0x0f, 0x92, 0x00, 0x72, 0xfe, 0xc0, 0x35, 0xb8, + 0x01, 0xa8, 0xe3, 0x83, 0xd6, 0x8a, 0xac, 0x2b, + 0x87, 0x7b, 0xc9, 0x92, 0x0c, 0x99, 0xe3, 0xbf, + 0x67, 0xe8, 0xcf, 0x24, 0xd8, 0x32, 0x3f, 0xe7, + 0x4e, 0x84, 0x3c, 0x64, 0x0a, 0x9a, 0x2e, 0xd1, + 0xbd, 0x0d, 0x5e, 0xce, 0x22, 0x8f, 0x87, 0xb5, + 0x2d, 0x4c, 0x99, 0xb7, 0xab, 0x7b, 0xf6, 0x9e, + 0x22, 0xd8, 0x80, 0x17, 0x8c, 0x87, 0xc7, 0x29, + 0xe3, 0xda, 0xf1, 0xa6, 0x91, 0xe5, 0x33, 0x4c, + 0xfa, 0x68, 0x13, 0xe6, 0x1f, 0x92, 0x8a, 0x88, + 0x97, 0x92, 0x16, 0x48, 0x5b, 0xf7, 0xd3, 0x5e, + 0xce, 0x4b, 0x51, 0x74, 0xb7, 0x58, 0xbd, 0x53, + 0x55, 0x06, 0x7a, 0x28, 0x88, 0x6a, 0xbd, 0x23, + 0xc4, 0x75, 0x83, 0x55, 0x60, 0xbf, 0x3e, 0x2b, + 0xd7, 0x78, 0x48, 0xf9, 0x55, 0x07, 0x06, 0xd8, + 0xfb, 0x58, 0xed, 0x93, 0x22, 0xb3, 0x04, 0xcf, + 0xca, 0xea, 0x1f, 0xd0, 0x76, 0xfc, 0x92, 0xd0, + 0x48, 0xe8, 0x27, 0x61, 0xc5, 0x73, 0x1a, 0x70, + 0x60, 0xdf, 0xb7, 0x4a, 0xdb, 0x97, 0xec, 0x4f, + 0x9d, 0x82, 0x88, 0xa8, 0x61, 0x4c, 0x4d, 0x32, + 0x43, 0x30, 0xe7, 0x41, 0x30, 0xaf, 0xc9, 0xae, + 0x74, 0x37, 0x8d, 0x89, 0xb7, 0xb9, 0xb0, 0xaa, + 0x2a, 0x7b, 0xac, 0x89, 0x8a, 0x2a, 0xe6, 0x5d, + 0xa0, 0x73, 0xb4, 0x08, 0x1e, 0xa2, 0x41, 0x65, + 0xbf, 0x09, 0xd2, 0xaf, 0xdf, 0x47, 0x26, 0x13, + 0xc7, 0x6c, 0x23, 0x5e, 0x9b, 0x8c, 0xdb, 0x68, + 0x20, 0x07, 0x0b, 0xbb, 0x1f, 0xf5, 0xac, 0x15, + 0xd6, 0x28, 0xf4, 0x75, 0x2b, 0x7c, 0x67, 0x98, + 0x03, 0x94, 0xd9, 0x07, 0xcb, 0x7e, 0xec, 0x7e, + 0xec, 0xde, 0x26, 0xb7, 0xdd, 0x3b, 0x76, 0xd5, + 0xb0, 0x0d, 0x27, 0xac, 0x4b, 0x0c, 0xd9, 0x86, + 0x9c, 0xda, 0x0d, 0x64, 0x83, 0x98, 0x69, 0x0a, + 0x5a, 0x7e, 0x37, 0xbd, 0xab, 0xed, 0x69, 0x7b, + 0x13, 0x3f, 0xf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, 0x95, 0x4c, 0x63, 0x1d, + 0x81, 0x7d, 0x5a, 0x89, 0xfa, 0x06, 0xd4, 0x41, + 0x87, 0x82, 0x1f, 0x05, 0xb2, 0xb1, 0x65, 0x45, + 0xac, 0xa1, 0xab, 0x82, 0xc3, 0x9c, 0xb0, 0x2a, + 0x60, 0x1b, 0x46, 0x82, 0xa6, 0x9b, 0x70, 0x0b, + 0x76, 0xd1, 0xf9, 0xc4, 0x5c, 0x05, 0x7b, 0x74, + 0xca, 0xc5, 0xbc, 0x33, 0xcd, 0x67, 0x8e, 0x04, + 0xda, 0x6c, 0x4f, 0x74, 0xaf, 0xfb, 0x57, 0xdf, + 0x5e, 0xe1, 0x8f, 0x48, 0x1f, 0x6f, 0xc8, 0x3e, + 0x18, 0x77, 0x08, 0xe6, 0xf8, 0x94, 0x30, 0x36, + 0x32, 0xcb, 0xc0, 0x97, 0xd0, 0x6d, 0xa1, 0x45, + 0x1f, 0x82, 0x7d, 0x44, 0xaf, 0xd3, 0xb6, 0x46, + 0x79, 0xde, 0x8a, 0xd8, 0xef, 0x15, 0x91, 0x79, + 0x54, 0xad, 0x2a, 0xfc, 0x26, 0x17, 0x5c, 0xb6, + 0xd7, 0xed, 0x04, 0x5c, 0x15, 0x9c, 0x6d, 0x93, + 0x76, 0x82, 0x5e, 0x96, 0x5c, 0x26, 0xf1, 0xb9, + 0x95, 0xc0, 0x68, 0xaf, 0x77, 0x47, 0xfc, 0xed, + 0xb7, 0xa3, 0xfc, 0x2c, 0x19, 0x87, 0xcf, 0x05, + 0x5c, 0x9f, 0x97, 0x9a, 0x41, 0x6f, 0xcd, 0x07, + 0xf3, 0x7a, 0x59, 0x9f, 0xff, 0x79, 0xfe, 0xc5, + 0xda, 0xdf, 0xe6, 0xb5, 0xf9, 0x77, 0xf3, 0x9a, + 0xae, 0x3e, 0x10, 0xbc, 0xbe, 0xb1, 0x03, 0xac, + 0x80, 0x46, 0xfe, 0xd5, 0xc2, 0xeb, 0x87, 0x83, + 0x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e, + 0x70, 0xcf, 0x5f, 0x18, 0xac, 0xc8, 0x12, 0xc3, + 0xec, 0x65, 0x6a, 0x2c, 0x0d, 0xbc, 0x14, 0xe4, + 0x75, 0x60, 0xf7, 0x9e, 0x44, 0xb0, 0xac, 0x9f, + 0xd3, 0x27, 0xf4, 0xb1, 0x95, 0x2d, 0xa9, 0xcd, + 0x40, 0x63, 0x11, 0xc9, 0x28, 0x1f, 0xc8, 0x2e, + 0x58, 0x12, 0x5d, 0x03, 0xe6, 0x99, 0xc6, 0xdf, + 0x04, 0x05, 0x3f, 0x6b, 0x62, 0xaf, 0x0e, 0xad, + 0x86, 0xcc, 0xcd, 0x8f, 0x04, 0xc3, 0x59, 0x56, + 0x70, 0xa7, 0xad, 0x62, 0xf0, 0x85, 0x9f, 0x30, + 0xb7, 0xe1, 0x2e, 0x4b, 0x35, 0x90, 0x49, 0x6f, + 0x8c, 0x3c, 0x0f, 0xab, 0x47, 0x25, 0x47, 0x63, + 0x2c, 0x78, 0x1e, 0x46, 0x4f, 0xc7, 0xc2, 0xea, + 0x80, 0x28, 0x2b, 0x3d, 0x5d, 0x9b, 0xdc, 0x2a, + 0xf9, 0xeb, 0xba, 0xcc, 0x47, 0x8a, 0xca, 0x45, + 0x12, 0x56, 0x34, 0xb7, 0x50, 0x4e, 0xff, 0xf3, + 0x87, 0x44, 0xfb, 0x6c, 0x4d, 0xe6, 0x91, 0xd2, + 0x5e, 0xe1, 0x90, 0x3a, 0xf4, 0x04, 0xbe, 0xb2, + 0xac, 0x19, 0x98, 0x43, 0x99, 0xaf, 0xc3, 0x68, + 0xee, 0x27, 0x66, 0x18, 0x8d, 0x77, 0xcb, 0x4e, + 0x91, 0x95, 0x0f, 0x2b, 0xc9, 0x59, 0x76, 0xb6, + 0x16, 0x7b, 0xdd, 0x7c, 0x7b, 0x06, 0xab, 0xab, + 0x06, 0x39, 0xcc, 0x5b, 0xe0, 0x15, 0x87, 0xf7, + 0xdc, 0xbb, 0xe3, 0x5e, 0x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 0x42, 0x99, 0x14, 0x98, 0x10, 0xff, 0x59, 0xe7, + 0xad, 0x39, 0xb0, 0xae, 0xc8, 0x70, 0xd4, 0x99, + 0x11, 0x59, 0xd8, 0x96, 0xdd, 0x32, 0x5b, 0x29, + 0x7e, 0x89, 0xdc, 0x23, 0x67, 0x8e, 0x27, 0xc0, + 0x2f, 0x5b, 0x37, 0x12, 0xc7, 0x18, 0xd4, 0xa2, + 0xa6, 0xac, 0x5d, 0x6a, 0x60, 0x26, 0x0f, 0xf0, + 0xcf, 0x36, 0xce, 0x6e, 0x4d, 0xab, 0xe5, 0xbd, + 0x27, 0xa1, 0x1d, 0x84, 0x5b, 0x83, 0xfd, 0x5b, + 0x69, 0x19, 0x1c, 0x3f, 0xb5, 0x09, 0x32, 0x9d, + 0x44, 0x2e, 0x57, 0xab, 0x28, 0x6b, 0x3d, 0x7a, + 0x2c, 0xc7, 0x08, 0xe1, 0x0e, 0xf2, 0xfa, 0xc0, + 0x99, 0x09, 0xca, 0x2d, 0xac, 0x53, 0x2f, 0x76, + 0xca, 0xfb, 0x73, 0x5e, 0xd9, 0xfb, 0x93, 0x3f, + 0xd2, 0x49, 0xb7, 0xbe, 0x0a, 0x4e, 0x87, 0x3d, + 0xac, 0x44, 0x9d, 0x26, 0x9c, 0x33, 0xe0, 0x5c, + 0x1c, 0xed, 0xff, 0x41, 0xa9, 0x75, 0x47, 0xb0, + 0x85, 0x15, 0x52, 0xa1, 0xc6, 0x11, 0x76, 0x11, + 0x2a, 0x07, 0xe2, 0xac, 0x57, 0x12, 0xe3, 0xae, + 0x3c, 0x8b, 0xb9, 0x61, 0xab, 0xcc, 0x0d, 0xf0, + 0xf3, 0x0d, 0xbf, 0xec, 0xc3, 0x6b, 0x8f, 0x4b, + 0xa4, 0x04, 0xf6, 0x2b, 0x69, 0xf6, 0x59, 0x16, + 0x27, 0xf3, 0xef, 0x91, 0x5d, 0x50, 0xc2, 0xd8, + 0x17, 0x1e, 0xb0, 0x8b, 0xed, 0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xfe, 0x63, 0x0c, 0x31, 0xac, 0x46, + 0x6b, 0x08, 0x9f, 0x44, 0x13, 0x95, 0x1e, 0x92, + 0xd3, 0x1b, 0x5d, 0x95, 0xbc, 0xa2, 0x62, 0xfe, + 0x76, 0xef, 0x9d, 0xc2, 0x48, 0x02, 0x0f, 0x59, + 0x7d, 0xee, 0x18, 0xf9, 0xda, 0x94, 0x95, 0xe2, + 0x51, 0xb5, 0x2c, 0x76, 0xa9, 0x4a, 0x23, 0x9f, + 0xda, 0x4e, 0x93, 0xa6, 0x97, 0xa6, 0xb0, 0x8f, + 0x55, 0xc1, 0xbf, 0xa3, 0x77, 0x98, 0xcc, 0xe3, + 0xa4, 0xa8, 0xde, 0x56, 0xad, 0x44, 0x77, 0xe6, + 0x81, 0x61, 0xdd, 0x0f, 0x7d, 0x4a, 0x59, 0x2d, + 0x1b, 0x65, 0x00, 0xfb, 0x6b, 0xab, 0x7a, 0x7a, + 0x9f, 0xaf, 0x02, 0xde, 0x6d, 0xda, 0x2a, 0x88, + 0x7c, 0x17, 0x5a, 0xc0, 0xec, 0x63, 0xed, 0xdd, + 0xb2, 0xce, 0x0e, 0xee, 0xd6, 0xa6, 0xd1, 0x13, + 0x11, 0xe8, 0x16, 0x71, 0x0e, 0x7e, 0x1f, 0x3e, + 0x52, 0x64, 0xef, 0xac, 0x50, 0x7b, 0xc7, 0x19, + 0xf6, 0x3f, 0x40, 0xbe, 0x5d, 0xd8, 0x47, 0x03, + 0xe6, 0xf2, 0x3d, 0xae, 0x0b, 0x91, 0x9c, 0x6f, + 0xda, 0x3a, 0x17, 0x7c, 0x73, 0x35, 0xfb, 0x63, + 0x4a, 0x4d, 0x69, 0xf4, 0x1d, 0x56, 0xf8, 0x62, + 0x77, 0xae, 0x0c, 0x6b, 0xf2, 0xac, 0xe8, 0xf5, + 0x94, 0x0d, 0x0a, 0x47, 0x5f, 0xb3, 0xd4, 0x6a, + 0x4a, 0x4d, 0xab, 0x57, 0xf3, 0x21, 0x47, 0xce, + 0xd2, 0x1a, 0xd4, 0x9d, 0x71, 0xe7, 0xec, 0x6f, + 0x9d, 0x92, 0x59, 0x62, 0xb7, 0xcc, 0xb8, 0x13, + 0x77, 0xcf, 0xa8, 0x27, 0xbb, 0x72, 0xc5, 0xc4, + 0x8e, 0xc0, 0x9f, 0x40, 0x43, 0xd1, 0x2b, 0xa1, + 0x47, 0x9f, 0xe0, 0xdb, 0x58, 0x37, 0x1c, 0x4c, + 0x5b, 0x93, 0x80, 0x3a, 0xa5, 0xff, 0x24, 0x67, + 0x83, 0x12, 0xb2, 0x35, 0x0a, 0x1e, 0x35, 0x68, + 0x0a, 0xa6, 0x84, 0x18, 0x95, 0x1d, 0x44, 0xac, + 0x12, 0xb9, 0x82, 0x22, 0xef, 0x08, 0x2b, 0x88, + 0xd9, 0xc7, 0x0d, 0xab, 0x01, 0x56, 0x57, 0x56, + 0x07, 0xc7, 0x8d, 0x33, 0x41, 0xbd, 0x46, 0xf6, + 0x12, 0x7f, 0xdd, 0xee, 0x92, 0x9d, 0xe9, 0x06, + 0xf2, 0x68, 0x6c, 0x1e, 0xb1, 0x68, 0x94, 0x95, + 0xca, 0x01, 0xee, 0xdc, 0x69, 0x6b, 0xc8, 0x8b, + 0x11, 0x98, 0x73, 0x35, 0x8a, 0x42, 0x84, 0x2c, + 0x56, 0xd4, 0x2a, 0x8e, 0xc6, 0x92, 0x5b, 0x99, + 0x1f, 0x9a, 0x2c, 0x29, 0x78, 0xe1, 0x06, 0xbb, + 0x1f, 0x75, 0xe5, 0x62, 0xa3, 0xfe, 0x37, 0xcf, + 0xb2, 0x5b, 0x67, 0x18, 0xee, 0xd3, 0xc4, 0xd6, + 0x05, 0x7f, 0xd9, 0x58, 0x66, 0xeb, 0xf2, 0xac, + 0xd2, 0xdc, 0x2a, 0x6f, 0x94, 0xbe, 0xaf, 0xf0, + 0x92, 0x57, 0xae, 0x35, 0xf7, 0x47, 0x1e, 0x9c, + 0x3d, 0x88, 0x6d, 0x35, 0x5d, 0xc4, 0x7d, 0x21, + 0x26, 0xb4, 0xb1, 0x93, 0x4c, 0x05, 0x77, 0xa1, + 0x0f, 0x7b, 0x50, 0xc7, 0x1d, 0x58, 0x17, 0xbb, + 0x7b, 0x80, 0x41, 0x57, 0x93, 0x7a, 0x0a, 0xe7, + 0x2c, 0x92, 0xba, 0x7e, 0x5d, 0x5b, 0xe5, 0xc4, + 0x6e, 0x91, 0x3b, 0x25, 0x8a, 0x50, 0xdd, 0x56, + 0x6f, 0xab, 0xa8, 0x71, 0xa4, 0xde, 0x01, 0x8f, + 0x81, 0x97, 0x45, 0x48, 0x4e, 0xf4, 0xa3, 0x60, + 0xb1, 0x00, 0xbf, 0xcb, 0x03, 0xd9, 0xfe, 0xab, + 0x52, 0xab, 0xb4, 0x56, 0x5f, 0x2b, 0x47, 0xdb, + 0x2d, 0x65, 0x67, 0xb5, 0x31, 0xd0, 0xef, 0x0b, + 0xbe, 0xe2, 0xe7, 0xa6, 0x91, 0xa7, 0xd4, 0xa9, + 0x38, 0x9b, 0xe6, 0xcc, 0x83, 0x61, 0xc1, 0xb7, + 0x45, 0xc6, 0x7c, 0x84, 0x1e, 0x70, 0xae, 0xb6, + 0x5d, 0xe2, 0x94, 0x59, 0xa9, 0x5b, 0x39, 0x5f, + 0x92, 0xf2, 0x27, 0xf3, 0x42, 0x91, 0xf6, 0x66, + 0x57, 0xad, 0x24, 0x9f, 0x74, 0x97, 0x00, 0x27, + 0x95, 0xc5, 0x0a, 0x9c, 0x75, 0xb6, 0x04, 0xd3, + 0x29, 0xce, 0x92, 0xd6, 0x73, 0x7e, 0xcf, 0x3d, + 0x2f, 0xa4, 0x92, 0x04, 0xdb, 0x2d, 0x12, 0x68, + 0x1b, 0x99, 0x1f, 0x66, 0xab, 0x77, 0x56, 0x06, + 0x79, 0x7d, 0x32, 0x2a, 0x8c, 0xb9, 0xd3, 0xb0, + 0xf7, 0x8a, 0xa8, 0xef, 0x66, 0xad, 0x0c, 0xf8, + 0x83, 0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9, 0x2d, 0xb4, 0x57, 0x77, 0xdf, 0x0a, 0x26, + 0x2a, 0x93, 0x5d, 0x67, 0x61, 0x2f, 0xfe, 0xf2, + 0xab, 0x98, 0x39, 0x46, 0xea, 0x1c, 0xb0, 0xc0, + 0x6d, 0xe4, 0x9c, 0x66, 0x8e, 0xa7, 0xf5, 0xaf, + 0x8f, 0x52, 0x0a, 0xae, 0x82, 0xc9, 0xc3, 0x88, + 0x6b, 0xbb, 0x49, 0x47, 0x79, 0xbe, 0x7a, 0x8e, + 0x4f, 0x01, 0x82, 0x07, 0xed, 0x51, 0x03, 0x7f, + 0x57, 0x7a, 0x5e, 0xc8, 0xdf, 0xe0, 0x58, 0xef, + 0x61, 0x7a, 0x37, 0x83, 0x1b, 0x6c, 0x13, 0xfb, + 0x48, 0xf2, 0x7e, 0x0f, 0x49, 0x19, 0xd7, 0x1a, + 0x92, 0xac, 0xd2, 0xb7, 0x09, 0xc0, 0xb1, 0xa9, + 0x1e, 0x46, 0x8a, 0x0d, 0xe4, 0x79, 0xb0, 0xc7, + 0x05, 0xda, 0x6d, 0x55, 0xc4, 0x72, 0x71, 0xa7, + 0x00, 0x1e, 0x32, 0x9a, 0x7b, 0xa0, 0x95, 0x83, + 0x2b, 0xec, 0x02, 0xab, 0x98, 0xf3, 0x4e, 0x05, + 0x76, 0xec, 0xbc, 0x3b, 0xbf, 0x33, 0x17, 0xf6, + 0x85, 0x90, 0x0c, 0x0f, 0x0a, 0xbb, 0xe8, 0xb2, + 0xf7, 0x48, 0x48, 0x73, 0x41, 0x74, 0x92, 0x93, + 0x6b, 0x24, 0x2a, 0x9d, 0x44, 0xd5, 0xd4, 0x3c, + 0xf9, 0x23, 0xc7, 0x8e, 0x6e, 0x6b, 0x7a, 0x5c, + 0x57, 0xfb, 0xd9, 0x16, 0x57, 0xe3, 0x49, 0xd1, + 0x73, 0x46, 0xec, 0x14, 0xb4, 0x49, 0x2e, 0x79, + 0x2d, 0xf3, 0x65, 0x32, 0x57, 0x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 0x0c, 0x1e, 0xb1, 0xdf, 0xf2, 0xff, 0xeb, + 0xff, 0x1f, 0xff, 0x5f, 0xf8, 0xff, 0x65, 0xf7, + 0x9c, 0x6d, 0x57, 0x76, 0xf6, 0xe8, 0x77, 0x03, + 0xeb, 0xf5, 0x2f, 0xdc, 0xa1, 0xbd, 0x0e, 0x66, + 0x98, 0x53, 0xca, 0xf4, 0xba, 0x56, 0xd2, 0x56, + 0xba, 0x5d, 0x04, 0xfc, 0x65, 0xbb, 0xb1, 0x16, + 0x6a, 0x60, 0x15, 0x75, 0x27, 0x2b, 0xb4, 0xd3, + 0xac, 0xf0, 0xf7, 0xac, 0x9d, 0xf3, 0x73, 0xe6, + 0x3c, 0xad, 0x98, 0xb7, 0xed, 0x58, 0xc8, 0x39, + 0x21, 0x04, 0x19, 0x2b, 0x69, 0x02, 0x86, 0x02, + 0x0e, 0x64, 0x8e, 0xbf, 0x22, 0x31, 0x19, 0x85, + 0x00, 0x64, 0x32, 0x8c, 0xbd, 0x00, 0xed, 0x45, + 0x97, 0x79, 0xab, 0x8e, 0xc0, 0xe2, 0x8e, 0xea, + 0x8e, 0xbe, 0x13, 0x6c, 0x07, 0x46, 0x0c, 0xa2, + 0x7f, 0x12, 0xe8, 0x6c, 0xf1, 0x58, 0x35, 0x72, + 0xfe, 0xf8, 0xfe, 0xb8, 0xb7, 0xf8, 0xb7, 0xd2, + 0x03, 0xfb, 0xfb, 0x4f, 0xd5, 0x5e, 0xa5, 0x1e, + 0xcc, 0x46, 0xd1, 0x8d, 0x8b, 0x4e, 0x45, 0x69, + 0xa6, 0xfb, 0xfa, 0xde, 0xba, 0xb0, 0x65, 0x3d, + 0x7c, 0x0b, 0x9a, 0x06, 0xf9, 0x82, 0x70, 0xa5, + 0xd8, 0xcf, 0xab, 0xde, 0xdc, 0x51, 0x54, 0xc9, + 0xeb, 0x7b, 0x15, 0xca, 0x64, 0x88, 0xee, 0xda, + 0xd3, 0xed, 0x27, 0xfa, 0x69, 0x99, 0xe1, 0xed, + 0x69, 0xef, 0x33, 0x46, 0xba, 0xb3, 0xed, 0x24, + 0x01, 0xb9, 0x95, 0x4c, 0xc3, 0x06, 0x9c, 0x83, + 0x7c, 0x06, 0xd1, 0x3d, 0x38, 0x13, 0x4c, 0xb2, + 0x71, 0x23, 0xd7, 0x69, 0x3a, 0x69, 0x73, 0x92, + 0x4e, 0x1a, 0x25, 0x7b, 0xee, 0xdd, 0xc7, 0x21, + 0xae, 0x53, 0xc2, 0x4c, 0x4e, 0x74, 0x0c, 0x30, + 0x6f, 0x01, 0x59, 0x80, 0xd4, 0xb9, 0x8a, 0xb3, + 0x16, 0xc4, 0xe8, 0x1a, 0x8b, 0x75, 0xd6, 0xe8, + 0xfc, 0xd3, 0x05, 0x52, 0x36, 0x4f, 0x1d, 0xc8, + 0x5e, 0x52, 0xf3, 0x14, 0x2b, 0x97, 0x84, 0x1d, + 0xb4, 0x4f, 0xfa, 0x83, 0x8a, 0x59, 0x39, 0xc0, + 0x1c, 0x29, 0x60, 0x18, 0xeb, 0x64, 0x76, 0x50, + 0x66, 0xe1, 0xb1, 0xd3, 0x97, 0xe6, 0xe6, 0xf8, + 0x55, 0x77, 0x33, 0xac, 0x57, 0xc7, 0x48, 0x41, + 0x8e, 0x53, 0x45, 0x79, 0x8f, 0x25, 0x1e, 0xf1, + 0x15, 0xa2, 0xbc, 0xb2, 0x92, 0x1f, 0x3a, 0xaa, + 0xdb, 0xf7, 0xec, 0x75, 0x67, 0xbd, 0x16, 0xd5, + 0x8a, 0x84, 0x75, 0x22, 0x07, 0xfd, 0x0e, 0x93, + 0xf2, 0x6b, 0x8f, 0x49, 0x1a, 0x66, 0x72, 0xa4, + 0xd4, 0x63, 0xed, 0x9a, 0xc0, 0xf6, 0x7c, 0xd5, + 0xc5, 0x0e, 0xcf, 0x23, 0xae, 0x29, 0x35, 0x30, + 0xdc, 0xd9, 0xd0, 0xe1, 0x29, 0xe7, 0x94, 0x93, + 0x70, 0xce, 0x38, 0x13, 0xce, 0x7f, 0x38, 0x89, + 0x67, 0x23, 0x8f, 0x47, 0xea, 0x63, 0xbb, 0xb2, + 0x62, 0xbd, 0xd2, 0x95, 0x79, 0x99, 0x4a, 0x57, + 0x66, 0x24, 0xd9, 0x60, 0x3f, 0x12, 0x91, 0xc9, + 0xc4, 0x68, 0x40, 0xae, 0x1b, 0xf5, 0x22, 0x61, + 0xad, 0x4a, 0x20, 0x79, 0x9b, 0x0a, 0x69, 0x98, + 0xa7, 0xe0, 0x9d, 0xd7, 0x1c, 0x98, 0x1f, 0xf8, + 0x0a, 0x9f, 0xf1, 0xec, 0xd4, 0xe3, 0xd3, 0x8d, + 0xd1, 0xdd, 0xab, 0x5a, 0xa4, 0x19, 0x64, 0x0c, + 0x5a, 0x46, 0xa1, 0xa3, 0x80, 0x9b, 0xa5, 0x0c, + 0xb0, 0x2c, 0xbc, 0x84, 0x37, 0xe2, 0x81, 0x7d, + 0xa8, 0x15, 0x19, 0x78, 0x4a, 0xde, 0x10, 0x51, + 0xd4, 0x93, 0x1c, 0x8c, 0x49, 0x4b, 0xf4, 0xdd, + 0x1a, 0xa8, 0xe6, 0x60, 0x82, 0xe7, 0x76, 0xc7, + 0x06, 0x24, 0x50, 0x8f, 0xdb, 0x63, 0xf6, 0x84, + 0x3d, 0x81, 0x4c, 0x48, 0xd7, 0x12, 0x3c, 0x37, + 0x95, 0x54, 0xcd, 0xa5, 0xc3, 0x94, 0x73, 0xc9, + 0x59, 0x87, 0x3b, 0x9e, 0x70, 0x96, 0x9c, 0xf5, + 0x67, 0x09, 0xb8, 0xdf, 0x2b, 0xbb, 0xb2, 0x46, + 0x7b, 0x73, 0xe5, 0x9a, 0x71, 0xd3, 0xc8, 0x1d, + 0xbf, 0x5a, 0x49, 0x19, 0x53, 0xfe, 0xf5, 0x37, + 0xd7, 0xfd, 0x47, 0x9d, 0x4c, 0x87, 0xba, 0xa9, + 0x7c, 0x54, 0x5d, 0xd8, 0x70, 0x88, 0x0b, 0x78, + 0x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, 0x7a, 0x9a, 0x50, 0xb0, 0xd7, + 0xe5, 0x10, 0x6c, 0x0c, 0x81, 0x35, 0xa2, 0x9a, + 0xa9, 0xe8, 0xec, 0x70, 0x78, 0x46, 0xc4, 0xbc, + 0x25, 0x73, 0x26, 0xdc, 0x47, 0xa2, 0x73, 0x6b, + 0xcb, 0x6c, 0x7d, 0xde, 0xeb, 0xfb, 0x04, 0x3e, + 0x67, 0xaf, 0x37, 0xcb, 0x18, 0x6a, 0xf4, 0x5f, + 0x65, 0xe8, 0xa5, 0x3d, 0x1a, 0x12, 0xdc, 0x55, + 0x11, 0x87, 0x15, 0x92, 0x3d, 0x98, 0x5d, 0x8a, + 0x3e, 0xb7, 0x70, 0x14, 0x75, 0xca, 0x1c, 0xe4, + 0x76, 0x80, 0xa7, 0x59, 0x0f, 0x3b, 0xb5, 0xda, + 0xf3, 0xf5, 0x79, 0xe5, 0x65, 0xd7, 0xa6, 0x63, + 0x81, 0xe6, 0x3d, 0x91, 0xbd, 0x4a, 0x2c, 0xea, + 0xcc, 0x79, 0x76, 0x9b, 0x80, 0x06, 0xcf, 0xbd, + 0x33, 0x77, 0x3e, 0xe5, 0x39, 0x2a, 0xd9, 0xb3, + 0x33, 0x92, 0x7b, 0xb9, 0x32, 0x77, 0xfc, 0x1b, + 0x23, 0x01, 0x92, 0x95, 0x32, 0xae, 0x19, 0x62, + 0xff, 0xd7, 0xb3, 0xed, 0x19, 0x19, 0xf7, 0x56, + 0x90, 0x43, 0x91, 0xb7, 0xae, 0x75, 0xaf, 0x7a, + 0xa6, 0xf7, 0x79, 0x20, 0x7d, 0x5a, 0xa1, 0xf3, + 0x94, 0xa8, 0xcb, 0xdc, 0x36, 0x78, 0xdd, 0xc8, + 0x08, 0x9d, 0x0a, 0x8c, 0x13, 0x95, 0x11, 0x58, + 0xfb, 0x9e, 0xde, 0x07, 0x3f, 0x67, 0x7f, 0xd2, + 0xb9, 0xb1, 0x7f, 0xa3, 0x0b, 0x73, 0xc2, 0x37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0x86, 0x7d, 0x89, 0xd1, 0xa3, + 0x18, 0xa7, 0x18, 0x07, 0x4e, 0x08, 0xb4, 0x0e, + 0x98, 0x4e, 0xb9, 0xa4, 0x7c, 0x0a, 0x7b, 0x4c, + 0x43, 0x74, 0x5e, 0x03, 0x04, 0x2a, 0x7a, 0x2c, + 0xe0, 0xd9, 0x24, 0x9c, 0xbd, 0xda, 0xda, 0x00, + 0x64, 0x3d, 0x0e, 0xbb, 0x41, 0xab, 0x69, 0x0e, + 0xa0, 0x73, 0x32, 0x1e, 0x6a, 0x24, 0x59, 0xb3, + 0x7d, 0x23, 0xf8, 0x54, 0x70, 0x9e, 0xfa, 0x3d, + 0x83, 0xe4, 0x55, 0xc9, 0xea, 0xa6, 0xd8, 0x7b, + 0xd6, 0x5b, 0xe0, 0x9c, 0x03, 0x71, 0xbd, 0x8c, + 0xa0, 0x17, 0xaf, 0xde, 0x56, 0xe2, 0x27, 0xfb, + 0x7c, 0xb6, 0x64, 0x2c, 0x1f, 0x3b, 0xb9, 0xc9, + 0x91, 0x25, 0x13, 0xe4, 0x09, 0x89, 0x13, 0xd5, + 0xec, 0x69, 0x42, 0xcc, 0x4e, 0xd9, 0x73, 0xf6, + 0x23, 0x51, 0x41, 0x36, 0xd2, 0xab, 0xee, 0x8f, + 0x66, 0x12, 0x63, 0x38, 0x77, 0x08, 0xf6, 0xcb, + 0x3e, 0xd5, 0x29, 0xdb, 0xfd, 0xfc, 0x42, 0x21, + 0x18, 0x40, 0x0c, 0xc8, 0x5c, 0x63, 0x17, 0x03, + 0x91, 0xc5, 0x39, 0x08, 0x77, 0x61, 0x97, 0xd1, + 0xc1, 0x51, 0xe9, 0x46, 0xdd, 0xa1, 0xe3, 0x62, + 0x55, 0x9a, 0x1c, 0x3f, 0x5e, 0xda, 0x9b, 0xc8, + 0xe2, 0x88, 0x0a, 0x85, 0x95, 0xc2, 0x81, 0x60, + 0x40, 0x05, 0x82, 0x97, 0xdf, 0xed, 0x77, 0xf3, + 0x0b, 0xa3, 0x5b, 0xdd, 0x97, 0xf4, 0x7e, 0x70, + 0xcf, 0xfa, 0xad, 0x75, 0x2f, 0xb8, 0xd7, 0xbe, + 0xcf, 0xbe, 0xc3, 0x58, 0x64, 0x58, 0x43, 0xa4, + 0x84, 0xb5, 0xaf, 0x0d, 0x25, 0x75, 0x14, 0x55, + 0x71, 0x7f, 0xc5, 0xe2, 0x11, 0x9f, 0x3f, 0x9f, + 0x39, 0x82, 0xbd, 0x84, 0x11, 0x49, 0xdc, 0x53, + 0x1c, 0xf9, 0x71, 0x4f, 0x5d, 0x35, 0xac, 0xc3, + 0x94, 0x48, 0x86, 0xd0, 0x6d, 0x11, 0xc5, 0xca, + 0x04, 0x18, 0x29, 0xc0, 0xe7, 0x6b, 0x50, 0xc6, + 0x04, 0xdf, 0xbb, 0x1c, 0xe5, 0x67, 0x60, 0x44, + 0x5d, 0xb7, 0x08, 0xb6, 0xad, 0x95, 0x15, 0x0a, + 0x18, 0xb5, 0x62, 0x31, 0x51, 0x37, 0x8c, 0x71, + 0xdd, 0x1a, 0x58, 0x36, 0x9c, 0xfb, 0x58, 0x6b, + 0xf0, 0xb9, 0x00, 0xa8, 0x21, 0xe4, 0xfa, 0x81, + 0x27, 0x6a, 0x3e, 0xec, 0x48, 0x6e, 0xcf, 0x60, + 0xce, 0xf3, 0x64, 0xcf, 0x35, 0xf9, 0x4c, 0x10, + 0x91, 0x8d, 0x69, 0x51, 0xb1, 0xab, 0x29, 0x09, + 0xfb, 0x10, 0x11, 0xac, 0x3c, 0x3d, 0xc9, 0x0d, + 0x18, 0x3b, 0xa2, 0xce, 0x60, 0xdd, 0x5b, 0x3f, + 0x0e, 0x28, 0xfd, 0xb7, 0xc1, 0x68, 0x60, 0xaf, + 0x43, 0x9d, 0x12, 0x3d, 0x37, 0x02, 0x74, 0x01, + 0xc8, 0x76, 0x71, 0xe5, 0xe2, 0x8f, 0x96, 0xda, + 0xef, 0x5f, 0x87, 0x0c, 0x59, 0xf8, 0x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41, 0xbf, 0xc3, 0xa4, 0x40, 0x23, 0x8a, + 0x60, 0xce, 0x0b, 0xc6, 0xbe, 0xed, 0x25, 0xb4, + 0x90, 0x3b, 0x1d, 0x55, 0x79, 0x79, 0x79, 0xf7, + 0xdc, 0xee, 0xe4, 0x6e, 0xc9, 0x31, 0x6a, 0x36, + 0x68, 0xa7, 0x84, 0xe4, 0x6f, 0x28, 0xa2, 0xef, + 0xbb, 0xf0, 0x46, 0x44, 0xa7, 0x38, 0xeb, 0x53, + 0xcb, 0x69, 0xd1, 0x83, 0x8c, 0xa8, 0x13, 0x21, + 0x6d, 0xd0, 0xfc, 0xed, 0x26, 0x27, 0x6d, 0x8c, + 0x31, 0x4e, 0xf1, 0x65, 0xf0, 0x25, 0xd7, 0xed, + 0xd1, 0x00, 0x74, 0x7f, 0xfe, 0x64, 0x5d, 0x9b, + 0x62, 0xf5, 0x33, 0xcf, 0x92, 0xb9, 0x97, 0x12, + 0x7c, 0xa4, 0xdb, 0x6c, 0x91, 0xcf, 0x32, 0xe4, + 0xcd, 0x63, 0xd7, 0x84, 0x30, 0x72, 0x82, 0x3c, + 0x55, 0x11, 0x85, 0xb8, 0xcb, 0x01, 0x45, 0x88, + 0xb8, 0xf1, 0xc9, 0x3a, 0x6b, 0x51, 0x13, 0xc7, + 0x6f, 0x83, 0x36, 0x98, 0x05, 0x4d, 0x94, 0xfb, + 0x67, 0x9e, 0x65, 0x8e, 0x8a, 0x0a, 0xea, 0x90, + 0xdb, 0xb0, 0xcf, 0x52, 0xd6, 0x18, 0x4f, 0x58, + 0x9f, 0x74, 0x67, 0xad, 0x8b, 0x20, 0xd7, 0x19, + 0x91, 0xc3, 0x2a, 0x7a, 0x17, 0x03, 0x59, 0x67, + 0xad, 0xf4, 0xb2, 0x51, 0x83, 0x39, 0xa9, 0x3e, + 0x47, 0x2e, 0x3e, 0xb0, 0x0e, 0x8a, 0xd2, 0x67, + 0x26, 0x44, 0xbe, 0x8d, 0xac, 0x8a, 0x98, 0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4, 0x33, 0x25, 0xa2, 0xce, 0xff, + 0x92, 0x6d, 0x17, 0xd6, 0xca, 0x81, 0xb7, 0xbe, + 0xda, 0x9e, 0x37, 0xe7, 0xed, 0x85, 0xc7, 0xf3, + 0x6f, 0x1f, 0xa8, 0x51, 0x87, 0xf6, 0x85, 0x3d, + 0xec, 0xc9, 0x34, 0x9f, 0x5f, 0xe8, 0x55, 0xd7, + 0x2d, 0x06, 0x0f, 0xc2, 0x58, 0x7d, 0x94, 0x41, + 0xad, 0x56, 0x07, 0x7b, 0x47, 0x88, 0x67, 0x0a, + 0x44, 0xde, 0x93, 0x32, 0xbe, 0x35, 0xee, 0x80, + 0xf7, 0xe4, 0x4c, 0x3a, 0x93, 0x5e, 0x69, 0x77, + 0x4e, 0xfb, 0x38, 0x19, 0x21, 0x55, 0x99, 0x1b, + 0x46, 0x15, 0x36, 0xdc, 0x15, 0xcc, 0x37, 0x3d, + 0xa5, 0xd7, 0xa6, 0xc3, 0x79, 0x56, 0x74, 0xa5, + 0x2a, 0xea, 0xad, 0x29, 0x33, 0x99, 0xc3, 0x3c, + 0x69, 0x3c, 0x6a, 0x82, 0xb9, 0xf7, 0x77, 0xbd, + 0xb5, 0xae, 0x8c, 0x05, 0x59, 0xfb, 0x46, 0x67, + 0x13, 0x70, 0x49, 0x8a, 0x14, 0x8e, 0x53, 0x6e, + 0xda, 0x16, 0x3c, 0xb7, 0x76, 0x85, 0x2b, 0x20, + 0xed, 0xf0, 0x3d, 0x50, 0x2c, 0xec, 0x2a, 0x86, + 0xb9, 0xb7, 0xc5, 0x60, 0x8d, 0xc4, 0xf2, 0xfd, + 0x8e, 0x5e, 0x8a, 0xf2, 0x3f, 0xf5, 0x0a, 0xc3, + 0xd7, 0x60, 0xdd, 0xf8, 0x6a, 0x7b, 0x31, 0x58, + 0xc5, 0xfe, 0x39, 0xf0, 0xda, 0x09, 0x3b, 0x17, + 0xcc, 0x13, 0x81, 0xf9, 0x15, 0xb5, 0xae, 0xda, + 0xcd, 0xc3, 0xb4, 0x93, 0xaa, 0x15, 0x0f, 0x1f, + 0x75, 0x92, 0x55, 0xb5, 0x3a, 0xf2, 0x14, 0xeb, + 0x4f, 0x90, 0xb1, 0xa0, 0xb0, 0xa6, 0x9e, 0x0c, + 0x92, 0x46, 0xc5, 0xb8, 0x10, 0x5c, 0x60, 0xd7, + 0xf8, 0x0d, 0x17, 0x9f, 0xd4, 0x01, 0x07, 0x55, + 0xfa, 0x08, 0x39, 0x28, 0xb6, 0xbe, 0x68, 0x93, + 0xf6, 0x36, 0x1c, 0xa5, 0xfd, 0x73, 0xf6, 0xc4, + 0xe3, 0xb1, 0xb7, 0x82, 0xa1, 0xc1, 0xb6, 0x85, + 0x4f, 0x90, 0x52, 0xd6, 0xd8, 0x3c, 0x13, 0x7d, + 0xd4, 0x61, 0x15, 0xca, 0xf6, 0xd0, 0x3b, 0x35, + 0x94, 0x8d, 0x29, 0x63, 0xc1, 0x5f, 0xe8, 0x7c, + 0x87, 0xfd, 0xa6, 0x40, 0x36, 0x3e, 0x7f, 0xfc, + 0x21, 0xbf, 0x4c, 0x66, 0xc8, 0x57, 0xf9, 0x93, + 0x5d, 0x32, 0x66, 0x49, 0xd1, 0xbd, 0x78, 0x6c, + 0xe6, 0x07, 0x79, 0x6e, 0x80, 0xe2, 0xdd, 0x25, + 0xe7, 0xb2, 0x69, 0xfc, 0x63, 0x91, 0xea, 0xa2, + 0x3e, 0xec, 0xc3, 0x40, 0x4e, 0x65, 0x68, 0x53, + 0xac, 0x46, 0x2b, 0x15, 0xf6, 0xba, 0xc9, 0xf2, + 0x09, 0xac, 0x79, 0x8a, 0x74, 0x5d, 0x8f, 0x0d, + 0x2e, 0xab, 0x57, 0x4e, 0xe6, 0x52, 0x63, 0xef, + 0xf1, 0x1c, 0x4f, 0xf2, 0xeb, 0x98, 0x05, 0x56, + 0xa2, 0x3b, 0x46, 0x3f, 0x12, 0x51, 0xde, 0x53, + 0x41, 0x16, 0x34, 0xd4, 0xcd, 0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 0x68, + 0x49, 0xc7, 0xed, 0x29, 0x5e, 0xeb, 0x75, 0x14, + 0x49, 0x82, 0x3c, 0x2c, 0xb8, 0x79, 0xfe, 0x67, + 0xf7, 0x3a, 0x76, 0x6f, 0xf6, 0xce, 0xfc, 0x34, + 0x68, 0x7f, 0x69, 0x5e, 0x60, 0xee, 0xe0, 0x15, + 0x83, 0xbd, 0xff, 0xf3, 0x62, 0xf2, 0x65, 0xb0, + 0x4e, 0xb0, 0x9a, 0x72, 0x36, 0xec, 0xbe, 0x82, + 0xb6, 0x77, 0x82, 0x62, 0x3f, 0xdc, 0x4b, 0xf4, + 0xd3, 0x77, 0xa9, 0x6a, 0xca, 0x48, 0x99, 0xd1, + 0x13, 0x9d, 0x92, 0x4a, 0x5d, 0xbc, 0x73, 0xdd, + 0x9d, 0xe6, 0x7f, 0xde, 0xd3, 0xde, 0xfc, 0xb1, + 0x33, 0xa1, 0xca, 0x75, 0xc0, 0x88, 0xba, 0xb2, + 0x35, 0x86, 0x9d, 0x6b, 0xc1, 0x8f, 0x1d, 0xd3, + 0xb7, 0xa6, 0xc7, 0xde, 0xf5, 0x73, 0x23, 0xca, + 0x7b, 0xfd, 0xcd, 0x0a, 0x58, 0xfd, 0xfb, 0xba, + 0x70, 0x84, 0x4f, 0x66, 0x99, 0x09, 0x9f, 0x50, + 0x96, 0x10, 0xdc, 0xda, 0x66, 0x57, 0x74, 0x06, + 0x78, 0xb7, 0x5c, 0x5d, 0x32, 0xd6, 0xcd, 0x44, + 0x0f, 0x41, 0xc9, 0x3e, 0xcc, 0x12, 0x41, 0x5d, + 0x3f, 0xbe, 0xfe, 0xcb, 0x67, 0x8f, 0x1f, 0xc9, + 0xbe, 0x7e, 0xfd, 0x67, 0x55, 0x50, 0x64, 0xb8, + 0x83, 0xe7, 0x6f, 0xc1, 0xef, 0xbb, 0x45, 0xab, + 0x58, 0xbd, 0xfb, 0xe3, 0x83, 0xd5, 0x7e, 0x47, + 0xfa, 0xe5, 0x6e, 0x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04, 0x8f, 0x68, 0xdf, 0x03, 0xcf, 0x48, + 0x4e, 0xa0, 0x15, 0x3e, 0x5f, 0xe4, 0xf5, 0x25, + 0xf6, 0x59, 0x30, 0xce, 0xa6, 0x78, 0x5a, 0x3c, + 0x1b, 0x0d, 0xfd, 0xd9, 0xc8, 0xcf, 0x1c, 0x7c, + 0xd6, 0x05, 0x20, 0x66, 0x1a, 0x75, 0x79, 0x55, + 0x06, 0x7a, 0xfb, 0xa6, 0x95, 0x19, 0xf4, 0x8e, + 0xed, 0xb4, 0x39, 0xe3, 0x7c, 0x23, 0xaa, 0x1a, + 0x61, 0x3d, 0xbd, 0x4a, 0xd8, 0x9b, 0x54, 0xf4, + 0x73, 0x72, 0x8a, 0x66, 0x91, 0x61, 0xc7, 0x32, + 0x45, 0x8d, 0x3a, 0x99, 0x34, 0x79, 0xd4, 0xf5, + 0x45, 0xae, 0x64, 0x74, 0xbf, 0x91, 0x25, 0x13, + 0xd9, 0x27, 0xb4, 0x65, 0xca, 0xe0, 0x93, 0x3b, + 0xfa, 0x75, 0xd6, 0xff, 0x93, 0x97, 0x7a, 0x1a, + 0xb9, 0xfe, 0xac, 0x64, 0xe8, 0x36, 0xf1, 0x08, + 0x6d, 0xea, 0xd3, 0x55, 0xac, 0x5f, 0x92, 0x4d, + 0x70, 0x22, 0xaf, 0x0d, 0x3b, 0xb9, 0x80, 0x25, + 0xc7, 0x58, 0x4d, 0x2b, 0x09, 0x72, 0x1f, 0xf9, + 0xdd, 0x34, 0x9f, 0x39, 0x4e, 0xdb, 0x30, 0x93, + 0x4c, 0x76, 0xb5, 0xd8, 0x3a, 0x8a, 0x72, 0xc7, + 0xa2, 0x56, 0xda, 0x22, 0x8e, 0xa8, 0x6a, 0x43, + 0x2b, 0x0c, 0x88, 0x63, 0xda, 0x99, 0x34, 0x97, + 0x74, 0x7b, 0x83, 0x7c, 0x9f, 0x10, 0x77, 0x84, + 0xe8, 0x19, 0xb0, 0xa4, 0x13, 0x3e, 0xf1,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0xfd, 0xe4, 0xde, 0xbf, 0xa7, 0xfe, + 0x3c, 0x63, 0xc4, 0x1d, 0x71, 0xdd, 0x84, 0x73, + 0xdd, 0x7c, 0xa4, 0x67, 0x37, 0x26, 0xbe, 0xaf, + 0x89, 0xea, 0xd1, 0x82, 0x03, 0xe8, 0x1a, 0x9f, + 0xf3, 0xd9, 0x29, 0xd8, 0x59, 0xbb, 0xe0, 0x64, + 0xcd, 0x82, 0xde, 0xfc, 0x59, 0xfd, 0x5e, 0x15, + 0xab, 0x80, 0x28, 0xbe, 0x74, 0x7c, 0x79, 0xff, + 0x82, 0x37, 0xcf, 0x17, 0x54, 0x64, 0xec, 0xde, + 0x74, 0x66, 0x41, 0x13, 0x30, 0x99, 0x59, 0xb6, + 0x9b, 0x9d, 0x94, 0x7d, 0xd6, 0x9e, 0xea, 0x7c, + 0x6d, 0x17, 0xec, 0x94, 0x38, 0xf0, 0x8e, 0x6e, + 0xe7, 0x07, 0x9e, 0xe8, 0x04, 0x7e, 0x19, 0x19, + 0xa8, 0x51, 0x90, 0x1c, 0x1b, 0x19, 0x78, 0x87, + 0x6b, 0xa2, 0xd3, 0xe6, 0xa4, 0x39, 0xe9, 0x18, + 0x0e, 0x56, 0xca, 0x8b, 0xdf, 0x46, 0x1c, 0x66, + 0xc1, 0x58, 0x8f, 0x5b, 0xe5, 0xba, 0x3c, 0xa6, + 0x1b, 0x4f, 0x85, 0xa7, 0x87, 0x2a, 0xa9, 0x2c, + 0x22, 0x52, 0x95, 0xa0, 0x68, 0x96, 0x4d, 0x51, + 0x33, 0xef, 0x65, 0x45, 0x94, 0x4a, 0x3e, 0xef, + 0x69, 0x88, 0xcf, 0x8a, 0x98, 0x72, 0x8c, 0x8e, + 0x05, 0xd4, 0xa4, 0xc2, 0x8d, 0xb9, 0x4b, 0x1f, + 0xc8, 0x9e, 0x03, 0xd8, 0x59, 0x0a, 0x50, 0xc5, + 0x2b, 0x58, 0x0b, 0x18, 0xb0, 0xcb, 0x67, 0xd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ea, 0x6f, 0xe5, 0x33, 0xab, 0x57, 0xee, + 0x91, 0x6f, 0x7b, 0x4f, 0x36, 0x8c, 0x9e, 0x38, + 0xd4, 0xe7, 0x1f, 0xf4, 0x91, 0xaa, 0xac, 0x31, + 0x99, 0x30, 0xff, 0xe3, 0x7c, 0x82, 0x65, 0x9d, + 0x65, 0x1f, 0xbf, 0xce, 0xb9, 0xd1, 0xfd, 0xc6, + 0x11, 0x97, 0xd6, 0x2a, 0x9e, 0xd0, 0xe0, 0x07, + 0x09, 0x36, 0xee, 0x3c, 0xf9, 0xfe, 0xac, 0xf0, + 0xf6, 0x67, 0x7a, 0xf9, 0xee, 0xf7, 0xea, 0x6d, + 0xc8, 0x40, 0x9d, 0x08, 0xe8, 0x9b, 0xa9, 0xe3, + 0xab, 0x80, 0x98, 0xcc, 0xf6, 0xa7, 0x74, 0xfc, + 0x41, 0xaa, 0x4d, 0xed, 0x94, 0x47, 0x6b, 0x19, + 0xd8, 0xfb, 0xe9, 0x76, 0xba, 0x9d, 0x3b, 0xfa, + 0xf6, 0xef, 0x69, 0xbf, 0xd0, 0xa1, 0x46, 0xc1, + 0x7f, 0xb1, 0x8f, 0x4f, 0xb2, 0x82, 0xf9, 0xeb, + 0x5c, 0xdb, 0x91, 0xac, 0xce, 0x8a, 0xa5, 0x35, + 0x70, 0x87, 0xc7, 0xec, 0x32, 0xa0, 0x9c, 0x32, + 0x83, 0xc3, 0x29, 0xba, 0xd8, 0x6b, 0x97, 0x38, + 0x24, 0xb4, 0x64, 0x13, 0x1c, 0x77, 0x52, 0xc9, + 0x30, 0x0c, 0xc0, 0x22, 0x57, 0xc9, 0x4f, 0xa3, + 0xb2, 0x23, 0x01, 0x4f, 0x19, 0xb9, 0xe3, 0xeb, + 0xde, 0x9a, 0xff, 0x69, 0x75, 0xdc, 0xc6, 0x3e, + 0x9b, 0xf9, 0xa3, 0x25, 0x67, 0xe1, 0x81, 0x88, + 0x14, 0x89, 0x8e, 0x5e, 0x52, 0x17, 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, 0x3e, 0x0f, 0xf2, 0x06, 0x31, 0x00, + 0xc3, 0x5e, 0x65, 0x3f, 0xdd, 0x55, 0xfb, 0xf5, + 0xfb, 0xfd, 0x27, 0xd3, 0xd1, 0x13, 0xcf, 0xa7, + 0x1b, 0xe5, 0x44, 0xd2, 0xe9, 0xde, 0x67, 0xd0, + 0x1d, 0x84, 0xd9, 0x61, 0x92, 0x3b, 0x06, 0x10, + 0x40, 0x3e, 0x0b, 0x79, 0xa6, 0xe1, 0x53, 0x41, + 0xf2, 0x51, 0x06, 0x10, 0xdf, 0x09, 0x6b, 0xf1, + 0x90, 0x85, 0x97, 0xc2, 0x27, 0x1a, 0x87, 0xf1, + 0x76, 0x89, 0x46, 0x24, 0xc7, 0x6d, 0xde, 0x5e, + 0xb4, 0x93, 0x80, 0x4b, 0xb2, 0xf6, 0x3c, 0xa8, + 0x0d, 0x35, 0x7c, 0x8e, 0x27, 0xb2, 0xab, 0x11, + 0x4a, 0x15, 0xc2, 0x5c, 0x5c, 0xa1, 0x57, 0xad, + 0x73, 0xf2, 0x39, 0x44, 0x18, 0xb9, 0x19, 0x51, + 0x4e, 0x2b, 0xc3, 0x4a, 0xfe, 0x40, 0xfa, 0xfb, + 0xe5, 0xa0, 0xa8, 0x16, 0x5f, 0x94, 0x55, 0xe5, + 0x45, 0x73, 0x63, 0x13, 0x06, 0x7c, 0x7d, 0xb1, + 0xa9, 0x6e, 0xaa, 0x77, 0x65, 0x3f, 0x46, 0x5e, + 0x75, 0xe5, 0xb0, 0x5f, 0xdb, 0xaf, 0x9d, 0x7a, + 0xad, 0x57, 0x85, 0xab, 0x9c, 0xc8, 0x28, 0x0d, + 0x46, 0xd3, 0x07, 0x2a, 0xaa, 0x2c, 0xea, 0x34, + 0x5c, 0xfd, 0xaf, 0x8b, 0x6f, 0x75, 0xe5, 0xbf, + 0x38, 0xf8, 0xec, 0x24, 0xea, 0x80, 0xd4, 0xef, + 0x73, 0x92, 0x16, 0x1d, 0xfd, 0x56, 0x7d, 0xdd, + 0x3f, 0xed, 0x8f, 0xec, 0x9b, 0x02, 0x6d, 0xc6, + 0x94, 0x4b, 0xca, 0x68, 0x10, 0xb7, 0x93, 0x07, + 0x29, 0xf3, 0x4f, 0x49, 0xf9, 0x9c, 0xd9, 0x61, + 0x8b, 0x44, 0xcf, 0x4a, 0x46, 0xee, 0x07, 0x93, + 0xd5, 0x66, 0xbf, 0x66, 0xb3, 0x0c, 0x3c, 0x3d, + 0x27, 0x48, 0x5b, 0x99, 0x8e, 0xd6, 0x3d, 0x67, + 0xcd, 0x81, 0x67, 0xfd, 0x40, 0x78, 0xb8, 0x7d, + 0x4f, 0xb2, 0xd2, 0x2d, 0xd2, 0xde, 0xa8, 0xe1, + 0x6f, 0x24, 0xaf, 0x1e, 0x33, 0x4b, 0x45, 0x5e, + 0xf6, 0x19, 0x0c, 0xac, 0x22, 0x28, 0xee, 0x83, + 0x2f, 0x22, 0xaa, 0x83, 0x07, 0xef, 0x55, 0xf2, + 0xc8, 0x35, 0x57, 0x53, 0x75, 0xbd, 0xca, 0x04, + 0x93, 0xfc, 0xe4, 0x93, 0xfe, 0xde, 0xeb, 0xa2, + 0x00, 0xfb, 0x37, 0x9f, 0x3a, 0x7a, 0xa5, 0xa4, + 0x54, 0x1a, 0x60, 0x3f, 0xf6, 0xaf, 0x43, 0x06, + 0x51, 0x8a, 0x9b, 0xef, 0x71, 0x6c, 0x44, 0x8e, + 0x5f, 0xf8, 0xcf, 0x43, 0xd1, 0xd3, 0x90, 0x5b, + 0xdb, 0x18, 0x9f, 0x0b, 0xb0, 0x8a, 0xf7, 0xac, + 0x57, 0x77, 0x48, 0x8d, 0x60, 0xbf, 0x63, 0xc0, + 0x75, 0x98, 0xff, 0x4d, 0x13, 0xec, 0x77, 0xd5, + 0x3c, 0x48, 0x5b, 0x33, 0x8d, 0xb0, 0xb7, 0xa5, + 0x8d, 0x55, 0x61, 0x73, 0xb0, 0x52, 0xa1, 0xcf, + 0x1e, 0x34, 0x59, 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b, 0xef, + 0x95, 0x76, 0x4b, 0x3f, 0xd8, 0x42, 0x03, 0xc3, + 0xdd, 0x84, 0x91, 0x91, 0x8b, 0x8d, 0xe7, 0x56, + 0x12, 0x64, 0x71, 0x10, 0x23, 0x45, 0x59, 0x0f, + 0xf1, 0x95, 0xaf, 0x11, 0x8c, 0x8a, 0xf7, 0x39, + 0x36, 0xe0, 0x6b, 0xe4, 0xe7, 0x8f, 0xe6, 0xd5, + 0x79, 0x75, 0x35, 0xd0, 0x15, 0x7c, 0xea, 0xb3, + 0x2e, 0xd8, 0xe0, 0xba, 0x78, 0x42, 0x8a, 0x12, + 0xf5, 0x64, 0x30, 0x2b, 0x9d, 0x93, 0x9d, 0x1a, + 0x42, 0x76, 0x87, 0x60, 0x9a, 0x21, 0xaf, 0x22, + 0x45, 0x26, 0xc8, 0x35, 0xbe, 0x81, 0x31, 0x3d, + 0xec, 0x29, 0x32, 0x1d, 0x72, 0x21, 0xc8, 0x36, + 0x89, 0xf1, 0x55, 0x12, 0x3b, 0x5e, 0x33, 0x62, + 0x80, 0x7f, 0x07, 0x38, 0x36, 0xa2, 0x9f, 0xcb, + 0xb6, 0xec, 0x82, 0x40, 0x57, 0xe9, 0x50, 0xb0, + 0x46, 0x05, 0x13, 0x48, 0xf8, 0x0b, 0x8a, 0xb9, + 0x6a, 0x28, 0x06, 0x76, 0x1f, 0x5b, 0x05, 0x09, + 0x5e, 0x6d, 0x2b, 0xde, 0xea, 0xbe, 0xfe, 0xf3, + 0x62, 0x72, 0x35, 0xa9, 0xa8, 0x27, 0x7b, 0xc2, + 0x60, 0x45, 0xa3, 0xb2, 0xbf, 0xe6, 0xcf, 0xef, + 0x2c, 0xec, 0xc2, 0xab, 0xb7, 0x64, 0xce, 0x3a, + 0xd6, 0x78, 0xb5, 0xa7, 0x18, 0xab, 0xfb, 0x43, + 0xce, 0xaa, 0xad, 0xec, 0x48, 0x0e, 0x86, 0x64, + 0x61, 0xa4, 0x90, 0xed, 0xef, 0xa8,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x71, 0xae, + 0xfb, 0xe2, 0x23, 0x31, 0x36, 0x23, 0x90, 0xcd, + 0xe8, 0x06, 0x02, 0x64, 0x34, 0x88, 0x01, 0x06, + 0x81, 0x8d, 0xe2, 0xf8, 0x82, 0x6d, 0x21, 0x8d, + 0xb1, 0x9c, 0x7c, 0x60, 0xaf, 0x64, 0x6c, 0xe3, + 0x84, 0xbd, 0xb6, 0xd7, 0x8e, 0x9c, 0xe5, 0xac, + 0xc5, 0x59, 0x67, 0x9f, 0xb3, 0x65, 0x27, 0xe7, + 0x44, 0x4e, 0x30, 0x52, 0x41, 0x31, 0x45, 0x8a, + 0x29, 0x5c, 0xb8, 0x58, 0x85, 0x0a, 0x8a, 0x29, + 0x52, 0x50, 0xac, 0xc2, 0x45, 0x0a, 0x15, 0x2e, + 0x54, 0xa4, 0xa0, 0x48, 0xe1, 0x62, 0x15, 0x14, + 0x2e, 0x28, 0x56, 0xa1, 0xc2, 0xc5, 0x14, 0xf3, + 0x3c, 0xe7, 0xff, 0xbe, 0xef, 0x37, 0xa3, 0x0b, + 0xce, 0x7e, 0xfe, 0xd1, 0x33, 0x02, 0x22, 0xeb, + 0x36, 0xf3, 0x5d, 0xde, 0xcb, 0xef, 0xe2, 0x3b, + 0xda, 0xf2, 0x35, 0xac, 0xe3, 0x7e, 0x25, 0xf9, + 0x75, 0x42, 0xee, 0x7f, 0x34, 0xb2, 0x42, 0x57, + 0xaa, 0x1e, 0x28, 0x73, 0xe7, 0x35, 0xea, 0x87, + 0xf2, 0x5b, 0x7e, 0xb0, 0xb9, 0xd3, 0xfd, 0xcb, + 0xf3, 0x76, 0xe7, 0x78, 0x23, 0x8a, 0x46, 0xac, + 0x12, 0xec, 0x28, 0x9f, 0xd6, 0x4b, 0xf0, 0x37, + 0x7c, 0x9b, 0x3d, 0x61, 0x87, 0xcf, 0xd0, 0x82, + 0x1e, 0x6a, 0xd7, 0x8c, 0x8c, 0x11, 0x3d, 0x8c, + 0x1b, 0xb5, 0x8a, 0x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xb8, + 0x4a, 0xa2, 0x1f, 0xa9, 0xa2, 0x0b, 0x65, 0x42, + 0x4b, 0x88, 0xbc, 0x6f, 0xe5, 0xed, 0x92, 0x7b, + 0x58, 0x27, 0x7c, 0x2a, 0x9c, 0xac, 0xd7, 0xf5, + 0x32, 0xb8, 0x61, 0x4d, 0x46, 0x20, 0x5d, 0x33, + 0x26, 0xa4, 0x84, 0x4e, 0x46, 0xdf, 0x61, 0xf8, + 0xa6, 0xdd, 0xd8, 0x51, 0xea, 0x15, 0x32, 0xd2, + 0x67, 0x1a, 0xca, 0xd1, 0xe7, 0x1d, 0x4c, 0xa0, + 0x77, 0x76, 0xb5, 0x01, 0xf8, 0xae, 0x57, 0xde, + 0x5e, 0xfe, 0xed, 0x5e, 0xe9, 0xa1, 0x11, 0x26, + 0xbc, 0xd9, 0x30, 0xc4, 0x55, 0x4f, 0xda, 0x49, + 0x2b, 0xdc, 0x8e, 0x0a, 0xb8, 0x5b, 0x9e, 0x3f, + 0x5e, 0xb4, 0x17, 0x8f, 0xd7, 0x09, 0x91, 0xd2, + 0x55, 0x17, 0xe5, 0x5c, 0xe7, 0x0f, 0xba, 0x96, + 0x6e, 0x49, 0x2c, 0x89, 0x83, 0x6d, 0xae, 0x69, + 0xce, 0x77, 0x3d, 0xbf, 0xab, 0x25, 0x42, 0x58, + 0x90, 0x86, 0x75, 0x04, 0x51, 0xae, 0x69, 0x16, + 0xb1, 0xd3, 0xda, 0xb7, 0xd2, 0x29, 0x42, 0xba, + 0x0d, 0xf8, 0x33, 0xa5, 0xf1, 0x02, 0xce, 0x4d, + 0xa4, 0x4d, 0x75, 0x60, 0xdf, 0x55, 0xa0, 0x9d, + 0x13, 0xfc, 0x31, 0x29, 0xed, 0x48, 0x26, 0xc4, + 0x64, 0xec, 0x8a, 0x71, 0x39, 0xf7, 0x50, 0x89, + 0xe7, 0x54, 0x88, 0x48, 0xfe, 0x20, 0x72, 0x3d, + 0xa8, 0xb8, 0x11, 0x35, 0x66, 0xc8, 0xdb, 0x6e, + 0x37, 0x25, 0x55, 0xce, 0x5b, 0x59, 0x19, 0xf5, + 0xa0, 0x92, 0xb2, 0xd0, 0x41, 0x60, 0x20, 0xe6, + 0x2b, 0xa5, 0xfc, 0x15, 0xa2, 0x42, 0x44, 0x3f, + 0x76, 0x7a, 0x9a, 0x14, 0x9b, 0xed, 0xc2, 0xf9, + 0x0c, 0x39, 0x61, 0x7d, 0x42, 0xcf, 0x7a, 0x1a, + 0x29, 0x9e, 0x66, 0x35, 0xa1, 0xd0, 0x9f, 0x1d, + 0xc4, 0xb1, 0xa6, 0xba, 0x5f, 0x53, 0x43, 0xda, + 0x52, 0x15, 0x5e, 0x59, 0x61, 0xcd, 0x61, 0xe1, + 0x03, 0x44, 0x59, 0x3b, 0x25, 0xff, 0x95, 0xaa, + 0x75, 0x9e, 0x9e, 0xb9, 0x79, 0x4d, 0x1a, 0x68, + 0xed, 0xb2, 0x01, 0xf7, 0x3a, 0x1b, 0x38, 0xbe, + 0x5e, 0x1d, 0x7c, 0xbb, 0xd2, 0x5a, 0x60, 0x17, + 0xd8, 0x0a, 0x53, 0xde, 0x76, 0x77, 0xab, 0x0f, + 0xb9, 0xb2, 0x3c, 0x0a, 0x52, 0xd0, 0x31, 0xc4, + 0x1a, 0x70, 0x83, 0xd6, 0x33, 0xc8, 0xec, 0xe3, + 0x42, 0xc2, 0x1e, 0xdf, 0x9c, 0xd8, 0xf4, 0xb4, + 0x1c, 0x3d, 0x77, 0xb3, 0x45, 0x71, 0x51, 0x27, + 0x25, 0x0c, 0x23, 0x5c, 0x1e, 0xd2, 0x47, 0x4a, + 0x4f, 0x4b, 0x02, 0x65, 0x22, 0x69, 0xd4, 0x22, + 0x81, 0xf3, 0x51, 0x2b, 0x9f, 0x36, 0x4e, 0x33, + 0x74, 0x8b, 0x88, 0x3e, 0xc9, 0x6c, 0xad, 0xe9, + 0xa7, 0x75, 0x5f, 0xc5, 0x68, 0xcc, 0x89, 0x28, + 0x1f, 0x29,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0x1c, 0xa7, + 0xaa, 0xcb, 0xae, 0x13, 0x94, 0x82, 0x52, 0xc1, + 0x51, 0x48, 0x27, 0x39, 0xca, 0xce, 0xae, 0x4c, + 0x6c, 0x7f, 0x6d, 0x06, 0x49, 0xcd, 0xc0, 0x47, + 0xd1, 0x20, 0x0e, 0x22, 0x4d, 0x75, 0xdc, 0x40, + 0x0f, 0xa7, 0x35, 0x28, 0xf4, 0x76, 0x50, 0xba, + 0x3e, 0xae, 0x9d, 0x98, 0x1f, 0x23, 0x01, 0x13, + 0x9d, 0x81, 0x21, 0x13, 0x21, 0x4f, 0xcc, 0xa9, + 0xf2, 0xd7, 0xd6, 0x80, 0xd4, 0xab, 0x5d, 0x09, + 0xf1, 0x03, 0xcd, 0xaf, 0x4e, 0x94, 0xc3, 0x51, + 0x9d, 0xb0, 0x12, 0xa4, 0xfb, 0x62, 0xa1, 0xfe, + 0x18, 0x09, 0xaf, 0xdb, 0x88, 0xb7, 0x76, 0x9f, + 0xf4, 0x3d, 0x44, 0xce, 0x72, 0x44, 0x8f, 0x38, + 0x53, 0x14, 0x81, 0x6f, 0x1e, 0x49, 0x47, 0x21, + 0x63, 0x88, 0xc5, 0x4b, 0xdc, 0x5d, 0x54, 0x82, + 0x99, 0xf1, 0xb1, 0x1b, 0x15, 0x2f, 0xc6, 0x11, + 0x15, 0x9d, 0x94, 0x17, 0x20, 0x06, 0xc2, 0x7e, + 0x4f, 0x8e, 0x47, 0x6e, 0x7a, 0x40, 0x7f, 0x01, + 0xcf, 0x45, 0x54, 0x6d, 0xcd, 0x95, 0xa9, 0x8b, + 0x33, 0xc5, 0x9e, 0x94, 0x3c, 0x1f, 0x40, 0x69, + 0xbc, 0x5d, 0xd1, 0x7d, 0x24, 0xdc, 0x24, 0x39, + 0xe2, 0x1a, 0x1e, 0x6b, 0x16, 0xa7, 0xd9, 0x8d, + 0xb6, 0x06, 0xab, 0xf2, 0x0a, 0x29, 0xbb, 0xdc, + 0x80, 0x03, 0x11, 0x02, 0x78, 0x7c, 0xee, 0x72, + 0x74, 0xf4, 0xaa, 0x1e, 0xaa, 0x86, 0x5a, 0xb5, + 0xed, 0xd0, 0xd6, 0xc2, 0xe1, 0xf2, 0xd6, 0xc2, + 0xf6, 0x8d, 0x77, 0x5a, 0x89, 0xb3, 0xc0, 0xd0, + 0x41, 0x32, 0xa4, 0xdf, 0x84, 0x5c, 0x61, 0x96, + 0x9d, 0x62, 0x89, 0xad, 0xd1, 0x95, 0xb8, 0x34, + 0xef, 0xa8, 0xd2, 0xa7, 0x14, 0x41, 0xf9, 0xdd, + 0xaa, 0x5e, 0x4c, 0x5a, 0x37, 0xde, 0xe0, 0xda, + 0x26, 0x69, 0x37, 0x59, 0xba, 0xf1, 0xc8, 0x10, + 0xb8, 0xce, 0xb0, 0x57, 0x07, 0x7e, 0x4d, 0x1e, + 0x91, 0x87, 0x05, 0x39, 0xaa, 0x84, 0xb8, 0x33, + 0xc4, 0x3b, 0xac, 0xfc, 0x20, 0xd6, 0xd8, 0x8f, + 0xbd, 0xd1, 0x27, 0x6e, 0x43, 0x22, 0x56, 0x5c, + 0x83, 0x54, 0x79, 0x94, 0x00, 0xa1, 0x58, 0x91, + 0xbd, 0xd2, 0x9d, 0xdd, 0xbc, 0x8f, 0x86, 0x31, + 0x51, 0x1c, 0x62, 0x95, 0x35, 0xd2, 0x25, 0xee, + 0xf6, 0xbc, 0x10, 0xeb, 0x12, 0x79, 0x9f, 0xb2, + 0x2a, 0x8d, 0xae, 0x82, 0x28, 0xc6, 0x5a, 0x63, + 0xad, 0xe7, 0xf9, 0xb1, 0x96, 0xac, 0xdd, 0x78, + 0x7b, 0x65, 0xeb, 0x6a, 0x6b, 0x93, 0xdd, 0x37, + 0x63, 0xad, 0x29, 0x5e, 0xdf, 0x90, 0x42, 0xef, + 0x87, 0x4b, 0xcf, 0xec, 0xb8, 0x75, 0xc6, 0x8d, + 0x89, 0xb5, 0xf7, 0x61, 0x8c, 0xeb, 0xcb, 0x5a, + 0x79,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xf5, 0x60, 0x15, 0x16, + 0x02, 0x29, 0x29, 0x95, 0x2b, 0xc4, 0x0e, 0x56, + 0x56, 0x14, 0x89, 0xde, 0x5b, 0x3a, 0x38, 0x87, + 0x2a, 0x46, 0x65, 0x78, 0x9a, 0xe5, 0xad, 0x39, + 0x58, 0xdb, 0xaa, 0x3e, 0x69, 0x8d, 0xe7, 0xc2, + 0x4a, 0xf4, 0xf0, 0x85, 0x24, 0x3d, 0x59, 0x92, + 0xb3, 0x42, 0xb6, 0xc9, 0x72, 0xa4, 0x20, 0x8a, + 0x7c, 0x7e, 0xf6, 0x57, 0x57, 0x63, 0x88, 0x27, + 0xac, 0x6d, 0x45, 0x8f, 0x6f, 0x38, 0x57, 0x8e, + 0xaf, 0x6e, 0xdd, 0xdf, 0x8a, 0x33, 0x1e, 0x5d, + 0x67, 0xcc, 0xd1, 0x2d, 0xee, 0xd9, 0x7c, 0xb2, + 0x92, 0x80, 0x23, 0xb9, 0x1f, 0x1d, 0xc7, 0xe3, + 0x11, 0xee, 0x76, 0xcd, 0x1f, 0x1d, 0xa2, 0x15, + 0x5e, 0xf2, 0xba, 0x00, 0x5c, 0xeb, 0x91, 0x98, + 0xc5, 0xb4, 0x1e, 0x05, 0x7b, 0x76, 0x9c, 0x53, + 0xca, 0x29, 0x52, 0xe2, 0xe5, 0x58, 0xa6, 0x60, + 0xd7, 0x81, 0x40, 0x0f, 0x99, 0x63, 0xd6, 0xe3, + 0x72, 0x48, 0x8f, 0x74, 0xe2, 0x8d, 0xe2, 0x4e, + 0xb4, 0x5a, 0x33, 0xa7, 0xaa, 0x51, 0x7d, 0xaa, + 0x12, 0x2d, 0x8d, 0xe5, 0x51, 0x47, 0x76, 0xc7, + 0xeb, 0xa4, 0x43, 0x44, 0xbd, 0x73, 0xe9, 0xf0, + 0xab, 0x6a, 0xdc, 0x48, 0xef, 0xf0, 0xd8, 0xb6, + 0x97, 0x85, 0x1d, 0x90, 0x57, 0x93, 0xf3, 0xbf, + 0xa9,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, 0xea, 0x7d, 0xb8, 0x8f, + 0xe9, 0xf1, 0x66, 0xbc, 0x8c, 0xf3, 0xa8, 0xeb, + 0x02, 0x89, 0x33, 0x68, 0xd8, 0xd8, 0xc1, 0x1c, + 0xa8, 0x2c, 0xbf, 0x8c, 0x90, 0x56, 0x36, 0x44, + 0x05, 0x4d, 0x11, 0xe2, 0xb0, 0x9a, 0x33, 0x90, + 0x3b, 0xa3, 0x7f, 0x7c, 0xd2, 0xc3, 0x97, 0x3e, + 0xbb, 0xef, 0xca, 0x74, 0xd2, 0x41, 0x03, 0x1f, + 0x1d, 0xd2, 0xd7, 0xaa, 0x30, 0x7b, 0xb1, 0xb6, + 0x2a, 0x8c, 0x4a, 0x11, 0x2c, 0x2f, 0x36, 0x6e, + 0x25, 0xef, 0x92, 0x0a, 0xf7, 0xba, 0x96, 0x51, + 0x0b, 0xaa, 0xcf, 0xc3, 0x84, 0x73, 0x57, 0x16, + 0x8c, 0x82, 0x35, 0x23, 0x15, 0x10, 0x83, 0x61, + 0xca, 0xad, 0x84, 0xf6, 0x4d, 0x2e, 0xeb, 0x26, + 0x21, 0x43, 0x7c, 0x61, 0xc4, 0x1e, 0x5d, 0x33, + 0x2e, 0x1b, 0x97, 0x0f, 0xee, 0x91, 0xfa, 0x99, + 0x3f, 0xcb, 0x02, 0xbf, 0x8b, 0x3b, 0xe3, 0x7e, + 0x04, 0x51, 0x23, 0xc3, 0x1e, 0xfd, 0x3d, 0xf4, + 0x7e, 0xd7, 0x80, 0xfd, 0xd7, 0x48, 0x59, 0xc9, + 0x97, 0x23, 0xf1, 0x67, 0x61, 0x8f, 0x0b, 0x60, + 0x8e, 0xe0, 0x7a, 0x61, 0xa0, 0x2b, 0xfd, 0x90, + 0xb2, 0xa0, 0x2c, 0x60, 0x87, 0x98, 0x1c, 0x43, + 0x7c, 0x34, 0x38, 0xba, 0x74, 0x61, 0x2c, 0x94, + 0x30, 0x92, 0x96, 0xfc, 0x72, 0x3a, 0x9c, 0x09, + 0x97, 0x7a, 0xf6, 0x50, 0x86, 0x68, 0xc1, 0x3a, + 0x6a, 0x37, 0xdd, 0xef, 0x89, 0x82, 0xa2, 0xc2, + 0x10, 0xaa, 0x8e, 0xb3, 0x0c, 0x5b, 0x6e, 0x05, + 0xb5, 0x58, 0x0e, 0x39, 0x8f, 0xd9, 0x5c, 0x96, + 0xad, 0x99, 0x9f, 0x8a, 0x9d, 0x3a, 0x12, 0xf1, + 0x73, 0xd0, 0x05, 0xeb, 0x52, 0xa3, 0xb7, 0x8e, + 0x84, 0x73, 0x35, 0xe1, 0x7e, 0x23, 0x66, 0xf7, + 0x92, 0x8e, 0xda, 0x78, 0x51, 0x8d, 0xb1, 0x6b, + 0xd5, 0xcb, 0xec, 0x32, 0xbb, 0xc7, 0x22, 0x55, + 0x0f, 0xed, 0xef, 0x55, 0x4b, 0xba, 0x95, 0x95, + 0x6b, 0x2b, 0xd3, 0xd2, 0x4d, 0xae, 0x7d, 0xa7, + 0xc3, 0x48, 0x36, 0xd2, 0x87, 0x85, 0x4a, 0x78, + 0xf3, 0xbb, 0x9f, 0xce, 0x88, 0xbd, 0x19, 0x12, + 0x3e, 0x1a, 0x68, 0x63, 0x34, 0x00, 0x8f, 0x1b, + 0xa7, 0xbf, 0xdb, 0xf9, 0xe9, 0x54, 0xf8, 0xac, + 0xd8, 0xd5, 0xbd, 0xec, 0xba, 0x71, 0xf4, 0x76, + 0x5d, 0xf8, 0xda, 0x1e, 0x11, 0x22, 0xbf, 0x4c, + 0xeb, 0xeb, 0xfa, 0x48, 0x33, 0x92, 0x8f, 0x98, + 0x97, 0xcd, 0x87, 0xc8, 0x14, 0x22, 0x0f, 0xa3, + 0x88, 0xa7, 0x3f, 0x29, 0x9b, 0x69, 0x18, 0x39, + 0xc1, 0xc6, 0x33, 0x74, 0x11, 0x32, 0xb1, 0x2b, + 0x95, 0xac, 0x7b, 0xb3, 0xac, 0x0e, 0xeb, 0x5a, + 0x72, 0xec, 0x1d, 0x44, 0x8c, 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xb5, 0x4a, 0x64, 0x3d, 0x52, 0x7e, 0x81, 0xb3, + 0x83, 0x45, 0x37, 0x53, 0x9b, 0x15, 0xcc, 0x16, + 0x70, 0x65, 0xa2, 0x52, 0x10, 0xf1, 0xf8, 0xcc, + 0x1d, 0xf2, 0xfb, 0x8e, 0xe4, 0x46, 0x85, 0x71, + 0xde, 0x2f, 0xf5, 0xba, 0xa5, 0x91, 0x5e, 0x6f, + 0xd9, 0x76, 0xba, 0x19, 0xe8, 0xd3, 0x0b, 0x92, + 0xbd, 0x7c, 0x5d, 0x26, 0xfd, 0x15, 0x64, 0xe2, + 0x45, 0xaa, 0x11, 0x8a, 0x37, 0x57, 0xf2, 0xfd, + 0x6c, 0xbb, 0x01, 0x1a, 0xbb, 0x54, 0x09, 0xf5, + 0x7d, 0xa5, 0xfb, 0x5c, 0x14, 0x39, 0x03, 0x85, + 0x1f, 0x82, 0xe7, 0x9b, 0x56, 0x85, 0x75, 0x8f, + 0x99, 0xeb, 0xd2, 0xf3, 0xdc, 0x86, 0xb0, 0xee, + 0xac, 0x4b, 0xf0, 0x9b, 0x14, 0xf0, 0x1e, 0xf5, + 0xb3, 0x1e, 0x9e, 0xf3, 0x74, 0xbd, 0xb0, 0x68, + 0xd4, 0x55, 0xb0, 0xda, 0x87, 0x75, 0xbe, 0x73, + 0xd2, 0x24, 0x9b, 0x28, 0xc1, 0x2c, 0x6a, 0x30, + 0x88, 0x4f, 0x46, 0xc8, 0xbf, 0x1b, 0xf1, 0xc0, + 0x94, 0x93, 0x29, 0x49, 0xc7, 0xf3, 0xa7, 0x73, + 0x3c, 0xdd, 0xcd, 0x57, 0x1c, 0x63, 0x03, 0xeb, + 0x14, 0xf2, 0xf8, 0x9c, 0x09, 0x78, 0x54, 0xc3, + 0x47, 0x95, 0x61, 0x97, 0x6b, 0x86, 0xd0, 0x2e, + 0x01, 0xe7, 0x23, 0xa6, 0x24, 0x9c, 0x6b, 0xca, + 0x65, 0xe7, 0xb2, 0x72, 0xcf, 0x35, 0x84, 0xa8, + 0x1d, 0xdd, 0x8c, 0x6f, 0x52, 0x9d, 0x01, 0xa2, + 0x4d, 0xdd, 0xa4, 0xfe, 0x42, 0x4e, 0x3c, 0xd1, + 0xa9, 0x91, 0xf5, 0x30, 0xe4, 0x92, 0x37, 0x8d, + 0xe9, 0xf2, 0x0c, 0xcc, 0x1e, 0xee, 0xc5, 0x47, + 0x3a, 0x71, 0xa4, 0x7f, 0x45, 0xf1, 0x73, 0x75, + 0x0d, 0xa2, 0xe7, 0x65, 0x57, 0x40, 0xf5, 0xb9, + 0xcd, 0xf8, 0x6f, 0x5a, 0x07, 0x1d, 0x9d, 0x21, + 0x35, 0x83, 0xcf, 0x5b, 0x19, 0x96, 0xa9, 0x0e, + 0xb2, 0xd1, 0xd6, 0xa8, 0x83, 0xb5, 0xb3, 0x0c, + 0x5b, 0xab, 0xae, 0x75, 0x5c, 0xf3, 0x86, 0xf4, + 0xa5, 0xc3, 0x45, 0x07, 0x59, 0x87, 0x10, 0x23, + 0x34, 0xe2, 0x8d, 0x98, 0xe7, 0x17, 0x43, 0x2b, + 0x05, 0x65, 0x32, 0xcb, 0x6d, 0x56, 0x1f, 0xc1, + 0x4c, 0xa6, 0x87, 0xaf, 0xc1, 0xb5, 0x77, 0x54, + 0x73, 0x36, 0x57, 0x10, 0x66, 0x3b, 0xcc, 0xee, + 0xce, 0xa3, 0x1e, 0x36, 0x5e, 0x13, 0x96, 0x1d, + 0xc4, 0x51, 0x65, 0xab, 0x1b, 0xe4, 0x4e, 0xb2, + 0xec, 0xf1, 0xac, 0x21, 0x77, 0x4c, 0xfe, 0x59, + 0x15, 0x9a, 0x83, 0xc8, 0x36, 0x91, 0x47, 0x3a, + 0x07, 0x5f, 0x73, 0x76, 0x4b, 0x91, 0x52, 0x84, + 0xc9, 0x46, 0x04, 0x1d, 0x2e, 0x9c, 0x6f, 0x24, + 0xef, 0xf5, 0x39, 0x93, 0x0b, 0xae, 0x8f, 0xdc, + 0x88, 0x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 0xea, 0x69, 0x39, 0xaf, + 0x08, 0x0d, 0x74, 0x8c, 0x5f, 0x65, 0x01, 0x56, + 0x28, 0xc1, 0xce, 0x57, 0xc6, 0xfd, 0x08, 0xab, + 0x37, 0x1c, 0xc5, 0x8a, 0xdc, 0x36, 0xa1, 0x91, + 0x6f, 0x08, 0xaf, 0xe1, 0x68, 0xa0, 0xc2, 0x95, + 0xda, 0xf0, 0xb4, 0x76, 0xb1, 0x1b, 0x0e, 0xf1, + 0x95, 0x00, 0x3b, 0x6c, 0x00, 0x46, 0x4f, 0xbf, + 0x8f, 0x49, 0x00, 0x7b, 0x72, 0x8d, 0x9e, 0x8e, + 0x36, 0xee, 0x78, 0x1d, 0x4c, 0x3e, 0xf7, 0x11, + 0xab, 0x51, 0x2e, 0x17, 0x4b, 0x9e, 0xb1, 0x9e, + 0x35, 0xce, 0x34, 0x2f, 0x36, 0xc2, 0xaf, 0x72, + 0x7b, 0x03, 0x7d, 0x7b, 0xca, 0xef, 0xb1, 0xfc, + 0xa4, 0xfc, 0xe7, 0xad, 0x05, 0x83, 0xf6, 0x93, + 0x03, 0x9e, 0xd7, 0x43, 0x56, 0xdf, 0xf6, 0x73, + 0x7a, 0x44, 0x95, 0xa0, 0x96, 0x45, 0xa6, 0xf1, + 0xa8, 0x21, 0xbd, 0x26, 0xa6, 0x5e, 0x23, 0x05, + 0x19, 0x18, 0x77, 0x60, 0x47, 0xa5, 0x47, 0xd4, + 0xc3, 0xca, 0x38, 0x8f, 0x6c, 0xc9, 0x81, 0x35, + 0xc0, 0xc9, 0x2a, 0x29, 0x27, 0xa9, 0x78, 0x8f, + 0xfa, 0xda, 0xe0, 0x3d, 0x8f, 0x9e, 0xeb, 0x3c, + 0x2a, 0xe0, 0xee, 0x68, 0x2d, 0xba, 0x9a, 0xd0, + 0xd5, 0x3f, 0x5b, 0x21, 0x1d, 0x51, 0x5c, 0xcd, + 0xe2, 0x4a, 0x42, 0xad, 0xed, 0xc7, 0xed, 0x94, + 0x22, 0x39, 0x9d, 0x1a, 0x45, 0x67, 0x55, 0x09, + 0x76, 0x6e, 0x03, 0xed, 0x60, 0xcf, 0x5f, 0x35, + 0x57, 0x38, 0x81, 0x48, 0x41, 0x37, 0x2b, 0xe4, + 0x15, 0x77, 0x99, 0xc5, 0xde, 0xda, 0x6e, 0xae, + 0xb2, 0x53, 0x06, 0x55, 0x6b, 0xe4, 0x69, 0x09, + 0xa3, 0x5f, 0x6f, 0x9d, 0x24, 0x8f, 0x2a, 0xce, + 0x4b, 0xc3, 0x5d, 0xe9, 0x24, 0x0a, 0x9d, 0xb3, + 0xf3, 0x07, 0xeb, 0x62, 0xbd, 0xa3, 0x38, 0x50, + 0x97, 0x4d, 0xc5, 0xd4, 0x31, 0xd3, 0x94, 0xa6, + 0xd0, 0xc3, 0xc8, 0x4e, 0x68, 0x35, 0x52, 0xa2, + 0x29, 0xda, 0x67, 0xe1, 0xbe, 0x83, 0x74, 0x32, + 0x64, 0x26, 0x33, 0x74, 0x78, 0x8c, 0xb2, 0x18, + 0x44, 0x48, 0xa3, 0x07, 0x13, 0xd6, 0x13, 0xeb, + 0xf4, 0x3f, 0x42, 0xbf, 0x72, 0x84, 0xb3, 0xbf, + 0x3b, 0x93, 0xe3, 0x8b, 0x9b, 0x10, 0x26, 0x9d, + 0x27, 0x76, 0x40, 0x0b, 0x32, 0xe1, 0xc0, 0x67, + 0xea, 0x21, 0x3e, 0x4e, 0x46, 0x4e, 0x07, 0xc4, + 0xff, 0xc9, 0xd6, 0x9f, 0x73, 0x67, 0x3c, 0x4f, + 0x3d, 0xe4, 0x7e, 0x47, 0xb0, 0x57, 0x82, 0x31, + 0x10, 0x64, 0xc0, 0x3f, 0xba, 0xac, 0x35, 0x72, + 0x10, 0xb7, 0x14, 0x8a, 0xea, 0x4f, 0x8e, 0x58, + 0x1f, 0x4d, 0x15, 0x29, 0xf3, 0xf9, 0x8b, 0xd5, + 0x92, 0xf1, 0x36, 0x61, 0x02, 0x85, 0x7b, 0x6d, + 0xee, 0x68, 0x4f, 0x47, 0xce, 0x67, 0x52, 0x93, + 0xcf, 0x66, 0x7b, 0xcc, 0x9d, 0xfa, 0xed, 0x99, + 0x13, 0x7f, 0x1f, 0xb1, 0x46, 0xcb, 0x72, 0xfb, + 0x6a, 0xd8, 0xf3, 0x94, 0x3f, 0xe2, 0xfe, 0x36, + 0x58, 0xc5, 0x81, 0x5d, 0xa9, 0x17, 0xdf, 0xde, + 0x71, 0xe2, 0x3c, 0xa7, 0x4c, 0xc2, 0x2e, 0xac, + 0x35, 0xb4, 0x32, 0x2b, 0x77, 0x38, 0xda, 0xe4, + 0x46, 0xb1, 0xa6, 0xa8, 0x90, 0x55, 0x09, 0x6c, + 0x04, 0x76, 0xbb, 0x98, 0xa3, 0xe8, 0x7e, 0xe6, + 0x85, 0xd5, 0x4b, 0x89, 0x31, 0x86, 0xca, 0x2a, + 0x24, 0x7f, 0x00, 0xcf, 0x5e, 0x47, 0x17, 0x31, + 0x49, 0x12, 0xfb, 0x75, 0x89, 0xb1, 0xf6, 0xc5, + 0x54, 0x9f, 0x63, 0xc6, 0x73, 0xf6, 0x49, 0xf7, + 0x29, 0x9c, 0xab, 0x31, 0x17, 0xf9, 0x2f, 0xc9, + 0xc6, 0x55, 0xf7, 0xd2, 0xf1, 0x97, 0x96, 0x7c, + 0x20, 0xb7, 0x62, 0x62, 0x27, 0x6e, 0x3f, 0x12, + 0xd8, 0xaa, 0x79, 0xca, 0x40, 0x77, 0x8b, 0x91, + 0x9e, 0xce, 0x14, 0xce, 0xaa, 0x80, 0xbc, 0x6b, + 0x43, 0xcc, 0xde, 0x08, 0x38, 0xf9, 0x06, 0xfc, + 0x3c, 0x9e, 0xb7, 0xd4, 0x83, 0x7c, 0x6b, 0x50, + 0xf4, 0x72, 0x2b, 0xf3, 0xcc, 0x66, 0xd1, 0xbd, + 0x60, 0x5c, 0x70, 0xae, 0x18, 0x57, 0xdd, 0xcc, + 0x76, 0xf1, 0x30, 0x63, 0x14, 0xb6, 0x07, 0xf6, + 0x7a, 0x9c, 0x1c, 0x85, 0x3f, 0x21, 0x36, 0x0c, + 0x66, 0x0b, 0xce, 0x94, 0xf1, 0xf2, 0x88, 0xf2, + 0x8c, 0xb0, 0x2e, 0x83, 0xce, 0x77, 0xd2, 0x97, + 0xce, 0x66, 0xf9, 0xcb, 0xf6, 0x43, 0xe3, 0x61, + 0x7b, 0x53, 0xff, 0xde, 0x19, 0xb2, 0x87, 0xdf, + 0x46, 0x09, 0x1d, 0x2d, 0x28, 0x32, 0x32, 0x91, + 0x94, 0x5d, 0xae, 0xe7, 0x64, 0xc2, 0x7e, 0x64, + 0x7e, 0xed, 0xf8, 0x4e, 0xbb, 0x9e, 0x9e, 0xb9, + 0xbb, 0x00, 0x6b, 0x07, 0xa2, 0xbb, 0x08, 0x37, + 0x62, 0xcf, 0xbd, 0xbe, 0xae, 0x94, 0x15, 0xaa, + 0x7e, 0x68, 0xb2, 0x0a, 0x23, 0x03, 0x5e, 0x63, + 0x0c, 0xb2, 0x9f, 0x71, 0xe5, 0xa9, 0x0c, 0x91, + 0xfb, 0xcb, 0xa9, 0x70, 0xae, 0x83, 0x51, 0xdf, + 0x55, 0x42, 0x90, 0xab, 0x9e, 0xab, 0x4e, 0xb2, + 0x45, 0xc8, 0x57, 0xd7, 0xab, 0x21, 0xc1, 0xd3, + 0x63, 0x84, 0x57, 0x8c, 0xc0, 0x33, 0xcf, 0xa1, + 0xa7, 0x65, 0xf5, 0x21, 0x1b, 0xaf, 0x86, 0x18, + 0x44, 0x1c, 0xc2, 0xe3, 0x1e, 0x17, 0x75, 0x38, + 0x93, 0xce, 0x65, 0xe1, 0x1a, 0x64, 0xd5, 0x63, + 0xc7, 0x13, 0xf6, 0xd8, 0xb1, 0x6a, 0x2b, 0x0e, + 0xea, 0x99, 0x43, 0xae, 0x95, 0x1b, 0x3b, 0xfe, + 0x8b, 0x9d, 0x45, 0x77, 0x69, 0x05, 0x63, 0xfe, + 0x1b, 0xd6, 0x15, 0xeb, 0xea, 0x3f, 0xee, 0xdf, + 0x45, 0xcc, 0x49, 0x40, 0x79, 0x91, 0x5b, 0x3e, + 0xce, 0xda, 0xd7, 0x1b, 0x70, 0x0d, 0x95, 0x1b, + 0x76, 0xd6, 0x5e, 0x3e, 0xb8, 0x6e, 0xfd, 0xcf, + 0x7f, 0x0c, 0xdd, 0x95, 0xf6, 0xc8, 0x4f, 0xe4, + 0x08, 0xe2, 0x96, 0x7a, 0xad, 0xdd, 0xf5, 0x92, + 0x87, 0x9b, 0x28, 0x8b, 0x23, 0xa4, 0x15, 0x36, + 0xa5, 0xa8, 0x0a, 0x73, 0xa8, 0x3f, 0x8f, 0x6a, + 0x5e, 0xa8, 0x98, 0x90, 0xcb, 0x68, 0x99, 0xfc, + 0xa7, 0x6f, 0x7a, 0xfd, 0x16, 0x3b, 0xf8, 0x9c, + 0x36, 0xba, 0x78, 0x9d, 0x2d, 0x57, 0x48, 0xc3, + 0x0a, 0xb9, 0xe8, 0x59, 0x87, 0x71, 0x7c, 0x8d, + 0x83, 0x58, 0x05, 0x35, 0x37, 0xa7, 0x5d, 0xcf, + 0x3f, 0x7e, 0xe3, 0x29, 0x7a, 0xa1, 0x17, 0x26, + 0x79, 0x45, 0xce, 0x1c, 0x3c, 0x5a, 0xc2, 0x6b, + 0x2a, 0x2a, 0x41, 0xee, 0x5d, 0xd8, 0x51, 0xef, + 0x47, 0x74, 0x57, 0x9a, 0x94, 0x32, 0x60, 0x6d, + 0x53, 0x55, 0xee, 0xec, 0x40, 0x28, 0x1a, 0xcc, + 0xc4, 0x3f, 0x76, 0x3c, 0x2e, 0x5c, 0xaf, 0xc6, + 0x20, 0x6a, 0x99, 0x90, 0x56, 0x03, 0x7a, 0x43, + 0x23, 0xa6, 0x32, 0xe6, 0x70, 0x07, 0x76, 0x0f, + 0x5d, 0x09, 0xfb, 0x78, 0x0c, 0xd6, 0xd4, 0x8f, + 0x29, 0xc7, 0x49, 0x8a, 0x93, 0xef, 0x31, 0x07,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xd1, 0x75, 0x09, 0x52, 0x67, 0x99, 0xab, + 0xd8, 0x74, 0x5d, 0x5c, 0xa3, 0xf5, 0xa8, 0x19, + 0xaf, 0x26, 0xe9, 0x9b, 0x75, 0xb1, 0x01, 0x88, + 0x0c, 0x40, 0x1c, 0xea, 0x4c, 0x4e, 0xff, 0x09, + 0xfe, 0x9f, 0x00, 0xcf, 0xf4, 0xce, 0x86, 0x86, + 0x0a, 0x61, 0xe5, 0x82, 0xb5, 0x10, 0x2e, 0x9e, + 0x70, 0x84, 0x41, 0xcd, 0x3d, 0xcc, 0x19, 0xd0, + 0xff, 0x41, 0x38, 0xc8, 0x1f, 0x06, 0xe0, 0xa7, + 0xfa, 0x72, 0x36, 0xbc, 0x1a, 0xce, 0xd0, 0x0e, + 0x3b, 0x4f, 0xab, 0x1f, 0x6a, 0x9c, 0x8c, 0xa0, + 0xba, 0xb3, 0x1c, 0x89, 0x47, 0xc2, 0xe3, 0x1e, + 0x0b, 0x9b, 0xeb, 0x60, 0x60, 0xb7, 0xf8, 0x22, + 0x43, 0xb5, 0xc6, 0x79, 0x42, 0x8e, 0xad, 0x78, + 0x9d, 0x8b, 0xb8, 0x90, 0x70, 0x10, 0x31, 0x92, + 0x62, 0x52, 0xab, 0xb0, 0x9d, 0xdd, 0x22, 0x95, + 0x8e, 0x4e, 0x9d, 0x90, 0x23, 0xb3, 0x10, 0x97, + 0x45, 0xb8, 0xef, 0x63, 0x8e, 0xfa, 0xc6, 0x83, + 0x78, 0x4f, 0xe8, 0x67, 0xe6, 0xfc, 0x60, 0x0f, + 0xd8, 0xd7, 0xed, 0xa0, 0x7d, 0xe3, 0x55, 0xd0, + 0xba, 0x7e, 0xb8, 0x78, 0x70, 0xc1, 0x5e, 0x69, + 0x29, 0x7b, 0x3c, 0x1a, 0x51, 0x74, 0x56, 0x47, + 0x2c, 0xe9, 0xac, 0x73, 0x5b, 0x42, 0xe7, 0xae, + 0x88, 0xa3, 0x58, 0xb7, 0x3c, 0x1f, 0x22, 0x42, + 0x2c, 0xec, 0x14, 0x1b, 0xe7, 0x1b, 0xe7, 0xf3, + 0x97, 0x95, 0xab, 0xca, 0x74, 0xbe, 0xa8, 0x4c, + 0x2b, 0x45, 0x5f, 0x29, 0x1d, 0x22, 0xb7, 0xfb, + 0xda, 0xba, 0x76, 0x9b, 0x3d, 0x62, 0xb7, 0x4c, + 0xbd, 0x75, 0x53, 0xfb, 0x44, 0xda, 0xea, 0xe0, + 0xc1, 0x61, 0x5f, 0x90, 0xd2, 0x2d, 0x59, 0x1a, + 0x33, 0xe3, 0x6e, 0xbc, 0x85, 0x58, 0x63, 0x44, + 0x21, 0xcf, 0x98, 0x77, 0xb9, 0x27, 0x35, 0xa2, + 0x36, 0x68, 0x04, 0xc0, 0x98, 0xc4, 0x1d, 0x4b, + 0x81, 0x08, 0x4c, 0xe8, 0xba, 0x60, 0x3c, 0x17, + 0xd6, 0x91, 0x17, 0xc5, 0x36, 0x8c, 0xbb, 0xa8, + 0x21, 0xd8, 0x60, 0x8d, 0x9b, 0x1e, 0x47, 0x8c, + 0x77, 0x5b, 0x30, 0x9e, 0xf4, 0x39, 0x42, 0x7c, + 0xb4, 0x17, 0x3b, 0x48, 0xf2, 0xbc, 0x82, 0x9e, + 0x3e, 0xab, 0xea, 0x34, 0xdc, 0x56, 0xd5, 0x59, + 0x75, 0x76, 0x25, 0x8f, 0x88, 0xed, 0x4e, 0x76, + 0xfc, 0x02, 0xb3, 0x63, 0x52, 0x9e, 0x85, 0x9d, + 0xdd, 0xa1, 0x1a, 0xa7, 0xfb, 0x91, 0x1f, 0xe5, + 0x4a, 0x01, 0xb3, 0x66, 0x9d, 0x2a, 0x9f, 0xd2, + 0xfd, 0x48, 0xd6, 0xaf, 0x51, 0xf0, 0x7e, 0xd2, + 0x90, 0x9e, 0x75, 0x97, 0xec, 0x85, 0xdc, 0x06, + 0xbc, 0x4f, 0xb8, 0x1c, 0x35, 0xa2, 0x9e, 0xeb, + 0xa5, 0x90, 0xfc, 0xf1, 0x88, 0xe9, 0x77, 0x9c, + 0xe7, 0x06, 0xb9, 0xdc, 0xc0, 0xfd, 0x1d, 0x07, + 0x79, 0x5c, 0x83, 0x5e, 0xbc, 0xb1, 0xa1, 0x2f, + 0xb6, 0x97, 0x0c, 0x69, 0x73, 0xf7, 0x65, 0x68, + 0x09, 0xfd, 0x62, 0x16, 0xdd, 0x1e, 0x57, 0x44, + 0x01, 0xf5, 0xf3, 0xcf, 0xae, 0x5c, 0x6c, 0x0d, + 0x26, 0xf1, 0x7b, 0x88, 0xca, 0xb0, 0x11, 0x31, + 0xbb, 0x7a, 0xaa, 0xfe, 0x9a, 0xce, 0xab, 0xa5, + 0x03, 0xf2, 0x19, 0xf9, 0xbb, 0x86, 0xe8, 0xe9, + 0xc6, 0x07, 0xe5, 0x69, 0x54, 0xf1, 0xaa, 0x07, + 0xcc, 0xb3, 0xad, 0xa7, 0x95, 0x51, 0x5c, 0xb7, + 0x99, 0x5c, 0x1a, 0xaf, 0xfb, 0xe3, 0xaa, 0xa6, + 0x87, 0xdb, 0x61, 0x83, 0x78, 0x13, 0x2f, 0x2f, + 0x2f, 0xc1, 0x15, 0x74, 0xbb, 0x57, 0x10, 0x19, + 0x26, 0x71, 0x2b, 0xea, 0xce, 0x58, 0xff, 0x61, + 0xa1, 0xbf, 0xb6, 0x64, 0x65, 0x9d, 0x94, 0x95, + 0xb4, 0xce, 0xba, 0x15, 0xd2, 0x9c, 0x0f, 0x1d, + 0xc5, 0x61, 0xa5, 0x40, 0xff, 0x05, 0x88, 0x77, + 0x6c, 0xc9, 0x5e, 0x74, 0x71, 0x65, 0xf0, 0x72, + 0x0d, 0x88, 0x02, 0x66, 0xdd, 0x05, 0x3d, 0x57, + 0xd5, 0x5a, 0xf3, 0x14, 0xeb, 0xcc, 0xb2, 0x6b, + 0x6c, 0x7a, 0x2b, 0x53, 0x57, 0x49, 0x7d, 0x34, + 0xc8, 0x88, 0x3b, 0x28, 0xa0, 0xf6, 0x3b, 0xc6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, 0x51, 0x7a, 0xe0, 0xdc, 0xef, + 0xc4, 0x39, 0x5d, 0x04, 0x4e, 0x47, 0xf7, 0x41, + 0xe8, 0xc6, 0x32, 0xf8, 0x8d, 0x8a, 0x4a, 0x56, + 0x5f, 0xc2, 0x75, 0xc9, 0xc9, 0x98, 0x17, 0x9d, + 0x25, 0x53, 0x75, 0xb2, 0xc6, 0x45, 0x62, 0x54, + 0x05, 0x84, 0x53, 0xe5, 0x71, 0xaa, 0x7e, 0x0c, + 0xe8, 0x23, 0x4e, 0x95, 0x57, 0x56, 0xa8, 0xba, + 0x22, 0xf5, 0x22, 0xc9, 0x95, 0x61, 0xb8, 0xca, + 0xe7, 0x94, 0xcb, 0xca, 0x03, 0xaa, 0x46, 0xc7, + 0xe9, 0x7d, 0x67, 0x60, 0xa6, 0x24, 0x9e, 0xdc, + 0xd2, 0x66, 0xda, 0xaa, 0x34, 0xfc, 0x9e, 0x6a, + 0xc4, 0x30, 0x6e, 0xa6, 0x75, 0x0f, 0xa9, 0x88, + 0x0e, 0x9a, 0xad, 0x5d, 0x3b, 0xf6, 0x3a, 0xde, + 0x8a, 0xbc, 0x4a, 0xd5, 0xbf, 0xed, 0x54, 0x91, + 0x73, 0x9e, 0xf2, 0xbf, 0xa7, 0x83, 0x48, 0xb8, + 0x1e, 0xec, 0x0f, 0xf3, 0xff, 0x13, 0x68, 0xa2, + 0xeb, 0x07, 0xbf, 0xd5, 0x5c, 0xfe, 0x33, 0x76, + 0xc4, 0x77, 0x06, 0x52, 0xea, 0xc4, 0x3a, 0xd2, + 0x4e, 0xda, 0x5a, 0xab, 0x2e, 0xb7, 0xb2, 0xce, + 0x50, 0x6b, 0x04, 0xe6, 0xc5, 0x58, 0x75, 0xee, + 0x20, 0x6b, 0xdf, 0x2f, 0xad, 0xed, 0x75, 0x38, + 0x08, 0x55, 0xc1, 0x2c, 0x98, 0x8b, 0x72, 0x56, + 0x2e, 0xe4, 0xb0, 0xa3, 0x59, 0x30, 0x03, 0x62, + 0x50, 0x3c, 0x59, 0xaf, 0x83, 0xb5, 0x81, 0x98, + 0xd5, 0x09, 0x61, 0x46, 0xd0, 0x5d, 0xee, 0xb1, + 0xae, 0xd7, 0x67, 0xda, 0x8a, 0x05, 0x11, 0xb1, + 0x85, 0xa8, 0x6c, 0xd4, 0x8d, 0xba, 0x75, 0xa4, + 0x1f, 0x8e, 0xc0, 0xe9, 0x88, 0x4b, 0x71, 0x96, + 0x66, 0x2a, 0x2b, 0xf5, 0x30, 0x6b, 0x66, 0xd9, + 0x1c, 0x53, 0x29, 0xd3, 0xf4, 0xb1, 0xa4, 0x89, + 0xc3, 0x45, 0x63, 0xb7, 0x22, 0xbd, 0xac, 0xa1, + 0xef, 0x77, 0x3b, 0x28, 0x87, 0xe5, 0x1c, 0xd5, + 0xea, 0xb9, 0x02, 0xdc, 0x0b, 0x77, 0x4e, 0x99, + 0x83, 0x38, 0xfb, 0xb9, 0xc3, 0x20, 0x66, 0x8e, + 0x2b, 0x7f, 0xf6, 0xbd, 0x57, 0x20, 0xbe, 0x52, + 0xf5, 0xdb, 0xa8, 0x65, 0x55, 0x1d, 0x87, 0x11, + 0xba, 0x4e, 0xaa, 0x56, 0xde, 0x55, 0x40, 0xac, + 0x12, 0xcc, 0x90, 0xeb, 0xe4, 0xd7, 0xf6, 0xe0, + 0x44, 0x9f, 0x9d, 0x77, 0xc3, 0x8b, 0xae, 0x52, + 0x57, 0xd0, 0xb1, 0x98, 0xeb, 0x8b, 0x3e, 0xb9, + 0xfb, 0xf2, 0x66, 0xb8, 0x4e, 0xca, 0x69, 0x35, + 0xe2, 0x73, 0x2c, 0xc8, 0xcb, 0x56, 0xd6, 0xd2, + 0x0c, 0xad, 0xac, 0x29, 0x17, 0xca, 0x2b, 0xd6, + 0x9f, 0x69, 0xf5, 0x46, 0x66, 0x61, 0x61, 0x27, + 0xdb, 0x2a, 0x6a, 0xa9, 0x5c, 0xb6, 0xb5, 0x4e, + 0xca, 0x00, 0xa1, 0xa3, 0xae, 0x8f, 0x7a, 0xb7, + 0x06, 0x44, 0x48, 0x58, 0x67, 0xda, 0xc3, 0x85, + 0xf2, 0xca, 0xd8, 0x00, 0xac, 0x5e, 0xeb, 0x6d, + 0xc2, 0x8a, 0xf7, 0xa8, 0x65, 0x07, 0xe4, 0x40, + 0x8e, 0x67, 0xc7, 0xe8, 0xb4, 0x2b, 0xb3, 0x49, + 0xf7, 0x12, 0xbb, 0x4c, 0xce, 0xc5, 0x86, 0x15, + 0x39, 0x94, 0x2b, 0x31, 0xd3, 0xcb, 0x70, 0x1b, + 0xe8, 0x71, 0x0f, 0xdf, 0xca, 0x26, 0xd7, 0xad, + 0x95, 0x07, 0x49, 0x7f, 0x3c, 0x77, 0x15, 0xe8, + 0x22, 0x02, 0x29, 0x1a, 0xf7, 0xf1, 0x44, 0xe4, + 0x3a, 0x6a, 0x66, 0x7e, 0xda, 0x56, 0xe0, 0xda, + 0x70, 0x0d, 0x4c, 0xee, 0x47, 0xcf, 0x35, 0xbb, + 0x60, 0xb5, 0xc4, 0x9c, 0xb7, 0x51, 0x84, 0xbc, + 0x0d, 0xfd, 0xb6, 0xce, 0x38, 0x55, 0x5a, 0x41, + 0x3d, 0xae, 0x87, 0x8f, 0xe9, 0x75, 0x10, 0x17, + 0x76, 0xf3, 0x04, 0x6f, 0x02, 0xcf, 0x24, 0xea, + 0xc7, 0x4d, 0x59, 0xd1, 0x32, 0x9c, 0xc1, 0xbf, + 0xa7, 0xdf, 0xf7, 0xb2, 0x0b, 0x25, 0xe5, 0x8e, + 0x9b, 0x55, 0x96, 0xb8, 0xb3, 0x03, 0xd5, 0x55, + 0xb3, 0x58, 0x71, 0x75, 0x24, 0x4f, 0x3b, 0xba, + 0x56, 0x47, 0x37, 0xf2, 0x29, 0x16, 0x63, 0xbb, + 0xd5, 0xe0, 0x09, 0x35, 0x30, 0x3f, 0x0a, 0xe1, + 0xfe, 0xbd, 0xdd, 0xdc, 0x8b, 0x2b, 0xc4, 0xc6, + 0x25, 0x1c, 0x55, 0x34, 0xa6, 0x5a, 0xaa, 0x39, + 0xfb, 0x0a, 0xff, 0x6d, 0x57, 0xbd, 0xa1, 0xab, + 0x92, 0xcc, 0x6b, 0x9c, 0xda, 0x2b, 0xad, 0x9a, + 0x93, 0x3a, 0x15, 0x66, 0x25, 0xaf, 0x09, 0x2a, + 0xae, 0x7f, 0xab, 0x5a, 0xe0, 0x78, 0x75, 0x3b, + 0x60, 0xac, 0x1a, 0xb3, 0x9b, 0x73, 0xff, 0x2a, + 0xdc, 0x15, 0x71, 0x2e, 0x24, 0x77, 0x8f, 0xa4, + 0xfa, 0x59, 0xb7, 0x6a, 0x8d, 0xcb, 0x83, 0xcd, + 0x93, 0x78, 0x15, 0x41, 0xa1, 0xca, 0x98, 0x23, + 0x28, 0x18, 0x33, 0x75, 0x1c, 0x07, 0x9c, 0xbc, + 0x89, 0xda, 0x95, 0x41, 0x29, 0x23, 0x47, 0xcb, + 0xe9, 0x66, 0x70, 0x27, 0x68, 0x0c, 0x1c, 0xee, + 0x1a, 0x78, 0x26, 0xc6, 0xe4, 0xa4, 0xec, 0x23, + 0x6f, 0x6b, 0x4e, 0x98, 0x79, 0x1d, 0x4f, 0xe3, + 0xf2, 0xce, 0x55, 0x6b, 0xba, 0x5a, 0x94, 0xa7, + 0x7d, 0xaf, 0xe4, 0xbe, 0xef, 0x3f, 0x72, 0xd2, + 0x17, 0x0f, 0xf9, 0xac, 0xd5, 0x82, 0x05, 0x7b, + 0xb3, 0x23, 0x68, 0x45, 0x37, 0xa3, 0xf1, 0x8c, + 0x31, 0xa3, 0xcc, 0x95, 0xbb, 0xdc, 0xff, 0x20, + 0xfa, 0xf7, 0x96, 0xab, 0x79, 0xff, 0x99, 0x32, + 0x31, 0xaa, 0x06, 0x64, 0xd1, 0x5a, 0x69, 0x60, + 0x0c, 0x02, 0x6b, 0xb4, 0x93, 0x2a, 0x43, 0x7c, + 0x0c, 0xfb, 0x3e, 0xc4, 0xc7, 0x9e, 0x67, 0x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2, 0xcd, + 0xa0, 0x02, 0xe8, 0x53, 0xda, 0xd1, 0x50, 0x05, + 0x27, 0xa7, 0x70, 0xa5, 0x65, 0xc8, 0x08, 0x5e, + 0x0a, 0x2f, 0x57, 0xc3, 0x41, 0xac, 0x45, 0x9b, + 0x90, 0x11, 0x18, 0xaa, 0x92, 0x3f, 0x1c, 0x0c, + 0xf7, 0x30, 0xf4, 0x4d, 0x34, 0x71, 0x8b, 0x39, + 0xf4, 0xd9, 0x61, 0xff, 0x1d, 0xa1, 0xae, 0x74, + 0x97, 0xa1, 0x3f, 0x55, 0xe5, 0x3c, 0xbe, 0x29, + 0xc8, 0x00, 0xa2, 0x95, 0x73, 0x7a, 0x45, 0xef, + 0xd4, 0xae, 0x9d, 0x00, 0xf6, 0x2a, 0x9c, 0x7c, + 0x59, 0x28, 0xe7, 0xcb, 0x6a, 0x43, 0xdd, 0x5f, + 0x55, 0x83, 0xa9, 0x93, 0xf8, 0xc9, 0x54, 0x85, + 0xfb, 0x3d, 0x7b, 0x07, 0xed, 0xa1, 0x43, 0xd5, + 0x67, 0x56, 0x42, 0x09, 0x93, 0x7e, 0x40, 0xc8, + 0x59, 0xaa, 0x67, 0xeb, 0xd9, 0x3d, 0xb6, 0x27, + 0x61, 0xe4, 0x96, 0xf3, 0x91, 0xb7, 0x3e, 0xb3, + 0xb1, 0xb7, 0x4b, 0x2b, 0x95, 0x42, 0xaa, 0x64, + 0x17, 0x90, 0x89, 0x85, 0x9a, 0xb6, 0xb6, 0xe6, + 0x84, 0x61, 0xf5, 0xa5, 0x5c, 0x51, 0xf1, 0x77, + 0xe7, 0x5e, 0x07, 0x49, 0x8f, 0xd7, 0xea, 0x29, + 0x87, 0xf7, 0xa2, 0x76, 0x89, 0x6f, 0xd1, 0xeb, + 0x11, 0xd9, 0x41, 0xfc, 0xfe, 0x1e, 0x66, 0xcc, + 0xab, 0x4c, 0x7b, 0x5a, 0xcc, 0x5d, 0xbd, 0xd7, + 0x62, 0x0f, 0xc2, 0x19, 0x19, 0x19, 0x27, 0x23, + 0x00, 0xe1, 0x77, 0x1c, 0x7f, 0x7c, 0x4e, 0x55, + 0xd7, 0xfd, 0xb9, 0x8b, 0xf2, 0x0c, 0x78, 0x5c, + 0x90, 0x4e, 0xb7, 0xc5, 0x43, 0x75, 0xf6, 0xde, + 0x64, 0x93, 0xb2, 0x54, 0x18, 0x1b, 0x11, 0x63, + 0x9d, 0x65, 0x99, 0x0a, 0xbb, 0xec, 0x62, 0x13, + 0x3d, 0xac, 0x60, 0x5c, 0xe7, 0x6a, 0xaa, 0xf4, + 0xdb, 0x70, 0x98, 0xd7, 0x54, 0xbb, 0xaa, 0xd4, + 0x18, 0xdd, 0x8c, 0xb3, 0x84, 0x36, 0xbf, 0x72, + 0xad, 0x75, 0x93, 0x33, 0x05, 0x20, 0x82, 0x92, + 0xcd, 0x9a, 0x13, 0xd7, 0xe3, 0xad, 0xd8, 0xeb, + 0x71, 0xe5, 0x7b, 0x87, 0xf0, 0x16, 0xf2, 0xa8, + 0xb4, 0xe2, 0xfb, 0xf0, 0x36, 0x76, 0x1b, 0x21, + 0x79, 0x4a, 0x9a, 0x74, 0x27, 0x88, 0xff, 0xd4, + 0xa3, 0x28, 0xc2, 0x59, 0x9c, 0xc2, 0x10, 0xee, + 0x54, 0x10, 0x57, 0x6b, 0x10, 0x99, 0x77, 0xfb, + 0x83, 0xfd, 0xe8, 0x4a, 0x74, 0x2b, 0x1b, 0xf0, + 0xb4, 0x1d, 0xa8, 0x1f, 0x6a, 0xa1, 0x3f, 0xcc, + 0xa7, 0x75, 0xa5, 0x3d, 0x53, 0x17, 0x9c, 0x31, + 0x4b, 0x36, 0xe4, 0xb2, 0xf2, 0x64, 0xfa, 0xe5, + 0x27, 0x61, 0x5d, 0xf4, 0xf5, 0x36, 0x6f, 0x92, + 0xde, 0xe6, 0xa0, 0x7b, 0xd2, 0x89, 0x55, 0xae, + 0xb3, 0xfa, 0xe2, 0x91, 0xd2, 0x90, 0xf6, 0x23, + 0x6a, 0x26, 0x75, 0x53, 0xe8, 0xf7, 0x11, 0xeb, + 0xaa, 0x71, 0xce, 0xe4, 0x82, 0x87, 0x71, 0x73, + 0x12, 0xa2, 0x46, 0xd4, 0xb3, 0xba, 0x05, 0xbb, + 0xb7, 0x8f, 0x61, 0x86, 0x4c, 0x87, 0xd4, 0x33, + 0xf0, 0x1e, 0xb5, 0x33, 0xfc, 0x2a, 0x31, 0xaf, + 0x0b, 0xc4, 0x9c, 0x51, 0xe9, 0xaa, 0x73, 0x5d, + 0x78, 0x80, 0xe8, 0xea, 0xed, 0xd1, 0xb7, 0x33, + 0xdb, 0x2a, 0x63, 0x6f, 0xbb, 0x9e, 0xf2, 0x38, + 0xcb, 0xa6, 0xb4, 0x38, 0x56, 0xc5, 0x7e, 0xc1, + 0x2e, 0xcf, 0xed, 0xf2, 0x44, 0xaa, 0x3b, 0x8f, + 0xd8, 0x9e, 0x5c, 0x85, 0xe8, 0x96, 0x38, 0xaa, + 0x03, 0x7a, 0x18, 0xe7, 0x49, 0xd3, 0x67, 0xaf, + 0xfc, 0x21, 0xd7, 0xfb, 0xee, 0x74, 0x90, 0x76, + 0x07, 0x5e, 0xc8, 0x21, 0x87, 0x3c, 0x23, 0xcc, + 0xa8, 0x53, 0x53, 0xce, 0xbc, 0xcb, 0x56, 0xb3, + 0x07, 0x0b, 0xda, 0x86, 0x8a, 0x6b, 0x1d, 0xcc, + 0xf9, 0x57, 0x63, 0xef, 0x9f, 0xbc, 0x4c, 0xc2, + 0xde, 0x30, 0x6b, 0xd4, 0xbe, 0x8b, 0x6c, 0xde, + 0xa8, 0x5e, 0xae, 0x5e, 0x7e, 0x79, 0x7f, 0x49, + 0x2e, 0xf1, 0x4a, 0x42, 0x00, 0xc6, 0x33, 0xbe, + 0x3b, 0xd6, 0xde, 0x6f, 0xba, 0x19, 0x16, 0x36, + 0x64, 0xdf, 0x61, 0x41, 0x21, 0x7d, 0x47, 0x58, + 0xa3, 0x70, 0xbd, 0x52, 0x95, 0xd5, 0x77, 0x6a, + 0x55, 0x3d, 0x98, 0xd5, 0xe6, 0xd4, 0xbb, 0x65, + 0x5f, 0x13, 0xe6, 0xac, 0xeb, 0xe3, 0x82, 0x4e, + 0xb9, 0xc8, 0xb8, 0x90, 0x64, 0xee, 0x77, 0x2c, + 0x56, 0x24, 0x19, 0x11, 0x72, 0x13, 0xe6, 0xa8, + 0x39, 0x26, 0x4e, 0xc1, 0xe7, 0x9b, 0x80, 0x5b, + 0xd6, 0xcc, 0x38, 0x9f, 0xf8, 0xde, 0x67, 0x7a, + 0xb7, 0x3e, 0x82, 0x55, 0xc3, 0x19, 0x37, 0xbb, + 0xbf, 0xbe, 0x29, 0x27, 0xbd, 0x3a, 0x12, 0x8c, + 0x9c, 0x80, 0x5c, 0x90, 0x08, 0x27, 0xa3, 0xaf, + 0xb6, 0xb1, 0xab, 0xe5, 0x55, 0x4e, 0x8c, 0x3c, + 0x53, 0x77, 0xe6, 0x9b, 0xf9, 0x2a, 0x1c, 0x3b, + 0x98, 0x37, 0xe5, 0x73, 0x49, 0x35, 0xfe, 0xdb, + 0x3c, 0x5d, 0x7d, 0xc1, 0x80, 0xf3, 0x52, 0x9d, + 0x69, 0x16, 0xaa, 0xa1, 0xa6, 0xb6, 0x43, 0xd8, + 0xe8, 0xdc, 0x05, 0x75, 0x65, 0xf3, 0x31, 0xdf, + 0xe9, 0x84, 0x79, 0x18, 0xb1, 0x63, 0x8e, 0x58, + 0x1a, 0x70, 0x9f, 0x12, 0xf7, 0x02, 0xe2, 0xa9, + 0xc6, 0x64, 0x72, 0x4e, 0xe4, 0x31, 0xc3, 0x3c, + 0x75, 0x52, 0x82, 0xf6, 0x80, 0x53, 0xa9, 0xa3, + 0x62, 0x73, 0x4a, 0x8b, 0xbc, 0x1b, 0x97, 0xe7, + 0xda, 0x37, 0xb9, 0x97, 0xb3, 0x11, 0x67, 0x90, + 0x4b, 0xea, 0x7f, 0x72, 0xb8, 0x0a, 0x52, 0x16, + 0xa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x3a, 0xae, 0xeb, 0x70, + 0x4c, 0x38, 0x57, 0x94, 0x2b, 0xce, 0x7d, 0xd8, + 0x8f, 0xc6, 0xc8, 0x81, 0x3d, 0x20, 0x0b, 0x8d, + 0x1f, 0x9d, 0x0d, 0x76, 0x87, 0x0e, 0xee, 0x82, + 0x43, 0x31, 0x3d, 0xff, 0xbe, 0x02, 0x56, 0x26, + 0xf1, 0x9d, 0xe0, 0x3c, 0x9a, 0x21, 0x29, 0x92, + 0x5c, 0xe6, 0x9f, 0xd9, 0xab, 0xe7, 0x60, 0x96, + 0xfa, 0x50, 0xe6, 0x1c, 0x41, 0xbc, 0x7f, 0x21, + 0xdf, 0x96, 0x6f, 0xca, 0xdc, 0x3d, 0x27, 0x42, + 0x8e, 0xe2, 0x2f, 0x14, 0x52, 0x14, 0x87, 0x73, + 0xf8, 0xac, 0x83, 0x43, 0x25, 0x3e, 0x7b, 0x13, + 0x7d, 0x92, 0x6a, 0x6e, 0xc2, 0x88, 0x59, 0x78, + 0x6e, 0xfb, 0x51, 0x15, 0xfc, 0x2a, 0xf0, 0x1a, + 0xb1, 0xcf, 0xc5, 0xea, 0x3e, 0xca, 0x15, 0xee, + 0xcf, 0x96, 0x13, 0x07, 0xdf, 0x2c, 0xc1, 0x6f, + 0x4e, 0x40, 0x86, 0xf7, 0x6a, 0x8f, 0x0b, 0xf3, + 0x5c, 0xbd, 0x50, 0xb8, 0xdd, 0x5e, 0x40, 0x24, + 0x3c, 0xe4, 0x27, 0x21, 0x79, 0x1c, 0x32, 0x68, + 0xee, 0xe8, 0x34, 0xc2, 0x95, 0x96, 0x95, 0x5d, + 0x65, 0xc0, 0x0d, 0x1b, 0xd2, 0xab, 0xc5, 0x77, + 0x9a, 0x7c, 0xde, 0x58, 0xa0, 0xdb, 0xf2, 0xe6, + 0xf5, 0xcd, 0x27, 0x84, 0xf9, 0xdc, 0x85, 0x35, + 0x0e, 0x3b, 0x10, 0x59, 0x76, 0x01, 0xb9, 0x1a, + 0x47, 0xda, 0xd1, 0x82, 0x71, 0x81, 0xad, 0x20, + 0x53, 0x04, 0xce, 0xd5, 0x0b, 0x42, 0x01, 0xc6, + 0x5e, 0xdf, 0xd8, 0x3c, 0x2f, 0xff, 0x4f, 0x57, + 0x63, 0x59, 0xfd, 0x7a, 0x75, 0x46, 0x17, 0x9b, + 0x88, 0x27, 0xf4, 0x54, 0x5f, 0x10, 0x67, 0xe3, + 0x69, 0x0d, 0x7e, 0x49, 0x5d, 0x17, 0x9e, 0xb5, + 0x05, 0x85, 0xb0, 0xb3, 0x42, 0xeb, 0x31, 0xba, + 0xc1, 0x71, 0x04, 0x07, 0xae, 0xcf, 0x1e, 0x1b, + 0x4b, 0xd8, 0x80, 0xbf, 0x97, 0xb8, 0x47, 0xeb, + 0x07, 0x8f, 0xf6, 0xc6, 0x57, 0xc1, 0x0f, 0x78, + 0xe5, 0x1d, 0x8f, 0x1b, 0x13, 0xf6, 0x6e, 0xb3, + 0x06, 0xf7, 0xa8, 0x0b, 0xa4, 0x99, 0x5c, 0x1f, + 0x98, 0xd7, 0x9f, 0xe5, 0xe4, 0xd4, 0x91, 0xa7, + 0xb0, 0x53, 0xc9, 0x56, 0x0a, 0xf6, 0x65, 0x35, + 0x4b, 0x73, 0x41, 0x90, 0xf2, 0xb0, 0xb7, 0xef, + 0x42, 0x24, 0x9c, 0x77, 0xbd, 0x1a, 0xe5, 0xab, + 0xd9, 0xf8, 0xac, 0x5c, 0xf0, 0x0a, 0xb2, 0xdc, + 0x31, 0xc4, 0xf3, 0x0c, 0xa1, 0xee, 0xf1, 0x35, + 0x88, 0xf9, 0x97, 0x49, 0xa5, 0x59, 0xac, 0x67, + 0x5e, 0xc7, 0xb4, 0xf4, 0x71, 0x60, 0xe5, 0xd4, + 0xf6, 0xa9, 0xed, 0xef, 0x9d, 0x84, 0x86, 0x48, + 0x9d, 0xd4, 0x2b, 0x9e, 0x2f, 0x0c, 0x08, 0x29, + 0x98, 0x35, 0x53, 0xde, 0xcc, 0x81, 0xab, 0x9c, + 0x1b, 0xb7, 0x12, 0x9b, 0x89, 0xbb, 0xe3, 0x3f, + 0xfd, 0x05, 0x15, 0xe9, 0x65, 0xa9, 0x31, 0xec, + 0x70, 0x86, 0xe0, 0x03, 0xc7, 0xc7, 0x4c, 0x71, + 0x2d, 0x6e, 0xe4, 0xd4, 0x9c, 0x66, 0x21, 0x16, + 0x6f, 0x15, 0xd9, 0x3d, 0x4f, 0x57, 0x4b, 0x86, + 0xec, 0xfb, 0x23, 0xe9, 0x2b, 0xae, 0xda, 0x84, + 0x55, 0x62, 0x33, 0x08, 0x33, 0x3e, 0x6a, 0x86, + 0x0d, 0xd1, 0x10, 0xcb, 0x43, 0xca, 0x50, 0x59, + 0xf6, 0x6a, 0x6e, 0x1f, 0xfa, 0x46, 0x47, 0x51, + 0x61, 0xd3, 0xda, 0xad, 0x0c, 0xfc, 0xe4, 0xb3, + 0xfc, 0xb8, 0x17, 0xb1, 0x3f, 0xa2, 0x70, 0x6c, + 0x6a, 0x54, 0x39, 0xe1, 0x3b, 0xfd, 0x2a, 0x56, + 0xae, 0xd8, 0x6a, 0x95, 0xa2, 0x59, 0x0b, 0x75, + 0xd2, 0xce, 0x76, 0x14, 0xf8, 0x91, 0x29, 0x84, + 0x7c, 0x1e, 0xea, 0x96, 0xea, 0x5c, 0xd3, 0x6b, + 0xb8, 0xc3, 0x69, 0xed, 0xe9, 0x30, 0x34, 0xd3, + 0xb0, 0x03, 0xe2, 0xef, 0x3e, 0x7f, 0x01, 0x5f, + 0xed, 0x94, 0x74, 0x79, 0x3b, 0x24, 0x9f, 0xdb, + 0xfe, 0xa6, 0x35, 0x9e, 0x4b, 0xd8, 0x7f, 0x69, + 0xf5, 0x22, 0xca, 0x7c, 0x3e, 0xec, 0xef, 0x70, + 0x97, 0xba, 0x2e, 0x16, 0x0e, 0x3a, 0xb0, 0xe0, + 0xc1, 0xf3, 0xdf, 0x81, 0xb6, 0xe7, 0x65, 0x4f, + 0x3e, 0xf6, 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, 0x44, 0x2f, + 0xdd, 0x72, 0x32, 0xf6, 0x0c, 0xec, 0x76, 0xc3, + 0x0e, 0x57, 0xe4, 0x8b, 0xc8, 0xd3, 0x6d, 0xa5, + 0xa3, 0x07, 0x95, 0x68, 0x5f, 0x12, 0x6e, 0xbc, + 0xbe, 0x68, 0x3f, 0x78, 0x4d, 0x19, 0xc5, 0xd1, + 0xac, 0xa7, 0xcc, 0x13, 0x10, 0x06, 0x8e, 0xc2, + 0x7a, 0xae, 0xee, 0xe3, 0x60, 0x03, 0xb2, 0x5f, + 0xa5, 0xe0, 0x2a, 0x91, 0x98, 0x43, 0xde, 0x21, + 0xe6, 0xd8, 0x10, 0x9b, 0x74, 0xd0, 0xbb, 0x12, + 0x62, 0x90, 0xf2, 0xf4, 0xc1, 0x67, 0x1e, 0x53, + 0x80, 0x32, 0x63, 0xc8, 0xf6, 0xce, 0x49, 0x93, + 0xd2, 0xa2, 0xd3, 0xeb, 0x26, 0xe3, 0x45, 0x41, + 0xa5, 0xdb, 0xf9, 0x90, 0x1e, 0xcd, 0x8d, 0xb4, + 0x4e, 0x70, 0x88, 0x1a, 0x5f, 0xba, 0x97, 0x1a, + 0x37, 0xe0, 0x1b, 0xe1, 0xb7, 0xba, 0x01, 0xdf, + 0xe8, 0x61, 0xcf, 0x37, 0x82, 0x2c, 0xd4, 0x1a, + 0xb2, 0x9e, 0xd9, 0x09, 0x35, 0x6c, 0x44, 0x61, + 0x14, 0x84, 0x95, 0xec, 0x71, 0xf6, 0xcd, 0xc2, + 0xe6, 0x86, 0x21, 0x79, 0xca, 0xd2, 0xc3, 0xee, + 0xb7, 0x62, 0x02, 0x56, 0x35, 0x74, 0x34, 0x80, + 0x47, 0xed, 0xec, 0xfe, 0x82, 0xca, 0x78, 0xd7, + 0xa3, 0xb2, 0x8b, 0xe8, 0x50, 0x56, 0x78, 0x02, + 0xf7, 0x88, 0xb0, 0x6d, 0xcc, 0xda, 0xab, 0x7b, + 0x7f, 0x79, 0x29, 0x5a, 0x62, 0xa5, 0xd7, 0x6f, + 0xb1, 0x7b, 0x15, 0xbb, 0x78, 0x6f, 0xb1, 0x83, + 0xb7, 0xf3, 0x67, 0x5a, 0xef, 0x2c, 0xe3, 0x8f, + 0xa1, 0x6e, 0x48, 0xfa, 0xd5, 0xb3, 0xa3, 0xf0, + 0xde, 0x77, 0x3b, 0xfe, 0xbf, 0x26, 0x4d, 0x45, + 0xaa, 0xfd, 0x07, 0xe1, 0x8a, 0x76, 0xf3, 0x50, + 0xec, 0xf8, 0x72, 0x3c, 0x38, 0xff, 0x97, 0x11, + 0xb8, 0x32, 0xeb, 0xed, 0x99, 0xd7, 0x19, 0x9b, + 0xfb, 0xe8, 0x46, 0xda, 0x73, 0x77, 0x15, 0xca, + 0xca, 0x55, 0xf8, 0x4b, 0xd4, 0x53, 0xfa, 0x37, + 0xce, 0x29, 0x5e, 0x91, 0xb0, 0x52, 0xd6, 0x93, + 0x32, 0x47, 0x1c, 0xf5, 0xb3, 0x0e, 0xb9, 0x82, + 0x44, 0xb7, 0x8a, 0x18, 0x84, 0x35, 0x11, 0xf7, + 0x3a, 0xae, 0x06, 0x89, 0xae, 0x1c, 0x11, 0x39, + 0x2a, 0xa5, 0x24, 0xaf, 0x72, 0xd2, 0xe8, 0x46, + 0x41, 0xcf, 0x60, 0xf4, 0xf0, 0x95, 0x6e, 0xbc, + 0xdd, 0xd3, 0x6b, 0x83, 0x33, 0x3c, 0x23, 0x3e, + 0x72, 0x68, 0xf5, 0x77, 0xb2, 0xf5, 0x73, 0xee, + 0xf8, 0xde, 0x59, 0xb7, 0xb2, 0xd7, 0x9f, 0xb5, + 0x09, 0x82, 0xd7, 0x21, 0x24, 0x4f, 0x47, 0x1f, + 0x59, 0x8d, 0xbd, 0x27, 0xad, 0x52, 0xfc, 0x59, + 0x83, 0x48, 0x87, 0x3c, 0xb9, 0xec, 0xac, 0xb6, + 0x96, 0x3f, 0xf3, 0x06, 0x23, 0xe4, 0x50, 0xfb, + 0x2c,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 0x7a, 0x7d, 0x03, 0x47, 0xa2, 0x32, + 0xa4, 0x7f, 0x54, 0x0f, 0xe8, 0xa7, 0x77, 0x56, + 0xf6, 0x06, 0x20, 0x16, 0x12, 0xca, 0x88, 0x69, + 0x5d, 0xe9, 0xd1, 0xdd, 0xea, 0xaa, 0x58, 0x88, + 0xfa, 0x10, 0x75, 0x2e, 0x79, 0x46, 0xcf, 0x39, + 0x71, 0x88, 0x02, 0x14, 0x74, 0xb9, 0x49, 0x19, + 0xbd, 0x95, 0x31, 0x4a, 0x8c, 0x89, 0xbe, 0x6b, + 0x2d, 0xba, 0xf3, 0x16, 0xea, 0xdc, 0xa3, 0x36, + 0x5f, 0x57, 0xeb, 0xea, 0x5e, 0x9e, 0x34, 0x34, + 0xc8, 0xcd, 0x0d, 0xf6, 0xa0, 0x75, 0xea, 0x69, + 0xe2, 0xfd, 0x8f, 0x0e, 0x76, 0x71, 0x3c, 0xc7, + 0x4c, 0x58, 0xff, 0x58, 0xfd, 0xa9, 0xf3, 0x40, + 0xfa, 0x83, 0xb3, 0x2e, 0x3d, 0x75, 0x6e, 0x4a, + 0x37, 0x93, 0x3d, 0x1e, 0x19, 0xa4, 0x3d, 0xdb, + 0xd5, 0x69, 0x45, 0xdd, 0x93, 0xae, 0x66, 0x17, + 0x75, 0x10, 0xea, 0xe3, 0x90, 0x9f, 0x10, 0x46, + 0xae, 0x53, 0x6f, 0xe5, 0x4c, 0x2e, 0xf2, 0xb3, + 0x26, 0x2c, 0x02, 0xde, 0xce, 0x2a, 0x55, 0xef, + 0x37, 0x48, 0xf8, 0xca, 0xfe, 0xa8, 0xdb, 0x15, + 0x87, 0xf6, 0x92, 0xf5, 0xa4, 0x99, 0xb2, 0xb2, + 0x47, 0xd9, 0x3a, 0xab, 0x4b, 0x7b, 0x12, 0xd5, + 0xaf, 0x44, 0xf2, 0xa5, 0x8d, 0x89, 0x93, 0xa5, + 0x51, 0x7d, 0x94, 0xd5, 0x8c, 0x68, 0x79, 0x02, + 0xf5, 0x10, 0x4a, 0x99, 0xd2, 0x27, 0x79, 0xae, + 0x0b, 0x41, 0xec, 0x7e, 0x65, 0xd2, 0x4d, 0x09, + 0x93, 0xce, 0x22, 0xec, 0xa2, 0xeb, 0xd4, 0xf5, + 0x0e, 0xf1, 0xb9, 0xa0, 0xa8, 0x10, 0x37, 0x67, + 0xc5, 0x8b, 0x75, 0xad, 0xae, 0xbe, 0x52, 0x8f, + 0xe0, 0x5c, 0xd4, 0x57, 0xf6, 0x94, 0x3d, 0x65, + 0xc7, 0x73, 0x45, 0x84, 0xfc, 0x92, 0x5c, 0x11, + 0x95, 0x42, 0x25, 0x88, 0x63, 0xbd, 0x95, 0xb5, + 0x6f, 0xab, 0xc4, 0xd4, 0x2b, 0x15, 0x55, 0xcd, + 0x2e, 0x58, 0x1a, 0x55, 0xc5, 0x0a, 0x76, 0x10, + 0x72, 0x51, 0x78, 0x25, 0x65, 0x4d, 0x09, 0x2b, + 0x5d, 0xa5, 0xb8, 0x31, 0x37, 0x77, 0x84, 0xd8, + 0x1a, 0xd4, 0x80, 0x44, 0x4e, 0x88, 0x87, 0x57, + 0xa1, 0xf1, 0x8c, 0x4e, 0xc7, 0x9e, 0xff, 0xb3, + 0x32, 0xee, 0x3c, 0x46, 0xa4, 0x00, 0xef, 0x4d, + 0x78, 0xe3, 0x0a, 0x2b, 0x04, 0xaa, 0x15, 0x37, + 0xc2, 0x46, 0x58, 0x1e, 0x82, 0xd9, 0xcd, 0x7d, + 0x5a, 0x05, 0x88, 0x08, 0xb0, 0x95, 0x58, 0x73, + 0x1f, 0x4a, 0x0f, 0xd9, 0x43, 0x0d, 0x6e, 0x12, + 0xbf, 0xdd, 0xc2, 0x33, 0x69, 0x49, 0xa6, 0xec, + 0x8e, 0x35, 0x61, 0x0d, 0x55, 0xe5, 0x78, 0x24, + 0xec, 0xf3, 0xeb, 0x78, 0x86, 0xeb, 0x77, 0xd0, + 0x79, 0xad, 0x0c, 0x75, 0x91, 0x7b, 0x71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, 0xdd, 0x6d, 0x5d, 0xba, 0x34, 0xf2, + 0xbb, 0xfa, 0x57, 0x33, 0xd4, 0xe7, 0x0a, 0x42, + 0x8c, 0xff, 0xcc, 0x84, 0x99, 0x9f, 0x8b, 0x1e, + 0xa6, 0xa5, 0xa4, 0x1f, 0x51, 0xe8, 0x33, 0xc4, + 0x5d, 0x10, 0xd8, 0x80, 0xf3, 0x1d, 0xea, 0x61, + 0x50, 0x87, 0x3f, 0xd9, 0xf2, 0x99, 0x6b, 0x79, + 0x4b, 0x6d, 0x2c, 0xba, 0x9a, 0x9e, 0x3b, 0x5e, + 0xdc, 0x56, 0x0f, 0xe6, 0x73, 0x6a, 0x65, 0xc5, + 0x9e, 0x51, 0x91, 0xa3, 0x43, 0xef, 0xfb, 0x4b, + 0xba, 0xb9, 0xad, 0x4a, 0xa9, 0xf4, 0x7b, 0x1e, + 0x07, 0xf3, 0x08, 0x43, 0x35, 0x49, 0x33, 0xa4, + 0xd7, 0xa1, 0x8c, 0xb2, 0x7e, 0xf1, 0xed, 0xf5, + 0xb7, 0xcb, 0xd5, 0x05, 0x42, 0xfb, 0x43, 0xfc, + 0x86, 0x7e, 0x55, 0x75, 0xc9, 0x4d, 0x73, 0x35, + 0x63, 0x9c, 0x7f, 0x68, 0x03, 0x49, 0xb5, 0x4d, + 0xae, 0x80, 0x04, 0xb1, 0x18, 0x9d, 0x89, 0x93, + 0x5c, 0x9e, 0xc0, 0xef, 0xae, 0x49, 0xbe, 0x03, + 0x2c, 0xe7, 0x9d, 0x2c, 0x28, 0x9f, 0xc8, 0x45, + 0x88, 0x41, 0x10, 0x5f, 0x55, 0x74, 0x06, 0x50, + 0x43, 0x25, 0xf7, 0x58, 0x38, 0xd1, 0x7b, 0x12, + 0xce, 0xbb, 0x57, 0xe5, 0x69, 0xa3, 0xf8, 0x08, + 0xd5, 0x1e, 0x03, 0xa9, 0x8e, 0x6f, 0x29, 0xd5, + 0x82, 0x04, 0xca, 0xae, 0x2f, 0x38, 0x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x69, 0xe8, 0x4a, 0xe1, 0x83, 0xef, + 0x9a, 0x7e, 0x06, 0x24, 0xd4, 0xbb, 0xea, 0xc1, + 0xc8, 0x52, 0xf4, 0x22, 0x46, 0xbf, 0x2b, 0x2d, + 0xc1, 0xdc, 0x84, 0xc4, 0xa2, 0xe8, 0x9e, 0x97, + 0x7a, 0x95, 0xf1, 0x8a, 0xd4, 0x03, 0xf2, 0xf4, + 0x73, 0x90, 0x11, 0x89, 0xbc, 0x2b, 0x16, 0x72, + 0xb3, 0x2c, 0x65, 0x8f, 0x6b, 0x67, 0xa5, 0x0a, + 0xf5, 0xbb, 0x31, 0x2b, 0x2f, 0xba, 0x98, 0x99, + 0x53, 0x5d, 0x94, 0xfc, 0x32, 0xb3, 0xca, 0x2d, + 0xe2, 0xc3, 0x52, 0xf7, 0x01, 0xde, 0x17, 0xce, + 0xff, 0xa3, 0x6b, 0x88, 0xae, 0x75, 0x8d, 0xba, + 0xc1, 0x23, 0x3d, 0xd8, 0xa4, 0x15, 0x25, 0xad, + 0x44, 0x9d, 0x35, 0x6d, 0xee, 0x20, 0xeb, 0x0e, + 0x28, 0x63, 0xd5, 0xc9, 0x56, 0xc6, 0x99, 0x6b, + 0xfd, 0x91, 0xad, 0x55, 0xef, 0x52, 0xcf, 0xab, + 0x64, 0x2e, 0x3a, 0xb2, 0x95, 0x6b, 0x7c, 0xee, + 0x4a, 0xf5, 0x71, 0x67, 0x51, 0xfa, 0x83, 0xd3, + 0x75, 0x55, 0xeb, 0xf5, 0x97, 0xc4, 0x3a, 0x4b, + 0xbf, 0x42, 0x1d, 0xaf, 0x4e, 0x07, 0xa4, 0x8e, + 0x66, 0x63, 0xbb, 0xab, 0x64, 0xc1, 0xeb, 0x0c, + 0xb3, 0xee, 0xac, 0xb8, 0x2a, 0xaa, 0x02, 0x61, + 0x9e, 0xe0, 0xef, 0xa4, 0x12, 0x87, 0x9f, 0x7a, + 0xd9, 0x57, 0x1e, 0xfb, 0xbd, 0x1b, 0xe9, 0x4f, + 0x22, 0x6a, 0xc6, 0x52, 0x2d, 0xd8, 0xb3, 0x9b, + 0x62, 0xfd, 0x74, 0x23, 0x6c, 0x55, 0xad, 0x1e, + 0x25, 0x6d, 0x61, 0xd0, 0x29, 0x41, 0xb4, 0x3c, + 0x7f, 0x2c, 0x62, 0xf7, 0x88, 0x3c, 0x50, 0x6e, + 0x6b, 0xeb, 0xc7, 0x12, 0xa9, 0xae, 0x05, 0x8c, + 0x80, 0x51, 0xc3, 0x3a, 0x4e, 0x65, 0x5d, 0x58, + 0x77, 0x08, 0xdb, 0x79, 0x14, 0x30, 0x4e, 0xb3, + 0x24, 0xea, 0xdb, 0x71, 0x95, 0xc0, 0x52, 0xad, + 0x1a, 0x47, 0x7c, 0xad, 0x54, 0xa8, 0x66, 0x74, + 0x3a, 0x76, 0x30, 0x7b, 0xef, 0x8c, 0xba, 0x9d, + 0x4d, 0x1d, 0x6f, 0x0f, 0x9d, 0x87, 0xd2, 0x9f, + 0xa4, 0x7b, 0x1d, 0xef, 0x6f, 0xca, 0x53, 0x84, + 0x17, 0xed, 0x87, 0xc2, 0x43, 0x38, 0xbe, 0x74, + 0x1f, 0xb2, 0x3f, 0x19, 0xf7, 0x14, 0xdf, 0x73, + 0xad, 0xa3, 0x2a, 0x80, 0x11, 0x45, 0x67, 0x16, + 0x10, 0x37, 0xb1, 0xe9, 0x3b, 0x85, 0x05, 0x21, + 0x13, 0xcc, 0x08, 0x19, 0xf4, 0x12, 0xe2, 0xac, + 0x90, 0x1c, 0xd7, 0x60, 0x17, 0x84, 0xe7, 0x58, + 0x7f, 0x6f, 0x3f, 0x17, 0x6e, 0xb6, 0x6f, 0x22, + 0xa6, 0x97, 0x85, 0x90, 0x63, 0x0a, 0xaf, 0xfc, + 0x17, 0x42, 0xdf, 0x15, 0x2d, 0x44, 0x82, 0x5c, + 0x68, 0xa9, 0x66, 0x11, 0xf6, 0xb4, 0x0b, 0xfb, + 0xd9, 0xbd, 0x2c, 0x2a, 0x92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0x8f, 0xa2, + 0x49, 0x73, 0x00, 0x7e, 0xc2, 0xa3, 0xa6, 0x60, + 0xac, 0xba, 0x01, 0xb5, 0xe0, 0x08, 0xe4, 0x26, + 0x04, 0x9f, 0x1c, 0x1f, 0x27, 0x0e, 0xc2, 0x8c, + 0x0b, 0x31, 0x99, 0x11, 0x72, 0x43, 0xea, 0xb2, + 0xa3, 0xd9, 0x78, 0xbb, 0xf0, 0x7a, 0x85, 0x94, + 0x1f, 0x84, 0xe4, 0xfc, 0x51, 0x9c, 0xb0, 0x21, + 0x83, 0x70, 0x7c, 0x4f, 0x1c, 0xf1, 0x68, 0xc5, + 0x5f, 0xeb, 0x06, 0x84, 0x7c, 0x55, 0x65, 0xa8, + 0x2a, 0x5c, 0x3c, 0x82, 0x7b, 0x96, 0x29, 0x5d, + 0x7f, 0xf3, 0xf8, 0x9d, 0xf0, 0x76, 0x97, 0x56, + 0x95, 0x88, 0x30, 0x54, 0xad, 0xb5, 0x88, 0x6b, + 0x59, 0xfe, 0xd8, 0x28, 0xb2, 0x22, 0xec, 0xc2, + 0xb5, 0x77, 0x43, 0x5b, 0x11, 0xe2, 0xf0, 0x76, + 0x54, 0x5f, 0x94, 0x47, 0xca, 0x09, 0x9e, 0x35, + 0xc5, 0xfc, 0x83, 0x4d, 0xe4, 0x30, 0x72, 0x26, + 0x23, 0x64, 0x31, 0xf5, 0x5d, 0xc2, 0x06, 0x67, + 0xac, 0x35, 0xab, 0x5b, 0xc9, 0x9f, 0x71, 0x32, + 0xe8, 0xcd, 0xfd, 0x2a, 0x7a, 0x14, 0xa5, 0x2e, + 0x2d, 0xdb, 0x33, 0x76, 0xfc, 0x33, 0xf9, 0xc2, + 0xc3, 0x78, 0x20, 0xc2, 0x2a, 0x7a, 0x1c, 0xa5, + 0x8a, 0xd3, 0xc5, 0x1e, 0x9c, 0x39, 0x22, 0x77, + 0x23, 0x4a, 0xda, 0xf9, 0xbf, 0x3a, 0xcc, 0x60, + 0x3a, 0x3e, 0x76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c, 0xc5, 0x7f, 0x1d, + 0x31, 0xe6, 0xd8, 0x74, 0xb3, 0xb7, 0x32, 0xc6, + 0x51, 0x16, 0xe4, 0xb9, 0x86, 0xb1, 0x81, 0x93, + 0x37, 0x67, 0xcd, 0xd3, 0xe6, 0x90, 0x99, 0xf3, + 0xf9, 0xfb, 0x9e, 0x3b, 0xf0, 0x58, 0x5b, 0x86, + 0x0c, 0x3a, 0xd2, 0x1e, 0x93, 0xc7, 0x21, 0x66, + 0xbc, 0xd9, 0xf6, 0xdd, 0xdc, 0x66, 0x68, 0x35, + 0xc7, 0xf7, 0xbd, 0xa8, 0xdf, 0x27, 0x74, 0x56, + 0x42, 0x4f, 0x36, 0x65, 0x54, 0xd5, 0xd3, 0xc3, + 0xc4, 0xf8, 0x4d, 0x72, 0x96, 0xcd, 0xce, 0x60, + 0xb3, 0xea, 0xc7, 0x5e, 0x7a, 0x47, 0xc5, 0x08, + 0x8e, 0x71, 0x17, 0x99, 0xf0, 0x88, 0xd5, 0x67, + 0x1d, 0x16, 0x27, 0x5f, 0x73, 0x4a, 0x16, 0x64, + 0x31, 0x96, 0x88, 0xb5, 0x63, 0x27, 0x01, 0xeb, + 0x80, 0xa6, 0xaf, 0x1f, 0x7c, 0x01, 0x23, 0xf6, + 0xac, 0x15, 0xb4, 0xd4, 0x27, 0xf1, 0x92, 0xa4, + 0xa5, 0xdb, 0x8a, 0xc4, 0x91, 0x01, 0xb4, 0xe7, + 0x3a, 0xbd, 0xea, 0x1c, 0x83, 0x47, 0x49, 0x4f, + 0x07, 0x07, 0xce, 0xa5, 0x70, 0xaa, 0x34, 0xae, + 0xf2, 0x33, 0x99, 0xc7, 0xdc, 0xc4, 0xc8, 0x1b, + 0xe4, 0xcb, 0xe5, 0xcc, 0xc2, 0xd8, 0x49, 0xc2, + 0xb8, 0x53, 0x3d, 0xd5, 0x53, 0xa5, 0x0e, 0x99, + 0x99, 0x12, 0x94, 0x47, 0x9c, 0xca, 0x1e, 0xcc, + 0x95,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, 0xf7, 0x11, 0x4f, 0xdb, + 0x3f, 0xd0, 0xa7, 0x8f, 0x85, 0x57, 0x88, 0x10, + 0x00, 0x7b, 0xc9, 0x8e, 0xfb, 0xd5, 0x40, 0x3b, + 0xac, 0x5c, 0xf4, 0x1c, 0xed, 0xbe, 0x0d, 0x63, + 0x0f, 0x75, 0xd0, 0x57, 0xd8, 0x80, 0xf3, 0x39, + 0x4f, 0x79, 0x68, 0x90, 0x71, 0x76, 0x04, 0xd7, + 0x93, 0x59, 0x2a, 0xf1, 0x26, 0x01, 0x7c, 0x13, + 0x89, 0xdf, 0x78, 0x95, 0x08, 0xbd, 0x80, 0x48, + 0x35, 0x24, 0xc7, 0xbb, 0xff, 0xa8, 0x0c, 0x2c, + 0x5b, 0xc8, 0xf3, 0x45, 0xed, 0x1f, 0x44, 0x83, + 0xfa, 0xfa, 0xc0, 0x01, 0x42, 0xe7, 0x43, 0x94, + 0x64, 0xe0, 0xac, 0x87, 0x28, 0x57, 0x98, 0x74, + 0xbe, 0x96, 0x7c, 0x8d, 0x50, 0x01, 0xe3, 0x40, + 0x8e, 0x80, 0x76, 0x29, 0xa3, 0x83, 0xd1, 0xff, + 0x0d, 0xc4, 0x6e, 0x21, 0x47, 0xee, 0x71, 0xac, + 0x4e, 0xb7, 0x9f, 0x84, 0x07, 0x9b, 0xe4, 0x0a, + 0xc3, 0x35, 0xf9, 0xca, 0x45, 0xab, 0x1b, 0x8b, + 0x12, 0x97, 0x17, 0x9d, 0x55, 0xdb, 0x61, 0x39, + 0xde, 0x7d, 0xdf, 0x5e, 0x34, 0xa1, 0xc0, 0xb3, + 0xa3, 0x8c, 0x9a, 0x51, 0x8b, 0xef, 0x08, 0xbc, + 0xa5, 0x13, 0xab, 0x82, 0x3b, 0x2f, 0x09, 0xe8, + 0xbb, 0xf4, 0xc2, 0xbd, 0xb5, 0x19, 0xfc, 0x59, + 0xdc, 0x93, 0x92, 0x3e, 0xfa, 0x2e, 0x59, 0x87, + 0x6c, 0x4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, + 0x75, 0x7e, 0x07, 0xa7, 0xab, 0x75, 0xdf, 0x8b, + 0xbb, 0xc6, 0xfa, 0xc2, 0x88, 0x1b, 0x42, 0x66, + 0xab, 0x3d, 0xc3, 0x94, 0x03, 0xff, 0xd1, 0x6b, + 0x86, 0x76, 0xb4, 0xe8, 0xac, 0x34, 0x96, 0xdd, + 0x05, 0xe3, 0xc6, 0xd6, 0xd2, 0xbb, 0x45, 0x43, + 0x63, 0x5b, 0x58, 0x07, 0x96, 0xf3, 0x70, 0x56, + 0x77, 0xe5, 0x80, 0x9b, 0x97, 0x89, 0xdf, 0x6a, + 0xe5, 0xb1, 0xab, 0x27, 0x73, 0x77, 0xc2, 0x20, + 0x5b, 0x45, 0x55, 0xe2, 0x46, 0x11, 0xe2, 0xc2, + 0xb9, 0x63, 0x58, 0xc1, 0x05, 0xb5, 0xcd, 0x99, + 0x4f, 0x7f, 0x70, 0xfc, 0xae, 0x78, 0x97, 0x2d, + 0xc0, 0x79, 0x5f, 0x82, 0x97, 0xd1, 0x43, 0xbc, + 0xa1, 0x42, 0xec, 0x5c, 0x29, 0xd8, 0x0b, 0xaa, + 0x54, 0xee, 0x30, 0x8b, 0xcd, 0x15, 0x87, 0xe2, + 0xab, 0x86, 0x42, 0x3e, 0x5c, 0xc1, 0x03, 0xa1, + 0xf1, 0xf4, 0x20, 0x6a, 0x9f, 0xd3, 0x70, 0xa4, + 0xa7, 0x52, 0x5e, 0x3d, 0x47, 0x9e, 0x39, 0x22, + 0x7f, 0x97, 0xa3, 0x80, 0xf1, 0xfd, 0xbf, 0x60, + 0x5e, 0xbc, 0x8e, 0x68, 0x51, 0x29, 0x95, 0xf3, + 0xf6, 0x85, 0x63, 0x69, 0x3b, 0xf1, 0x5d, 0xf4, + 0x65, 0xc6, 0xf9, 0x93, 0x14, 0x72, 0x91, 0x5f, + 0x91, 0xb5, 0x20, 0xae, 0x2b, 0x73, 0x8d, 0x14, + 0xae, 0x62, 0xf3, 0x00, 0x56, 0x92, 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 0x6a, 0xc0, + 0x34, 0xf1, 0xe1, 0xb0, 0x1a, 0x80, 0xfe, 0x94, + 0x63, 0x1c, 0x25, 0xd3, 0x59, 0x73, 0xe6, 0x5d, + 0xe4, 0x58, 0xa0, 0x0e, 0xe1, 0xc7, 0xb0, 0x2a, + 0xc8, 0x87, 0x5d, 0xbf, 0x36, 0x85, 0x72, 0x0d, + 0x5a, 0x45, 0x85, 0x01, 0x37, 0x2a, 0xc5, 0x61, + 0x27, 0x80, 0xf8, 0x5f, 0x5d, 0x53, 0xef, 0x7a, + 0x7a, 0x7d, 0xe8, 0x67, 0x94, 0xc7, 0x3e, 0x82, + 0x8c, 0xfe, 0x49, 0xcf, 0x7b, 0x10, 0xa1, 0xe4, + 0x68, 0xcc, 0x6a, 0x46, 0x56, 0x59, 0x30, 0xfe, + 0xed, 0xa7, 0x7e, 0x0c, 0xfd, 0x49, 0x27, 0x9a, + 0xc7, 0x61, 0xb1, 0x8f, 0xfd, 0xed, 0xaf, 0x83, + 0xa8, 0xfe, 0xd1, 0x55, 0xa9, 0xf1, 0xab, 0x88, + 0x27, 0x15, 0x27, 0x38, 0x6a, 0x15, 0x62, 0x53, + 0x85, 0x2b, 0x7a, 0x95, 0xa8, 0x0a, 0x73, 0x91, + 0x71, 0x4c, 0x51, 0x16, 0xad, 0x6f, 0x20, 0x5f, + 0xb8, 0xba, 0x27, 0x7b, 0xd5, 0x69, 0xc4, 0xb2, + 0x05, 0x9c, 0x3c, 0x8c, 0xc6, 0x82, 0x14, 0xb4, + 0x49, 0x21, 0x76, 0x7f, 0x56, 0x2d, 0xa4, 0xb8, + 0xc6, 0x51, 0x48, 0x80, 0x88, 0xcd, 0x3d, 0xa7, + 0x4f, 0xea, 0x93, 0xd5, 0x05, 0x98, 0x0d, 0x58, + 0xf9, 0xf4, 0x6a, 0xf5, 0xf5, 0x48, 0x7b, 0x54, + 0xe7, 0xac, 0x89, 0x95, 0xfa, 0xe5, 0xe3, 0x2b, + 0xdb, 0xf7, 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 0x32, 0xad, 0x7f, 0xa2, 0xf7, 0x63, + 0x12, 0x20, 0xdf, 0x66, 0xaa, 0x46, 0x3c, 0x69, + 0x4f, 0xfb, 0x9d, 0xfb, 0x67, 0xe2, 0x9e, 0x1c, + 0x11, 0xa6, 0x9d, 0x9b, 0x82, 0x3f, 0x42, 0x3a, + 0xdc, 0x43, 0x64, 0xf8, 0x11, 0x86, 0x2d, 0x71, + 0x98, 0x90, 0xe9, 0x16, 0x2f, 0xfe, 0x4b, 0x21, + 0x6e, 0x38, 0x1f, 0x57, 0x71, 0x1d, 0x55, 0xb0, + 0x34, 0x77, 0xdd, 0xda, 0x75, 0x24, 0x2b, 0xee, + 0x44, 0xad, 0x8c, 0x4b, 0xca, 0xf0, 0xca, 0x75, + 0x2d, 0x60, 0xbf, 0xa8, 0x08, 0xca, 0x8a, 0x3b, + 0x58, 0xb9, 0x56, 0x09, 0xd8, 0xd7, 0xf6, 0x17, + 0x94, 0x45, 0x85, 0x63, 0xa8, 0x66, 0x61, 0xb5, + 0x4e, 0x1f, 0xdc, 0xde, 0x59, 0x3e, 0xcc, 0x1e, + 0x8e, 0xb8, 0xe8, 0xfc, 0x92, 0x81, 0xdf, 0x6f, + 0x19, 0x25, 0x77, 0x4b, 0xef, 0x46, 0x8c, 0x32, + 0x39, 0x5c, 0xa5, 0xc4, 0xef, 0x1d, 0xc8, 0xc3, + 0x10, 0x07, 0xc7, 0x72, 0x5e, 0xc7, 0x24, 0x6e, + 0x46, 0x5f, 0x73, 0x15, 0xb2, 0x9a, 0x18, 0xfa, + 0x6e, 0x71, 0xf3, 0xdc, 0xe6, 0xf8, 0x77, 0x23, + 0xe2, 0xd3, 0x70, 0x57, 0x85, 0x3b, 0xee, 0x6b, + 0x0d, 0xbd, 0x7e, 0x90, 0x7c, 0xe0, 0x74, 0xb4, + 0x86, 0xa4, 0xa2, 0x89, 0x08, 0x18, 0xff, 0x08, + 0x62, 0x87, 0x12, 0x6e, 0xb7, 0xa5, 0x09, 0xae, + 0xec, 0xe1, 0x8c, 0xb2, 0xbf, 0xc2, 0x7a, 0x31, + 0xe9, 0xa8, 0x34, 0xcb, 0x29, 0x5e, 0x75, 0xef, + 0x97, 0x28, 0x87, 0x85, 0xd5, 0x62, 0xa7, 0xf5, + 0x85, 0x0d, 0x91, 0xf9, 0xc1, 0x2e, 0xfb, 0xd2, + 0xd9, 0xb4, 0xbf, 0xb0, 0x5f, 0xc8, 0x37, 0xad, + 0xe0, 0xb6, 0x58, 0x12, 0x7a, 0x54, 0x2a, 0x10, + 0xe3, 0x93, 0x31, 0x97, 0x8f, 0xa7, 0x25, 0x3c, + 0xe0, 0x96, 0xec, 0x8d, 0x81, 0x63, 0xda, 0xf5, + 0x16, 0xdf, 0xed, 0x3c, 0x3d, 0x8c, 0x9e, 0xfe, + 0x60, 0xc1, 0xcd, 0xda, 0xc5, 0x5c, 0xd6, 0x43, + 0xee, 0xf9, 0x68, 0x96, 0x38, 0xd6, 0xd3, 0x8d, + 0xb8, 0x5b, 0xb0, 0x16, 0xad, 0x02, 0x9c, 0xe3, + 0x82, 0x25, 0x39, 0x35, 0x88, 0xae, 0xf9, 0x79, + 0xf6, 0xfc, 0x61, 0xeb, 0xf3, 0xee, 0x34, 0xc4, + 0x48, 0x21, 0x79, 0xd8, 0x1a, 0x2a, 0xc3, 0x6c, + 0x31, 0xa6, 0xcd, 0x39, 0xc9, 0xaf, 0x34, 0x08, + 0x27, 0xfe, 0xf3, 0xeb, 0xe9, 0xdd, 0x55, 0x25, + 0x8a, 0xbd, 0xa4, 0x95, 0x58, 0x13, 0x7f, 0x66, + 0xc4, 0x0c, 0xe7, 0xef, 0x43, 0x56, 0x2b, 0x30, + 0xdf, 0xeb, 0x32, 0x4d, 0x60, 0xad, 0x80, 0x75, + 0x36, 0x5e, 0xe1, 0xee, 0xb1, 0xe4, 0x0d, 0x0c, + 0x33, 0x05, 0x46, 0xc1, 0x73, 0xdf, 0xc3, 0x02, + 0xb2, 0xfd, 0x4e, 0x76, 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 0xbf, 0x2f, 0xd6, 0x06, 0xce, 0xc8, 0x03, 0x72, + 0xd0, 0x0a, 0xcb, 0xb9, 0x72, 0x3f, 0x6a, 0x88, + 0x6b, 0xa1, 0xd7, 0x5a, 0xc2, 0x36, 0x6a, 0xa1, + 0xa3, 0x46, 0x44, 0xaf, 0x7f, 0x37, 0x56, 0x98, + 0xb1, 0xd6, 0xa7, 0x96, 0xe6, 0xb7, 0x30, 0x6e, + 0x92, 0xea, 0xa8, 0xd9, 0x97, 0xc1, 0xdb, 0x6b, + 0x8e, 0xf9, 0x8c, 0x18, 0xbb, 0x77, 0x07, 0x9d, + 0xa1, 0xb7, 0xc3, 0xce, 0xc4, 0xdb, 0xab, 0xdb, + 0x5f, 0xbc, 0x85, 0xc7, 0xdf, 0xc6, 0xb6, 0xa3, + 0x5b, 0x5e, 0x96, 0x5a, 0x7f, 0x01, 0x3b, 0xf2, + 0x90, 0x22, 0x1f, 0x24, 0xed, 0x4b, 0xf6, 0x43, + 0xcc, 0x49, 0x55, 0x18, 0x97, 0x65, 0xde, 0x99, + 0xba, 0x25, 0x6e, 0xee, 0xc7, 0x8d, 0x99, 0x16, + 0xf7, 0x76, 0xf1, 0x2b, 0x96, 0x03, 0x1e, 0xc7, + 0x33, 0xac, 0xa3, 0xca, 0xdb, 0x72, 0xab, 0x74, + 0x1c, 0x92, 0x62, 0x39, 0xa1, 0xde, 0xfd, 0xcc, + 0x90, 0x45, 0xc8, 0x57, 0x5d, 0x64, 0xf7, 0x33, + 0xf8, 0x7c, 0xe8, 0x27, 0x70, 0x87, 0x14, 0x5f, + 0x3f, 0xe6, 0x67, 0x03, 0x7b, 0xec, 0x6d, 0x74, + 0x6c, 0x21, 0x55, 0xb6, 0xef, 0xa4, 0x97, 0x23, + 0xe1, 0x4a, 0x4f, 0xad, 0x8f, 0x46, 0x64, 0x5d, + 0x21, 0x3d, 0x28, 0xae, 0x1f, 0xe2, 0x21, 0xb6, + 0xeb, 0x5d, 0x7d, 0x06, 0x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, 0xa8, 0xf8, 0x11, 0xa1, 0x0e, 0xb8, + 0x63, 0x26, 0xe7, 0xb8, 0x4f, 0xb0, 0xef, 0x79, + 0xad, 0x09, 0x95, 0x11, 0xbc, 0xe8, 0x8b, 0x7f, + 0xea, 0x38, 0xa9, 0x75, 0x71, 0x4e, 0x4e, 0xcd, + 0x43, 0x0d, 0x11, 0xfb, 0x9b, 0x3a, 0xad, 0xe3, + 0x0c, 0xc6, 0x8d, 0xb0, 0x28, 0x2c, 0x40, 0x6e, + 0x19, 0x12, 0x43, 0xa2, 0xe4, 0xfa, 0x8e, 0x4e, + 0x6b, 0x2c, 0x63, 0x64, 0xf4, 0x01, 0x27, 0x26, + 0x61, 0x4d, 0x45, 0x2d, 0xab, 0xe5, 0x75, 0x8b, + 0xae, 0x82, 0x22, 0x35, 0x87, 0xa5, 0xb5, 0x5c, + 0xa6, 0x99, 0x69, 0x05, 0x5b, 0xd1, 0x03, 0xf2, + 0x74, 0x81, 0xf1, 0xce, 0xf6, 0x8c, 0x3a, 0xcf, + 0x25, 0x39, 0xe3, 0xea, 0x2c, 0x64, 0xad, 0x3c, + 0x22, 0xec, 0x2a, 0x87, 0x73, 0x3d, 0xf3, 0x88, + 0x16, 0xc9, 0x4d, 0x2b, 0xab, 0xce, 0x37, 0xe6, + 0xac, 0x31, 0x6b, 0xcc, 0x29, 0x05, 0x63, 0x96, + 0x34, 0xe7, 0x73, 0xf0, 0xae, 0x5f, 0x43, 0xcc, + 0x85, 0xef, 0x36, 0xff, 0xf7, 0x10, 0xf1, 0xfc, + 0x06, 0x75, 0xe9, 0x68, 0x40, 0xce, 0x4b, 0x5d, + 0x04, 0xec, 0xef, 0x44, 0xf5, 0x2b, 0xbd, 0x5a, + 0xca, 0xbd, 0xaa, 0x79, 0x9d, 0xf7, 0x25, 0x1d, + 0x3f, 0xf4, 0xe7, 0xa6, 0xc3, 0x15, 0xc4, 0x10, + 0x21, 0x6c, 0x20, 0xad, 0x87, 0xe7, 0x4a, 0x88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x20, 0xba, 0xaf, 0xdb, + 0xb7, 0xe2, 0x38, 0xa8, 0x05, 0x59, 0xb3, 0x72, + 0x8d, 0x45, 0x4f, 0x95, 0xe7, 0x1a, 0xae, 0x13, + 0x5e, 0x54, 0x30, 0xed, 0xe1, 0xef, 0x03, 0x6d, + 0x74, 0x05, 0xe7, 0x3d, 0xfb, 0x8e, 0x32, 0x00, + 0xc6, 0x13, 0xc8, 0xc2, 0xe3, 0xda, 0xfc, 0x8e, + 0x66, 0x87, 0x61, 0x55, 0x1d, 0x71, 0x2a, 0xfb, + 0x42, 0x8a, 0x3a, 0xe9, 0xee, 0x8a, 0x12, 0xd2, + 0x20, 0x57, 0x38, 0x90, 0x38, 0xfe, 0x59, 0xe9, + 0xaa, 0x07, 0xcb, 0x12, 0xd6, 0x2f, 0x0b, 0x6c, + 0xa1, 0x85, 0x3b, 0x49, 0xad, 0x15, 0xa2, 0xda, + 0x5d, 0x94, 0x29, 0xec, 0xa6, 0xd9, 0x9d, 0x65, + 0xa7, 0x95, 0x15, 0xf2, 0x14, 0x4a, 0x1d, 0x4c, + 0x2a, 0x59, 0x03, 0x32, 0x64, 0xf2, 0xb2, 0xf7, + 0x78, 0xa9, 0x75, 0x5c, 0x81, 0xb8, 0xe6, 0x6c, + 0xdf, 0xf5, 0x95, 0x0a, 0x90, 0x53, 0xe1, 0x81, + 0xfa, 0x95, 0xb3, 0x2c, 0xc1, 0x46, 0xd9, 0x39, + 0xf6, 0xc4, 0x14, 0xa5, 0x30, 0x46, 0xb9, 0x8c, + 0x2b, 0x7e, 0x74, 0x54, 0x43, 0xfa, 0xeb, 0x0c, + 0x88, 0x22, 0xd0, 0x77, 0xea, 0xfc, 0x15, 0xa7, + 0x50, 0xe5, 0x59, 0xea, 0xd6, 0x9f, 0xe9, 0xb3, + 0xeb, 0xe8, 0xb2, 0x3d, 0x2e, 0x9d, 0x93, 0x90, + 0x87, 0xdb, 0xab, 0x65, 0x41, 0x39, 0x5d, 0xfd, + 0x16, 0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 0x63, 0xa7, 0x30, 0xe3, 0x60, 0x53, + 0xe8, 0x9a, 0xcd, 0xa6, 0x59, 0x91, 0x72, 0x3a, + 0x9e, 0x2f, 0xd4, 0x38, 0xee, 0x00, 0xc6, 0x45, + 0xa5, 0x05, 0xe7, 0x38, 0x17, 0xcd, 0xc5, 0x5b, + 0x37, 0xc4, 0xde, 0xbe, 0x46, 0x09, 0xde, 0x63, + 0xd8, 0x4d, 0x32, 0x2d, 0x07, 0x6b, 0x5d, 0x47, + 0x53, 0xb1, 0x5b, 0xf7, 0x9e, 0xc5, 0x7c, 0xf1, + 0xb8, 0xc8, 0x34, 0x7b, 0x71, 0x1b, 0xf2, 0x45, + 0x9e, 0x77, 0xd7, 0x11, 0x31, 0xc6, 0x79, 0x47, + 0x63, 0xee, 0x18, 0xe4, 0x2d, 0xd3, 0x9b, 0x99, + 0x9f, 0xd7, 0xf6, 0x50, 0xc3, 0x39, 0x20, 0x06, + 0xa4, 0x5a, 0x7b, 0xb3, 0x71, 0xbf, 0xf1, 0x20, + 0xff, 0xd5, 0xf1, 0x7d, 0xed, 0xab, 0xe3, 0xef, + 0xb5, 0x2f, 0xec, 0x8d, 0x56, 0x94, 0x05, 0xcd, + 0x0e, 0xca, 0x42, 0xf0, 0x51, 0x54, 0x63, 0x4e, + 0x4a, 0xfa, 0xe6, 0xf8, 0x94, 0x76, 0xea, 0x58, + 0xf4, 0x38, 0x08, 0x92, 0x51, 0x30, 0xb2, 0x26, + 0x46, 0x9b, 0x05, 0xd8, 0xb5, 0xc2, 0x26, 0xb1, + 0x47, 0xfd, 0xd1, 0xde, 0xef, 0x5e, 0xd6, 0xe7, + 0x6a, 0x2a, 0xe9, 0x43, 0x10, 0xb5, 0x21, 0x0e, + 0x11, 0xb5, 0x59, 0x3a, 0x95, 0x2d, 0x5f, 0xed, + 0x4d, 0x5a, 0x67, 0x58, 0x75, 0xf4, 0xfb, 0x2c, + 0xfc, 0x5e, 0xea, 0x41, 0xd0, 0xf9, 0x6e, 0x7e, + 0x27, 0x95, 0x31, 0x7d, 0x97, 0x13, 0xd4, 0xb4, + 0xa2, 0xf5, 0x06, 0x7b, 0xcc, 0x70, 0x06, 0xa6, + 0xf5, 0xb9, 0xdc, 0x16, 0x8d, 0xc9, 0x21, 0x77, + 0xa3, 0xbe, 0x54, 0xd7, 0x50, 0xf7, 0xc9, 0x94, + 0x5a, 0x23, 0xc6, 0xf3, 0x5c, 0x84, 0x62, 0x95, + 0x92, 0xd8, 0x65, 0x26, 0x3e, 0x94, 0x1f, 0x5a, + 0x0f, 0x0d, 0xbc, 0xfd, 0x49, 0xbe, 0x27, 0x47, + 0xe3, 0xd1, 0x78, 0x3c, 0x4c, 0x58, 0xd3, 0x95, + 0x31, 0x7b, 0xc7, 0x1e, 0xfd, 0x39, 0xf1, 0x73, + 0xe2, 0x4d, 0xda, 0xf9, 0xce, 0x1e, 0xb5, 0x47, + 0xad, 0x89, 0x83, 0x64, 0xeb, 0x23, 0xca, 0xd9, + 0x5f, 0xec, 0x20, 0xcf, 0x56, 0xb6, 0xe2, 0xd6, + 0x0f, 0x6e, 0x8c, 0x6a, 0x46, 0x53, 0xd6, 0xd7, + 0x96, 0xb8, 0x23, 0x09, 0x1d, 0x95, 0x75, 0x88, + 0x57, 0xc7, 0xcd, 0x73, 0xe6, 0xa4, 0xb1, 0x68, + 0x2c, 0xa0, 0x43, 0x99, 0x31, 0x44, 0xab, 0x8a, + 0x4c, 0x2a, 0x46, 0x37, 0x29, 0x7e, 0x0e, 0x48, + 0xa1, 0x1c, 0x76, 0xfc, 0x22, 0x42, 0x44, 0x9c, + 0x16, 0x15, 0x8a, 0x9f, 0x51, 0x4d, 0xe9, 0xa6, + 0x3c, 0x2d, 0x4f, 0x5b, 0x01, 0x23, 0x64, 0x70, + 0xfc, 0x64, 0x34, 0x9e, 0x89, 0xab, 0xf0, 0xa9, + 0x34, 0x61, 0xc1, 0x5d, 0x20, 0x95, 0xab, 0x69, + 0x73, 0xda, 0x5c, 0x85, 0x48, 0x74, 0x56, 0x99, + 0x53, 0xe6, 0x8c, 0xdb, 0xe6, 0x27, 0x62, 0xcf, + 0xbe, 0x4f, 0x3b, 0xc9, 0x78, 0x8e, 0xe2, 0x63, + 0x8a, 0x90, 0x73, 0xc4, 0xb7, 0xda, 0x71, 0xfd, + 0x88, 0x8b, 0x63, 0xab, 0x64, 0xeb, 0x9c, 0xfc, + 0x58, 0x0e, 0xba, 0x34, 0xac, 0xf4, 0x20, 0x7b, + 0xc1, 0x1e, 0x1a, 0x9b, 0xfa, 0x97, 0xce, 0x0e, + 0xaf, 0xc9, 0xc3, 0xbd, 0x5f, 0x8d, 0x97, 0xf5, + 0x62, 0xf3, 0xab, 0x9d, 0x44, 0xab, 0xc6, 0x12, + 0xb9, 0xe2, 0xdb, 0x99, 0x12, 0x32, 0x98, 0x8a, + 0x2d, 0xdf, 0x4f, 0x44, 0x14, 0xa4, 0x0a, 0xa9, + 0x35, 0x6e, 0x8e, 0xbe, 0x1c, 0x0b, 0xd3, 0xae, + 0x61, 0x4c, 0x18, 0x59, 0x25, 0x63, 0x7c, 0xfa, + 0x53, 0x47, 0x93, 0x6d, 0x65, 0xb8, 0xb5, 0x6e, + 0xcc, 0xbb, 0xca, 0xd1, 0xb0, 0x73, 0x66, 0x13, + 0xce, 0xbc, 0x31, 0xdd, 0x9e, 0xa6, 0x65, 0x05, + 0x22, 0xc9, 0x7a, 0xa6, 0x0e, 0x23, 0xba, 0x55, + 0x68, 0x65, 0x5a, 0x19, 0xbb, 0x70, 0x30, 0x2e, + 0x27, 0x72, 0x99, 0xd6, 0xa7, 0x62, 0x47, 0xbb, + 0x52, 0x46, 0x9e, 0x7b, 0x01, 0xf6, 0x21, 0x38, + 0x0e, 0x0a, 0x10, 0x8d, 0xd4, 0x3c, 0xa5, 0xd6, + 0x40, 0xb3, 0x28, 0x63, 0x47, 0x26, 0x44, 0xae, + 0x1f, 0xfd, 0xbe, 0x5a, 0x84, 0xe9, 0x55, 0x86, + 0x60, 0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9, 0x89, 0x3d, 0x08, 0x36, + 0xac, 0x96, 0x4b, 0x5e, 0x95, 0x8c, 0x63, 0x12, + 0xe8, 0xdc, 0x37, 0x4f, 0xe5, 0xc6, 0xa5, 0xc7, + 0xe2, 0x07, 0x7a, 0xb9, 0xb8, 0x2f, 0xc0, 0x7f, + 0xa8, 0x18, 0x04, 0xe7, 0xb8, 0x8e, 0xea, 0x2a, + 0xa7, 0xeb, 0x43, 0x10, 0x4f, 0x2a, 0x3b, 0x5d, + 0x5e, 0x0c, 0x72, 0x79, 0xe3, 0xa5, 0xb1, 0x56, + 0xbc, 0x82, 0xbf, 0x21, 0x7b, 0x71, 0xcb, 0x63, + 0xdc, 0xcc, 0x40, 0xac, 0x31, 0x64, 0x20, 0x32, + 0xe1, 0xa2, 0x79, 0xdf, 0x82, 0xcf, 0x5f, 0x8e, + 0x97, 0x13, 0xd6, 0x54, 0x98, 0x63, 0xc6, 0x10, + 0x27, 0xc8, 0xb1, 0x82, 0x62, 0xbd, 0x5f, 0xef, + 0xab, 0x57, 0x7b, 0x36, 0xa2, 0xa7, 0xab, 0x78, + 0x4c, 0xeb, 0x85, 0x9d, 0x35, 0x72, 0xae, 0xe1, + 0xba, 0xfb, 0xbb, 0x70, 0xc5, 0x60, 0xc7, 0xcb, + 0x4d, 0x29, 0xcf, 0xb8, 0x22, 0xff, 0xbb, 0x98, + 0x9a, 0xef, 0xf4, 0xf7, 0x77, 0x11, 0x15, 0x82, + 0x7a, 0x6e, 0xe6, 0xb3, 0xce, 0xfb, 0x16, 0xf0, + 0x7d, 0xe1, 0x55, 0xf8, 0x81, 0xd9, 0x44, 0xa8, + 0x47, 0xcd, 0xbb, 0x92, 0xf2, 0xd7, 0x76, 0x19, + 0xfd, 0x47, 0x50, 0x5f, 0xa7, 0x49, 0xca, 0x04, + 0xf5, 0x51, 0x0f, 0xfb, 0x01, 0x71, 0x9d, 0x26, + 0x69, 0xba, 0xa9, 0x58, 0x19, 0x2b, 0x78, 0x10, + 0xb5, 0xe3, 0x6f, 0xe2, 0x6f, 0xb4, 0xfa, 0xb4, + 0xb9, 0x66, 0x96, 0xaa, 0x9d, 0x4e, 0x3a, 0xc4, + 0xfa, 0x59, 0xf8, 0xce, 0x93, 0xed, 0x45, 0x79, + 0xa3, 0x11, 0x6d, 0xc0, 0xf9, 0x20, 0xf5, 0x33, + 0xef, 0x5c, 0x99, 0x10, 0x5f, 0x62, 0x6e, 0x8f, + 0x2a, 0x90, 0x8a, 0xdc, 0x44, 0xac, 0xcb, 0xdd, + 0x30, 0xe7, 0xb6, 0x60, 0x14, 0x8b, 0x71, 0x68, + 0x01, 0xe2, 0xa0, 0x27, 0x8d, 0x59, 0xca, 0x87, + 0xb8, 0xeb, 0x87, 0xa8, 0x27, 0x95, 0x8a, 0x86, + 0x9f, 0x6a, 0x17, 0x46, 0xd3, 0xc4, 0xc1, 0x15, + 0xfb, 0xd2, 0x1b, 0x63, 0x2f, 0x82, 0x5e, 0x07, + 0x55, 0x9e, 0xf1, 0xc5, 0x1b, 0x7f, 0x85, 0x5c, + 0x4f, 0x6e, 0x2c, 0xfe, 0xb2, 0xd3, 0x48, 0x36, + 0xae, 0xfe, 0x72, 0x59, 0xf9, 0x48, 0xb9, 0xcf, + 0x73, 0x49, 0x6f, 0x2f, 0x93, 0x74, 0x88, 0x1c, + 0xca, 0x85, 0x52, 0x26, 0x0f, 0x19, 0xe0, 0x56, + 0xa1, 0xec, 0xd5, 0x28, 0x04, 0xd4, 0xb6, 0x22, + 0x0d, 0x41, 0x06, 0xf1, 0xbe, 0xb0, 0x2a, 0x60, + 0xa5, 0x13, 0xbb, 0x87, 0x77, 0x5d, 0x2f, 0x06, + 0x56, 0x5e, 0xb8, 0x21, 0x6d, 0x38, 0x17, 0x73, + 0x56, 0xcd, 0x87, 0x46, 0xcc, 0x80, 0xf3, 0x6c, + 0x24, 0xa8, 0x73, 0x21, 0x18, 0x79, 0x43, 0x30, + 0x6a, 0xff, 0xc4, 0x9f, 0x03, 0xff, 0xc4, 0xdf, + 0xf3, 0xff, 0x9c, 0x87, 0xa8, 0x62, 0x15, 0x22, + 0x48, 0xbc, 0xbe, 0x30, 0xbe, 0x61, 0x6e, 0x66, + 0xea, 0x45, 0x37, 0xb9, 0xf7, 0x5f, 0xc7, 0x27, + 0x34, 0x43, 0xe4, 0x79, 0x0b, 0x5d, 0x55, 0x06, + 0x6d, 0x31, 0xf7, 0xbd, 0x9b, 0x82, 0x75, 0x38, + 0xee, 0x8e, 0x59, 0x29, 0x79, 0x4e, 0x26, 0xbe, + 0x24, 0x39, 0x2e, 0xe0, 0x35, 0xf2, 0xef, 0x77, + 0x77, 0xb8, 0x1b, 0x2f, 0x77, 0x38, 0x4a, 0xb7, + 0x82, 0x95, 0xb3, 0xc6, 0x45, 0x16, 0xd5, 0xa2, + 0xc9, 0x5a, 0x0b, 0xae, 0x6e, 0x25, 0xa3, 0x65, + 0xd4, 0xb5, 0x78, 0x90, 0xa2, 0xcd, 0x84, 0x13, + 0x35, 0x76, 0x15, 0xd9, 0x91, 0x21, 0x1f, 0xb9, + 0x02, 0x71, 0x12, 0xb2, 0xfb, 0xa3, 0xaf, 0x12, + 0xf5, 0x64, 0x4f, 0x9f, 0x8e, 0xdc, 0x1b, 0xec, + 0xa9, 0x83, 0xa8, 0x33, 0xd5, 0x8a, 0xda, 0x35, + 0x2b, 0xb1, 0xfd, 0xe7, 0x3d, 0xae, 0x27, 0x33, + 0xe2, 0xa0, 0x06, 0xe8, 0x25, 0xe1, 0x4b, 0x67, + 0x94, 0x8d, 0xd1, 0x31, 0xe1, 0xd5, 0xbd, 0x7b, + 0xea, 0xa2, 0xdb, 0x63, 0xb0, 0x86, 0xc0, 0xe1, + 0xa6, 0x21, 0x6a, 0xe6, 0xcc, 0xb5, 0x2e, 0x57, + 0x2b, 0xc9, 0x94, 0x56, 0xed, 0x78, 0x4e, 0x9b, + 0xcb, 0x65, 0xad, 0xc5, 0xdc, 0xc5, 0x96, 0x22, + 0xf2, 0x57, 0x86,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, 0x1e, + 0xad, 0x1a, 0x73, 0x77, 0xd5, 0x46, 0x71, 0x6b, + 0xee, 0xee, 0xac, 0xa1, 0x1e, 0xcd, 0x6f, 0xa9, + 0xa5, 0xbb, 0x4d, 0x9f, 0xeb, 0x51, 0xa4, 0x33, + 0x21, 0x9a, 0x13, 0xd5, 0x3f, 0x1f, 0x9d, 0xd6, + 0xc7, 0x3b, 0x73, 0x1f, 0xf1, 0x1b, 0x88, 0xd7, + 0x80, 0x79, 0x27, 0xcf, 0xca, 0x14, 0x23, 0xcb, + 0xfc, 0x76, 0x97, 0xba, 0x00, 0xd5, 0xea, 0x48, + 0x2b, 0x24, 0x5d, 0x5b, 0x99, 0x69, 0x64, 0x1a, + 0xd7, 0x5f, 0x2f, 0xda, 0x43, 0x10, 0x41, 0x0d, + 0x23, 0xde, 0x90, 0xd4, 0x84, 0x02, 0xb2, 0x60, + 0x89, 0xe8, 0x15, 0xac, 0x20, 0xb2, 0x5a, 0xdd, + 0xbb, 0x2d, 0x7e, 0x22, 0x88, 0x72, 0x4a, 0xfe, + 0x73, 0xdb, 0xbf, 0xbe, 0xfc, 0xf0, 0x7a, 0xbf, + 0xed, 0x5e, 0xbf, 0xd4, 0xb4, 0x3b, 0xab, 0x7c, + 0x75, 0xc2, 0x59, 0x9c, 0xc7, 0x4b, 0xbe, 0xd3, + 0x50, 0x84, 0xd4, 0xee, 0x2a, 0x42, 0xcc, 0xf1, + 0x2b, 0x6e, 0x4b, 0xc2, 0x2d, 0xd7, 0xaf, 0xf4, + 0xee, 0x34, 0x22, 0xf2, 0xa4, 0x73, 0x49, 0x24, + 0x7e, 0x68, 0xc3, 0xb0, 0x22, 0x2b, 0x63, 0x84, + 0x08, 0x25, 0x9f, 0x38, 0xf4, 0xf5, 0x50, 0xb8, + 0x52, 0xd0, 0x73, 0x67, 0x5d, 0x39, 0xa3, 0x24, + 0x94, 0x69, 0xee, 0x81, 0x92, 0x8a, 0xbd, 0x8b, + 0xb2, 0x08, 0xec, 0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0x88, + 0x54, 0xe3, 0x89, 0x2e, 0x2a, 0x83, 0x32, 0xf7, + 0xc8, 0x40, 0x27, 0x8b, 0x9a, 0x26, 0xd8, 0xf9, + 0x03, 0x72, 0xb3, 0xf0, 0xd0, 0xfe, 0x1c, 0xcf, + 0x2f, 0xd6, 0x93, 0xf5, 0xbf, 0xd4, 0xe3, 0xce, + 0xb8, 0xf4, 0x37, 0x29, 0x6c, 0xc6, 0xd9, 0x13, + 0x86, 0x3e, 0x09, 0x4f, 0x50, 0xb1, 0x80, 0xb2, + 0x72, 0xd4, 0x47, 0xc6, 0x15, 0x1c, 0xd9, 0x96, + 0x70, 0xb0, 0xe5, 0x2a, 0xac, 0xe6, 0xad, 0x92, + 0x79, 0x3b, 0xd9, 0x83, 0x91, 0x93, 0x65, 0x01, + 0x95, 0xa2, 0x7c, 0xe6, 0x94, 0xc7, 0xa4, 0xf6, + 0x59, 0x60, 0x8e, 0xa6, 0x63, 0xf7, 0xe1, 0x6f, + 0xdb, 0x43, 0xaf, 0x62, 0x49, 0xac, 0x44, 0x20, + 0x37, 0x3c, 0xa8, 0x84, 0x95, 0x15, 0x45, 0x3a, + 0x90, 0xec, 0xdd, 0x7d, 0x69, 0xff, 0x9c, 0x36, + 0xb1, 0x9d, 0xcd, 0x31, 0x2c, 0xd5, 0x37, 0x87, + 0x85, 0xdf, 0xab, 0x6d, 0xf6, 0xea, 0x6e, 0x61, + 0xfd, 0x2a, 0xe1, 0x22, 0xba, 0x7f, 0x07, 0x46, + 0x09, 0xd6, 0x74, 0x17, 0x9d, 0x73, 0x6c, 0x9c, + 0x8d, 0x38, 0x15, 0xee, 0x0a, 0xd1, 0x8e, 0xd7, + 0xa3, 0xf5, 0x8c, 0xfb, 0x88, 0x7c, 0xfe, 0x42, + 0x90, 0x71, 0xa4, 0x8c, 0x24, 0x3b, 0xbb, 0xf7, + 0x54, 0xec, 0xbe, 0x32, 0x22, 0xa9, 0xb1, 0xef, + 0xb5, 0x74, 0x80, 0x6a,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 0xba, 0xe6, 0x70, 0xa5, 0x64, 0x88, 0x83, 0xcd, + 0x09, 0x47, 0x34, 0x92, 0x84, 0x15, 0xe7, 0x19, + 0x58, 0x51, 0xd7, 0x77, 0x30, 0xb6, 0x5e, 0x44, + 0xe4, 0x4a, 0x2e, 0xab, 0xd4, 0x8c, 0x5b, 0x84, + 0xbf, 0xca, 0x40, 0xee, 0x18, 0xaf, 0xd7, 0xea, + 0xf1, 0x36, 0xec, 0xad, 0x87, 0xb5, 0x83, 0xf8, + 0x01, 0xfc, 0x7c, 0xa9, 0xfe, 0x6b, 0x3e, 0x5c, + 0x12, 0xfd, 0x5a, 0x2e, 0x7a, 0xae, 0x43, 0x1c, + 0x5b, 0x1e, 0x97, 0x1f, 0x4b, 0x01, 0xb1, 0x47, + 0x99, 0x56, 0xe6, 0x6a, 0xee, 0x90, 0xbd, 0xca, + 0x0b, 0x32, 0xf3, 0x7d, 0xdd, 0x7d, 0x25, 0x40, + 0x8c, 0x54, 0x20, 0x82, 0xa9, 0xb5, 0xa3, 0x02, + 0x67, 0xf7, 0xa5, 0xf4, 0xbf, 0xba, 0x5d, 0x6e, + 0x5a, 0x2f, 0x62, 0x17, 0x56, 0x09, 0xe4, 0x06, + 0xe8, 0xa8, 0x9f, 0x5d, 0xee, 0x28, 0xf1, 0x46, + 0xda, 0x3b, 0xa4, 0x6f, 0x32, 0xef, 0xfe, 0x50, + 0xba, 0xe3, 0x9c, 0x85, 0x11, 0x9b, 0xa9, 0xe8, + 0xba, 0xf0, 0x81, 0x0b, 0x42, 0xef, 0xba, 0xc9, + 0x3f, 0xf3, 0x7f, 0xff, 0x68, 0x47, 0x35, 0xb1, + 0x2e, 0xa2, 0x07, 0x8f, 0x99, 0x34, 0x35, 0x5e, + 0x19, 0x23, 0x87, 0x14, 0x1e, 0x7d, 0xe1, 0x18, + 0x88, 0xca, 0x31, 0x77, 0x54, 0x9e, 0xc0, 0x98, + 0xd0, 0xc8, 0xc8, 0x19, 0xf2, 0xe5, 0xf1, 0x1d, + 0x8b, 0x56, 0x1a, 0x97, 0x95, 0xcb, 0xee, 0x03, + 0x35, 0xa1, 0x8e, 0xab, 0x11, 0x35, 0xb2, 0xc2, + 0xf7, 0x32, 0xdf, 0xab, 0x91, 0xff, 0x44, 0x76, + 0x12, 0xe5, 0x0b, 0xe8, 0x74, 0x00, 0x67, 0x72, + 0x88, 0xf7, 0xc2, 0xf5, 0x2c, 0xef, 0x78, 0xa3, + 0x63, 0x89, 0x32, 0x05, 0x31, 0xd2, 0x8c, 0xf9, + 0x19, 0x8e, 0xf6, 0x72, 0x38, 0x77, 0x91, 0xd1, + 0x0e, 0xf3, 0xcf, 0x11, 0x8e, 0x30, 0xf2, 0xfc, + 0xea, 0xb1, 0x1b, 0xce, 0x95, 0xc3, 0x33, 0x98, + 0x23, 0x34, 0xfa, 0xbd, 0x68, 0xa8, 0xda, 0x23, + 0x49, 0x95, 0x11, 0xb3, 0x84, 0x3d, 0x11, 0x61, + 0xc0, 0x91, 0x73, 0xf8, 0x09, 0xbb, 0x7e, 0xb8, + 0xbe, 0xbe, 0x93, 0xca, 0x70, 0x46, 0x61, 0x34, + 0x7d, 0x02, 0x9f, 0xe3, 0xd7, 0xaf, 0xe0, 0x86, + 0x75, 0xcd, 0x9c, 0x65, 0x58, 0xbe, 0x53, 0x36, + 0x3f, 0x17, 0x70, 0x1e, 0xac, 0x09, 0x38, 0x0b, + 0xd1, 0x83, 0x65, 0x67, 0xa1, 0xb5, 0x61, 0x87, + 0xd8, 0x90, 0xe6, 0xe5, 0xec, 0xed, 0xb4, 0x3b, + 0xa6, 0x45, 0x8e, 0x4e, 0x6a, 0x38, 0x07, 0x4f, + 0xe0, 0x73, 0xfc, 0x5d, 0xac, 0x27, 0xa2, 0x90, + 0xf2, 0xd6, 0x80, 0xbb, 0x6b, 0x07, 0xec, 0xd5, + 0x83, 0x01, 0x37, 0xcf, 0x1d, 0xab, 0x1d, 0xdf, + 0xb1, 0x9a, 0x7b, 0x52, 0x3f, 0x3e, 0xc1, 0xa7, + 0x0b, 0xea, 0xe1, 0x5c, 0x85, 0xca, 0xa6, 0xab, + 0x8e, 0x1a, 0x57, 0xe3, 0xb0, 0xe2, 0xa1, 0x4f, + 0x50, 0x65, 0x16, 0xee, 0xc7, 0xbf, 0x4b, 0x78, + 0x73, 0x10, 0x77, 0xd6, 0x62, 0x83, 0xd4, 0xd4, + 0xdb, 0xa2, 0x16, 0x57, 0xc7, 0xf6, 0x21, 0xff, + 0x53, 0x96, 0x14, 0xbf, 0x7b, 0xd8, 0x61, 0x34, + 0x7b, 0xfa, 0x11, 0x7d, 0xfa, 0x66, 0xd4, 0xe1, + 0x5e, 0x90, 0x16, 0xdc, 0x8f, 0xa5, 0x45, 0x86, + 0x08, 0x75, 0xdc, 0x0d, 0xaf, 0x79, 0x68, 0x07, + 0x8a, 0x41, 0x5c, 0x18, 0xcb, 0xed, 0xcb, 0xc6, + 0x3d, 0x23, 0x8d, 0x59, 0x96, 0x31, 0xe6, 0xc6, + 0x3d, 0x8d, 0x05, 0xdf, 0xdd, 0x69, 0x14, 0x5d, + 0x6f, 0xdd, 0x09, 0xfb, 0x99, 0x8d, 0x55, 0x16, + 0xbf, 0x5b, 0xda, 0x45, 0x1d, 0xe0, 0x79, 0x19, + 0x6b, 0x42, 0xfe, 0xa3, 0xc0, 0x67, 0x7b, 0x59, + 0x25, 0xd4, 0x01, 0xef, 0xe1, 0x66, 0xe1, 0xda, + 0x0e, 0x35, 0x90, 0xcf, 0x37, 0xe2, 0x44, 0x1b, + 0x7f, 0x6b, 0x9c, 0x71, 0x93, 0xc4, 0xd5, 0xe2, + 0x78, 0x14, 0xe4, 0xb6, 0x14, 0x8f, 0x33, 0xda, + 0x57, 0xdc, 0x9d, 0x87, 0x8e, 0x68, 0x47, 0x01, + 0x58, 0xa6, 0xe7, 0x6f, 0xd0, 0x2b, 0xa0, 0x56, + 0xb8, 0xef, 0x48, 0x8e, 0x78, 0xfe, 0x1a, 0x8c, + 0x8c, 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, 0x2e, 0x70, 0x98, 0x7f, + 0x10, 0xbb, 0xcf, 0x45, 0x7d, 0x25, 0xdc, 0x45, + 0xd1, 0x89, 0xb5, 0xcb, 0x3b, 0x16, 0x30, 0xe3, + 0x75, 0x67, 0x9d, 0x82, 0xa9, 0x3a, 0xa8, 0xe1, + 0xa6, 0xea, 0xaa, 0x33, 0x6f, 0xc0, 0xde, 0x7d, + 0xf8, 0x79, 0x98, 0x7f, 0xaa, 0x98, 0x8b, 0xcf, + 0x1d, 0x6e, 0xc7, 0xe4, 0x73, 0xed, 0x4b, 0xf5, + 0x7b, 0xde, 0xa7, 0x1a, 0x0d, 0xf7, 0xf6, 0x43, + 0x23, 0xc2, 0x82, 0x7b, 0x47, 0x4e, 0x90, 0x67, + 0x6e, 0xac, 0x21, 0x1f, 0x8d, 0x41, 0xb4, 0x19, + 0xb5, 0x87, 0xe0, 0xb6, 0x66, 0xcf, 0xbc, 0xce, + 0x48, 0x03, 0xb8, 0x8a, 0xbe, 0x46, 0xbc, 0x82, + 0x6a, 0x97, 0x6c, 0xdc, 0x53, 0x08, 0xc5, 0xd6, + 0x86, 0x78, 0xd2, 0x2a, 0x62, 0xd5, 0x96, 0x10, + 0x6d, 0xe4, 0xdd, 0x72, 0xa0, 0xd4, 0xfd, 0xae, + 0x87, 0xa7, 0xb9, 0xa7, 0x87, 0xeb, 0xd5, 0x06, + 0xa2, 0x6f, 0x42, 0x2b, 0x23, 0x6f, 0xf0, 0x4c, + 0x7a, 0x3e, 0x26, 0xda, 0xb4, 0x36, 0xef, 0x9c, + 0x82, 0x68, 0x0f, 0x66, 0xbf, 0x3a, 0xad, 0x66, + 0x56, 0xd6, 0x94, 0x92, 0xe2, 0x7b, 0x91, 0xf0, + 0x55, 0x28, 0x57, 0xbf, 0x27, 0x70, 0xfd, 0xe7, + 0x68, 0x35, 0x4d, 0x68, 0x43, 0xd4, 0x60, 0x87, + 0x1b, 0xf9, 0x2c, 0xdf, 0xb5, 0x43, 0xda, 0x19, + 0xed, 0x07, 0x52, 0x2f, 0x08, 0xf1, 0xae, 0x16, + 0xfc, 0x3e, 0xc5, 0x54, 0x73, 0xd7, 0x5d, 0x34, + 0x0b, 0x2d, 0x74, 0x62, 0x86, 0xfd, 0xd7, 0x44, + 0x4d, 0x03, 0xfd, 0x15, 0xaf, 0x03, 0x4b, 0x3a, + 0xb1, 0x2f, 0xe5, 0xe2, 0xf1, 0x9a, 0x1a, 0x54, + 0x50, 0xf7, 0x06, 0x7b, 0x12, 0x72, 0xd3, 0xf7, + 0xc4, 0xc4, 0x7a, 0xca, 0x06, 0xbc, 0xf2, 0xba, + 0xb6, 0xce, 0x36, 0xd8, 0x0e, 0x13, 0xfe, 0xbf, + 0xb6, 0xae, 0x1e, 0xac, 0x8d, 0x33, 0x5b, 0x8f, + 0x60, 0x80, 0x91, 0x2c, 0xe3, 0xd1, 0x0f, 0x48, + 0xfc, 0x18, 0x06, 0x31, 0x02, 0x49, 0x60, 0x23, + 0x3b, 0x60, 0x63, 0x07, 0xa3, 0x31, 0x96, 0x93, + 0xe1, 0x27, 0xeb, 0x09, 0x16, 0x6b, 0xf6, 0x26, + 0x79, 0x2c, 0xe7, 0x92, 0x1b, 0x76, 0xb7, 0x58, + 0x25, 0x9b, 0xfb, 0x44, 0x4e, 0x64, 0xa4, 0xc2, + 0xc5, 0x14, 0x5b, 0x4c, 0xe1, 0xc2, 0x45, 0x0a, + 0x15, 0x14, 0x53, 0xa4, 0xa0, 0xb8, 0x85, 0x8b, + 0x2d, 0x54, 0xa4, 0x50, 0xb1, 0x05, 0xc5, 0x16, + 0x2e, 0x6e, 0x41, 0xe1, 0x82, 0xe2, 0x16, 0x53, + 0xb8, 0x98, 0x62, 0x8a, 0x7b, 0xce, 0xf9, 0x66, + 0x46, 0x12, 0xce, 0x33, 0xcf, 0x60, 0x6c, 0x59, + 0xd2, 0x48, 0xf3, 0x7d, 0xe7, 0xf7, 0x3d, 0xef, + 0xab, 0x07, 0x18, 0xc6, 0x46, 0xe9, 0xb7, 0x9f, + 0x23, 0x47, 0x2b, 0xb2, 0x94, 0x09, 0xec, 0xfc, + 0x09, 0xbe, 0x97, 0x80, 0x38, 0x4c, 0xd9, 0x71, + 0xcc, 0x8e, 0x68, 0x18, 0xe9, 0x30, 0x7f, 0x33, + 0x2a, 0xe0, 0xec, 0x43, 0xbf, 0xdd, 0x4f, 0x5a, + 0xc9, 0x84, 0xbc, 0x85, 0x7d, 0xbb, 0x22, 0x32, + 0xed, 0xc1, 0xa8, 0xc7, 0x6a, 0x9b, 0x27, 0x2e, + 0xa9, 0x33, 0x91, 0x22, 0x60, 0xb2, 0xfc, 0xf6, + 0xe4, 0xab, 0x0a, 0x2a, 0x68, 0x92, 0x1f, 0x58, + 0x2e, 0xfb, 0xb8, 0x82, 0xf2, 0xf8, 0x49, 0x36, + 0xa3, 0xca, 0x88, 0x48, 0x0a, 0x36, 0xa3, 0x5d, + 0xf9, 0x51, 0xdd, 0x19, 0x2c, 0x4f, 0x1a, 0x7f, + 0x73, 0x92, 0x8d, 0xa5, 0x33, 0xa1, 0x01, 0x99, + 0x56, 0x37, 0x9b, 0xd0, 0xd9, 0x96, 0x94, 0x6b, + 0x2e, 0xc2, 0x77, 0x5f, 0x17, 0x83, 0xf6, 0x54, + 0x09, 0x19, 0x73, 0xd1, 0x57, 0x06, 0xc5, 0x50, + 0x19, 0x33, 0xbe, 0x82, 0x4d, 0xfd, 0x77, 0xbf, + 0x5f, 0xc9, 0x18, 0xec, 0x18, 0xc7, 0xbe, 0x80, + 0x6c, 0x6e, 0xcd, 0xef, 0x9b, 0x71, 0xe3, 0x32, + 0x5c, 0xd5, 0x51, 0xc9, 0x45, 0xb0, 0x1b, 0x9b, + 0xf4, 0xdc, 0xce, 0xbc, 0xd5, 0x8b, 0x1f, 0xae, + 0xae, 0x22, 0x4a, 0x13, 0xf1, 0x79, 0xf8, 0x6d, + 0x26, 0x5b, 0x1d, 0x2d, 0x7b, 0xbc, 0x76, 0x66, + 0xfb, 0xbb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, 0xf9, 0x03, 0xe1, 0xa1, + 0xf0, 0x27, 0xe1, 0x01, 0x21, 0xc9, 0x03, 0xd2, + 0x3d, 0x39, 0x9d, 0xc9, 0x5a, 0x59, 0xe9, 0x86, + 0x9c, 0x7d, 0x37, 0xff, 0x25, 0xe4, 0x50, 0x36, + 0xea, 0xdd, 0xce, 0x53, 0x86, 0xdb, 0xfd, 0x69, + 0xfa, 0x1b, 0x1f, 0xaa, 0x24, 0xb0, 0xec, 0xa9, + 0xb7, 0x83, 0xeb, 0x7d, 0x93, 0x02, 0xa2, 0xe2, + 0x1c, 0x42, 0x37, 0x9b, 0xbb, 0xb5, 0xa8, 0x98, + 0x30, 0x46, 0x1d, 0x88, 0x57, 0x8c, 0x18, 0xf8, + 0x6f, 0xec, 0xe1, 0x4e, 0x49, 0x31, 0x67, 0x4a, + 0x17, 0xb5, 0x82, 0x73, 0x53, 0x7a, 0xea, 0x44, + 0xa5, 0x80, 0xd4, 0xc5, 0x5a, 0xcc, 0x62, 0x7e, + 0x71, 0xc1, 0xc8, 0x39, 0x21, 0x73, 0xe2, 0x24, + 0x57, 0xdb, 0x86, 0x67, 0x8f, 0x42, 0x64, 0xb2, + 0x41, 0xcf, 0x85, 0x58, 0x05, 0x6c, 0x99, 0x60, + 0xb3, 0xca, 0x3f, 0xeb, 0x89, 0x20, 0xb3, 0x0f, + 0x63, 0x31, 0xc2, 0x1e, 0x07, 0x1e, 0x05, 0x36, + 0x31, 0x81, 0x55, 0x7f, 0x15, 0x67, 0xff, 0x3f, + 0x41, 0x65, 0x52, 0x09, 0x62, 0xcb, 0xda, 0x26, + 0xdc, 0xc1, 0xbf, 0x9e, 0x3e, 0xfa, 0xbf, 0x0b, + 0xd8, 0x68, 0xd7, 0x2f, 0x30, 0x3d, 0x1f, 0x0e, + 0x31, 0x2b, 0xc8, 0x57, 0x9e, 0x4f, 0x2d, 0x4b, + 0xff, 0x7a, 0xe0, 0xf7, 0x44, 0x64, 0xe3, 0xa9, + 0x85, 0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x7c, 0xbf, 0x2a, + 0x1a, 0x31, 0xe9, 0x05, 0xab, 0xda, 0xd9, 0xcf, + 0x0f, 0xd5, 0x72, 0xb8, 0x19, 0x3f, 0x9e, 0x91, + 0x3f, 0x71, 0x91, 0xb7, 0xc8, 0xee, 0x5b, 0x68, + 0xb3, 0x5e, 0x1c, 0x53, 0x1b, 0x10, 0x88, 0xab, + 0x88, 0xe3, 0x32, 0x8d, 0x8c, 0x53, 0x33, 0xb2, + 0xb5, 0x3b, 0xa5, 0x58, 0xed, 0x45, 0x69, 0xaf, + 0xb6, 0x57, 0x7a, 0xa1, 0x81, 0x65, 0xcc, 0xc3, + 0x3d, 0x7e, 0x79, 0x91, 0xaf, 0x9e, 0x21, 0x7c, + 0x18, 0x97, 0x23, 0xed, 0x32, 0xf0, 0xdc, 0x10, + 0xfd, 0x28, 0x59, 0xca, 0xf6, 0xea, 0x76, 0x80, + 0xd5, 0x0b, 0xf1, 0x27, 0x7c, 0x93, 0x42, 0x46, + 0x90, 0x5d, 0x86, 0x2b, 0xc4, 0x03, 0xdb, 0x02, + 0x78, 0x8f, 0x49, 0x3b, 0x69, 0x0e, 0x9b, 0x95, + 0xd7, 0x2e, 0xe2, 0x28, 0x83, 0x16, 0x67, 0xe9, + 0x3c, 0x9b, 0xf1, 0xce, 0xec, 0x21, 0x22, 0xb3, + 0xbd, 0xfe, 0xaf, 0xc7, 0x06, 0x46, 0xd3, 0xdf, + 0x2e, 0x23, 0xc9, 0xcd, 0x7d, 0x57, 0x73, 0xcd, + 0x62, 0x9a, 0x9f, 0xae, 0xce, 0x59, 0x66, 0x56, + 0x85, 0xbb, 0xcf, 0x55, 0x89, 0xdb, 0x9f, 0x6a, + 0x26, 0x17, 0xe6, 0xb3, 0xc9, 0xae, 0xe4, 0xd9, + 0x2b, 0x23, 0x8a, 0x15, 0xe7, 0xf0, 0x46, 0xd5, + 0x8f, 0x21, 0x2a, 0x18, 0xf5, 0x74, 0x3f, 0xdc, + 0x6b, 0xae, 0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 0xc6, 0xd6, 0x16, + 0x74, 0xc8, 0xd2, 0x51, 0xd7, 0xfb, 0xa4, 0x07, + 0x25, 0xd5, 0xc5, 0x28, 0xd2, 0xab, 0x27, 0xc3, + 0xba, 0x0f, 0xeb, 0x38, 0x85, 0x7d, 0x92, 0x6a, + 0x44, 0xed, 0x78, 0xbb, 0x6e, 0x0a, 0x27, 0xeb, + 0x86, 0x70, 0x22, 0xb4, 0x85, 0x97, 0x17, 0x55, + 0x6c, 0xc0, 0x6f, 0x9d, 0x3e, 0x0b, 0x7b, 0x6a, + 0x24, 0x17, 0x19, 0x36, 0x5c, 0xbc, 0x20, 0xad, + 0x17, 0x77, 0xee, 0xd8, 0x06, 0x7b, 0x5a, 0x2e, + 0x9d, 0x3c, 0xd9, 0x79, 0x62, 0x97, 0x94, 0x3d, + 0xab, 0xa6, 0x7c, 0xea, 0xe7, 0xb0, 0xb8, 0x8a, + 0x30, 0x57, 0x59, 0x53, 0x90, 0x59, 0xf0, 0xc7, + 0xff, 0x65, 0xea, 0x57, 0x5e, 0x45, 0xae, 0xc3, + 0x2f, 0x4a, 0xca, 0x86, 0xee, 0x89, 0xd3, 0xe1, + 0x9f, 0x26, 0xfd, 0x4c, 0x93, 0x8b, 0x40, 0x0c, + 0x92, 0x68, 0x27, 0xd5, 0x58, 0x3b, 0x5a, 0xe9, + 0xa0, 0x94, 0x29, 0x9b, 0xb0, 0x8f, 0x84, 0x58, + 0x3b, 0x0e, 0x91, 0xf0, 0x74, 0xfb, 0x7b, 0x64, + 0xcb, 0xee, 0xe0, 0xeb, 0x7c, 0xc6, 0x18, 0x9a, + 0x58, 0xd6, 0x3e, 0xb2, 0x4b, 0xc5, 0x8e, 0x12, + 0x8d, 0xeb, 0x73, 0x15, 0xc1, 0x11, 0xf4, 0x2b, + 0x7a, 0x08, 0xfb, 0x2a, 0x79, 0xd8, 0x73, 0x90, + 0xef, 0x0f, 0xf3, 0x9d, 0xa8, 0x80, 0x74, 0x06, + 0x09, 0xc5, 0xe1, 0x2b, 0xb2, 0xd1, 0x3d, 0xc4, + 0x6b, 0x24, 0xbe, 0xbd, 0xaa, 0xff, 0x13, 0xae, + 0x78, 0x96, 0x6c, 0x3b, 0x63, 0x5e, 0x7a, 0x60, + 0x63, 0x76, 0x39, 0x44, 0x9a, 0xc7, 0x82, 0x21, + 0xea, 0x91, 0xd5, 0xf9, 0xdf, 0x24, 0xbe, 0x33, + 0xd5, 0x98, 0x12, 0xe6, 0xdb, 0x82, 0xda, 0xdf, + 0x0e, 0x55, 0x42, 0x84, 0x09, 0x64, 0x0c, 0x93, + 0xdd, 0xcc, 0x2d, 0xb0, 0xc2, 0xcb, 0x01, 0xac, + 0x29, 0x70, 0x5e, 0x9e, 0xc2, 0x35, 0x8e, 0x1a, + 0x22, 0x58, 0xd8, 0xd8, 0xb9, 0x94, 0x59, 0xcb, + 0x7c, 0x73, 0x9e, 0xce, 0x13, 0x92, 0x9a, 0x67, + 0x93, 0xe3, 0xa2, 0x14, 0x5d, 0x1d, 0x69, 0x7f, + 0x93, 0xcf, 0x9c, 0x27, 0xe5, 0x79, 0xfb, 0x85, + 0x34, 0x66, 0x63, 0xfe, 0x7d, 0x43, 0xda, 0x3d, + 0x8b, 0xaf, 0xf9, 0xb1, 0x37, 0x7f, 0xef, 0xdd, + 0x9c, 0x2c, 0xcb, 0xf7, 0xde, 0xa5, 0x57, 0xbb, + 0x7b, 0x13, 0xdd, 0x79, 0x28, 0x45, 0x0c, 0xee, + 0x67, 0x4e, 0x8a, 0xe5, 0x72, 0xe7, 0x51, 0x56, + 0x03, 0x72, 0x2b, 0x41, 0x76, 0x0d, 0xa2, 0xcd, + 0x3e, 0x6f, 0x06, 0xb0, 0x35, 0x63, 0x4d, 0x4b, + 0xe2, 0x59, 0xff, 0x97, 0x75, 0x7f, 0x8a, 0x6b, + 0x91, 0xb8, 0xa3, 0xb1, 0xea, 0x2d, 0x9c, 0x16, + 0xa4, 0x5c, 0x65, 0xe1, 0x57, 0xb0, 0x0b, 0x52, + 0xaf, 0x46, 0x24, 0x61, 0x4d, 0x69, 0x36, 0xe9, + 0x47, 0x07, 0x35, 0x2c, 0x22, 0x4a, 0xbf, 0x18, + 0x6e, 0xfe, 0xa0, 0x30, 0xed, 0x15, 0xc6, 0x0f, + 0xe8, 0xf2, 0x04, 0x56, 0xd7, 0x20, 0x93, 0xc1, + 0xcc, 0x33, 0x2d, 0xac, 0x0b, 0xc8, 0x30, 0xd9, + 0x85, 0xea, 0xa4, 0x0a, 0xa2, 0xe7, 0xf7, 0xdd, + 0x68, 0x84, 0xe3, 0xab, 0x60, 0xb9, 0x35, 0x5e, + 0x2b, 0x9c, 0x21, 0x3e, 0xa1, 0xfe, 0x1b, 0x5f, + 0x14, 0x0e, 0x84, 0x7d, 0x66, 0xbd, 0xf1, 0xaa, + 0xe2, 0xa7, 0x31, 0x29, 0x55, 0xf9, 0xea, 0x57, + 0xc1, 0x3e, 0x92, 0x04, 0x3b, 0x27, 0x5d, 0x75, + 0x3c, 0x1c, 0x05, 0x64, 0x01, 0x4a, 0xb4, 0x9a, + 0xd3, 0x37, 0xcf, 0xd7, 0x33, 0xa9, 0xcc, 0xfa, + 0x79, 0xea, 0x64, 0xbd, 0x21, 0x37, 0xe6, 0x5e, + 0xde, 0x65, 0xb8, 0x2f, 0x37, 0xe3, 0x86, 0x58, + 0xe2, 0x34, 0xae, 0xd1, 0xf9, 0x3e, 0x1e, 0x9e, + 0x77, 0xae, 0x95, 0x76, 0xdf, 0x11, 0x07, 0x9d, + 0x74, 0xad, 0x7a, 0x4d, 0xbd, 0xc6, 0x38, 0xcb, + 0x6b, 0xd7, 0x94, 0x42, 0xed, 0xda, 0xe2, 0xb5, + 0xd2, 0xb5, 0xe2, 0x17, 0xaf, 0x49, 0x07, 0xe1, + 0xac, 0xe0, 0x32, 0x27, 0x32, 0x51, 0xe0, 0x60, + 0x63, 0xd8, 0xc7, 0xe5, 0x7a, 0xab, 0x4e, 0xe4, + 0x7a, 0x8f, 0x2b, 0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b, 0x2a, + 0xc9, 0x9d, 0x74, 0xfa, 0x60, 0x6e, 0x8d, 0x5e, + 0x39, 0x24, 0xfd, 0xdd, 0x89, 0xd3, 0x1a, 0x79, + 0xa1, 0x86, 0xb1, 0x8e, 0x0f, 0x39, 0xdb, 0x26, + 0xcd, 0x88, 0x31, 0x26, 0x4b, 0x62, 0x14, 0x50, + 0x48, 0x39, 0x40, 0x95, 0x69, 0xc5, 0xce, 0x09, + 0xd8, 0xf5, 0x08, 0x08, 0x77, 0x84, 0xa5, 0xd3, + 0xac, 0xb8, 0x74, 0xb6, 0x2a, 0x2c, 0xb4, 0x73, + 0xda, 0xc7, 0xef, 0x72, 0xc5, 0xac, 0x9e, 0x6d, + 0x5f, 0x17, 0xf7, 0x71, 0x2f, 0x88, 0x77, 0xc4, + 0x7e, 0xc8, 0xca, 0x02, 0x16, 0x62, 0x9f, 0x70, + 0x4e, 0x6d, 0x0d, 0x95, 0xa2, 0xd4, 0xb5, 0x22, + 0x53, 0x29, 0x4a, 0x2a, 0x7f, 0x69, 0xa4, 0xed, + 0x31, 0xe1, 0xcf, 0xf6, 0x65, 0x61, 0xc4, 0x3e, + 0x28, 0x87, 0xcb, 0x71, 0x62, 0x3c, 0x46, 0xd5, + 0xcb, 0x41, 0x6e, 0xd5, 0x96, 0xd5, 0x39, 0xf5, + 0xae, 0xfe, 0x37, 0xfb, 0x77, 0x18, 0xdb, 0x90, + 0x4b, 0x4a, 0x8b, 0xea, 0xb3, 0xef, 0xbf, 0x6c, + 0x22, 0xf7, 0x4f, 0x50, 0xea, 0x5e, 0xed, 0xec, + 0x9a, 0x49, 0x35, 0x40, 0xc9, 0x20, 0xa3, 0x0d, + 0x5d, 0xf3, 0x1d, 0x21, 0x25, 0xc8, 0xf4, 0x89, + 0x38, 0xad, 0x8a, 0x63, 0x9f, 0xca, 0x23, 0x87, + 0x18, 0x27, 0xca, 0x6a, 0xb3, 0x6a, 0x04, 0xc4, + 0x41, 0xaa, 0x33, 0x30, 0x8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x9f, 0xf8, + 0x52, 0x67, 0x88, 0xc3, 0x1c, 0xec, 0xc2, 0xa4, + 0x3e, 0xcc, 0xea, 0xfc, 0x38, 0xbf, 0x80, 0xd7, + 0x65, 0xdf, 0x57, 0x8f, 0x10, 0x4d, 0xa5, 0x0e, + 0xab, 0x55, 0x62, 0x89, 0x1c, 0xa7, 0x3d, 0x18, + 0x84, 0xcf, 0x7a, 0x1f, 0x2b, 0x0f, 0x93, 0x3c, + 0x77, 0x09, 0x2c, 0x26, 0x4e, 0x3a, 0x49, 0xca, + 0xcc, 0xc9, 0xf5, 0x30, 0x43, 0xc1, 0x61, 0x3d, + 0x68, 0x58, 0x8f, 0xfe, 0x23, 0xf6, 0x3e, 0xc7, + 0x3d, 0xb4, 0x07, 0x20, 0x63, 0x43, 0x94, 0x23, + 0x2d, 0x67, 0x2f, 0x97, 0x94, 0x28, 0xd6, 0x30, + 0x47, 0xed, 0x09, 0xf9, 0x1b, 0x79, 0x40, 0x0e, + 0x3a, 0x11, 0xde, 0xd7, 0x14, 0xb0, 0xf7, 0x84, + 0x3d, 0x88, 0xe9, 0xf6, 0x10, 0xef, 0xd6, 0xdc, + 0x6f, 0x7a, 0xd3, 0xfd, 0x1e, 0xd7, 0x01, 0xf6, + 0xd8, 0x9e, 0x85, 0x07, 0x94, 0xde, 0x6c, 0xb1, + 0xc3, 0x21, 0x81, 0xbb, 0x0b, 0x7b, 0x44, 0x11, + 0x71, 0xe9, 0xfc, 0x3e, 0xcf, 0x3c, 0xfb, 0x20, + 0xf7, 0x33, 0x44, 0xdd, 0x93, 0x6a, 0xfd, 0x70, + 0xf2, 0xed, 0xf8, 0xdb, 0x9c, 0x7a, 0xf4, 0x76, + 0xe1, 0x90, 0xcd, 0x17, 0xa7, 0xde, 0x76, 0xf7, + 0x17, 0x42, 0xa4, 0x32, 0x1b, 0xa4, 0xd7, 0xc4, + 0x49, 0x3d, 0x05, 0xbc, 0x55, 0x3f, 0x3e, 0x06, + 0xef, 0x39, 0x93, 0xd9, 0x90, 0xc3, 0x52, 0xbe, + 0xd5, 0x8b, 0xfd, 0x20, 0x9e, 0x0b, 0x71, 0xda, + 0x49, 0xac, 0x8e, 0xff, 0x3b, 0x9a, 0x4f, 0xb4, + 0x90, 0xab, 0x06, 0x75, 0xef, 0x94, 0x46, 0xc0, + 0xaf, 0x4e, 0xfb, 0x8f, 0x1b, 0x70, 0xe7, 0x1b, + 0xb3, 0xf6, 0x75, 0xe1, 0x01, 0x64, 0x10, 0x34, + 0xff, 0x4b, 0x1c, 0x19, 0x89, 0xca, 0xb8, 0x09, + 0x76, 0xdb, 0x48, 0x58, 0x09, 0x6b, 0xc6, 0x4c, + 0x39, 0x3b, 0x8c, 0x3b, 0xda, 0xe5, 0xd0, 0x60, + 0x2c, 0x1a, 0x89, 0xca, 0xa8, 0x35, 0x6e, 0xc6, + 0xe4, 0x94, 0xb4, 0x81, 0x2c, 0xfb, 0x2e, 0x9e, + 0x9f, 0x71, 0x10, 0x79, 0xca, 0x78, 0x65, 0xff, + 0xee, 0xbb, 0x56, 0xd4, 0x3e, 0xa2, 0x69, 0x9c, + 0x68, 0x05, 0xa7, 0x0b, 0x87, 0xe4, 0x10, 0xf1, + 0x0a, 0x78, 0xcc, 0x2d, 0x8c, 0xb7, 0x05, 0xb1, + 0xcf, 0xea, 0xd9, 0xa6, 0xf6, 0x93, 0xca, 0x23, + 0x82, 0x59, 0xe9, 0x68, 0xda, 0x06, 0xc5, 0x71, + 0x83, 0xd4, 0x82, 0xca, 0x19, 0x49, 0x2d, 0x0b, + 0xc6, 0x25, 0x41, 0xf0, 0x2a, 0x9f, 0xe0, 0x15, + 0x96, 0xce, 0x36, 0x5d, 0x8d, 0x16, 0x77, 0xde, + 0x95, 0xe9, 0x2f, 0x70, 0xfd, 0xf6, 0x4f, 0x2a, + 0xd3, 0xf1, 0xdc, 0xf2, 0xa7, 0x9d, 0xfd, 0xab, + 0xf2, 0x6c, 0x9d, 0x35, 0x26, 0x22, 0x53, 0xf9,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xc8, 0x95, 0x41, 0x31, 0x04, 0xd6, 0x96, + 0xe2, 0x2b, 0x61, 0x2b, 0xbf, 0xd0, 0x5a, 0x24, + 0x8f, 0x24, 0x20, 0x3b, 0xb8, 0x93, 0x43, 0x2f, + 0x89, 0xa4, 0x6e, 0x6b, 0x17, 0xa6, 0x1a, 0x1b, + 0x2e, 0x0b, 0x8d, 0x3c, 0x1a, 0x4f, 0x86, 0xcb, + 0x3c, 0x63, 0x69, 0xde, 0x14, 0x36, 0x09, 0x21, + 0xb1, 0x29, 0x3d, 0x77, 0xe8, 0xa7, 0x18, 0x28, + 0x05, 0x98, 0x72, 0x74, 0x63, 0xbd, 0xc1, 0x3b, + 0x63, 0x46, 0x48, 0x3b, 0x92, 0x42, 0xa7, 0x13, + 0x3b, 0x93, 0xc8, 0x04, 0xa8, 0x7a, 0x9e, 0xce, + 0x43, 0xa8, 0x7b, 0x51, 0xfd, 0x7d, 0xfe, 0xc1, + 0xbb, 0x29, 0x64, 0x07, 0x42, 0x31, 0x19, 0x37, + 0xfb, 0x45, 0x6c, 0x50, 0xdd, 0xc6, 0x1e, 0x4e, + 0x88, 0x3a, 0x7d, 0xde, 0x94, 0x1f, 0xaa, 0x50, + 0xf5, 0x49, 0xbc, 0x55, 0x10, 0x3a, 0xca, 0xf2, + 0xbd, 0x13, 0xcd, 0x7d, 0x52, 0x80, 0xf1, 0x80, + 0xe8, 0x01, 0x03, 0x15, 0xe7, 0x93, 0x8d, 0x32, + 0xf6, 0x6d, 0x1b, 0xec, 0x51, 0x9f, 0x95, 0x4b, + 0x59, 0xaf, 0xc5, 0x4f, 0xeb, 0x95, 0x89, 0x5f, + 0x17, 0xe1, 0xca, 0x48, 0xc7, 0x44, 0x5a, 0x57, + 0x06, 0x6c, 0x1e, 0x15, 0xda, 0xf5, 0xb8, 0xbd, + 0xe6, 0x2c, 0x37, 0x96, 0x9d, 0x5b, 0xa5, 0xc2, + 0xaf, 0xff, 0x59, 0xec, 0x73, 0xf1, 0xc0, 0x10, + 0x3d, 0x43, 0x44, 0x9a, 0x64, 0x0a, 0xbe, 0x52, + 0xe6, 0x44, 0x35, 0xd1, 0x12, 0x92, 0x6e, 0x38, + 0x6a, 0x64, 0xa0, 0xc2, 0x73, 0x35, 0xdd, 0x9a, + 0x5b, 0x4b, 0xdb, 0xff, 0x2d, 0x6c, 0x52, 0x04, + 0xf7, 0x4c, 0x08, 0x78, 0x58, 0x62, 0x36, 0x3d, + 0x4a, 0xa8, 0xcb, 0xbb, 0xc7, 0xb2, 0x39, 0x68, + 0x84, 0x4e, 0xf2, 0xed, 0x7e, 0xde, 0xeb, 0xd2, + 0x7a, 0x9a, 0x57, 0x2c, 0x92, 0xed, 0x54, 0x89, + 0xfb, 0xa8, 0x07, 0xc8, 0x4b, 0x10, 0x89, 0x36, + 0x66, 0xf0, 0x77, 0x7b, 0x92, 0xb0, 0x0e, 0xbc, + 0x30, 0x64, 0x73, 0x5c, 0x47, 0x73, 0x85, 0xd8, + 0x9c, 0x75, 0x76, 0xac, 0x31, 0xa5, 0x9a, 0x9e, + 0x8e, 0xbe, 0xab, 0x63, 0x63, 0xbf, 0x20, 0x26, + 0x25, 0xfe, 0x02, 0xa3, 0x08, 0x66, 0x79, 0x17, + 0xfd, 0xaf, 0x4c, 0x5d, 0x56, 0x0e, 0x76, 0xfe, + 0x77, 0xad, 0x08, 0x71, 0x63, 0x89, 0xf0, 0x5d, + 0x76, 0xd4, 0xeb, 0xe2, 0x55, 0x88, 0x73, 0x8c, + 0xaf, 0x34, 0xb0, 0xf1, 0x8a, 0x60, 0x2f, 0x74, + 0xc5, 0x39, 0x38, 0x8b, 0xf8, 0xb3, 0xb5, 0x25, + 0x6e, 0xd3, 0xb9, 0xed, 0x6c, 0x71, 0xdb, 0xce, + 0x4f, 0xc7, 0x03, 0xa5, 0x01, 0x5e, 0x48, 0xba, + 0x88, 0x94, 0x06, 0x4e, 0x5b, 0x82, 0x95, 0x52, + 0x65, 0xe5, 0x47, 0xb0, 0x03, 0x61, 0x25, 0xae, + 0x30, 0xee, 0x1d, 0x16, 0x99, 0x65, 0x50, 0xa5, + 0xd1, 0x50, 0x9b, 0x42, 0x6b, 0xb8, 0x51, 0x45, + 0xbf, 0xe9, 0x6a, 0xbd, 0x89, 0x12, 0x56, 0xa1, + 0x3e, 0x75, 0x64, 0x69, 0xfe, 0x1c, 0x6c, 0xce, + 0x61, 0xe2, 0x64, 0x44, 0x4c, 0x9f, 0xe4, 0x4a, + 0x3b, 0xff, 0xd0, 0x08, 0x0f, 0x3c, 0xd4, 0x12, + 0xc0, 0xb6, 0x7a, 0x4c, 0x60, 0xc4, 0x42, 0xe5, + 0xcf, 0xf2, 0xe0, 0xfc, 0x49, 0x47, 0x11, 0x77, + 0x5c, 0xca, 0x3a, 0x59, 0x79, 0x53, 0x0e, 0xca, + 0xc1, 0x55, 0x81, 0xf5, 0xac, 0x1b, 0x69, 0xeb, + 0xcf, 0xc4, 0x04, 0x94, 0xb6, 0x7e, 0x72, 0xd9, + 0x29, 0x77, 0xd5, 0xdd, 0x0a, 0x63, 0x5e, 0x4a, + 0x40, 0x36, 0x70, 0xd0, 0x98, 0x40, 0xee, 0x3b, + 0xf3, 0xe8, 0x3c, 0x6a, 0xde, 0x3d, 0xbf, 0x65, + 0xde, 0x32, 0x5d, 0x0e, 0x58, 0xb7, 0x3a, 0x5d, + 0xb7, 0x19, 0x77, 0x0a, 0x3b, 0x55, 0xd5, 0x9d, + 0x8c, 0xe0, 0x30, 0xeb, 0x12, 0x20, 0x76, 0x09, + 0x96, 0x50, 0x51, 0xfe, 0xea, 0x0f, 0xe9, 0xd2, + 0x1e, 0xf8, 0xc0, 0x51, 0xee, 0x99, 0xc3, 0xb0, + 0x88, 0x90, 0xb3, 0x35, 0x99, 0x1d, 0xa6, 0x4e, + 0x1d, 0xc5, 0xb1, 0x11, 0x11, 0x75, 0x78, 0xbd, + 0xa9, 0xa8, 0x20, 0xea, 0xbf, 0xda, 0x13, 0x42, + 0xd6, 0x26, 0x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 0xd2, 0x89, + 0xec, 0x46, 0xbe, 0x90, 0x49, 0x67, 0x0a, 0x4e, + 0x5a, 0x2a, 0x48, 0xbc, 0x56, 0xd0, 0xe0, 0x35, + 0xbb, 0xb4, 0xdd, 0xb9, 0x0b, 0xa8, 0xad, 0x0f, + 0xb5, 0xcf, 0xba, 0x73, 0x4f, 0xaf, 0xa2, 0xe6, + 0x61, 0x98, 0x59, 0x07, 0x08, 0xa3, 0x49, 0x44, + 0x4e, 0x41, 0xd4, 0xaf, 0x8b, 0x58, 0x55, 0xa1, + 0x2e, 0x5e, 0x50, 0x80, 0x5c, 0xca, 0x58, 0x70, + 0x54, 0x9a, 0x2f, 0x29, 0x38, 0x88, 0xa1, 0xcb, + 0x18, 0x69, 0xf1, 0x63, 0xf1, 0x6b, 0x91, 0x74, + 0x88, 0x70, 0xb6, 0x0e, 0x5f, 0x9d, 0xc3, 0x63, + 0x00, 0x8e, 0x20, 0x21, 0xe7, 0x15, 0xa7, 0x17, + 0xf1, 0xeb, 0x5a, 0xe8, 0xc6, 0x8c, 0x92, 0x92, + 0x76, 0xc4, 0xbc, 0xab, 0x1d, 0xbc, 0x05, 0x91, + 0xf8, 0xa2, 0x1a, 0x54, 0x8f, 0xda, 0xe1, 0xc3, + 0xf1, 0xfd, 0x71, 0x35, 0xe3, 0x73, 0x92, 0xbb, + 0x11, 0xe6, 0x19, 0x75, 0x12, 0x7e, 0x47, 0x9f, + 0xae, 0xd3, 0xc7, 0xb9, 0xc0, 0x09, 0x74, 0xe1, + 0xd1, 0x0d, 0xe1, 0xbe, 0xf0, 0x50, 0x28, 0x65, + 0x4a, 0xfb, 0x07, 0xfb, 0x0f, 0xda, 0x4a, 0xb2, + 0x2b, 0x77, 0xd6, 0xe1, 0x93, 0xe9, 0x2f, 0x34, + 0x41, 0x5b, 0xc4, 0x39, 0x7e, 0x6d, 0x93, 0xe5, + 0x56, 0x3d, 0xaf, 0xdc, 0x73, 0x24, 0xfd, 0xef, + 0x0a, 0x32, 0x9f, 0x11, 0x31, 0x26, 0xce, 0x88, + 0x1b, 0xa7, 0x7d, 0x79, 0x7e, 0x12, 0xa2, 0x15, + 0x57, 0x55, 0x8d, 0xea, 0x0a, 0xf9, 0xc8, 0x69, + 0x02, 0x55, 0x95, 0xdc, 0x6e, 0x98, 0x5f, 0x17, + 0x6d, 0xe0, 0x3c, 0x16, 0xee, 0x9b, 0xc0, 0xea, + 0xd0, 0x6f, 0xb8, 0xca, 0x70, 0x7e, 0x6c, 0x03, + 0x32, 0x82, 0xce, 0x3d, 0xa2, 0x2e, 0xae, 0x15, + 0x31, 0x6e, 0x68, 0x8f, 0xa5, 0x78, 0x13, 0xbb, + 0xe9, 0x6e, 0x1e, 0xda, 0x42, 0xcc, 0x09, 0xeb, + 0x90, 0x14, 0x20, 0xb3, 0x9d, 0xaa, 0x44, 0xd5, + 0xa9, 0x62, 0xac, 0x78, 0x54, 0xed, 0x63, 0x78, + 0x6f, 0xbc, 0x7b, 0xda, 0x94, 0x16, 0x2d, 0xc3, + 0x4f, 0x35, 0x0a, 0x8f, 0x4c, 0x1d, 0x7c, 0xbd, + 0x8f, 0xd1, 0x27, 0xab, 0x24, 0xe4, 0x8c, 0x5c, + 0x19, 0xa3, 0x91, 0x9c, 0xa7, 0xcb, 0xc4, 0xb2, + 0xee, 0x32, 0xcd, 0x20, 0x80, 0x05, 0x1a, 0x70, + 0xee, 0x49, 0x73, 0x92, 0x74, 0x82, 0x2a, 0x36, + 0x03, 0x90, 0x95, 0x0d, 0xca, 0x82, 0x94, 0x2f, + 0xfb, 0x95, 0x5e, 0xf2, 0x62, 0xbe, 0x72, 0x9e, + 0x8f, 0xfc, 0x61, 0x4a, 0x61, 0xa2, 0xcb, 0x64, + 0x4e, 0x47, 0xb9, 0x53, 0x17, 0x45, 0x2e, 0xb8, + 0x19, 0x09, 0xed, 0x17, 0x72, 0xc1, 0xdd, 0x46, + 0xb5, 0x1f, 0x97, 0x0b, 0x6e, 0x32, 0xec, 0xa9, + 0x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0x71, 0x71, 0xf6, 0xb2, 0xc4, 0xb2, + 0xef, 0xca, 0xcb, 0x34, 0xc9, 0xf4, 0x35, 0xe2, + 0xf6, 0x8a, 0xfe, 0x39, 0x4e, 0x27, 0xe8, 0xa2, + 0xcb, 0xb1, 0x80, 0x9c, 0xda, 0xb0, 0x6f, 0x95, + 0x50, 0x33, 0x4e, 0xeb, 0x7a, 0x2f, 0x4e, 0xf6, + 0x8e, 0x4d, 0x26, 0x42, 0xcc, 0x4f, 0x35, 0xf3, + 0xb3, 0x7b, 0x5a, 0x9f, 0x7a, 0xef, 0x1d, 0xec, + 0xd0, 0x37, 0xb2, 0x89, 0xaa, 0x80, 0x88, 0x37, + 0xeb, 0x93, 0x52, 0x54, 0xdb, 0x00, 0xfb, 0x54, + 0xfb, 0x3b, 0x78, 0x97, 0xa8, 0x13, 0x37, 0xe2, + 0xc6, 0xd8, 0x89, 0xd7, 0x69, 0xed, 0xe6, 0x60, + 0xef, 0xe2, 0x34, 0x20, 0x36, 0x83, 0x40, 0x63, + 0xbd, 0xca, 0xab, 0x05, 0xc4, 0x31, 0x95, 0xeb, + 0xa7, 0xe0, 0x3d, 0x8b, 0x85, 0xdf, 0xf8, 0x03, + 0x7e, 0x7f, 0x08, 0xd7, 0x39, 0xa1, 0x59, 0xb0, + 0x57, 0x16, 0x34, 0x42, 0x46, 0xd8, 0x0e, 0xc3, + 0xab, 0x8e, 0xda, 0x59, 0xe3, 0x91, 0xb1, 0xea, + 0x72, 0xee, 0xd5, 0xe1, 0x65, 0x20, 0x9e, 0x84, + 0x8c, 0x9d, 0x33, 0xeb, 0xf6, 0x9e, 0xf9, 0x6d, + 0xfe, 0x69, 0x66, 0x73, 0x75, 0xf3, 0xdd, 0xb6, + 0xcf, 0xd3, 0x8b, 0x0c, 0x9e, 0x03, 0xa2, 0x00, + 0x51, 0x0a, 0x63, 0xac, 0x08, 0x60, 0x55, 0xb3, + 0x2b, 0x6e, 0x0f, 0x34, 0x18, 0xce, 0x1d, 0x76, + 0x41, 0x97, 0x02, 0x4e, 0xa0, 0x2b, 0xce, 0x65, + 0xdf, 0x28, 0xf5, 0x35, 0xe1, 0xda, 0xfb, 0x59, + 0x17, 0x00, 0x56, 0x2a, 0xfd, 0xa4, 0xb9, 0x4a, + 0x7f, 0x52, 0x07, 0xb2, 0x4d, 0x52, 0xfa, 0x43, + 0xdd, 0x68, 0x29, 0x71, 0x5a, 0xb0, 0x15, 0x1e, + 0x75, 0x91, 0xf0, 0xf4, 0xe2, 0x91, 0x20, 0x77, + 0x63, 0x75, 0xe9, 0x7c, 0xbe, 0xbd, 0xb2, 0x3f, + 0xdf, 0x4e, 0xab, 0xb7, 0xdf, 0x22, 0xa3, 0x4f, + 0x8f, 0x66, 0xa2, 0x13, 0x85, 0xc8, 0x1b, 0xab, + 0xd0, 0x41, 0x3b, 0xa4, 0x87, 0x6d, 0x9a, 0x1b, + 0xd6, 0x04, 0x7d, 0x82, 0x67, 0x1c, 0x56, 0x10, + 0xb5, 0x82, 0x35, 0xfc, 0xd6, 0x41, 0x8b, 0x88, + 0x78, 0x06, 0x54, 0x94, 0xba, 0x49, 0x2b, 0x87, + 0x39, 0xb5, 0xa8, 0xf2, 0xd8, 0x46, 0x14, 0x05, + 0x63, 0x57, 0x1c, 0x85, 0x58, 0xe7, 0x19, 0xdd, + 0x23, 0xd2, 0x00, 0x75, 0x79, 0x5d, 0x90, 0x8f, + 0x7e, 0x4d, 0x92, 0xcb, 0x83, 0x5a, 0xc8, 0xb8, + 0x21, 0xf4, 0xf9, 0x91, 0x5b, 0xb1, 0x58, 0x94, + 0x83, 0x62, 0xd4, 0xe8, 0x70, 0x4d, 0xb9, 0x2c, + 0x37, 0x17, 0x59, 0x4f, 0x1b, 0xa4, 0x6a, 0x6a, + 0x15, 0x0d, 0xfe, 0xe4, 0x43, 0x66, 0xf8, 0xef, + 0x7c, 0x9d, 0x9a, 0x3c, 0x3e, 0xba, 0x8a, 0x9c, + 0x91, 0xd8, 0xc5, 0x66, 0x3c, 0x08, 0x3f, 0x92, + 0x66, 0x82, 0x87, 0x7f, 0x66, 0xb5, 0x92, 0xe7, + 0x99, 0x48, 0x66, 0xd4, 0x89, 0x9e, 0x8e, 0x69, + 0xdf, 0x3b, 0x89, 0xd3, 0x48, 0x2d, 0xa2, 0x45, + 0xb5, 0x65, 0x57, 0x69, 0xa8, 0xaa, 0x6f, 0xbf, + 0x51, 0xf5, 0x47, 0x60, 0xa7, 0xb6, 0xed, 0x3f, + 0x28, 0x10, 0xdf, 0x2b, 0x3f, 0x5b, 0x7d, 0x0a, + 0x32, 0xaa, 0x76, 0xde, 0x77, 0x8c, 0x54, 0x97, + 0x6e, 0x70, 0x8f, 0xed, 0x52, 0x47, 0x1f, 0x47, + 0x17, 0x34, 0x88, 0x82, 0xc1, 0x33, 0x24, 0xa5, + 0xab, 0xce, 0x84, 0x9c, 0x7b, 0x93, 0xa9, 0xa8, + 0xe6, 0x25, 0x99, 0xb1, 0x19, 0x44, 0x88, 0xaf, + 0xde, 0xaf, 0x9c, 0xb8, 0x68, 0x77, 0xa6, 0x17, + 0xe4, 0xf3, 0x03, 0xf3, 0xe9, 0xf8, 0x0c, 0xec, + 0x50, 0xf4, 0xf0, 0xb3, 0x76, 0x3a, 0x7e, 0x5f, + 0xbc, 0x6f, 0x29, 0xfe, 0x35, 0xc7, 0xf9, 0x15, + 0x71, 0x05, 0xf6, 0xbe, 0x06, 0x8f, 0x4e, 0x85, + 0x47, 0xac, 0xb4, 0xe8, 0xf1, 0x16, 0x17, 0x2c, + 0xc4, 0xac, 0xa6, 0x44, 0xf6, 0xa7, 0xf7, 0xb7, + 0x0d, 0xb1, 0x91, 0x77, 0x75, 0xc4, 0x8a, 0x3b, + 0xc5, 0xe8, 0x1b, 0x9c, 0x70, 0x60, 0x1d, 0xcb, + 0x2e, 0xee, 0x68, 0x7f, 0x12, 0xa4, 0xbb, 0x1a, + 0xe1, 0x57, 0x21, 0x28, 0xbe, 0x5a, 0xb0, 0x21, + 0xbe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, 0x14, 0xd6, 0x1d, 0x9c, + 0x38, 0x3c, 0x3f, 0x05, 0x7b, 0x22, 0x55, 0x4e, + 0x69, 0x29, 0xa3, 0x40, 0x7b, 0x41, 0x84, 0x9d, + 0x72, 0xa9, 0xa5, 0x28, 0xac, 0xd3, 0x4a, 0xab, + 0x02, 0x35, 0x6e, 0xc4, 0x0d, 0x52, 0xc0, 0x89, + 0x80, 0x1d, 0x08, 0x09, 0x1b, 0x90, 0x45, 0x4a, + 0xcd, 0x80, 0x04, 0x7e, 0xdd, 0x1e, 0x8f, 0xe3, + 0xfd, 0x7d, 0x60, 0x29, 0x6e, 0xef, 0x29, 0xaa, + 0x86, 0x32, 0xc3, 0xab, 0x37, 0xdb, 0x43, 0x49, + 0xbc, 0x07, 0xac, 0xe2, 0xe7, 0xf1, 0x63, 0x41, + 0x5c, 0xf7, 0x7a, 0xfc, 0xf0, 0xbf, 0x5e, 0x7b, + 0x7d, 0x06, 0x36, 0xcb, 0x13, 0x2e, 0x57, 0x92, + 0x9d, 0x55, 0x27, 0x73, 0xb3, 0x0e, 0x29, 0x15, + 0xd2, 0x84, 0xe0, 0x03, 0xa5, 0xd8, 0x52, 0xd7, + 0x3a, 0x33, 0x62, 0xa2, 0x1e, 0x37, 0x0e, 0x9c, + 0x31, 0xb0, 0x83, 0x47, 0xc6, 0x22, 0xc4, 0x81, + 0x2a, 0xab, 0x6d, 0x76, 0x73, 0x3b, 0xa8, 0xeb, + 0xa7, 0x99, 0xcc, 0x65, 0x27, 0x74, 0x3c, 0x6c, + 0x7e, 0x47, 0xea, 0x48, 0x1e, 0x63, 0x0c, 0xfa, + 0x9a, 0x04, 0xec, 0xc1, 0xdb, 0x4e, 0xc9, 0xaf, + 0x32, 0x7a, 0x3d, 0xfa, 0xa0, 0x34, 0x20, 0x0d, + 0xfc, 0xce, 0x8c, 0x67, 0x47, 0x83, 0x8c, 0xfe, + 0x8f, 0x72, 0xa1, 0xe7, 0xe5, 0x33, 0xa5, 0x33, + 0x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x6e, 0xcd, 0x37, 0x06, 0x56, 0x13, + 0x2d, 0xac, 0x7c, 0x22, 0xce, 0xf9, 0x29, 0x55, + 0x21, 0xdc, 0x8a, 0xab, 0x22, 0xd7, 0xd6, 0x1b, + 0x05, 0x4e, 0xae, 0x16, 0xb8, 0x0e, 0x4b, 0xbf, + 0xf7, 0x28, 0xab, 0x9c, 0x20, 0x46, 0x07, 0x7d, + 0xc7, 0x7c, 0x7b, 0x56, 0xbf, 0x76, 0x38, 0x93, + 0x64, 0xba, 0xa5, 0xaa, 0xf3, 0x82, 0x53, 0xab, + 0x47, 0x5d, 0xf9, 0x6f, 0x5f, 0x23, 0x4c, 0xd8, + 0xad, 0x80, 0x30, 0xa8, 0xae, 0xa1, 0x4e, 0xa5, + 0x5a, 0x07, 0x9f, 0x30, 0xac, 0x62, 0x86, 0x2a, + 0x43, 0x82, 0xcb, 0x53, 0x4d, 0xa6, 0x9b, 0xa5, + 0x99, 0x66, 0x9f, 0x20, 0xe3, 0xeb, 0xe3, 0x06, + 0x1a, 0xc9, 0x72, 0x79, 0xb2, 0x8b, 0xdb, 0xbf, + 0x11, 0x77, 0x26, 0x8c, 0xa8, 0x15, 0x37, 0x26, + 0xad, 0xb8, 0x3d, 0x6f, 0xc8, 0xe5, 0x4f, 0x7f, + 0xb9, 0x98, 0x87, 0x82, 0x25, 0x69, 0x05, 0xba, + 0x78, 0xb7, 0x02, 0xc2, 0x3a, 0xbe, 0x67, 0x1b, + 0xdf, 0xf1, 0xe0, 0xf5, 0x00, 0xd9, 0xa3, 0xce, + 0xca, 0xc1, 0xfe, 0xc2, 0x91, 0x8b, 0x23, 0x3a, + 0x52, 0x19, 0x82, 0x62, 0x82, 0xfa, 0x1e, 0x43, + 0xc4, 0xa3, 0x3e, 0xe4, 0x1c, 0x65, 0xa2, 0x66, + 0xf4, 0x30, 0xfa, 0xba, 0x4e, 0x1d, 0xbc, 0xf8, + 0xc1, 0xe4, 0xab, 0x6f, 0xdf, 0xf3, 0x71, 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a, 0x1f, 0x9d, 0x92, 0x5e, 0x42, + 0xe5, 0x69, 0x16, 0x5d, 0xf3, 0xb7, 0x8f, 0x6f, + 0x1e, 0xe7, 0x8e, 0xd7, 0x8e, 0xbf, 0x39, 0x0e, + 0xc9, 0xd3, 0xf2, 0xc1, 0x71, 0xe1, 0x78, 0x44, + 0x1e, 0xe6, 0x87, 0x5e, 0x56, 0xc3, 0x7e, 0x85, + 0xb9, 0x39, 0x23, 0xce, 0x9f, 0x73, 0x42, 0x14, + 0x95, 0x27, 0xe0, 0xd8, 0x38, 0x2e, 0x1e, 0xab, + 0xb0, 0x72, 0x66, 0xb8, 0x51, 0x3b, 0x9e, 0x79, + 0x98, 0x81, 0x28, 0xb1, 0x3d, 0xbc, 0xdf, 0x89, + 0x18, 0x3e, 0x65, 0x76, 0x92, 0xa2, 0x26, 0xea, + 0x91, 0xd8, 0x35, 0x21, 0x82, 0x0c, 0x18, 0x90, + 0xed, 0x7e, 0x5d, 0xe2, 0x4b, 0xa8, 0xe3, 0x39, + 0xc8, 0xdd, 0xb1, 0x25, 0x58, 0xa3, 0x73, 0xfa, + 0x1d, 0xe1, 0xeb, 0x7c, 0xb7, 0x66, 0x32, 0xc3, + 0x05, 0x41, 0xdc, 0x4d, 0xcf, 0x2d, 0x9c, 0xcb, + 0xc2, 0x37, 0x1a, 0xab, 0x3f, 0xdf, 0x2b, 0xf5, + 0x95, 0x70, 0x6d, 0x10, 0xfb, 0x8a, 0xb4, 0x88, + 0x95, 0x53, 0x41, 0xd0, 0x49, 0x17, 0x0d, 0x99, + 0x68, 0x5c, 0xe6, 0x7f, 0xea, 0x4a, 0x43, 0x04, + 0x99, 0x2b, 0xe7, 0xad, 0x85, 0x9d, 0xb4, 0x92, + 0xb6, 0xe7, 0x14, 0x78, 0x2f, 0x1f, 0x11, 0xca, + 0x2c, 0x36, 0xe3, 0x79, 0xf6, 0x33, 0x19, 0x17, + 0x09, 0x83, 0x1a, 0x45, 0xf5, 0x46, 0xca, 0x8e, + 0x23, 0xff, 0x08, 0x4e, 0xd3, 0x7b, 0xe7, 0xcb, + 0xb9, 0x5a, 0xaf, 0x42, 0xb7, 0xd6, 0x88, 0x70, + 0xa8, 0x73, 0x81, 0x47, 0xc2, 0x63, 0x77, 0xb7, + 0xa6, 0x9d, 0xc8, 0xf9, 0xb4, 0x28, 0x5a, 0x4c, + 0x15, 0x3e, 0x6e, 0x40, 0xec, 0x56, 0xdc, 0x5a, + 0x8e, 0x58, 0x9d, 0x9e, 0x97, 0xd0, 0x0c, 0x66, + 0x86, 0xd5, 0x50, 0x25, 0x74, 0x16, 0xc3, 0xc9, + 0x17, 0x75, 0xa3, 0x18, 0x56, 0xfc, 0xe7, 0x66, + 0xa6, 0xdd, 0xe7, 0x61, 0xfc, 0xb5, 0x64, 0x4b, + 0xfa, 0x03, 0x21, 0x9c, 0x67, 0xf1, 0x06, 0x46, + 0xb6, 0x58, 0x59, 0xfb, 0x50, 0xc9, 0xf1, 0x43, + 0xcd, 0x26, 0x62, 0x1b, 0x72, 0x67, 0xa5, 0x59, + 0xdc, 0x13, 0x3f, 0x8e, 0x25, 0x51, 0xf7, 0x8a, + 0xe9, 0x7e, 0x44, 0x19, 0xef, 0x62, 0xab, 0x17, + 0x87, 0x9c, 0xcd, 0xb0, 0x63, 0xe9, 0xdc, 0xc3, + 0x21, 0xe3, 0x1d, 0x64, 0xaa, 0xe3, 0x5c, 0x33, + 0x22, 0x8f, 0xfe, 0x22, 0x59, 0x33, 0xe2, 0x27, + 0x4d, 0x45, 0x09, 0x9c, 0x0c, 0xbb, 0xa8, 0xec, + 0xfb, 0x7c, 0x1d, 0xa2, 0xd4, 0x69, 0xeb, 0x70, + 0x91, 0xbd, 0xff, 0x40, 0x39, 0x28, 0xde, 0xa0, + 0xf8, 0x59, 0x10, 0xb7, 0x8c, 0x9c, 0xb6, 0xa8, + 0x05, 0xc5, 0x23, 0x43, 0x30, 0x26, 0x27, 0xc7, + 0x2b, 0x0b, 0x86, 0xea, 0x4e, 0x2f, 0xb1, 0x2e, + 0x8f, 0x62, 0xa4, 0x8c, 0xd0, 0xeb, 0xcb, 0xf1, + 0xe8, 0xc1, 0xcc, 0x05, 0x94, 0x85, 0xbb, 0xea, + 0x70, 0xce, 0x8b, 0x78, 0x7b, 0x20, 0x9a, 0x24, + 0x1d, 0x38, 0xb5, 0x88, 0x13, 0x37, 0x61, 0x7d, + 0x4b, 0xbd, 0xa9, 0x41, 0x8e, 0xaa, 0x6d, 0x6a, + 0x41, 0x6b, 0x4c, 0xcb, 0x6a, 0x9b, 0x56, 0xa8, + 0x14, 0xda, 0x09, 0xef, 0xac, 0x16, 0xdd, 0xcc, + 0x5a, 0x79, 0xe4, 0xe4, 0xcc, 0xac, 0x78, 0xc9, + 0xbe, 0x1a, 0xcf, 0x5a, 0x9b, 0xf4, 0x89, 0x65, + 0x7a, 0x2e, 0x76, 0x52, 0x1f, 0x39, 0x5b, 0xe6, + 0x73, 0x71, 0xdb, 0xfe, 0x2c, 0xce, 0xb8, 0x74, + 0x7e, 0x52, 0xfb, 0x8a, 0x7c, 0x91, 0x31, 0x00, + 0x27, 0x95, 0xbf, 0xd3, 0xe7, 0x45, 0x2d, 0xed, + 0xf1, 0x5f, 0x96, 0xad, 0x15, 0x63, 0xb7, 0x2c, + 0x96, 0x23, 0x06, 0x9b, 0x6e, 0xd8, 0xb3, 0x56, + 0xc4, 0x3b, 0x16, 0xb2, 0x4b, 0x47, 0xb4, 0x31, + 0x6b, 0x45, 0x5b, 0xb1, 0xdc, 0x1d, 0xee, 0xae, + 0x2b, 0x2f, 0x07, 0x82, 0x13, 0xd6, 0x49, 0x50, + 0x12, 0x5a, 0x82, 0x32, 0xcc, 0x74, 0x00, 0x99, + 0x96, 0x10, 0xc7, 0xd9, 0x6b, 0xac, 0x02, 0x22, + 0xad, 0x9d, 0xc0, 0xae, 0x91, 0xd7, 0x65, 0xaa, + 0xe7, 0x90, 0x8a, 0x4d, 0xd4, 0x0c, 0x40, 0xc6, + 0xff,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0x11, 0xa3, 0x5e, + 0x8d, 0x55, 0x63, 0xa5, 0x91, 0x57, 0xc8, 0xce, + 0x81, 0xff, 0x4e, 0x7c, 0x23, 0xdc, 0xe7, 0xf6, + 0x2e, 0xf7, 0xb3, 0xf5, 0x99, 0x88, 0x77, 0xbe, + 0xca, 0x3d, 0x7e, 0xb3, 0x6b, 0x1e, 0x99, 0xfd, + 0x6f, 0xbc, 0xdc, 0xb9, 0xab, 0xae, 0x82, 0x6a, + 0xdb, 0x66, 0xdd, 0xc7, 0x3f, 0x73, 0xca, 0xba, + 0x9a, 0xd6, 0xc0, 0xee, 0x9f, 0x65, 0xb5, 0xb9, + 0x9d, 0xb4, 0x9a, 0x76, 0xe6, 0x0e, 0x3f, 0x36, + 0x65, 0xb0, 0xe7, 0xc8, 0x98, 0x0a, 0x5f, 0x99, + 0x39, 0x55, 0x49, 0x3b, 0x47, 0x95, 0x9c, 0x59, + 0x90, 0x73, 0xe6, 0xba, 0x33, 0x70, 0xf8, 0xd1, + 0x79, 0xae, 0x96, 0xd1, 0xef, 0x0b, 0x34, 0x33, + 0x65, 0x16, 0x2a, 0x39, 0xa7, 0x50, 0x59, 0x30, + 0x17, 0x0e, 0x0a, 0x6a, 0xce, 0x41, 0x36, 0xf5, + 0x5c, 0x6d, 0x49, 0xff, 0x13, 0x1a, 0xac, 0x46, + 0x7f, 0xed, 0x28, 0x1e, 0x7d, 0x15, 0xfd, 0x77, + 0x4c, 0xae, 0xed, 0xb0, 0xa9, 0xe2, 0x29, 0xf5, + 0x6b, 0xb5, 0xdf, 0xd3, 0x4f, 0xf1, 0xad, 0x54, + 0x5e, 0x08, 0xe6, 0x21, 0xda, 0x4f, 0x4e, 0xbf, + 0xf7, 0xf1, 0x2a, 0xa4, 0x04, 0x81, 0x98, 0xc0, + 0x59, 0xbb, 0x4f, 0x45, 0x15, 0x32, 0x59, 0x91, + 0xcb, 0xaa, 0xf1, 0x98, 0xe2, 0xd8, 0xee, 0xe7, + 0xa2, 0x16, 0x33, 0xea, 0x25, 0x77, 0x34, 0x8b, + 0x05, 0x6e, 0xcb, 0x01, 0x2b, 0xaa, 0xd4, 0x7d, + 0x4e, 0x25, 0xe4, 0x57, 0x8a, 0x6b, 0x29, 0x42, + 0xe0, 0x04, 0x7a, 0xba, 0x40, 0xd3, 0x38, 0xf7, + 0x8c, 0xc7, 0x59, 0x27, 0x62, 0xe4, 0x9b, 0xd8, + 0x31, 0x98, 0xb0, 0x17, 0xf9, 0x6d, 0x5b, 0x60, + 0x6c, 0x33, 0x15, 0x17, 0x09, 0x23, 0x5c, 0x39, + 0x0f, 0x65, 0x90, 0xdd, 0x72, 0xd9, 0x2c, 0x99, + 0xe3, 0x66, 0xc4, 0x44, 0x5d, 0x0f, 0xea, 0xb3, + 0xbb, 0xc8, 0xcc, 0x19, 0x25, 0x02, 0x71, 0xf5, + 0xc0, 0xb9, 0xc0, 0x23, 0xb6, 0x5b, 0x82, 0x43, + 0xb1, 0x14, 0xc6, 0xa8, 0xd9, 0x9c, 0xa2, 0x36, + 0xeb, 0xb4, 0x13, 0x97, 0xe3, 0x72, 0x42, 0x1e, + 0xc1, 0xa3, 0x98, 0x2d, 0x66, 0x5f, 0x3e, 0x49, + 0x7a, 0xb1, 0x59, 0x52, 0x44, 0x65, 0xf7, 0x29, + 0xb0, 0x8f, 0x47, 0x76, 0x88, 0x65, 0xd0, 0xed, + 0x4b, 0xde, 0x24, 0x66, 0x33, 0xd9, 0x5c, 0xa1, + 0x8a, 0x1d, 0xec, 0x4d, 0x95, 0x8e, 0x0a, 0xf3, + 0xbf, 0x5d, 0xca, 0x95, 0xd4, 0xf3, 0x44, 0x6c, + 0x7c, 0x52, 0x2d, 0x57, 0x5c, 0x35, 0x19, 0x77, + 0x96, 0x87, 0x21, 0xb5, 0x27, 0x95, 0x9c, 0xb2, + 0x85, 0xbf, 0xf9, 0x3d, 0x82, 0x8e, 0xfa, 0x33, + 0x72, 0x7d, 0xba, 0xdf, 0x47, 0xb9, 0xa3, 0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, 0xd6, 0x6a, 0xfd, + 0x2d, 0xba, 0xa3, 0xc5, 0x35, 0xaa, 0xf6, 0x30, + 0xcf, 0x4d, 0x7a, 0x6e, 0x2d, 0xea, 0x32, 0xb6, + 0x67, 0x92, 0x2e, 0x6b, 0x48, 0xd8, 0x47, 0x0d, + 0x21, 0xf3, 0x3f, 0xd8, 0xef, 0xf1, 0xff, 0x19, + 0x7f, 0x3b, 0x6d, 0x8c, 0x9f, 0x44, 0xf3, 0xb2, + 0x8a, 0x7a, 0x7c, 0x2e, 0x87, 0x15, 0x3f, 0xc2, + 0x8f, 0xd9, 0x2b, 0x87, 0xb7, 0x0f, 0x6f, 0x9e, + 0x97, 0xde, 0x68, 0xcd, 0x8e, 0x82, 0x15, 0xe9, + 0x5a, 0x9a, 0xf2, 0x71, 0xf6, 0xa0, 0x1f, 0x56, + 0x18, 0xec, 0x51, 0x0e, 0x31, 0x72, 0x0a, 0xe3, + 0xd9, 0xa6, 0x1c, 0x36, 0xca, 0xa3, 0x46, 0xc2, + 0xbd, 0xc3, 0x6f, 0x0e, 0xe7, 0xce, 0xe7, 0xde, + 0xc8, 0xcd, 0x7b, 0xbe, 0x8a, 0x3a, 0xde, 0xa3, + 0x39, 0x3e, 0x8d, 0x53, 0xd1, 0x87, 0xf3, 0x87, + 0xeb, 0xe7, 0xa8, 0x89, 0x0a, 0x11, 0xbc, 0xbc, + 0x33, 0xf9, 0xff, 0xe8, 0xc4, 0x21, 0xbf +}; diff --git a/libpcsxcore/socket.c b/libpcsxcore/socket.c new file mode 100644 index 00000000..2e0dc870 --- /dev/null +++ b/libpcsxcore/socket.c @@ -0,0 +1,254 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#ifdef _WIN32 +#include +#endif + +#include "psxcommon.h" +#include "socket.h" + +#ifndef _WIN32 +#include +#include +#include +#include +#include +#include +#endif + +static int server_socket = 0; +static int client_socket = 0; + +static char tbuf[513]; +static int ptr = 0; + +#define PORT_NUMBER 12345 + +int StartServer() { + struct in_addr localhostaddr; + struct sockaddr_in localsocketaddr; + +#ifdef _WIN32 + WSADATA wsaData; + + if (WSAStartup(MAKEWORD(2, 0), &wsaData) != 0) + return -1; +#endif + + server_socket = socket(AF_INET, SOCK_STREAM, 0); + +#ifdef _WIN32 + if (server_socket == INVALID_SOCKET) + return -1; +#else + if (server_socket == -1) + return -1; +#endif + + SetsNonblock(); + + memset((void *)&localhostaddr, 0, sizeof(localhostaddr)); + memset(&localsocketaddr, 0, sizeof(struct sockaddr_in)); + +#ifdef _WIN32 + localhostaddr.S_un.S_addr = htonl(INADDR_ANY); +#else + localhostaddr.s_addr = htonl(INADDR_ANY); +#endif + localsocketaddr.sin_family = AF_INET; + localsocketaddr.sin_addr = localhostaddr; + localsocketaddr.sin_port = htons(PORT_NUMBER); + + if (bind(server_socket, (struct sockaddr *) &localsocketaddr, sizeof(localsocketaddr)) < 0) + return -1; + + if (listen(server_socket, 1) != 0) + return -1; + + return 0; +} + +void StopServer() { +#ifdef _WIN32 + shutdown(server_socket, SD_BOTH); + closesocket(server_socket); + WSACleanup(); +#else + shutdown(server_socket, SHUT_RDWR); + close(server_socket); +#endif +} + +void GetClient() { + int new_socket; + char hello[256]; + + new_socket = accept(server_socket, 0, 0); + +#ifdef _WIN32 + if (new_socket == INVALID_SOCKET) + return; +#else + if (new_socket == -1) + return; +#endif + if (client_socket) + CloseClient(); + client_socket = new_socket; + +#ifndef _WIN32 + { + int flags; + flags = fcntl(client_socket, F_GETFL, 0); + fcntl(client_socket, F_SETFL, flags | O_NONBLOCK); + } +#endif + + sprintf(hello, "000 PCSX Version %s - Debug console\r\n", PACKAGE_VERSION); + WriteSocket(hello, strlen(hello)); + ptr = 0; +} + +void CloseClient() { + if (client_socket) { +#ifdef _WIN32 + shutdown(client_socket, SD_BOTH); + closesocket(client_socket); +#else + shutdown(client_socket, SHUT_RDWR); + close(client_socket); +#endif + client_socket = 0; + } +} + +int HasClient() { + return client_socket ? 1 : 0; +} + +int ReadSocket(char * buffer, int len) { + int r; + char * endl; + + if (!client_socket) + return -1; + + r = recv(client_socket, tbuf + ptr, 512 - ptr, 0); + + if (r == 0) { + client_socket = 0; + if (!ptr) + return 0; + } +#ifdef _WIN32 + if (r == SOCKET_ERROR) +#else + if (r == -1) +#endif + { + if (ptr == 0) + return -1; + r = 0; + } + ptr += r; + tbuf[ptr] = 0; + + endl = strstr(tbuf, "\r\n"); + + if (endl) { + r = endl - tbuf; + strncpy(buffer, tbuf, r); + + r += 2; + memmove(tbuf, tbuf + r, 512 - r); + ptr -= r; + memset(tbuf + r, 0, 512 - r); + r -= 2; + + } else { + r = 0; + } + + buffer[r] = 0; + + return r; +} + +int RawReadSocket(char * buffer, int len) { + int r; + int mlen = len < ptr ? len : ptr; + + if (!client_socket) + return -1; + + if (ptr) { + memcpy(buffer, tbuf, mlen); + ptr -= mlen; + memmove(tbuf, tbuf + mlen, 512 - mlen); + } + + if (len - mlen) + r = recv(client_socket, buffer + mlen, len - mlen, 0); + + if (r == 0) { + client_socket = 0; + if (!ptr) + return 0; + } +#ifdef _WIN32 + if (r == SOCKET_ERROR) +#else + if (r == -1) +#endif + { + if (ptr == 0) + return -1; + r = 0; + } + + r += mlen; + + return r; +} + +void WriteSocket(char * buffer, int len) { + if (!client_socket) + return; + + send(client_socket, buffer, len, 0); +} + +void SetsBlock() { +#ifdef _WIN32 + u_long b = 0; + ioctlsocket(server_socket, FIONBIO, &b); +#else + int flags = fcntl(server_socket, F_GETFL, 0); + fcntl(server_socket, F_SETFL, flags & ~O_NONBLOCK); +#endif +} + +void SetsNonblock() { +#ifdef _WIN32 + u_long b = 1; + ioctlsocket(server_socket, FIONBIO, &b); +#else + int flags = fcntl(server_socket, F_GETFL, 0); + fcntl(server_socket, F_SETFL, flags | O_NONBLOCK); +#endif +} diff --git a/libpcsxcore/socket.h b/libpcsxcore/socket.h new file mode 100644 index 00000000..7ee0deb4 --- /dev/null +++ b/libpcsxcore/socket.h @@ -0,0 +1,43 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#ifndef __SOCKET_H__ +#define __SOCKET_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +int StartServer(); +void StopServer(); + +void GetClient(); +void CloseClient(); + +int HasClient(); + +int ReadSocket(char * buffer, int len); +int RawReadSocket(char * buffer, int len); +void WriteSocket(char * buffer, int len); + +void SetsBlock(); +void SetsNonblock(); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/spu.c b/libpcsxcore/spu.c new file mode 100644 index 00000000..a60c0478 --- /dev/null +++ b/libpcsxcore/spu.c @@ -0,0 +1,28 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +/* +* Sound (SPU) functions. +*/ + +#include "spu.h" + +void CALLBACK SPUirq(void) { + psxHu32ref(0x1070) |= SWAPu32(0x200); +} diff --git a/libpcsxcore/spu.h b/libpcsxcore/spu.h new file mode 100644 index 00000000..85010cbd --- /dev/null +++ b/libpcsxcore/spu.h @@ -0,0 +1,47 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __SPU_H__ +#define __SPU_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "psxcommon.h" +#include "plugins.h" +#include "r3000a.h" +#include "psxmem.h" + +#define H_SPUirqAddr 0x0da4 +#define H_SPUaddr 0x0da6 +#define H_SPUdata 0x0da8 +#define H_SPUctrl 0x0daa +#define H_SPUstat 0x0dae +#define H_SPUon1 0x0d88 +#define H_SPUon2 0x0d8a +#define H_SPUoff1 0x0d8c +#define H_SPUoff2 0x0d8e + +void CALLBACK SPUirq(void); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/libpcsxcore/system.h b/libpcsxcore/system.h new file mode 100644 index 00000000..c869fdf1 --- /dev/null +++ b/libpcsxcore/system.h @@ -0,0 +1,42 @@ +/*************************************************************************** + * Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * + ***************************************************************************/ + +#ifndef __SYSTEM_H__ +#define __SYSTEM_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +int SysInit(); // Init mem and plugins +void SysReset(); // Resets mem +void SysPrintf(const char *fmt, ...); // Printf used by bios syscalls +void SysMessage(const char *fmt, ...); // Message used to print msg to users +void *SysLoadLibrary(const char *lib); // Loads Library +void *SysLoadSym(void *lib, const char *sym); // Loads Symbol from Library +const char *SysLibError(); // Gets previous error loading sysbols +void SysCloseLibrary(void *lib); // Closes Library +void SysUpdate(); // Called on VBlank (to update i.e. pads) +void SysRunGui(); // Returns to the Gui +void SysClose(); // Close mem and plugins + +#ifdef __cplusplus +} +#endif +#endif diff --git a/ltmain.sh b/ltmain.sh new file mode 100755 index 00000000..2e3661e0 --- /dev/null +++ b/ltmain.sh @@ -0,0 +1,8412 @@ +# Generated from ltmain.m4sh. + +# ltmain.sh (GNU libtool) 2.2.6 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print informational messages (default) +# --version print version information +# -h, --help print short or long help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-1 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="2.2.6 Debian-2.2.6a-1" +TIMESTAMP="" +package_revision=1.3012 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# NLS nuisances: We save the old values to restore during execute mode. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done + +$lt_unset CDPATH + + + + + +: ${CP="cp -f"} +: ${ECHO="echo"} +: ${EGREP="/bin/grep -E"} +: ${FGREP="/bin/grep -F"} +: ${GREP="/bin/grep"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SED="/bin/sed"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +# Generated shell functions inserted here. + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +# In the unlikely event $progname began with a '-', it would play havoc with +# func_echo (imagine progname=-n), so we prepend ./ in that case: +func_dirname_and_basename "$progpath" +progname=$func_basename_result +case $progname in + -*) progname=./$progname ;; +esac + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=: + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname${mode+: }$mode: $*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + done + my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "X$my_tmpdir" | $Xsed +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "X$1" | $Xsed \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + + + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $SED -n '/^# Usage:/,/# -h/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + $ECHO + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help +# Echo long help message to standard output and exit. +func_help () +{ + $SED -n '/^# Usage:/,/# Report bugs to/ { + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p + }' < "$progpath" + exit $? +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + func_error "missing argument for $1" + exit_cmd=exit +} + +exit_cmd=: + + + + + +# Check that we have a working $ECHO. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell, and then maybe $ECHO will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# Parse options once, thoroughly. This comes as soon as possible in +# the script to make things like `libtool --version' happen quickly. +{ + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Parse non-mode specific arguments: + while test "$#" -gt 0; do + opt="$1" + shift + + case $opt in + --config) func_config ;; + + --debug) preserve_args="$preserve_args $opt" + func_echo "enabling shell trace mode" + opt_debug='set -x' + $opt_debug + ;; + + -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break + execute_dlfiles="$execute_dlfiles $1" + shift + ;; + + --dry-run | -n) opt_dry_run=: ;; + --features) func_features ;; + --finish) mode="finish" ;; + + --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break + case $1 in + # Valid mode arguments: + clean) ;; + compile) ;; + execute) ;; + finish) ;; + install) ;; + link) ;; + relink) ;; + uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; + esac + + mode="$1" + shift + ;; + + --preserve-dup-deps) + opt_duplicate_deps=: ;; + + --quiet|--silent) preserve_args="$preserve_args $opt" + opt_silent=: + ;; + + --verbose| -v) preserve_args="$preserve_args $opt" + opt_silent=false + ;; + + --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break + preserve_args="$preserve_args $opt $1" + func_enable_tag "$1" # tagname is set here + shift + ;; + + # Separate optargs to long options: + -dlopen=*|--mode=*|--tag=*) + func_opt_split "$opt" + set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + shift + ;; + + -\?|-h) func_usage ;; + --help) opt_help=: ;; + --version) func_version ;; + + -*) func_fatal_help "unrecognized option \`$opt'" ;; + + *) nonopt="$opt" + break + ;; + esac + done + + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + ;; + esac + + # Having warned about all mis-specified options, bail out if + # anything was wrong. + $exit_cmd $EXIT_FAILURE +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +## ----------- ## +## Main. ## +## ----------- ## + +$opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + test -z "$mode" && func_fatal_error "error: you must specify a MODE." + + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$mode' for more information." +} + + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_ltwrapper_scriptname_result="" + if func_ltwrapper_executable_p "$1"; then + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + fi +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case "$@ " in + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T <?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + removelist="$removelist $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + removelist="$removelist $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + command="$command -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + command="$command -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command="$command$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { +test "$mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$mode'" + ;; + esac + + $ECHO + $ECHO "Try \`$progname --help' for more information about other modes." + + exit $? +} + + # Now that we've collected a possible --mode arg, show help if necessary + $opt_help && func_mode_help + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_quote_for_eval "$file" + args="$args $func_quote_for_eval_result" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + $ECHO "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + $ECHO "X----------------------------------------------------------------------" | $Xsed + $ECHO "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + $ECHO + $ECHO "If you ever happen to want to link against installed libraries" + $ECHO "in a given directory, LIBDIR, you must either use libtool, and" + $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" + $ECHO "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" + $ECHO " during execution" + fi + if test -n "$runpath_var"; then + $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" + $ECHO " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $ECHO + + $ECHO "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" + $ECHO "pages." + ;; + *) + $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + $ECHO "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS +} + +test "$mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + install_prog="$install_prog$func_quote_for_eval_result" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + install_prog="$install_prog $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_verbose "extracting global C symbols from \`$progfile'" + $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + $ECHO >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +" + case $host in + *cygwin* | *mingw* | *cegcc* ) + $ECHO >> "$output_objdir/$my_dlsyms" "\ +/* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs. */" + lt_dlsym_const= ;; + *osf5*) + echo >> "$output_objdir/$my_dlsyms" "\ +/* This system does not cope well with relocations in const data */" + lt_dlsym_const= ;; + *) + lt_dlsym_const=const ;; + esac + + $ECHO >> "$output_objdir/$my_dlsyms" "\ +extern $lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +$lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + $ECHO >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) symtab_cflags="$symtab_cflags $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + + +# func_emit_wrapper_part1 [arg=no] +# +# Emit the first part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part1 () +{ + func_emit_wrapper_part1_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part1_arg1=$1 + fi + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + ECHO=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$ECHO works! + : + else + # Restart under the correct shell, and then maybe \$ECHO will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $ECHO "\ + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done +" +} +# end: func_emit_wrapper_part1 + +# func_emit_wrapper_part2 [arg=no] +# +# Emit the second part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part2 () +{ + func_emit_wrapper_part2_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part2_arg1=$1 + fi + + $ECHO "\ + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} +# end: func_emit_wrapper_part2 + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=no + if test -n "$1" ; then + func_emit_wrapper_arg1=$1 + fi + + # split this up so that func_emit_cwrapperexe_src + # can call each part independently. + func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" + func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" +} + + +# func_to_host_path arg +# +# Convert paths to host format when used with build tools. +# Intended for use with "native" mingw (where libtool itself +# is running under the msys shell), or in the following cross- +# build environments: +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# where wine is equipped with the `winepath' executable. +# In the native mingw case, the (msys) shell automatically +# converts paths for any non-msys applications it launches, +# but that facility isn't available from inside the cwrapper. +# Similar accommodations are necessary for $host mingw and +# $build cygwin. Calling this function does no harm for other +# $host/$build combinations not listed above. +# +# ARG is the path (on $build) that should be converted to +# the proper representation for $host. The result is stored +# in $func_to_host_path_result. +func_to_host_path () +{ + func_to_host_path_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + case $build in + *mingw* ) # actually, msys + # awkward: cmd appends spaces to result + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_path_tmp1=`( cmd //c echo "$1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_path_tmp1=`cygpath -w "$1"` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # Unfortunately, winepath does not exit with a non-zero + # error code, so we are forced to check the contents of + # stdout. On the other hand, if the command is not + # found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both + # error code of zero AND non-empty stdout, which explains + # the odd construction: + func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + else + # Allow warning below. + func_to_host_path_result="" + fi + ;; + esac + if test -z "$func_to_host_path_result" ; then + func_error "Could not determine host path corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_path_result="$1" + fi + ;; + esac + fi +} +# end: func_to_host_path + +# func_to_host_pathlist arg +# +# Convert pathlists to host format when used with build tools. +# See func_to_host_path(), above. This function supports the +# following $build/$host combinations (but does no harm for +# combinations not listed here): +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# +# Path separators are also converted from $build format to +# $host format. If ARG begins or ends with a path separator +# character, it is preserved (but converted to $host format) +# on output. +# +# ARG is a pathlist (on $build) that should be converted to +# the proper representation on $host. The result is stored +# in $func_to_host_pathlist_result. +func_to_host_pathlist () +{ + func_to_host_pathlist_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_to_host_pathlist_tmp2="$1" + # Once set for this call, this variable should not be + # reassigned. It is used in tha fallback case. + func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e 's|^:*||' -e 's|:*$||'` + case $build in + *mingw* ) # Actually, msys. + # Awkward: cmd appends spaces to result. + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # unfortunately, winepath doesn't convert pathlists + func_to_host_pathlist_result="" + func_to_host_pathlist_oldIFS=$IFS + IFS=: + for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do + IFS=$func_to_host_pathlist_oldIFS + if test -n "$func_to_host_pathlist_f" ; then + func_to_host_path "$func_to_host_pathlist_f" + if test -n "$func_to_host_path_result" ; then + if test -z "$func_to_host_pathlist_result" ; then + func_to_host_pathlist_result="$func_to_host_path_result" + else + func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" + fi + fi + fi + IFS=: + done + IFS=$func_to_host_pathlist_oldIFS + ;; + esac + if test -z "$func_to_host_pathlist_result" ; then + func_error "Could not determine the host path(s) corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This may break if $1 contains DOS-style drive + # specifications. The fix is not to complicate the expression + # below, but for the user to provide a working wine installation + # with winepath so that path translation in the cross-to-mingw + # case works properly. + lt_replace_pathsep_nix_to_dos="s|:|;|g" + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_replace_pathsep_nix_to_dos"` + fi + # Now, add the leading and trailing path separators back + case "$1" in + :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" + ;; + esac + case "$1" in + *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" + ;; + esac + ;; + esac + fi +} +# end: func_to_host_pathlist + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +# define setmode _setmode +#else +# include +# include +# ifdef __CYGWIN__ +# include +# define HAVE_SETENV +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +#ifdef _MSC_VER +# define S_IXUSR _S_IEXEC +# define stat _stat +# ifndef _INTPTR_T_DEFINED +# define intptr_t int +# endif +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifdef __CYGWIN__ +# define FOPEN_WB "wb" +#endif + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#undef LTWRAPPER_DEBUGPRINTF +#if defined DEBUGWRAPPER +# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +static void +ltwrapper_debugprintf (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); +} +#else +# define LTWRAPPER_DEBUGPRINTF(args) +#endif + +const char *program_name = NULL; + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_fatal (const char *message, ...); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_opt_process_env_set (const char *arg); +void lt_opt_process_env_prepend (const char *arg); +void lt_opt_process_env_append (const char *arg); +int lt_split_name_value (const char *arg, char** name, char** value); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); + +static const char *script_text_part1 = +EOF + + func_emit_wrapper_part1 yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + cat <"))); + for (i = 0; i < newargc; i++) + { + LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + } + +EOF + + case $host_os in + mingw*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + if (rval == -1) + { + /* failed to start process */ + LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + return 127; + } + return rval; +EOF + ;; + *) + cat <<"EOF" + execv (lt_argv_zero, newargz); + return rval; /* =127, but avoids unused variable warning */ +EOF + ;; + esac + + cat <<"EOF" +} + +void * +xmalloc (size_t num) +{ + void *p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), + string) : NULL; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char) name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable (const char *path) +{ + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", + wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", + tmp_pathspec)); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + char *errstr = strerror (errno); + lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal ("Could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} + +void +lt_setenv (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", + (name ? name : ""), + (value ? value : ""))); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +int +lt_split_name_value (const char *arg, char** name, char** value) +{ + const char *p; + int len; + if (!arg || !*arg) + return 1; + + p = strchr (arg, (int)'='); + + if (!p) + return 1; + + *value = xstrdup (++p); + + len = strlen (arg) - strlen (*value); + *name = XMALLOC (char, len); + strncpy (*name, arg, len-1); + (*name)[len - 1] = '\0'; + + return 0; +} + +void +lt_opt_process_env_set (const char *arg) +{ + char *name = NULL; + char *value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); + } + + lt_setenv (name, value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_prepend (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_append (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 1); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + + +EOF +} +# end: func_emit_cwrapperexe_src + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + weak_libs="$weak_libs $arg" + prev= + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname '-L' '' "$arg" + dir=$func_stripname_result + if test -z "$dir"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" + linker_flags="$linker_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_duplicate_deps ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + case $lib in + *.la) func_source "$lib" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + case " $weak_libs " in + *" $deplib_base "*) ;; + *) deplibs="$deplibs $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + dir=$func_stripname_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $ECHO + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because the file extensions .$libext of this argument makes me believe" + $ECHO "*** that it is just a static archive that I should not use here." + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath="$temp_rpath$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + $ECHO + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $ECHO + $ECHO "*** And there doesn't seem to be a static archive available" + $ECHO "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $ECHO + $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $ECHO "*** But as you try to build a module library, libtool will still create " + $ECHO "*** a static module, that should work as long as the dlopening application" + $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_dirname "$deplib" "" "." + dir="$func_dirname_result" + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + libobjs="$libobjs $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` + # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` + # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ + -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + done + fi + if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | + $GREP . >/dev/null; then + $ECHO + if test "X$deplibs_check_method" = "Xnone"; then + $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + else + $ECHO "*** Warning: inter-library dependencies are not known to be supported." + fi + $ECHO "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $ECHO + $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + $ECHO "*** a static module, that should work as long as the dlopening" + $ECHO "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $ECHO "*** The inter-library dependencies that have been dropped here will be" + $ECHO "*** automatically added whenever a program is linked with this library" + $ECHO "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $ECHO + $ECHO "*** Since this library must not contain undefined symbols," + $ECHO "*** because either the platform does not support them or" + $ECHO "*** it was explicitly requested with -no-undefined," + $ECHO "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + delfiles="$delfiles $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + func_len " $cmd" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + $ECHO 'INPUT (' > $output + for obj in $save_libobjs + do + $ECHO "$obj" >> $output + done + $ECHO ')' >> $output + delfiles="$delfiles $output" + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + $ECHO "$obj" >> $output + done + delfiles="$delfiles $output" + output=$firstobj\"$file_list_spec$output\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + delfiles="$delfiles $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *cegcc) + # Disable wrappers for cegcc, we are cross compiling anyway. + wrappers_required=no + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $ECHO for shipping. + if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + oldobjs="$oldobjs $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $ECHO "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlfiles="$newdlfiles $libdir/$name" + ;; + *) newdlfiles="$newdlfiles $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlprefiles="$newdlprefiles $libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$mode" = link || test "$mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) RM="$RM $arg"; rmforce=yes ;; + -*) RM="$RM $arg" ;; + *) files="$files $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$mode" = uninstall || test "$mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/macosx/ConfigurationController.h b/macosx/ConfigurationController.h new file mode 100644 index 00000000..e3901976 --- /dev/null +++ b/macosx/ConfigurationController.h @@ -0,0 +1,41 @@ +/* ConfigurationController */ + +#import +#import "PluginController.h" +#import "PluginList.h" + +@interface ConfigurationController : NSWindowController +{ + IBOutlet PluginController *cdromPlugin; + IBOutlet PluginController *graphicsPlugin; + IBOutlet PluginController *padPlugin; + IBOutlet PluginController *soundPlugin; + + IBOutlet id noXaAudioCell; + IBOutlet id sioIrqAlwaysCell; + IBOutlet id bwMdecCell; + IBOutlet id autoVTypeCell; + IBOutlet id vTypePALCell; + IBOutlet id noCDAudioCell; + IBOutlet id usesHleCell; + IBOutlet id usesDynarecCell; + IBOutlet id consoleOutputCell; + IBOutlet id spuIrqAlwaysCell; + IBOutlet id rCountFixCell; + IBOutlet id vSyncWAFixCell; + IBOutlet id noFastBootCell; + + IBOutlet NSTextField *mcd1Label; + IBOutlet NSTextField *mcd2Label; + + NSMutableDictionary *checkBoxDefaults; +} +- (IBAction)setCheckbox:(id)sender; +- (IBAction)setCheckboxInverse:(id)sender; +- (IBAction)setVideoType:(id)sender; +- (IBAction)mcdChangeClicked:(id)sender; +- (IBAction)mcdNewClicked:(id)sender; + +- (NSString *)keyForSender:(id)sender; + +@end diff --git a/macosx/ConfigurationController.m b/macosx/ConfigurationController.m new file mode 100644 index 00000000..9f692ca3 --- /dev/null +++ b/macosx/ConfigurationController.m @@ -0,0 +1,203 @@ +#import "ConfigurationController.h" +#import "PcsxController.h" +#import "PluginList.h" +#import "PcsxPlugin.h" +#include "psxcommon.h" +#include "plugins.h" + +@implementation ConfigurationController + +- (IBAction)setCheckbox:(id)sender +{ + if ([sender isKindOfClass:[NSMatrix class]]) { + sender = [sender selectedCell]; + } + + NSString *key = [self keyForSender:sender]; + if (key) { + [[NSUserDefaults standardUserDefaults] setInteger:[sender intValue] forKey:key]; + [PcsxController setConfigFromDefaults]; + } +} + +- (IBAction)setCheckboxInverse:(id)sender +{ + if ([sender isKindOfClass:[NSMatrix class]]) { + sender = [sender selectedCell]; + } + + NSString *key = [self keyForSender:sender]; + if (key) { + [[NSUserDefaults standardUserDefaults] setInteger:![sender intValue] forKey:key]; + [PcsxController setConfigFromDefaults]; + } +} + +- (IBAction)mcdChangeClicked:(id)sender +{ + int tag = [sender tag]; + char *mcd; + NSTextField *label; + NSOpenPanel *openDlg = [NSOpenPanel openPanel]; + NSString *path; + + if (tag == 1) { mcd = Config.Mcd1; label = mcd1Label; } + else { mcd = Config.Mcd2; label = mcd2Label; } + + [openDlg setCanChooseFiles:YES]; + [openDlg setCanChooseDirectories:NO]; + + path = [NSString stringWithCString:mcd]; + + if ([openDlg runModalForDirectory:[path stringByDeletingLastPathComponent] file:[path lastPathComponent]] == NSOKButton) { + NSArray* files = [openDlg filenames]; + strcpy(mcd, (const char *)[[files objectAtIndex:0] fileSystemRepresentation]); + + [label setTitleWithMnemonic:[NSString stringWithCString:mcd]]; + + if (tag == 1) + [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithCString:mcd] forKey:@"Mcd1"]; + else + [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithCString:mcd] forKey:@"Mcd2"]; + } +} + +- (IBAction)mcdNewClicked:(id)sender +{ + int tag = [sender tag]; + char *mcd; + NSTextField *label; + NSSavePanel *openDlg = [NSSavePanel savePanel]; + NSString *path; + + if (tag == 1) { mcd = Config.Mcd1; label = mcd1Label; } + else { mcd = Config.Mcd2; label = mcd2Label; } + + path = [NSString stringWithCString:mcd]; + + if ([openDlg runModalForDirectory:[path stringByDeletingLastPathComponent] file:@"New Memory Card File.mcr"] == NSOKButton) { + strcpy(mcd, (const char *)[[openDlg filename] fileSystemRepresentation]); + + [label setTitleWithMnemonic:[NSString stringWithCString:mcd]]; + + if (tag == 1) + [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithCString:mcd] forKey:@"Mcd1"]; + else + [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithCString:mcd] forKey:@"Mcd2"]; + + CreateMcd(mcd); + } +} + +- (IBAction)setVideoType:(id)sender +{ + int tag = [[sender selectedItem] tag]; + + if (3 == tag) { + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"AutoDetectVideoType"]; + } else if (1 == tag || 2 == tag) { + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"AutoDetectVideoType"]; + [[NSUserDefaults standardUserDefaults] setBool:tag==2 forKey:@"VideoTypePAL"]; + } else { + return; + } + [PcsxController setConfigFromDefaults]; + + if ([sender pullsDown]) { + NSArray *items = [sender itemArray]; + int i; + + for (i=0; i<[items count]; i++) + [[items objectAtIndex:i] setState:NSOffState]; + + [[sender selectedItem] setState:NSOnState]; + } +} + +- (void)awakeFromNib +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + [[self window] center]; + + // setup checkboxes + checkBoxDefaults = [[NSMutableDictionary alloc] init]; + + // check that the outlets are active before adding them + if (noXaAudioCell) [checkBoxDefaults setObject:noXaAudioCell forKey:@"NoXaAudio"]; + if (sioIrqAlwaysCell) [checkBoxDefaults setObject:sioIrqAlwaysCell forKey:@"SioIrqAlways"]; + if (bwMdecCell) [checkBoxDefaults setObject:bwMdecCell forKey:@"BlackAndWhiteMDECVideo"]; + if (autoVTypeCell) [checkBoxDefaults setObject:autoVTypeCell forKey:@"AutoDetectVideoType"]; + if (vTypePALCell) [checkBoxDefaults setObject:vTypePALCell forKey:@"VideoTypePAL"]; + if (noCDAudioCell) [checkBoxDefaults setObject:noCDAudioCell forKey:@"NoCDAudio"]; + if (usesHleCell) [checkBoxDefaults setObject:usesHleCell forKey:@"UseHLE"]; + if (usesDynarecCell) [checkBoxDefaults setObject:usesDynarecCell forKey:@"NoDynarec"]; + if (consoleOutputCell) [checkBoxDefaults setObject:consoleOutputCell forKey:@"ConsoleOutput"]; + if (spuIrqAlwaysCell) [checkBoxDefaults setObject:spuIrqAlwaysCell forKey:@"SpuIrqAlways"]; + if (rCountFixCell) [checkBoxDefaults setObject:rCountFixCell forKey:@"RootCounterFix"]; + if (vSyncWAFixCell) [checkBoxDefaults setObject:vSyncWAFixCell forKey:@"VideoSyncWAFix"]; + if (noFastBootCell) [checkBoxDefaults setObject:noFastBootCell forKey:@"NoFastBoot"]; + + // make the visuals match the defaults + NSEnumerator *enumerator= [checkBoxDefaults keyEnumerator]; + id key; + while ((key = [enumerator nextObject])) { + if ([defaults integerForKey:key]) { + [[checkBoxDefaults objectForKey:key] setNextState]; + } + } + + // special cases + if (![PcsxController biosAvailable]) { + // no bios means always use HLE + [usesHleCell setState:NSOnState]; + [usesHleCell setEnabled:NO]; + } + + // setup labels + [mcd1Label setTitleWithMnemonic:[NSString stringWithCString:Config.Mcd1]]; + [mcd2Label setTitleWithMnemonic:[NSString stringWithCString:Config.Mcd2]]; + + int tag = [defaults integerForKey:@"AutoDetectVideoType"]; + if (tag) + tag = 3; + else { + tag = [defaults integerForKey:@"VideoTypePAL"]+1; + } + [vTypePALCell setAutoenablesItems:NO]; + if ([vTypePALCell pullsDown]) { + [[vTypePALCell itemAtIndex:[vTypePALCell indexOfItemWithTag:tag]] setState:NSOnState]; + } else { + [vTypePALCell selectItemAtIndex:[vTypePALCell indexOfItemWithTag:tag]]; + } + + // setup plugin lists + PluginList *list = [PluginList list]; + + [list refreshPlugins]; + [graphicsPlugin setPluginsTo:[list pluginsForType:PSE_LT_GPU] withType: PSE_LT_GPU]; + [soundPlugin setPluginsTo:[list pluginsForType:PSE_LT_SPU] withType: PSE_LT_SPU]; + [padPlugin setPluginsTo:[list pluginsForType:PSE_LT_PAD] withType: PSE_LT_PAD]; + [cdromPlugin setPluginsTo:[list pluginsForType:PSE_LT_CDR] withType: PSE_LT_CDR]; +} + +- (void)dealloc +{ + [checkBoxDefaults release]; + [super dealloc]; +} + +- (NSString *)keyForSender:(id)sender +{ + NSEnumerator *enumerator= [checkBoxDefaults keyEnumerator]; + id key; + while ((key = [enumerator nextObject])) { + id object = [checkBoxDefaults objectForKey:key]; + if ([object isEqual:sender]) + return key; + } + + return nil; +} + +@end diff --git a/macosx/EmuThread.h b/macosx/EmuThread.h new file mode 100644 index 00000000..21b031fb --- /dev/null +++ b/macosx/EmuThread.h @@ -0,0 +1,40 @@ +// +// EmuThread.h +// Pcsx +// +// Created by Gil Pedersen on Sun Sep 21 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import +#include + +@interface EmuThread : NSObject { + NSAutoreleasePool *pool; + jmp_buf restartJmp; + BOOL wasPaused; +} + +- (void)EmuThreadRun:(id)anObject; +- (void)EmuThreadRunBios:(id)anObject; +- (void)handleEvents; + ++ (void)run; ++ (void)runBios; ++ (void)stop; ++ (BOOL)pause; ++ (BOOL)pauseSafe; ++ (void)resume; ++ (void)resetNow; ++ (void)reset; + ++ (BOOL)isPaused; ++ (BOOL)active; ++ (BOOL)isRunBios; + ++ (void)freezeAt:(NSString *)path which:(int)num; ++ (BOOL)defrostAt:(NSString *)path; + +@end + +extern EmuThread *emuThread; diff --git a/macosx/EmuThread.m b/macosx/EmuThread.m new file mode 100644 index 00000000..941d77da --- /dev/null +++ b/macosx/EmuThread.m @@ -0,0 +1,398 @@ +// +// EmuThread.m +// Pcsx +// +// Created by Gil Pedersen on Sun Sep 21 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import +#import +#include +#include +#import "EmuThread.h" +#include "psxcommon.h" +#include "plugins.h" +#include "misc.h" + +EmuThread *emuThread; +NSString *defrostPath = nil; +static int safeEvent; +static int paused; +static int runbios; + +static pthread_cond_t eventCond; +static pthread_mutex_t eventMutex; + +#define EMUEVENT_NONE 0 +#define EMUEVENT_PAUSE (1<<0) +#define EMUEVENT_RESET (1<<1) +#define EMUEVENT_STOP (1<<2) + +@implementation EmuThread + +- (void)EmuThreadRun:(id)anObject +{ + pool = [[NSAutoreleasePool alloc] init]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(emuWindowDidClose:) + name:@"emuWindowDidClose" object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(emuWindowWantPause:) + name:@"emuWindowWantPause" object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(emuWindowWantResume:) + name:@"emuWindowWantResume" object:nil]; + + // we shouldn't change the priority, since we might depend on subthreads + //[NSThread setThreadPriority:1.0-((1.0-[NSThread threadPriority])/4.0)]; + + // Do processing here + if (OpenPlugins() == -1) + goto done; + + setjmp(restartJmp); + + EmuReset(); + + int res = CheckCdrom(); + if (res == -1) { + ClosePlugins(); + SysMessage(_("Could not check CD-ROM!\n")); + goto done; + } + + LoadCdrom(); + + if (defrostPath) { + LoadState([defrostPath fileSystemRepresentation]); + [defrostPath release]; defrostPath = nil; + } + + psxCpu->Execute(); + +done: + [pool release]; pool = nil; + emuThread = nil; + + return; +} + +- (void)EmuThreadRunBios:(id)anObject +{ + pool = [[NSAutoreleasePool alloc] init]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(emuWindowDidClose:) + name:@"emuWindowDidClose" object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(emuWindowWantPause:) + name:@"emuWindowWantPause" object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(emuWindowWantResume:) + name:@"emuWindowWantResume" object:nil]; + + // we shouldn't change the priority, since we might depend on subthreads + //[NSThread setThreadPriority:1.0-((1.0-[NSThread threadPriority])/4.0)]; + + // Do processing here + if (OpenPlugins() == -1) + goto done; + + EmuReset(); + + psxCpu->Execute(); + +done: + [pool release]; pool = nil; + emuThread = nil; + + return; +} + +- (void)dealloc +{ + // remove all registered observers + [[NSNotificationCenter defaultCenter] removeObserver:self name:nil object:nil]; + + if (pool) + [pool release]; + + [super dealloc]; +} + +- (void)emuWindowDidClose:(NSNotification *)aNotification +{ + [EmuThread stop]; +} + +- (void)emuWindowWantPause:(NSNotification *)aNotification +{ + wasPaused = [EmuThread pause]; +} + +- (void)emuWindowWantResume:(NSNotification *)aNotification +{ + if (!wasPaused) { + [EmuThread resume]; + } + wasPaused = NO; +} + +/* called periodically from the emulation thread */ +- (void)handleEvents +{ + /* only do a trylock here, since we're not interested in blocking, + and we can just handle events next time round */ + if (pthread_mutex_trylock(&eventMutex) == 0) { + while (safeEvent) { + if (safeEvent & EMUEVENT_STOP) { + /* signify that the emulation has stopped */ + [emuThread autorelease]; + emuThread = nil; + paused = NO; + + /* better unlock the mutex before killing ourself */ + pthread_mutex_unlock(&eventMutex); + + ClosePlugins(); + SysClose(); + + //[[NSThread currentThread] autorelease]; + [NSThread exit]; + return; + } + + if (safeEvent & EMUEVENT_RESET) { +#if 0 + /* signify that the emulation has stopped */ + [emuThread autorelease]; + emuThread = nil; + + /* better unlock the mutex before killing ourself */ + pthread_mutex_unlock(&eventMutex); + + ClosePlugins(); + + // start a new emulation thread + [EmuThread run]; + + //[[NSThread currentThread] autorelease]; + [NSThread exit]; + return; +#else + safeEvent &= ~EMUEVENT_RESET; + pthread_mutex_unlock(&eventMutex); + + longjmp(restartJmp, 0); +#endif + } + + if (safeEvent & EMUEVENT_PAUSE) { + paused = 2; + /* wait until we're signalled */ + pthread_cond_wait(&eventCond, &eventMutex); + } + } + pthread_mutex_unlock(&eventMutex); + } +} + ++ (void)run +{ + int err; + + if (emuThread) { + [EmuThread resume]; + return; + } + + if (pthread_mutex_lock(&eventMutex) != 0) { + err = pthread_cond_init(&eventCond, NULL); + if (err) return; + + err = pthread_mutex_init(&eventMutex, NULL); + if (err) return; + + pthread_mutex_lock(&eventMutex); + } + + safeEvent = EMUEVENT_NONE; + paused = NO; + runbios = NO; + + if (SysInit() != 0) { + pthread_mutex_unlock(&eventMutex); + return; + } + + emuThread = [[EmuThread alloc] init]; + + [NSThread detachNewThreadSelector:@selector(EmuThreadRun:) + toTarget:emuThread withObject:nil]; + + pthread_mutex_unlock(&eventMutex); +} + ++ (void)runBios +{ + int err; + + if (emuThread) { + [EmuThread resume]; + return; + } + + if (pthread_mutex_lock(&eventMutex) != 0) { + err = pthread_cond_init(&eventCond, NULL); + if (err) return; + + err = pthread_mutex_init(&eventMutex, NULL); + if (err) return; + + pthread_mutex_lock(&eventMutex); + } + + safeEvent = EMUEVENT_NONE; + paused = NO; + runbios = YES; + + if (SysInit() != 0) { + pthread_mutex_unlock(&eventMutex); + return; + } + + emuThread = [[EmuThread alloc] init]; + + [NSThread detachNewThreadSelector:@selector(EmuThreadRunBios:) + toTarget:emuThread withObject:nil]; + + pthread_mutex_unlock(&eventMutex); +} + ++ (void)stop +{ + pthread_mutex_lock(&eventMutex); + safeEvent = EMUEVENT_STOP; + pthread_mutex_unlock(&eventMutex); + + // wake it if it's sleeping + pthread_cond_broadcast(&eventCond); +} + ++ (BOOL)pause +{ + if (paused || ![EmuThread active]) + return YES; + + pthread_mutex_lock(&eventMutex); + safeEvent |= EMUEVENT_PAUSE; + paused = 1; + pthread_mutex_unlock(&eventMutex); + + pthread_cond_broadcast(&eventCond); + + return NO; +} + ++ (BOOL)pauseSafe +{ + if ((paused == 2) || ![EmuThread active]) + return YES; + + [EmuThread pause]; + while ([EmuThread isPaused] != 2) [NSThread sleepUntilDate:[[NSDate date] addTimeInterval:0.05]]; + + return NO; +} + ++ (void)resume +{ + if (!paused || ![EmuThread active]) + return; + + pthread_mutex_lock(&eventMutex); + + safeEvent &= ~EMUEVENT_PAUSE; + paused = NO; + pthread_mutex_unlock(&eventMutex); + + pthread_cond_broadcast(&eventCond); +} + ++ (void)reset +{ + pthread_mutex_lock(&eventMutex); + safeEvent = EMUEVENT_RESET; + pthread_mutex_unlock(&eventMutex); + + pthread_cond_broadcast(&eventCond); +} + +// must only be called from within the emulation thread!!! ++ (void)resetNow +{ + /* signify that the emulation has stopped */ + [emuThread autorelease]; + emuThread = nil; + + ClosePlugins(); + + // start a new emulation thread + [EmuThread run]; + + //[[NSThread currentThread] autorelease]; + [NSThread exit]; + return; +} + ++ (BOOL)isPaused +{ + return paused; +} + ++ (BOOL)isRunBios +{ + return runbios; +} + ++ (BOOL)active +{ + return emuThread ? YES : NO; +} + ++ (void)freezeAt:(NSString *)path which:(int)num +{ + BOOL emuWasPaused = [EmuThread pauseSafe]; + char Text[256]; + + GPU_freeze(2, (GPUFreeze_t *)&num); + int ret = SaveState([path fileSystemRepresentation]); + if (ret == 0) sprintf (Text, _("*PCSX*: Saved State %d"), num+1); + else sprintf (Text, _("*PCSX*: Error Saving State %d"), num+1); + GPU_displayText(Text); + + if (!emuWasPaused) { + [EmuThread resume]; + } +} + ++ (BOOL)defrostAt:(NSString *)path +{ + const char *cPath = [path fileSystemRepresentation]; + if (CheckState(cPath) != 0) + return NO; + + defrostPath = [path retain]; + [EmuThread reset]; + + GPU_displayText(_("*PCSX*: Loaded State")); + return YES; +} + +@end diff --git a/macosx/English.lproj/AddPluginSheet.nib/classes.nib b/macosx/English.lproj/AddPluginSheet.nib/classes.nib new file mode 100644 index 00000000..ae53771c --- /dev/null +++ b/macosx/English.lproj/AddPluginSheet.nib/classes.nib @@ -0,0 +1,14 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {closeAddPluginSheet = id; }; + CLASS = PcsxPluginDocument; + LANGUAGE = ObjC; + OUTLETS = {addPluginSheet = NSWindow; pluginName = NSTextField; }; + SUPERCLASS = NSDocument; + }, + {CLASS = "java.lang.Object"; LANGUAGE = Java; } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/macosx/English.lproj/AddPluginSheet.nib/info.nib b/macosx/English.lproj/AddPluginSheet.nib/info.nib new file mode 100644 index 00000000..3af05e0c --- /dev/null +++ b/macosx/English.lproj/AddPluginSheet.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 69 10 356 240 0 0 1024 746 + IBFramework Version + 364.0 + IBOpenObjects + + 10 + + IBSystem Version + 7H63 + + diff --git a/macosx/English.lproj/AddPluginSheet.nib/keyedobjects.nib b/macosx/English.lproj/AddPluginSheet.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..60ed72e05bf4f588cc1a04f75f0e8b77123608bc GIT binary patch literal 5605 zcmbVQdw5jUwO{MZ`+d%Y_j7>ALqbRd*P_B*=bXs{E`N3A`{taz*IsL{ z=Wnk)HIZN-7Een%4G0{lKn)tuf)0$8$=;~1F0fLJRwUC;ED#QrCdb2(isW$3J)$oj z^YFGJ_dKy#^yefN+5tE2{1EhDs4mP+RhId^aWBLD{1z~Q8OFmzNP{ex0y7{N3Sc2r zKm-~f3NdJedtn1?g@>UNo`L=FJp2Y;h6C^lybiyEWAF}~g!kZm_#<3^&){?T3w!}z z!hgXf_!nG-|Ap`12Lx219t|j<9s6QGbl?aaiKB5Wj>i;C#dMs6lhK7Ua3<`>Je-XM zScrGwLUdypmSZI@#VWiTz34+fintsDxB|o2fH7>uCTzylcrUi%T4dOU8}NR703X6F z_%J?-+c5*5#Ha9S+=;uf9rs`dK7$AGH9Ul`!zp|N-^9bH!ME@T{toWkv2q;c&c?7{pca;(*`7^F{8mKrB!b6w3o4f4E8FNJy7Y&F}=R-Ga*q`(A7CHrJH z$zY~tDi3cj@x@k^1RHAuq5QC~v0e5n7a5)!i$?>YS~9#aH!ti9d%G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ss z59%K^8jV$xq)FCH)Z}OiHS;tJG{u?}0qu5er}h=?+uC=u?`ltKf3H2GJ*)jhdqI0q z`=$18+G{%0>2-pxpKgF|kZy=>oX)As*3Hlr>lW(Vx@w(ASEq~Vm~N|Xhi;E|})_e3D^pEIw=%3O*t>2|@*LUbU_51aQ^l#`7 z>yPM<>W}G<>%Y)nHdqX)h8n{PLz`iz;eg?+;WNV}!#9TS4L=%g7}2OTCK*Q>lZ~T| zV~uIXDaJhGUB+r-gK@R7&G@kKNn?lcdE+7DIpd#<=ZzPP7me3UgH2;hQ%%!NGfg?B zJkxB`Qd7_rGDS=qOxsMmO#4g+O~*|qOz)ZAH+^6_WjbfNV!C10nUltO3ptJ9ik&9ct7R$8m94c3^o)wr=+B$6qY_Hmm*xt8YuwArW zvi;lkJ#XX(Q<;qAUHnvjI`8JIcpu-wZ{{E8JNdo*3;fIcoBRj-IsOv=F98HjPzzc? zFBk>0U={ic!-Z5KTbLot5lVz=VYv_%Rtf8bPGP@rS~w$|6+RI@75*%ICVVb@A$%!Z z68 + + + + IBDocumentLocation + 187 160 486 240 0 0 1024 746 + IBFramework Version + 446.1 + IBLockedObjects + + IBLockedTabItems + + 240 + + IBOpenObjects + + 21 + + IBSystem Version + 8P2137 + + diff --git a/macosx/English.lproj/Configuration.nib/objects.nib b/macosx/English.lproj/Configuration.nib/objects.nib new file mode 100644 index 0000000000000000000000000000000000000000..711038878ad58e36dc5122557297d07f60cd7ee5 GIT binary patch literal 15263 zcmeHO4{%h~xj$#~kB|fd7E`L&iwcTWY$8&cYDriSQYAz-RH@^%o86ma%Vsy-Km2*V zY7gAq*7xeGuH-)QESO;!^&vc>BoIQWO?|k1m-}jw!zVqjnR>c!B-QSZ~+p7n~P>I2t48xev>T8+5wBx&a zAhE!o@Qc@(VT^0_sS=jTC=_opo{09S!kHTkPZL!InlBLxMY{L~gMX>c8;x{^x{@(} zA{31vlZZvbVLg^kr41gs&P0WpR$sfnG9rZB&f&O25MPlj$rBLjIlYB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E#l?I?v$?Rib){%Q`T#C55P7+n;jzjf zOiN7R;>UP%3 Jqx4DJ{{j7<^J)M9 literal 0 HcmV?d00001 diff --git a/macosx/English.lproj/Credits.rtf b/macosx/English.lproj/Credits.rtf new file mode 100644 index 00000000..a7870f8a --- /dev/null +++ b/macosx/English.lproj/Credits.rtf @@ -0,0 +1,28 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\b\fs24 \cf0 Macintosh Port: +\f1\b0 \ + Gil Pedersen\ +\ + +\f0\b Icon Design: +\f1\b0 \ + Romain Lafourcade\ +\ + +\f0\b Original Coders: +\f1\b0 \ + Linuzappz\ + Shadow\ + Pete Bernert\ + NoComp\ + Nik3d\ +\ + +\f0\b Macintosh Testing: +\f1\b0 \ + Richard Banister\ + Many others} \ No newline at end of file diff --git a/macosx/English.lproj/InfoPlist.strings b/macosx/English.lproj/InfoPlist.strings new file mode 100644 index 00000000..4c55ed90 --- /dev/null +++ b/macosx/English.lproj/InfoPlist.strings @@ -0,0 +1,6 @@ +/* Localized versions of Info.plist keys */ + +CFBundleName = "PCSX"; +CFBundleShortVersionString = "PCSX-Reloaded"; +CFBundleGetInfoString = "Playstation Emulator based on PCSX-df Project."; +NSHumanReadableCopyright = "Copyright (c) 2003-2005 PCSX Team, Gil Pedersen.\nCopyright (c) 2009-2010 PCSX-Reloaded Team."; diff --git a/macosx/English.lproj/PCSX.nib/classes.nib b/macosx/English.lproj/PCSX.nib/classes.nib new file mode 100644 index 00000000..4b25fcc2 --- /dev/null +++ b/macosx/English.lproj/PCSX.nib/classes.nib @@ -0,0 +1,25 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = { + defrost = id; + ejectCD = id; + freeze = id; + fullscreen = id; + pause = id; + preferences = id; + reset = id; + runBios = id; + runCD = id; + runExe = id; + runIso = id; + }; + CLASS = PcsxController; + LANGUAGE = ObjC; + OUTLETS = {memCardWindow = NSWindow; preferenceWindow = NSWindow; }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/macosx/English.lproj/PCSX.nib/info.nib b/macosx/English.lproj/PCSX.nib/info.nib new file mode 100644 index 00000000..a5d6a496 --- /dev/null +++ b/macosx/English.lproj/PCSX.nib/info.nib @@ -0,0 +1,21 @@ + + + + + IBDocumentLocation + 442 353 492 320 0 0 1024 746 + IBEditorPositions + + 29 + 134 613 219 44 0 0 1024 746 + + IBFramework Version + 446.1 + IBOpenObjects + + 29 + + IBSystem Version + 8P2137 + + diff --git a/macosx/English.lproj/PCSX.nib/objects.nib b/macosx/English.lproj/PCSX.nib/objects.nib new file mode 100644 index 0000000000000000000000000000000000000000..cd38d74a07d5a198fba64cb6b3eefc597f6e36b6 GIT binary patch literal 3850 zcmb7HZ)hCH72mP%u|=( zu>UBw9T`zQi!xjGAgNN(G76q?@0`6MDO?ezTBfE?k~y0^-8P~QOi$;vY{t?I-I;Z4 zq8;D}YaLOCsa{H3w7~whVNOJB@l5P9WzG(1$z&2gYHvYf$;yo9sUNjc2@Pp^>fjo( z^w$PVGxILOH{s{x>s+<1Z2z_F+HDvpofgrO{TfEBR9apu>50@~2VaTl995L9%F(5z zrQa#D7;@`~>SgsBEgB^=OZU!k1Y+EDAv1|ztyBafWS*L$*|!TB^KHkOwg18Yi7V(V zR))2AXil{<7R4nL3;&&RRnj>o2t)*d!StvqDU8=q`1|a?R$K)CW5`cQqLbpB3{q{t ziNN8pOsOb2lIcf?dh+2BBd>@OSXPTZIH;tM${Rj~nFpg~Vvj%}He^!z9!+?HuBB|Z z7fa&>6n!8o3anqsZNLA%@^AZCH7qn=keausdBaNdO2vB{h!KC2*1-EDysrVip*ei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v#NcsIpxIwr_**4)~h25}0B?A+U?xS0KcmA#juZSAipJ zFM(gP{RBEys2zf?Nx09r0;gD%z&wF8+eY9Z`=bH_EJENs>mhK4wG+6;o+NOUeUE_3 zen{X}Ka8_O1n#lFD6qgDBk(h}o51s|tU!Dx{DSQx@a&WD4Lhp9CH7+iU$Q?baEMhD zP}m<7IL)3VaD%--;2i5B(ES$NWsU-8*$x6Jwwb^Q)<@uV_A~+aNR_=rs!AD;^ValW R%E%g-Av05;GluvT_dhJYlE(l5 literal 0 HcmV?d00001 diff --git a/macosx/ExtendedKeys.h b/macosx/ExtendedKeys.h new file mode 100644 index 00000000..1b6475b8 --- /dev/null +++ b/macosx/ExtendedKeys.h @@ -0,0 +1,23 @@ + +#ifndef __EXTENDED_KEYS_H__ +#define __EXTENDED_KEYS_H__ + +enum { + PSX_FREEZE_KEY = 0xFFBE/*XK_F1*/, + PSX_NEXT_FREEZE_SLOT_KEY = 0xFFBF/*XK_F2*/, + PSX_DEFROST_KEY = 0xFFC0/*XK_F3*/, + PSX_SHOW_FREEZE_PIC_KEY = 0xFFC1/*XK_F4*/, + PSX_SIO_ALWAYS_ON_KEY = 0xFFC2/*XK_F5*/, + PSX_BW_MDEC_KEY = 0xFFC3/*XK_F6*/, + PSX_XA_AUDIO_ON_KEY = 0xFFC4/*XK_F7*/, + PSX_SNAPSHOT_KEY = 0xFFC5/*XK_F8*/, + PSX_OPEN_SHELL_KEY = 0xFFC6/*XK_F9*/, + PSX_CLOSE_SHELL_KEY = 0xFFC7/*XK_F10*/, + + PSX_STOP_KEY = 0xFF1B/*XK_Escape*/, + + GPU_FULLSCREEN_KEY = 0x0100, + GPU_FPS_DISPLAY_KEY = 0xFFFF/*XK_Delete*/ +}; + +#endif //__EXTENDED_KEYS_H__ diff --git a/macosx/Info.plist b/macosx/Info.plist new file mode 100644 index 00000000..9aa3f68f --- /dev/null +++ b/macosx/Info.plist @@ -0,0 +1,107 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + psxplugin + + CFBundleTypeIconFile + psxplugin.icns + CFBundleTypeName + Playstation Emulator Plug-in + CFBundleTypeOSTypes + + PsxP + + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSDocumentClass + PcsxPluginDocument + + + CFBundleTypeExtensions + + bin + + CFBundleTypeIconFile + psxbios.icns + CFBundleTypeName + Playstation BIOS Image + CFBundleTypeOSTypes + + PsxB + + CFBundleTypeRole + Viewer + LSTypeIsPackage + + + + CFBundleTypeExtensions + + mcr + + CFBundleTypeIconFile + pcsxmemcard + CFBundleTypeName + PCSX Memory Card + CFBundleTypeOSTypes + + Pmcr + + CFBundleTypeRole + Viewer + LSTypeIsPackage + + + + CFBundleTypeExtensions + + pcsxstate + + CFBundleTypeIconFile + pcsxfreeze + CFBundleTypeName + PCSX Freeze State + CFBundleTypeOSTypes + + Pfrz + + CFBundleTypeRole + Viewer + LSTypeIsPackage + + + + CFBundleExecutable + PCSX + CFBundleIconFile + PCSX.icns + CFBundleIdentifier + com.codeplex.pcsxr + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + PCSX + CFBundlePackageType + APPL + CFBundleShortVersionString + PCSX-Reloaded 1.9.92 + CFBundleSignature + Pcsx + CFBundleVersion + 1.9.92 + NSMainNibFile + PCSX.nib + NSPrincipalClass + NSApplication + + diff --git a/macosx/Pcsx.xcodeproj/project.pbxproj b/macosx/Pcsx.xcodeproj/project.pbxproj new file mode 100644 index 00000000..0d173742 --- /dev/null +++ b/macosx/Pcsx.xcodeproj/project.pbxproj @@ -0,0 +1,934 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 2B143D06078A2CBD00AF745A /* PCSX.icns in Resources */ = {isa = PBXBuildFile; fileRef = 2B143D01078A2CBD00AF745A /* PCSX.icns */; }; + 2B143D07078A2CBD00AF745A /* pcsxfreeze.icns in Resources */ = {isa = PBXBuildFile; fileRef = 2B143D02078A2CBD00AF745A /* pcsxfreeze.icns */; }; + 2B143D08078A2CBD00AF745A /* pcsxmemcard.icns in Resources */ = {isa = PBXBuildFile; fileRef = 2B143D03078A2CBD00AF745A /* pcsxmemcard.icns */; }; + 2B143D09078A2CBD00AF745A /* psxbios.icns in Resources */ = {isa = PBXBuildFile; fileRef = 2B143D04078A2CBD00AF745A /* psxbios.icns */; }; + 2B143D0A078A2CBD00AF745A /* psxplugin.icns in Resources */ = {isa = PBXBuildFile; fileRef = 2B143D05078A2CBD00AF745A /* psxplugin.icns */; }; + 2B3E356C06937D1C00763C7D /* PcsxPluginDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B3E356A06937D1C00763C7D /* PcsxPluginDocument.h */; }; + 2B3E356D06937D1C00763C7D /* PcsxPluginDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B3E356B06937D1C00763C7D /* PcsxPluginDocument.m */; }; + 2B3E35BC069384D100763C7D /* AddPluginSheet.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2B3E35BA069384D100763C7D /* AddPluginSheet.nib */; }; + 2B400D910789F58A00BA271E /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B02C04304E145D000880C5B /* Carbon.framework */; }; + 2B4DE99105FF9307003EFEF0 /* PluginController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B4DE98D05FF9307003EFEF0 /* PluginController.h */; }; + 2B4DE99205FF9307003EFEF0 /* PluginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4DE98E05FF9307003EFEF0 /* PluginController.m */; }; + 2BB3D69D05427FE200831ACB /* PcsxController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B75FD3C051C56D200D12034 /* PcsxController.h */; }; + 2BB3D69E05427FE200831ACB /* ConfigurationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B75FD4A051C8A7400D12034 /* ConfigurationController.h */; }; + 2BB3D69F05427FE200831ACB /* PluginList.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BBB1126051DC00500B84448 /* PluginList.h */; }; + 2BB3D6A005427FE200831ACB /* EmuThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BBB1791051E113B00B84448 /* EmuThread.h */; }; + 2BB3D6A105427FE200831ACB /* PcsxPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BA44360052DB2EA00E21DDD /* PcsxPlugin.h */; }; + 2BB3D6A305427FE200831ACB /* Configuration.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2BA178B00514CE260026D74D /* Configuration.nib */; }; + 2BB3D6A405427FE200831ACB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2BA178B20514CE260026D74D /* InfoPlist.strings */; }; + 2BB3D6A505427FE200831ACB /* PCSX.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2BA178B40514CE260026D74D /* PCSX.nib */; }; + 2BB3D6A705427FE200831ACB /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2BBB1786051E0D9700B84448 /* Credits.rtf */; }; + 2BB3D6BE05427FE200831ACB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BA178A505148D9D0026D74D /* main.m */; }; + 2BB3D6BF05427FE200831ACB /* PcsxController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B75FD3D051C56D200D12034 /* PcsxController.m */; }; + 2BB3D6C005427FE200831ACB /* ConfigurationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B75FD4B051C8A7400D12034 /* ConfigurationController.m */; }; + 2BB3D6C105427FE200831ACB /* PluginList.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BBB1127051DC00500B84448 /* PluginList.m */; }; + 2BB3D6C205427FE200831ACB /* EmuThread.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BBB1792051E113B00B84448 /* EmuThread.m */; }; + 2BB3D6C305427FE200831ACB /* Plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 2BBB17DA051E4D0F00B84448 /* Plugin.c */; }; + 2BB3D6C405427FE200831ACB /* PcsxPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BA44361052DB2EA00E21DDD /* PcsxPlugin.m */; }; + 2BB3D6C605427FE200831ACB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BC4786204C7FD3600CAB520 /* Cocoa.framework */; }; + 2BB3D6C705427FE200831ACB /* System.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B6E8AAE04C832040017A3B1 /* System.framework */; }; + 2BB3D6C805427FE200831ACB /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B6E8AB404C8327C0017A3B1 /* IOKit.framework */; }; + 712FD1E81093096F00575A92 /* debug.c in Sources */ = {isa = PBXBuildFile; fileRef = 712FD1E51093096F00575A92 /* debug.c */; }; + 712FD1E91093096F00575A92 /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 712FD1E61093096F00575A92 /* socket.c */; }; + 712FD1EA1093096F00575A92 /* socket.h in Headers */ = {isa = PBXBuildFile; fileRef = 712FD1E71093096F00575A92 /* socket.h */; }; + 713B530E110B75650002F164 /* ppf.c in Sources */ = {isa = PBXBuildFile; fileRef = 713B530C110B75650002F164 /* ppf.c */; }; + 713B530F110B75650002F164 /* ppf.h in Headers */ = {isa = PBXBuildFile; fileRef = 713B530D110B75650002F164 /* ppf.h */; }; + 713CB2E411FC49DA0033B6A8 /* DFCdrom.psxplugin in Copy PlugIns */ = {isa = PBXBuildFile; fileRef = 71F93F6C11FB8E9D007A5A7C /* DFCdrom.psxplugin */; }; + 7161C2820FDED6D000225F97 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 7161C2810FDED6D000225F97 /* config.h */; }; + 7161C2980FDED75300225F97 /* ExtendedKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = 7161C2970FDED75300225F97 /* ExtendedKeys.h */; }; + 719594B111AEFE8C004AD686 /* gte_divider.h in Headers */ = {isa = PBXBuildFile; fileRef = 719594AF11AEFE8C004AD686 /* gte_divider.h */; }; + 719594B211AEFE8C004AD686 /* psxcommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 719594B011AEFE8C004AD686 /* psxcommon.c */; }; + 71AD2DF410C3575300365243 /* PeopsSPU.psxplugin in Copy PlugIns */ = {isa = PBXBuildFile; fileRef = 71AD2DD110C356FD00365243 /* PeopsSPU.psxplugin */; }; + 71AD2DF510C3575C00365243 /* PeopsSoftGL.psxplugin in Copy PlugIns */ = {isa = PBXBuildFile; fileRef = 71AD2DDC10C3570900365243 /* PeopsSoftGL.psxplugin */; }; + 71F2C0881200B6B000322AD9 /* DFInput.psxplugin in Copy PlugIns */ = {isa = PBXBuildFile; fileRef = 71F2C0861200B69B00322AD9 /* DFInput.psxplugin */; }; + 71F4C5890FDED12800529849 /* cdriso.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5600FDED12800529849 /* cdriso.c */; }; + 71F4C58A0FDED12800529849 /* cdriso.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5610FDED12800529849 /* cdriso.h */; }; + 71F4C58B0FDED12800529849 /* cdrom.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5620FDED12800529849 /* cdrom.c */; }; + 71F4C58C0FDED12800529849 /* cdrom.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5630FDED12800529849 /* cdrom.h */; }; + 71F4C58D0FDED12800529849 /* cheat.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5640FDED12800529849 /* cheat.c */; }; + 71F4C58E0FDED12800529849 /* cheat.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5650FDED12800529849 /* cheat.h */; }; + 71F4C58F0FDED12800529849 /* coff.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5660FDED12800529849 /* coff.h */; }; + 71F4C5900FDED12800529849 /* debug.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5670FDED12800529849 /* debug.h */; }; + 71F4C5910FDED12800529849 /* decode_xa.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5680FDED12800529849 /* decode_xa.c */; }; + 71F4C5920FDED12800529849 /* decode_xa.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5690FDED12800529849 /* decode_xa.h */; }; + 71F4C5930FDED12800529849 /* disr3000a.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C56A0FDED12800529849 /* disr3000a.c */; }; + 71F4C5940FDED12800529849 /* gte.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C56B0FDED12800529849 /* gte.c */; }; + 71F4C5950FDED12800529849 /* gte.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C56C0FDED12800529849 /* gte.h */; }; + 71F4C5960FDED12800529849 /* mdec.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C56D0FDED12800529849 /* mdec.c */; }; + 71F4C5970FDED12800529849 /* mdec.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C56E0FDED12800529849 /* mdec.h */; }; + 71F4C5980FDED12800529849 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C56F0FDED12800529849 /* misc.c */; }; + 71F4C5990FDED12800529849 /* misc.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5700FDED12800529849 /* misc.h */; }; + 71F4C59A0FDED12800529849 /* plugins.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5710FDED12800529849 /* plugins.c */; }; + 71F4C59B0FDED12800529849 /* plugins.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5720FDED12800529849 /* plugins.h */; }; + 71F4C59C0FDED12800529849 /* psemu_plugin_defs.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5730FDED12800529849 /* psemu_plugin_defs.h */; }; + 71F4C59D0FDED12800529849 /* psxbios.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5740FDED12800529849 /* psxbios.c */; }; + 71F4C59E0FDED12800529849 /* psxbios.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5750FDED12800529849 /* psxbios.h */; }; + 71F4C59F0FDED12800529849 /* psxcommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5760FDED12800529849 /* psxcommon.h */; }; + 71F4C5A00FDED12800529849 /* psxcounters.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5770FDED12800529849 /* psxcounters.c */; }; + 71F4C5A10FDED12800529849 /* psxcounters.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5780FDED12800529849 /* psxcounters.h */; }; + 71F4C5A20FDED12800529849 /* psxdma.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5790FDED12800529849 /* psxdma.c */; }; + 71F4C5A30FDED12800529849 /* psxdma.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C57A0FDED12800529849 /* psxdma.h */; }; + 71F4C5A40FDED12800529849 /* psxhle.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C57B0FDED12800529849 /* psxhle.c */; }; + 71F4C5A50FDED12800529849 /* psxhle.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C57C0FDED12800529849 /* psxhle.h */; }; + 71F4C5A60FDED12800529849 /* psxhw.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C57D0FDED12800529849 /* psxhw.c */; }; + 71F4C5A70FDED12800529849 /* psxhw.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C57E0FDED12800529849 /* psxhw.h */; }; + 71F4C5A80FDED12800529849 /* psxinterpreter.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C57F0FDED12800529849 /* psxinterpreter.c */; }; + 71F4C5A90FDED12800529849 /* psxmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5800FDED12800529849 /* psxmem.c */; }; + 71F4C5AA0FDED12800529849 /* psxmem.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5810FDED12800529849 /* psxmem.h */; }; + 71F4C5AB0FDED12800529849 /* r3000a.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5820FDED12800529849 /* r3000a.c */; }; + 71F4C5AC0FDED12800529849 /* r3000a.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5830FDED12800529849 /* r3000a.h */; }; + 71F4C5AD0FDED12800529849 /* sio.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5840FDED12800529849 /* sio.c */; }; + 71F4C5AE0FDED12800529849 /* sio.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5850FDED12800529849 /* sio.h */; }; + 71F4C5AF0FDED12800529849 /* spu.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5860FDED12800529849 /* spu.c */; }; + 71F4C5B00FDED12800529849 /* spu.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5870FDED12800529849 /* spu.h */; }; + 71F4C5B10FDED12800529849 /* system.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5880FDED12800529849 /* system.h */; }; + 71F4C5B80FDED16D00529849 /* iGte.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5B40FDED16D00529849 /* iGte.h */; }; + 71F4C5B90FDED16D00529849 /* iR3000A.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5B50FDED16D00529849 /* iR3000A.c */; }; + 71F4C5BA0FDED16D00529849 /* ix86.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F4C5B60FDED16D00529849 /* ix86.c */; }; + 71F4C5BB0FDED16D00529849 /* ix86.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F4C5B70FDED16D00529849 /* ix86.h */; }; + 71F703A711B3A673007DD5C5 /* sjisfont.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F703A611B3A673007DD5C5 /* sjisfont.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXBuildRule section */ + 2BB3D6D005427FE200831ACB /* PBXBuildRule */ = { + isa = PBXBuildRule; + compilerSpec = com.apple.compilers.gcc; + fileType = sourcecode.c; + isEditable = 1; + outputFiles = ( + ); + }; + 2BD707B705559AE300CB5D9B /* PBXBuildRule */ = { + isa = PBXBuildRule; + compilerSpec = com.apple.compilers.gcc; + filePatterns = pasm.s; + fileType = sourcecode.asm; + isEditable = 1; + outputFiles = ( + "$(DERIVED_FILES_DIR)/$(INPUT_FILE_BASE).o", + ); + script = "as -o $(DERIVED_FILES_DIR)/$(INPUT_FILE_BASE).o $(INPUT_FILE_PATH)"; + }; +/* End PBXBuildRule section */ + +/* Begin PBXContainerItemProxy section */ + 713CB2DD11FC49720033B6A8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 71F93F6311FB8E9D007A5A7C /* DFCdrom.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 8D57630D048677EA00EA77CD; + remoteInfo = DFCdrom; + }; + 71AD2DD010C356FD00365243 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 71AD2DC710C356FD00365243 /* PeopsSPU.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8D576316048677EA00EA77CD; + remoteInfo = PeopsSPU; + }; + 71AD2DDB10C3570900365243 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 71AD2DD210C3570900365243 /* PeopsSoftGPU.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2BAF50930632BB1A00DB9A16; + remoteInfo = gpuPeopsSoftGL; + }; + 71AD2DE810C3572200365243 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 71AD2DC710C356FD00365243 /* PeopsSPU.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 8D57630D048677EA00EA77CD; + remoteInfo = PeopsSPU; + }; + 71AD2DEA10C3572500365243 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 71AD2DD210C3570900365243 /* PeopsSoftGPU.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 2BAF50920632BB1A00DB9A16; + remoteInfo = gpuPeopsSoftGL; + }; + 71F2C0851200B69B00322AD9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 71F2C07E1200B69B00322AD9 /* DFInput.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8D576316048677EA00EA77CD; + remoteInfo = DFInput; + }; + 71F2C0BB1200B75100322AD9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 71F2C07E1200B69B00322AD9 /* DFInput.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 8D57630D048677EA00EA77CD; + remoteInfo = DFInput; + }; + 71F93F6B11FB8E9D007A5A7C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 71F93F6311FB8E9D007A5A7C /* DFCdrom.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8D576316048677EA00EA77CD; + remoteInfo = DFCdrom; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 71AD2DF010C3573400365243 /* Copy PlugIns */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 71F2C0881200B6B000322AD9 /* DFInput.psxplugin in Copy PlugIns */, + 713CB2E411FC49DA0033B6A8 /* DFCdrom.psxplugin in Copy PlugIns */, + 71AD2DF510C3575C00365243 /* PeopsSoftGL.psxplugin in Copy PlugIns */, + 71AD2DF410C3575300365243 /* PeopsSPU.psxplugin in Copy PlugIns */, + ); + name = "Copy PlugIns"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 2B02C04304E145D000880C5B /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + 2B143D01078A2CBD00AF745A /* PCSX.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = PCSX.icns; sourceTree = ""; }; + 2B143D02078A2CBD00AF745A /* pcsxfreeze.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = pcsxfreeze.icns; sourceTree = ""; }; + 2B143D03078A2CBD00AF745A /* pcsxmemcard.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = pcsxmemcard.icns; sourceTree = ""; }; + 2B143D04078A2CBD00AF745A /* psxbios.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = psxbios.icns; sourceTree = ""; }; + 2B143D05078A2CBD00AF745A /* psxplugin.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = psxplugin.icns; sourceTree = ""; }; + 2B2189D204D96C7A00179945 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; + 2B3E356A06937D1C00763C7D /* PcsxPluginDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxPluginDocument.h; sourceTree = ""; }; + 2B3E356B06937D1C00763C7D /* PcsxPluginDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxPluginDocument.m; sourceTree = ""; }; + 2B3E35BB069384D100763C7D /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = AddPluginSheet.nib; sourceTree = ""; }; + 2B4DE98D05FF9307003EFEF0 /* PluginController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PluginController.h; sourceTree = ""; }; + 2B4DE98E05FF9307003EFEF0 /* PluginController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = PluginController.m; sourceTree = ""; }; + 2B690C760635C65C00CDA575 /* ExceptionHandling.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ExceptionHandling.framework; path = /System/Library/Frameworks/ExceptionHandling.framework; sourceTree = ""; }; + 2B6E8AAE04C832040017A3B1 /* System.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = System.framework; path = /System/Library/Frameworks/System.framework; sourceTree = ""; }; + 2B6E8AB404C8327C0017A3B1 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; + 2B75FD3C051C56D200D12034 /* PcsxController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PcsxController.h; sourceTree = ""; }; + 2B75FD3D051C56D200D12034 /* PcsxController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = PcsxController.m; sourceTree = ""; }; + 2B75FD4A051C8A7400D12034 /* ConfigurationController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConfigurationController.h; sourceTree = ""; }; + 2B75FD4B051C8A7400D12034 /* ConfigurationController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = ConfigurationController.m; sourceTree = ""; }; + 2B976C00074C14B4007C050A /* Kernel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kernel.framework; path = /System/Library/Frameworks/Kernel.framework; sourceTree = ""; }; + 2BA178A505148D9D0026D74D /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 2BA178B10514CE260026D74D /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = Configuration.nib; sourceTree = ""; }; + 2BA178B30514CE260026D74D /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = InfoPlist.strings; sourceTree = ""; }; + 2BA178B50514CE260026D74D /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = PCSX.nib; sourceTree = ""; }; + 2BA44360052DB2EA00E21DDD /* PcsxPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxPlugin.h; sourceTree = ""; }; + 2BA44361052DB2EA00E21DDD /* PcsxPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxPlugin.m; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; + 2BB3D6CF05427FE200831ACB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = ""; }; + 2BB3D6D105427FE200831ACB /* PCSX.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = PCSX.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2BBB1126051DC00500B84448 /* PluginList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginList.h; sourceTree = ""; }; + 2BBB1127051DC00500B84448 /* PluginList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PluginList.m; sourceTree = ""; }; + 2BBB1787051E0D9700B84448 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = Credits.rtf; sourceTree = ""; }; + 2BBB1791051E113B00B84448 /* EmuThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmuThread.h; sourceTree = ""; }; + 2BBB1792051E113B00B84448 /* EmuThread.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EmuThread.m; sourceTree = ""; }; + 2BBB17DA051E4D0F00B84448 /* Plugin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = Plugin.c; sourceTree = SOURCE_ROOT; }; + 2BC4786204C7FD3600CAB520 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 712FD1E51093096F00575A92 /* debug.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = debug.c; path = ../libpcsxcore/debug.c; sourceTree = SOURCE_ROOT; }; + 712FD1E61093096F00575A92 /* socket.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = socket.c; path = ../libpcsxcore/socket.c; sourceTree = SOURCE_ROOT; }; + 712FD1E71093096F00575A92 /* socket.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = socket.h; path = ../libpcsxcore/socket.h; sourceTree = SOURCE_ROOT; }; + 713B530C110B75650002F164 /* ppf.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = ppf.c; path = ../libpcsxcore/ppf.c; sourceTree = SOURCE_ROOT; }; + 713B530D110B75650002F164 /* ppf.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = ppf.h; path = ../libpcsxcore/ppf.h; sourceTree = SOURCE_ROOT; }; + 7161C2810FDED6D000225F97 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; + 7161C2970FDED75300225F97 /* ExtendedKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtendedKeys.h; sourceTree = ""; }; + 719594AF11AEFE8C004AD686 /* gte_divider.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = gte_divider.h; path = ../libpcsxcore/gte_divider.h; sourceTree = SOURCE_ROOT; }; + 719594B011AEFE8C004AD686 /* psxcommon.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = psxcommon.c; path = ../libpcsxcore/psxcommon.c; sourceTree = SOURCE_ROOT; }; + 71AD2DC710C356FD00365243 /* PeopsSPU.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PeopsSPU.xcodeproj; path = plugins/DFSound/PeopsSPU.xcodeproj; sourceTree = SOURCE_ROOT; }; + 71AD2DD210C3570900365243 /* PeopsSoftGPU.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PeopsSoftGPU.xcodeproj; path = plugins/DFXVideo/PeopsSoftGPU.xcodeproj; sourceTree = SOURCE_ROOT; }; + 71F2C07E1200B69B00322AD9 /* DFInput.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = DFInput.xcodeproj; path = plugins/DFInput/DFInput.xcodeproj; sourceTree = ""; }; + 71F4C5600FDED12800529849 /* cdriso.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cdriso.c; path = ../libpcsxcore/cdriso.c; sourceTree = SOURCE_ROOT; }; + 71F4C5610FDED12800529849 /* cdriso.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cdriso.h; path = ../libpcsxcore/cdriso.h; sourceTree = SOURCE_ROOT; }; + 71F4C5620FDED12800529849 /* cdrom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cdrom.c; path = ../libpcsxcore/cdrom.c; sourceTree = SOURCE_ROOT; }; + 71F4C5630FDED12800529849 /* cdrom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cdrom.h; path = ../libpcsxcore/cdrom.h; sourceTree = SOURCE_ROOT; }; + 71F4C5640FDED12800529849 /* cheat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cheat.c; path = ../libpcsxcore/cheat.c; sourceTree = SOURCE_ROOT; }; + 71F4C5650FDED12800529849 /* cheat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cheat.h; path = ../libpcsxcore/cheat.h; sourceTree = SOURCE_ROOT; }; + 71F4C5660FDED12800529849 /* coff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = coff.h; path = ../libpcsxcore/coff.h; sourceTree = SOURCE_ROOT; }; + 71F4C5670FDED12800529849 /* debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = debug.h; path = ../libpcsxcore/debug.h; sourceTree = SOURCE_ROOT; }; + 71F4C5680FDED12800529849 /* decode_xa.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decode_xa.c; path = ../libpcsxcore/decode_xa.c; sourceTree = SOURCE_ROOT; }; + 71F4C5690FDED12800529849 /* decode_xa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = decode_xa.h; path = ../libpcsxcore/decode_xa.h; sourceTree = SOURCE_ROOT; }; + 71F4C56A0FDED12800529849 /* disr3000a.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = disr3000a.c; path = ../libpcsxcore/disr3000a.c; sourceTree = SOURCE_ROOT; }; + 71F4C56B0FDED12800529849 /* gte.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = gte.c; path = ../libpcsxcore/gte.c; sourceTree = SOURCE_ROOT; }; + 71F4C56C0FDED12800529849 /* gte.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gte.h; path = ../libpcsxcore/gte.h; sourceTree = SOURCE_ROOT; }; + 71F4C56D0FDED12800529849 /* mdec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mdec.c; path = ../libpcsxcore/mdec.c; sourceTree = SOURCE_ROOT; }; + 71F4C56E0FDED12800529849 /* mdec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mdec.h; path = ../libpcsxcore/mdec.h; sourceTree = SOURCE_ROOT; }; + 71F4C56F0FDED12800529849 /* misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = misc.c; path = ../libpcsxcore/misc.c; sourceTree = SOURCE_ROOT; }; + 71F4C5700FDED12800529849 /* misc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = misc.h; path = ../libpcsxcore/misc.h; sourceTree = SOURCE_ROOT; }; + 71F4C5710FDED12800529849 /* plugins.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = plugins.c; path = ../libpcsxcore/plugins.c; sourceTree = SOURCE_ROOT; }; + 71F4C5720FDED12800529849 /* plugins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = plugins.h; path = ../libpcsxcore/plugins.h; sourceTree = SOURCE_ROOT; }; + 71F4C5730FDED12800529849 /* psemu_plugin_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = psemu_plugin_defs.h; path = ../libpcsxcore/psemu_plugin_defs.h; sourceTree = SOURCE_ROOT; }; + 71F4C5740FDED12800529849 /* psxbios.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = psxbios.c; path = ../libpcsxcore/psxbios.c; sourceTree = SOURCE_ROOT; }; + 71F4C5750FDED12800529849 /* psxbios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = psxbios.h; path = ../libpcsxcore/psxbios.h; sourceTree = SOURCE_ROOT; }; + 71F4C5760FDED12800529849 /* psxcommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = psxcommon.h; path = ../libpcsxcore/psxcommon.h; sourceTree = SOURCE_ROOT; }; + 71F4C5770FDED12800529849 /* psxcounters.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = psxcounters.c; path = ../libpcsxcore/psxcounters.c; sourceTree = SOURCE_ROOT; }; + 71F4C5780FDED12800529849 /* psxcounters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = psxcounters.h; path = ../libpcsxcore/psxcounters.h; sourceTree = SOURCE_ROOT; }; + 71F4C5790FDED12800529849 /* psxdma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = psxdma.c; path = ../libpcsxcore/psxdma.c; sourceTree = SOURCE_ROOT; }; + 71F4C57A0FDED12800529849 /* psxdma.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = psxdma.h; path = ../libpcsxcore/psxdma.h; sourceTree = SOURCE_ROOT; }; + 71F4C57B0FDED12800529849 /* psxhle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = psxhle.c; path = ../libpcsxcore/psxhle.c; sourceTree = SOURCE_ROOT; }; + 71F4C57C0FDED12800529849 /* psxhle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = psxhle.h; path = ../libpcsxcore/psxhle.h; sourceTree = SOURCE_ROOT; }; + 71F4C57D0FDED12800529849 /* psxhw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = psxhw.c; path = ../libpcsxcore/psxhw.c; sourceTree = SOURCE_ROOT; }; + 71F4C57E0FDED12800529849 /* psxhw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = psxhw.h; path = ../libpcsxcore/psxhw.h; sourceTree = SOURCE_ROOT; }; + 71F4C57F0FDED12800529849 /* psxinterpreter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = psxinterpreter.c; path = ../libpcsxcore/psxinterpreter.c; sourceTree = SOURCE_ROOT; }; + 71F4C5800FDED12800529849 /* psxmem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = psxmem.c; path = ../libpcsxcore/psxmem.c; sourceTree = SOURCE_ROOT; }; + 71F4C5810FDED12800529849 /* psxmem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = psxmem.h; path = ../libpcsxcore/psxmem.h; sourceTree = SOURCE_ROOT; }; + 71F4C5820FDED12800529849 /* r3000a.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = r3000a.c; path = ../libpcsxcore/r3000a.c; sourceTree = SOURCE_ROOT; }; + 71F4C5830FDED12800529849 /* r3000a.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = r3000a.h; path = ../libpcsxcore/r3000a.h; sourceTree = SOURCE_ROOT; }; + 71F4C5840FDED12800529849 /* sio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sio.c; path = ../libpcsxcore/sio.c; sourceTree = SOURCE_ROOT; }; + 71F4C5850FDED12800529849 /* sio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sio.h; path = ../libpcsxcore/sio.h; sourceTree = SOURCE_ROOT; }; + 71F4C5860FDED12800529849 /* spu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = spu.c; path = ../libpcsxcore/spu.c; sourceTree = SOURCE_ROOT; }; + 71F4C5870FDED12800529849 /* spu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spu.h; path = ../libpcsxcore/spu.h; sourceTree = SOURCE_ROOT; }; + 71F4C5880FDED12800529849 /* system.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = system.h; path = ../libpcsxcore/system.h; sourceTree = SOURCE_ROOT; }; + 71F4C5B40FDED16D00529849 /* iGte.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iGte.h; path = ../libpcsxcore/ix86/iGte.h; sourceTree = SOURCE_ROOT; }; + 71F4C5B50FDED16D00529849 /* iR3000A.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = iR3000A.c; path = ../libpcsxcore/ix86/iR3000A.c; sourceTree = SOURCE_ROOT; }; + 71F4C5B60FDED16D00529849 /* ix86.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ix86.c; path = ../libpcsxcore/ix86/ix86.c; sourceTree = SOURCE_ROOT; }; + 71F4C5B70FDED16D00529849 /* ix86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ix86.h; path = ../libpcsxcore/ix86/ix86.h; sourceTree = SOURCE_ROOT; }; + 71F703A611B3A673007DD5C5 /* sjisfont.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = sjisfont.h; path = ../libpcsxcore/sjisfont.h; sourceTree = SOURCE_ROOT; }; + 71F93F6311FB8E9D007A5A7C /* DFCdrom.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = DFCdrom.xcodeproj; path = plugins/DFCdrom/DFCdrom.xcodeproj; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2BB3D6C505427FE200831ACB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2BB3D6C605427FE200831ACB /* Cocoa.framework in Frameworks */, + 2BB3D6C705427FE200831ACB /* System.framework in Frameworks */, + 2BB3D6C805427FE200831ACB /* IOKit.framework in Frameworks */, + 2B400D910789F58A00BA271E /* Carbon.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0249A662FF388D9811CA2CEA /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 2B976C00074C14B4007C050A /* Kernel.framework */, + 2B02C04304E145D000880C5B /* Carbon.framework */, + 2BC4786204C7FD3600CAB520 /* Cocoa.framework */, + 2B6E8AAE04C832040017A3B1 /* System.framework */, + 2B6E8AB404C8327C0017A3B1 /* IOKit.framework */, + 2B2189D204D96C7A00179945 /* CoreFoundation.framework */, + 2B690C760635C65C00CDA575 /* ExceptionHandling.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 08FB7794FE84155DC02AAC07 /* Pcsx */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + 0249A662FF388D9811CA2CEA /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + 2BB3D6CF05427FE200831ACB /* Info.plist */, + ); + name = Pcsx; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 2BCE23B204C6B52C007C2DA3 /* libpcsxcore */, + 2BC4787804C7FDBD00CAB520 /* MacOSX */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 2BBD6C1D04C893F500A83E33 /* PlugIns */, + 2BB3D6D105427FE200831ACB /* PCSX.app */, + ); + name = Products; + sourceTree = ""; + }; + 2B143D00078A2CBD00AF745A /* icons */ = { + isa = PBXGroup; + children = ( + 2B143D01078A2CBD00AF745A /* PCSX.icns */, + 2B143D02078A2CBD00AF745A /* pcsxfreeze.icns */, + 2B143D03078A2CBD00AF745A /* pcsxmemcard.icns */, + 2B143D04078A2CBD00AF745A /* psxbios.icns */, + 2B143D05078A2CBD00AF745A /* psxplugin.icns */, + ); + path = icons; + sourceTree = ""; + }; + 2BA178AD0514CE260026D74D /* English.lproj */ = { + isa = PBXGroup; + children = ( + 2BBB1786051E0D9700B84448 /* Credits.rtf */, + 2BA178B00514CE260026D74D /* Configuration.nib */, + 2BA178B20514CE260026D74D /* InfoPlist.strings */, + 2BA178B40514CE260026D74D /* PCSX.nib */, + 2B3E35BA069384D100763C7D /* AddPluginSheet.nib */, + ); + path = English.lproj; + sourceTree = ""; + }; + 2BBD6C1D04C893F500A83E33 /* PlugIns */ = { + isa = PBXGroup; + children = ( + 71F2C07E1200B69B00322AD9 /* DFInput.xcodeproj */, + 71F93F6311FB8E9D007A5A7C /* DFCdrom.xcodeproj */, + 71AD2DD210C3570900365243 /* PeopsSoftGPU.xcodeproj */, + 71AD2DC710C356FD00365243 /* PeopsSPU.xcodeproj */, + ); + name = PlugIns; + sourceTree = ""; + }; + 2BC4787804C7FDBD00CAB520 /* MacOSX */ = { + isa = PBXGroup; + children = ( + 2BA178AD0514CE260026D74D /* English.lproj */, + 2B143D00078A2CBD00AF745A /* icons */, + 7161C2810FDED6D000225F97 /* config.h */, + 2BA178A505148D9D0026D74D /* main.m */, + 2BBB17DA051E4D0F00B84448 /* Plugin.c */, + 2B75FD3C051C56D200D12034 /* PcsxController.h */, + 2B75FD3D051C56D200D12034 /* PcsxController.m */, + 2B75FD4A051C8A7400D12034 /* ConfigurationController.h */, + 2B75FD4B051C8A7400D12034 /* ConfigurationController.m */, + 2B4DE98D05FF9307003EFEF0 /* PluginController.h */, + 2B4DE98E05FF9307003EFEF0 /* PluginController.m */, + 2BBB1791051E113B00B84448 /* EmuThread.h */, + 2BBB1792051E113B00B84448 /* EmuThread.m */, + 7161C2970FDED75300225F97 /* ExtendedKeys.h */, + 2BBB1126051DC00500B84448 /* PluginList.h */, + 2BBB1127051DC00500B84448 /* PluginList.m */, + 2BA44360052DB2EA00E21DDD /* PcsxPlugin.h */, + 2BA44361052DB2EA00E21DDD /* PcsxPlugin.m */, + 2B3E356A06937D1C00763C7D /* PcsxPluginDocument.h */, + 2B3E356B06937D1C00763C7D /* PcsxPluginDocument.m */, + ); + name = MacOSX; + sourceTree = ""; + }; + 2BCE23B204C6B52C007C2DA3 /* libpcsxcore */ = { + isa = PBXGroup; + children = ( + 71F4C5B30FDED15800529849 /* ix86 */, + 71F4C5600FDED12800529849 /* cdriso.c */, + 71F4C5610FDED12800529849 /* cdriso.h */, + 71F4C5620FDED12800529849 /* cdrom.c */, + 71F4C5630FDED12800529849 /* cdrom.h */, + 71F4C5640FDED12800529849 /* cheat.c */, + 71F4C5650FDED12800529849 /* cheat.h */, + 71F4C5660FDED12800529849 /* coff.h */, + 712FD1E51093096F00575A92 /* debug.c */, + 71F4C5670FDED12800529849 /* debug.h */, + 71F4C5680FDED12800529849 /* decode_xa.c */, + 71F4C5690FDED12800529849 /* decode_xa.h */, + 71F4C56A0FDED12800529849 /* disr3000a.c */, + 71F4C56B0FDED12800529849 /* gte.c */, + 71F4C56C0FDED12800529849 /* gte.h */, + 719594AF11AEFE8C004AD686 /* gte_divider.h */, + 71F4C56D0FDED12800529849 /* mdec.c */, + 71F4C56E0FDED12800529849 /* mdec.h */, + 71F4C56F0FDED12800529849 /* misc.c */, + 71F4C5700FDED12800529849 /* misc.h */, + 71F4C5710FDED12800529849 /* plugins.c */, + 71F4C5720FDED12800529849 /* plugins.h */, + 713B530C110B75650002F164 /* ppf.c */, + 713B530D110B75650002F164 /* ppf.h */, + 71F4C5730FDED12800529849 /* psemu_plugin_defs.h */, + 71F4C5740FDED12800529849 /* psxbios.c */, + 71F4C5750FDED12800529849 /* psxbios.h */, + 719594B011AEFE8C004AD686 /* psxcommon.c */, + 71F4C5760FDED12800529849 /* psxcommon.h */, + 71F4C5770FDED12800529849 /* psxcounters.c */, + 71F4C5780FDED12800529849 /* psxcounters.h */, + 71F4C5790FDED12800529849 /* psxdma.c */, + 71F4C57A0FDED12800529849 /* psxdma.h */, + 71F4C57B0FDED12800529849 /* psxhle.c */, + 71F4C57C0FDED12800529849 /* psxhle.h */, + 71F4C57D0FDED12800529849 /* psxhw.c */, + 71F4C57E0FDED12800529849 /* psxhw.h */, + 71F4C57F0FDED12800529849 /* psxinterpreter.c */, + 71F4C5800FDED12800529849 /* psxmem.c */, + 71F4C5810FDED12800529849 /* psxmem.h */, + 71F4C5820FDED12800529849 /* r3000a.c */, + 71F4C5830FDED12800529849 /* r3000a.h */, + 71F4C5840FDED12800529849 /* sio.c */, + 71F4C5850FDED12800529849 /* sio.h */, + 71F703A611B3A673007DD5C5 /* sjisfont.h */, + 712FD1E61093096F00575A92 /* socket.c */, + 712FD1E71093096F00575A92 /* socket.h */, + 71F4C5860FDED12800529849 /* spu.c */, + 71F4C5870FDED12800529849 /* spu.h */, + 71F4C5880FDED12800529849 /* system.h */, + ); + name = libpcsxcore; + sourceTree = ""; + }; + 71AD2DCD10C356FD00365243 /* Products */ = { + isa = PBXGroup; + children = ( + 71AD2DD110C356FD00365243 /* PeopsSPU.psxplugin */, + ); + name = Products; + sourceTree = ""; + }; + 71AD2DD810C3570900365243 /* Products */ = { + isa = PBXGroup; + children = ( + 71AD2DDC10C3570900365243 /* PeopsSoftGL.psxplugin */, + ); + name = Products; + sourceTree = ""; + }; + 71F2C07F1200B69B00322AD9 /* Products */ = { + isa = PBXGroup; + children = ( + 71F2C0861200B69B00322AD9 /* DFInput.psxplugin */, + ); + name = Products; + sourceTree = ""; + }; + 71F4C5B30FDED15800529849 /* ix86 */ = { + isa = PBXGroup; + children = ( + 71F4C5B40FDED16D00529849 /* iGte.h */, + 71F4C5B50FDED16D00529849 /* iR3000A.c */, + 71F4C5B60FDED16D00529849 /* ix86.c */, + 71F4C5B70FDED16D00529849 /* ix86.h */, + ); + name = ix86; + sourceTree = ""; + }; + 71F93F6411FB8E9D007A5A7C /* Products */ = { + isa = PBXGroup; + children = ( + 71F93F6C11FB8E9D007A5A7C /* DFCdrom.psxplugin */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 2BB3D68305427FE200831ACB /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2BB3D69D05427FE200831ACB /* PcsxController.h in Headers */, + 2BB3D69E05427FE200831ACB /* ConfigurationController.h in Headers */, + 2BB3D69F05427FE200831ACB /* PluginList.h in Headers */, + 2BB3D6A005427FE200831ACB /* EmuThread.h in Headers */, + 2BB3D6A105427FE200831ACB /* PcsxPlugin.h in Headers */, + 2B4DE99105FF9307003EFEF0 /* PluginController.h in Headers */, + 2B3E356C06937D1C00763C7D /* PcsxPluginDocument.h in Headers */, + 71F4C58A0FDED12800529849 /* cdriso.h in Headers */, + 71F4C58C0FDED12800529849 /* cdrom.h in Headers */, + 71F4C58E0FDED12800529849 /* cheat.h in Headers */, + 71F4C58F0FDED12800529849 /* coff.h in Headers */, + 71F4C5900FDED12800529849 /* debug.h in Headers */, + 71F4C5920FDED12800529849 /* decode_xa.h in Headers */, + 71F4C5950FDED12800529849 /* gte.h in Headers */, + 71F4C5970FDED12800529849 /* mdec.h in Headers */, + 71F4C5990FDED12800529849 /* misc.h in Headers */, + 71F4C59B0FDED12800529849 /* plugins.h in Headers */, + 71F4C59C0FDED12800529849 /* psemu_plugin_defs.h in Headers */, + 71F4C59E0FDED12800529849 /* psxbios.h in Headers */, + 71F4C59F0FDED12800529849 /* psxcommon.h in Headers */, + 71F4C5A10FDED12800529849 /* psxcounters.h in Headers */, + 71F4C5A30FDED12800529849 /* psxdma.h in Headers */, + 71F4C5A50FDED12800529849 /* psxhle.h in Headers */, + 71F4C5A70FDED12800529849 /* psxhw.h in Headers */, + 71F4C5AA0FDED12800529849 /* psxmem.h in Headers */, + 71F4C5AC0FDED12800529849 /* r3000a.h in Headers */, + 71F4C5AE0FDED12800529849 /* sio.h in Headers */, + 71F4C5B00FDED12800529849 /* spu.h in Headers */, + 71F4C5B10FDED12800529849 /* system.h in Headers */, + 71F4C5B80FDED16D00529849 /* iGte.h in Headers */, + 71F4C5BB0FDED16D00529849 /* ix86.h in Headers */, + 7161C2820FDED6D000225F97 /* config.h in Headers */, + 7161C2980FDED75300225F97 /* ExtendedKeys.h in Headers */, + 712FD1EA1093096F00575A92 /* socket.h in Headers */, + 713B530F110B75650002F164 /* ppf.h in Headers */, + 719594B111AEFE8C004AD686 /* gte_divider.h in Headers */, + 71F703A711B3A673007DD5C5 /* sjisfont.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 2BB3D68205427FE200831ACB /* PCSX */ = { + isa = PBXNativeTarget; + buildConfigurationList = 71F353F30FD98DFE00CBEC28 /* Build configuration list for PBXNativeTarget "PCSX" */; + buildPhases = ( + 2BB3D68305427FE200831ACB /* Headers */, + 2BB3D6A205427FE200831ACB /* Resources */, + 2BB3D6A805427FE200831ACB /* Sources */, + 2BB3D6C505427FE200831ACB /* Frameworks */, + 2BB3D6CD05427FE200831ACB /* Rez */, + 71AD2DF010C3573400365243 /* Copy PlugIns */, + ); + buildRules = ( + 2BD707B705559AE300CB5D9B /* PBXBuildRule */, + 2BB3D6D005427FE200831ACB /* PBXBuildRule */, + ); + dependencies = ( + 71AD2DE910C3572200365243 /* PBXTargetDependency */, + 71AD2DEB10C3572500365243 /* PBXTargetDependency */, + 713CB2DE11FC49720033B6A8 /* PBXTargetDependency */, + 71F2C0BC1200B75100322AD9 /* PBXTargetDependency */, + ); + name = PCSX; + productInstallPath = "$(USER_APPS_DIR)"; + productName = "Pcsx-MacOSX"; + productReference = 2BB3D6D105427FE200831ACB /* PCSX.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 71F353F80FD98DFE00CBEC28 /* Build configuration list for PBXProject "Pcsx" */; + hasScannedForEncodings = 1; + mainGroup = 08FB7794FE84155DC02AAC07 /* Pcsx */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 71F93F6411FB8E9D007A5A7C /* Products */; + ProjectRef = 71F93F6311FB8E9D007A5A7C /* DFCdrom.xcodeproj */; + }, + { + ProductGroup = 71F2C07F1200B69B00322AD9 /* Products */; + ProjectRef = 71F2C07E1200B69B00322AD9 /* DFInput.xcodeproj */; + }, + { + ProductGroup = 71AD2DD810C3570900365243 /* Products */; + ProjectRef = 71AD2DD210C3570900365243 /* PeopsSoftGPU.xcodeproj */; + }, + { + ProductGroup = 71AD2DCD10C356FD00365243 /* Products */; + ProjectRef = 71AD2DC710C356FD00365243 /* PeopsSPU.xcodeproj */; + }, + ); + targets = ( + 2BB3D68205427FE200831ACB /* PCSX */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 71AD2DD110C356FD00365243 /* PeopsSPU.psxplugin */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = PeopsSPU.psxplugin; + remoteRef = 71AD2DD010C356FD00365243 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 71AD2DDC10C3570900365243 /* PeopsSoftGL.psxplugin */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = PeopsSoftGL.psxplugin; + remoteRef = 71AD2DDB10C3570900365243 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 71F2C0861200B69B00322AD9 /* DFInput.psxplugin */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = DFInput.psxplugin; + remoteRef = 71F2C0851200B69B00322AD9 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 71F93F6C11FB8E9D007A5A7C /* DFCdrom.psxplugin */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = DFCdrom.psxplugin; + remoteRef = 71F93F6B11FB8E9D007A5A7C /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 2BB3D6A205427FE200831ACB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2BB3D6A305427FE200831ACB /* Configuration.nib in Resources */, + 2BB3D6A405427FE200831ACB /* InfoPlist.strings in Resources */, + 2BB3D6A505427FE200831ACB /* PCSX.nib in Resources */, + 2BB3D6A705427FE200831ACB /* Credits.rtf in Resources */, + 2B3E35BC069384D100763C7D /* AddPluginSheet.nib in Resources */, + 2B143D06078A2CBD00AF745A /* PCSX.icns in Resources */, + 2B143D07078A2CBD00AF745A /* pcsxfreeze.icns in Resources */, + 2B143D08078A2CBD00AF745A /* pcsxmemcard.icns in Resources */, + 2B143D09078A2CBD00AF745A /* psxbios.icns in Resources */, + 2B143D0A078A2CBD00AF745A /* psxplugin.icns in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 2BB3D6CD05427FE200831ACB /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2BB3D6A805427FE200831ACB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2BB3D6BE05427FE200831ACB /* main.m in Sources */, + 2BB3D6BF05427FE200831ACB /* PcsxController.m in Sources */, + 2BB3D6C005427FE200831ACB /* ConfigurationController.m in Sources */, + 2BB3D6C105427FE200831ACB /* PluginList.m in Sources */, + 2BB3D6C205427FE200831ACB /* EmuThread.m in Sources */, + 2BB3D6C305427FE200831ACB /* Plugin.c in Sources */, + 2BB3D6C405427FE200831ACB /* PcsxPlugin.m in Sources */, + 2B4DE99205FF9307003EFEF0 /* PluginController.m in Sources */, + 2B3E356D06937D1C00763C7D /* PcsxPluginDocument.m in Sources */, + 71F4C5890FDED12800529849 /* cdriso.c in Sources */, + 71F4C58B0FDED12800529849 /* cdrom.c in Sources */, + 71F4C58D0FDED12800529849 /* cheat.c in Sources */, + 71F4C5910FDED12800529849 /* decode_xa.c in Sources */, + 71F4C5930FDED12800529849 /* disr3000a.c in Sources */, + 71F4C5940FDED12800529849 /* gte.c in Sources */, + 71F4C5960FDED12800529849 /* mdec.c in Sources */, + 71F4C5980FDED12800529849 /* misc.c in Sources */, + 71F4C59A0FDED12800529849 /* plugins.c in Sources */, + 71F4C59D0FDED12800529849 /* psxbios.c in Sources */, + 71F4C5A00FDED12800529849 /* psxcounters.c in Sources */, + 71F4C5A20FDED12800529849 /* psxdma.c in Sources */, + 71F4C5A40FDED12800529849 /* psxhle.c in Sources */, + 71F4C5A60FDED12800529849 /* psxhw.c in Sources */, + 71F4C5A80FDED12800529849 /* psxinterpreter.c in Sources */, + 71F4C5A90FDED12800529849 /* psxmem.c in Sources */, + 71F4C5AB0FDED12800529849 /* r3000a.c in Sources */, + 71F4C5AD0FDED12800529849 /* sio.c in Sources */, + 71F4C5AF0FDED12800529849 /* spu.c in Sources */, + 71F4C5B90FDED16D00529849 /* iR3000A.c in Sources */, + 71F4C5BA0FDED16D00529849 /* ix86.c in Sources */, + 712FD1E81093096F00575A92 /* debug.c in Sources */, + 712FD1E91093096F00575A92 /* socket.c in Sources */, + 713B530E110B75650002F164 /* ppf.c in Sources */, + 719594B211AEFE8C004AD686 /* psxcommon.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 713CB2DE11FC49720033B6A8 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = DFCdrom; + targetProxy = 713CB2DD11FC49720033B6A8 /* PBXContainerItemProxy */; + }; + 71AD2DE910C3572200365243 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PeopsSPU; + targetProxy = 71AD2DE810C3572200365243 /* PBXContainerItemProxy */; + }; + 71AD2DEB10C3572500365243 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = gpuPeopsSoftGL; + targetProxy = 71AD2DEA10C3572500365243 /* PBXContainerItemProxy */; + }; + 71F2C0BC1200B75100322AD9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = DFInput; + targetProxy = 71F2C0BB1200B75100322AD9 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 2B3E35BA069384D100763C7D /* AddPluginSheet.nib */ = { + isa = PBXVariantGroup; + children = ( + 2B3E35BB069384D100763C7D /* English */, + ); + name = AddPluginSheet.nib; + sourceTree = ""; + }; + 2BA178B00514CE260026D74D /* Configuration.nib */ = { + isa = PBXVariantGroup; + children = ( + 2BA178B10514CE260026D74D /* English */, + ); + name = Configuration.nib; + sourceTree = ""; + }; + 2BA178B20514CE260026D74D /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 2BA178B30514CE260026D74D /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 2BA178B40514CE260026D74D /* PCSX.nib */ = { + isa = PBXVariantGroup; + children = ( + 2BA178B50514CE260026D74D /* English */, + ); + name = PCSX.nib; + sourceTree = ""; + }; + 2BBB1786051E0D9700B84448 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 2BBB1787051E0D9700B84448 /* English */, + ); + name = Credits.rtf; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 71F353F40FD98DFE00CBEC28 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEBUGGING_SYMBOLS = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_ASM_KEYWORD = YES; + GCC_ENABLE_CPP_EXCEPTIONS = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G3; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)", + __MACOSX__, + ); + GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "PCSX_VERSION=\\\"1.5\\\" XA_HACK=1"; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + INFOPLIST_FILE = Info.plist; + OTHER_CFLAGS = ( + "-fomit-frame-pointer", + "-funroll-loops", + "-falign-loops=16", + ); + OTHER_REZFLAGS = ""; + PRODUCT_NAME = PCSX; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Development; + }; + 71F353F50FD98DFE00CBEC28 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUGGING_SYMBOLS = NO; + GCC_DYNAMIC_NO_PIC = YES; + GCC_ENABLE_ASM_KEYWORD = YES; + GCC_ENABLE_CPP_EXCEPTIONS = NO; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_CPU = ""; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = s; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)", + __MACOSX__, + ); + GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1 = "PCSX_VERSION=\\\"1.5\\\" XA_HACK=1"; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + INFOPLIST_FILE = Info.plist; + OTHER_CFLAGS = ( + "-fomit-frame-pointer", + "-funroll-loops", + "-falign-loops=16", + ); + OTHER_REZFLAGS = ""; + PRODUCT_NAME = PCSX; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost"; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Deployment; + }; + 71F353F90FD98DFE00CBEC28 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = i386; + GCC_MODEL_TUNING = ""; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + HEADER_SEARCH_PATHS = ( + ../include, + ../libpcsxcore, + ../macosx, + ); + OTHER_LDFLAGS = ( + "-lz", + "-lSystemStubs", + ); + }; + name = Development; + }; + 71F353FA0FD98DFE00CBEC28 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = i386; + GCC_DYNAMIC_NO_PIC = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 2; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_UNROLL_LOOPS = YES; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + HEADER_SEARCH_PATHS = ( + ../include, + ../libpcsxcore, + ../macosx, + ); + OTHER_CFLAGS = "-fomit-frame-pointer"; + OTHER_LDFLAGS = ( + "-lz", + "-lSystemStubs", + ); + }; + name = Deployment; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 71F353F30FD98DFE00CBEC28 /* Build configuration list for PBXNativeTarget "PCSX" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71F353F40FD98DFE00CBEC28 /* Development */, + 71F353F50FD98DFE00CBEC28 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; + 71F353F80FD98DFE00CBEC28 /* Build configuration list for PBXProject "Pcsx" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71F353F90FD98DFE00CBEC28 /* Development */, + 71F353FA0FD98DFE00CBEC28 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/macosx/PcsxController.h b/macosx/PcsxController.h new file mode 100644 index 00000000..70e81e19 --- /dev/null +++ b/macosx/PcsxController.h @@ -0,0 +1,34 @@ +/* PcsxController */ + +#import +#import "EmuThread.h" +#import "PluginList.h" + +@interface PcsxController : NSObject +{ + NSWindowController *preferencesController; + NSWindowController *memCardController; + PluginList *pluginList; + + IBOutlet NSWindow *memCardWindow; + IBOutlet NSWindow *preferenceWindow; + + BOOL sleepInBackground; + BOOL wasPausedBeforeBGSwitch; +} +- (IBAction)ejectCD:(id)sender; +- (IBAction)pause:(id)sender; +- (IBAction)preferences:(id)sender; +- (IBAction)reset:(id)sender; +- (IBAction)runCD:(id)sender; +- (IBAction)runIso:(id)sender; +- (IBAction)runBios:(id)sender; +- (IBAction)freeze:(id)sender; +- (IBAction)defrost:(id)sender; +- (IBAction)fullscreen:(id)sender; + ++ (void)setConfigFromDefaults; ++ (void)setDefaultFromConfig:(NSString *)defaultKey; ++ (BOOL)biosAvailable; + +@end diff --git a/macosx/PcsxController.m b/macosx/PcsxController.m new file mode 100644 index 00000000..0bb91449 --- /dev/null +++ b/macosx/PcsxController.m @@ -0,0 +1,425 @@ +#import +#import "PcsxController.h" +#import "ConfigurationController.h" +#import "EmuThread.h" +#include "psxcommon.h" +#include "plugins.h" +#include "misc.h" +#include "ExtendedKeys.h" + +NSDictionary *prefStringKeys; +NSDictionary *prefByteKeys; +NSMutableArray *biosList; +NSString *saveStatePath; + +@implementation PcsxController + +- (IBAction)ejectCD:(id)sender +{ + NSMutableString *deviceName; + NSTask *ejectTask; + NSRange rdiskRange; + + BOOL wasPaused = [EmuThread pauseSafe]; + + /* close connection to current cd */ + if ([EmuThread active]) + CDR_close(); + + // switch to another ISO if using internal image reader, otherwise eject the CD + if (UsingIso()) { + NSOpenPanel* openDlg = [NSOpenPanel openPanel]; + + [openDlg setCanChooseFiles:YES]; + [openDlg setCanChooseDirectories:NO]; + + if ([openDlg runModal] == NSOKButton) { + NSArray* files = [openDlg filenames]; + SetCdOpenCaseTime(time(NULL) + 2); + SetIsoFile((const char *)[[files objectAtIndex:0] fileSystemRepresentation]); + } + } else { + if (CDR_getDriveLetter() != nil) { + deviceName = [NSMutableString stringWithCString:CDR_getDriveLetter()]; + + // delete the 'r' in 'rdisk' + rdiskRange = [deviceName rangeOfString:@"rdisk"]; + if (rdiskRange.length != 0) { + rdiskRange.length = 1; + [deviceName deleteCharactersInRange:rdiskRange]; + } + // execute hdiutil to eject the device + ejectTask = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/hdiutil" arguments:[NSArray arrayWithObjects:@"eject", deviceName, nil]]; + [ejectTask waitUntilExit]; + } + } + + /* and open new cd */ + if ([EmuThread active]) + CDR_open(); + + if (!wasPaused) { + [EmuThread resume]; + } +} + +- (IBAction)pause:(id)sender +{ + if ([EmuThread isPaused]) { + //[sender setState:NSOffState]; + [EmuThread resume]; + } + else { + //[sender setState:NSOnState]; + [EmuThread pause]; + } +} + +- (IBAction)preferences:(id)sender +{ + /* load the nib if it hasn't yet */ + if (preferenceWindow == nil) { + if (preferencesController == nil) { + preferencesController = [[ConfigurationController alloc] initWithWindowNibName:@"Configuration"]; + } + preferenceWindow = [preferencesController window]; + } + + /* show the window */ + [preferenceWindow makeKeyAndOrderFront:self]; + [preferencesController showWindow:self]; +} + +- (IBAction)reset:(id)sender +{ + [EmuThread reset]; +} + +- (IBAction)runCD:(id)sender +{ + SetIsoFile(NULL); + [EmuThread run]; +} + +- (IBAction)runIso:(id)sender +{ + NSOpenPanel* openDlg = [NSOpenPanel openPanel]; + + [openDlg setCanChooseFiles:YES]; + [openDlg setCanChooseDirectories:NO]; + + if ([openDlg runModalForDirectory:nil file:nil] == NSOKButton) { + NSArray* files = [openDlg filenames]; + SetIsoFile((const char *)[[files objectAtIndex:0] fileSystemRepresentation]); + [EmuThread run]; + } +} + +- (IBAction)runBios:(id)sender +{ + SetIsoFile(NULL); + [EmuThread runBios]; +} + +- (IBAction)freeze:(id)sender +{ + int num = [sender tag]; + NSString *path = [NSString stringWithFormat:@"%@/%s-%3.3d.pcsxstate", saveStatePath, CdromId, num]; + + [EmuThread freezeAt:path which:num-1]; +} + +- (IBAction)defrost:(id)sender +{ + NSString *path = [NSString stringWithFormat:@"%@/%s-%3.3d.pcsxstate", saveStatePath, CdromId, [sender tag]]; + [EmuThread defrostAt:path]; +} + +- (IBAction)fullscreen:(id)sender +{ + GPU_keypressed(GPU_FULLSCREEN_KEY); +} + +- (BOOL)validateMenuItem:(id )menuItem +{ + if ([menuItem action] == @selector(pause:)) { + [menuItem setState:([EmuThread isPaused] ? NSOnState : NSOffState)]; + } + + if ([menuItem action] == @selector(pause:) || [menuItem action] == @selector(fullscreen:)) + return [EmuThread active]; + + if ([menuItem action] == @selector(reset:) || [menuItem action] == @selector(ejectCD:) || + [menuItem action] == @selector(freeze:)) + return [EmuThread active] && ![EmuThread isRunBios]; + + if ([menuItem action] == @selector(runCD:) || [menuItem action] == @selector(runIso:) || + [menuItem action] == @selector(runBios:)) { + if (preferenceWindow != nil) + if ([preferenceWindow isVisible]) + return NO; + + if ([menuItem action] == @selector(runBios:) && strcmp(Config.Bios, "HLE") == 0) + return NO; + + return ![EmuThread active]; + } + + if ([menuItem action] == @selector(defrost:)) { + if (![EmuThread active] || [EmuThread isRunBios]) + return NO; + + NSString *path = [NSString stringWithFormat:@"%@/%s-%3.3d.pcsxstate", saveStatePath, CdromId, [menuItem tag]]; + return (CheckState((char *)[path fileSystemRepresentation]) == 0); + } + + if ([menuItem action] == @selector(preferences:)) + return ![EmuThread active]; + + return YES; +} + +- (void)applicationWillResignActive:(NSNotification *)aNotification +{ + wasPausedBeforeBGSwitch = [EmuThread isPaused]; + + if (sleepInBackground) { + [EmuThread pause]; + } +} + +- (void)applicationDidBecomeActive:(NSNotification *)aNotification +{ + if (sleepInBackground && !wasPausedBeforeBGSwitch) { + [EmuThread resume]; + } +} + +- (void)awakeFromNib +{ + pluginList = [[PluginList alloc] init]; + if (![pluginList configured] /*!Config.Gpu[0] || !Config.Spu[0] || !Config.Pad1[0] || !Config.Cdr[0]*/) { + // configure plugins + [self preferences:nil]; + + NSRunCriticalAlertPanel(NSLocalizedString(@"Missing plugins!", nil), + NSLocalizedString(@"Pcsx is missing one or more critical plugins. You will need to install these in order to play games.", nil), + nil, nil, nil); + } + + if (![PcsxController biosAvailable]) { + NSRunInformationalAlertPanel(NSLocalizedString(@"Missing BIOS!", nil), + NSLocalizedString(@"Pcsx wasn't able to locate any Playstation BIOS ROM files. This means that it will run in BIOS simulation mode which is less stable and compatible than using a real Playstation BIOS.\n" + @"If you have a BIOS available, please copy it to\n~/Library/Application Support/Pcsx/Bios/", nil), + nil, nil, nil); + } + + sleepInBackground = YES; +} + +- (void)dealloc +{ + [pluginList release]; + [super dealloc]; +} + ++ (void)setConfigFromDefaults +{ + NSEnumerator *enumerator; + const char *str; + NSString *key; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + /* + enumerator = [prefStringKeys keyEnumerator]; + while ((key = [enumerator nextObject])) { + str = [[defaults stringForKey:key] fileSystemRepresentation]; + char *dst = (char *)[[prefStringKeys objectForKey:key] pointerValue]; + if (str != nil && dst != nil) strncpy(dst, str, 255); + }*/ + + enumerator = [prefByteKeys keyEnumerator]; + while ((key = [enumerator nextObject])) { + u8 *dst = (u8 *)[[prefByteKeys objectForKey:key] pointerValue]; + if (dst != nil) *dst = [defaults integerForKey:key]; + } + + // special cases + //str = [[defaults stringForKey:@"PluginPAD"] fileSystemRepresentation]; + //if (str != nil) strncpy(Config.Pad2, str, 255); + + str = [[defaults stringForKey:@"Bios"] fileSystemRepresentation]; + if (str) { + NSString *path = [defaults stringForKey:@"Bios"]; + int index = [biosList indexOfObject:path]; + + if (-1 == index) { + [biosList insertObject:path atIndex:0]; + } else if (0 < index) { + [biosList exchangeObjectAtIndex:index withObjectAtIndex:0]; + } + } + + str = [[defaults stringForKey:@"Mcd1"] fileSystemRepresentation]; + if (str) strncpy(Config.Mcd1, str, MAXPATHLEN); + + str = [[defaults stringForKey:@"Mcd2"] fileSystemRepresentation]; + if (str) strncpy(Config.Mcd2, str, MAXPATHLEN); + + if ([defaults boolForKey:@"UseHLE"] || 0 == [biosList count]) { + strcpy(Config.Bios, "HLE"); + } else { + str = [(NSString *)[biosList objectAtIndex:0] fileSystemRepresentation]; + if (str != nil) strncpy(Config.Bios, str, MAXPATHLEN); + else strcpy(Config.Bios, "HLE"); + } + + // FIXME: hack + strcpy(Config.Net, "Disabled"); +} + ++ (void)setDefaultFromConfig:(NSString *)defaultKey +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + char *str = (char *)[[prefStringKeys objectForKey:defaultKey] pointerValue]; + if (str) { + [defaults setObject:[NSString stringWithCString:str] forKey:defaultKey]; + return; + } + + u8 *val = (u8 *)[[prefByteKeys objectForKey:defaultKey] pointerValue]; + if (val) { + [defaults setInteger:*val forKey:defaultKey]; + return; + } +} + ++ (BOOL)biosAvailable +{ + return ([biosList count] > 0); +} + +// called when class is initialized ++ (void)initialize +{ + NSString *path; + const char *str; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: + @"Disabled", @"PluginNET", + [NSNumber numberWithInt:1], @"NoDynarec", + [NSNumber numberWithInt:1], @"AutoDetectVideoType", + [NSNumber numberWithInt:0], @"UseHLE", + nil]; + + [defaults registerDefaults:appDefaults]; + + prefStringKeys = [[NSDictionary alloc] initWithObjectsAndKeys: + [NSValue valueWithPointer:Config.Gpu], @"PluginGPU", + [NSValue valueWithPointer:Config.Spu], @"PluginSPU", + [NSValue valueWithPointer:Config.Pad1], @"PluginPAD", + [NSValue valueWithPointer:Config.Cdr], @"PluginCDR", + [NSValue valueWithPointer:Config.Net], @"PluginNET", + [NSValue valueWithPointer:Config.Mcd1], @"Mcd1", + [NSValue valueWithPointer:Config.Mcd2], @"Mcd2", + nil]; + + prefByteKeys = [[NSDictionary alloc] initWithObjectsAndKeys: + [NSValue valueWithPointer:&Config.Xa], @"NoXaAudio", + [NSValue valueWithPointer:&Config.Sio], @"SioIrqAlways", + [NSValue valueWithPointer:&Config.Mdec], @"BlackAndWhiteMDECVideo", + [NSValue valueWithPointer:&Config.PsxAuto], @"AutoDetectVideoType", + [NSValue valueWithPointer:&Config.PsxType], @"VideoTypePAL", + [NSValue valueWithPointer:&Config.Cdda], @"NoCDAudio", + [NSValue valueWithPointer:&Config.Cpu], @"NoDynarec", + [NSValue valueWithPointer:&Config.PsxOut], @"ConsoleOutput", + [NSValue valueWithPointer:&Config.SpuIrq], @"SpuIrqAlways", + [NSValue valueWithPointer:&Config.RCntFix], @"RootCounterFix", + [NSValue valueWithPointer:&Config.VSyncWA], @"VideoSyncWAFix", + nil]; + + // setup application support paths + NSArray *libPaths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); + if ([libPaths count] > 0) { + NSString *path; + BOOL dir; + + // create them if needed + NSFileManager *dfm = [NSFileManager defaultManager]; + NSString *supportPath = [NSString stringWithFormat:@"%@/Application Support", [libPaths objectAtIndex:0]]; + if (![dfm fileExistsAtPath:supportPath isDirectory:&dir]) + [dfm createDirectoryAtPath:supportPath attributes:nil]; + + path = [NSString stringWithFormat:@"%@/Pcsx", supportPath]; + if (![dfm fileExistsAtPath:path isDirectory:&dir]) + [dfm createDirectoryAtPath:path attributes:nil]; + + path = [NSString stringWithFormat:@"%@/Pcsx/Bios", supportPath]; + if (![dfm fileExistsAtPath:path isDirectory:&dir]) + [dfm createDirectoryAtPath:path attributes:nil]; + + path = [NSString stringWithFormat:@"%@/Pcsx/Memory Cards", supportPath]; + if (![dfm fileExistsAtPath:path isDirectory:&dir]) + [dfm createDirectoryAtPath:path attributes:nil]; + + path = [NSString stringWithFormat:@"%@/Pcsx/Patches", supportPath]; + if (![dfm fileExistsAtPath:path isDirectory:&dir]) + [dfm createDirectoryAtPath:path attributes:nil]; + + saveStatePath = [[NSString stringWithFormat:@"%@/Pcsx/Save States", supportPath] retain]; + if (![dfm fileExistsAtPath:saveStatePath isDirectory:&dir]) + [dfm createDirectoryAtPath:saveStatePath attributes:nil]; + + path = [NSString stringWithFormat:@"%@/Pcsx/Memory Cards/Mcd001.mcr", supportPath]; + str = [path fileSystemRepresentation]; + if (str != nil) strncpy(Config.Mcd1, str, 255); + + path = [NSString stringWithFormat:@"%@/Pcsx/Memory Cards/Mcd002.mcr", supportPath]; + str = [path fileSystemRepresentation]; + if (str != nil) strncpy(Config.Mcd2, str, 255); + + path = [NSString stringWithFormat:@"%@/Pcsx/Bios/", supportPath]; + str = [path fileSystemRepresentation]; + if (str != nil) strncpy(Config.BiosDir, str, 255); + + path = [NSString stringWithFormat:@"%@/Pcsx/Patches/", supportPath]; + str = [path fileSystemRepresentation]; + if (str != nil) strncpy(Config.PatchesDir, str, 255); + } else { + strcpy(Config.BiosDir, "Bios/"); + strcpy(Config.PatchesDir, "Patches/"); + + saveStatePath = @"sstates"; + [saveStatePath retain]; + } + + // set plugin path + path = [[[NSBundle mainBundle] builtInPlugInsPath] stringByAppendingString:@"/"]; + str = [path fileSystemRepresentation]; + if (str != nil) strncpy(Config.PluginsDir, str, 255); + + // locate a bios + biosList = [[NSMutableArray alloc] init]; + NSFileManager *manager = [NSFileManager defaultManager]; + NSArray *bioses = [manager directoryContentsAtPath:[NSString stringWithCString:Config.BiosDir]]; + if (bioses) { + int i; + for (i = 0; i < [bioses count]; i++) { + NSString *file = [bioses objectAtIndex:i]; + NSDictionary *attrib = [manager fileAttributesAtPath:[NSString stringWithFormat:@"%s%@", Config.BiosDir, file] traverseLink:YES]; + + if ([[attrib fileType] isEqualToString:NSFileTypeRegular]) { + unsigned long long size = [attrib fileSize]; + if (([attrib fileSize] % (256 * 1024)) == 0 && size > 0) { + [biosList addObject:file]; + } + } + } + } + + [PcsxController setConfigFromDefaults]; +} + + +@end diff --git a/macosx/PcsxPlugin.h b/macosx/PcsxPlugin.h new file mode 100644 index 00000000..c8d47679 --- /dev/null +++ b/macosx/PcsxPlugin.h @@ -0,0 +1,41 @@ +// +// PcsxPlugin.h +// Pcsx +// +// Created by Gil Pedersen on Fri Oct 03 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import + + +@interface PcsxPlugin : NSObject { + CFBundleRef pluginRef; + + NSString *path; + NSDate *modDate; + NSString *name; + long version; + int type; + int active; +} + ++ (NSString *)getPrefixForType:(int)type; ++ (NSString *)getDefaultKeyForType:(int)type; ++ (char **)getConfigEntriesForType:(int)type; + +- (id)initWithPath:(NSString *)aPath; + +- (NSString *)getDisplayVersion; +- (int)getType; +- (NSString *)path; +- (NSString *)description; +- (BOOL)hasAboutAs:(int)type; +- (BOOL)hasConfigureAs:(int)type; +- (long)initAs:(int)aType; +- (long)shutdownAs:(int)aType; +- (void)aboutAs:(int)type; +- (void)configureAs:(int)type; +- (BOOL)verifyOK; + +@end diff --git a/macosx/PcsxPlugin.m b/macosx/PcsxPlugin.m new file mode 100644 index 00000000..9ee31112 --- /dev/null +++ b/macosx/PcsxPlugin.m @@ -0,0 +1,303 @@ +// +// PcsxPlugin.m +// Pcsx +// +// Created by Gil Pedersen on Fri Oct 03 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import +#import "PcsxPlugin.h" +#include "psxcommon.h" +#include "plugins.h" + +@implementation PcsxPlugin + ++ (NSString *)getPrefixForType:(int)aType +{ + switch (aType) { + case PSE_LT_GPU: return @"GPU"; + case PSE_LT_CDR: return @"CDR"; + case PSE_LT_SPU: return @"SPU"; + case PSE_LT_PAD: return @"PAD"; + case PSE_LT_NET: return @"NET"; + } + + return @""; +} + ++ (NSString *)getDefaultKeyForType:(int)aType +{ + //return @"Plugin" [PcsxPlugin getPrefixForType:aType]; + switch (aType) { + case PSE_LT_GPU: return @"PluginGPU"; + case PSE_LT_CDR: return @"PluginCDR"; + case PSE_LT_SPU: return @"PluginSPU"; + case PSE_LT_PAD: return @"PluginPAD"; + case PSE_LT_NET: return @"PluginNET"; + } + + return @""; +} + ++ (char **)getConfigEntriesForType:(int)aType +{ + static char *gpu[2] = {(char *)&Config.Gpu, NULL}; + static char *cdr[2] = {(char *)&Config.Cdr, NULL}; + static char *spu[2] = {(char *)&Config.Spu, NULL}; + static char *pad[3] = {(char *)&Config.Pad1, (char *)&Config.Pad2, NULL}; + static char *net[2] = {(char *)&Config.Net, NULL}; + + switch (aType) { + case PSE_LT_GPU: return (char **)gpu; + case PSE_LT_CDR: return (char **)cdr; + case PSE_LT_SPU: return (char **)spu; + case PSE_LT_PAD: return (char **)pad; + case PSE_LT_NET: return (char **)net; + } + + return nil; +} + +- (id)initWithPath:(NSString *)aPath +{ + if (!(self = [super init])) { + return nil; + } + + PSEgetLibType PSE_getLibType = NULL; + PSEgetLibVersion PSE_getLibVersion = NULL; + PSEgetLibName PSE_getLibName = NULL; + + pluginRef = nil; + name = nil; + path = [aPath retain]; + NSString *fullPath = [[NSString stringWithCString:Config.PluginsDir] stringByAppendingPathComponent:path]; + + pluginRef = SysLoadLibrary([fullPath fileSystemRepresentation]); + if (pluginRef == nil) { + [self release]; + return nil; + } + + // TODO: add support for plugins with multiple functionalities??? + PSE_getLibType = (PSEgetLibType) SysLoadSym(pluginRef, "PSEgetLibType"); + if (SysLibError() != nil) { + if (([path rangeOfString: @"gpu" options:NSCaseInsensitiveSearch]).length != 0) + type = PSE_LT_GPU; + else if (([path rangeOfString: @"cdr" options:NSCaseInsensitiveSearch]).length != 0) + type = PSE_LT_CDR; + else if (([path rangeOfString: @"spu" options:NSCaseInsensitiveSearch]).length != 0) + type = PSE_LT_SPU; + else if (([path rangeOfString: @"pad" options:NSCaseInsensitiveSearch]).length != 0) + type = PSE_LT_PAD; + else { + [self release]; + return nil; + } + } else { + type = (int)PSE_getLibType(); + if (type != PSE_LT_GPU && type != PSE_LT_CDR && type != PSE_LT_SPU && type != PSE_LT_PAD) { + [self release]; + return nil; + } + } + + PSE_getLibName = (PSEgetLibName) SysLoadSym(pluginRef, "PSEgetLibName"); + if (SysLibError() == nil) { + name = [[NSString alloc] initWithCString:PSE_getLibName()]; + } + + PSE_getLibVersion = (PSEgetLibVersion) SysLoadSym(pluginRef, "PSEgetLibVersion"); + if (SysLibError() == nil) { + version = PSE_getLibVersion(); + } + else { + version = -1; + } + + // save the current modification date + NSDictionary *fattrs = [[NSFileManager defaultManager] fileAttributesAtPath:fullPath traverseLink:YES]; + modDate = [[fattrs fileModificationDate] retain]; + + active = 0; + + return self; +} + +- (void)dealloc +{ + int i; + + // shutdown if we had previously been inited + for (i=0; i<32; i++) { + if (active & (1 << i)) { + [self shutdownAs:(1 << i)]; + } + } + + if (pluginRef) SysCloseLibrary(pluginRef); + + [path release]; + [name release]; + + [super dealloc]; +} + +- (void)runCommand:(id)arg +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSString *funcName = [arg objectAtIndex:0]; + long (*func)(void); + + func = SysLoadSym(pluginRef, [funcName lossyCString]); + if (SysLibError() == nil) { + func(); + } else { + NSBeep(); + } + + [arg release]; + [pool release]; + return; +} + +- (long)initAs:(int)aType +{ + char symbol[255]; + long (*init)(void); + long (*initArg)(long arg); + int res = PSE_ERR_FATAL; + + if ((active & aType) == aType) { + return 0; + } + + sprintf(symbol, "%sinit", [[PcsxPlugin getPrefixForType:aType] lossyCString]); + init = initArg = SysLoadSym(pluginRef, symbol); + if (SysLibError() == nil) { + if (aType != PSE_LT_PAD) + res = init(); + else + res = initArg(1|2); + } + + if (0 == res) { + active |= aType; + } else { + NSRunCriticalAlertPanel(NSLocalizedString(@"Plugin Initialization Failed!", nil), + [NSString stringWithFormat:NSLocalizedString(@"Pcsx failed to initialize the selected %s plugin (error=%i).\nThe plugin might not work with your system.", nil), [PcsxPlugin getPrefixForType:aType], res], + nil, nil, nil); + } + + return res; +} + +- (long)shutdownAs:(int)aType +{ + char symbol[255]; + long (*shutdown)(void); + + sprintf(symbol, "%sshutdown", [[PcsxPlugin getPrefixForType:aType] lossyCString]); + shutdown = SysLoadSym(pluginRef, symbol); + if (SysLibError() == nil) { + active &= ~aType; + return shutdown(); + } + + return PSE_ERR_FATAL; +} + +- (BOOL)hasAboutAs:(int)aType +{ + char symbol[255]; + + sprintf(symbol, "%sabout", [[PcsxPlugin getPrefixForType:aType] lossyCString]); + SysLoadSym(pluginRef, symbol); + + return (SysLibError() == nil); +} + +- (BOOL)hasConfigureAs:(int)aType +{ + char symbol[255]; + + sprintf(symbol, "%sconfigure", [[PcsxPlugin getPrefixForType:aType] lossyCString]); + SysLoadSym(pluginRef, symbol); + + return (SysLibError() == nil); +} + +- (void)aboutAs:(int)aType +{ + NSArray *arg; + char symbol[255]; + + sprintf(symbol, "%sabout", [[PcsxPlugin getPrefixForType:aType] lossyCString]); + arg = [[NSArray alloc] initWithObjects:[NSString stringWithCString:symbol], + [NSNumber numberWithInt:0], nil]; + + // detach a new thread + [NSThread detachNewThreadSelector:@selector(runCommand:) toTarget:self + withObject:arg]; +} + +- (void)configureAs:(int)aType +{ + NSArray *arg; + char symbol[255]; + + sprintf(symbol, "%sconfigure", [[PcsxPlugin getPrefixForType:aType] lossyCString]); + arg = [[NSArray alloc] initWithObjects:[NSString stringWithCString:symbol], + [NSNumber numberWithInt:1], nil]; + + // detach a new thread + [NSThread detachNewThreadSelector:@selector(runCommand:) toTarget:self + withObject:arg]; +} + +- (NSString *)getDisplayVersion +{ + if (version == -1) + return @""; + + return [NSString stringWithFormat:@"v%ld.%ld.%ld", version>>16,(version>>8)&0xff,version&0xff]; +} + +- (int)getType +{ + return type; +} + +- (NSString *)path +{ + return path; +} + +- (unsigned)hash +{ + return [path hash]; +} + +- (NSString *)description +{ + if (name == nil) + return [path lastPathComponent]; + + return [NSString stringWithFormat:@"%@ %@ [%@]", name, [self getDisplayVersion], [path lastPathComponent]]; +} + +// the plugin will check if it's still valid and return the status +- (BOOL)verifyOK +{ + // check that the file is still there with the same modification date + NSFileManager *dfm = [NSFileManager defaultManager]; + NSString *fullPath = [[NSString stringWithCString:Config.PluginsDir] stringByAppendingPathComponent:path]; + if (![dfm fileExistsAtPath:fullPath]) + return NO; + + NSDictionary *fattrs = [dfm fileAttributesAtPath:fullPath traverseLink:YES]; + return [[fattrs fileModificationDate] isEqualToDate:modDate]; +} + +@end diff --git a/macosx/PcsxPluginDocument.h b/macosx/PcsxPluginDocument.h new file mode 100644 index 00000000..bf4f8028 --- /dev/null +++ b/macosx/PcsxPluginDocument.h @@ -0,0 +1,20 @@ +// +// PcsxPluginDocument.h +// Pcsx +// +// Created by Gil Pedersen on Thu Jul 01 2004. +// Copyright (c) 2004 __MyCompanyName__. All rights reserved. +// + +#import + + +@interface PcsxPluginDocument : NSDocument { + IBOutlet NSWindow *addPluginSheet; + IBOutlet NSTextField *pluginName; + + BOOL moveOK; +} +- (IBAction)closeAddPluginSheet:(id)sender; + +@end diff --git a/macosx/PcsxPluginDocument.m b/macosx/PcsxPluginDocument.m new file mode 100644 index 00000000..6cbe0fae --- /dev/null +++ b/macosx/PcsxPluginDocument.m @@ -0,0 +1,95 @@ +// +// PcsxPluginDocument.m +// Pcsx +// +// Created by Gil Pedersen on Thu Jul 01 2004. +// Copyright (c) 2004 __MyCompanyName__. All rights reserved. +// + +#import "PcsxPluginDocument.h" + + +@implementation PcsxPluginDocument + +- (BOOL)showAddPluginSheet:(NSWindow *)window forName:(NSString *)name +// User has asked to see the custom display. Display it. +{ + if (!addPluginSheet) + [NSBundle loadNibNamed:@"AddPluginSheet" owner:self]; + + [pluginName setObjectValue:name]; + + [NSApp beginSheet:addPluginSheet + modalForWindow:window + modalDelegate:nil + didEndSelector:nil + contextInfo:nil]; + [NSApp runModalForWindow:addPluginSheet]; + // Sheet is up here. + [NSApp endSheet:addPluginSheet]; + [addPluginSheet orderOut:self]; + + return moveOK; +} + +- (IBAction)closeAddPluginSheet:(id)sender +{ + if ([[sender keyEquivalent] isEqualToString:@"\r"]) { + moveOK = YES; + } else { + moveOK = NO; + } + [NSApp stopModal]; +} + +- (BOOL)loadDataRepresentation:(NSData *)docData ofType:(NSString *)docType +{ + //NSLog(@"loadDataRepresentation"); + return NO; +} + +- (BOOL)loadFileWrapperRepresentation:(NSFileWrapper *)wrapper ofType:(NSString *)docType +{ + if ([self showAddPluginSheet:nil forName:[wrapper filename]]) { + NSString *dst = [NSString stringWithFormat:@"%@/%@", + [[NSBundle mainBundle] builtInPlugInsPath], + [wrapper filename]]; + + if ([wrapper writeToFile:dst atomically:NO updateFilenames:NO]) { + [[NSWorkspace sharedWorkspace] noteFileSystemChanged:[[NSBundle mainBundle] builtInPlugInsPath]]; + NSRunInformationalAlertPanel(NSLocalizedString(@"Installation Succesfull", nil), + NSLocalizedString(@"The installation of the specified plugin was succesfull. In order to use it, please restart the application.", nil), + nil, nil, nil); + } else { + NSRunAlertPanel(NSLocalizedString(@"Installation Failed!", nil), + NSLocalizedString(@"The installation of the specified plugin failed. Please try again, or make a manual install.", nil), + nil, nil, nil); + } + } + + // Tell the NSDocument that we can't handle the file, since we are already done with it + return NO; +} + +- (id)openDocumentWithContentsOfFile:(NSString *)fileName display:(BOOL)flag +{ + + return nil; +} + +- (NSString *)windowNibName { + // Implement this to return a nib to load OR implement -makeWindowControllers to manually create your controllers. + return @"PcsxPluginDocument"; +} + +- (NSData *)dataRepresentationOfType:(NSString *)type { + // Implement to provide a persistent data representation of your document OR remove this and implement the file-wrapper or file path based save methods. + return nil; +} +/* +- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)type { + // Implement to load a persistent data representation of your document OR remove this and implement the file-wrapper or file path based load methods. + return YES; +}*/ + +@end diff --git a/macosx/Plugin.c b/macosx/Plugin.c new file mode 100644 index 00000000..e293fbf3 --- /dev/null +++ b/macosx/Plugin.c @@ -0,0 +1,150 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#import +#include +#include +#include +#include + +#include "psxcommon.h" +#include "plugins.h" +#include "spu.h" + +void OnFile_Exit(); + +unsigned long gpuDisp; + +long SPU__open(void) { + return SPU_open(); +} + +int StatesC = 0; +extern int UseGui; +int ShowPic=0; + +void gpuShowPic() { +} + +void PADhandleKey(int key) { +} + +long PAD1__open(void) { + return PAD1_open(&gpuDisp); +} + +long PAD2__open(void) { + return PAD2_open(&gpuDisp); +} + +void OnFile_Exit(); + +void SignalExit(int sig) { + ClosePlugins(); + OnFile_Exit(); +} + +void SPUirq(void); + +#define PARSEPATH(dst, src) \ + ptr = src + strlen(src); \ + while (*ptr != '\\' && ptr != src) ptr--; \ + if (ptr != src) { \ + strcpy(dst, ptr+1); \ + } + +int _OpenPlugins() { + static char path[1024]; + CFURLRef pathUrl; + int ret; + + //signal(SIGINT, SignalExit); + //signal(SIGPIPE, SignalExit); + + GPU_clearDynarec(clearDynarec); + + pathUrl = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("gpuPeopsSoftX.cfg"), NULL, NULL); + if (pathUrl) + CFURLGetFileSystemRepresentation(pathUrl, true, path, 1024); + + ret = CDR_open(); + if (ret < 0) { SysMessage(_("Error Opening CDR Plugin")); return -1; } + ret = SPU_open(); + if (ret < 0) { SysMessage(_("Error Opening SPU Plugin")); return -1; } + SPU_registerCallback(SPUirq); + ret = GPU_open(&gpuDisp, "PCSX", /*pathUrl ? path :*/ NULL); + if (ret < 0) { SysMessage(_("Error Opening GPU Plugin")); return -1; } + ret = PAD1_open(&gpuDisp); + if (ret < 0) { SysMessage(_("Error Opening PAD1 Plugin")); return -1; } + ret = PAD2_open(&gpuDisp); + if (ret < 0) { SysMessage(_("Error Opening PAD2 Plugin")); return -1; } + + return 0; +} + +int OpenPlugins() { + int ret; + + while ((ret = _OpenPlugins()) == -2) { + ReleasePlugins(); + LoadMcds(Config.Mcd1, Config.Mcd2); + if (LoadPlugins() == -1) return -1; + } + return ret; +} + +void ClosePlugins() { + int ret; + + //signal(SIGINT, SIG_DFL); + //signal(SIGPIPE, SIG_DFL); + ret = CDR_close(); + if (ret < 0) { SysMessage(_("Error Closing CDR Plugin")); return; } + ret = SPU_close(); + if (ret < 0) { SysMessage(_("Error Closing SPU Plugin")); return; } + ret = PAD1_close(); + if (ret < 0) { SysMessage(_("Error Closing PAD1 Plugin")); return; } + ret = PAD2_close(); + if (ret < 0) { SysMessage(_("Error Closing PAD2 Plugin")); return; } + ret = GPU_close(); + if (ret < 0) { SysMessage(_("Error Closing GPU Plugin")); return; } +} + +void ResetPlugins() { + int ret; + + CDR_shutdown(); + GPU_shutdown(); + SPU_shutdown(); + PAD1_shutdown(); + PAD2_shutdown(); + + ret = CDR_init(); + if (ret < 0) { SysMessage(_("CDRinit error: %d"), ret); return; } + ret = GPU_init(); + if (ret < 0) { SysMessage(_("GPUinit error: %d"), ret); return; } + ret = SPU_init(); + if (ret < 0) { SysMessage(_("SPUinit error: %d"), ret); return; } + ret = PAD1_init(1); + if (ret < 0) { SysMessage(_("PAD1init error: %d"), ret); return; } + ret = PAD2_init(2); + if (ret < 0) { SysMessage(_("PAD2init error: %d"), ret); return; } + + NetOpened = FALSE; +} + diff --git a/macosx/PluginController.h b/macosx/PluginController.h new file mode 100644 index 00000000..e04f1525 --- /dev/null +++ b/macosx/PluginController.h @@ -0,0 +1,22 @@ +/* PluginController */ + +#import +#import "PluginList.h" + +@interface PluginController : NSObject +{ + IBOutlet NSButton *aboutButton; + IBOutlet NSButton *configureButton; + IBOutlet NSPopUpButton *pluginMenu; + + int pluginType; + NSArray *plugins; + NSString *defaultKey; +} +- (IBAction)doAbout:(id)sender; +- (IBAction)doConfigure:(id)sender; +- (IBAction)selectPlugin:(id)sender; + +- (void)setPluginsTo:(NSArray *)list withType:(int)type; + +@end diff --git a/macosx/PluginController.m b/macosx/PluginController.m new file mode 100644 index 00000000..007e6194 --- /dev/null +++ b/macosx/PluginController.m @@ -0,0 +1,81 @@ +#import "PluginController.h" +#import "PcsxPlugin.h" +#import "PcsxController.h" + +@implementation PluginController + +- (IBAction)doAbout:(id)sender +{ + PcsxPlugin *plugin = [plugins objectAtIndex:[pluginMenu indexOfSelectedItem]]; + [plugin aboutAs:pluginType]; +} + +- (IBAction)doConfigure:(id)sender +{ + PcsxPlugin *plugin = [plugins objectAtIndex:[pluginMenu indexOfSelectedItem]]; + + [plugin configureAs:pluginType]; +} + +- (IBAction)selectPlugin:(id)sender +{ + if (sender==pluginMenu) { + int index = [pluginMenu indexOfSelectedItem]; + if (index != -1) { + PcsxPlugin *plugin = [plugins objectAtIndex:index]; + + if (![[PluginList list] setActivePlugin:plugin forType:pluginType]) { + /* plugin won't initialize */ + } + + // write selection to defaults + [[NSUserDefaults standardUserDefaults] setObject:[plugin path] forKey:defaultKey]; + + // set button states + [aboutButton setEnabled:[plugin hasAboutAs:pluginType]]; + [configureButton setEnabled:[plugin hasConfigureAs:pluginType]]; + } else { + // set button states + [aboutButton setEnabled:NO]; + [configureButton setEnabled:NO]; + } + } +} + +// must be called before anything else +- (void)setPluginsTo:(NSArray *)list withType:(int)type +{ + NSString *sel; + int i; + + // remember the list + pluginType = type; + plugins = [list retain]; + defaultKey = [[PcsxPlugin getDefaultKeyForType:pluginType] retain]; + + // clear the previous menu items + [pluginMenu removeAllItems]; + + // load the currently selected plugin + sel = [[NSUserDefaults standardUserDefaults] stringForKey:defaultKey]; + + // add the menu entries + for (i = 0; i < [plugins count]; i++) { + [pluginMenu addItemWithTitle:[[plugins objectAtIndex:i] description]]; + + // make sure the currently selected is set as such + if ([sel isEqualToString:[[plugins objectAtIndex:i] path]]) { + [pluginMenu selectItemAtIndex:i]; + } + } + + [self selectPlugin:pluginMenu]; +} + +- (void)dealloc +{ + if (plugins) [plugins release]; + if (defaultKey) [defaultKey release]; +} + +@end diff --git a/macosx/PluginList.h b/macosx/PluginList.h new file mode 100644 index 00000000..fecc4b13 --- /dev/null +++ b/macosx/PluginList.h @@ -0,0 +1,36 @@ +// +// PluginList.h +// Pcsx +// +// Created by Gil Pedersen on Sun Sep 21 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import +#import "PcsxPlugin.h" + +//extern NSMutableArray *plugins; + +@interface PluginList : NSObject { + + @private + NSMutableArray *pluginList; + + PcsxPlugin *activeGpuPlugin; + PcsxPlugin *activeSpuPlugin; + PcsxPlugin *activeCdrPlugin; + PcsxPlugin *activePadPlugin; + + BOOL missingPlugins; +} + ++ (PluginList *)list; + +- (void)refreshPlugins; +- (NSArray *)pluginsForType:(int)typeMask; +- (BOOL)hasPluginAtPath:(NSString *)path; +- (BOOL)configured; +- (PcsxPlugin *)activePluginForType:(int)type; +- (BOOL)setActivePlugin:(PcsxPlugin *)plugin forType:(int)type; + +@end diff --git a/macosx/PluginList.m b/macosx/PluginList.m new file mode 100644 index 00000000..62c877c1 --- /dev/null +++ b/macosx/PluginList.m @@ -0,0 +1,324 @@ +// +// PluginList.m +// Pcsx +// +// Created by Gil Pedersen on Sun Sep 21 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import "EmuThread.h" +#import "PluginList.h" +#import "PcsxPlugin.h" +#include "psxcommon.h" +#include "plugins.h" + +//NSMutableArray *plugins; +static PluginList *sPluginList = nil; +const static int typeList[4] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD}; + +@implementation PluginList + ++ (PluginList *)list +{ + return sPluginList; +} + +#if 0 ++ (void)loadPlugins +{ + NSDirectoryEnumerator *dirEnum; + NSString *pname, *dir; + + // Make sure we only load the plugins once + if (plugins != nil) + return; + + plugins = [[NSMutableArray alloc] initWithCapacity: 20]; + + dir = [NSString stringWithCString:Config.PluginsDir]; + dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:dir]; + + while (pname = [dirEnum nextObject]) { + if ([[pname pathExtension] isEqualToString:@"psxplugin"] || + [[pname pathExtension] isEqualToString:@"so"]) { + [dirEnum skipDescendents]; /* don't enumerate this + directory */ + + PcsxPlugin *plugin = [[PcsxPlugin alloc] initWithPath:pname]; + if (plugin != nil) { + [plugins addObject:plugin]; + } + } + } +} + +- (id)initWithType:(int)typeMask +{ + unsigned int i; + + self = [super init]; + + [PluginList loadPlugins]; + list = [[NSMutableArray alloc] initWithCapacity: 5]; + + type = typeMask; + for (i=0; i<[plugins count]; i++) { + PcsxPlugin *plugin = [plugins objectAtIndex:i]; + if ([plugin getType] == type) { + [list addObject:plugin]; + } + } + + return self; +} + +- (int)numberOfItems +{ + return [list count]; +} + +- (id)objectAtIndex:(unsigned)index +{ + return [list objectAtIndex:index]; +} +#endif + + + +- (id)init +{ + int i; + + if (!(self = [super init])) + return nil; + + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + pluginList = [[NSMutableArray alloc] initWithCapacity:20]; + + activeGpuPlugin = activeSpuPlugin = activeCdrPlugin = activePadPlugin = nil; + + missingPlugins = NO; + for (i=0; i7dE~uV2eg$VvH@piWR$p8l{U;MVbiG#9mMkML}mPUAlsz*gz?Q3M$fj zb7AQnmR*VsL`c&lKj%Al77!2+4dDO(ecYC}bMMT)_hrAy5pxnL#b&>W z`D_x2qyYc>{P~xJzrp{--@`xr9Ptn5|GdZFqJR6%SFRwD$mv4ak?Ex`?eNi&)&AFQ zDPDnW9t|IxQ1J%a1gxc=B6QA^zU;-c=twD(RMe5q@1tPcps0JMj{p zlzQhVTXp38)$X3`*Viw+WScp!Tz@8yf{!$-_d3t{Grf_43l(YXDB;-Sg8%#DRkbZH z{BO(e|Kin7_}F?J{~!KOX{h5S>_iQQkIm;+RdIQNfe+$uU#!O9x_-EHu8T`YKH-vo z%w0UR&7}hTJuSdjAJ0s@X^S?FF@3A%f|}Ql!Rs3p<{NjMvwf71rbBqGyXPdMB(J8E*Q~6f z4BG+n+FbnbK@v$|lZAz5`fPaqxaa-MAZrptLsW|vbuGo{P<+hfU{&i@G6 zKM?dQbQwFCIs)3-H244mKEQ+zFyI4B_y7Ywz=RJlbm-coJxt<# zhB1?PzpDX;Hl{^29kF}2sj1l>Q@R;O05J@i1keXN3~h!M$&|7iGZoyk=Y%P?n`~lY zOfw^O7-bTm{8ph4Q#2{Nze7e3hc+~1$KIkHH#RadG^Cq-u+1c#VCXQknOY1@0TUC7 z>BK#Z;)aI$`ntN>T3+IPZ)~r@E~XhB8q;o{2~HvV3{9%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!|v!az}qCdzTaPiGQT+=!Q=Ae_DvY`a^#N{KKd}l$j;d z@c-eiCkx>DpNH|V0*-%JzkTKKggs^XhaG&v%lhqU!vFl}S^tOin|V(JM*I8i>#irV zv+?)5Vh@*x_CLik`|TwI`~&{)x8QmT;DPviuJM=loc%xX`SN=p{qw882MPUi<3Bj; zx$=i`^v}tDQ`Y$BwEqV`<>{Y?{gj6NImCb3dqVm@+Wx|co!I|i`@69Jq5R#j|B?KZ zmgm`rPcbI+(Mw3X>#~ME0)HBqF5LKwr+H%^z2^UO{>JBQf7o;8pZJ{lyQTjF4#(U%f;_DmdyZ@F(LG z3RpFVPkvuty+SkdYuNwD{yR)a%O4l^m3dFZ;VC;EeEP)q_0E`Z!k2b6g#G0@gD; z{h0crVHb(Qo&ox)-ok#~Dx~W6c*RqJJ;RG;bxYUfm&5w08+3pA*@eE}Hh}7es@q?^ z*Dnre?4kX4vjplHHus5dG3|z^r(g9$3O;4>u`3!@|3q_s=L^)I_V;A5*6%;<;|2Uq zdXcDaMG=KhAA7tb`Ys3?DIWCq9K09yJNLNzm-l?3#}gMbY(-cv8*W70~ literal 0 HcmV?d00001 diff --git a/macosx/icons/psxbios.icns b/macosx/icons/psxbios.icns new file mode 100644 index 0000000000000000000000000000000000000000..47baf9fefe5ed2a652e7dfa42b13a1fc1ccbde74 GIT binary patch literal 47845 zcmeHQc_38l`=8BizxkH-x@q5qDN?rVgd`PGiA*W&C8;=PX6z(nnKqS_7VVohTC^~? z{kE5ut5vyaqi}xD`<^pn4BE*3<9EBi-H1z5vq?_DWs&yHHZ^G-6AHOj<& zmcycrDLda~QCHorQp$I&>o~I<$WD~2arm3Twr(mM@1$eou^Pu5| z2D*c^+q1R{sYb`#eCN!ZE)W>+At>Ef}c&vB@_Bux9wJ&%*J#r=TI*7ERO2O;9 z2cx6?b{B<A3;&8_16X`N;lh@Er`kth@j#HdnVeB zA|lt^zxs6lyr^|E{O2!OcmB?^l8e->D1UKG=&qX&A5xE~7h9fEs~p1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9IS4AfjpbXVDMtFJITTcP*-Uy|SEuCj83B*S+;i1&L~g|5*YW{*~sg03fJ>e-?o( z|Ky9tQYo+Rd0wq7JHYba830Ys;a{m#Yn#7*<7#a&s*(dT00{lTzq+dm#NWVw`HL~G zR_83W9{5)>`V;(-{yPF7)j5xUwOZ}$1_0FY2LAZokzG7QYmGnPw_2;Ub^}1XSzGl# z@vqjJyXinh4a5H|01f;=|N3q!kg#5Z12O=R@~`ct0-4v&rbvN=q-UR@t4)`w>015urb^`$Nc$GhHkxA=Mt=8DZ7Kpbje`uXn zz!m_iwfZh95Q1Nezsvl|0J{KyHTcEnw6y&r{=29^=5?d~8T=D}5&#vzE-H{|%6?(~ zg#oJV9aJFWN|Jp`{EY!Bt?TC>x7OKP10V#hzXT7OhJDuil!Yb&AVB?^m*8nV)jnhW ztN=Ct8eO19De|6SPl7=(078J0pmS}XM9JbiXdJb!fIWn; zCa7-u=I2f55RmIJ_u@8RospQJeW9{wvfAQbrFxNLV}kMp$|BXjD&?)1#suZ9cZa-< zPjjxs_6sXnCv2C9(dx%b3o4g*VNI}2BF^huuk;s^$4KzS9fEQ7de|p$_yvimdROiF ztc{EbI?pJJ1U^~CpzNHheNDC5=0pq|#QthIu26$^&ZZBFW~-NVtjxWdLvljzyiKaV za#h9EuseqeBxtRnvBY=CU$5!UBmt+@&kA^JckCgE<5ZS@+g Na|`4a_~o|1{{ql+kyQWy literal 0 HcmV?d00001 diff --git a/macosx/main.m b/macosx/main.m new file mode 100644 index 00000000..ebd6e136 --- /dev/null +++ b/macosx/main.m @@ -0,0 +1,156 @@ +// +// main.m +// +// Created by Gil Pedersen on Fri Jun 06 2003. +// Copyright (c) 2003 SoftWorkz. All rights reserved. +// + +#import +#import +#import "EmuThread.h" +#include +//#import +#import +#include "psxcommon.h" +#include "sio.h" + +static BOOL sysInited = NO; +//#define EMU_LOG + +int main(int argc, const char *argv[]) { + if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) { + char parentdir[MAXPATHLEN]; + char *c; + + strncpy ( parentdir, argv[0], sizeof(parentdir) ); + c = (char*) parentdir; + + while (*c != '\0') /* go to end */ + c++; + + while (*c != '/') /* back up to parent */ + c--; + + *c++ = '\0'; /* cut off last part (binary name) */ + + assert ( chdir (parentdir) == 0 ); /* chdir to the binary app's parent */ + assert ( chdir ("../../../") == 0 ); /* chdir to the .app's parent */ + } + + strcpy(Config.BiosDir, "Bios/"); + strcpy(Config.PatchesDir, "Patches/"); + + // Setup the X11 window + if (getenv("DISPLAY") == NULL) + setenv("DISPLAY", ":0.0", 0); // Default to first local display + + return NSApplicationMain(argc, argv); +} + +int SysInit() { + if (!sysInited) { +#ifdef EMU_LOG +#ifndef LOG_STDOUT + emuLog = fopen("emuLog.txt","wb"); +#else + emuLog = stdout; +#endif + setvbuf(emuLog, NULL, _IONBF, 0); +#endif + + if (EmuInit() != 0) + return -1; + + sysInited = YES; + } + + if (LoadPlugins() == -1) { + return -1; + } + + LoadMcds(Config.Mcd1, Config.Mcd2); + + return 0; +} + +void SysReset() { + [EmuThread resetNow]; + //EmuReset(); +} + +void SysPrintf(const char *fmt, ...) { + va_list list; + char msg[512]; + + va_start(list, fmt); + vsprintf(msg, fmt, list); + va_end(list); + + if (Config.PsxOut) printf ("%s", msg); +#ifdef EMU_LOG +#ifndef LOG_STDOUT + fprintf(emuLog, "%s", msg); +#endif +#endif +} + +void SysMessage(const char *fmt, ...) { + va_list list; + char msg[512]; + + NSString *locFmtString = NSLocalizedString([NSString stringWithCString:fmt], nil); + + va_start(list, fmt); + vsprintf(msg, [locFmtString lossyCString], list); + va_end(list); + + NSRunAlertPanel(NSLocalizedString(@"Error!", nil), + [NSString stringWithCString:msg], + nil, nil, nil); +} + +void *SysLoadLibrary(const char *lib) { + NSBundle *bundle = [NSBundle bundleWithPath:[NSString stringWithCString:lib]]; + if (bundle != nil) { + return dlopen([[bundle executablePath] fileSystemRepresentation], RTLD_LAZY /*RTLD_NOW*/); + } + return dlopen(lib, RTLD_LAZY); +} + +void *SysLoadSym(void *lib, const char *sym) { + return dlsym(lib, sym); +} + +const char *SysLibError() { + return dlerror(); +} + +void SysCloseLibrary(void *lib) { + //dlclose(lib); +} + +// Called periodically from the emu thread +void SysUpdate() { + UpdateSystemActivity(UsrActivity); + + [emuThread handleEvents]; +} + +// Returns to the Gui +void SysRunGui() { +} + +// Close mem and plugins +void SysClose() { + EmuShutdown(); + ReleasePlugins(); + + if (emuLog != NULL) fclose(emuLog); + + sysInited = NO; +} + +void OnFile_Exit() { + SysClose(); + exit(0); +} diff --git a/macosx/plugins/DFCdrom/DFCdrom.xcodeproj/project.pbxproj b/macosx/plugins/DFCdrom/DFCdrom.xcodeproj/project.pbxproj new file mode 100644 index 00000000..e5767cbf --- /dev/null +++ b/macosx/plugins/DFCdrom/DFCdrom.xcodeproj/project.pbxproj @@ -0,0 +1,360 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 2BD707180555997500CB5D9B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BD707170555997500CB5D9B /* IOKit.framework */; }; + 713DB2E811F113C30001BDD4 /* cdr.c in Sources */ = {isa = PBXBuildFile; fileRef = 713DB2E311F113C30001BDD4 /* cdr.c */; }; + 713DB2E911F113C30001BDD4 /* cdr.h in Headers */ = {isa = PBXBuildFile; fileRef = 713DB2E411F113C30001BDD4 /* cdr.h */; }; + 713DB2EB11F113C30001BDD4 /* util.c in Sources */ = {isa = PBXBuildFile; fileRef = 713DB2E611F113C30001BDD4 /* util.c */; }; + 71F3C32811F3CD0B007B9F12 /* cdr-macosx.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F3C32411F3CD0B007B9F12 /* cdr-macosx.c */; }; + 71F3C32911F3CD0B007B9F12 /* cfg.c in Sources */ = {isa = PBXBuildFile; fileRef = 71F3C32511F3CD0B007B9F12 /* cfg.c */; }; + 71F3C32A11F3CD0B007B9F12 /* PluginConfigController.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F3C32611F3CD0B007B9F12 /* PluginConfigController.h */; }; + 71F3C32B11F3CD0B007B9F12 /* PluginConfigController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3C32711F3CD0B007B9F12 /* PluginConfigController.m */; }; + 71F3C38611F3CFED007B9F12 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 71F3C38511F3CFED007B9F12 /* AppKit.framework */; }; + 71F3C38811F3CFF7007B9F12 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 71F3C38711F3CFF7007B9F12 /* Carbon.framework */; }; + 71F3C47A11F3D108007B9F12 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 71F3C47811F3D108007B9F12 /* Credits.rtf */; }; + 71F3C49D11F3D2B3007B9F12 /* DFCdromPluginConfig.nib in Resources */ = {isa = PBXBuildFile; fileRef = 71F3C49B11F3D2B3007B9F12 /* DFCdromPluginConfig.nib */; }; + 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; }; + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; + 2BD707170555997500CB5D9B /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; + 713DB2E311F113C30001BDD4 /* cdr.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = cdr.c; path = ../../../plugins/dfcdrom/cdr.c; sourceTree = SOURCE_ROOT; }; + 713DB2E411F113C30001BDD4 /* cdr.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = cdr.h; path = ../../../plugins/dfcdrom/cdr.h; sourceTree = SOURCE_ROOT; }; + 713DB2E611F113C30001BDD4 /* util.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = util.c; path = ../../../plugins/dfcdrom/util.c; sourceTree = SOURCE_ROOT; }; + 71F3C32411F3CD0B007B9F12 /* cdr-macosx.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = "cdr-macosx.c"; path = "macsrc/cdr-macosx.c"; sourceTree = ""; }; + 71F3C32511F3CD0B007B9F12 /* cfg.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = cfg.c; path = macsrc/cfg.c; sourceTree = ""; }; + 71F3C32611F3CD0B007B9F12 /* PluginConfigController.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = PluginConfigController.h; path = macsrc/PluginConfigController.h; sourceTree = ""; }; + 71F3C32711F3CD0B007B9F12 /* PluginConfigController.m */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.objc; name = PluginConfigController.m; path = macsrc/PluginConfigController.m; sourceTree = ""; }; + 71F3C38511F3CFED007B9F12 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 71F3C38711F3CFF7007B9F12 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + 71F3C47911F3D108007B9F12 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = ""; }; + 71F3C49C11F3D2B3007B9F12 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/DFCdromPluginConfig.nib; sourceTree = ""; }; + 8D576316048677EA00EA77CD /* DFCdrom.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DFCdrom.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D576313048677EA00EA77CD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */, + 2BD707180555997500CB5D9B /* IOKit.framework in Frameworks */, + 71F3C38611F3CFED007B9F12 /* AppKit.framework in Frameworks */, + 71F3C38811F3CFF7007B9F12 /* Carbon.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* CdrDevMac */ = { + isa = PBXGroup; + children = ( + 08FB77AFFE84173DC02AAC07 /* Source Files */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB6FE9D52B211CA2CBB /* Products */, + ); + name = CdrDevMac; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 71F3C38511F3CFED007B9F12 /* AppKit.framework */, + 71F3C38711F3CFF7007B9F12 /* Carbon.framework */, + 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */, + 2BD707170555997500CB5D9B /* IOKit.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 71F3C49B11F3D2B3007B9F12 /* DFCdromPluginConfig.nib */, + 71F3C47811F3D108007B9F12 /* Credits.rtf */, + 8D576317048677EA00EA77CD /* Info.plist */, + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77AFFE84173DC02AAC07 /* Source Files */ = { + isa = PBXGroup; + children = ( + 71F3C32111F3CCEF007B9F12 /* macsrc */, + 71F3C30911F3CC22007B9F12 /* src */, + ); + name = "Source Files"; + sourceTree = ""; + }; + 19C28FB6FE9D52B211CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D576316048677EA00EA77CD /* DFCdrom.psxplugin */, + ); + name = Products; + sourceTree = ""; + }; + 71F3C30911F3CC22007B9F12 /* src */ = { + isa = PBXGroup; + children = ( + 713DB2E311F113C30001BDD4 /* cdr.c */, + 713DB2E411F113C30001BDD4 /* cdr.h */, + 713DB2E611F113C30001BDD4 /* util.c */, + ); + name = src; + sourceTree = ""; + }; + 71F3C32111F3CCEF007B9F12 /* macsrc */ = { + isa = PBXGroup; + children = ( + 71F3C32411F3CD0B007B9F12 /* cdr-macosx.c */, + 71F3C32511F3CD0B007B9F12 /* cfg.c */, + 71F3C32611F3CD0B007B9F12 /* PluginConfigController.h */, + 71F3C32711F3CD0B007B9F12 /* PluginConfigController.m */, + ); + name = macsrc; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8D57630E048677EA00EA77CD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 713DB2E911F113C30001BDD4 /* cdr.h in Headers */, + 71F3C32A11F3CD0B007B9F12 /* PluginConfigController.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8D57630D048677EA00EA77CD /* DFCdrom */ = { + isa = PBXNativeTarget; + buildConfigurationList = 710735990FDEED75004AD098 /* Build configuration list for PBXNativeTarget "DFCdrom" */; + buildPhases = ( + 8D57630E048677EA00EA77CD /* Headers */, + 8D57630F048677EA00EA77CD /* Resources */, + 8D576311048677EA00EA77CD /* Sources */, + 8D576313048677EA00EA77CD /* Frameworks */, + 8D576315048677EA00EA77CD /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DFCdrom; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = CdrDevMac; + productReference = 8D576316048677EA00EA77CD /* DFCdrom.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 7107359E0FDEED75004AD098 /* Build configuration list for PBXProject "DFCdrom" */; + hasScannedForEncodings = 1; + mainGroup = 089C166AFE841209C02AAC07 /* CdrDevMac */; + projectDirPath = ""; + targets = ( + 8D57630D048677EA00EA77CD /* DFCdrom */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D57630F048677EA00EA77CD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, + 71F3C47A11F3D108007B9F12 /* Credits.rtf in Resources */, + 71F3C49D11F3D2B3007B9F12 /* DFCdromPluginConfig.nib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 8D576315048677EA00EA77CD /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D576311048677EA00EA77CD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 713DB2E811F113C30001BDD4 /* cdr.c in Sources */, + 713DB2EB11F113C30001BDD4 /* util.c in Sources */, + 71F3C32811F3CD0B007B9F12 /* cdr-macosx.c in Sources */, + 71F3C32911F3CD0B007B9F12 /* cfg.c in Sources */, + 71F3C32B11F3CD0B007B9F12 /* PluginConfigController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 71F3C47811F3D108007B9F12 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 71F3C47911F3D108007B9F12 /* English */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 71F3C49B11F3D2B3007B9F12 /* DFCdromPluginConfig.nib */ = { + isa = PBXVariantGroup; + children = ( + 71F3C49C11F3D2B3007B9F12 /* English */, + ); + name = DFCdromPluginConfig.nib; + sourceTree = ""; + }; + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 7107359A0FDEED75004AD098 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LIBRARY_STYLE = BUNDLE; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = DFCdrom; + SECTORDER_FLAGS = ""; + SYMROOT = ../../build; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = psxplugin; + }; + name = Development; + }; + 7107359B0FDEED75004AD098 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUGGING_SYMBOLS = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = s; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LIBRARY_STYLE = BUNDLE; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = DFCdrom; + SECTORDER_FLAGS = ""; + SYMROOT = ../../build; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = psxplugin; + ZERO_LINK = NO; + }; + name = Deployment; + }; + 7107359F0FDEED75004AD098 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1"; + HEADER_SEARCH_PATHS = ( + ../../../libpcsxcore, + ../.., + ../../../plugins/dfcdrom, + ); + STRIP_INSTALLED_PRODUCT = NO; + }; + name = Development; + }; + 710735A00FDEED75004AD098 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_MODEL_TUNING = ""; + GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1"; + HEADER_SEARCH_PATHS = ( + ../../../libpcsxcore, + ../.., + ../../../plugins/dfcdrom, + ); + }; + name = Deployment; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 710735990FDEED75004AD098 /* Build configuration list for PBXNativeTarget "DFCdrom" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7107359A0FDEED75004AD098 /* Development */, + 7107359B0FDEED75004AD098 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; + 7107359E0FDEED75004AD098 /* Build configuration list for PBXProject "DFCdrom" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7107359F0FDEED75004AD098 /* Development */, + 710735A00FDEED75004AD098 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/macosx/plugins/DFCdrom/English.lproj/Credits.rtf b/macosx/plugins/DFCdrom/English.lproj/Credits.rtf new file mode 100644 index 00000000..76fa6442 --- /dev/null +++ b/macosx/plugins/DFCdrom/English.lproj/Credits.rtf @@ -0,0 +1,13 @@ +{\rtf1\mac\ansicpg10025\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\b\fs24 \cf0 Original coder: +\f1\b0 \ + linuzappz\ +\ + +\f0\b Macintosh Port: +\f1\b0 \ + Wei Mingzhi} \ No newline at end of file diff --git a/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.nib/classes.nib b/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.nib/classes.nib new file mode 100644 index 00000000..b1e8f6c7 --- /dev/null +++ b/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.nib/classes.nib @@ -0,0 +1,18 @@ +{ + IBClasses = ( + { + ACTIONS = {cancel = id; ok = id; }; + CLASS = DFCdromPluginConfigController; + LANGUAGE = ObjC; + OUTLETS = {CacheSize = NSSlider; Cached = NSControl; CdSpeed = NSPopUpButton; }; + SUPERCLASS = NSWindowController; + }, + { + ACTIONS = {"" = id; }; + CLASS = FirstResponder; + LANGUAGE = ObjC; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.nib/info.nib b/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.nib/info.nib new file mode 100644 index 00000000..f90f50b0 --- /dev/null +++ b/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 117 49 561 249 0 0 1024 746 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8P2137 + + diff --git a/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.nib/keyedobjects.nib b/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..64a50213bb9678058602e4fef294d26b6b34abd1 GIT binary patch literal 8896 zcmb7J349bq)_+ws_mSzjdwLYZwJ1i+!41k02t-H%Oi02RCX-GWGMNc86G8})LI{Y6 zsNjhr1{Cl6zFjX|P?S^GTNf1-{T9}9Rle8VnUGcY^Y>+b>9gupy;uMD-v3qCG{vH+ zbZ+heAV7hE4)kCEBUonj3nwEBqf6vuRX;qWqKSBUzjUIhs$ZgJksL{0S(iIG)kA#3+Y946HYhsI8 zlBHOhHM1qGg)L>RY#GUCZR|p}lC7TEFWwxBeIU5N4q4y;0i56hH+aAcKJbGG0gxaF zr@`sa3(kOS=nZ|KFZ6@{@D~^WXTn)95YC1iI0pv7xsadIj zoJvJ&qOoYYwJ;HnBf1hv4PS+^a4IFIwAQmrLuJw06k;wlr!-U=Zj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xu_(L2yWLSa3veRPemunBcfzVQ^w_Qm{BUC0G(H3r-Kt4$cYA h3)ThegVA6zm literal 0 HcmV?d00001 diff --git a/macosx/plugins/DFCdrom/English.lproj/InfoPlist.strings b/macosx/plugins/DFCdrom/English.lproj/InfoPlist.strings new file mode 100755 index 0000000000000000000000000000000000000000..ea885a5d54cf0a9b4a578d068ff805f167175026 GIT binary patch literal 486 zcmZ{hQIEku6ot>TUor871Y55gFNh`Cl4!!S-4=~iO^ZZ-JiZyLFUVx(cJ4iM&ONu+ zOIr;YeQU2@E%m2Zg(8LIPQ*+(nY|LCA+9*b+*W+IlsbH_1KBO;vqLr1R)y8qP(2+% zhu|Vj;NKCAy6h_Tfts3WDxdoRt=MTAauL{&GXwYef-BI54l + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + DFCdrom + CFBundleIconFile + + CFBundleIdentifier + net.pcsx.DFCdrom + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + CdDI + CFBundleVersion + 1.0 + + diff --git a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.h b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.h new file mode 100644 index 00000000..b7f6fafb --- /dev/null +++ b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.h @@ -0,0 +1,18 @@ +#define PluginConfigController DFCdromPluginConfigController + +#import + +@interface PluginConfigController : NSWindowController +{ + IBOutlet NSControl *Cached; + IBOutlet NSSlider *CacheSize; + IBOutlet NSPopUpButton *CdSpeed; + + NSMutableDictionary *keyValues; +} +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; + +- (void)loadValues; + +@end diff --git a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m new file mode 100644 index 00000000..02b3a76d --- /dev/null +++ b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import "PluginConfigController.h" +#include "cdr.h" + +#define APP_ID @"net.pcsx.DFCdrom" +#define PrefsKey APP_ID @" Settings" + +static PluginConfigController *windowController; + +void AboutDlgProc() +{ + // Get parent application instance + NSApplication *app = [NSApplication sharedApplication]; + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (path) { + credits = [[[NSAttributedString alloc] initWithPath: path + documentAttributes:NULL] autorelease]; + } else { + credits = [[[NSAttributedString alloc] initWithString:@""] autorelease]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + [app orderFrontStandardAboutPanelWithOptions:[NSDictionary dictionaryWithObjectsAndKeys: + [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", + icon, @"ApplicationIcon", + [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", + [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], @"Version", + [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], @"Copyright", + credits, @"Credits", + nil]]; +} + +void ConfDlgProc() +{ + NSWindow *window; + + if (windowController == nil) { + windowController = [[PluginConfigController alloc] initWithWindowNibName:@"DFCdromPluginConfig"]; + } + window = [windowController window]; + + [windowController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; +} + +void ReadConfig() +{ + NSDictionary *keyValues; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: + [[NSMutableDictionary alloc] initWithObjectsAndKeys: + [NSNumber numberWithBool:YES], @"Threaded", + [NSNumber numberWithInt:64], @"Cache Size", + [NSNumber numberWithInt:0], @"Speed", + nil], PrefsKey, nil]]; + + keyValues = [defaults dictionaryForKey:PrefsKey]; + + ReadMode = ([[keyValues objectForKey:@"Threaded"] boolValue] ? THREADED : NORMAL); + CacheSize = [[keyValues objectForKey:@"Cache Size"] intValue]; + CdrSpeed = [[keyValues objectForKey:@"Speed"] intValue]; +} + +@implementation PluginConfigController + +- (IBAction)cancel:(id)sender +{ + [self close]; +} + +- (IBAction)ok:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues]; + + [writeDic setObject:[NSNumber numberWithInt:[Cached intValue]] forKey:@"Threaded"]; + [writeDic setObject:[NSNumber numberWithInt:[CacheSize intValue]] forKey:@"Cache Size"]; + + switch ([CdSpeed indexOfSelectedItem]) { + case 1: [writeDic setObject:[NSNumber numberWithInt:1] forKey:@"Speed"]; break; + case 2: [writeDic setObject:[NSNumber numberWithInt:2] forKey:@"Speed"]; break; + case 3: [writeDic setObject:[NSNumber numberWithInt:4] forKey:@"Speed"]; break; + case 4: [writeDic setObject:[NSNumber numberWithInt:8] forKey:@"Speed"]; break; + case 5: [writeDic setObject:[NSNumber numberWithInt:16] forKey:@"Speed"]; break; + case 6: [writeDic setObject:[NSNumber numberWithInt:32] forKey:@"Speed"]; break; + default: [writeDic setObject:[NSNumber numberWithInt:0] forKey:@"Speed"]; break; + } + + // write to defaults + [defaults setObject:writeDic forKey:PrefsKey]; + [defaults synchronize]; + + // and set global values accordingly + ReadConfig(); + + [self close]; +} + +- (void)loadValues +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + ReadConfig(); + + // load from preferences + [keyValues release]; + keyValues = [[defaults dictionaryForKey:PrefsKey] retain]; + + [Cached setIntValue:[[keyValues objectForKey:@"Threaded"] intValue]]; + [CacheSize setIntValue:[[keyValues objectForKey:@"Cache Size"] intValue]]; + + switch ([[keyValues objectForKey:@"Speed"] intValue]) { + case 1: [CdSpeed selectItemAtIndex:1]; break; + case 2: [CdSpeed selectItemAtIndex:2]; break; + case 4: [CdSpeed selectItemAtIndex:3]; break; + case 8: [CdSpeed selectItemAtIndex:4]; break; + case 16: [CdSpeed selectItemAtIndex:5]; break; + case 32: [CdSpeed selectItemAtIndex:6]; break; + default: [CdSpeed selectItemAtIndex:0]; break; + } +} + +- (void)awakeFromNib +{ +} + +@end diff --git a/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c b/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c new file mode 100644 index 00000000..806b659a --- /dev/null +++ b/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "cdr.h" + +#ifdef _MACOSX + +#include +#include +#include +#include +#include +#include +#include + +int cdHandle = -1; +char cdDevice[4096] = ""; + +static int IsPsxDisc(const char *dev) { + int fd; + char buf[CD_FRAMESIZE_RAW]; + dk_cd_read_t r; + + fd = open(dev, O_RDONLY, 0); + if (fd < 0) return 0; + + memset(&r, 0, sizeof(r)); + + r.offset = msf_to_lba(0, 2, 4) * CD_FRAMESIZE_RAW; + r.sectorArea = 0xF8; + r.sectorType = kCDSectorTypeUnknown; + r.bufferLength = CD_FRAMESIZE_RAW; + r.buffer = buf; + + if (ioctl(fd, DKIOCCDREAD, &r) != kIOReturnSuccess) { + close(fd); + return 0; + } + + close(fd); + + if (strncmp(buf + 56, "Sony Computer Entertainment", 27) == 0) { + return 1; + } + + return 0; +} + +static void FindCdDevice(char *dev) { + io_object_t next_media; + kern_return_t kern_result; + io_iterator_t media_iterator; + CFMutableDictionaryRef classes_to_match; + const char *name, *cd = kIOCDMediaClass, *dvd = kIODVDMediaClass; + + dev[0] = '\0'; + name = cd; + +start: + classes_to_match = IOServiceMatching(name); + if (classes_to_match == NULL) goto end; + + CFDictionarySetValue(classes_to_match, CFSTR(kIOMediaEjectableKey), + kCFBooleanTrue); + + kern_result = IOServiceGetMatchingServices(kIOMasterPortDefault, + classes_to_match, &media_iterator); + + if (kern_result != KERN_SUCCESS) goto end; + + next_media = IOIteratorNext(media_iterator); + if (next_media != 0) { + char psz_buf[0x32]; + size_t dev_path_length; + CFTypeRef str_bsd_path; + + do { + str_bsd_path = IORegistryEntryCreateCFProperty(next_media, + CFSTR(kIOBSDNameKey), kCFAllocatorDefault, 0); + + if (str_bsd_path == NULL) { + IOObjectRelease(next_media); + continue; + } + + strcpy(psz_buf, "/dev/r"); + dev_path_length = strlen(psz_buf); + + if (CFStringGetCString(str_bsd_path, (char *)&psz_buf + dev_path_length, + sizeof(psz_buf) - dev_path_length, kCFStringEncodingASCII)) + { + strcpy(dev, psz_buf); + + if (IsPsxDisc(dev)) { + CFRelease(str_bsd_path); + IOObjectRelease(next_media); + IOObjectRelease(media_iterator); + return; + } + } + + CFRelease(str_bsd_path); + IOObjectRelease(next_media); + } while ((next_media = IOIteratorNext(media_iterator)) != 0); + } + + IOObjectRelease(media_iterator); + +end: + if (dev[0] == '\0') { + if (name == cd) { + name = dvd; // Is this really necessary or correct? Dunno... + goto start; + } + } +} + +int OpenCdHandle(const char *dev) { + if (dev != NULL && dev[0] != '\0') strcpy(cdDevice, dev); + else if (cdDevice[0] == '\0') FindCdDevice(cdDevice); + + cdHandle = open(cdDevice, O_RDONLY, 0); + if (cdHandle < 0) return -1; + + if (CdrSpeed > 0) { + u_int16_t speed = kCDSpeedMin * CdrSpeed; + ioctl(cdHandle, DKIOCCDSETSPEED, &speed); + } + + return 0; +} + +void CloseCdHandle() { + if (cdHandle != -1) close(cdHandle); + cdHandle = -1; +} + +int IsCdHandleOpen() { + return 1; +} + +long GetTN(unsigned char *buffer) { + if (cdHandle < 0) return -1; + + // TODO + buffer[0] = 1; + buffer[1] = 1; + + return 0; +} + +long GetTD(unsigned char track, unsigned char *buffer) { + if (cdHandle < 0) return -1; + + // TODO + memset(buffer + 1, 0, 3); + return 0; +} + +long GetTE(unsigned char track, unsigned char *m, unsigned char *s, unsigned char *f) { + return -1; // TODO +} + +long ReadSector(crdata *cr) { + int lba; + dk_cd_read_t r; + + if (cdHandle < 0) return -1; + + lba = msf_to_lba(cr->msf.cdmsf_min0, cr->msf.cdmsf_sec0, cr->msf.cdmsf_frame0); + + memset(&r, 0, sizeof(r)); + + r.offset = lba * CD_FRAMESIZE_RAW; + r.sectorArea = 0xF8; + r.sectorType = kCDSectorTypeUnknown; + r.bufferLength = CD_FRAMESIZE_RAW; + r.buffer = cr->buf; + + if (ioctl(cdHandle, DKIOCCDREAD, &r) != kIOReturnSuccess) { + return -1; + } + + return 0; +} + +long PlayCDDA(unsigned char *sector) { + return 0; // TODO +} + +long StopCDDA() { + return 0; // TODO +} + +long GetStatus(int playing, struct CdrStat *stat) { + memset(stat, 0, sizeof(struct CdrStat)); + stat->Type = 0x01; + + // Close and reopen the CD handle. If opening failed, + // then there is no CD in drive. + // Note that this WILL be screwed if user inserted another + // removable device such as USB stick when tray is open. + // There may be a better way, but this should do the job. + if (cdHandle >= 0) { + close(cdHandle); + cdHandle = -1; + } + + cdHandle = open(cdDevice, O_RDONLY, 0); + if (cdHandle < 0) { + // No CD in drive + stat->Type = 0xff; + stat->Status |= 0x10; + } else { + if (CdrSpeed > 0) { + u_int16_t speed = kCDSpeedMin * CdrSpeed; + ioctl(cdHandle, DKIOCCDSETSPEED, &speed); + } + } + + return 0; +} + +unsigned char *ReadSub(const unsigned char *time) { + return NULL; // TODO +} + +char *CDRgetDriveLetter(void) { + return cdDevice; +} + +#endif diff --git a/macosx/plugins/DFCdrom/macsrc/cfg.c b/macosx/plugins/DFCdrom/macsrc/cfg.c new file mode 100644 index 00000000..6b5c1513 --- /dev/null +++ b/macosx/plugins/DFCdrom/macsrc/cfg.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "cdr.h" + +void AboutDlgProc(); +void ConfDlgProc(); +void ReadConfig(); + +char CdromDev[256]; +long ReadMode; +long UseSubQ; +long CacheSize; +long CdrSpeed; +long SpinDown; + +void LoadConf() { + strcpy(CdromDev, ""); + ReadMode = THREADED; + UseSubQ = 0; + CacheSize = 64; + CdrSpeed = 0; + SpinDown = SPINDOWN_VENDOR_SPECIFIC; + + ReadConfig(); +} + +long CDRconfigure() { + ConfDlgProc(); + return 0; +} + +void CDRabout() { + AboutDlgProc(); +} \ No newline at end of file diff --git a/macosx/plugins/DFCdrom/version.plist b/macosx/plugins/DFCdrom/version.plist new file mode 100644 index 00000000..a9c51a62 --- /dev/null +++ b/macosx/plugins/DFCdrom/version.plist @@ -0,0 +1,16 @@ + + + + + BuildVersion + 38 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + ProjectName + DFCdrom + SourceVersion + 2350000 + + diff --git a/macosx/plugins/DFInput/DFInput.xcodeproj/project.pbxproj b/macosx/plugins/DFInput/DFInput.xcodeproj/project.pbxproj new file mode 100644 index 00000000..35a8d87e --- /dev/null +++ b/macosx/plugins/DFInput/DFInput.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 2B679862069193F300E2BD4F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B679860069193F300E2BD4F /* Cocoa.framework */; }; + 2B679863069193F300E2BD4F /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B679861069193F300E2BD4F /* IOKit.framework */; }; + 71054DC51204A20900AC2CCB /* begin_code.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DA11204A20900AC2CCB /* begin_code.h */; }; + 71054DC61204A20900AC2CCB /* close_code.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DA21204A20900AC2CCB /* close_code.h */; }; + 71054DC71204A20900AC2CCB /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DA31204A20900AC2CCB /* SDL.h */; }; + 71054DC81204A20900AC2CCB /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DA41204A20900AC2CCB /* SDL_assert.h */; }; + 71054DC91204A20900AC2CCB /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DA51204A20900AC2CCB /* SDL_config.h */; }; + 71054DCA1204A20900AC2CCB /* SDL_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DA61204A20900AC2CCB /* SDL_endian.h */; }; + 71054DCB1204A20900AC2CCB /* SDL_error.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DA71204A20900AC2CCB /* SDL_error.h */; }; + 71054DCC1204A20900AC2CCB /* SDL_haptic.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DA81204A20900AC2CCB /* SDL_haptic.h */; }; + 71054DCD1204A20900AC2CCB /* SDL_joystick.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DA91204A20900AC2CCB /* SDL_joystick.h */; }; + 71054DCE1204A20900AC2CCB /* SDL_main.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DAA1204A20900AC2CCB /* SDL_main.h */; }; + 71054DD01204A20900AC2CCB /* SDL_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DAC1204A20900AC2CCB /* SDL_platform.h */; }; + 71054DD31204A20900AC2CCB /* SDL_stdinc.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DAF1204A20900AC2CCB /* SDL_stdinc.h */; }; + 71054DD61204A20900AC2CCB /* SDL_syshaptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 71054DB51204A20900AC2CCB /* SDL_syshaptic.c */; }; + 71054DD71204A20900AC2CCB /* SDL_haptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 71054DB61204A20900AC2CCB /* SDL_haptic.c */; }; + 71054DD81204A20900AC2CCB /* SDL_haptic_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DB71204A20900AC2CCB /* SDL_haptic_c.h */; }; + 71054DD91204A20900AC2CCB /* SDL_syshaptic.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DB81204A20900AC2CCB /* SDL_syshaptic.h */; }; + 71054DDA1204A20900AC2CCB /* SDL_sysjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 71054DBB1204A20900AC2CCB /* SDL_sysjoystick.c */; }; + 71054DDB1204A20900AC2CCB /* SDL_sysjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DBC1204A20900AC2CCB /* SDL_sysjoystick_c.h */; }; + 71054DDC1204A20900AC2CCB /* SDL_joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 71054DBD1204A20900AC2CCB /* SDL_joystick.c */; }; + 71054DDD1204A20900AC2CCB /* SDL_joystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DBE1204A20900AC2CCB /* SDL_joystick_c.h */; }; + 71054DDE1204A20900AC2CCB /* SDL_sysjoystick.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DBF1204A20900AC2CCB /* SDL_sysjoystick.h */; }; + 71054DDF1204A20900AC2CCB /* SDL.c in Sources */ = {isa = PBXBuildFile; fileRef = 71054DC01204A20900AC2CCB /* SDL.c */; }; + 71054DE21204A20900AC2CCB /* SDL_error.c in Sources */ = {isa = PBXBuildFile; fileRef = 71054DC31204A20900AC2CCB /* SDL_error.c */; }; + 71054DE31204A20900AC2CCB /* SDL_error_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 71054DC41204A20900AC2CCB /* SDL_error_c.h */; }; + 71054E211204A49F00AC2CCB /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 71054E201204A49F00AC2CCB /* ForceFeedback.framework */; }; + 7136F1DA1200E163001973D9 /* ControllerList.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E861A411FF75AC001C1826 /* ControllerList.h */; }; + 7136F1DB1200E163001973D9 /* ControllerList.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E861A511FF75AC001C1826 /* ControllerList.m */; }; + 7136F1DC1200E164001973D9 /* MappingCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E861A811FF75AC001C1826 /* MappingCell.h */; }; + 7136F1DD1200E164001973D9 /* MappingCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E861A911FF75AC001C1826 /* MappingCell.m */; }; + 7136F1DE1200E165001973D9 /* PadController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E861AB11FF75AC001C1826 /* PadController.m */; }; + 7136F1DF1200E165001973D9 /* PadController.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E861AA11FF75AC001C1826 /* PadController.h */; }; + 7136F51A12011BB4001973D9 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 7136F51812011BB4001973D9 /* Credits.rtf */; }; + 714FA82E11FC822A00517F47 /* analog.c in Sources */ = {isa = PBXBuildFile; fileRef = 714FA82A11FC822A00517F47 /* analog.c */; }; + 714FA82F11FC822A00517F47 /* pad.c in Sources */ = {isa = PBXBuildFile; fileRef = 714FA82B11FC822A00517F47 /* pad.c */; }; + 714FA83011FC822A00517F47 /* pad.h in Headers */ = {isa = PBXBuildFile; fileRef = 714FA82C11FC822A00517F47 /* pad.h */; }; + 714FA83111FC822A00517F47 /* sdljoy.c in Sources */ = {isa = PBXBuildFile; fileRef = 714FA82D11FC822A00517F47 /* sdljoy.c */; }; + 714FA8A011FC846800517F47 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 714FA89F11FC846800517F47 /* Carbon.framework */; }; + 714FA8FA11FC863500517F47 /* cfg.c in Sources */ = {isa = PBXBuildFile; fileRef = 714FA8F811FC863500517F47 /* cfg.c */; }; + 714FA8FB11FC863500517F47 /* xkb.c in Sources */ = {isa = PBXBuildFile; fileRef = 714FA8F911FC863500517F47 /* xkb.c */; }; + 7192EAAE1200D54500038B92 /* cfg.h in Headers */ = {isa = PBXBuildFile; fileRef = 7192EAAB1200D54500038B92 /* cfg.h */; }; + 71E861B611FF75AC001C1826 /* PadView.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E861AC11FF75AC001C1826 /* PadView.h */; }; + 71E861B711FF75AC001C1826 /* PadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E861AD11FF75AC001C1826 /* PadView.m */; }; + 71E861BC11FF75BA001C1826 /* NetPcsxHIDInputPluginMain.nib in Resources */ = {isa = PBXBuildFile; fileRef = 71E861BA11FF75BA001C1826 /* NetPcsxHIDInputPluginMain.nib */; }; + 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; }; + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; + 2B679860069193F300E2BD4F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 2B679861069193F300E2BD4F /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; + 71054DA11204A20900AC2CCB /* begin_code.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = begin_code.h; sourceTree = ""; }; + 71054DA21204A20900AC2CCB /* close_code.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = close_code.h; sourceTree = ""; }; + 71054DA31204A20900AC2CCB /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL.h; sourceTree = ""; }; + 71054DA41204A20900AC2CCB /* SDL_assert.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_assert.h; sourceTree = ""; }; + 71054DA51204A20900AC2CCB /* SDL_config.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_config.h; sourceTree = ""; }; + 71054DA61204A20900AC2CCB /* SDL_endian.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_endian.h; sourceTree = ""; }; + 71054DA71204A20900AC2CCB /* SDL_error.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_error.h; sourceTree = ""; }; + 71054DA81204A20900AC2CCB /* SDL_haptic.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_haptic.h; sourceTree = ""; }; + 71054DA91204A20900AC2CCB /* SDL_joystick.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_joystick.h; sourceTree = ""; }; + 71054DAA1204A20900AC2CCB /* SDL_main.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_main.h; sourceTree = ""; }; + 71054DAC1204A20900AC2CCB /* SDL_platform.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_platform.h; sourceTree = ""; }; + 71054DAF1204A20900AC2CCB /* SDL_stdinc.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_stdinc.h; sourceTree = ""; }; + 71054DB51204A20900AC2CCB /* SDL_syshaptic.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; path = SDL_syshaptic.c; sourceTree = ""; }; + 71054DB61204A20900AC2CCB /* SDL_haptic.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; path = SDL_haptic.c; sourceTree = ""; }; + 71054DB71204A20900AC2CCB /* SDL_haptic_c.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_haptic_c.h; sourceTree = ""; }; + 71054DB81204A20900AC2CCB /* SDL_syshaptic.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_syshaptic.h; sourceTree = ""; }; + 71054DBB1204A20900AC2CCB /* SDL_sysjoystick.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; path = SDL_sysjoystick.c; sourceTree = ""; }; + 71054DBC1204A20900AC2CCB /* SDL_sysjoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_sysjoystick_c.h; sourceTree = ""; }; + 71054DBD1204A20900AC2CCB /* SDL_joystick.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; path = SDL_joystick.c; sourceTree = ""; }; + 71054DBE1204A20900AC2CCB /* SDL_joystick_c.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_joystick_c.h; sourceTree = ""; }; + 71054DBF1204A20900AC2CCB /* SDL_sysjoystick.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_sysjoystick.h; sourceTree = ""; }; + 71054DC01204A20900AC2CCB /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; path = SDL.c; sourceTree = ""; }; + 71054DC31204A20900AC2CCB /* SDL_error.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; path = SDL_error.c; sourceTree = ""; }; + 71054DC41204A20900AC2CCB /* SDL_error_c.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = SDL_error_c.h; sourceTree = ""; }; + 71054E201204A49F00AC2CCB /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = /System/Library/Frameworks/ForceFeedback.framework; sourceTree = ""; }; + 7136F51912011BB4001973D9 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = ""; }; + 714FA82A11FC822A00517F47 /* analog.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = analog.c; path = ../../../plugins/dfinput/analog.c; sourceTree = SOURCE_ROOT; }; + 714FA82B11FC822A00517F47 /* pad.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = pad.c; path = ../../../plugins/dfinput/pad.c; sourceTree = SOURCE_ROOT; }; + 714FA82C11FC822A00517F47 /* pad.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = pad.h; path = ../../../plugins/dfinput/pad.h; sourceTree = SOURCE_ROOT; }; + 714FA82D11FC822A00517F47 /* sdljoy.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = sdljoy.c; path = ../../../plugins/dfinput/sdljoy.c; sourceTree = SOURCE_ROOT; }; + 714FA89F11FC846800517F47 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + 714FA8F811FC863500517F47 /* cfg.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = cfg.c; path = macsrc/cfg.c; sourceTree = ""; }; + 714FA8F911FC863500517F47 /* xkb.c */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.c; name = xkb.c; path = macsrc/xkb.c; sourceTree = ""; }; + 7192EAAB1200D54500038B92 /* cfg.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = cfg.h; path = macsrc/cfg.h; sourceTree = ""; }; + 71E861A411FF75AC001C1826 /* ControllerList.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = ControllerList.h; path = macsrc/ControllerList.h; sourceTree = ""; }; + 71E861A511FF75AC001C1826 /* ControllerList.m */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.objc; name = ControllerList.m; path = macsrc/ControllerList.m; sourceTree = ""; }; + 71E861A811FF75AC001C1826 /* MappingCell.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = MappingCell.h; path = macsrc/MappingCell.h; sourceTree = ""; }; + 71E861A911FF75AC001C1826 /* MappingCell.m */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.objc; name = MappingCell.m; path = macsrc/MappingCell.m; sourceTree = ""; }; + 71E861AA11FF75AC001C1826 /* PadController.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = PadController.h; path = macsrc/PadController.h; sourceTree = ""; }; + 71E861AB11FF75AC001C1826 /* PadController.m */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.objc; name = PadController.m; path = macsrc/PadController.m; sourceTree = ""; }; + 71E861AC11FF75AC001C1826 /* PadView.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; name = PadView.h; path = macsrc/PadView.h; sourceTree = ""; }; + 71E861AD11FF75AC001C1826 /* PadView.m */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.objc; name = PadView.m; path = macsrc/PadView.m; sourceTree = ""; }; + 71E861BB11FF75BA001C1826 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/NetPcsxHIDInputPluginMain.nib; sourceTree = ""; }; + 8D576316048677EA00EA77CD /* DFInput.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DFInput.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D576313048677EA00EA77CD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */, + 2B679862069193F300E2BD4F /* Cocoa.framework in Frameworks */, + 2B679863069193F300E2BD4F /* IOKit.framework in Frameworks */, + 714FA8A011FC846800517F47 /* Carbon.framework in Frameworks */, + 71054E211204A49F00AC2CCB /* ForceFeedback.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* DFInput */ = { + isa = PBXGroup; + children = ( + 714FA82911FC820D00517F47 /* macsrc */, + 714FA82811FC820900517F47 /* src */, + 71054D9F1204A20900AC2CCB /* SDL */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB6FE9D52B211CA2CBB /* Products */, + ); + name = DFInput; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 71054E201204A49F00AC2CCB /* ForceFeedback.framework */, + 714FA89F11FC846800517F47 /* Carbon.framework */, + 2B679860069193F300E2BD4F /* Cocoa.framework */, + 2B679861069193F300E2BD4F /* IOKit.framework */, + 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 7136F51812011BB4001973D9 /* Credits.rtf */, + 71E861BA11FF75BA001C1826 /* NetPcsxHIDInputPluginMain.nib */, + 8D576317048677EA00EA77CD /* Info.plist */, + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 19C28FB6FE9D52B211CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D576316048677EA00EA77CD /* DFInput.psxplugin */, + ); + name = Products; + sourceTree = ""; + }; + 71054D9F1204A20900AC2CCB /* SDL */ = { + isa = PBXGroup; + children = ( + 71054DA01204A20900AC2CCB /* include */, + 71054DB21204A20900AC2CCB /* src */, + ); + path = SDL; + sourceTree = ""; + }; + 71054DA01204A20900AC2CCB /* include */ = { + isa = PBXGroup; + children = ( + 71054DA11204A20900AC2CCB /* begin_code.h */, + 71054DA21204A20900AC2CCB /* close_code.h */, + 71054DA31204A20900AC2CCB /* SDL.h */, + 71054DA41204A20900AC2CCB /* SDL_assert.h */, + 71054DA51204A20900AC2CCB /* SDL_config.h */, + 71054DA61204A20900AC2CCB /* SDL_endian.h */, + 71054DA71204A20900AC2CCB /* SDL_error.h */, + 71054DA81204A20900AC2CCB /* SDL_haptic.h */, + 71054DA91204A20900AC2CCB /* SDL_joystick.h */, + 71054DAA1204A20900AC2CCB /* SDL_main.h */, + 71054DAC1204A20900AC2CCB /* SDL_platform.h */, + 71054DAF1204A20900AC2CCB /* SDL_stdinc.h */, + ); + path = include; + sourceTree = ""; + }; + 71054DB21204A20900AC2CCB /* src */ = { + isa = PBXGroup; + children = ( + 71054DB31204A20900AC2CCB /* haptic */, + 71054DB91204A20900AC2CCB /* joystick */, + 71054DC01204A20900AC2CCB /* SDL.c */, + 71054DC31204A20900AC2CCB /* SDL_error.c */, + 71054DC41204A20900AC2CCB /* SDL_error_c.h */, + ); + path = src; + sourceTree = ""; + }; + 71054DB31204A20900AC2CCB /* haptic */ = { + isa = PBXGroup; + children = ( + 71054DB41204A20900AC2CCB /* darwin */, + 71054DB61204A20900AC2CCB /* SDL_haptic.c */, + 71054DB71204A20900AC2CCB /* SDL_haptic_c.h */, + 71054DB81204A20900AC2CCB /* SDL_syshaptic.h */, + ); + path = haptic; + sourceTree = ""; + }; + 71054DB41204A20900AC2CCB /* darwin */ = { + isa = PBXGroup; + children = ( + 71054DB51204A20900AC2CCB /* SDL_syshaptic.c */, + ); + path = darwin; + sourceTree = ""; + }; + 71054DB91204A20900AC2CCB /* joystick */ = { + isa = PBXGroup; + children = ( + 71054DBA1204A20900AC2CCB /* darwin */, + 71054DBD1204A20900AC2CCB /* SDL_joystick.c */, + 71054DBE1204A20900AC2CCB /* SDL_joystick_c.h */, + 71054DBF1204A20900AC2CCB /* SDL_sysjoystick.h */, + ); + path = joystick; + sourceTree = ""; + }; + 71054DBA1204A20900AC2CCB /* darwin */ = { + isa = PBXGroup; + children = ( + 71054DBB1204A20900AC2CCB /* SDL_sysjoystick.c */, + 71054DBC1204A20900AC2CCB /* SDL_sysjoystick_c.h */, + ); + path = darwin; + sourceTree = ""; + }; + 714FA82811FC820900517F47 /* src */ = { + isa = PBXGroup; + children = ( + 714FA82A11FC822A00517F47 /* analog.c */, + 714FA82B11FC822A00517F47 /* pad.c */, + 714FA82C11FC822A00517F47 /* pad.h */, + 714FA82D11FC822A00517F47 /* sdljoy.c */, + ); + name = src; + sourceTree = ""; + }; + 714FA82911FC820D00517F47 /* macsrc */ = { + isa = PBXGroup; + children = ( + 71E861A411FF75AC001C1826 /* ControllerList.h */, + 71E861A511FF75AC001C1826 /* ControllerList.m */, + 71E861A811FF75AC001C1826 /* MappingCell.h */, + 71E861A911FF75AC001C1826 /* MappingCell.m */, + 71E861AA11FF75AC001C1826 /* PadController.h */, + 71E861AB11FF75AC001C1826 /* PadController.m */, + 71E861AC11FF75AC001C1826 /* PadView.h */, + 71E861AD11FF75AC001C1826 /* PadView.m */, + 714FA8F811FC863500517F47 /* cfg.c */, + 7192EAAB1200D54500038B92 /* cfg.h */, + 714FA8F911FC863500517F47 /* xkb.c */, + ); + name = macsrc; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8D57630E048677EA00EA77CD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 714FA83011FC822A00517F47 /* pad.h in Headers */, + 71E861B611FF75AC001C1826 /* PadView.h in Headers */, + 7192EAAE1200D54500038B92 /* cfg.h in Headers */, + 7136F1DA1200E163001973D9 /* ControllerList.h in Headers */, + 7136F1DC1200E164001973D9 /* MappingCell.h in Headers */, + 7136F1DF1200E165001973D9 /* PadController.h in Headers */, + 71054DC51204A20900AC2CCB /* begin_code.h in Headers */, + 71054DC61204A20900AC2CCB /* close_code.h in Headers */, + 71054DC71204A20900AC2CCB /* SDL.h in Headers */, + 71054DC81204A20900AC2CCB /* SDL_assert.h in Headers */, + 71054DC91204A20900AC2CCB /* SDL_config.h in Headers */, + 71054DCA1204A20900AC2CCB /* SDL_endian.h in Headers */, + 71054DCB1204A20900AC2CCB /* SDL_error.h in Headers */, + 71054DCC1204A20900AC2CCB /* SDL_haptic.h in Headers */, + 71054DCD1204A20900AC2CCB /* SDL_joystick.h in Headers */, + 71054DCE1204A20900AC2CCB /* SDL_main.h in Headers */, + 71054DD01204A20900AC2CCB /* SDL_platform.h in Headers */, + 71054DD31204A20900AC2CCB /* SDL_stdinc.h in Headers */, + 71054DD81204A20900AC2CCB /* SDL_haptic_c.h in Headers */, + 71054DD91204A20900AC2CCB /* SDL_syshaptic.h in Headers */, + 71054DDB1204A20900AC2CCB /* SDL_sysjoystick_c.h in Headers */, + 71054DDD1204A20900AC2CCB /* SDL_joystick_c.h in Headers */, + 71054DDE1204A20900AC2CCB /* SDL_sysjoystick.h in Headers */, + 71054DE31204A20900AC2CCB /* SDL_error_c.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8D57630D048677EA00EA77CD /* DFInput */ = { + isa = PBXNativeTarget; + buildConfigurationList = 71155B0C0FDFA2DE00EC0BC5 /* Build configuration list for PBXNativeTarget "DFInput" */; + buildPhases = ( + 8D57630E048677EA00EA77CD /* Headers */, + 8D57630F048677EA00EA77CD /* Resources */, + 8D576311048677EA00EA77CD /* Sources */, + 8D576313048677EA00EA77CD /* Frameworks */, + 8D576315048677EA00EA77CD /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DFInput; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = DFInput; + productReference = 8D576316048677EA00EA77CD /* DFInput.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 71155B110FDFA2DE00EC0BC5 /* Build configuration list for PBXProject "DFInput" */; + hasScannedForEncodings = 1; + mainGroup = 089C166AFE841209C02AAC07 /* DFInput */; + projectDirPath = ""; + targets = ( + 8D57630D048677EA00EA77CD /* DFInput */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D57630F048677EA00EA77CD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, + 71E861BC11FF75BA001C1826 /* NetPcsxHIDInputPluginMain.nib in Resources */, + 7136F51A12011BB4001973D9 /* Credits.rtf in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 8D576315048677EA00EA77CD /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D576311048677EA00EA77CD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 714FA82E11FC822A00517F47 /* analog.c in Sources */, + 714FA82F11FC822A00517F47 /* pad.c in Sources */, + 714FA83111FC822A00517F47 /* sdljoy.c in Sources */, + 714FA8FA11FC863500517F47 /* cfg.c in Sources */, + 714FA8FB11FC863500517F47 /* xkb.c in Sources */, + 71E861B711FF75AC001C1826 /* PadView.m in Sources */, + 7136F1DB1200E163001973D9 /* ControllerList.m in Sources */, + 7136F1DD1200E164001973D9 /* MappingCell.m in Sources */, + 7136F1DE1200E165001973D9 /* PadController.m in Sources */, + 71054DD61204A20900AC2CCB /* SDL_syshaptic.c in Sources */, + 71054DD71204A20900AC2CCB /* SDL_haptic.c in Sources */, + 71054DDA1204A20900AC2CCB /* SDL_sysjoystick.c in Sources */, + 71054DDC1204A20900AC2CCB /* SDL_joystick.c in Sources */, + 71054DDF1204A20900AC2CCB /* SDL.c in Sources */, + 71054DE21204A20900AC2CCB /* SDL_error.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 7136F51812011BB4001973D9 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 7136F51912011BB4001973D9 /* English */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 71E861BA11FF75BA001C1826 /* NetPcsxHIDInputPluginMain.nib */ = { + isa = PBXVariantGroup; + children = ( + 71E861BB11FF75BA001C1826 /* English */, + ); + name = NetPcsxHIDInputPluginMain.nib; + sourceTree = ""; + }; + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 71155B0D0FDFA2DE00EC0BC5 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEBUGGING_SYMBOLS = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + HEADER_SEARCH_PATHS = ( + ../../../libpcsxcore, + ../HID, + Utilities, + Source, + ./HID, + Utilities, + Source, + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LIBRARY_SEARCH_PATHS = .; + LIBRARY_STYLE = BUNDLE; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = DFInput; + SECTORDER_FLAGS = ""; + SYMROOT = ../../build; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = psxplugin; + }; + name = Development; + }; + 71155B0E0FDFA2DE00EC0BC5 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUGGING_SYMBOLS = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = s; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + HEADER_SEARCH_PATHS = ( + ../../../libpcsxcore, + ../HID, + Utilities, + Source, + ./HID, + Utilities, + Source, + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LIBRARY_SEARCH_PATHS = .; + LIBRARY_STYLE = BUNDLE; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = DFInput; + SECTORDER_FLAGS = ""; + SYMROOT = ../../build; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = psxplugin; + ZERO_LINK = NO; + }; + name = Deployment; + }; + 71155B120FDFA2DE00EC0BC5 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1"; + HEADER_SEARCH_PATHS = ( + ../../../libpcsxcore, + ../.., + ../../../plugins/dfinput, + ../../../plugins/dfinput, + ../../../../plugins/dfinput, + ./SDL, + ./SDL/include, + ); + STRIP_INSTALLED_PRODUCT = NO; + }; + name = Development; + }; + 71155B130FDFA2DE00EC0BC5 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1"; + HEADER_SEARCH_PATHS = ( + ../../../libpcsxcore, + ../.., + ../../../plugins/dfinput, + ../../../../plugins/dfinput, + ./SDL, + ./SDL/include, + ../include, + ); + }; + name = Deployment; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 71155B0C0FDFA2DE00EC0BC5 /* Build configuration list for PBXNativeTarget "DFInput" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71155B0D0FDFA2DE00EC0BC5 /* Development */, + 71155B0E0FDFA2DE00EC0BC5 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; + 71155B110FDFA2DE00EC0BC5 /* Build configuration list for PBXProject "DFInput" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71155B120FDFA2DE00EC0BC5 /* Development */, + 71155B130FDFA2DE00EC0BC5 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/macosx/plugins/DFInput/English.lproj/Credits.rtf b/macosx/plugins/DFInput/English.lproj/Credits.rtf new file mode 100644 index 00000000..1a837294 --- /dev/null +++ b/macosx/plugins/DFInput/English.lproj/Credits.rtf @@ -0,0 +1,17 @@ +{\rtf1\mac\ansicpg10025\cocoartf824\cocoasubrtf420 +{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\vieww9000\viewh9000\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\b\fs24 \cf0 Macintosh Port: +\f1\b0 \ + Wei Mingzhi\ + Gil Pedersen\ +\ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural + +\f0\b \cf0 Original coder: +\f1\b0 \ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural +\cf0 Wei Mingzhi} \ No newline at end of file diff --git a/macosx/plugins/DFInput/English.lproj/InfoPlist.strings b/macosx/plugins/DFInput/English.lproj/InfoPlist.strings new file mode 100755 index 0000000000000000000000000000000000000000..74d15f4552fbccf49d8a672d6ea1a50d5a3e6b51 GIT binary patch literal 612 zcmb7>-D<)>5QWdRPZ7Knsi}8GdQ(L$XebS|-o|QTP?Hd&(7aJ!vi95c2b2_)u$kT2 zGiTgsWCxH2$?;Z43K#IEgE&^x8hROa?}1ukNmgxXF8zpn)q zIb0vM<}|raCbxAFJk`A~wK{r4o%>Ip0qn)ug + + + + IBDocumentLocation + 54 67 576 240 0 0 1024 746 + IBEditorPositions + + 16 + 293 323 437 378 0 0 1024 746 + + IBFramework Version + 446.1 + IBOpenObjects + + 16 + + IBSystem Version + 8P2137 + + diff --git a/macosx/plugins/DFInput/English.lproj/NetPcsxHIDInputPluginMain.nib/keyedobjects.nib b/macosx/plugins/DFInput/English.lproj/NetPcsxHIDInputPluginMain.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..793f3948c1011161d7a5e30d0251d0bd5a3d4bdd GIT binary patch literal 12060 zcmb7q33yY*`uEJ7NwYLfPm*SDvqwa>rUgpjB9xY;7ioc(eJP<0B{WS+k^-exCLpMQ z3vP(0K-m;UM6L_s!Xg5f>kf!0DvG!PD&Te3?>*-v1(*AL&%b?=v(3EoF28r1lj%+2 zP&|>Je*|Gf5Qiv|p$sHPstMjetafH-PB1p!3t#b2G*azNM4QHYqtj;vYZLJrKD(l7 zc(5f{SCSg2LwL#BH<1D+#~blZ{33n{zl`_eSM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xl3~I%w3cFeC~_6yL0#E?#tbudm#72Jd{WBXkJF1B2Sg4&eP^C$-66WRo?2n=ks37 z+nu*JZ(rX2yaRb3*}K@g*?ZXi_Ck9vdvALmdtduM?EURS?8EHM_PO>Jd#k<8zQCTe zFS0MT-)X+fUoi*gv;_VgJg0&LMML<+$2$jialh zyCdIG;OOTV;s`n-js=dSW07OA<0i)nN4sN#W0T`y#}>y9$IFga90wi$cKpZjp5v_J zyyF|k1;-_4hSTJmj6);VW5XF6v&!_GG60%y{>$hp{g ztMeh}T4%d+gL9K}yK}GeW#=o-gU)|Dk2*hanOqi^&6VeJxLhue%jfFk>g?*`>gMX< z^1BLMym#?pZE{=O zHg}%e;dZ$_ZlAl8yR*BCyPLa*+wU%P_i`7xi{1U){oMoHCGJx9VE0gWxqGzxCigAw zW$s(ux4T!k?{eScUg=)tUhRI+y~e%Hz23diz1jVU`%(8+_cr%-_YU_{?q}RP-Mice z-EXQQ^Fo~u2*J%c@?JvE-0o(4~&C+eB!Y4x;u7I<#`- z4)4?6o!;lYFM0QR_j?a|4|`wpzUe*UeaCykd(!)n_Y?0K?-$;)-mkqEyx)0$@c!)m z&4+!QPv(>Rl)g+~mM`0<_33>EpUG$O*?f6EhtK8n_&INvm1z*p-F`x<>w-#lL%yqSSN0z0+BAAMFj JroVm5{~tP~V1obv literal 0 HcmV?d00001 diff --git a/macosx/plugins/DFInput/Info.plist b/macosx/plugins/DFInput/Info.plist new file mode 100644 index 00000000..d0fd8ead --- /dev/null +++ b/macosx/plugins/DFInput/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + DFInput + CFBundleIconFile + + CFBundleIdentifier + net.pcsx.DFInputPlugin + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + DFI + CFBundleVersion + 1.0 + CFPlugInDynamicRegisterFunction + + CFPlugInDynamicRegistration + NO + CFPlugInFactories + + 00000000-0000-0000-0000-000000000000 + MyFactoryFunction + + CFPlugInTypes + + 00000000-0000-0000-0000-000000000000 + + 00000000-0000-0000-0000-000000000000 + + + CFPlugInUnloadFunction + + + diff --git a/macosx/plugins/DFInput/SDL/include/SDL.h b/macosx/plugins/DFInput/SDL/include/SDL.h new file mode 100644 index 00000000..6032d95c --- /dev/null +++ b/macosx/plugins/DFInput/SDL/include/SDL.h @@ -0,0 +1,151 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ +// 7/31/2010 Wei Mingzhi +// Removed everything unrated to Mac OS X Joystick support + +/** + * \file SDL.h + * + * Main include header for the SDL library + */ + +/** + * \mainpage Simple DirectMedia Layer (SDL) + * + * http://www.libsdl.org/ + * + * \section intro_sec Introduction + * + * This is the Simple DirectMedia Layer, a general API that provides low + * level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, + * and 2D framebuffer across multiple platforms. + * + * The current version supports Windows, Windows CE, Mac OS X, Linux, + * FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, and QNX. The code contains + * support for other operating systems but those are not officially supported. + * + * SDL is written in C, but works with C++ natively, and has bindings to + * several other languages, including Ada, C#, Eiffel, Erlang, Euphoria, + * Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, + * Pike, Pliant, Python, Ruby, and Smalltalk. + * + * This library is distributed under GNU LGPL version 2, which can be + * found in the file "COPYING". This license allows you to use SDL + * freely in commercial programs as long as you link with the dynamic + * library. + * + * The best way to learn how to use SDL is to check out the header files in + * the "include" subdirectory and the programs in the "test" subdirectory. + * The header files and test programs are well commented and always up to date. + * More documentation is available in HTML format in "docs/index.html", and + * a documentation wiki is available online at: + * http://www.libsdl.org/cgi/docwiki.cgi + * + * The test programs in the "test" subdirectory are in the public domain. + * + * Frequently asked questions are answered online: + * http://www.libsdl.org/faq.php + * + * If you need help with the library, or just want to discuss SDL related + * issues, you can join the developers mailing list: + * http://www.libsdl.org/mailing-list.php + * + * Enjoy! + * Sam Lantinga (slouken@libsdl.org) + */ + +#ifndef _SDL_H +#define _SDL_H + +#include "SDL_main.h" +#include "SDL_stdinc.h" +#include "SDL_endian.h" +#include "SDL_error.h" + +#ifndef SDL_IGNORE +#define SDL_IGNORE 0 +#endif + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +#endif + +/* As of version 0.5, SDL is loaded dynamically into the application */ + +/** + * \name SDL_INIT_* + * + * These are the flags which may be passed to SDL_Init(). You should + * specify the subsystems which you will be using in your application. + */ +/*@{*/ +#define SDL_INIT_JOYSTICK 0x00000200 +#define SDL_INIT_HAPTIC 0x00001000 +#define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */ +#define SDL_INIT_EVERYTHING 0x0000FFFF +/*@}*/ + +/** + * This function loads the SDL dynamically linked library and initializes + * the subsystems specified by \c flags (and those satisfying dependencies). + * Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup + * signal handlers for some commonly ignored fatal signals (like SIGSEGV). + */ +extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags); + +/** + * This function initializes specific SDL subsystems + */ +extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags); + +/** + * This function cleans up specific SDL subsystems + */ +extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags); + +/** + * This function returns mask of the specified subsystems which have + * been initialized. + * + * If \c flags is 0, it returns a mask of all initialized subsystems. + */ +extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags); + +/** + * This function cleans up all initialized subsystems and unloads the + * dynamically linked library. You should call it upon all exit conditions. + */ +extern DECLSPEC void SDLCALL SDL_Quit(void); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_H */ diff --git a/macosx/plugins/DFInput/SDL/include/SDL_config.h b/macosx/plugins/DFInput/SDL/include/SDL_config.h new file mode 100644 index 00000000..81eda63c --- /dev/null +++ b/macosx/plugins/DFInput/SDL/include/SDL_config.h @@ -0,0 +1,313 @@ +/* include/SDL_config.h. Generated from SDL_config.h.in by configure. */ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2009 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 +*/ + +#ifndef _SDL_config_h +#define _SDL_config_h + +/** + * \file SDL_config.h.in + * + * This is a set of defines to configure the SDL features + */ + +/* General platform specific identifiers */ +#include "SDL_platform.h" + +/* Make sure that this isn't included by Visual C++ */ +#ifdef _MSC_VER +#error You should copy include/SDL_config.h.default to include/SDL_config.h +#endif + +/* C language features */ +/* #undef const */ +/* #undef inline */ +/* #undef volatile */ + +/* C datatypes */ +#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H) +/* #undef size_t */ +/* #undef int8_t */ +/* #undef uint8_t */ +/* #undef int16_t */ +/* #undef uint16_t */ +/* #undef int32_t */ +/* #undef uint32_t */ +/* #undef int64_t */ +/* #undef uint64_t */ +/* #undef uintptr_t */ +#endif /* !_STDINT_H_ && !HAVE_STDINT_H */ + +#define SIZEOF_VOIDP 4 +#define SDL_HAS_64BIT_TYPE 1 + +/* Comment this if you want to build without any C library requirements */ +#define HAVE_LIBC 1 +#if HAVE_LIBC + +/* Useful headers */ +#define HAVE_ALLOCA_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_STDIO_H 1 +#define STDC_HEADERS 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STDARG_H 1 +/* #undef HAVE_MALLOC_H */ +#define HAVE_MEMORY_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_MATH_H 1 +#define HAVE_ICONV_H 1 +#define HAVE_SIGNAL_H 1 +/* #undef HAVE_ALTIVEC_H */ + +/* C library functions */ +#define HAVE_MALLOC 1 +#define HAVE_CALLOC 1 +#define HAVE_REALLOC 1 +#define HAVE_FREE 1 +#define HAVE_ALLOCA 1 +#ifndef _WIN32 /* Don't use C runtime versions of these on Windows */ +#define HAVE_GETENV 1 +#define HAVE_SETENV 1 +#define HAVE_PUTENV 1 +#define HAVE_UNSETENV 1 +#endif +#define HAVE_QSORT 1 +#define HAVE_ABS 1 +#define HAVE_BCOPY 1 +#define HAVE_MEMSET 1 +#define HAVE_MEMCPY 1 +#define HAVE_MEMMOVE 1 +#define HAVE_MEMCMP 1 +#define HAVE_STRLEN 1 +#define HAVE_STRLCPY 1 +#define HAVE_STRLCAT 1 +#define HAVE_STRDUP 1 +/* #undef HAVE__STRREV */ +/* #undef HAVE__STRUPR */ +/* #undef HAVE__STRLWR */ +/* #undef HAVE_INDEX */ +/* #undef HAVE_RINDEX */ +#define HAVE_STRCHR 1 +#define HAVE_STRRCHR 1 +#define HAVE_STRSTR 1 +/* #undef HAVE_ITOA */ +/* #undef HAVE__LTOA */ +/* #undef HAVE__UITOA */ +/* #undef HAVE__ULTOA */ +#define HAVE_STRTOL 1 +#define HAVE_STRTOUL 1 +/* #undef HAVE__I64TOA */ +/* #undef HAVE__UI64TOA */ +#define HAVE_STRTOLL 1 +#define HAVE_STRTOULL 1 +#define HAVE_STRTOD 1 +#define HAVE_ATOI 1 +#define HAVE_ATOF 1 +#define HAVE_STRCMP 1 +#define HAVE_STRNCMP 1 +/* #undef HAVE__STRICMP */ +#define HAVE_STRCASECMP 1 +/* #undef HAVE__STRNICMP */ +#define HAVE_STRNCASECMP 1 +#define HAVE_SSCANF 1 +#define HAVE_SNPRINTF 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_M_PI +#define HAVE_CEIL 1 +#define HAVE_COPYSIGN 1 +#define HAVE_COS 1 +#define HAVE_COSF 1 +#define HAVE_FABS 1 +#define HAVE_FLOOR 1 +#define HAVE_LOG 1 +#define HAVE_POW 1 +#define HAVE_SCALBN 1 +#define HAVE_SIN 1 +#define HAVE_SINF 1 +#define HAVE_SQRT 1 +#define HAVE_SIGACTION 1 +#define HAVE_SETJMP 1 +#define HAVE_NANOSLEEP 1 +#define HAVE_SYSCONF 1 +#define HAVE_SYSCTLBYNAME 1 +/* #undef HAVE_CLOCK_GETTIME */ +/* #undef HAVE_GETPAGESIZE */ +#define HAVE_MPROTECT 1 + +#else +/* We may need some replacement for stdarg.h here */ +#include +#endif /* HAVE_LIBC */ + +/* SDL internal assertion support */ +/* #undef SDL_DEFAULT_ASSERT_LEVEL */ + +/* Allow disabling of core subsystems */ +#define SDL_AUDIO_DISABLED 1 +#define SDL_CPUINFO_DISABLED 1 +#define SDL_EVENTS_DISABLED 1 +#define SDL_FILE_DISABLED 1 +/* #undef SDL_JOYSTICK_DISABLED */ +/* #undef SDL_HAPTIC_DISABLED */ +#define SDL_LOADSO_DISABLED 1 +#define SDL_THREADS_DISABLED 1 +#define SDL_TIMERS_DISABLED 1 +#define SDL_VIDEO_DISABLED 1 +#define SDL_POWER_DISABLED 1 + +/* Enable various audio drivers */ +/* #undef SDL_AUDIO_DRIVER_ALSA */ +/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */ +/* #undef SDL_AUDIO_DRIVER_ARTS */ +/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */ +/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */ +/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */ +/* #undef SDL_AUDIO_DRIVER_BEOSAUDIO */ +/* #undef SDL_AUDIO_DRIVER_BSD */ +/* #undef SDL_AUDIO_DRIVER_COREAUDIO */ +/* #undef SDL_AUDIO_DRIVER_DISK */ +/* #undef SDL_AUDIO_DRIVER_DUMMY */ +/* #undef SDL_AUDIO_DRIVER_DMEDIA */ +/* #undef SDL_AUDIO_DRIVER_DSOUND */ +/* #undef SDL_AUDIO_DRIVER_ESD */ +/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */ +/* #undef SDL_AUDIO_DRIVER_MMEAUDIO */ +/* #undef SDL_AUDIO_DRIVER_NAS */ +/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */ +/* #undef SDL_AUDIO_DRIVER_NDS */ +/* #undef SDL_AUDIO_DRIVER_OSS */ +/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */ +/* #undef SDL_AUDIO_DRIVER_PAUDIO */ +/* #undef SDL_AUDIO_DRIVER_QSA */ +/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */ +/* #undef SDL_AUDIO_DRIVER_WINWAVEOUT */ +/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */ +/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */ + +/* Enable various input drivers */ +/* #undef SDL_INPUT_LINUXEV */ +/* #undef SDL_INPUT_TSLIB */ +/* #undef SDL_JOYSTICK_BEOS */ +/* #undef SDL_JOYSTICK_DINPUT */ +/* #undef SDL_JOYSTICK_DUMMY */ +#define SDL_JOYSTICK_IOKIT 1 +/* #undef SDL_JOYSTICK_LINUX */ +/* #undef SDL_JOYSTICK_NDS */ +/* #undef SDL_JOYSTICK_RISCOS */ +/* #undef SDL_JOYSTICK_WINMM */ +/* #undef SDL_JOYSTICK_USBHID */ +/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */ +/* #undef SDL_HAPTIC_DUMMY */ +/* #undef SDL_HAPTIC_LINUX */ +#define SDL_HAPTIC_IOKIT 1 +/* #undef SDL_HAPTIC_DINPUT */ + +/* Enable various shared object loading systems */ +/* #undef SDL_LOADSO_BEOS */ +/* #undef SDL_LOADSO_DLCOMPAT */ +/* #undef SDL_LOADSO_DLOPEN */ +/* #undef SDL_LOADSO_DUMMY */ +/* #undef SDL_LOADSO_LDG */ +/* #undef SDL_LOADSO_WIN32 */ + +/* Enable various threading systems */ +/* #undef SDL_THREAD_BEOS */ +/* #undef SDL_THREAD_NDS */ +/* #undef SDL_THREAD_PTHREAD */ +/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX */ +/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */ +/* #undef SDL_THREAD_SPROC */ +/* #undef SDL_THREAD_WIN32 */ + +/* Enable various timer systems */ +/* #undef SDL_TIMER_BEOS */ +/* #undef SDL_TIMER_DUMMY */ +/* #undef SDL_TIMER_NDS */ +/* #undef SDL_TIMER_RISCOS */ +/* #undef SDL_TIMER_UNIX */ +/* #undef SDL_TIMER_WIN32 */ +/* #undef SDL_TIMER_WINCE */ + +/* Enable various video drivers */ +/* #undef SDL_VIDEO_DRIVER_BWINDOW */ +/* #undef SDL_VIDEO_DRIVER_COCOA */ +/* #undef SDL_VIDEO_DRIVER_DIRECTFB */ +/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */ +#define SDL_VIDEO_DRIVER_DUMMY 1 +/* #undef SDL_VIDEO_DRIVER_FBCON */ +/* #undef SDL_VIDEO_DRIVER_NDS */ +/* #undef SDL_VIDEO_DRIVER_PHOTON */ +/* #undef SDL_VIDEO_DRIVER_QNXGF */ +/* #undef SDL_VIDEO_DRIVER_PS3 */ +/* #undef SDL_VIDEO_DRIVER_RISCOS */ +/* #undef SDL_VIDEO_DRIVER_SVGALIB */ +/* #undef SDL_VIDEO_DRIVER_WIN32 */ +/* #undef SDL_VIDEO_DRIVER_X11 */ +/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC */ +/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT */ +/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR */ +/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER */ +/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT */ +/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS */ +/* #undef SDL_VIDEO_DRIVER_X11_VIDMODE */ +/* #undef SDL_VIDEO_DRIVER_X11_XINERAMA */ +/* #undef SDL_VIDEO_DRIVER_X11_XRANDR */ +/* #undef SDL_VIDEO_DRIVER_X11_XINPUT */ +/* #undef SDL_VIDEO_DRIVER_X11_SCRNSAVER */ +/* #undef SDL_VIDEO_DRIVER_X11_XV */ + +/* #undef SDL_VIDEO_RENDER_D3D */ +/* #undef SDL_VIDEO_RENDER_GDI */ +/* #undef SDL_VIDEO_RENDER_OGL */ +/* #undef SDL_VIDEO_RENDER_OGL_ES */ +/* #undef SDL_VIDEO_RENDER_X11 */ +/* #undef SDL_VIDEO_RENDER_GAPI */ +/* #undef SDL_VIDEO_RENDER_DDRAW */ + +/* Enable OpenGL support */ +/* #undef SDL_VIDEO_OPENGL */ +/* #undef SDL_VIDEO_OPENGL_ES */ +/* #undef SDL_VIDEO_OPENGL_BGL */ +/* #undef SDL_VIDEO_OPENGL_CGL */ +/* #undef SDL_VIDEO_OPENGL_GLX */ +/* #undef SDL_VIDEO_OPENGL_WGL */ +/* #undef SDL_VIDEO_OPENGL_OSMESA */ +/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */ + +/* Enable system power support */ +/* #undef SDL_POWER_LINUX */ +/* #undef SDL_POWER_WINDOWS */ +/* #undef SDL_POWER_MACOSX */ +/* #undef SDL_POWER_BEOS */ +/* #undef SDL_POWER_NINTENDODS */ +/* #undef SDL_POWER_HARDWIRED */ + +/* Enable assembly routines */ +/* #undef SDL_ASSEMBLY_ROUTINES */ +/* #undef SDL_ALTIVEC_BLITTERS */ + +#endif /* _SDL_config_h */ diff --git a/macosx/plugins/DFInput/SDL/include/SDL_endian.h b/macosx/plugins/DFInput/SDL/include/SDL_endian.h new file mode 100644 index 00000000..de69e32d --- /dev/null +++ b/macosx/plugins/DFInput/SDL/include/SDL_endian.h @@ -0,0 +1,258 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ + +/** + * \file SDL_endian.h + * + * Functions for reading and writing endian-specific values + */ + +#ifndef _SDL_endian_h +#define _SDL_endian_h + +#include "SDL_stdinc.h" + +/** + * \name The two types of endianness + */ +/*@{*/ +#define SDL_LIL_ENDIAN 1234 +#define SDL_BIG_ENDIAN 4321 +/*@}*/ + +#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */ +#ifdef __linux__ +#include +#define SDL_BYTEORDER __BYTE_ORDER +#else /* __linux __ */ +#if defined(__hppa__) || \ + defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ + (defined(__MIPS__) && defined(__MISPEB__)) || \ + defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \ + defined(__sparc__) +#define SDL_BYTEORDER SDL_BIG_ENDIAN +#else +#define SDL_BYTEORDER SDL_LIL_ENDIAN +#endif +#endif /* __linux __ */ +#endif /* !SDL_BYTEORDER */ + + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +#endif + +/** + * \file SDL_endian.h + * + * Uses inline functions for compilers that support them, and static + * functions for those that do not. Because these functions become + * static for compilers that do not support inline functions, this + * header should only be included in files that actually use them. + */ +#if defined(__GNUC__) && defined(__i386__) && \ + !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */) +static __inline__ Uint16 +SDL_Swap16(Uint16 x) +{ + __asm__("xchgb %b0,%h0": "=q"(x):"0"(x)); + return x; +} +#elif defined(__GNUC__) && defined(__x86_64__) +static __inline__ Uint16 +SDL_Swap16(Uint16 x) +{ + __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x)); + return x; +} +#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) +static __inline__ Uint16 +SDL_Swap16(Uint16 x) +{ + Uint16 result; + + __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x)); + return result; +} +#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__) +static __inline__ Uint16 +SDL_Swap16(Uint16 x) +{ + __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc"); + return x; +} +#else +static __inline__ Uint16 +SDL_Swap16(Uint16 x) +{ + return SDL_static_cast(Uint16, ((x << 8) | (x >> 8))); +} +#endif + +#if defined(__GNUC__) && defined(__i386__) +static __inline__ Uint32 +SDL_Swap32(Uint32 x) +{ + __asm__("bswap %0": "=r"(x):"0"(x)); + return x; +} +#elif defined(__GNUC__) && defined(__x86_64__) +static __inline__ Uint32 +SDL_Swap32(Uint32 x) +{ + __asm__("bswapl %0": "=r"(x):"0"(x)); + return x; +} +#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) +static __inline__ Uint32 +SDL_Swap32(Uint32 x) +{ + Uint32 result; + + __asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x)); + __asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x)); + __asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x)); + return result; +} +#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__) +static __inline__ Uint32 +SDL_Swap32(Uint32 x) +{ + __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc"); + return x; +} +#else +static __inline__ Uint32 +SDL_Swap32(Uint32 x) +{ + return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) | + ((x >> 8) & 0x0000FF00) | (x >> 24))); +} +#endif + +#ifdef SDL_HAS_64BIT_TYPE +#if defined(__GNUC__) && defined(__i386__) +static __inline__ Uint64 +SDL_Swap64(Uint64 x) +{ + union + { + struct + { + Uint32 a, b; + } s; + Uint64 u; + } v; + v.u = x; + __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a), + "1"(v.s. + b)); + return v.u; +} +#elif defined(__GNUC__) && defined(__x86_64__) +static __inline__ Uint64 +SDL_Swap64(Uint64 x) +{ + __asm__("bswapq %0": "=r"(x):"0"(x)); + return x; +} +#else +static __inline__ Uint64 +SDL_Swap64(Uint64 x) +{ + Uint32 hi, lo; + + /* Separate into high and low 32-bit values and swap them */ + lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF); + x >>= 32; + hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF); + x = SDL_Swap32(lo); + x <<= 32; + x |= SDL_Swap32(hi); + return (x); +} +#endif +#else +/** + * This is mainly to keep compilers from complaining in SDL code. + * If there is no real 64-bit datatype, then compilers will complain about + * the fake 64-bit datatype that SDL provides when it compiles user code. + */ +#define SDL_Swap64(X) (X) +#endif /* SDL_HAS_64BIT_TYPE */ + + +static __inline__ float +SDL_SwapFloat(float x) +{ + union + { + float f; + Uint32 ui32; + } swapper; + swapper.f = x; + swapper.ui32 = SDL_Swap32(swapper.ui32); + return swapper.f; +} + + +/** + * \name Swap to native + * Byteswap item from the specified endianness to the native endianness. + */ +/*@{*/ +#if SDL_BYTEORDER == SDL_LIL_ENDIAN +#define SDL_SwapLE16(X) (X) +#define SDL_SwapLE32(X) (X) +#define SDL_SwapLE64(X) (X) +#define SDL_SwapFloatLE(X) (X) +#define SDL_SwapBE16(X) SDL_Swap16(X) +#define SDL_SwapBE32(X) SDL_Swap32(X) +#define SDL_SwapBE64(X) SDL_Swap64(X) +#define SDL_SwapFloatBE(X) SDL_SwapFloat(X) +#else +#define SDL_SwapLE16(X) SDL_Swap16(X) +#define SDL_SwapLE32(X) SDL_Swap32(X) +#define SDL_SwapLE64(X) SDL_Swap64(X) +#define SDL_SwapFloatLE(X) SDL_SwapFloat(X) +#define SDL_SwapBE16(X) (X) +#define SDL_SwapBE32(X) (X) +#define SDL_SwapBE64(X) (X) +#define SDL_SwapFloatBE(X) (X) +#endif +/*@}*//*Swap to native*/ + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_endian_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/include/SDL_error.h b/macosx/plugins/DFInput/SDL/include/SDL_error.h new file mode 100644 index 00000000..a4a90d0e --- /dev/null +++ b/macosx/plugins/DFInput/SDL/include/SDL_error.h @@ -0,0 +1,78 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ + +/** + * \file SDL_error.h + * + * Simple error message routines for SDL. + */ + +#ifndef _SDL_error_h +#define _SDL_error_h + +#include "SDL_stdinc.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +#endif + +/* Public functions */ +extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...); +extern DECLSPEC char *SDLCALL SDL_GetError(void); +extern DECLSPEC void SDLCALL SDL_ClearError(void); + +/** + * \name Internal error functions + * + * \internal + * Private error message function - used internally. + */ +/*@{*/ +#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) +#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) +typedef enum +{ + SDL_ENOMEM, + SDL_EFREAD, + SDL_EFWRITE, + SDL_EFSEEK, + SDL_UNSUPPORTED, + SDL_LASTERROR +} SDL_errorcode; +extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code); +/*@}*//*Internal error functions*/ + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_error_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/include/SDL_haptic.h b/macosx/plugins/DFInput/SDL/include/SDL_haptic.h new file mode 100644 index 00000000..52f33f15 --- /dev/null +++ b/macosx/plugins/DFInput/SDL/include/SDL_haptic.h @@ -0,0 +1,1123 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2008 Edgar Simo + + 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 +*/ + +/** + * \file SDL_haptic.h + * + * \brief The SDL Haptic subsystem allows you to control haptic (force feedback) + * devices. + * + * The basic usage is as follows: + * - Initialize the Subsystem (::SDL_INIT_HAPTIC). + * - Open a Haptic Device. + * - SDL_HapticOpen() to open from index. + * - SDL_HapticOpenFromJoystick() to open from an existing joystick. + * - Create an effect (::SDL_HapticEffect). + * - Upload the effect with SDL_HapticNewEffect(). + * - Run the effect with SDL_HapticRunEffect(). + * - (optional) Free the effect with SDL_HapticDestroyEffect(). + * - Close the haptic device with SDL_HapticClose(). + * + * \par Example: + * \code + * int test_haptic( SDL_Joystick * joystick ) { + * SDL_Haptic *haptic; + * SDL_HapticEffect effect; + * int effect_id; + * + * // Open the device + * haptic = SDL_HapticOpenFromJoystick( joystick ); + * if (haptic == NULL) return -1; // Most likely joystick isn't haptic + * + * // See if it can do sine waves + * if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) { + * SDL_HapticClose(haptic); // No sine effect + * return -1; + * } + * + * // Create the effect + * memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default + * effect.type = SDL_HAPTIC_SINE; + * effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates + * effect.periodic.direction.dir[0] = 18000; // Force comes from south + * effect.periodic.period = 1000; // 1000 ms + * effect.periodic.magnitude = 20000; // 20000/32767 strength + * effect.periodic.length = 5000; // 5 seconds long + * effect.periodic.attack_length = 1000; // Takes 1 second to get max strength + * effect.periodic.fade_length = 1000; // Takes 1 second to fade away + * + * // Upload the effect + * effect_id = SDL_HapticNewEffect( haptic, &effect ); + * + * // Test the effect + * SDL_HapticRunEffect( haptic, effect_id, 1 ); + * SDL_Delay( 5000); // Wait for the effect to finish + * + * // We destroy the effect, although closing the device also does this + * SDL_HapticDestroyEffect( haptic, effect_id ); + * + * // Close the device + * SDL_HapticClose(haptic); + * + * return 0; // Success + * } + * \endcode + * \author Edgar Simo Serra + */ + +#ifndef _SDL_haptic_h +#define _SDL_haptic_h + +#include "SDL_stdinc.h" +#include "SDL_error.h" +#include "SDL_joystick.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { + /* *INDENT-ON* */ +#endif /* __cplusplus */ + +/** + * \typedef SDL_Haptic + * + * \brief The haptic structure used to identify an SDL haptic. + * + * \sa SDL_HapticOpen + * \sa SDL_HapticOpenFromJoystick + * \sa SDL_HapticClose + */ +struct _SDL_Haptic; +typedef struct _SDL_Haptic SDL_Haptic; + + +/** + * \name Haptic features + * + * Different haptic features a device can have. + */ +/*@{*/ + +/** + * \name Haptic effects + */ +/*@{*/ + +/** + * \brief Constant effect supported. + * + * Constant haptic effect. + * + * \sa SDL_HapticCondition + */ +#define SDL_HAPTIC_CONSTANT (1<<0) + +/** + * \brief Sine wave effect supported. + * + * Periodic haptic effect that simulates sine waves. + * + * \sa SDL_HapticPeriodic + */ +#define SDL_HAPTIC_SINE (1<<1) + +/** + * \brief Square wave effect supported. + * + * Periodic haptic effect that simulates square waves. + * + * \sa SDL_HapticPeriodic + */ +#define SDL_HAPTIC_SQUARE (1<<2) + +/** + * \brief Triangle wave effect supported. + * + * Periodic haptic effect that simulates triangular waves. + * + * \sa SDL_HapticPeriodic + */ +#define SDL_HAPTIC_TRIANGLE (1<<3) + +/** + * \brief Sawtoothup wave effect supported. + * + * Periodic haptic effect that simulates saw tooth up waves. + * + * \sa SDL_HapticPeriodic + */ +#define SDL_HAPTIC_SAWTOOTHUP (1<<4) + +/** + * \brief Sawtoothdown wave effect supported. + * + * Periodic haptic effect that simulates saw tooth down waves. + * + * \sa SDL_HapticPeriodic + */ +#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5) + +/** + * \brief Ramp effect supported. + * + * Ramp haptic effect. + * + * \sa SDL_HapticRamp + */ +#define SDL_HAPTIC_RAMP (1<<6) + +/** + * \brief Spring effect supported - uses axes position. + * + * Condition haptic effect that simulates a spring. Effect is based on the + * axes position. + * + * \sa SDL_HapticCondition + */ +#define SDL_HAPTIC_SPRING (1<<7) + +/** + * \brief Damper effect supported - uses axes velocity. + * + * Condition haptic effect that simulates dampening. Effect is based on the + * axes velocity. + * + * \sa SDL_HapticCondition + */ +#define SDL_HAPTIC_DAMPER (1<<8) + +/** + * \brief Inertia effect supported - uses axes acceleration. + * + * Condition haptic effect that simulates inertia. Effect is based on the axes + * acceleration. + * + * \sa SDL_HapticCondition + */ +#define SDL_HAPTIC_INERTIA (1<<9) + +/** + * \brief Friction effect supported - uses axes movement. + * + * Condition haptic effect that simulates friction. Effect is based on the + * axes movement. + * + * \sa SDL_HapticCondition + */ +#define SDL_HAPTIC_FRICTION (1<<10) + +/** + * \brief Custom effect is supported. + * + * User defined custom haptic effect. + */ +#define SDL_HAPTIC_CUSTOM (1<<11) + +/*@}*//*Haptic effects*/ + +/* These last few are features the device has, not effects */ + +/** + * \brief Device can set global gain. + * + * Device supports setting the global gain. + * + * \sa SDL_HapticSetGain + */ +#define SDL_HAPTIC_GAIN (1<<12) + +/** + * \brief Device can set autocenter. + * + * Device supports setting autocenter. + * + * \sa SDL_HapticSetAutocenter + */ +#define SDL_HAPTIC_AUTOCENTER (1<<13) + +/** + * \brief Device can be queried for effect status. + * + * Device can be queried for effect status. + * + * \sa SDL_HapticGetEffectStatus + */ +#define SDL_HAPTIC_STATUS (1<<14) + +/** + * \brief Device can be paused. + * + * \sa SDL_HapticPause + * \sa SDL_HapticUnpause + */ +#define SDL_HAPTIC_PAUSE (1<<15) + + +/** + * \name Direction encodings + */ +/*@{*/ + +/** + * \brief Uses polar coordinates for the direction. + * + * \sa SDL_HapticDirection + */ +#define SDL_HAPTIC_POLAR 0 + +/** + * \brief Uses cartesian coordinates for the direction. + * + * \sa SDL_HapticDirection + */ +#define SDL_HAPTIC_CARTESIAN 1 + +/** + * \brief Uses spherical coordinates for the direction. + * + * \sa SDL_HapticDirection + */ +#define SDL_HAPTIC_SPHERICAL 2 + +/*@}*//*Direction encodings*/ + +/*@}*//*Haptic features*/ + +/* + * Misc defines. + */ + +/** + * \brief Used to play a device an infinite number of times. + * + * \sa SDL_HapticRunEffect + */ +#define SDL_HAPTIC_INFINITY 4294967295U + + +/** + * \brief Structure that represents a haptic direction. + * + * Directions can be specified by: + * - ::SDL_HAPTIC_POLAR : Specified by polar coordinates. + * - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates. + * - ::SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates. + * + * Cardinal directions of the haptic device are relative to the positioning + * of the device. North is considered to be away from the user. + * + * The following diagram represents the cardinal directions: + * \verbatim + .--. + |__| .-------. + |=.| |.-----.| + |--| || || + | | |'-----'| + |__|~')_____(' + [ COMPUTER ] + + + North (0,-1) + ^ + | + | + (1,0) West <----[ HAPTIC ]----> East (-1,0) + | + | + v + South (0,1) + + + [ USER ] + \|||/ + (o o) + ---ooO-(_)-Ooo--- + \endverbatim + * + * If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a + * degree starting north and turning clockwise. ::SDL_HAPTIC_POLAR only uses + * the first \c dir parameter. The cardinal directions would be: + * - North: 0 (0 degrees) + * - East: 9000 (90 degrees) + * - South: 18000 (180 degrees) + * - West: 27000 (270 degrees) + * + * If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions + * (X axis, Y axis and Z axis (with 3 axes)). ::SDL_HAPTIC_CARTESIAN uses + * the first three \c dir parameters. The cardinal directions would be: + * - North: 0,-1, 0 + * - East: -1, 0, 0 + * - South: 0, 1, 0 + * - West: 1, 0, 0 + * + * The Z axis represents the height of the effect if supported, otherwise + * it's unused. In cartesian encoding (1, 2) would be the same as (2, 4), you + * can use any multiple you want, only the direction matters. + * + * If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations. + * The first two \c dir parameters are used. The \c dir parameters are as + * follows (all values are in hundredths of degrees): + * - Degrees from (1, 0) rotated towards (0, 1). + * - Degrees towards (0, 0, 1) (device needs at least 3 axes). + * + * + * Example of force coming from the south with all encodings (force coming + * from the south means the user will have to pull the stick to counteract): + * \code + * SDL_HapticDirection direction; + * + * // Cartesian directions + * direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding. + * direction.dir[0] = 0; // X position + * direction.dir[1] = 1; // Y position + * // Assuming the device has 2 axes, we don't need to specify third parameter. + * + * // Polar directions + * direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding. + * direction.dir[0] = 18000; // Polar only uses first parameter + * + * // Spherical coordinates + * direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding + * direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters. + * \endcode + * + * \sa SDL_HAPTIC_POLAR + * \sa SDL_HAPTIC_CARTESIAN + * \sa SDL_HAPTIC_SPHERICAL + * \sa SDL_HapticEffect + * \sa SDL_HapticNumAxes + */ +typedef struct SDL_HapticDirection +{ + Uint8 type; /**< The type of encoding. */ + Sint32 dir[3]; /**< The encoded direction. */ +} SDL_HapticDirection; + + +/** + * \brief A structure containing a template for a Constant effect. + * + * The struct is exclusive to the ::SDL_HAPTIC_CONSTANT effect. + * + * A constant effect applies a constant force in the specified direction + * to the joystick. + * + * \sa SDL_HAPTIC_CONSTANT + * \sa SDL_HapticEffect + */ +typedef struct SDL_HapticConstant +{ + /* Header */ + Uint16 type; /**< ::SDL_HAPTIC_CONSTANT */ + SDL_HapticDirection direction; /**< Direction of the effect. */ + + /* Replay */ + Uint32 length; /**< Duration of the effect. */ + Uint16 delay; /**< Delay before starting the effect. */ + + /* Trigger */ + Uint16 button; /**< Button that triggers the effect. */ + Uint16 interval; /**< How soon it can be triggered again after button. */ + + /* Constant */ + Sint16 level; /**< Strength of the constant effect. */ + + /* Envelope */ + Uint16 attack_length; /**< Duration of the attack. */ + Uint16 attack_level; /**< Level at the start of the attack. */ + Uint16 fade_length; /**< Duration of the fade. */ + Uint16 fade_level; /**< Level at the end of the fade. */ +} SDL_HapticConstant; + +/** + * \brief A structure containing a template for a Periodic effect. + * + * The struct handles the following effects: + * - ::SDL_HAPTIC_SINE + * - ::SDL_HAPTIC_SQUARE + * - ::SDL_HAPTIC_TRIANGLE + * - ::SDL_HAPTIC_SAWTOOTHUP + * - ::SDL_HAPTIC_SAWTOOTHDOWN + * + * A periodic effect consists in a wave-shaped effect that repeats itself + * over time. The type determines the shape of the wave and the parameters + * determine the dimensions of the wave. + * + * Phase is given by hundredth of a cyle meaning that giving the phase a value + * of 9000 will displace it 25% of it's period. Here are sample values: + * - 0: No phase displacement. + * - 9000: Displaced 25% of it's period. + * - 18000: Displaced 50% of it's period. + * - 27000: Displaced 75% of it's period. + * - 36000: Displaced 100% of it's period, same as 0, but 0 is preffered. + * + * Examples: + * \verbatim + SDL_HAPTIC_SINE + __ __ __ __ + / \ / \ / \ / + / \__/ \__/ \__/ + + SDL_HAPTIC_SQUARE + __ __ __ __ __ + | | | | | | | | | | + | |__| |__| |__| |__| | + + SDL_HAPTIC_TRIANGLE + /\ /\ /\ /\ /\ + / \ / \ / \ / \ / + / \/ \/ \/ \/ + + SDL_HAPTIC_SAWTOOTHUP + /| /| /| /| /| /| /| + / | / | / | / | / | / | / | + / |/ |/ |/ |/ |/ |/ | + + SDL_HAPTIC_SAWTOOTHDOWN + \ |\ |\ |\ |\ |\ |\ | + \ | \ | \ | \ | \ | \ | \ | + \| \| \| \| \| \| \| + \endverbatim + * + * \sa SDL_HAPTIC_SINE + * \sa SDL_HAPTIC_SQUARE + * \sa SDL_HAPTIC_TRIANGLE + * \sa SDL_HAPTIC_SAWTOOTHUP + * \sa SDL_HAPTIC_SAWTOOTHDOWN + * \sa SDL_HapticEffect + */ +typedef struct SDL_HapticPeriodic +{ + /* Header */ + Uint16 type; /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_SQUARE, + ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or + ::SDL_HAPTIC_SAWTOOTHDOWN */ + SDL_HapticDirection direction; /**< Direction of the effect. */ + + /* Replay */ + Uint32 length; /**< Duration of the effect. */ + Uint16 delay; /**< Delay before starting the effect. */ + + /* Trigger */ + Uint16 button; /**< Button that triggers the effect. */ + Uint16 interval; /**< How soon it can be triggered again after button. */ + + /* Periodic */ + Uint16 period; /**< Period of the wave. */ + Sint16 magnitude; /**< Peak value. */ + Sint16 offset; /**< Mean value of the wave. */ + Uint16 phase; /**< Horizontal shift given by hundredth of a cycle. */ + + /* Envelope */ + Uint16 attack_length; /**< Duration of the attack. */ + Uint16 attack_level; /**< Level at the start of the attack. */ + Uint16 fade_length; /**< Duration of the fade. */ + Uint16 fade_level; /**< Level at the end of the fade. */ +} SDL_HapticPeriodic; + +/** + * \brief A structure containing a template for a Condition effect. + * + * The struct handles the following effects: + * - ::SDL_HAPTIC_SPRING: Effect based on axes position. + * - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity. + * - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration. + * - ::SDL_HAPTIC_FRICTION: Effect based on axes movement. + * + * Direction is handled by condition internals instead of a direction member. + * The condition effect specific members have three parameters. The first + * refers to the X axis, the second refers to the Y axis and the third + * refers to the Z axis. The right terms refer to the positive side of the + * axis and the left terms refer to the negative side of the axis. Please + * refer to the ::SDL_HapticDirection diagram for which side is positive and + * which is negative. + * + * \sa SDL_HapticDirection + * \sa SDL_HAPTIC_SPRING + * \sa SDL_HAPTIC_DAMPER + * \sa SDL_HAPTIC_INERTIA + * \sa SDL_HAPTIC_FRICTION + * \sa SDL_HapticEffect + */ +typedef struct SDL_HapticCondition +{ + /* Header */ + Uint16 type; /**< ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER, + ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION */ + SDL_HapticDirection direction; /**< Direction of the effect - Not used ATM. */ + + /* Replay */ + Uint32 length; /**< Duration of the effect. */ + Uint16 delay; /**< Delay before starting the effect. */ + + /* Trigger */ + Uint16 button; /**< Button that triggers the effect. */ + Uint16 interval; /**< How soon it can be triggered again after button. */ + + /* Condition */ + Uint16 right_sat[3]; /**< Level when joystick is to the positive side. */ + Uint16 left_sat[3]; /**< Level when joystick is to the negative side. */ + Sint16 right_coeff[3]; /**< How fast to increase the force towards the positive side. */ + Sint16 left_coeff[3]; /**< How fast to increase the force towards the negative side. */ + Uint16 deadband[3]; /**< Size of the dead zone. */ + Sint16 center[3]; /**< Position of the dead zone. */ +} SDL_HapticCondition; + +/** + * \brief A structure containing a template for a Ramp effect. + * + * This struct is exclusively for the ::SDL_HAPTIC_RAMP effect. + * + * The ramp effect starts at start strength and ends at end strength. + * It augments in linear fashion. If you use attack and fade with a ramp + * they effects get added to the ramp effect making the effect become + * quadratic instead of linear. + * + * \sa SDL_HAPTIC_RAMP + * \sa SDL_HapticEffect + */ +typedef struct SDL_HapticRamp +{ + /* Header */ + Uint16 type; /**< ::SDL_HAPTIC_RAMP */ + SDL_HapticDirection direction; /**< Direction of the effect. */ + + /* Replay */ + Uint32 length; /**< Duration of the effect. */ + Uint16 delay; /**< Delay before starting the effect. */ + + /* Trigger */ + Uint16 button; /**< Button that triggers the effect. */ + Uint16 interval; /**< How soon it can be triggered again after button. */ + + /* Ramp */ + Sint16 start; /**< Beginning strength level. */ + Sint16 end; /**< Ending strength level. */ + + /* Envelope */ + Uint16 attack_length; /**< Duration of the attack. */ + Uint16 attack_level; /**< Level at the start of the attack. */ + Uint16 fade_length; /**< Duration of the fade. */ + Uint16 fade_level; /**< Level at the end of the fade. */ +} SDL_HapticRamp; + +/** + * \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect. + * + * A custom force feedback effect is much like a periodic effect, where the + * application can define it's exact shape. You will have to allocate the + * data yourself. Data should consist of channels * samples Uint16 samples. + * + * If channels is one, the effect is rotated using the defined direction. + * Otherwise it uses the samples in data for the different axes. + * + * \sa SDL_HAPTIC_CUSTOM + * \sa SDL_HapticEffect + */ +typedef struct SDL_HapticCustom +{ + /* Header */ + Uint16 type; /**< ::SDL_HAPTIC_CUSTOM */ + SDL_HapticDirection direction; /**< Direction of the effect. */ + + /* Replay */ + Uint32 length; /**< Duration of the effect. */ + Uint16 delay; /**< Delay before starting the effect. */ + + /* Trigger */ + Uint16 button; /**< Button that triggers the effect. */ + Uint16 interval; /**< How soon it can be triggered again after button. */ + + /* Custom */ + Uint8 channels; /**< Axes to use, minimum of one. */ + Uint16 period; /**< Sample periods. */ + Uint16 samples; /**< Amount of samples. */ + Uint16 *data; /**< Should contain channels*samples items. */ + + /* Envelope */ + Uint16 attack_length; /**< Duration of the attack. */ + Uint16 attack_level; /**< Level at the start of the attack. */ + Uint16 fade_length; /**< Duration of the fade. */ + Uint16 fade_level; /**< Level at the end of the fade. */ +} SDL_HapticCustom; + +/** + * \brief The generic template for any haptic effect. + * + * All values max at 32767 (0x7FFF). Signed values also can be negative. + * Time values unless specified otherwise are in milliseconds. + * + * You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767 + * value. Neither delay, interval, attack_length nor fade_length support + * ::SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends. + * + * Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of + * ::SDL_HAPTIC_INFINITY. + * + * Button triggers may not be supported on all devices, it is advised to not + * use them if possible. Buttons start at index 1 instead of index 0 like + * they joystick. + * + * If both attack_length and fade_level are 0, the envelope is not used, + * otherwise both values are used. + * + * Common parts: + * \code + * // Replay - All effects have this + * Uint32 length; // Duration of effect (ms). + * Uint16 delay; // Delay before starting effect. + * + * // Trigger - All effects have this + * Uint16 button; // Button that triggers effect. + * Uint16 interval; // How soon before effect can be triggered again. + * + * // Envelope - All effects except condition effects have this + * Uint16 attack_length; // Duration of the attack (ms). + * Uint16 attack_level; // Level at the start of the attack. + * Uint16 fade_length; // Duration of the fade out (ms). + * Uint16 fade_level; // Level at the end of the fade. + * \endcode + * + * + * Here we have an example of a constant effect evolution in time: + * \verbatim + Strength + ^ + | + | effect level --> _________________ + | / \ + | / \ + | / \ + | / \ + | attack_level --> | \ + | | | <--- fade_level + | + +--------------------------------------------------> Time + [--] [---] + attack_length fade_length + + [------------------][-----------------------] + delay length + \endverbatim + * + * Note either the attack_level or the fade_level may be above the actual + * effect level. + * + * \sa SDL_HapticConstant + * \sa SDL_HapticPeriodic + * \sa SDL_HapticCondition + * \sa SDL_HapticRamp + * \sa SDL_HapticCustom + */ +typedef union SDL_HapticEffect +{ + /* Common for all force feedback effects */ + Uint16 type; /**< Effect type. */ + SDL_HapticConstant constant; /**< Constant effect. */ + SDL_HapticPeriodic periodic; /**< Periodic effect. */ + SDL_HapticCondition condition; /**< Condition effect. */ + SDL_HapticRamp ramp; /**< Ramp effect. */ + SDL_HapticCustom custom; /**< Custom effect. */ +} SDL_HapticEffect; + + +/* Function prototypes */ +/** + * \brief Count the number of joysticks attached to the system. + * + * \return Number of haptic devices detected on the system. + */ +extern DECLSPEC int SDLCALL SDL_NumHaptics(void); + +/** + * \brief Get the implementation dependent name of a Haptic device. + * + * This can be called before any joysticks are opened. + * If no name can be found, this function returns NULL. + * + * \param device_index Index of the device to get it's name. + * \return Name of the device or NULL on error. + * + * \sa SDL_NumHaptics + */ +extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index); + +/** + * \brief Opens a Haptic device for usage. + * + * The index passed as an argument refers to the N'th Haptic device on this + * system. + * + * When opening a haptic device, it's gain will be set to maximum and + * autocenter will be disabled. To modify these values use + * SDL_HapticSetGain() and SDL_HapticSetAutocenter(). + * + * \param device_index Index of the device to open. + * \return Device identifier or NULL on error. + * + * \sa SDL_HapticIndex + * \sa SDL_HapticOpenFromMouse + * \sa SDL_HapticOpenFromJoystick + * \sa SDL_HapticClose + * \sa SDL_HapticSetGain + * \sa SDL_HapticSetAutocenter + * \sa SDL_HapticPause + * \sa SDL_HapticStopAll + */ +extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index); + +/** + * \brief Checks if the haptic device at index has been opened. + * + * \param device_index Index to check to see if it has been opened. + * \return 1 if it has been opened or 0 if it hasn't. + * + * \sa SDL_HapticOpen + * \sa SDL_HapticIndex + */ +extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index); + +/** + * \brief Gets the index of a haptic device. + * + * \param haptic Haptic device to get the index of. + * \return The index of the haptic device or -1 on error. + * + * \sa SDL_HapticOpen + * \sa SDL_HapticOpened + */ +extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic); + +/** + * \brief Gets whether or not the current mouse has haptic capabilities. + * + * \return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't. + * + * \sa SDL_HapticOpenFromMouse + */ +extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void); + +/** + * \brief Tries to open a haptic device from the current mouse. + * + * \return The haptic device identifier or NULL on error. + * + * \sa SDL_MouseIsHaptic + * \sa SDL_HapticOpen + */ +extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void); + +/** + * \brief Checks to see if a joystick has haptic features. + * + * \param joystick Joystick to test for haptic capabilities. + * \return 1 if the joystick is haptic, 0 if it isn't + * or -1 if an error ocurred. + * + * \sa SDL_HapticOpenFromJoystick + */ +extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick); + +/** + * \brief Opens a Haptic device for usage from a Joystick device. + * + * You must still close the haptic device seperately. It will not be closed + * with the joystick. + * + * When opening from a joystick you should first close the haptic device before + * closing the joystick device. If not, on some implementations the haptic + * device will also get unallocated and you'll be unable to use force feedback + * on that device. + * + * \param joystick Joystick to create a haptic device from. + * \return A valid haptic device identifier on success or NULL on error. + * + * \sa SDL_HapticOpen + * \sa SDL_HapticClose + */ +extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick * + joystick); + +/** + * \brief Closes a Haptic device previously opened with SDL_HapticOpen(). + * + * \param haptic Haptic device to close. + */ +extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic); + +/** + * \brief Returns the number of effects a haptic device can store. + * + * On some platforms this isn't fully supported, and therefore is an + * aproximation. Always check to see if your created effect was actually + * created and do not rely solely on SDL_HapticNumEffects(). + * + * \param haptic The haptic device to query effect max. + * \return The number of effects the haptic device can store or + * -1 on error. + * + * \sa SDL_HapticNumEffectsPlaying + * \sa SDL_HapticQuery + */ +extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic); + +/** + * \brief Returns the number of effects a haptic device can play at the same + * time. + * + * This is not supported on all platforms, but will always return a value. + * Added here for the sake of completness. + * + * \param haptic The haptic device to query maximum playing effects. + * \return The number of effects the haptic device can play at the same time + * or -1 on error. + * + * \sa SDL_HapticNumEffects + * \sa SDL_HapticQuery + */ +extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic); + +/** + * \brief Gets the haptic devices supported features in bitwise matter. + * + * Example: + * \code + * if (SDL_HapticQueryEffects(haptic) & SDL_HAPTIC_CONSTANT) { + * printf("We have constant haptic effect!"); + * } + * \endcode + * + * \param haptic The haptic device to query. + * \return Haptic features in bitwise manner (OR'd). + * + * \sa SDL_HapticNumEffects + * \sa SDL_HapticEffectSupported + */ +extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic); + + +/** + * \brief Gets the number of haptic axes the device has. + * + * \sa SDL_HapticDirection + */ +extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic); + +/** + * \brief Checks to see if effect is supported by haptic. + * + * \param haptic Haptic device to check on. + * \param effect Effect to check to see if it is supported. + * \return 1 if effect is supported, 0 if it isn't or -1 on error. + * + * \sa SDL_HapticQuery + * \sa SDL_HapticNewEffect + */ +extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic, + SDL_HapticEffect * + effect); + +/** + * \brief Creates a new haptic effect on the device. + * + * \param haptic Haptic device to create the effect on. + * \param effect Properties of the effect to create. + * \return The id of the effect on success or -1 on error. + * + * \sa SDL_HapticUpdateEffect + * \sa SDL_HapticRunEffect + * \sa SDL_HapticDestroyEffect + */ +extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic, + SDL_HapticEffect * effect); + +/** + * \brief Updates the properties of an effect. + * + * Can be used dynamically, although behaviour when dynamically changing + * direction may be strange. Specifically the effect may reupload itself + * and start playing from the start. You cannot change the type either when + * running SDL_HapticUpdateEffect(). + * + * \param haptic Haptic device that has the effect. + * \param effect Effect to update. + * \param data New effect properties to use. + * \return The id of the effect on success or -1 on error. + * + * \sa SDL_HapticNewEffect + * \sa SDL_HapticRunEffect + * \sa SDL_HapticDestroyEffect + */ +extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic, + int effect, + SDL_HapticEffect * data); + +/** + * \brief Runs the haptic effect on it's assosciated haptic device. + * + * If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over + * repeating the envelope (attack and fade) every time. If you only want the + * effect to last forever, set ::SDL_HAPTIC_INFINITY in the effect's length + * parameter. + * + * \param haptic Haptic device to run the effect on. + * \param effect Identifier of the haptic effect to run. + * \param iterations Number of iterations to run the effect. Use + * ::SDL_HAPTIC_INFINITY for infinity. + * \return 0 on success or -1 on error. + * + * \sa SDL_HapticStopEffect + * \sa SDL_HapticDestroyEffect + * \sa SDL_HapticGetEffectStatus + */ +extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic, + int effect, + Uint32 iterations); + +/** + * \brief Stops the haptic effect on it's assosciated haptic device. + * + * \param haptic Haptic device to stop the effect on. + * \param effect Identifier of the effect to stop. + * \return 0 on success or -1 on error. + * + * \sa SDL_HapticRunEffect + * \sa SDL_HapticDestroyEffect + */ +extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic, + int effect); + +/** + * \brief Destroys a haptic effect on the device. + * + * This will stop the effect if it's running. Effects are automatically + * destroyed when the device is closed. + * + * \param haptic Device to destroy the effect on. + * \param effect Identifier of the effect to destroy. + * + * \sa SDL_HapticNewEffect + */ +extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic, + int effect); + +/** + * \brief Gets the status of the current effect on the haptic device. + * + * Device must support the ::SDL_HAPTIC_STATUS feature. + * + * \param haptic Haptic device to query the effect status on. + * \param effect Identifier of the effect to query it's status. + * \return 0 if it isn't playing, ::SDL_HAPTIC_PLAYING if it is playing + * or -1 on error. + * + * \sa SDL_HapticRunEffect + * \sa SDL_HapticStopEffect + */ +extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic, + int effect); + +/** + * \brief Sets the global gain of the device. + * + * Device must support the ::SDL_HAPTIC_GAIN feature. + * + * The user may specify the maxmimum gain by setting the environment variable + * ::SDL_HAPTIC_GAIN_MAX which should be between 0 and 100. All calls to + * SDL_HapticSetGain() will scale linearly using ::SDL_HAPTIC_GAIN_MAX as the + * maximum. + * + * \param haptic Haptic device to set the gain on. + * \param gain Value to set the gain to, should be between 0 and 100. + * \return 0 on success or -1 on error. + * + * \sa SDL_HapticQuery + */ +extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain); + +/** + * \brief Sets the global autocenter of the device. + * + * Autocenter should be between 0 and 100. Setting it to 0 will disable + * autocentering. + * + * Device must support the ::SDL_HAPTIC_AUTOCENTER feature. + * + * \param haptic Haptic device to set autocentering on. + * \param autocenter Value to set autocenter to, 0 disables autocentering. + * \return 0 on success or -1 on error. + * + * \sa SDL_HapticQuery + */ +extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic, + int autocenter); + +/** + * \brief Pauses a haptic device. + * + * Device must support the ::SDL_HAPTIC_PAUSE feature. Call + * SDL_HapticUnpause() to resume playback. + * + * Do not modify the effects nor add new ones while the device is paused. + * That can cause all sorts of weird errors. + * + * \param haptic Haptic device to pause. + * \return 0 on success or -1 on error. + * + * \sa SDL_HapticUnpause + */ +extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic); + +/** + * \brief Unpauses a haptic device. + * + * Call to unpause after SDL_HapticPause(). + * + * \param haptic Haptic device to pause. + * \return 0 on success or -1 on error. + * + * \sa SDL_HapticPause + */ +extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic); + +/** + * \brief Stops all the currently playing effects on a haptic device. + * + * \param haptic Haptic device to stop. + * \return 0 on success or -1 on error. + */ +extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_haptic_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/include/SDL_joystick.h b/macosx/plugins/DFInput/SDL/include/SDL_joystick.h new file mode 100644 index 00000000..2e70862f --- /dev/null +++ b/macosx/plugins/DFInput/SDL/include/SDL_joystick.h @@ -0,0 +1,209 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ + +/** + * \file SDL_joystick.h + * + * Include file for SDL joystick event handling + */ + +#ifndef _SDL_joystick_h +#define _SDL_joystick_h + +#include "SDL_stdinc.h" +#include "SDL_error.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +#endif + +/** + * \file SDL_joystick.h + * + * In order to use these functions, SDL_Init() must have been called + * with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system + * for joysticks, and load appropriate drivers. + */ + +/* The joystick structure used to identify an SDL joystick */ +struct _SDL_Joystick; +typedef struct _SDL_Joystick SDL_Joystick; + + +/* Function prototypes */ +/** + * Count the number of joysticks attached to the system + */ +extern DECLSPEC int SDLCALL SDL_NumJoysticks(void); + +/** + * Get the implementation dependent name of a joystick. + * This can be called before any joysticks are opened. + * If no name can be found, this function returns NULL. + */ +extern DECLSPEC const char *SDLCALL SDL_JoystickName(int device_index); + +/** + * Open a joystick for use. + * The index passed as an argument refers tothe N'th joystick on the system. + * This index is the value which will identify this joystick in future joystick + * events. + * + * \return A joystick identifier, or NULL if an error occurred. + */ +extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index); + +/** + * Returns 1 if the joystick has been opened, or 0 if it has not. + */ +extern DECLSPEC int SDLCALL SDL_JoystickOpened(int device_index); + +/** + * Get the device index of an opened joystick. + */ +extern DECLSPEC int SDLCALL SDL_JoystickIndex(SDL_Joystick * joystick); + +/** + * Get the number of general axis controls on a joystick. + */ +extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick); + +/** + * Get the number of trackballs on a joystick. + * + * Joystick trackballs have only relative motion events associated + * with them and their state cannot be polled. + */ +extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick); + +/** + * Get the number of POV hats on a joystick. + */ +extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick); + +/** + * Get the number of buttons on a joystick. + */ +extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick); + +/** + * Update the current state of the open joysticks. + * + * This is called automatically by the event loop if any joystick + * events are enabled. + */ +extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void); + +/** + * Enable/disable joystick event polling. + * + * If joystick events are disabled, you must call SDL_JoystickUpdate() + * yourself and check the state of the joystick when you want joystick + * information. + * + * The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE. + */ +extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state); + +/** + * Get the current state of an axis control on a joystick. + * + * The state is a value ranging from -32768 to 32767. + * + * The axis indices start at index 0. + */ +extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick, + int axis); + +/** + * \name Hat positions + */ +/*@{*/ +#define SDL_HAT_CENTERED 0x00 +#define SDL_HAT_UP 0x01 +#define SDL_HAT_RIGHT 0x02 +#define SDL_HAT_DOWN 0x04 +#define SDL_HAT_LEFT 0x08 +#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP) +#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN) +#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP) +#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN) +/*@}*/ + +/** + * Get the current state of a POV hat on a joystick. + * + * The hat indices start at index 0. + * + * \return The return value is one of the following positions: + * - ::SDL_HAT_CENTERED + * - ::SDL_HAT_UP + * - ::SDL_HAT_RIGHT + * - ::SDL_HAT_DOWN + * - ::SDL_HAT_LEFT + * - ::SDL_HAT_RIGHTUP + * - ::SDL_HAT_RIGHTDOWN + * - ::SDL_HAT_LEFTUP + * - ::SDL_HAT_LEFTDOWN + */ +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick, + int hat); + +/** + * Get the ball axis change since the last poll. + * + * \return 0, or -1 if you passed it invalid parameters. + * + * The ball indices start at index 0. + */ +extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick, + int ball, int *dx, int *dy); + +/** + * Get the current state of a button on a joystick. + * + * The button indices start at index 0. + */ +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, + int button); + +/** + * Close a joystick previously opened with SDL_JoystickOpen(). + */ +extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick); + + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_joystick_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/include/SDL_main.h b/macosx/plugins/DFInput/SDL/include/SDL_main.h new file mode 100644 index 00000000..803aa0fb --- /dev/null +++ b/macosx/plugins/DFInput/SDL/include/SDL_main.h @@ -0,0 +1,96 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ + +#ifndef _SDL_main_h +#define _SDL_main_h + +#include "SDL_stdinc.h" + +/** + * \file SDL_main.h + * + * Redefine main() on some platforms so that it is called by SDL. + */ + +#if defined(__WIN32__) || \ + (defined(__MWERKS__) && !defined(__BEOS__)) || \ + defined(__SYMBIAN32__) || defined(__IPHONEOS__) + +#ifdef __cplusplus +#define C_LINKAGE "C" +#else +#define C_LINKAGE +#endif /* __cplusplus */ + +/** + * \file SDL_main.h + * + * The application's main() function must be called with C linkage, + * and should be declared like this: + * \code + * #ifdef __cplusplus + * extern "C" + * #endif + * int main(int argc, char *argv[]) + * { + * } + * \endcode + */ + +#define main SDL_main + +/** + * The prototype for the application's main() function + */ +extern C_LINKAGE int SDL_main(int argc, char *argv[]); + + +/* From the SDL library code -- needed for registering the app on Win32 */ +#ifdef __WIN32__ + +#include "begin_code.h" +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +#endif + +/** + * This can be called to set the application class at startup + */ +extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, + void *hInst); +extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); + +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" +#endif + +#endif /* Need to redefine main()? */ + +#endif /* _SDL_main_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/include/SDL_platform.h b/macosx/plugins/DFInput/SDL/include/SDL_platform.h new file mode 100644 index 00000000..f9429bde --- /dev/null +++ b/macosx/plugins/DFInput/SDL/include/SDL_platform.h @@ -0,0 +1,154 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ + +/** + * \file SDL_platform.h + * + * Try to get a standard set of platform defines. + */ + +#ifndef _SDL_platform_h +#define _SDL_platform_h + +#if defined(_AIX) +#undef __AIX__ +#define __AIX__ 1 +#endif +#if defined(__BEOS__) +#undef __BEOS__ +#define __BEOS__ 1 +#endif +#if defined(__HAIKU__) +#undef __HAIKU__ +#define __HAIKU__ 1 +#endif +#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__) +#undef __BSDI__ +#define __BSDI__ 1 +#endif +#if defined(_arch_dreamcast) +#undef __DREAMCAST__ +#define __DREAMCAST__ 1 +#endif +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) +#undef __FREEBSD__ +#define __FREEBSD__ 1 +#endif +#if defined(hpux) || defined(__hpux) || defined(__hpux__) +#undef __HPUX__ +#define __HPUX__ 1 +#endif +#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE) +#undef __IRIX__ +#define __IRIX__ 1 +#endif +#if defined(linux) || defined(__linux) || defined(__linux__) +#undef __LINUX__ +#define __LINUX__ 1 +#endif + +#if defined(__APPLE__) +/* lets us know what version of Mac OS X we're compiling on */ +#include "AvailabilityMacros.h" +#ifdef MAC_OS_X_VERSION_10_3 +#include "TargetConditionals.h" /* this header is in 10.3 or later */ +#if TARGET_OS_IPHONE +/* if compiling for iPhone */ +#undef __IPHONEOS__ +#define __IPHONEOS__ 1 +#undef __MACOSX__ +#else +/* if not compiling for iPhone */ +#undef __MACOSX__ +#define __MACOSX__ 1 +#endif /* TARGET_OS_IPHONE */ +#else +/* if earlier verion of Mac OS X than version 10.3 */ +#undef __MACOSX__ +#define __MACOSX__ 1 +#endif + +#endif /* defined(__APPLE__) */ + +#if defined(__NetBSD__) +#undef __NETBSD__ +#define __NETBSD__ 1 +#endif +#if defined(__OpenBSD__) +#undef __OPENBSD__ +#define __OPENBSD__ 1 +#endif +#if defined(__OS2__) +#undef __OS2__ +#define __OS2__ 1 +#endif +#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE) +#undef __OSF__ +#define __OSF__ 1 +#endif +#if defined(__QNXNTO__) +#undef __QNXNTO__ +#define __QNXNTO__ 1 +#endif +#if defined(riscos) || defined(__riscos) || defined(__riscos__) +#undef __RISCOS__ +#define __RISCOS__ 1 +#endif +#if defined(__SVR4) +#undef __SOLARIS__ +#define __SOLARIS__ 1 +#endif +#if defined(WIN32) || defined(_WIN32) +#undef __WIN32__ +#define __WIN32__ 1 +#endif + +#if defined(__NDS__) +#undef __NINTENDODS__ +#define __NINTENDODS__ 1 +#endif + + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +#endif + +/** + * \brief Gets the name of the platform. + */ +extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_platform_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/include/SDL_stdinc.h b/macosx/plugins/DFInput/SDL/include/SDL_stdinc.h new file mode 100644 index 00000000..ba1e5b5b --- /dev/null +++ b/macosx/plugins/DFInput/SDL/include/SDL_stdinc.h @@ -0,0 +1,792 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ + +/** + * \file SDL_stdinc.h + * + * This is a general header that includes C language support. + */ + +#ifndef _SDL_stdinc_h +#define _SDL_stdinc_h + +#include "SDL_config.h" + + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_STDIO_H +#include +#endif +#if defined(STDC_HEADERS) +# include +# include +# include +#else +# if defined(HAVE_STDLIB_H) +# include +# elif defined(HAVE_MALLOC_H) +# include +# endif +# if defined(HAVE_STDDEF_H) +# include +# endif +# if defined(HAVE_STDARG_H) +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H) +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#if defined(HAVE_INTTYPES_H) +# include +#elif defined(HAVE_STDINT_H) +# include +#endif +#ifdef HAVE_CTYPE_H +# include +#endif +#ifdef HAVE_MATH_H +# include +#endif +#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H) +# include +#endif + +/** + * The number of elements in an array. + */ +#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0])) +#define SDL_TABLESIZE(table) SDL_arraysize(table) + +/** + * \name Cast operators + * + * Use proper C++ casts when compiled as C++ to be compatible with the option + * -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above). + */ +/*@{*/ +#ifdef __cplusplus +#define SDL_reinterpret_cast(type, expression) reinterpret_cast(expression) +#define SDL_static_cast(type, expression) static_cast(expression) +#else +#define SDL_reinterpret_cast(type, expression) ((type)(expression)) +#define SDL_static_cast(type, expression) ((type)(expression)) +#endif +/*@}*//*Cast operators*/ + +/* Define a four character code as a Uint32 */ +#define SDL_FOURCC(A, B, C, D) \ + ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \ + (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \ + (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \ + (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24)) + +/** + * \name Basic data types + */ +/*@{*/ + +typedef enum +{ + SDL_FALSE = 0, + SDL_TRUE = 1 +} SDL_bool; + +/** + * \brief A signed 8-bit integer type. + */ +typedef int8_t Sint8; +/** + * \brief An unsigned 8-bit integer type. + */ +typedef uint8_t Uint8; +/** + * \brief A signed 16-bit integer type. + */ +typedef int16_t Sint16; +/** + * \brief An unsigned 16-bit integer type. + */ +typedef uint16_t Uint16; +/** + * \brief A signed 32-bit integer type. + */ +typedef int32_t Sint32; +/** + * \brief An unsigned 32-bit integer type. + */ +typedef uint32_t Uint32; + +#ifdef SDL_HAS_64BIT_TYPE +/** + * \brief A signed 64-bit integer type. + * \warning On platforms without any sort of 64-bit datatype, this is equivalent to Sint32! + */ +typedef int64_t Sint64; +/** + * \brief An unsigned 64-bit integer type. + * \warning On platforms without any sort of 64-bit datatype, this is equivalent to Uint32! + */ +typedef uint64_t Uint64; +#else +/* This is really just a hack to prevent the compiler from complaining */ +typedef Sint32 Sint64; +typedef Uint32 Uint64; +#endif + +/*@}*//*Basic data types*/ + + +#define SDL_COMPILE_TIME_ASSERT(name, x) \ + typedef int SDL_dummy_ ## name[(x) * 2 - 1] +/** \cond */ +#ifndef DOXYGEN_SHOULD_IGNORE_THIS +SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1); +SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1); +SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2); +SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2); +SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4); +SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4); +#ifndef __NINTENDODS__ /* TODO: figure out why the following happens: + include/SDL_stdinc.h:150: error: size of array 'SDL_dummy_uint64' is negative + include/SDL_stdinc.h:151: error: size of array 'SDL_dummy_sint64' is negative */ +SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8); +SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8); +#endif +#endif /* DOXYGEN_SHOULD_IGNORE_THIS */ +/** \endcond */ + +/* Check to make sure enums are the size of ints, for structure packing. + For both Watcom C/C++ and Borland C/C++ the compiler option that makes + enums having the size of an int must be enabled. + This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11). +*/ +/* Enable enums always int in CodeWarrior (for MPW use "-enum int") */ +#ifdef __MWERKS__ +#pragma enumsalwaysint on +#endif + +/** \cond */ +#ifndef DOXYGEN_SHOULD_IGNORE_THIS +#ifndef __NINTENDODS__ /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */ +typedef enum +{ + DUMMY_ENUM_VALUE +} SDL_DUMMY_ENUM; + +SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int)); +#endif +#endif /* DOXYGEN_SHOULD_IGNORE_THIS */ +/** \endcond */ + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +#endif + +#ifdef HAVE_MALLOC +#define SDL_malloc malloc +#else +extern DECLSPEC void *SDLCALL SDL_malloc(size_t size); +#endif + +#ifdef HAVE_CALLOC +#define SDL_calloc calloc +#else +extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size); +#endif + +#ifdef HAVE_REALLOC +#define SDL_realloc realloc +#else +extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size); +#endif + +#ifdef HAVE_FREE +#define SDL_free free +#else +extern DECLSPEC void SDLCALL SDL_free(void *mem); +#endif + +#if defined(HAVE_ALLOCA) && !defined(alloca) +# if defined(HAVE_ALLOCA_H) +# include +# elif defined(__GNUC__) +# define alloca __builtin_alloca +# elif defined(_MSC_VER) +# include +# define alloca _alloca +# elif defined(__WATCOMC__) +# include +# elif defined(__BORLANDC__) +# include +# elif defined(__DMC__) +# include +# elif defined(__AIX__) +#pragma alloca +# elif defined(__MRC__) +void *alloca(unsigned); +# else +char *alloca(); +# endif +#endif +#ifdef HAVE_ALLOCA +#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count)) +#define SDL_stack_free(data) +#else +#define SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*(count)) +#define SDL_stack_free(data) SDL_free(data) +#endif + +#ifdef HAVE_GETENV +#define SDL_getenv getenv +#else +extern DECLSPEC char *SDLCALL SDL_getenv(const char *name); +#endif + +/* SDL_putenv() has moved to SDL_compat. */ +#ifdef HAVE_SETENV +#define SDL_setenv setenv +#else +extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, + int overwrite); +#endif + +#ifdef HAVE_QSORT +#define SDL_qsort qsort +#else +extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, + int (*compare) (const void *, + const void *)); +#endif + +#ifdef HAVE_ABS +#define SDL_abs abs +#else +#define SDL_abs(X) ((X) < 0 ? -(X) : (X)) +#endif + +#define SDL_min(x, y) (((x) < (y)) ? (x) : (y)) +#define SDL_max(x, y) (((x) > (y)) ? (x) : (y)) + +#ifdef HAVE_CTYPE_H +#define SDL_isdigit(X) isdigit(X) +#define SDL_isspace(X) isspace(X) +#define SDL_toupper(X) toupper(X) +#define SDL_tolower(X) tolower(X) +#else +#define SDL_isdigit(X) (((X) >= '0') && ((X) <= '9')) +#define SDL_isspace(X) (((X) == ' ') || ((X) == '\t') || ((X) == '\r') || ((X) == '\n')) +#define SDL_toupper(X) (((X) >= 'a') && ((X) <= 'z') ? ('A'+((X)-'a')) : (X)) +#define SDL_tolower(X) (((X) >= 'A') && ((X) <= 'Z') ? ('a'+((X)-'A')) : (X)) +#endif + +#ifdef HAVE_MEMSET +#define SDL_memset memset +#else +extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len); +#endif +#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x))) +#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x))) + +#if defined(__GNUC__) && defined(i386) +#define SDL_memset4(dst, val, len) \ +do { \ + int u0, u1, u2; \ + __asm__ __volatile__ ( \ + "cld\n\t" \ + "rep ; stosl\n\t" \ + : "=&D" (u0), "=&a" (u1), "=&c" (u2) \ + : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, len)) \ + : "memory" ); \ +} while(0) +#endif +#ifndef SDL_memset4 +#define SDL_memset4(dst, val, len) \ +do { \ + unsigned _count = (len); \ + unsigned _n = (_count + 3) / 4; \ + Uint32 *_p = SDL_static_cast(Uint32 *, dst); \ + Uint32 _val = (val); \ + if (len == 0) break; \ + switch (_count % 4) { \ + case 0: do { *_p++ = _val; \ + case 3: *_p++ = _val; \ + case 2: *_p++ = _val; \ + case 1: *_p++ = _val; \ + } while ( --_n ); \ + } \ +} while(0) +#endif + +/* We can count on memcpy existing on Mac OS X and being well-tuned. */ +#if defined(__MACH__) && defined(__APPLE__) +#define SDL_memcpy(dst, src, len) memcpy(dst, src, len) +#elif defined(__GNUC__) && defined(i386) +#define SDL_memcpy(dst, src, len) \ +do { \ + int u0, u1, u2; \ + __asm__ __volatile__ ( \ + "cld\n\t" \ + "rep ; movsl\n\t" \ + "testb $2,%b4\n\t" \ + "je 1f\n\t" \ + "movsw\n" \ + "1:\ttestb $1,%b4\n\t" \ + "je 2f\n\t" \ + "movsb\n" \ + "2:" \ + : "=&c" (u0), "=&D" (u1), "=&S" (u2) \ + : "0" (SDL_static_cast(unsigned, len)/4), "q" (len), "1" (dst),"2" (src) \ + : "memory" ); \ +} while(0) +#endif +#ifndef SDL_memcpy +#ifdef HAVE_MEMCPY +#define SDL_memcpy memcpy +#elif defined(HAVE_BCOPY) +#define SDL_memcpy(d, s, n) bcopy((s), (d), (n)) +#else +extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, + size_t len); +#endif +#endif + +/* We can count on memcpy existing on Mac OS X and being well-tuned. */ +#if defined(__MACH__) && defined(__APPLE__) +#define SDL_memcpy4(dst, src, len) memcpy(dst, src, (len)*4) +#elif defined(__GNUC__) && defined(i386) +#define SDL_memcpy4(dst, src, len) \ +do { \ + int ecx, edi, esi; \ + __asm__ __volatile__ ( \ + "cld\n\t" \ + "rep ; movsl" \ + : "=&c" (ecx), "=&D" (edi), "=&S" (esi) \ + : "0" (SDL_static_cast(unsigned, len)), "1" (dst), "2" (src) \ + : "memory" ); \ +} while(0) +#endif +#ifndef SDL_memcpy4 +#define SDL_memcpy4(dst, src, len) SDL_memcpy(dst, src, (len) << 2) +#endif + +#if defined(__GNUC__) && defined(i386) +#define SDL_revcpy(dst, src, len) \ +do { \ + int u0, u1, u2; \ + char *dstp = SDL_static_cast(char *, dst); \ + char *srcp = SDL_static_cast(char *, src); \ + int n = (len); \ + if ( n >= 4 ) { \ + __asm__ __volatile__ ( \ + "std\n\t" \ + "rep ; movsl\n\t" \ + "cld\n\t" \ + : "=&c" (u0), "=&D" (u1), "=&S" (u2) \ + : "0" (n >> 2), \ + "1" (dstp+(n-4)), "2" (srcp+(n-4)) \ + : "memory" ); \ + } \ + switch (n & 3) { \ + case 3: dstp[2] = srcp[2]; \ + case 2: dstp[1] = srcp[1]; \ + case 1: dstp[0] = srcp[0]; \ + break; \ + default: \ + break; \ + } \ +} while(0) +#endif +#ifndef SDL_revcpy +extern DECLSPEC void *SDLCALL SDL_revcpy(void *dst, const void *src, + size_t len); +#endif + +#ifdef HAVE_MEMMOVE +#define SDL_memmove memmove +#elif defined(HAVE_BCOPY) +#define SDL_memmove(d, s, n) bcopy((s), (d), (n)) +#else +#define SDL_memmove(dst, src, len) \ +do { \ + if ( dst < src ) { \ + SDL_memcpy(dst, src, len); \ + } else { \ + SDL_revcpy(dst, src, len); \ + } \ +} while(0) +#endif + +#ifdef HAVE_MEMCMP +#define SDL_memcmp memcmp +#else +extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, + size_t len); +#endif + +#ifdef HAVE_STRLEN +#define SDL_strlen strlen +#else +extern DECLSPEC size_t SDLCALL SDL_strlen(const char *string); +#endif + +#ifdef HAVE_WCSLEN +#define SDL_wcslen wcslen +#else +#if !defined(wchar_t) && defined(__NINTENDODS__) +#define wchar_t short /* TODO: figure out why libnds doesn't have this */ +#endif +extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t * string); +#endif + +#ifdef HAVE_STRLCPY +#define SDL_strlcpy strlcpy +#else +extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, + size_t maxlen); +#endif + +#ifdef HAVE_STRLCAT +#define SDL_strlcat strlcat +#else +extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, + size_t maxlen); +#endif + +#ifdef HAVE_STRDUP +#define SDL_strdup strdup +#else +extern DECLSPEC char *SDLCALL SDL_strdup(const char *string); +#endif + +#ifdef HAVE__STRREV +#define SDL_strrev _strrev +#else +extern DECLSPEC char *SDLCALL SDL_strrev(char *string); +#endif + +#ifdef HAVE__STRUPR +#define SDL_strupr _strupr +#else +extern DECLSPEC char *SDLCALL SDL_strupr(char *string); +#endif + +#ifdef HAVE__STRLWR +#define SDL_strlwr _strlwr +#else +extern DECLSPEC char *SDLCALL SDL_strlwr(char *string); +#endif + +#ifdef HAVE_STRCHR +#define SDL_strchr strchr +#elif defined(HAVE_INDEX) +#define SDL_strchr index +#else +extern DECLSPEC char *SDLCALL SDL_strchr(const char *string, int c); +#endif + +#ifdef HAVE_STRRCHR +#define SDL_strrchr strrchr +#elif defined(HAVE_RINDEX) +#define SDL_strrchr rindex +#else +extern DECLSPEC char *SDLCALL SDL_strrchr(const char *string, int c); +#endif + +#ifdef HAVE_STRSTR +#define SDL_strstr strstr +#else +extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, + const char *needle); +#endif + +#ifdef HAVE_ITOA +#define SDL_itoa itoa +#else +#define SDL_itoa(value, string, radix) SDL_ltoa((long)value, string, radix) +#endif + +#ifdef HAVE__LTOA +#define SDL_ltoa _ltoa +#else +extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *string, int radix); +#endif + +#ifdef HAVE__UITOA +#define SDL_uitoa _uitoa +#else +#define SDL_uitoa(value, string, radix) SDL_ultoa((long)value, string, radix) +#endif + +#ifdef HAVE__ULTOA +#define SDL_ultoa _ultoa +#else +extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *string, + int radix); +#endif + +#ifdef HAVE_STRTOL +#define SDL_strtol strtol +#else +extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp, + int base); +#endif + +#ifdef HAVE_STRTOUL +#define SDL_strtoul strtoul +#else +extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *string, + char **endp, int base); +#endif + +#ifdef SDL_HAS_64BIT_TYPE + +#ifdef HAVE__I64TOA +#define SDL_lltoa _i64toa +#else +extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *string, + int radix); +#endif + +#ifdef HAVE__UI64TOA +#define SDL_ulltoa _ui64toa +#else +extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *string, + int radix); +#endif + +#ifdef HAVE_STRTOLL +#define SDL_strtoll strtoll +#else +extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, + int base); +#endif + +#ifdef HAVE_STRTOULL +#define SDL_strtoull strtoull +#else +extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp, + int base); +#endif + +#endif /* SDL_HAS_64BIT_TYPE */ + +#ifdef HAVE_STRTOD +#define SDL_strtod strtod +#else +extern DECLSPEC double SDLCALL SDL_strtod(const char *string, char **endp); +#endif + +#ifdef HAVE_ATOI +#define SDL_atoi atoi +#else +#define SDL_atoi(X) SDL_strtol(X, NULL, 0) +#endif + +#ifdef HAVE_ATOF +#define SDL_atof atof +#else +#define SDL_atof(X) SDL_strtod(X, NULL) +#endif + +#ifdef HAVE_STRCMP +#define SDL_strcmp strcmp +#else +extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2); +#endif + +#ifdef HAVE_STRNCMP +#define SDL_strncmp strncmp +#else +extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, + size_t maxlen); +#endif + +#ifdef HAVE_STRCASECMP +#define SDL_strcasecmp strcasecmp +#elif defined(HAVE__STRICMP) +#define SDL_strcasecmp _stricmp +#else +extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, + const char *str2); +#endif + +#ifdef HAVE_STRNCASECMP +#define SDL_strncasecmp strncasecmp +#elif defined(HAVE__STRNICMP) +#define SDL_strncasecmp _strnicmp +#else +extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, + const char *str2, size_t maxlen); +#endif + +#ifdef HAVE_SSCANF +#define SDL_sscanf sscanf +#else +extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, + ...); +#endif + +#ifdef HAVE_SNPRINTF +#define SDL_snprintf snprintf +#else +extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, + const char *fmt, ...); +#endif + +#ifdef HAVE_VSNPRINTF +#define SDL_vsnprintf vsnprintf +#else +extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, + const char *fmt, va_list ap); +#endif + +#ifndef HAVE_M_PI +#define M_PI 3.14159265358979323846264338327950288 /* pi */ +#endif + +#ifdef HAVE_CEIL +#define SDL_ceil ceil +#else +#define SDL_ceil(x) ((double)(int)((x)+0.5)) +#endif + +#ifdef HAVE_COPYSIGN +#define SDL_copysign copysign +#else +extern DECLSPEC double SDLCALL SDL_copysign(double x, double y); +#endif + +#ifdef HAVE_COS +#define SDL_cos cos +#else +extern DECLSPEC double SDLCALL SDL_cos(double x); +#endif + +#ifdef HAVE_COSF +#define SDL_cosf cosf +#else +#define SDL_cosf(x) (float)SDL_cos((double)x) +#endif + +#ifdef HAVE_FABS +#define SDL_fabs fabs +#else +extern DECLSPEC double SDLCALL SDL_fabs(double x); +#endif + +#ifdef HAVE_FLOOR +#define SDL_floor floor +#else +extern DECLSPEC double SDLCALL SDL_floor(double x); +#endif + +#ifdef HAVE_LOG +#define SDL_log log +#else +extern DECLSPEC double SDLCALL SDL_log(double x); +#endif + +#ifdef HAVE_POW +#define SDL_pow pow +#else +extern DECLSPEC double SDLCALL SDL_pow(double x, double y); +#endif + +#ifdef HAVE_SCALBN +#define SDL_scalbn scalbn +#else +extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n); +#endif + +#ifdef HAVE_SIN +#define SDL_sin sin +#else +extern DECLSPEC double SDLCALL SDL_sin(double x); +#endif + +#ifdef HAVE_SINF +#define SDL_sinf sinf +#else +#define SDL_sinf(x) (float)SDL_sin((double)x) +#endif + +#ifdef HAVE_SQRT +#define SDL_sqrt sqrt +#else +extern DECLSPEC double SDLCALL SDL_sqrt(double x); +#endif + +/* The SDL implementation of iconv() returns these error codes */ +#define SDL_ICONV_ERROR (size_t)-1 +#define SDL_ICONV_E2BIG (size_t)-2 +#define SDL_ICONV_EILSEQ (size_t)-3 +#define SDL_ICONV_EINVAL (size_t)-4 + +#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H) +#define SDL_iconv_t iconv_t +#define SDL_iconv_open iconv_open +#define SDL_iconv_close iconv_close +#else +typedef struct _SDL_iconv_t *SDL_iconv_t; +extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, + const char *fromcode); +extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd); +#endif +extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, + size_t * inbytesleft, char **outbuf, + size_t * outbytesleft); +/** + * This function converts a string between encodings in one pass, returning a + * string that must be freed with SDL_free() or NULL on error. + */ +extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode, + const char *fromcode, + const char *inbuf, + size_t inbytesleft); +#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1) +#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1) +#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1) + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_stdinc_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/include/begin_code.h b/macosx/plugins/DFInput/SDL/include/begin_code.h new file mode 100644 index 00000000..395dc7c6 --- /dev/null +++ b/macosx/plugins/DFInput/SDL/include/begin_code.h @@ -0,0 +1,136 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ + +/** + * \file begin_code.h + * + * This file sets things up for C dynamic library function definitions, + * static inlined functions, and structures aligned at 4-byte alignment. + * If you don't like ugly C preprocessor code, don't look at this file. :) + */ + +/* This shouldn't be nested -- included it around code only. */ +#ifdef _begin_code_h +#error Nested inclusion of begin_code.h +#endif +#define _begin_code_h + +/* Some compilers use a special export keyword */ +#ifndef DECLSPEC +# if defined(__BEOS__) || defined(__HAIKU__) +# if defined(__GNUC__) +# define DECLSPEC __declspec(dllexport) +# else +# define DECLSPEC __declspec(export) +# endif +# elif defined(__WIN32__) +# ifdef __BORLANDC__ +# ifdef BUILD_SDL +# define DECLSPEC +# else +# define DECLSPEC __declspec(dllimport) +# endif +# else +# define DECLSPEC __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && __GNUC__ >= 4 +# define DECLSPEC __attribute__ ((visibility("default"))) +# else +# define DECLSPEC +# endif +# endif +#endif + +/* By default SDL uses the C calling convention */ +#ifndef SDLCALL +#if defined(__WIN32__) && !defined(__GNUC__) +#define SDLCALL __cdecl +#else +#define SDLCALL +#endif +#endif /* SDLCALL */ + +/* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */ +#ifdef __SYMBIAN32__ +#undef DECLSPEC +#define DECLSPEC +#endif /* __SYMBIAN32__ */ + +/* Force structure packing at 4 byte alignment. + This is necessary if the header is included in code which has structure + packing set to an alternate value, say for loading structures from disk. + The packing is reset to the previous value in close_code.h + */ +#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) +#ifdef _MSC_VER +#pragma warning(disable: 4103) +#endif +#ifdef __BORLANDC__ +#pragma nopackwarning +#endif +#pragma pack(push,4) +#endif /* Compiler needs structure packing set */ + +/* Set up compiler-specific options for inlining functions */ +#ifndef SDL_INLINE_OKAY +#ifdef __GNUC__ +#define SDL_INLINE_OKAY +#else +/* Add any special compiler-specific cases here */ +#if defined(_MSC_VER) || defined(__BORLANDC__) || \ + defined(__DMC__) || defined(__SC__) || \ + defined(__WATCOMC__) || defined(__LCC__) || \ + defined(__DECC) +#ifndef __inline__ +#define __inline__ __inline +#endif +#define SDL_INLINE_OKAY +#else +#if !defined(__MRC__) && !defined(_SGI_SOURCE) +#ifndef __inline__ +#define __inline__ inline +#endif +#define SDL_INLINE_OKAY +#endif /* Not a funky compiler */ +#endif /* Visual C++ */ +#endif /* GNU C */ +#endif /* SDL_INLINE_OKAY */ + +/* If inlining isn't supported, remove "__inline__", turning static + inlined functions into static functions (resulting in code bloat + in all files which include the offending header files) +*/ +#ifndef SDL_INLINE_OKAY +#define __inline__ +#endif + +/* Apparently this is needed by several Windows compilers */ +#if !defined(__MACH__) +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif /* NULL */ +#endif /* ! Mac OS X - breaks precompiled headers */ diff --git a/macosx/plugins/DFInput/SDL/include/close_code.h b/macosx/plugins/DFInput/SDL/include/close_code.h new file mode 100644 index 00000000..4b4e8a49 --- /dev/null +++ b/macosx/plugins/DFInput/SDL/include/close_code.h @@ -0,0 +1,38 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ + +/** + * \file close_code.h + * + * This file reverses the effects of begin_code.h and should be included + * after you finish any function and structure declarations in your headers + */ + +#undef _begin_code_h + +/* Reset structure packing at previous byte alignment */ +#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) +#ifdef __BORLANDC__ +#pragma nopackwarning +#endif +#pragma pack(pop) +#endif /* Compiler needs structure packing set */ diff --git a/macosx/plugins/DFInput/SDL/src/SDL.c b/macosx/plugins/DFInput/SDL/src/SDL.c new file mode 100644 index 00000000..8f8e676f --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/SDL.c @@ -0,0 +1,101 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ +// 7/31/2010 Wei Mingzhi +// Removed everything unrated to Mac OS X Joystick support + +#include "SDL_config.h" + +/* Initialization code for SDL */ + +#include "SDL.h" +#include "haptic/SDL_haptic_c.h" +#include "joystick/SDL_joystick_c.h" + +/* The initialized subsystems */ +static Uint32 SDL_initialized = 0; + +int +SDL_InitSubSystem(Uint32 flags) +{ + /* Initialize the joystick subsystem */ + if ((flags & SDL_INIT_JOYSTICK) && !(SDL_initialized & SDL_INIT_JOYSTICK)) { + if (SDL_JoystickInit() < 0) { + return (-1); + } + SDL_initialized |= SDL_INIT_JOYSTICK; + } + + /* Initialize the haptic subsystem */ + if ((flags & SDL_INIT_HAPTIC) && !(SDL_initialized & SDL_INIT_HAPTIC)) { + if (SDL_HapticInit() < 0) { + return (-1); + } + SDL_initialized |= SDL_INIT_HAPTIC; + } + + return (0); +} + +int +SDL_Init(Uint32 flags) +{ + /* Clear the error message */ + SDL_ClearError(); + + /* Initialize the desired subsystems */ + if (SDL_InitSubSystem(flags) < 0) { + return (-1); + } + + return (0); +} + +void +SDL_QuitSubSystem(Uint32 flags) +{ + /* Shut down requested initialized subsystems */ + if ((flags & SDL_initialized & SDL_INIT_JOYSTICK)) { + SDL_JoystickQuit(); + SDL_initialized &= ~SDL_INIT_JOYSTICK; + } + + if ((flags & SDL_initialized & SDL_INIT_HAPTIC)) { + SDL_HapticQuit(); + SDL_initialized &= ~SDL_INIT_HAPTIC; + } +} + +Uint32 +SDL_WasInit(Uint32 flags) +{ + if (!flags) { + flags = SDL_INIT_EVERYTHING; + } + return (SDL_initialized & flags); +} + +void +SDL_Quit(void) +{ + /* Quit all subsystems */ + SDL_QuitSubSystem(SDL_INIT_EVERYTHING); +} diff --git a/macosx/plugins/DFInput/SDL/src/SDL_error.c b/macosx/plugins/DFInput/SDL/src/SDL_error.c new file mode 100644 index 00000000..55d183a5 --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/SDL_error.c @@ -0,0 +1,259 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ +#include "SDL_config.h" + +/* Simple error handling in SDL */ + +#include "SDL_error.h" +#include "SDL_error_c.h" + +/* Routine to get the thread-specific error variable */ +#if SDL_THREADS_DISABLED +/* !!! FIXME: what does this comment mean? Victim of Search and Replace? */ +/* The SDL_arraysize(The ),default (non-thread-safe) global error variable */ +static SDL_error SDL_global_error; +#define SDL_GetErrBuf() (&SDL_global_error) +#else +extern SDL_error *SDL_GetErrBuf(void); +#endif /* SDL_THREADS_DISABLED */ + +#define SDL_ERRBUFIZE 1024 + +/* Private functions */ + +static const char * +SDL_LookupString(const char *key) +{ + /* FIXME: Add code to lookup key in language string hash-table */ + return key; +} + +/* Public functions */ + +void +SDL_SetError(const char *fmt, ...) +{ + va_list ap; + SDL_error *error; + + /* Copy in the key, mark error as valid */ + error = SDL_GetErrBuf(); + error->error = 1; + SDL_strlcpy((char *) error->key, fmt, sizeof(error->key)); + + va_start(ap, fmt); + error->argc = 0; + while (*fmt) { + if (*fmt++ == '%') { + while (*fmt == '.' || (*fmt >= '0' && *fmt <= '9')) { + ++fmt; + } + switch (*fmt++) { + case 0: /* Malformed format string.. */ + --fmt; + break; + case 'c': + case 'i': + case 'd': + case 'u': + case 'o': + case 'x': + case 'X': + error->args[error->argc++].value_i = va_arg(ap, int); + break; + case 'f': + error->args[error->argc++].value_f = va_arg(ap, double); + break; + case 'p': + error->args[error->argc++].value_ptr = va_arg(ap, void *); + break; + case 's': + { + int i = error->argc; + const char *str = va_arg(ap, const char *); + if (str == NULL) + str = "(null)"; + SDL_strlcpy((char *) error->args[i].buf, str, + ERR_MAX_STRLEN); + error->argc++; + } + break; + default: + break; + } + if (error->argc >= ERR_MAX_ARGS) { + break; + } + } + } + va_end(ap); + + /* If we are in debug mode, print out an error message */ +#ifdef DEBUG_ERROR + fprintf(stderr, "SDL_SetError: %s\n", SDL_GetError()); +#endif +} + +/* This function has a bit more overhead than most error functions + so that it supports internationalization and thread-safe errors. +*/ +static char * +SDL_GetErrorMsg(char *errstr, unsigned int maxlen) +{ + SDL_error *error; + + /* Clear the error string */ + *errstr = '\0'; + --maxlen; + + /* Get the thread-safe error, and print it out */ + error = SDL_GetErrBuf(); + if (error->error) { + const char *fmt; + char *msg = errstr; + int len; + int argi; + + fmt = SDL_LookupString(error->key); + argi = 0; + while (*fmt && (maxlen > 0)) { + if (*fmt == '%') { + char tmp[32], *spot = tmp; + *spot++ = *fmt++; + while ((*fmt == '.' || (*fmt >= '0' && *fmt <= '9')) + && spot < (tmp + SDL_arraysize(tmp) - 2)) { + *spot++ = *fmt++; + } + *spot++ = *fmt++; + *spot++ = '\0'; + switch (spot[-2]) { + case '%': + *msg++ = '%'; + maxlen -= 1; + break; + case 'c': + case 'i': + case 'd': + case 'u': + case 'o': + case 'x': + case 'X': + len = + SDL_snprintf(msg, maxlen, tmp, + error->args[argi++].value_i); + msg += len; + maxlen -= len; + break; + case 'f': + len = + SDL_snprintf(msg, maxlen, tmp, + error->args[argi++].value_f); + msg += len; + maxlen -= len; + break; + case 'p': + len = + SDL_snprintf(msg, maxlen, tmp, + error->args[argi++].value_ptr); + msg += len; + maxlen -= len; + break; + case 's': + len = + SDL_snprintf(msg, maxlen, tmp, + SDL_LookupString(error->args[argi++]. + buf)); + msg += len; + maxlen -= len; + break; + } + } else { + *msg++ = *fmt++; + maxlen -= 1; + } + } + *msg = 0; /* NULL terminate the string */ + } + return (errstr); +} + +/* Available for backwards compatibility */ +char * +SDL_GetError(void) +{ + static char errmsg[SDL_ERRBUFIZE]; + + return ((char *) SDL_GetErrorMsg(errmsg, SDL_ERRBUFIZE)); +} + +void +SDL_ClearError(void) +{ + SDL_error *error; + + error = SDL_GetErrBuf(); + error->error = 0; +} + +/* Very common errors go here */ +void +SDL_Error(SDL_errorcode code) +{ + switch (code) { + case SDL_ENOMEM: + SDL_SetError("Out of memory"); + break; + case SDL_EFREAD: + SDL_SetError("Error reading from datastream"); + break; + case SDL_EFWRITE: + SDL_SetError("Error writing to datastream"); + break; + case SDL_EFSEEK: + SDL_SetError("Error seeking in datastream"); + break; + case SDL_UNSUPPORTED: + SDL_SetError("That operation is not supported"); + break; + default: + SDL_SetError("Unknown SDL error"); + break; + } +} + +#ifdef TEST_ERROR +int +main(int argc, char *argv[]) +{ + char buffer[BUFSIZ + 1]; + + SDL_SetError("Hi there!"); + printf("Error 1: %s\n", SDL_GetError()); + SDL_ClearError(); + SDL_memset(buffer, '1', BUFSIZ); + buffer[BUFSIZ] = 0; + SDL_SetError("This is the error: %s (%f)", buffer, 1.0); + printf("Error 2: %s\n", SDL_GetError()); + exit(0); +} +#endif +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/src/SDL_error_c.h b/macosx/plugins/DFInput/SDL/src/SDL_error_c.h new file mode 100644 index 00000000..54501f5f --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/SDL_error_c.h @@ -0,0 +1,62 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ +#include "SDL_config.h" + +/* This file defines a structure that carries language-independent + error messages +*/ + +#ifndef _SDL_error_c_h +#define _SDL_error_c_h + +#define ERR_MAX_STRLEN 128 +#define ERR_MAX_ARGS 5 + +typedef struct SDL_error +{ + /* This is a numeric value corresponding to the current error */ + int error; + + /* This is a key used to index into a language hashtable containing + internationalized versions of the SDL error messages. If the key + is not in the hashtable, or no hashtable is available, the key is + used directly as an error message format string. + */ + char key[ERR_MAX_STRLEN]; + + /* These are the arguments for the error functions */ + int argc; + union + { + void *value_ptr; +#if 0 /* What is a character anyway? (UNICODE issues) */ + unsigned char value_c; +#endif + int value_i; + double value_f; + char buf[ERR_MAX_STRLEN]; + } args[ERR_MAX_ARGS]; +} SDL_error; + +#endif /* _SDL_error_c_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/src/haptic/SDL_haptic.c b/macosx/plugins/DFInput/SDL/src/haptic/SDL_haptic.c new file mode 100644 index 00000000..af8c39a7 --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/haptic/SDL_haptic.c @@ -0,0 +1,708 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2008 Edgar Simo + + 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 +*/ +#include "SDL_config.h" + +#include "SDL_syshaptic.h" +#include "SDL_haptic_c.h" +#include "../joystick/SDL_joystick_c.h" /* For SDL_PrivateJoystickValid */ + + +Uint8 SDL_numhaptics = 0; +SDL_Haptic **SDL_haptics = NULL; + + +/* + * Initializes the Haptic devices. + */ +int +SDL_HapticInit(void) +{ + int arraylen; + int status; + + SDL_numhaptics = 0; + status = SDL_SYS_HapticInit(); + if (status >= 0) { + arraylen = (status + 1) * sizeof(*SDL_haptics); + SDL_haptics = (SDL_Haptic **) SDL_malloc(arraylen); + if (SDL_haptics == NULL) { /* Out of memory. */ + SDL_numhaptics = 0; + } else { + SDL_memset(SDL_haptics, 0, arraylen); + SDL_numhaptics = status; + } + status = 0; + } + + return status; +} + + +/* + * Checks to see if the haptic device is valid + */ +static int +ValidHaptic(SDL_Haptic * haptic) +{ + int i; + int valid; + + valid = 0; + if (haptic != NULL) { + for (i = 0; i < SDL_numhaptics; i++) { + if (SDL_haptics[i] == haptic) { + valid = 1; + break; + } + } + } + + /* Create the error here. */ + if (valid == 0) { + SDL_SetError("Haptic: Invalid haptic device identifier"); + } + + return valid; +} + + +/* + * Returns the number of available devices. + */ +int +SDL_NumHaptics(void) +{ + return SDL_numhaptics; +} + + +/* + * Gets the name of a Haptic device by index. + */ +const char * +SDL_HapticName(int device_index) +{ + if ((device_index < 0) || (device_index >= SDL_numhaptics)) { + SDL_SetError("Haptic: There are %d haptic devices available", + SDL_numhaptics); + return NULL; + } + return SDL_SYS_HapticName(device_index); +} + + +/* + * Opens a Haptic device. + */ +SDL_Haptic * +SDL_HapticOpen(int device_index) +{ + int i; + SDL_Haptic *haptic; + + if ((device_index < 0) || (device_index >= SDL_numhaptics)) { + SDL_SetError("Haptic: There are %d haptic devices available", + SDL_numhaptics); + return NULL; + } + + /* If the haptic is already open, return it */ + for (i = 0; SDL_haptics[i]; i++) { + if (device_index == SDL_haptics[i]->index) { + haptic = SDL_haptics[i]; + ++haptic->ref_count; + return haptic; + } + } + + /* Create the haptic device */ + haptic = (SDL_Haptic *) SDL_malloc((sizeof *haptic)); + if (haptic == NULL) { + SDL_OutOfMemory(); + return NULL; + } + + /* Initialize the haptic device */ + SDL_memset(haptic, 0, (sizeof *haptic)); + haptic->index = device_index; + if (SDL_SYS_HapticOpen(haptic) < 0) { + SDL_free(haptic); + return NULL; + } + + /* Disable autocenter and set gain to max. */ + if (haptic->supported & SDL_HAPTIC_GAIN) + SDL_HapticSetGain(haptic, 100); + if (haptic->supported & SDL_HAPTIC_AUTOCENTER) + SDL_HapticSetAutocenter(haptic, 0); + + /* Add haptic to list */ + ++haptic->ref_count; + for (i = 0; SDL_haptics[i]; i++) + /* Skip to next haptic */ ; + SDL_haptics[i] = haptic; + + return haptic; +} + + +/* + * Returns 1 if the device has been opened. + */ +int +SDL_HapticOpened(int device_index) +{ + int i, opened; + + opened = 0; + for (i = 0; SDL_haptics[i]; i++) { + if (SDL_haptics[i]->index == (Uint8) device_index) { + opened = 1; + break; + } + } + return opened; +} + + +/* + * Returns the index to a haptic device. + */ +int +SDL_HapticIndex(SDL_Haptic * haptic) +{ + if (!ValidHaptic(haptic)) { + return -1; + } + + return haptic->index; +} + + +/* + * Returns SDL_TRUE if mouse is haptic, SDL_FALSE if it isn't. + */ +int +SDL_MouseIsHaptic(void) +{ + if (SDL_SYS_HapticMouse() < 0) + return SDL_FALSE; + return SDL_TRUE; +} + + +/* + * Returns the haptic device if mouse is haptic or NULL elsewise. + */ +SDL_Haptic * +SDL_HapticOpenFromMouse(void) +{ + int device_index; + + device_index = SDL_SYS_HapticMouse(); + + if (device_index < 0) { + SDL_SetError("Haptic: Mouse isn't a haptic device."); + return NULL; + } + + return SDL_HapticOpen(device_index); +} + + +/* + * Returns SDL_TRUE if joystick has haptic features. + */ +int +SDL_JoystickIsHaptic(SDL_Joystick * joystick) +{ + int ret; + + /* Must be a valid joystick */ + if (!SDL_PrivateJoystickValid(&joystick)) { + return -1; + } + + ret = SDL_SYS_JoystickIsHaptic(joystick); + + if (ret > 0) + return SDL_TRUE; + else if (ret == 0) + return SDL_FALSE; + else + return -1; +} + + +/* + * Opens a haptic device from a joystick. + */ +SDL_Haptic * +SDL_HapticOpenFromJoystick(SDL_Joystick * joystick) +{ + int i; + SDL_Haptic *haptic; + + /* Must be a valid joystick */ + if (!SDL_PrivateJoystickValid(&joystick)) { + SDL_SetError("Haptic: Joystick isn't valid."); + return NULL; + } + + /* Joystick must be haptic */ + if (SDL_SYS_JoystickIsHaptic(joystick) <= 0) { + SDL_SetError("Haptic: Joystick isn't a haptic device."); + return NULL; + } + + /* Check to see if joystick's haptic is already open */ + for (i = 0; SDL_haptics[i]; i++) { + if (SDL_SYS_JoystickSameHaptic(SDL_haptics[i], joystick)) { + haptic = SDL_haptics[i]; + ++haptic->ref_count; + return haptic; + } + } + + /* Create the haptic device */ + haptic = (SDL_Haptic *) SDL_malloc((sizeof *haptic)); + if (haptic == NULL) { + SDL_OutOfMemory(); + return NULL; + } + + /* Initialize the haptic device */ + SDL_memset(haptic, 0, sizeof(SDL_Haptic)); + if (SDL_SYS_HapticOpenFromJoystick(haptic, joystick) < 0) { + SDL_free(haptic); + return NULL; + } + + /* Add haptic to list */ + ++haptic->ref_count; + for (i = 0; SDL_haptics[i]; i++) + /* Skip to next haptic */ ; + SDL_haptics[i] = haptic; + + return haptic; +} + + +/* + * Closes a SDL_Haptic device. + */ +void +SDL_HapticClose(SDL_Haptic * haptic) +{ + int i; + + /* Must be valid */ + if (!ValidHaptic(haptic)) { + return; + } + + /* Check if it's still in use */ + if (--haptic->ref_count < 0) { + return; + } + + /* Close it, properly removing effects if needed */ + for (i = 0; i < haptic->neffects; i++) { + if (haptic->effects[i].hweffect != NULL) { + SDL_HapticDestroyEffect(haptic, i); + } + } + SDL_SYS_HapticClose(haptic); + + /* Remove from the list */ + for (i = 0; SDL_haptics[i]; ++i) { + if (haptic == SDL_haptics[i]) { + SDL_haptics[i] = NULL; + SDL_memcpy(&SDL_haptics[i], &SDL_haptics[i + 1], + (SDL_numhaptics - i) * sizeof(haptic)); + break; + } + } + + /* Free */ + SDL_free(haptic); +} + +/* + * Cleans up after the subsystem. + */ +void +SDL_HapticQuit(void) +{ + SDL_SYS_HapticQuit(); + if (SDL_haptics != NULL) { + SDL_free(SDL_haptics); + SDL_haptics = NULL; + } + SDL_numhaptics = 0; +} + +/* + * Returns the number of effects a haptic device has. + */ +int +SDL_HapticNumEffects(SDL_Haptic * haptic) +{ + if (!ValidHaptic(haptic)) { + return -1; + } + + return haptic->neffects; +} + + +/* + * Returns the number of effects a haptic device can play. + */ +int +SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic) +{ + if (!ValidHaptic(haptic)) { + return -1; + } + + return haptic->nplaying; +} + + +/* + * Returns supported effects by the device. + */ +unsigned int +SDL_HapticQuery(SDL_Haptic * haptic) +{ + if (!ValidHaptic(haptic)) { + return -1; + } + + return haptic->supported; +} + + +/* + * Returns the number of axis on the device. + */ +int +SDL_HapticNumAxes(SDL_Haptic * haptic) +{ + if (!ValidHaptic(haptic)) { + return -1; + } + + return haptic->naxes; +} + +/* + * Checks to see if the device can support the effect. + */ +int +SDL_HapticEffectSupported(SDL_Haptic * haptic, SDL_HapticEffect * effect) +{ + if (!ValidHaptic(haptic)) { + return -1; + } + + if ((haptic->supported & effect->type) != 0) + return SDL_TRUE; + return SDL_FALSE; +} + +/* + * Creates a new haptic effect. + */ +int +SDL_HapticNewEffect(SDL_Haptic * haptic, SDL_HapticEffect * effect) +{ + int i; + + /* Check for device validity. */ + if (!ValidHaptic(haptic)) { + return -1; + } + + /* Check to see if effect is supported */ + if (SDL_HapticEffectSupported(haptic, effect) == SDL_FALSE) { + SDL_SetError("Haptic: Effect not supported by haptic device."); + return -1; + } + + /* See if there's a free slot */ + for (i = 0; i < haptic->neffects; i++) { + if (haptic->effects[i].hweffect == NULL) { + + /* Now let the backend create the real effect */ + if (SDL_SYS_HapticNewEffect(haptic, &haptic->effects[i], effect) + != 0) { + return -1; /* Backend failed to create effect */ + } + + SDL_memcpy(&haptic->effects[i].effect, effect, + sizeof(SDL_HapticEffect)); + return i; + } + } + + SDL_SetError("Haptic: Device has no free space left."); + return -1; +} + +/* + * Checks to see if an effect is valid. + */ +static int +ValidEffect(SDL_Haptic * haptic, int effect) +{ + if ((effect < 0) || (effect >= haptic->neffects)) { + SDL_SetError("Haptic: Invalid effect identifier."); + return 0; + } + return 1; +} + +/* + * Updates an effect. + */ +int +SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, + SDL_HapticEffect * data) +{ + if (!ValidHaptic(haptic) || !ValidEffect(haptic, effect)) { + return -1; + } + + /* Can't change type dynamically. */ + if (data->type != haptic->effects[effect].effect.type) { + SDL_SetError("Haptic: Updating effect type is illegal."); + return -1; + } + + /* Updates the effect */ + if (SDL_SYS_HapticUpdateEffect(haptic, &haptic->effects[effect], data) < + 0) { + return -1; + } + + SDL_memcpy(&haptic->effects[effect].effect, data, + sizeof(SDL_HapticEffect)); + return 0; +} + + +/* + * Runs the haptic effect on the device. + */ +int +SDL_HapticRunEffect(SDL_Haptic * haptic, int effect, Uint32 iterations) +{ + if (!ValidHaptic(haptic) || !ValidEffect(haptic, effect)) { + return -1; + } + + /* Run the effect */ + if (SDL_SYS_HapticRunEffect(haptic, &haptic->effects[effect], iterations) + < 0) { + return -1; + } + + return 0; +} + +/* + * Stops the haptic effect on the device. + */ +int +SDL_HapticStopEffect(SDL_Haptic * haptic, int effect) +{ + if (!ValidHaptic(haptic) || !ValidEffect(haptic, effect)) { + return -1; + } + + /* Stop the effect */ + if (SDL_SYS_HapticStopEffect(haptic, &haptic->effects[effect]) < 0) { + return -1; + } + + return 0; +} + +/* + * Gets rid of a haptic effect. + */ +void +SDL_HapticDestroyEffect(SDL_Haptic * haptic, int effect) +{ + if (!ValidHaptic(haptic) || !ValidEffect(haptic, effect)) { + return; + } + + /* Not allocated */ + if (haptic->effects[effect].hweffect == NULL) { + return; + } + + SDL_SYS_HapticDestroyEffect(haptic, &haptic->effects[effect]); +} + +/* + * Gets the status of a haptic effect. + */ +int +SDL_HapticGetEffectStatus(SDL_Haptic * haptic, int effect) +{ + if (!ValidHaptic(haptic) || !ValidEffect(haptic, effect)) { + return -1; + } + + if ((haptic->supported & SDL_HAPTIC_STATUS) == 0) { + SDL_SetError("Haptic: Device does not support status queries."); + return -1; + } + + return SDL_SYS_HapticGetEffectStatus(haptic, &haptic->effects[effect]); +} + +/* + * Sets the global gain of the device. + */ +int +SDL_HapticSetGain(SDL_Haptic * haptic, int gain) +{ + const char *env; + int real_gain, max_gain; + + if (!ValidHaptic(haptic)) { + return -1; + } + + if ((haptic->supported & SDL_HAPTIC_GAIN) == 0) { + SDL_SetError("Haptic: Device does not support setting gain."); + return -1; + } + + if ((gain < 0) || (gain > 100)) { + SDL_SetError("Haptic: Gain must be between 0 and 100."); + return -1; + } + + /* We use the envvar to get the maximum gain. */ + env = SDL_getenv("SDL_HAPTIC_GAIN_MAX"); + if (env != NULL) { + max_gain = SDL_atoi(env); + + /* Check for sanity. */ + if (max_gain < 0) + max_gain = 0; + else if (max_gain > 100) + max_gain = 100; + + /* We'll scale it linearly with SDL_HAPTIC_GAIN_MAX */ + real_gain = (gain * max_gain) / 100; + } else { + real_gain = gain; + } + + if (SDL_SYS_HapticSetGain(haptic, real_gain) < 0) { + return -1; + } + + return 0; +} + +/* + * Makes the device autocenter, 0 disables. + */ +int +SDL_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +{ + if (!ValidHaptic(haptic)) { + return -1; + } + + if ((haptic->supported & SDL_HAPTIC_AUTOCENTER) == 0) { + SDL_SetError("Haptic: Device does not support setting autocenter."); + return -1; + } + + if ((autocenter < 0) || (autocenter > 100)) { + SDL_SetError("Haptic: Autocenter must be between 0 and 100."); + return -1; + } + + if (SDL_SYS_HapticSetAutocenter(haptic, autocenter) < 0) { + return -1; + } + + return 0; +} + +/* + * Pauses the haptic device. + */ +int +SDL_HapticPause(SDL_Haptic * haptic) +{ + if (!ValidHaptic(haptic)) { + return -1; + } + + if ((haptic->supported & SDL_HAPTIC_PAUSE) == 0) { + SDL_SetError("Haptic: Device does not support setting pausing."); + return -1; + } + + return SDL_SYS_HapticPause(haptic); +} + +/* + * Unpauses the haptic device. + */ +int +SDL_HapticUnpause(SDL_Haptic * haptic) +{ + if (!ValidHaptic(haptic)) { + return -1; + } + + if ((haptic->supported & SDL_HAPTIC_PAUSE) == 0) { + return 0; /* Not going to be paused, so we pretend it's unpaused. */ + } + + return SDL_SYS_HapticUnpause(haptic); +} + +/* + * Stops all the currently playing effects. + */ +int +SDL_HapticStopAll(SDL_Haptic * haptic) +{ + if (!ValidHaptic(haptic)) { + return -1; + } + + return SDL_SYS_HapticStopAll(haptic); +} diff --git a/macosx/plugins/DFInput/SDL/src/haptic/SDL_haptic_c.h b/macosx/plugins/DFInput/SDL/src/haptic/SDL_haptic_c.h new file mode 100644 index 00000000..4144a0fb --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/haptic/SDL_haptic_c.h @@ -0,0 +1,26 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ + +extern int SDL_HapticInit(void); +extern void SDL_HapticQuit(void); + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/src/haptic/SDL_syshaptic.h b/macosx/plugins/DFInput/SDL/src/haptic/SDL_syshaptic.h new file mode 100644 index 00000000..9542a0d7 --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/haptic/SDL_syshaptic.h @@ -0,0 +1,201 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2008 Edgar Simo + + 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 +*/ + +#include "SDL_config.h" + +#include "SDL_haptic.h" + + +/* + * Number of haptic devices on the system. + */ +extern Uint8 SDL_numhaptics; + + +struct haptic_effect +{ + SDL_HapticEffect effect; /* The current event */ + struct haptic_hweffect *hweffect; /* The hardware behind the event */ +}; + +/* + * The real SDL_Haptic struct. + */ +struct _SDL_Haptic +{ + Uint8 index; /* Stores index it is attached to */ + + struct haptic_effect *effects; /* Allocated effects */ + int neffects; /* Maximum amount of effects */ + int nplaying; /* Maximum amount of effects to play at the same time */ + unsigned int supported; /* Supported effects */ + int naxes; /* Number of axes on the device. */ + + struct haptic_hwdata *hwdata; /* Driver dependent */ + int ref_count; /* Count for multiple opens */ +}; + +/* + * Scans the system for haptic devices. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticInit(void); + +/* + * Gets the device dependent name of the haptic device + */ +extern const char *SDL_SYS_HapticName(int index); + +/* + * Opens the haptic device for usage. The haptic device should have + * the index value set previously. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticOpen(SDL_Haptic * haptic); + +/* + * Returns the index of the haptic core pointer or -1 if none is found. + */ +int SDL_SYS_HapticMouse(void); + +/* + * Checks to see if the joystick has haptic capabilities. + * + * Returns >0 if haptic capabilities are detected, 0 if haptic + * capabilities aren't detected and -1 on error. + */ +extern int SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick); + +/* + * Opens the haptic device for usage using the same device as + * the joystick. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, + SDL_Joystick * joystick); +/* + * Checks to see if haptic device and joystick device are the same. + * + * Returns 1 if they are the same, 0 if they aren't. + */ +extern int SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, + SDL_Joystick * joystick); + +/* + * Closes a haptic device after usage. + */ +extern void SDL_SYS_HapticClose(SDL_Haptic * haptic); + +/* + * Performs a cleanup on the haptic subsystem. + */ +extern void SDL_SYS_HapticQuit(void); + +/* + * Creates a new haptic effect on the haptic device using base + * as a template for the effect. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, + struct haptic_effect *effect, + SDL_HapticEffect * base); + +/* + * Updates the haptic effect on the haptic device using data + * as a template. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, + struct haptic_effect *effect, + SDL_HapticEffect * data); + +/* + * Runs the effect on the haptic device. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, + struct haptic_effect *effect, + Uint32 iterations); + +/* + * Stops the effect on the haptic device. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, + struct haptic_effect *effect); + +/* + * Cleanups up the effect on the haptic device. + */ +extern void SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, + struct haptic_effect *effect); + +/* + * Queries the device for the status of effect. + * + * Returns 0 if device is stopped, >0 if device is playing and + * -1 on error. + */ +extern int SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, + struct haptic_effect *effect); + +/* + * Sets the global gain of the haptic device. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain); + +/* + * Sets the autocenter feature of the haptic device. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter); + +/* + * Pauses the haptic device. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticPause(SDL_Haptic * haptic); + +/* + * Unpauses the haptic device. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticUnpause(SDL_Haptic * haptic); + +/* + * Stops all the currently playing haptic effects on the device. + * + * Returns 0 on success, -1 on error. + */ +extern int SDL_SYS_HapticStopAll(SDL_Haptic * haptic); diff --git a/macosx/plugins/DFInput/SDL/src/haptic/darwin/SDL_syshaptic.c b/macosx/plugins/DFInput/SDL/src/haptic/darwin/SDL_syshaptic.c new file mode 100644 index 00000000..c5b1e54b --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/haptic/darwin/SDL_syshaptic.c @@ -0,0 +1,1321 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2008 Edgar Simo + + 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 +*/ +#include "SDL_config.h" + +#ifdef SDL_HAPTIC_IOKIT + +#include "SDL_haptic.h" +#include "../SDL_syshaptic.h" +#include "SDL_joystick.h" +#include "../../joystick/SDL_sysjoystick.h" /* For the real SDL_Joystick */ +#include "../../joystick/darwin/SDL_sysjoystick_c.h" /* For joystick hwdata */ + +#include +#include +#include +#include +#include + +#ifndef IO_OBJECT_NULL +#define IO_OBJECT_NULL ((io_service_t)0) +#endif + +#define MAX_HAPTICS 32 + + +/* + * List of available haptic devices. + */ +static struct +{ + char name[256]; /* Name of the device. */ + + io_service_t dev; /* Node we use to create the device. */ + SDL_Haptic *haptic; /* Haptic currently assosciated with it. */ + + /* Usage pages for determining if it's a mouse or not. */ + long usage; + long usagePage; +} SDL_hapticlist[MAX_HAPTICS]; + + +/* + * Haptic system hardware data. + */ +struct haptic_hwdata +{ + FFDeviceObjectReference device; /* Hardware device. */ + UInt8 axes[3]; +}; + + +/* + * Haptic system effect data. + */ +struct haptic_hweffect +{ + FFEffectObjectReference ref; /* Reference. */ + struct FFEFFECT effect; /* Hardware effect. */ +}; + +/* + * Prototypes. + */ +static void SDL_SYS_HapticFreeFFEFFECT(FFEFFECT * effect, int type); +static int HIDGetDeviceProduct(io_service_t dev, char *name); + + +/* + * Like strerror but for force feedback errors. + */ +static const char * +FFStrError(HRESULT err) +{ + switch (err) { + case FFERR_DEVICEFULL: + return "device full"; + /* This should be valid, but for some reason isn't defined... */ + /*case FFERR_DEVICENOTREG: + return "device not registered"; */ + case FFERR_DEVICEPAUSED: + return "device paused"; + case FFERR_DEVICERELEASED: + return "device released"; + case FFERR_EFFECTPLAYING: + return "effect playing"; + case FFERR_EFFECTTYPEMISMATCH: + return "effect type mismatch"; + case FFERR_EFFECTTYPENOTSUPPORTED: + return "effect type not supported"; + case FFERR_GENERIC: + return "undetermined error"; + case FFERR_HASEFFECTS: + return "device has effects"; + case FFERR_INCOMPLETEEFFECT: + return "incomplete effect"; + case FFERR_INTERNAL: + return "internal fault"; + case FFERR_INVALIDDOWNLOADID: + return "invalid download id"; + case FFERR_INVALIDPARAM: + return "invalid parameter"; + case FFERR_MOREDATA: + return "more data"; + case FFERR_NOINTERFACE: + return "interface not supported"; + case FFERR_NOTDOWNLOADED: + return "effect is not downloaded"; + case FFERR_NOTINITIALIZED: + return "object has not been initialized"; + case FFERR_OUTOFMEMORY: + return "out of memory"; + case FFERR_UNPLUGGED: + return "device is unplugged"; + case FFERR_UNSUPPORTED: + return "function call unsupported"; + case FFERR_UNSUPPORTEDAXIS: + return "axis unsupported"; + + default: + return "unknown error"; + } +} + + +/* + * Initializes the haptic subsystem. + */ +int +SDL_SYS_HapticInit(void) +{ + int numhaptics; + IOReturn result; + io_iterator_t iter; + CFDictionaryRef match; + io_service_t device; + CFMutableDictionaryRef hidProperties; + CFTypeRef refCF; + + /* Clear all the memory. */ + SDL_memset(SDL_hapticlist, 0, sizeof(SDL_hapticlist)); + + /* Get HID devices. */ + match = IOServiceMatching(kIOHIDDeviceKey); + if (match == NULL) { + SDL_SetError("Haptic: Failed to get IOServiceMatching."); + return -1; + } + + /* Now search I/O Registry for matching devices. */ + result = IOServiceGetMatchingServices(kIOMasterPortDefault, match, &iter); + if (result != kIOReturnSuccess) { + SDL_SetError("Haptic: Couldn't create a HID object iterator."); + return -1; + } + /* IOServiceGetMatchingServices consumes dictionary. */ + + if (!IOIteratorIsValid(iter)) { /* No iterator. */ + numhaptics = 0; + return 0; + } + + numhaptics = 0; + while ((device = IOIteratorNext(iter)) != IO_OBJECT_NULL) { + + /* Check for force feedback. */ + if (FFIsForceFeedback(device) == FF_OK) { + + /* Set basic device data. */ + HIDGetDeviceProduct(device, SDL_hapticlist[numhaptics].name); + SDL_hapticlist[numhaptics].dev = device; + SDL_hapticlist[numhaptics].haptic = NULL; + + /* Set usage pages. */ + hidProperties = 0; + refCF = 0; + result = IORegistryEntryCreateCFProperties(device, + &hidProperties, + kCFAllocatorDefault, + kNilOptions); + if ((result == KERN_SUCCESS) && hidProperties) { + refCF = + CFDictionaryGetValue(hidProperties, + CFSTR(kIOHIDPrimaryUsagePageKey)); + if (refCF) { + if (!CFNumberGetValue(refCF, kCFNumberLongType, + &SDL_hapticlist[numhaptics]. + usagePage)) + SDL_SetError + ("Haptic: Recieving device's usage page."); + refCF = + CFDictionaryGetValue(hidProperties, + CFSTR(kIOHIDPrimaryUsageKey)); + if (refCF) { + if (!CFNumberGetValue(refCF, kCFNumberLongType, + &SDL_hapticlist[numhaptics]. + usage)) + SDL_SetError("Haptic: Recieving device's usage."); + } + } + CFRelease(hidProperties); + } + + /* Device has been added. */ + numhaptics++; + } else { /* Free the unused device. */ + IOObjectRelease(device); + } + + /* Reached haptic limit. */ + if (numhaptics >= MAX_HAPTICS) + break; + } + IOObjectRelease(iter); + + return numhaptics; +} + + +/* + * Return the name of a haptic device, does not need to be opened. + */ +const char * +SDL_SYS_HapticName(int index) +{ + return SDL_hapticlist[index].name; +} + +/* + * Gets the device's product name. + */ +static int +HIDGetDeviceProduct(io_service_t dev, char *name) +{ + CFMutableDictionaryRef hidProperties, usbProperties; + io_registry_entry_t parent1, parent2; + kern_return_t ret; + + hidProperties = usbProperties = 0; + + ret = IORegistryEntryCreateCFProperties(dev, &hidProperties, + kCFAllocatorDefault, kNilOptions); + if ((ret != KERN_SUCCESS) || !hidProperties) { + SDL_SetError("Haptic: Unable to create CFProperties."); + return -1; + } + + /* Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also + * get dictionary for usb properties: step up two levels and get CF dictionary for USB properties + */ + if ((KERN_SUCCESS == + IORegistryEntryGetParentEntry(dev, kIOServicePlane, &parent1)) + && (KERN_SUCCESS == + IORegistryEntryGetParentEntry(parent1, kIOServicePlane, &parent2)) + && (KERN_SUCCESS == + IORegistryEntryCreateCFProperties(parent2, &usbProperties, + kCFAllocatorDefault, + kNilOptions))) { + if (usbProperties) { + CFTypeRef refCF = 0; + /* get device info + * try hid dictionary first, if fail then go to usb dictionary + */ + + + /* Get product name */ + refCF = + CFDictionaryGetValue(hidProperties, CFSTR(kIOHIDProductKey)); + if (!refCF) + refCF = + CFDictionaryGetValue(usbProperties, + CFSTR("USB Product Name")); + if (refCF) { + if (!CFStringGetCString(refCF, name, 256, + CFStringGetSystemEncoding())) { + SDL_SetError + ("Haptic: CFStringGetCString error retrieving pDevice->product."); + return -1; + } + } + + CFRelease(usbProperties); + } else { + SDL_SetError + ("Haptic: IORegistryEntryCreateCFProperties failed to create usbProperties."); + return -1; + } + + /* Release stuff. */ + if (kIOReturnSuccess != IOObjectRelease(parent2)) { + SDL_SetError("Haptic: IOObjectRelease error with parent2."); + } + if (kIOReturnSuccess != IOObjectRelease(parent1)) { + SDL_SetError("Haptic: IOObjectRelease error with parent1."); + } + } else { + SDL_SetError("Haptic: Error getting registry entries."); + return -1; + } + + return 0; +} + + +#define FF_TEST(ff, s) \ +if (features.supportedEffects & (ff)) supported |= (s) +/* + * Gets supported features. + */ +static unsigned int +GetSupportedFeatures(SDL_Haptic * haptic) +{ + HRESULT ret; + FFDeviceObjectReference device; + FFCAPABILITIES features; + unsigned int supported; + Uint32 val; + + device = haptic->hwdata->device; + + ret = FFDeviceGetForceFeedbackCapabilities(device, &features); + if (ret != FF_OK) { + SDL_SetError("Haptic: Unable to get device's supported features."); + return -1; + } + + supported = 0; + + /* Get maximum effects. */ + haptic->neffects = features.storageCapacity; + haptic->nplaying = features.playbackCapacity; + + /* Test for effects. */ + FF_TEST(FFCAP_ET_CONSTANTFORCE, SDL_HAPTIC_CONSTANT); + FF_TEST(FFCAP_ET_RAMPFORCE, SDL_HAPTIC_RAMP); + FF_TEST(FFCAP_ET_SQUARE, SDL_HAPTIC_SQUARE); + FF_TEST(FFCAP_ET_SINE, SDL_HAPTIC_SINE); + FF_TEST(FFCAP_ET_TRIANGLE, SDL_HAPTIC_TRIANGLE); + FF_TEST(FFCAP_ET_SAWTOOTHUP, SDL_HAPTIC_SAWTOOTHUP); + FF_TEST(FFCAP_ET_SAWTOOTHDOWN, SDL_HAPTIC_SAWTOOTHDOWN); + FF_TEST(FFCAP_ET_SPRING, SDL_HAPTIC_SPRING); + FF_TEST(FFCAP_ET_DAMPER, SDL_HAPTIC_DAMPER); + FF_TEST(FFCAP_ET_INERTIA, SDL_HAPTIC_INERTIA); + FF_TEST(FFCAP_ET_FRICTION, SDL_HAPTIC_FRICTION); + FF_TEST(FFCAP_ET_CUSTOMFORCE, SDL_HAPTIC_CUSTOM); + + /* Check if supports gain. */ + ret = FFDeviceGetForceFeedbackProperty(device, FFPROP_FFGAIN, + &val, sizeof(val)); + if (ret == FF_OK) + supported |= SDL_HAPTIC_GAIN; + else if (ret != FFERR_UNSUPPORTED) { + SDL_SetError("Haptic: Unable to get if device supports gain: %s.", + FFStrError(ret)); + return -1; + } + + /* Checks if supports autocenter. */ + ret = FFDeviceGetForceFeedbackProperty(device, FFPROP_AUTOCENTER, + &val, sizeof(val)); + if (ret == FF_OK) + supported |= SDL_HAPTIC_AUTOCENTER; + else if (ret != FFERR_UNSUPPORTED) { + SDL_SetError + ("Haptic: Unable to get if device supports autocenter: %s.", + FFStrError(ret)); + return -1; + } + + /* Check for axes, we have an artificial limit on axes */ + haptic->naxes = ((features.numFfAxes) > 3) ? 3 : features.numFfAxes; + /* Actually store the axes we want to use */ + SDL_memcpy(haptic->hwdata->axes, features.ffAxes, + haptic->naxes * sizeof(Uint8)); + + /* Always supported features. */ + supported |= SDL_HAPTIC_STATUS | SDL_HAPTIC_PAUSE; + + haptic->supported = supported; + return 0;; +} + + +/* + * Opens the haptic device from the file descriptor. + */ +static int +SDL_SYS_HapticOpenFromService(SDL_Haptic * haptic, io_service_t service) +{ + HRESULT ret; + int ret2; + + /* Allocate the hwdata */ + haptic->hwdata = (struct haptic_hwdata *) + SDL_malloc(sizeof(*haptic->hwdata)); + if (haptic->hwdata == NULL) { + SDL_OutOfMemory(); + goto creat_err; + } + SDL_memset(haptic->hwdata, 0, sizeof(*haptic->hwdata)); + + /* Open the device */ + ret = FFCreateDevice(service, &haptic->hwdata->device); + if (ret != FF_OK) { + SDL_SetError("Haptic: Unable to create device from service: %s.", + FFStrError(ret)); + goto creat_err; + } + + /* Get supported features. */ + ret2 = GetSupportedFeatures(haptic); + if (haptic->supported < 0) { + goto open_err; + } + + + /* Reset and then enable actuators. */ + ret = FFDeviceSendForceFeedbackCommand(haptic->hwdata->device, + FFSFFC_RESET); + if (ret != FF_OK) { + SDL_SetError("Haptic: Unable to reset device: %s.", FFStrError(ret)); + goto open_err; + } + ret = FFDeviceSendForceFeedbackCommand(haptic->hwdata->device, + FFSFFC_SETACTUATORSON); + if (ret != FF_OK) { + SDL_SetError("Haptic: Unable to enable actuators: %s.", + FFStrError(ret)); + goto open_err; + } + + + /* Allocate effects memory. */ + haptic->effects = (struct haptic_effect *) + SDL_malloc(sizeof(struct haptic_effect) * haptic->neffects); + if (haptic->effects == NULL) { + SDL_OutOfMemory(); + goto open_err; + } + /* Clear the memory */ + SDL_memset(haptic->effects, 0, + sizeof(struct haptic_effect) * haptic->neffects); + + return 0; + + /* Error handling */ + open_err: + FFReleaseDevice(haptic->hwdata->device); + creat_err: + if (haptic->hwdata != NULL) { + free(haptic->hwdata); + haptic->hwdata = NULL; + } + return -1; + +} + + +/* + * Opens a haptic device for usage. + */ +int +SDL_SYS_HapticOpen(SDL_Haptic * haptic) +{ + return SDL_SYS_HapticOpenFromService(haptic, + SDL_hapticlist[haptic->index].dev); +} + + +/* + * Opens a haptic device from first mouse it finds for usage. + */ +int +SDL_SYS_HapticMouse(void) +{ + int i; + + for (i = 0; i < SDL_numhaptics; i++) { + if ((SDL_hapticlist[i].usagePage == kHIDPage_GenericDesktop) && + (SDL_hapticlist[i].usage == kHIDUsage_GD_Mouse)) + return i; + } + + return -1; +} + + +/* + * Checks to see if a joystick has haptic features. + */ +int +SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) +{ + if (joystick->hwdata->ffservice != 0) + return SDL_TRUE; + return SDL_FALSE; +} + + +/* + * Checks to see if the haptic device and joystick and in reality the same. + */ +int +SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) +{ + if (IOObjectIsEqualTo((io_object_t) haptic->hwdata->device, + joystick->hwdata->ffservice)) + return 1; + return 0; +} + + +/* + * Opens a SDL_Haptic from a SDL_Joystick. + */ +int +SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) +{ + return SDL_SYS_HapticOpenFromService(haptic, joystick->hwdata->ffservice); +} + + +/* + * Closes the haptic device. + */ +void +SDL_SYS_HapticClose(SDL_Haptic * haptic) +{ + if (haptic->hwdata) { + + /* Free Effects. */ + SDL_free(haptic->effects); + haptic->effects = NULL; + haptic->neffects = 0; + + /* Clean up */ + FFReleaseDevice(haptic->hwdata->device); + + /* Free */ + SDL_free(haptic->hwdata); + haptic->hwdata = NULL; + } +} + + +/* + * Clean up after system specific haptic stuff + */ +void +SDL_SYS_HapticQuit(void) +{ + int i; + + for (i = 0; i < SDL_numhaptics; i++) { + /* Opened and not closed haptics are leaked, this is on purpose. + * Close your haptic devices after usage. */ + + /* Free the io_service_t */ + IOObjectRelease(SDL_hapticlist[i].dev); + } +} + + +/* + * Converts an SDL trigger button to an FFEFFECT trigger button. + */ +static DWORD +FFGetTriggerButton(Uint16 button) +{ + DWORD dwTriggerButton; + + dwTriggerButton = FFEB_NOTRIGGER; + + if (button != 0) { + dwTriggerButton = FFJOFS_BUTTON(button - 1); + } + + return dwTriggerButton; +} + + +/* + * Sets the direction. + */ +static int +SDL_SYS_SetDirection(FFEFFECT * effect, SDL_HapticDirection * dir, int naxes) +{ + LONG *rglDir; + + /* Handle no axes a part. */ + if (naxes == 0) { + effect->dwFlags |= FFEFF_SPHERICAL; /* Set as default. */ + effect->rglDirection = NULL; + return 0; + } + + /* Has axes. */ + rglDir = SDL_malloc(sizeof(LONG) * naxes); + if (rglDir == NULL) { + SDL_OutOfMemory(); + return -1; + } + SDL_memset(rglDir, 0, sizeof(LONG) * naxes); + effect->rglDirection = rglDir; + + switch (dir->type) { + case SDL_HAPTIC_POLAR: + effect->dwFlags |= FFEFF_POLAR; + rglDir[0] = dir->dir[0]; + return 0; + case SDL_HAPTIC_CARTESIAN: + effect->dwFlags |= FFEFF_CARTESIAN; + rglDir[0] = dir->dir[0]; + if (naxes > 1) + rglDir[1] = dir->dir[1]; + if (naxes > 2) + rglDir[2] = dir->dir[2]; + return 0; + case SDL_HAPTIC_SPHERICAL: + effect->dwFlags |= FFEFF_SPHERICAL; + rglDir[0] = dir->dir[0]; + if (naxes > 1) + rglDir[1] = dir->dir[1]; + if (naxes > 2) + rglDir[2] = dir->dir[2]; + return 0; + + default: + SDL_SetError("Haptic: Unknown direction type."); + return -1; + } +} + + +/* Clamps and converts. */ +#define CCONVERT(x) (((x) > 0x7FFF) ? 10000 : ((x)*10000) / 0x7FFF) +/* Just converts. */ +#define CONVERT(x) (((x)*10000) / 0x7FFF) +/* + * Creates the FFEFFECT from a SDL_HapticEffect. + */ +static int +SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, + SDL_HapticEffect * src) +{ + int i; + FFCONSTANTFORCE *constant; + FFPERIODIC *periodic; + FFCONDITION *condition; /* Actually an array of conditions - one per axis. */ + FFRAMPFORCE *ramp; + FFCUSTOMFORCE *custom; + FFENVELOPE *envelope; + SDL_HapticConstant *hap_constant; + SDL_HapticPeriodic *hap_periodic; + SDL_HapticCondition *hap_condition; + SDL_HapticRamp *hap_ramp; + SDL_HapticCustom *hap_custom; + DWORD *axes; + + /* Set global stuff. */ + SDL_memset(dest, 0, sizeof(FFEFFECT)); + dest->dwSize = sizeof(FFEFFECT); /* Set the structure size. */ + dest->dwSamplePeriod = 0; /* Not used by us. */ + dest->dwGain = 10000; /* Gain is set globally, not locally. */ + dest->dwFlags = FFEFF_OBJECTOFFSETS; /* Seems obligatory. */ + + /* Envelope. */ + envelope = SDL_malloc(sizeof(FFENVELOPE)); + if (envelope == NULL) { + SDL_OutOfMemory(); + return -1; + } + SDL_memset(envelope, 0, sizeof(FFENVELOPE)); + dest->lpEnvelope = envelope; + envelope->dwSize = sizeof(FFENVELOPE); /* Always should be this. */ + + /* Axes. */ + dest->cAxes = haptic->naxes; + if (dest->cAxes > 0) { + axes = SDL_malloc(sizeof(DWORD) * dest->cAxes); + if (axes == NULL) { + SDL_OutOfMemory(); + return -1; + } + axes[0] = haptic->hwdata->axes[0]; /* Always at least one axis. */ + if (dest->cAxes > 1) { + axes[1] = haptic->hwdata->axes[1]; + } + if (dest->cAxes > 2) { + axes[2] = haptic->hwdata->axes[2]; + } + dest->rgdwAxes = axes; + } + + + /* The big type handling switch, even bigger then linux's version. */ + switch (src->type) { + case SDL_HAPTIC_CONSTANT: + hap_constant = &src->constant; + constant = SDL_malloc(sizeof(FFCONSTANTFORCE)); + if (constant == NULL) { + SDL_OutOfMemory(); + return -1; + } + SDL_memset(constant, 0, sizeof(FFCONSTANTFORCE)); + + /* Specifics */ + constant->lMagnitude = CONVERT(hap_constant->level); + dest->cbTypeSpecificParams = sizeof(FFCONSTANTFORCE); + dest->lpvTypeSpecificParams = constant; + + /* Generics */ + dest->dwDuration = hap_constant->length * 1000; /* In microseconds. */ + dest->dwTriggerButton = FFGetTriggerButton(hap_constant->button); + dest->dwTriggerRepeatInterval = hap_constant->interval; + dest->dwStartDelay = hap_constant->delay * 1000; /* In microseconds. */ + + /* Direction. */ + if (SDL_SYS_SetDirection(dest, &hap_constant->direction, dest->cAxes) + < 0) { + return -1; + } + + /* Envelope */ + if ((hap_constant->attack_length == 0) + && (hap_constant->fade_length == 0)) { + SDL_free(envelope); + dest->lpEnvelope = NULL; + } else { + envelope->dwAttackLevel = CCONVERT(hap_constant->attack_level); + envelope->dwAttackTime = hap_constant->attack_length * 1000; + envelope->dwFadeLevel = CCONVERT(hap_constant->fade_level); + envelope->dwFadeTime = hap_constant->fade_length * 1000; + } + + break; + + case SDL_HAPTIC_SINE: + case SDL_HAPTIC_SQUARE: + case SDL_HAPTIC_TRIANGLE: + case SDL_HAPTIC_SAWTOOTHUP: + case SDL_HAPTIC_SAWTOOTHDOWN: + hap_periodic = &src->periodic; + periodic = SDL_malloc(sizeof(FFPERIODIC)); + if (periodic == NULL) { + SDL_OutOfMemory(); + return -1; + } + SDL_memset(periodic, 0, sizeof(FFPERIODIC)); + + /* Specifics */ + periodic->dwMagnitude = CONVERT(hap_periodic->magnitude); + periodic->lOffset = CONVERT(hap_periodic->offset); + periodic->dwPhase = hap_periodic->phase; + periodic->dwPeriod = hap_periodic->period * 1000; + dest->cbTypeSpecificParams = sizeof(FFPERIODIC); + dest->lpvTypeSpecificParams = periodic; + + /* Generics */ + dest->dwDuration = hap_periodic->length * 1000; /* In microseconds. */ + dest->dwTriggerButton = FFGetTriggerButton(hap_periodic->button); + dest->dwTriggerRepeatInterval = hap_periodic->interval; + dest->dwStartDelay = hap_periodic->delay * 1000; /* In microseconds. */ + + /* Direction. */ + if (SDL_SYS_SetDirection(dest, &hap_periodic->direction, dest->cAxes) + < 0) { + return -1; + } + + /* Envelope */ + if ((hap_periodic->attack_length == 0) + && (hap_periodic->fade_length == 0)) { + SDL_free(envelope); + dest->lpEnvelope = NULL; + } else { + envelope->dwAttackLevel = CCONVERT(hap_periodic->attack_level); + envelope->dwAttackTime = hap_periodic->attack_length * 1000; + envelope->dwFadeLevel = CCONVERT(hap_periodic->fade_level); + envelope->dwFadeTime = hap_periodic->fade_length * 1000; + } + + break; + + case SDL_HAPTIC_SPRING: + case SDL_HAPTIC_DAMPER: + case SDL_HAPTIC_INERTIA: + case SDL_HAPTIC_FRICTION: + hap_condition = &src->condition; + condition = SDL_malloc(sizeof(FFCONDITION) * dest->cAxes); + if (condition == NULL) { + SDL_OutOfMemory(); + return -1; + } + SDL_memset(condition, 0, sizeof(FFCONDITION)); + + /* Specifics */ + for (i = 0; i < dest->cAxes; i++) { + condition[i].lOffset = CONVERT(hap_condition->center[i]); + condition[i].lPositiveCoefficient = + CONVERT(hap_condition->right_coeff[i]); + condition[i].lNegativeCoefficient = + CONVERT(hap_condition->left_coeff[i]); + condition[i].dwPositiveSaturation = + CCONVERT(hap_condition->right_sat[i]); + condition[i].dwNegativeSaturation = + CCONVERT(hap_condition->left_sat[i]); + condition[i].lDeadBand = CCONVERT(hap_condition->deadband[i]); + } + dest->cbTypeSpecificParams = sizeof(FFCONDITION) * dest->cAxes; + dest->lpvTypeSpecificParams = condition; + + /* Generics */ + dest->dwDuration = hap_condition->length * 1000; /* In microseconds. */ + dest->dwTriggerButton = FFGetTriggerButton(hap_condition->button); + dest->dwTriggerRepeatInterval = hap_condition->interval; + dest->dwStartDelay = hap_condition->delay * 1000; /* In microseconds. */ + + /* Direction. */ + if (SDL_SYS_SetDirection(dest, &hap_condition->direction, dest->cAxes) + < 0) { + return -1; + } + + /* Envelope - Not actually supported by most CONDITION implementations. */ + SDL_free(dest->lpEnvelope); + dest->lpEnvelope = NULL; + + break; + + case SDL_HAPTIC_RAMP: + hap_ramp = &src->ramp; + ramp = SDL_malloc(sizeof(FFRAMPFORCE)); + if (ramp == NULL) { + SDL_OutOfMemory(); + return -1; + } + SDL_memset(ramp, 0, sizeof(FFRAMPFORCE)); + + /* Specifics */ + ramp->lStart = CONVERT(hap_ramp->start); + ramp->lEnd = CONVERT(hap_ramp->end); + dest->cbTypeSpecificParams = sizeof(FFRAMPFORCE); + dest->lpvTypeSpecificParams = ramp; + + /* Generics */ + dest->dwDuration = hap_ramp->length * 1000; /* In microseconds. */ + dest->dwTriggerButton = FFGetTriggerButton(hap_ramp->button); + dest->dwTriggerRepeatInterval = hap_ramp->interval; + dest->dwStartDelay = hap_ramp->delay * 1000; /* In microseconds. */ + + /* Direction. */ + if (SDL_SYS_SetDirection(dest, &hap_ramp->direction, dest->cAxes) < 0) { + return -1; + } + + /* Envelope */ + if ((hap_ramp->attack_length == 0) && (hap_ramp->fade_length == 0)) { + SDL_free(envelope); + dest->lpEnvelope = NULL; + } else { + envelope->dwAttackLevel = CCONVERT(hap_ramp->attack_level); + envelope->dwAttackTime = hap_ramp->attack_length * 1000; + envelope->dwFadeLevel = CCONVERT(hap_ramp->fade_level); + envelope->dwFadeTime = hap_ramp->fade_length * 1000; + } + + break; + + case SDL_HAPTIC_CUSTOM: + hap_custom = &src->custom; + custom = SDL_malloc(sizeof(FFCUSTOMFORCE)); + if (custom == NULL) { + SDL_OutOfMemory(); + return -1; + } + SDL_memset(custom, 0, sizeof(FFCUSTOMFORCE)); + + /* Specifics */ + custom->cChannels = hap_custom->channels; + custom->dwSamplePeriod = hap_custom->period * 1000; + custom->cSamples = hap_custom->samples; + custom->rglForceData = + SDL_malloc(sizeof(LONG) * custom->cSamples * custom->cChannels); + for (i = 0; i < hap_custom->samples * hap_custom->channels; i++) { /* Copy data. */ + custom->rglForceData[i] = CCONVERT(hap_custom->data[i]); + } + dest->cbTypeSpecificParams = sizeof(FFCUSTOMFORCE); + dest->lpvTypeSpecificParams = custom; + + /* Generics */ + dest->dwDuration = hap_custom->length * 1000; /* In microseconds. */ + dest->dwTriggerButton = FFGetTriggerButton(hap_custom->button); + dest->dwTriggerRepeatInterval = hap_custom->interval; + dest->dwStartDelay = hap_custom->delay * 1000; /* In microseconds. */ + + /* Direction. */ + if (SDL_SYS_SetDirection(dest, &hap_custom->direction, dest->cAxes) < + 0) { + return -1; + } + + /* Envelope */ + if ((hap_custom->attack_length == 0) + && (hap_custom->fade_length == 0)) { + SDL_free(envelope); + dest->lpEnvelope = NULL; + } else { + envelope->dwAttackLevel = CCONVERT(hap_custom->attack_level); + envelope->dwAttackTime = hap_custom->attack_length * 1000; + envelope->dwFadeLevel = CCONVERT(hap_custom->fade_level); + envelope->dwFadeTime = hap_custom->fade_length * 1000; + } + + break; + + + default: + SDL_SetError("Haptic: Unknown effect type."); + return -1; + } + + return 0; +} + + +/* + * Frees an FFEFFECT allocated by SDL_SYS_ToFFEFFECT. + */ +static void +SDL_SYS_HapticFreeFFEFFECT(FFEFFECT * effect, int type) +{ + FFCUSTOMFORCE *custom; + + if (effect->lpEnvelope != NULL) { + SDL_free(effect->lpEnvelope); + effect->lpEnvelope = NULL; + } + if (effect->rgdwAxes != NULL) { + SDL_free(effect->rgdwAxes); + effect->rgdwAxes = NULL; + } + if (effect->lpvTypeSpecificParams != NULL) { + if (type == SDL_HAPTIC_CUSTOM) { /* Must free the custom data. */ + custom = (FFCUSTOMFORCE *) effect->lpvTypeSpecificParams; + SDL_free(custom->rglForceData); + custom->rglForceData = NULL; + } + SDL_free(effect->lpvTypeSpecificParams); + effect->lpvTypeSpecificParams = NULL; + } + if (effect->rglDirection != NULL) { + SDL_free(effect->rglDirection); + effect->rglDirection = NULL; + } +} + + +/* + * Gets the effect type from the generic SDL haptic effect wrapper. + */ +CFUUIDRef +SDL_SYS_HapticEffectType(Uint16 type) +{ + switch (type) { + case SDL_HAPTIC_CONSTANT: + return kFFEffectType_ConstantForce_ID; + + case SDL_HAPTIC_RAMP: + return kFFEffectType_RampForce_ID; + + case SDL_HAPTIC_SQUARE: + return kFFEffectType_Square_ID; + + case SDL_HAPTIC_SINE: + return kFFEffectType_Sine_ID; + + case SDL_HAPTIC_TRIANGLE: + return kFFEffectType_Triangle_ID; + + case SDL_HAPTIC_SAWTOOTHUP: + return kFFEffectType_SawtoothUp_ID; + + case SDL_HAPTIC_SAWTOOTHDOWN: + return kFFEffectType_SawtoothDown_ID; + + case SDL_HAPTIC_SPRING: + return kFFEffectType_Spring_ID; + + case SDL_HAPTIC_DAMPER: + return kFFEffectType_Damper_ID; + + case SDL_HAPTIC_INERTIA: + return kFFEffectType_Inertia_ID; + + case SDL_HAPTIC_FRICTION: + return kFFEffectType_Friction_ID; + + case SDL_HAPTIC_CUSTOM: + return kFFEffectType_CustomForce_ID; + + default: + SDL_SetError("Haptic: Unknown effect type."); + return NULL; + } +} + + +/* + * Creates a new haptic effect. + */ +int +SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, + SDL_HapticEffect * base) +{ + HRESULT ret; + CFUUIDRef type; + + /* Alloc the effect. */ + effect->hweffect = (struct haptic_hweffect *) + SDL_malloc(sizeof(struct haptic_hweffect)); + if (effect->hweffect == NULL) { + SDL_OutOfMemory(); + goto err_hweffect; + } + + /* Get the type. */ + type = SDL_SYS_HapticEffectType(base->type); + if (type == NULL) { + goto err_hweffect; + } + + /* Get the effect. */ + if (SDL_SYS_ToFFEFFECT(haptic, &effect->hweffect->effect, base) < 0) { + goto err_effectdone; + } + + /* Create the actual effect. */ + ret = FFDeviceCreateEffect(haptic->hwdata->device, type, + &effect->hweffect->effect, + &effect->hweffect->ref); + if (ret != FF_OK) { + SDL_SetError("Haptic: Unable to create effect: %s.", FFStrError(ret)); + goto err_effectdone; + } + + return 0; + + err_effectdone: + SDL_SYS_HapticFreeFFEFFECT(&effect->hweffect->effect, base->type); + err_hweffect: + if (effect->hweffect != NULL) { + SDL_free(effect->hweffect); + effect->hweffect = NULL; + } + return -1; +} + + +/* + * Updates an effect. + */ +int +SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, + struct haptic_effect *effect, + SDL_HapticEffect * data) +{ + HRESULT ret; + FFEffectParameterFlag flags; + FFEFFECT temp; + + /* Get the effect. */ + SDL_memset(&temp, 0, sizeof(FFEFFECT)); + if (SDL_SYS_ToFFEFFECT(haptic, &temp, data) < 0) { + goto err_update; + } + + /* Set the flags. Might be worthwhile to diff temp with loaded effect and + * only change those parameters. */ + flags = FFEP_DIRECTION | + FFEP_DURATION | + FFEP_ENVELOPE | + FFEP_STARTDELAY | + FFEP_TRIGGERBUTTON | + FFEP_TRIGGERREPEATINTERVAL | FFEP_TYPESPECIFICPARAMS; + + /* Create the actual effect. */ + ret = FFEffectSetParameters(effect->hweffect->ref, &temp, flags); + if (ret != FF_OK) { + SDL_SetError("Haptic: Unable to update effect: %s.", FFStrError(ret)); + goto err_update; + } + + /* Copy it over. */ + SDL_SYS_HapticFreeFFEFFECT(&effect->hweffect->effect, data->type); + SDL_memcpy(&effect->hweffect->effect, &temp, sizeof(FFEFFECT)); + + return 0; + + err_update: + SDL_SYS_HapticFreeFFEFFECT(&temp, data->type); + return -1; +} + + +/* + * Runs an effect. + */ +int +SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, + Uint32 iterations) +{ + HRESULT ret; + Uint32 iter; + + /* Check if it's infinite. */ + if (iterations == SDL_HAPTIC_INFINITY) { + iter = FF_INFINITE; + } else + iter = iterations; + + /* Run the effect. */ + ret = FFEffectStart(effect->hweffect->ref, iter, 0); + if (ret != FF_OK) { + SDL_SetError("Haptic: Unable to run the effect: %s.", + FFStrError(ret)); + return -1; + } + + return 0; +} + + +/* + * Stops an effect. + */ +int +SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +{ + HRESULT ret; + + ret = FFEffectStop(effect->hweffect->ref); + if (ret != FF_OK) { + SDL_SetError("Haptic: Unable to stop the effect: %s.", + FFStrError(ret)); + return -1; + } + + return 0; +} + + +/* + * Frees the effect. + */ +void +SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect) +{ + HRESULT ret; + + ret = + FFDeviceReleaseEffect(haptic->hwdata->device, effect->hweffect->ref); + if (ret != FF_OK) { + SDL_SetError("Haptic: Error removing the effect from the device: %s.", + FFStrError(ret)); + } + SDL_SYS_HapticFreeFFEFFECT(&effect->hweffect->effect, + effect->effect.type); + SDL_free(effect->hweffect); + effect->hweffect = NULL; +} + + +/* + * Gets the status of a haptic effect. + */ +int +SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, + struct haptic_effect *effect) +{ + HRESULT ret; + FFEffectStatusFlag status; + + ret = FFEffectGetEffectStatus(effect->hweffect->ref, &status); + if (ret != FF_OK) { + SDL_SetError("Haptic: Unable to get effect status: %s.", + FFStrError(ret)); + return -1; + } + + if (status == 0) + return SDL_FALSE; + return SDL_TRUE; /* Assume it's playing or emulated. */ +} + + +/* + * Sets the gain. + */ +int +SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain) +{ + HRESULT ret; + Uint32 val; + + val = gain * 100; /* Mac OS X uses 0 to 10,000 */ + ret = + FFDeviceSetForceFeedbackProperty(haptic->hwdata->device, + FFPROP_FFGAIN, &val); + if (ret != FF_OK) { + SDL_SetError("Haptic: Error setting gain: %s.", FFStrError(ret)); + return -1; + } + + return 0; +} + + +/* + * Sets the autocentering. + */ +int +SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) +{ + HRESULT ret; + Uint32 val; + + /* Mac OS X only has 0 (off) and 1 (on) */ + if (autocenter == 0) + val = 0; + else + val = 1; + + ret = FFDeviceSetForceFeedbackProperty(haptic->hwdata->device, + FFPROP_AUTOCENTER, &val); + if (ret != FF_OK) { + SDL_SetError("Haptic: Error setting autocenter: %s.", + FFStrError(ret)); + return -1; + } + + return 0; +} + + +/* + * Pauses the device. + */ +int +SDL_SYS_HapticPause(SDL_Haptic * haptic) +{ + HRESULT ret; + + ret = FFDeviceSendForceFeedbackCommand(haptic->hwdata->device, + FFSFFC_PAUSE); + if (ret != FF_OK) { + SDL_SetError("Haptic: Error pausing device: %s.", FFStrError(ret)); + return -1; + } + + return 0; +} + + +/* + * Unpauses the device. + */ +int +SDL_SYS_HapticUnpause(SDL_Haptic * haptic) +{ + HRESULT ret; + + ret = FFDeviceSendForceFeedbackCommand(haptic->hwdata->device, + FFSFFC_CONTINUE); + if (ret != FF_OK) { + SDL_SetError("Haptic: Error pausing device: %s.", FFStrError(ret)); + return -1; + } + + return 0; +} + + +/* + * Stops all currently playing effects. + */ +int +SDL_SYS_HapticStopAll(SDL_Haptic * haptic) +{ + HRESULT ret; + + ret = FFDeviceSendForceFeedbackCommand(haptic->hwdata->device, + FFSFFC_STOPALL); + if (ret != FF_OK) { + SDL_SetError("Haptic: Error stopping device: %s.", FFStrError(ret)); + return -1; + } + + return 0; +} + + +#endif /* SDL_HAPTIC_IOKIT */ diff --git a/macosx/plugins/DFInput/SDL/src/joystick/SDL_joystick.c b/macosx/plugins/DFInput/SDL/src/joystick/SDL_joystick.c new file mode 100644 index 00000000..189b8117 --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/joystick/SDL_joystick.c @@ -0,0 +1,503 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ +#include "SDL_config.h" + +/* This is the joystick API for Simple DirectMedia Layer */ +#include "SDL.h" +#include "SDL_sysjoystick.h" +#include "SDL_joystick_c.h" + +/* This is used for Quake III Arena */ +#define SDL_Lock_EventThread() +#define SDL_Unlock_EventThread() + +Uint8 SDL_numjoysticks = 0; +SDL_Joystick **SDL_joysticks = NULL; +static SDL_Joystick *default_joystick = NULL; + +int +SDL_JoystickInit(void) +{ + int arraylen; + int status; + + SDL_numjoysticks = 0; + status = SDL_SYS_JoystickInit(); + if (status >= 0) { + arraylen = (status + 1) * sizeof(*SDL_joysticks); + SDL_joysticks = (SDL_Joystick **) SDL_malloc(arraylen); + if (SDL_joysticks == NULL) { + SDL_numjoysticks = 0; + } else { + SDL_memset(SDL_joysticks, 0, arraylen); + SDL_numjoysticks = status; + } + status = 0; + } + default_joystick = NULL; + return (status); +} + +/* + * Count the number of joysticks attached to the system + */ +int +SDL_NumJoysticks(void) +{ + return SDL_numjoysticks; +} + +/* + * Get the implementation dependent name of a joystick + */ +const char * +SDL_JoystickName(int device_index) +{ + if ((device_index < 0) || (device_index >= SDL_numjoysticks)) { + SDL_SetError("There are %d joysticks available", SDL_numjoysticks); + return (NULL); + } + return (SDL_SYS_JoystickName(device_index)); +} + +/* + * Open a joystick for use - the index passed as an argument refers to + * the N'th joystick on the system. This index is the value which will + * identify this joystick in future joystick events. + * + * This function returns a joystick identifier, or NULL if an error occurred. + */ +SDL_Joystick * +SDL_JoystickOpen(int device_index) +{ + int i; + SDL_Joystick *joystick; + + if ((device_index < 0) || (device_index >= SDL_numjoysticks)) { + SDL_SetError("There are %d joysticks available", SDL_numjoysticks); + return (NULL); + } + + /* If the joystick is already open, return it */ + for (i = 0; SDL_joysticks[i]; ++i) { + if (device_index == SDL_joysticks[i]->index) { + joystick = SDL_joysticks[i]; + ++joystick->ref_count; + return (joystick); + } + } + + /* Create and initialize the joystick */ + joystick = (SDL_Joystick *) SDL_malloc((sizeof *joystick)); + if (joystick == NULL) { + SDL_OutOfMemory(); + return NULL; + } + + SDL_memset(joystick, 0, (sizeof *joystick)); + joystick->index = device_index; + if (SDL_SYS_JoystickOpen(joystick) < 0) { + SDL_free(joystick); + return NULL; + } + if (joystick->naxes > 0) { + joystick->axes = (Sint16 *) SDL_malloc + (joystick->naxes * sizeof(Sint16)); + } + if (joystick->nhats > 0) { + joystick->hats = (Uint8 *) SDL_malloc + (joystick->nhats * sizeof(Uint8)); + } + if (joystick->nballs > 0) { + joystick->balls = (struct balldelta *) SDL_malloc + (joystick->nballs * sizeof(*joystick->balls)); + } + if (joystick->nbuttons > 0) { + joystick->buttons = (Uint8 *) SDL_malloc + (joystick->nbuttons * sizeof(Uint8)); + } + if (((joystick->naxes > 0) && !joystick->axes) + || ((joystick->nhats > 0) && !joystick->hats) + || ((joystick->nballs > 0) && !joystick->balls) + || ((joystick->nbuttons > 0) && !joystick->buttons)) { + SDL_OutOfMemory(); + SDL_JoystickClose(joystick); + return NULL; + } + if (joystick->axes) { + SDL_memset(joystick->axes, 0, joystick->naxes * sizeof(Sint16)); + } + if (joystick->hats) { + SDL_memset(joystick->hats, 0, joystick->nhats * sizeof(Uint8)); + } + if (joystick->balls) { + SDL_memset(joystick->balls, 0, + joystick->nballs * sizeof(*joystick->balls)); + } + if (joystick->buttons) { + SDL_memset(joystick->buttons, 0, joystick->nbuttons * sizeof(Uint8)); + } + + /* Add joystick to list */ + ++joystick->ref_count; + SDL_Lock_EventThread(); + for (i = 0; SDL_joysticks[i]; ++i) + /* Skip to next joystick */ ; + SDL_joysticks[i] = joystick; + SDL_Unlock_EventThread(); + + return (joystick); +} + +/* + * Returns 1 if the joystick has been opened, or 0 if it has not. + */ +int +SDL_JoystickOpened(int device_index) +{ + int i, opened; + + opened = 0; + for (i = 0; SDL_joysticks[i]; ++i) { + if (SDL_joysticks[i]->index == (Uint8) device_index) { + opened = 1; + break; + } + } + return (opened); +} + + +/* + * Checks to make sure the joystick is valid. + */ +int +SDL_PrivateJoystickValid(SDL_Joystick ** joystick) +{ + int valid; + + if (*joystick == NULL) { + *joystick = default_joystick; + } + if (*joystick == NULL) { + SDL_SetError("Joystick hasn't been opened yet"); + valid = 0; + } else { + valid = 1; + } + return valid; +} + +/* + * Get the device index of an opened joystick. + */ +int +SDL_JoystickIndex(SDL_Joystick * joystick) +{ + if (!SDL_PrivateJoystickValid(&joystick)) { + return (-1); + } + return (joystick->index); +} + +/* + * Get the number of multi-dimensional axis controls on a joystick + */ +int +SDL_JoystickNumAxes(SDL_Joystick * joystick) +{ + if (!SDL_PrivateJoystickValid(&joystick)) { + return (-1); + } + return (joystick->naxes); +} + +/* + * Get the number of hats on a joystick + */ +int +SDL_JoystickNumHats(SDL_Joystick * joystick) +{ + if (!SDL_PrivateJoystickValid(&joystick)) { + return (-1); + } + return (joystick->nhats); +} + +/* + * Get the number of trackballs on a joystick + */ +int +SDL_JoystickNumBalls(SDL_Joystick * joystick) +{ + if (!SDL_PrivateJoystickValid(&joystick)) { + return (-1); + } + return (joystick->nballs); +} + +/* + * Get the number of buttons on a joystick + */ +int +SDL_JoystickNumButtons(SDL_Joystick * joystick) +{ + if (!SDL_PrivateJoystickValid(&joystick)) { + return (-1); + } + return (joystick->nbuttons); +} + +/* + * Get the current state of an axis control on a joystick + */ +Sint16 +SDL_JoystickGetAxis(SDL_Joystick * joystick, int axis) +{ + Sint16 state; + + if (!SDL_PrivateJoystickValid(&joystick)) { + return (0); + } + if (axis < joystick->naxes) { + state = joystick->axes[axis]; + } else { + SDL_SetError("Joystick only has %d axes", joystick->naxes); + state = 0; + } + return (state); +} + +/* + * Get the current state of a hat on a joystick + */ +Uint8 +SDL_JoystickGetHat(SDL_Joystick * joystick, int hat) +{ + Uint8 state; + + if (!SDL_PrivateJoystickValid(&joystick)) { + return (0); + } + if (hat < joystick->nhats) { + state = joystick->hats[hat]; + } else { + SDL_SetError("Joystick only has %d hats", joystick->nhats); + state = 0; + } + return (state); +} + +/* + * Get the ball axis change since the last poll + */ +int +SDL_JoystickGetBall(SDL_Joystick * joystick, int ball, int *dx, int *dy) +{ + int retval; + + if (!SDL_PrivateJoystickValid(&joystick)) { + return (-1); + } + + retval = 0; + if (ball < joystick->nballs) { + if (dx) { + *dx = joystick->balls[ball].dx; + } + if (dy) { + *dy = joystick->balls[ball].dy; + } + joystick->balls[ball].dx = 0; + joystick->balls[ball].dy = 0; + } else { + SDL_SetError("Joystick only has %d balls", joystick->nballs); + retval = -1; + } + return (retval); +} + +/* + * Get the current state of a button on a joystick + */ +Uint8 +SDL_JoystickGetButton(SDL_Joystick * joystick, int button) +{ + Uint8 state; + + if (!SDL_PrivateJoystickValid(&joystick)) { + return (0); + } + if (button < joystick->nbuttons) { + state = joystick->buttons[button]; + } else { + SDL_SetError("Joystick only has %d buttons", joystick->nbuttons); + state = 0; + } + return (state); +} + +/* + * Close a joystick previously opened with SDL_JoystickOpen() + */ +void +SDL_JoystickClose(SDL_Joystick * joystick) +{ + int i; + + if (!SDL_PrivateJoystickValid(&joystick)) { + return; + } + + /* First decrement ref count */ + if (--joystick->ref_count > 0) { + return; + } + + /* Lock the event queue - prevent joystick polling */ + SDL_Lock_EventThread(); + + if (joystick == default_joystick) { + default_joystick = NULL; + } + SDL_SYS_JoystickClose(joystick); + + /* Remove joystick from list */ + for (i = 0; SDL_joysticks[i]; ++i) { + if (joystick == SDL_joysticks[i]) { + SDL_memmove(&SDL_joysticks[i], &SDL_joysticks[i + 1], + (SDL_numjoysticks - i) * sizeof(joystick)); + break; + } + } + + /* Let the event thread keep running */ + SDL_Unlock_EventThread(); + + /* Free the data associated with this joystick */ + if (joystick->axes) { + SDL_free(joystick->axes); + } + if (joystick->hats) { + SDL_free(joystick->hats); + } + if (joystick->balls) { + SDL_free(joystick->balls); + } + if (joystick->buttons) { + SDL_free(joystick->buttons); + } + SDL_free(joystick); +} + +void +SDL_JoystickQuit(void) +{ + /* Stop the event polling */ + SDL_Lock_EventThread(); + SDL_numjoysticks = 0; + SDL_Unlock_EventThread(); + + /* Quit the joystick setup */ + SDL_SYS_JoystickQuit(); + if (SDL_joysticks) { + SDL_free(SDL_joysticks); + SDL_joysticks = NULL; + } +} + + +/* These are global for SDL_sysjoystick.c and SDL_events.c */ + +int +SDL_PrivateJoystickAxis(SDL_Joystick * joystick, Uint8 axis, Sint16 value) +{ + int posted; + + /* Update internal joystick state */ + joystick->axes[axis] = value; + + /* Post the event, if desired */ + posted = 0; + + return (posted); +} + +int +SDL_PrivateJoystickHat(SDL_Joystick * joystick, Uint8 hat, Uint8 value) +{ + int posted; + + /* Update internal joystick state */ + joystick->hats[hat] = value; + + /* Post the event, if desired */ + posted = 0; + + return (posted); +} + +int +SDL_PrivateJoystickBall(SDL_Joystick * joystick, Uint8 ball, + Sint16 xrel, Sint16 yrel) +{ + int posted; + + /* Update internal mouse state */ + joystick->balls[ball].dx += xrel; + joystick->balls[ball].dy += yrel; + + /* Post the event, if desired */ + posted = 0; + + return (posted); +} + +int +SDL_PrivateJoystickButton(SDL_Joystick * joystick, Uint8 button, Uint8 state) +{ + int posted; + + /* Update internal joystick state */ + joystick->buttons[button] = state; + + /* Post the event, if desired */ + posted = 0; + + return (posted); +} + +void +SDL_JoystickUpdate(void) +{ + int i; + + for (i = 0; SDL_joysticks[i]; ++i) { + SDL_SYS_JoystickUpdate(SDL_joysticks[i]); + } +} + +int +SDL_JoystickEventState(int state) +{ + return SDL_IGNORE; +} diff --git a/macosx/plugins/DFInput/SDL/src/joystick/SDL_joystick_c.h b/macosx/plugins/DFInput/SDL/src/joystick/SDL_joystick_c.h new file mode 100644 index 00000000..e0f8529e --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/joystick/SDL_joystick_c.h @@ -0,0 +1,47 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ +#include "SDL_config.h" + +/* Useful functions and variables from SDL_joystick.c */ +#include "SDL_joystick.h" + +/* The number of available joysticks on the system */ +extern Uint8 SDL_numjoysticks; + +/* Initialization and shutdown functions */ +extern int SDL_JoystickInit(void); +extern void SDL_JoystickQuit(void); + +/* Internal event queueing functions */ +extern int SDL_PrivateJoystickAxis(SDL_Joystick * joystick, + Uint8 axis, Sint16 value); +extern int SDL_PrivateJoystickBall(SDL_Joystick * joystick, + Uint8 ball, Sint16 xrel, Sint16 yrel); +extern int SDL_PrivateJoystickHat(SDL_Joystick * joystick, + Uint8 hat, Uint8 value); +extern int SDL_PrivateJoystickButton(SDL_Joystick * joystick, + Uint8 button, Uint8 state); + +/* Internal sanity checking functions */ +extern int SDL_PrivateJoystickValid(SDL_Joystick ** joystick); + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/src/joystick/SDL_sysjoystick.h b/macosx/plugins/DFInput/SDL/src/joystick/SDL_sysjoystick.h new file mode 100644 index 00000000..ddb3b84f --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/joystick/SDL_sysjoystick.h @@ -0,0 +1,85 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 Sam Lantinga + + This library is SDL_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 +*/ +#include "SDL_config.h" + +/* This is the system specific header for the SDL joystick API */ + +#include "SDL_joystick.h" + +/* The SDL joystick structure */ +struct _SDL_Joystick +{ + Uint8 index; /* Device index */ + const char *name; /* Joystick name - system dependent */ + + int naxes; /* Number of axis controls on the joystick */ + Sint16 *axes; /* Current axis states */ + + int nhats; /* Number of hats on the joystick */ + Uint8 *hats; /* Current hat states */ + + int nballs; /* Number of trackballs on the joystick */ + struct balldelta + { + int dx; + int dy; + } *balls; /* Current ball motion deltas */ + + int nbuttons; /* Number of buttons on the joystick */ + Uint8 *buttons; /* Current button states */ + + struct joystick_hwdata *hwdata; /* Driver dependent information */ + + int ref_count; /* Reference count for multiple opens */ +}; + +/* Function to scan the system for joysticks. + * Joystick 0 should be the system default joystick. + * This function should return the number of available joysticks, or -1 + * on an unrecoverable fatal error. + */ +extern int SDL_SYS_JoystickInit(void); + +/* Function to get the device-dependent name of a joystick */ +extern const char *SDL_SYS_JoystickName(int index); + +/* Function to open a joystick for use. + The joystick to open is specified by the index field of the joystick. + This should fill the nbuttons and naxes fields of the joystick structure. + It returns 0, or -1 if there is an error. + */ +extern int SDL_SYS_JoystickOpen(SDL_Joystick * joystick); + +/* Function to update the state of a joystick - called as a device poll. + * This function shouldn't update the joystick structure directly, + * but instead should call SDL_PrivateJoystick*() to deliver events + * and update joystick device state. + */ +extern void SDL_SYS_JoystickUpdate(SDL_Joystick * joystick); + +/* Function to close a joystick after use */ +extern void SDL_SYS_JoystickClose(SDL_Joystick * joystick); + +/* Function to perform any system-specific joystick related cleanup */ +extern void SDL_SYS_JoystickQuit(void); + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/src/joystick/darwin/SDL_sysjoystick.c b/macosx/plugins/DFInput/SDL/src/joystick/darwin/SDL_sysjoystick.c new file mode 100644 index 00000000..824917f2 --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/joystick/darwin/SDL_sysjoystick.c @@ -0,0 +1,847 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ +#include "SDL_config.h" + +#ifdef SDL_JOYSTICK_IOKIT + +/* SDL joystick driver for Darwin / Mac OS X, based on the IOKit HID API */ +/* Written 2001 by Max Horn */ + +#include +#include +#include +#include +#include +#include +#include +#ifdef MACOS_10_0_4 +#include +#else +/* The header was moved here in Mac OS X 10.1 */ +#include +#endif +#include +#include +#include +#include /* for NewPtrClear, DisposePtr */ + +/* For force feedback testing. */ +#include +#include + +#include "SDL_joystick.h" +#include "../SDL_sysjoystick.h" +#include "../SDL_joystick_c.h" +#include "SDL_sysjoystick_c.h" + + +/* Linked list of all available devices */ +static recDevice *gpDeviceList = NULL; + + +static void +HIDReportErrorNum(char *strError, long numError) +{ + SDL_SetError(strError); +} + +static void HIDGetCollectionElements(CFMutableDictionaryRef deviceProperties, + recDevice * pDevice); + +/* returns current value for element, polling element + * will return 0 on error conditions which should be accounted for by application + */ + +static SInt32 +HIDGetElementValue(recDevice * pDevice, recElement * pElement) +{ + IOReturn result = kIOReturnSuccess; + IOHIDEventStruct hidEvent; + hidEvent.value = 0; + + if (NULL != pDevice && NULL != pElement && NULL != pDevice->interface) { + result = + (*(pDevice->interface))->getElementValue(pDevice->interface, + pElement->cookie, + &hidEvent); + if (kIOReturnSuccess == result) { + /* record min and max for auto calibration */ + if (hidEvent.value < pElement->minReport) + pElement->minReport = hidEvent.value; + if (hidEvent.value > pElement->maxReport) + pElement->maxReport = hidEvent.value; + } + } + + /* auto user scale */ + return hidEvent.value; +} + +static SInt32 +HIDScaledCalibratedValue(recDevice * pDevice, recElement * pElement, + long min, long max) +{ + float deviceScale = max - min; + float readScale = pElement->maxReport - pElement->minReport; + SInt32 value = HIDGetElementValue(pDevice, pElement); + if (readScale == 0) + return value; /* no scaling at all */ + else + return ((value - pElement->minReport) * deviceScale / readScale) + + min; +} + + +static void +HIDRemovalCallback(void *target, IOReturn result, void *refcon, void *sender) +{ + recDevice *device = (recDevice *) refcon; + device->removed = 1; + device->uncentered = 1; +} + + + +/* Create and open an interface to device, required prior to extracting values or building queues. + * Note: appliction now owns the device and must close and release it prior to exiting + */ + +static IOReturn +HIDCreateOpenDeviceInterface(io_object_t hidDevice, recDevice * pDevice) +{ + IOReturn result = kIOReturnSuccess; + HRESULT plugInResult = S_OK; + SInt32 score = 0; + IOCFPlugInInterface **ppPlugInInterface = NULL; + + if (NULL == pDevice->interface) { + result = + IOCreatePlugInInterfaceForService(hidDevice, + kIOHIDDeviceUserClientTypeID, + kIOCFPlugInInterfaceID, + &ppPlugInInterface, &score); + if (kIOReturnSuccess == result) { + /* Call a method of the intermediate plug-in to create the device interface */ + plugInResult = + (*ppPlugInInterface)->QueryInterface(ppPlugInInterface, + CFUUIDGetUUIDBytes + (kIOHIDDeviceInterfaceID), + (void *) + &(pDevice->interface)); + if (S_OK != plugInResult) + HIDReportErrorNum + ("CouldnÕt query HID class device interface from plugInInterface", + plugInResult); + (*ppPlugInInterface)->Release(ppPlugInInterface); + } else + HIDReportErrorNum + ("Failed to create **plugInInterface via IOCreatePlugInInterfaceForService.", + result); + } + if (NULL != pDevice->interface) { + result = (*(pDevice->interface))->open(pDevice->interface, 0); + if (kIOReturnSuccess != result) + HIDReportErrorNum + ("Failed to open pDevice->interface via open.", result); + else + (*(pDevice->interface))->setRemovalCallback(pDevice->interface, + HIDRemovalCallback, + pDevice, pDevice); + + } + return result; +} + +/* Closes and releases interface to device, should be done prior to exting application + * Note: will have no affect if device or interface do not exist + * application will "own" the device if interface is not closed + * (device may have to be plug and re-plugged in different location to get it working again without a restart) + */ + +static IOReturn +HIDCloseReleaseInterface(recDevice * pDevice) +{ + IOReturn result = kIOReturnSuccess; + + if ((NULL != pDevice) && (NULL != pDevice->interface)) { + /* close the interface */ + result = (*(pDevice->interface))->close(pDevice->interface); + if (kIOReturnNotOpen == result) { + /* do nothing as device was not opened, thus can't be closed */ + } else if (kIOReturnSuccess != result) + HIDReportErrorNum("Failed to close IOHIDDeviceInterface.", + result); + /* release the interface */ + result = (*(pDevice->interface))->Release(pDevice->interface); + if (kIOReturnSuccess != result) + HIDReportErrorNum("Failed to release IOHIDDeviceInterface.", + result); + pDevice->interface = NULL; + } + return result; +} + +/* extracts actual specific element information from each element CF dictionary entry */ + +static void +HIDGetElementInfo(CFTypeRef refElement, recElement * pElement) +{ + long number; + CFTypeRef refType; + + refType = CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementCookieKey)); + if (refType && CFNumberGetValue(refType, kCFNumberLongType, &number)) + pElement->cookie = (IOHIDElementCookie) number; + refType = CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementMinKey)); + if (refType && CFNumberGetValue(refType, kCFNumberLongType, &number)) + pElement->minReport = pElement->min = number; + pElement->maxReport = pElement->min; + refType = CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementMaxKey)); + if (refType && CFNumberGetValue(refType, kCFNumberLongType, &number)) + pElement->maxReport = pElement->max = number; +/* + TODO: maybe should handle the following stuff somehow? + + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMinKey)); + if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) + pElement->scaledMin = number; + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMaxKey)); + if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) + pElement->scaledMax = number; + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementSizeKey)); + if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) + pElement->size = number; + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsRelativeKey)); + if (refType) + pElement->relative = CFBooleanGetValue (refType); + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsWrappingKey)); + if (refType) + pElement->wrapping = CFBooleanGetValue (refType); + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsNonLinearKey)); + if (refType) + pElement->nonLinear = CFBooleanGetValue (refType); + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasPreferedStateKey)); + if (refType) + pElement->preferredState = CFBooleanGetValue (refType); + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasNullStateKey)); + if (refType) + pElement->nullState = CFBooleanGetValue (refType); +*/ +} + +/* examines CF dictionary vlaue in device element hierarchy to determine if it is element of interest or a collection of more elements + * if element of interest allocate storage, add to list and retrieve element specific info + * if collection then pass on to deconstruction collection into additional individual elements + */ + +static void +HIDAddElement(CFTypeRef refElement, recDevice * pDevice) +{ + recElement *element = NULL; + recElement **headElement = NULL; + long elementType, usagePage, usage; + CFTypeRef refElementType = + CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementTypeKey)); + CFTypeRef refUsagePage = + CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementUsagePageKey)); + CFTypeRef refUsage = + CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementUsageKey)); + + + if ((refElementType) + && + (CFNumberGetValue(refElementType, kCFNumberLongType, &elementType))) { + /* look at types of interest */ + if ((elementType == kIOHIDElementTypeInput_Misc) + || (elementType == kIOHIDElementTypeInput_Button) + || (elementType == kIOHIDElementTypeInput_Axis)) { + if (refUsagePage + && CFNumberGetValue(refUsagePage, kCFNumberLongType, + &usagePage) && refUsage + && CFNumberGetValue(refUsage, kCFNumberLongType, &usage)) { + switch (usagePage) { /* only interested in kHIDPage_GenericDesktop and kHIDPage_Button */ + case kHIDPage_GenericDesktop: + { + switch (usage) { /* look at usage to determine function */ + case kHIDUsage_GD_X: + case kHIDUsage_GD_Y: + case kHIDUsage_GD_Z: + case kHIDUsage_GD_Rx: + case kHIDUsage_GD_Ry: + case kHIDUsage_GD_Rz: + case kHIDUsage_GD_Slider: + case kHIDUsage_GD_Dial: + case kHIDUsage_GD_Wheel: + element = (recElement *) + NewPtrClear(sizeof(recElement)); + if (element) { + pDevice->axes++; + headElement = &(pDevice->firstAxis); + } + break; + case kHIDUsage_GD_Hatswitch: + element = (recElement *) + NewPtrClear(sizeof(recElement)); + if (element) { + pDevice->hats++; + headElement = &(pDevice->firstHat); + } + break; + } + } + break; + case kHIDPage_Button: + element = (recElement *) + NewPtrClear(sizeof(recElement)); + if (element) { + pDevice->buttons++; + headElement = &(pDevice->firstButton); + } + break; + default: + break; + } + } + } else if (kIOHIDElementTypeCollection == elementType) + HIDGetCollectionElements((CFMutableDictionaryRef) refElement, + pDevice); + } + + if (element && headElement) { /* add to list */ + recElement *elementPrevious = NULL; + recElement *elementCurrent = *headElement; + while (elementCurrent && usage >= elementCurrent->usage) { + elementPrevious = elementCurrent; + elementCurrent = elementCurrent->pNext; + } + if (elementPrevious) { + elementPrevious->pNext = element; + } else { + *headElement = element; + } + element->usagePage = usagePage; + element->usage = usage; + element->pNext = elementCurrent; + HIDGetElementInfo(refElement, element); + pDevice->elements++; + } +} + +/* collects information from each array member in device element list (each array memeber = element) */ + +static void +HIDGetElementsCFArrayHandler(const void *value, void *parameter) +{ + if (CFGetTypeID(value) == CFDictionaryGetTypeID()) + HIDAddElement((CFTypeRef) value, (recDevice *) parameter); +} + +/* handles retrieval of element information from arrays of elements in device IO registry information */ + +static void +HIDGetElements(CFTypeRef refElementCurrent, recDevice * pDevice) +{ + CFTypeID type = CFGetTypeID(refElementCurrent); + if (type == CFArrayGetTypeID()) { /* if element is an array */ + CFRange range = { 0, CFArrayGetCount(refElementCurrent) }; + /* CountElementsCFArrayHandler called for each array member */ + CFArrayApplyFunction(refElementCurrent, range, + HIDGetElementsCFArrayHandler, pDevice); + } +} + +/* handles extracting element information from element collection CF types + * used from top level element decoding and hierarchy deconstruction to flatten device element list + */ + +static void +HIDGetCollectionElements(CFMutableDictionaryRef deviceProperties, + recDevice * pDevice) +{ + CFTypeRef refElementTop = + CFDictionaryGetValue(deviceProperties, CFSTR(kIOHIDElementKey)); + if (refElementTop) + HIDGetElements(refElementTop, pDevice); +} + +/* use top level element usage page and usage to discern device usage page and usage setting appropriate vlaues in device record */ + +static void +HIDTopLevelElementHandler(const void *value, void *parameter) +{ + CFTypeRef refCF = 0; + if (CFGetTypeID(value) != CFDictionaryGetTypeID()) + return; + refCF = CFDictionaryGetValue(value, CFSTR(kIOHIDElementUsagePageKey)); + if (!CFNumberGetValue + (refCF, kCFNumberLongType, &((recDevice *) parameter)->usagePage)) + SDL_SetError("CFNumberGetValue error retrieving pDevice->usagePage."); + refCF = CFDictionaryGetValue(value, CFSTR(kIOHIDElementUsageKey)); + if (!CFNumberGetValue + (refCF, kCFNumberLongType, &((recDevice *) parameter)->usage)) + SDL_SetError("CFNumberGetValue error retrieving pDevice->usage."); +} + +/* extracts device info from CF dictionary records in IO registry */ + +static void +HIDGetDeviceInfo(io_object_t hidDevice, CFMutableDictionaryRef hidProperties, + recDevice * pDevice) +{ + CFMutableDictionaryRef usbProperties = 0; + io_registry_entry_t parent1, parent2; + + /* Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also + * get dictionary for usb properties: step up two levels and get CF dictionary for USB properties + */ + if ((KERN_SUCCESS == + IORegistryEntryGetParentEntry(hidDevice, kIOServicePlane, &parent1)) + && (KERN_SUCCESS == + IORegistryEntryGetParentEntry(parent1, kIOServicePlane, &parent2)) + && (KERN_SUCCESS == + IORegistryEntryCreateCFProperties(parent2, &usbProperties, + kCFAllocatorDefault, + kNilOptions))) { + if (usbProperties) { + CFTypeRef refCF = 0; + /* get device info + * try hid dictionary first, if fail then go to usb dictionary + */ + + + /* get product name */ + refCF = + CFDictionaryGetValue(hidProperties, CFSTR(kIOHIDProductKey)); + if (!refCF) + refCF = + CFDictionaryGetValue(usbProperties, + CFSTR("USB Product Name")); + if (refCF) { + if (!CFStringGetCString + (refCF, pDevice->product, 256, + CFStringGetSystemEncoding())) + SDL_SetError + ("CFStringGetCString error retrieving pDevice->product."); + } + + /* get usage page and usage */ + refCF = + CFDictionaryGetValue(hidProperties, + CFSTR(kIOHIDPrimaryUsagePageKey)); + if (refCF) { + if (!CFNumberGetValue + (refCF, kCFNumberLongType, &pDevice->usagePage)) + SDL_SetError + ("CFNumberGetValue error retrieving pDevice->usagePage."); + refCF = + CFDictionaryGetValue(hidProperties, + CFSTR(kIOHIDPrimaryUsageKey)); + if (refCF) + if (!CFNumberGetValue + (refCF, kCFNumberLongType, &pDevice->usage)) + SDL_SetError + ("CFNumberGetValue error retrieving pDevice->usage."); + } + + if (NULL == refCF) { /* get top level element HID usage page or usage */ + /* use top level element instead */ + CFTypeRef refCFTopElement = 0; + refCFTopElement = + CFDictionaryGetValue(hidProperties, + CFSTR(kIOHIDElementKey)); + { + /* refCFTopElement points to an array of element dictionaries */ + CFRange range = { 0, CFArrayGetCount(refCFTopElement) }; + CFArrayApplyFunction(refCFTopElement, range, + HIDTopLevelElementHandler, pDevice); + } + } + + CFRelease(usbProperties); + } else + SDL_SetError + ("IORegistryEntryCreateCFProperties failed to create usbProperties."); + + if (kIOReturnSuccess != IOObjectRelease(parent2)) + SDL_SetError("IOObjectRelease error with parent2."); + if (kIOReturnSuccess != IOObjectRelease(parent1)) + SDL_SetError("IOObjectRelease error with parent1."); + } +} + + +static recDevice * +HIDBuildDevice(io_object_t hidDevice) +{ + recDevice *pDevice = (recDevice *) NewPtrClear(sizeof(recDevice)); + if (pDevice) { + /* get dictionary for HID properties */ + CFMutableDictionaryRef hidProperties = 0; + kern_return_t result = + IORegistryEntryCreateCFProperties(hidDevice, &hidProperties, + kCFAllocatorDefault, + kNilOptions); + if ((result == KERN_SUCCESS) && hidProperties) { + /* create device interface */ + result = HIDCreateOpenDeviceInterface(hidDevice, pDevice); + if (kIOReturnSuccess == result) { + HIDGetDeviceInfo(hidDevice, hidProperties, pDevice); /* hidDevice used to find parents in registry tree */ + HIDGetCollectionElements(hidProperties, pDevice); + } else { + DisposePtr((Ptr) pDevice); + pDevice = NULL; + } + CFRelease(hidProperties); + } else { + DisposePtr((Ptr) pDevice); + pDevice = NULL; + } + } + return pDevice; +} + +/* disposes of the element list associated with a device and the memory associated with the list + */ + +static void +HIDDisposeElementList(recElement ** elementList) +{ + recElement *pElement = *elementList; + while (pElement) { + recElement *pElementNext = pElement->pNext; + DisposePtr((Ptr) pElement); + pElement = pElementNext; + } + *elementList = NULL; +} + +/* disposes of a single device, closing and releaseing interface, freeing memory fro device and elements, setting device pointer to NULL + * all your device no longer belong to us... (i.e., you do not 'own' the device anymore) + */ + +static recDevice * +HIDDisposeDevice(recDevice ** ppDevice) +{ + kern_return_t result = KERN_SUCCESS; + recDevice *pDeviceNext = NULL; + if (*ppDevice) { + /* save next device prior to disposing of this device */ + pDeviceNext = (*ppDevice)->pNext; + + /* free posible io_service_t */ + if ((*ppDevice)->ffservice) { + IOObjectRelease((*ppDevice)->ffservice); + (*ppDevice)->ffservice = 0; + } + + /* free element lists */ + HIDDisposeElementList(&(*ppDevice)->firstAxis); + HIDDisposeElementList(&(*ppDevice)->firstButton); + HIDDisposeElementList(&(*ppDevice)->firstHat); + + result = HIDCloseReleaseInterface(*ppDevice); /* function sanity checks interface value (now application does not own device) */ + if (kIOReturnSuccess != result) + HIDReportErrorNum + ("HIDCloseReleaseInterface failed when trying to dipose device.", + result); + DisposePtr((Ptr) * ppDevice); + *ppDevice = NULL; + } + return pDeviceNext; +} + + +/* Function to scan the system for joysticks. + * Joystick 0 should be the system default joystick. + * This function should return the number of available joysticks, or -1 + * on an unrecoverable fatal error. + */ +int +SDL_SYS_JoystickInit(void) +{ + IOReturn result = kIOReturnSuccess; + mach_port_t masterPort = 0; + io_iterator_t hidObjectIterator = 0; + CFMutableDictionaryRef hidMatchDictionary = NULL; + recDevice *device, *lastDevice; + io_object_t ioHIDDeviceObject = 0; + + SDL_numjoysticks = 0; + + if (gpDeviceList) { + SDL_SetError("Joystick: Device list already inited."); + return -1; + } + + result = IOMasterPort(bootstrap_port, &masterPort); + if (kIOReturnSuccess != result) { + SDL_SetError("Joystick: IOMasterPort error with bootstrap_port."); + return -1; + } + + /* Set up a matching dictionary to search I/O Registry by class name for all HID class devices. */ + hidMatchDictionary = IOServiceMatching(kIOHIDDeviceKey); + if (hidMatchDictionary) { + /* Add key for device type (joystick, in this case) to refine the matching dictionary. */ + + /* NOTE: we now perform this filtering later + UInt32 usagePage = kHIDPage_GenericDesktop; + UInt32 usage = kHIDUsage_GD_Joystick; + CFNumberRef refUsage = NULL, refUsagePage = NULL; + + refUsage = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &usage); + CFDictionarySetValue (hidMatchDictionary, CFSTR (kIOHIDPrimaryUsageKey), refUsage); + refUsagePage = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &usagePage); + CFDictionarySetValue (hidMatchDictionary, CFSTR (kIOHIDPrimaryUsagePageKey), refUsagePage); + */ + } else { + SDL_SetError + ("Joystick: Failed to get HID CFMutableDictionaryRef via IOServiceMatching."); + return -1; + } + + /*/ Now search I/O Registry for matching devices. */ + result = + IOServiceGetMatchingServices(masterPort, hidMatchDictionary, + &hidObjectIterator); + /* Check for errors */ + if (kIOReturnSuccess != result) { + SDL_SetError("Joystick: Couldn't create a HID object iterator."); + return -1; + } + if (!hidObjectIterator) { /* there are no joysticks */ + gpDeviceList = NULL; + SDL_numjoysticks = 0; + return 0; + } + /* IOServiceGetMatchingServices consumes a reference to the dictionary, so we don't need to release the dictionary ref. */ + + /* build flat linked list of devices from device iterator */ + + gpDeviceList = lastDevice = NULL; + + while ((ioHIDDeviceObject = IOIteratorNext(hidObjectIterator))) { + /* build a device record */ + device = HIDBuildDevice(ioHIDDeviceObject); + if (!device) + continue; + + /* Filter device list to non-keyboard/mouse stuff */ + if ((device->usagePage != kHIDPage_GenericDesktop) || + ((device->usage != kHIDUsage_GD_Joystick && + device->usage != kHIDUsage_GD_GamePad && + device->usage != kHIDUsage_GD_MultiAxisController))) { + + /* release memory for the device */ + HIDDisposeDevice(&device); + DisposePtr((Ptr) device); + continue; + } + + /* We have to do some storage of the io_service_t for + * SDL_HapticOpenFromJoystick */ + if (FFIsForceFeedback(ioHIDDeviceObject) == FF_OK) { + device->ffservice = ioHIDDeviceObject; + } else { + device->ffservice = 0; + } + + /* Add device to the end of the list */ + if (lastDevice) + lastDevice->pNext = device; + else + gpDeviceList = device; + lastDevice = device; + } + result = IOObjectRelease(hidObjectIterator); /* release the iterator */ + + /* Count the total number of devices we found */ + device = gpDeviceList; + while (device) { + SDL_numjoysticks++; + device = device->pNext; + } + + return SDL_numjoysticks; +} + +/* Function to get the device-dependent name of a joystick */ +const char * +SDL_SYS_JoystickName(int index) +{ + recDevice *device = gpDeviceList; + + for (; index > 0; index--) + device = device->pNext; + + return device->product; +} + +/* Function to open a joystick for use. + * The joystick to open is specified by the index field of the joystick. + * This should fill the nbuttons and naxes fields of the joystick structure. + * It returns 0, or -1 if there is an error. + */ +int +SDL_SYS_JoystickOpen(SDL_Joystick * joystick) +{ + recDevice *device = gpDeviceList; + int index; + + for (index = joystick->index; index > 0; index--) + device = device->pNext; + + joystick->hwdata = device; + joystick->name = device->product; + + joystick->naxes = device->axes; + joystick->nhats = device->hats; + joystick->nballs = 0; + joystick->nbuttons = device->buttons; + + return 0; +} + +/* Function to update the state of a joystick - called as a device poll. + * This function shouldn't update the joystick structure directly, + * but instead should call SDL_PrivateJoystick*() to deliver events + * and update joystick device state. + */ +void +SDL_SYS_JoystickUpdate(SDL_Joystick * joystick) +{ + recDevice *device = joystick->hwdata; + recElement *element; + SInt32 value, range; + int i; + + if (device->removed) { /* device was unplugged; ignore it. */ + if (device->uncentered) { + device->uncentered = 0; + + /* Tell the app that everything is centered/unpressed... */ + for (i = 0; i < device->axes; i++) + SDL_PrivateJoystickAxis(joystick, i, 0); + + for (i = 0; i < device->buttons; i++) + SDL_PrivateJoystickButton(joystick, i, 0); + + for (i = 0; i < device->hats; i++) + SDL_PrivateJoystickHat(joystick, i, SDL_HAT_CENTERED); + } + + return; + } + + element = device->firstAxis; + i = 0; + while (element) { + value = HIDScaledCalibratedValue(device, element, -32768, 32767); + if (value != joystick->axes[i]) + SDL_PrivateJoystickAxis(joystick, i, value); + element = element->pNext; + ++i; + } + + element = device->firstButton; + i = 0; + while (element) { + value = HIDGetElementValue(device, element); + if (value > 1) /* handle pressure-sensitive buttons */ + value = 1; + if (value != joystick->buttons[i]) + SDL_PrivateJoystickButton(joystick, i, value); + element = element->pNext; + ++i; + } + + element = device->firstHat; + i = 0; + while (element) { + Uint8 pos = 0; + + range = (element->max - element->min + 1); + value = HIDGetElementValue(device, element) - element->min; + if (range == 4) /* 4 position hatswitch - scale up value */ + value *= 2; + else if (range != 8) /* Neither a 4 nor 8 positions - fall back to default position (centered) */ + value = -1; + switch (value) { + case 0: + pos = SDL_HAT_UP; + break; + case 1: + pos = SDL_HAT_RIGHTUP; + break; + case 2: + pos = SDL_HAT_RIGHT; + break; + case 3: + pos = SDL_HAT_RIGHTDOWN; + break; + case 4: + pos = SDL_HAT_DOWN; + break; + case 5: + pos = SDL_HAT_LEFTDOWN; + break; + case 6: + pos = SDL_HAT_LEFT; + break; + case 7: + pos = SDL_HAT_LEFTUP; + break; + default: + /* Every other value is mapped to center. We do that because some + * joysticks use 8 and some 15 for this value, and apparently + * there are even more variants out there - so we try to be generous. + */ + pos = SDL_HAT_CENTERED; + break; + } + if (pos != joystick->hats[i]) + SDL_PrivateJoystickHat(joystick, i, pos); + element = element->pNext; + ++i; + } + + return; +} + +/* Function to close a joystick after use */ +void +SDL_SYS_JoystickClose(SDL_Joystick * joystick) +{ + /* Should we do anything here? */ + return; +} + +/* Function to perform any system-specific joystick related cleanup */ +void +SDL_SYS_JoystickQuit(void) +{ + while (NULL != gpDeviceList) + gpDeviceList = HIDDisposeDevice(&gpDeviceList); +} + +#endif /* SDL_JOYSTICK_IOKIT */ +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/macosx/plugins/DFInput/SDL/src/joystick/darwin/SDL_sysjoystick_c.h b/macosx/plugins/DFInput/SDL/src/joystick/darwin/SDL_sysjoystick_c.h new file mode 100644 index 00000000..d413f336 --- /dev/null +++ b/macosx/plugins/DFInput/SDL/src/joystick/darwin/SDL_sysjoystick_c.h @@ -0,0 +1,88 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2010 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 +*/ +#include "SDL_config.h" + +#ifndef SDL_JOYSTICK_IOKIT_H + + +#if MAC_OS_X_VERSION_MIN_REQUIRED == 1030 +#include "10.3.9-FIX/IOHIDLib.h" +#else +#include +#endif +#include + + +struct recElement +{ + IOHIDElementCookie cookie; /* unique value which identifies element, will NOT change */ + long usagePage, usage; /* HID usage */ + long min; /* reported min value possible */ + long max; /* reported max value possible */ +#if 0 + /* TODO: maybe should handle the following stuff somehow? */ + + long scaledMin; /* reported scaled min value possible */ + long scaledMax; /* reported scaled max value possible */ + long size; /* size in bits of data return from element */ + Boolean relative; /* are reports relative to last report (deltas) */ + Boolean wrapping; /* does element wrap around (one value higher than max is min) */ + Boolean nonLinear; /* are the values reported non-linear relative to element movement */ + Boolean preferredState; /* does element have a preferred state (such as a button) */ + Boolean nullState; /* does element have null state */ +#endif /* 0 */ + + /* runtime variables used for auto-calibration */ + long minReport; /* min returned value */ + long maxReport; /* max returned value */ + + struct recElement *pNext; /* next element in list */ +}; +typedef struct recElement recElement; + +struct joystick_hwdata +{ + io_service_t ffservice; /* Interface for force feedback, 0 = no ff */ + IOHIDDeviceInterface **interface; /* interface to device, NULL = no interface */ + + char product[256]; /* name of product */ + long usage; /* usage page from IOUSBHID Parser.h which defines general usage */ + long usagePage; /* usage within above page from IOUSBHID Parser.h which defines specific usage */ + + long axes; /* number of axis (calculated, not reported by device) */ + long buttons; /* number of buttons (calculated, not reported by device) */ + long hats; /* number of hat switches (calculated, not reported by device) */ + long elements; /* number of total elements (shouldbe total of above) (calculated, not reported by device) */ + + recElement *firstAxis; + recElement *firstButton; + recElement *firstHat; + + int removed; + int uncentered; + + struct joystick_hwdata *pNext; /* next device */ +}; +typedef struct joystick_hwdata recDevice; + + +#endif /* SDL_JOYSTICK_IOKIT_H */ diff --git a/macosx/plugins/DFInput/macsrc/ControllerList.h b/macosx/plugins/DFInput/macsrc/ControllerList.h new file mode 100644 index 00000000..176d403b --- /dev/null +++ b/macosx/plugins/DFInput/macsrc/ControllerList.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#define ControllerList NetPcsxHIDInputPluginControllerList + +#import +#import +#include "cfg.h" + +@class KeyConfig; + +@interface ControllerList : NSObject { +} + +- (id)initWithConfig; + ++ (void)setCurrentController:(int)which; ++ (int)currentController; ++ (int)getButtonOfRow:(int)row; +- (int)numberOfRowsInTableView:(NSTableView *)aTableView; +- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex; +- (void)deleteRow:(int)which; + +@end diff --git a/macosx/plugins/DFInput/macsrc/ControllerList.m b/macosx/plugins/DFInput/macsrc/ControllerList.m new file mode 100644 index 00000000..5d67370a --- /dev/null +++ b/macosx/plugins/DFInput/macsrc/ControllerList.m @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import "ControllerList.h" +#include "pad.h" +#include "cfg.h" + +static int currentController; + +@implementation ControllerList + +- (id)initWithConfig +{ + if (!(self = [super init])) return nil; + return self; +} + +- (void)dealloc +{ + [super dealloc]; +} + +/* sets current controller data returned by data source */ ++ (void)setCurrentController:(int)which +{ + currentController = which; +} + ++ (int)currentController +{ + return currentController; +} + +/* NSDataSource */ +- (int)numberOfRowsInTableView:(NSTableView *)aTableView +{ + return DKEY_TOTAL + (g.cfg.PadDef[currentController].Type == PSE_PAD_TYPE_ANALOGPAD ? 8 : -2); +} + +static const NSString *LabelText[DKEY_TOTAL + 8] = { + @"D-Pad Up", + @"D-Pad Down", + @"D-Pad Left", + @"D-Pad Right", + @"Cross", + @"Circle", + @"Square", + @"Triangle", + @"L1", + @"R1", + @"L2", + @"R2", + @"Select", + @"Start", + @"L3", + @"R3", + @"L-Stick Right", + @"L-Stick Left", + @"L-Stick Down", + @"L-Stick Up", + @"R-Stick Right", + @"R-Stick Left", + @"R-Stick Down", + @"R-Stick Up" +}; + +static const int DPad[DKEY_TOTAL] = { + DKEY_UP, + DKEY_DOWN, + DKEY_LEFT, + DKEY_RIGHT, + DKEY_CROSS, + DKEY_CIRCLE, + DKEY_SQUARE, + DKEY_TRIANGLE, + DKEY_L1, + DKEY_R1, + DKEY_L2, + DKEY_R2, + DKEY_SELECT, + DKEY_START, + DKEY_L3, + DKEY_R3 +}; + ++ (int)getButtonOfRow:(int)row +{ + return DPad[row]; +} + +- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + char buf[256]; + + if ([((NSString *)[aTableColumn identifier]) isEqualToString:@"key"]) + return LabelText[rowIndex]; + else { + // actual keys + if (rowIndex < DKEY_TOTAL) { + GetKeyDescription(buf, currentController, DPad[rowIndex]); + } else { + rowIndex -= DKEY_TOTAL; + GetAnalogDescription(buf, currentController, rowIndex / 4, rowIndex % 4); + } + + return [NSString stringWithUTF8String:buf]; + } +} + +- (void)deleteRow:(int)which +{ + if (which < DKEY_TOTAL) { + g.cfg.PadDef[currentController].KeyDef[DPad[which]].Key = 0; + g.cfg.PadDef[currentController].KeyDef[DPad[which]].JoyEvType = NONE; + g.cfg.PadDef[currentController].KeyDef[DPad[which]].J.d = 0; + } else { + which -= DKEY_TOTAL; + g.cfg.PadDef[currentController].AnalogDef[which / 4][which % 4].Key = 0; + g.cfg.PadDef[currentController].AnalogDef[which / 4][which % 4].JoyEvType = NONE; + g.cfg.PadDef[currentController].AnalogDef[which / 4][which % 4].J.d = 0; + } +} + +@end diff --git a/macosx/plugins/DFInput/macsrc/MappingCell.h b/macosx/plugins/DFInput/macsrc/MappingCell.h new file mode 100644 index 00000000..f803696a --- /dev/null +++ b/macosx/plugins/DFInput/macsrc/MappingCell.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#define MappingCell NetPcsxHIDInputPluginMappingCell + +#import + +@interface MappingCell : NSTextFieldCell { +} + +@end diff --git a/macosx/plugins/DFInput/macsrc/MappingCell.m b/macosx/plugins/DFInput/macsrc/MappingCell.m new file mode 100644 index 00000000..0fb43bd1 --- /dev/null +++ b/macosx/plugins/DFInput/macsrc/MappingCell.m @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import "MappingCell.h" +#import "ControllerList.h" +#import "cfg.h" + +@implementation MappingCell + +- (id)initTextCell:(NSString *)aString { + self = [super initTextCell:aString]; + [self setEditable:NO]; + return self; +} + +- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(int)selStart length:(int)selLength +{ + [super selectWithFrame:aRect inView:controlView editor:textObj delegate:anObject start:selStart length:selLength]; + + int whichPad = [ControllerList currentController]; + NSTableView *tableView = (NSTableView *)[self controlView]; + int i, changed = 0, row; + NSEvent *endEvent; + NSPoint where = {0.0, 0.0}; + + /* start a modal session */ + NSModalSession session = [NSApp beginModalSessionForWindow:[tableView window]]; + [NSApp runModalSession:session]; + + /* delay for a little while to allow user to release the button pressed to activate the element */ + [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.15]]; + + InitAxisPos(whichPad); + + /* wait for 10 seconds for user to press a key */ + for (i = 0; i < 10; i++) { + [NSApp runModalSession:session]; + row = [tableView selectedRow]; + if (row < DKEY_TOTAL) { + changed = ReadDKeyEvent(whichPad, [ControllerList getButtonOfRow:row]); + } else { + row -= DKEY_TOTAL; + changed = ReadAnalogEvent(whichPad, row / 4, row % 4); + } + + if (changed) break; + } + + [NSApp endModalSession:session]; + + /* move selection to the next list element */ + [self endEditing:textObj]; + if (changed == 1) { + int nextRow = [tableView selectedRow] + 1; + if (nextRow >= [tableView numberOfRows]) { + [tableView deselectAll:self]; + return; + } + [tableView selectRow:nextRow byExtendingSelection:NO]; + + /* discard any events we have received while waiting for the button press */ + endEvent = [NSEvent otherEventWithType:NSApplicationDefined location:where + modifierFlags:0 timestamp:(NSTimeInterval)0 + windowNumber:0 context:[NSGraphicsContext currentContext] subtype:0 data1:0 data2:0]; + [NSApp postEvent:endEvent atStart:NO]; + [NSApp discardEventsMatchingMask:NSAnyEventMask beforeEvent:endEvent]; + } + [[tableView window] makeFirstResponder:tableView]; +} + +@end diff --git a/macosx/plugins/DFInput/macsrc/PadController.h b/macosx/plugins/DFInput/macsrc/PadController.h new file mode 100644 index 00000000..26a5a152 --- /dev/null +++ b/macosx/plugins/DFInput/macsrc/PadController.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#define PadController NetPcsxHIDInputPluginPadController + +#import +#import "PadView.h" + +@class PadView; + +@interface PadController : NSWindowController +{ + IBOutlet PadView *controllerView; + IBOutlet id controllerView1; + IBOutlet id controllerView2; +} + +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; +@end diff --git a/macosx/plugins/DFInput/macsrc/PadController.m b/macosx/plugins/DFInput/macsrc/PadController.m new file mode 100644 index 00000000..06bce2eb --- /dev/null +++ b/macosx/plugins/DFInput/macsrc/PadController.m @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import +#import "PadController.h" +#include "pad.h" + +static NSWindow *padWindow; +static PadController *padController; + +#define APP_ID @"net.pcsx.DFInputPlugin" + +void DoAbout() { + // Get parent application instance + NSApplication *app = [NSApplication sharedApplication]; + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (path) { + credits = [[[NSAttributedString alloc] initWithPath: path + documentAttributes:NULL] autorelease]; + } else { + credits = [[[NSAttributedString alloc] initWithString:@""] autorelease]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + [app orderFrontStandardAboutPanelWithOptions:[NSDictionary dictionaryWithObjectsAndKeys: + [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", + icon, @"ApplicationIcon", + [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", + [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], @"Version", + [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], @"Copyright", + credits, @"Credits", nil]]; +} + +long DoConfiguration() { + SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_NOPARACHUTE); + LoadPADConfig(); + + if (padWindow == nil) { + if (padController == nil) { + padController = [[PadController alloc] initWithWindowNibName:@"NetPcsxHIDInputPluginMain"]; + } + padWindow = [padController window]; + } + + [padWindow center]; + [padWindow makeKeyAndOrderFront:nil]; + + return 0; +} + +@implementation PadController + +- (IBAction)cancel:(id)sender +{ + SDL_Quit(); + [self close]; +} + +- (IBAction)ok:(id)sender +{ + SavePADConfig(); + SDL_Quit(); + [self close]; +} + +- (void)awakeFromNib +{ + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(windowWillClose:) + name:NSWindowWillCloseNotification object:[self window]]; + + [controllerView1 addSubview: controllerView]; + [controllerView setController:0]; +} + +- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem +{ + PadView *newView = nil; + if ([[tabViewItem identifier] isEqualToString:@"pad1"]) + newView = controllerView1; + else if ([[tabViewItem identifier] isEqualToString:@"pad2"]) + newView = controllerView2; + + if (nil != newView) { + [controllerView removeFromSuperviewWithoutNeedingDisplay]; + [newView addSubview: controllerView]; + [controllerView setFrame:[newView frame]]; + [controllerView setController:[newView isEqual:controllerView1] ? 0 : 1]; + } +} + +- (void)windowBecameKey:(NSNotification *)notification +{ + if ([[controllerView1 subviews] count] > 0) + [controllerView setController:0]; + else if ([[controllerView2 subviews] count] > 0) + [controllerView setController:1]; + + [[NSNotificationCenter defaultCenter] removeObserver:self + name:NSWindowDidBecomeKeyNotification object:[self window]]; +} + +- (void)windowWillClose:(NSNotification *)aNotification +{ + if ([aNotification object] == [self window]) { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(windowBecameKey:) + name:NSWindowDidBecomeKeyNotification object:[self window]]; + } +} + +@end \ No newline at end of file diff --git a/macosx/plugins/DFInput/macsrc/PadView.h b/macosx/plugins/DFInput/macsrc/PadView.h new file mode 100644 index 00000000..f99686c9 --- /dev/null +++ b/macosx/plugins/DFInput/macsrc/PadView.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#define PadView NetPcsxHIDInputPluginPadView + +#import +#import "ControllerList.h" + +@class ControllerList; + +@interface PadView : NSView +{ + IBOutlet NSTableView *tableView; + IBOutlet NSPopUpButton *typeMenu; + IBOutlet NSPopUpButton *deviceMenu; + + ControllerList *controller; +} +- (IBAction)setType:(id)sender; +- (IBAction)setDevice:(id)sender; + +- (void)setController:(int)which; + +@end diff --git a/macosx/plugins/DFInput/macsrc/PadView.m b/macosx/plugins/DFInput/macsrc/PadView.m new file mode 100644 index 00000000..b0ed273b --- /dev/null +++ b/macosx/plugins/DFInput/macsrc/PadView.m @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: HIDInput by Gil Pedersen. + * Copyright (c) 2004, Gil Pedersen. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import "PadView.h" +#include "pad.h" + +@implementation PadView + +- (id)initWithFrame:(NSRect)frameRect +{ + if ((self = [super initWithFrame:frameRect]) != nil) { + controller = [[ControllerList alloc] initWithConfig]; + [self setController:0]; + } + return self; +} + +- (void)dealloc +{ + [controller release]; + [super dealloc]; +} + +- (void)drawRect:(NSRect)rect +{ +} + +- (IBAction)setType:(id)sender +{ + g.cfg.PadDef[[ControllerList currentController]].Type = + ([sender indexOfSelectedItem] > 0 ? PSE_PAD_TYPE_ANALOGPAD : PSE_PAD_TYPE_STANDARD); + + [tableView reloadData]; +} + +- (IBAction)setDevice:(id)sender +{ + g.cfg.PadDef[[ControllerList currentController]].DevNum = (int)[sender indexOfSelectedItem] - 1; +} + +- (void)setController:(int)which +{ + int i; + + [ControllerList setCurrentController:which]; + [tableView setDataSource:controller]; + + [deviceMenu removeAllItems]; + [deviceMenu addItemWithTitle:@"(Keyboard only)"]; + + for (i = 0; i < SDL_NumJoysticks(); i++) { + [deviceMenu addItemWithTitle:[NSString stringWithUTF8String:SDL_JoystickName(i)]]; + } + + if (g.cfg.PadDef[which].DevNum >= SDL_NumJoysticks()) { + g.cfg.PadDef[which].DevNum = -1; + } + + [deviceMenu selectItemAtIndex:g.cfg.PadDef[which].DevNum + 1]; + [typeMenu selectItemAtIndex:(g.cfg.PadDef[which].Type == PSE_PAD_TYPE_ANALOGPAD ? 1 : 0)]; + + [tableView reloadData]; +} + + +- (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor +{ + return false; +} + +/* handles key events on the pad list */ +- (void)keyDown:(NSEvent *)theEvent +{ + int key = [theEvent keyCode]; + + if ([[theEvent window] firstResponder] == tableView) { + if (key == 51 || key == 117) { + // delete keys - remove the mappings for the selected item + [controller deleteRow:[tableView selectedRow]]; + [tableView reloadData]; + return; + } else if (key == 36) { + // return key - configure the selected item + [tableView editColumn:[tableView columnWithIdentifier:@"button"] row:[tableView selectedRow] withEvent:nil select:YES]; + return; + } + } + + [super keyDown:theEvent]; +} + +@end diff --git a/macosx/plugins/DFInput/macsrc/cfg.c b/macosx/plugins/DFInput/macsrc/cfg.c new file mode 100644 index 00000000..9465426c --- /dev/null +++ b/macosx/plugins/DFInput/macsrc/cfg.c @@ -0,0 +1,748 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "pad.h" + +GLOBALDATA g; + +long DoConfiguration(); +void DoAbout(); + +static void SetDefaultConfig() { + memset(&g.cfg, 0, sizeof(g.cfg)); + + g.cfg.Threaded = 1; + + g.cfg.PadDef[0].DevNum = 0; + g.cfg.PadDef[1].DevNum = 1; + + g.cfg.PadDef[0].Type = PSE_PAD_TYPE_STANDARD; + g.cfg.PadDef[1].Type = PSE_PAD_TYPE_STANDARD; + + // Pad1 keyboard + g.cfg.PadDef[0].KeyDef[DKEY_SELECT].Key = 9; + g.cfg.PadDef[0].KeyDef[DKEY_START].Key = 10; + g.cfg.PadDef[0].KeyDef[DKEY_UP].Key = 127; + g.cfg.PadDef[0].KeyDef[DKEY_RIGHT].Key = 125; + g.cfg.PadDef[0].KeyDef[DKEY_DOWN].Key = 126; + g.cfg.PadDef[0].KeyDef[DKEY_LEFT].Key = 124; + g.cfg.PadDef[0].KeyDef[DKEY_L2].Key = 16; + g.cfg.PadDef[0].KeyDef[DKEY_R2].Key = 18; + g.cfg.PadDef[0].KeyDef[DKEY_L1].Key = 14; + g.cfg.PadDef[0].KeyDef[DKEY_R1].Key = 15; + g.cfg.PadDef[0].KeyDef[DKEY_TRIANGLE].Key = 3; + g.cfg.PadDef[0].KeyDef[DKEY_CIRCLE].Key = 8; + g.cfg.PadDef[0].KeyDef[DKEY_CROSS].Key = 7; + g.cfg.PadDef[0].KeyDef[DKEY_SQUARE].Key = 2; + + // Pad1 joystick + g.cfg.PadDef[0].KeyDef[DKEY_SELECT].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_SELECT].J.Button = 8; + g.cfg.PadDef[0].KeyDef[DKEY_START].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_START].J.Button = 9; + g.cfg.PadDef[0].KeyDef[DKEY_UP].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_UP].J.Axis = -2; + g.cfg.PadDef[0].KeyDef[DKEY_RIGHT].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_RIGHT].J.Axis = 1; + g.cfg.PadDef[0].KeyDef[DKEY_DOWN].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_DOWN].J.Axis = 2; + g.cfg.PadDef[0].KeyDef[DKEY_LEFT].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_LEFT].J.Axis = -1; + g.cfg.PadDef[0].KeyDef[DKEY_L2].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_L2].J.Button = 4; + g.cfg.PadDef[0].KeyDef[DKEY_L1].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_L1].J.Button = 6; + g.cfg.PadDef[0].KeyDef[DKEY_R2].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_R2].J.Button = 5; + g.cfg.PadDef[0].KeyDef[DKEY_R1].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_R1].J.Button = 7; + g.cfg.PadDef[0].KeyDef[DKEY_TRIANGLE].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_TRIANGLE].J.Button = 0; + g.cfg.PadDef[0].KeyDef[DKEY_CIRCLE].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_CIRCLE].J.Button = 1; + g.cfg.PadDef[0].KeyDef[DKEY_CROSS].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_CROSS].J.Button = 2; + g.cfg.PadDef[0].KeyDef[DKEY_SQUARE].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_SQUARE].J.Button = 3; + + // Pad2 joystick + g.cfg.PadDef[1].KeyDef[DKEY_SELECT].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_SELECT].J.Button = 8; + g.cfg.PadDef[1].KeyDef[DKEY_START].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_START].J.Button = 9; + g.cfg.PadDef[1].KeyDef[DKEY_UP].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_UP].J.Axis = -2; + g.cfg.PadDef[1].KeyDef[DKEY_RIGHT].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_RIGHT].J.Axis = 1; + g.cfg.PadDef[1].KeyDef[DKEY_DOWN].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_DOWN].J.Axis = 2; + g.cfg.PadDef[1].KeyDef[DKEY_LEFT].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_LEFT].J.Axis = -1; + g.cfg.PadDef[1].KeyDef[DKEY_L2].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_L2].J.Button = 4; + g.cfg.PadDef[1].KeyDef[DKEY_L1].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_L1].J.Button = 6; + g.cfg.PadDef[1].KeyDef[DKEY_R2].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_R2].J.Button = 5; + g.cfg.PadDef[1].KeyDef[DKEY_R1].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_R1].J.Button = 7; + g.cfg.PadDef[1].KeyDef[DKEY_TRIANGLE].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_TRIANGLE].J.Button = 0; + g.cfg.PadDef[1].KeyDef[DKEY_CIRCLE].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_CIRCLE].J.Button = 1; + g.cfg.PadDef[1].KeyDef[DKEY_CROSS].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_CROSS].J.Button = 2; + g.cfg.PadDef[1].KeyDef[DKEY_SQUARE].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_SQUARE].J.Button = 3; +} + +void LoadPADConfig() { + FILE *fp; + char buf[256]; + int current, a, b, c; + + SetDefaultConfig(); + + sprintf(buf, "%s/Library/Preferences/net.pcsx.DFInput.plist", getenv("HOME")); + + fp = fopen(buf, "r"); + if (fp == NULL) { + return; + } + + current = 0; + + while (fgets(buf, 256, fp) != NULL) { + if (strncmp(buf, "Threaded=", 9) == 0) { + g.cfg.Threaded = atoi(&buf[9]); + } else if (strncmp(buf, "[PAD", 4) == 0) { + current = atoi(&buf[4]) - 1; + if (current < 0) { + current = 0; + } else if (current > 1) { + current = 1; + } + } else if (strncmp(buf, "DevNum=", 7) == 0) { + g.cfg.PadDef[current].DevNum = atoi(&buf[7]); + } else if (strncmp(buf, "Type=", 5) == 0) { + g.cfg.PadDef[current].Type = atoi(&buf[5]); + } else if (strncmp(buf, "Select=", 7) == 0) { + sscanf(buf, "Select=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_SELECT].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_SELECT].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_SELECT].J.d = c; + } else if (strncmp(buf, "L3=", 3) == 0) { + sscanf(buf, "L3=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_L3].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_L3].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_L3].J.d = c; + } else if (strncmp(buf, "R3=", 3) == 0) { + sscanf(buf, "R3=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_R3].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_R3].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_R3].J.d = c; + } else if (strncmp(buf, "Start=", 6) == 0) { + sscanf(buf, "Start=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_START].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_START].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_START].J.d = c; + } else if (strncmp(buf, "Up=", 3) == 0) { + sscanf(buf, "Up=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_UP].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_UP].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_UP].J.d = c; + } else if (strncmp(buf, "Right=", 6) == 0) { + sscanf(buf, "Right=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_RIGHT].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_RIGHT].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_RIGHT].J.d = c; + } else if (strncmp(buf, "Down=", 5) == 0) { + sscanf(buf, "Down=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_DOWN].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_DOWN].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_DOWN].J.d = c; + } else if (strncmp(buf, "Left=", 5) == 0) { + sscanf(buf, "Left=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_LEFT].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_LEFT].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_LEFT].J.d = c; + } else if (strncmp(buf, "L2=", 3) == 0) { + sscanf(buf, "L2=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_L2].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_L2].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_L2].J.d = c; + } else if (strncmp(buf, "R2=", 3) == 0) { + sscanf(buf, "R2=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_R2].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_R2].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_R2].J.d = c; + } else if (strncmp(buf, "L1=", 3) == 0) { + sscanf(buf, "L1=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_L1].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_L1].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_L1].J.d = c; + } else if (strncmp(buf, "R1=", 3) == 0) { + sscanf(buf, "R1=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_R1].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_R1].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_R1].J.d = c; + } else if (strncmp(buf, "Triangle=", 9) == 0) { + sscanf(buf, "Triangle=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_TRIANGLE].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_TRIANGLE].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_TRIANGLE].J.d = c; + } else if (strncmp(buf, "Circle=", 7) == 0) { + sscanf(buf, "Circle=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_CIRCLE].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_CIRCLE].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_CIRCLE].J.d = c; + } else if (strncmp(buf, "Cross=", 6) == 0) { + sscanf(buf, "Cross=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_CROSS].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_CROSS].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_CROSS].J.d = c; + } else if (strncmp(buf, "Square=", 7) == 0) { + sscanf(buf, "Square=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_SQUARE].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_SQUARE].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_SQUARE].J.d = c; + } else if (strncmp(buf, "LeftAnalogXP=", 13) == 0) { + sscanf(buf, "LeftAnalogXP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XP].J.d = c; + } else if (strncmp(buf, "LeftAnalogXM=", 13) == 0) { + sscanf(buf, "LeftAnalogXM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XM].J.d = c; + } else if (strncmp(buf, "LeftAnalogYP=", 13) == 0) { + sscanf(buf, "LeftAnalogYP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YP].J.d = c; + } else if (strncmp(buf, "LeftAnalogYM=", 13) == 0) { + sscanf(buf, "LeftAnalogYM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YM].J.d = c; + } else if (strncmp(buf, "RightAnalogXP=", 14) == 0) { + sscanf(buf, "RightAnalogXP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XP].J.d = c; + } else if (strncmp(buf, "RightAnalogXM=", 14) == 0) { + sscanf(buf, "RightAnalogXM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XM].J.d = c; + } else if (strncmp(buf, "RightAnalogYP=", 14) == 0) { + sscanf(buf, "RightAnalogYP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YP].J.d = c; + } else if (strncmp(buf, "RightAnalogYM=", 14) == 0) { + sscanf(buf, "RightAnalogYM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YM].J.d = c; + } + } + + fclose(fp); +} + +void SavePADConfig() { + FILE *fp; + int i; + char buf[256]; + + sprintf(buf, "%s/Library/Preferences/net.pcsx.DFInput.plist", getenv("HOME")); + + fp = fopen(buf, "w"); + if (fp == NULL) { + return; + } + + fprintf(fp, "[CONFIG]\n"); + fprintf(fp, "Threaded=%d\n", g.cfg.Threaded); + fprintf(fp, "\n"); + + for (i = 0; i < 2; i++) { + fprintf(fp, "[PAD%d]\n", i + 1); + fprintf(fp, "DevNum=%d\n", g.cfg.PadDef[i].DevNum); + fprintf(fp, "Type=%d\n", g.cfg.PadDef[i].Type); + + fprintf(fp, "Select=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_SELECT].Key, + g.cfg.PadDef[i].KeyDef[DKEY_SELECT].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_SELECT].J.d); + fprintf(fp, "L3=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_L3].Key, + g.cfg.PadDef[i].KeyDef[DKEY_L3].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_L3].J.d); + fprintf(fp, "R3=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_R3].Key, + g.cfg.PadDef[i].KeyDef[DKEY_R3].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_R3].J.d); + fprintf(fp, "Start=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_START].Key, + g.cfg.PadDef[i].KeyDef[DKEY_START].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_START].J.d); + fprintf(fp, "Up=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_UP].Key, + g.cfg.PadDef[i].KeyDef[DKEY_UP].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_UP].J.d); + fprintf(fp, "Right=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_RIGHT].Key, + g.cfg.PadDef[i].KeyDef[DKEY_RIGHT].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_RIGHT].J.d); + fprintf(fp, "Down=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_DOWN].Key, + g.cfg.PadDef[i].KeyDef[DKEY_DOWN].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_DOWN].J.d); + fprintf(fp, "Left=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_LEFT].Key, + g.cfg.PadDef[i].KeyDef[DKEY_LEFT].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_LEFT].J.d); + fprintf(fp, "L2=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_L2].Key, + g.cfg.PadDef[i].KeyDef[DKEY_L2].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_L2].J.d); + fprintf(fp, "R2=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_R2].Key, + g.cfg.PadDef[i].KeyDef[DKEY_R2].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_R2].J.d); + fprintf(fp, "L1=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_L1].Key, + g.cfg.PadDef[i].KeyDef[DKEY_L1].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_L1].J.d); + fprintf(fp, "R1=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_R1].Key, + g.cfg.PadDef[i].KeyDef[DKEY_R1].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_R1].J.d); + fprintf(fp, "Triangle=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_TRIANGLE].Key, + g.cfg.PadDef[i].KeyDef[DKEY_TRIANGLE].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_TRIANGLE].J.d); + fprintf(fp, "Circle=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_CIRCLE].Key, + g.cfg.PadDef[i].KeyDef[DKEY_CIRCLE].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_CIRCLE].J.d); + fprintf(fp, "Cross=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_CROSS].Key, + g.cfg.PadDef[i].KeyDef[DKEY_CROSS].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_CROSS].J.d); + fprintf(fp, "Square=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_SQUARE].Key, + g.cfg.PadDef[i].KeyDef[DKEY_SQUARE].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_SQUARE].J.d); + fprintf(fp, "LeftAnalogXP=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XP].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XP].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XP].J.d); + fprintf(fp, "LeftAnalogXM=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XM].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XM].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XM].J.d); + fprintf(fp, "LeftAnalogYP=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YP].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YP].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YP].J.d); + fprintf(fp, "LeftAnalogYM=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YM].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YM].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YM].J.d); + fprintf(fp, "RightAnalogXP=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XP].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XP].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XP].J.d); + fprintf(fp, "RightAnalogXM=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XM].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XM].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XM].J.d); + fprintf(fp, "RightAnalogYP=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YP].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YP].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YP].J.d); + fprintf(fp, "RightAnalogYM=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YM].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YM].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YM].J.d); + + fprintf(fp, "\n"); + } + + fclose(fp); +} + +long PADconfigure(void) { + if (SDL_WasInit(SDL_INIT_JOYSTICK)) return -1; // cannot change settings on the fly + + DoConfiguration(); + LoadPADConfig(); + return 0; +} + +void PADabout(void) { + DoAbout(); +} + +struct { + uint16_t code; + const char *desc; +} KeyString[] = { + { 0x01, "A" }, + { 0x0C, "B" }, + { 0x09, "C" }, + { 0x03, "D" }, + { 0x0F, "E" }, + { 0x04, "F" }, + { 0x06, "G" }, + { 0x05, "H" }, + { 0x23, "I" }, + { 0x27, "J" }, + { 0x29, "K" }, + { 0x26, "L" }, + { 0x2F, "M" }, + { 0x2E, "N" }, + { 0x20, "O" }, + { 0x24, "P" }, + { 0x0D, "Q" }, + { 0x10, "R" }, + { 0x02, "S" }, + { 0x12, "T" }, + { 0x21, "U" }, + { 0x0A, "V" }, + { 0x0E, "W" }, + { 0x08, "X" }, + { 0x11, "Y" }, + { 0x07, "Z" }, + { 0x22, "[" }, + { 0x1F, "]" }, + { 0x2A, ";" }, + { 0x28, "'" }, + { 0x2C, "," }, + { 0x30, "." }, + { 0x2D, "/" }, + { 0x33, "`" }, + { 0x13, "1" }, + { 0x14, "2" }, + { 0x15, "3" }, + { 0x16, "4" }, + { 0x18, "5" }, + { 0x17, "6" }, + { 0x1B, "7" }, + { 0x1D, "8" }, + { 0x1A, "9" }, + { 0x1E, "0" }, + { 0x1C, "-" }, + { 0x19, "=" }, + { 0x2B, "\\" }, + { 0x31, "Tab" }, + { 0x39, "Shift" }, + { 0x3C, "Control" }, + { 0x38, "Command" }, + { 0x32, "Spacebar" }, + { 0x34, "Backspace" }, + { 0x25, "Enter" }, + { 0x7F, "Up" }, + { 0x7E, "Down" }, + { 0x7C, "Left" }, + { 0x7D, "Right" }, + { 0x73, "Insert" }, + { 0x76, "Delete" }, + { 0x74, "Home" }, + { 0x78, "End" }, + { 0x75, "Page Up" }, + { 0x7A, "Page Down" }, + { 0x48, "Num Lock" }, + { 0x4C, "Keypad /" }, + { 0x44, "Keypad *" }, + { 0x4F, "Keypad -" }, + { 0x46, "Keypad +" }, + { 0x4D, "Keypad Enter" }, + { 0x53, "Keypad 0" }, + { 0x54, "Keypad 1" }, + { 0x55, "Keypad 2" }, + { 0x56, "Keypad 3" }, + { 0x57, "Keypad 4" }, + { 0x58, "Keypad 5" }, + { 0x59, "Keypad 6" }, + { 0x5A, "Keypad 7" }, + { 0x5C, "Keypad 8" }, + { 0x5D, "Keypad 9" }, + { 0x42, "Keypad ." }, + { 0x00, NULL } +}; + +static const char *XKeysymToString(uint16_t key) { + static char buf[64]; + int i = 0; + + while (KeyString[i].code != 0) { + if (KeyString[i].code == key) { + strcpy(buf, KeyString[i].desc); + return buf; + } + i++; + } + + sprintf(buf, "0x%.2X", key); + return buf; +} + +void GetKeyDescription(char *buf, int joynum, int key) { + const char *hatname[16] = {"Centered", "Up", "Right", "Rightup", + "Down", "", "Rightdown", "", "Left", "Leftup", "", "", + "Leftdown", "", "", ""}; + + switch (g.cfg.PadDef[joynum].KeyDef[key].JoyEvType) { + case BUTTON: + sprintf(buf, "Joystick: Button %d", g.cfg.PadDef[joynum].KeyDef[key].J.Button); + break; + + case AXIS: + sprintf(buf, "Joystick: Axis %d%c", abs(g.cfg.PadDef[joynum].KeyDef[key].J.Axis) - 1, + g.cfg.PadDef[joynum].KeyDef[key].J.Axis > 0 ? '+' : '-'); + break; + + case HAT: + sprintf(buf, "Joystick: Hat %d %s", (g.cfg.PadDef[joynum].KeyDef[key].J.Hat >> 8), + hatname[g.cfg.PadDef[joynum].KeyDef[key].J.Hat & 0x0F]); + break; + + case NONE: + default: + buf[0] = '\0'; + break; + } + + if (g.cfg.PadDef[joynum].KeyDef[key].Key != 0) { + if (buf[0] != '\0') { + strcat(buf, " / "); + } + + strcat(buf, "Keyboard:"); + strcat(buf, " "); + strcat(buf, XKeysymToString(g.cfg.PadDef[joynum].KeyDef[key].Key)); + } +} + +void GetAnalogDescription(char *buf, int joynum, int analognum, int dir) { + const char *hatname[16] = {"Centered", "Up", "Right", "Rightup", + "Down", "", "Rightdown", "", "Left", "Leftup", "", "", + "Leftdown", "", "", ""}; + + switch (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].JoyEvType) { + case BUTTON: + sprintf(buf, "Joystick: Button %d", g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Button); + break; + + case AXIS: + sprintf(buf, "Joystick: Axis %d%c", abs(g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Axis) - 1, + g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Axis > 0 ? '+' : '-'); + break; + + case HAT: + sprintf(buf, "Joystick: Hat %d %s", (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Hat >> 8), + hatname[g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Hat & 0x0F]); + break; + + case NONE: + default: + buf[0] = '\0'; + break; + } + + if (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key != 0) { + if (buf[0] != '\0') { + strcat(buf, " / "); + } + + strcat(buf, "Keyboard:"); + strcat(buf, " "); + strcat(buf, XKeysymToString(g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key)); + } +} + +int CheckKeyDown() { + KeyMap theKeys; + unsigned char *keybytes; + int i; + + GetKeys(theKeys); + keybytes = (unsigned char *) theKeys; + + for (i = 0; i < 128; i++) { + if (i == 0x3A) continue; // Ignore capslock + + if (keybytes[i >> 3] & (1 << (i & 7))) + return i + 1; + } + + return 0; +} + +static Sint16 InitialAxisPos[256], PrevAxisPos[256]; + +#define NUM_AXES(js) (SDL_JoystickNumAxes(js) > 256 ? 256 : SDL_JoystickNumAxes(js)) + +void InitAxisPos(int padnum) { + int i; + SDL_Joystick *js; + + if (g.cfg.PadDef[padnum].DevNum >= 0) { + js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); + SDL_JoystickEventState(SDL_IGNORE); + } else return; + + SDL_JoystickUpdate(); + + for (i = 0; i < NUM_AXES(js); i++) { + InitialAxisPos[i] = PrevAxisPos[i] = SDL_JoystickGetAxis(js, i); + } + + SDL_JoystickClose(js); +} + +int ReadDKeyEvent(int padnum, int key) { + SDL_Joystick *js; + int i, changed = 0, t; + Sint16 axis; + + if (g.cfg.PadDef[padnum].DevNum >= 0) { + js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); + SDL_JoystickEventState(SDL_IGNORE); + } else { + js = NULL; + } + + for (t = 0; t < 1000000 / 1000; t++) { + // check joystick events + if (js != NULL) { + SDL_JoystickUpdate(); + + for (i = 0; i < SDL_JoystickNumButtons(js); i++) { + if (SDL_JoystickGetButton(js, i)) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = BUTTON; + g.cfg.PadDef[padnum].KeyDef[key].J.Button = i; + changed = 1; + goto end; + } + } + + for (i = 0; i < NUM_AXES(js); i++) { + axis = SDL_JoystickGetAxis(js, i); + if (abs(axis) > 16383 && (abs(axis - PrevAxisPos[i]) > 4096 || abs(axis - InitialAxisPos[i]) > 4096)) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = AXIS; + g.cfg.PadDef[padnum].KeyDef[key].J.Axis = (i + 1) * (axis > 0 ? 1 : -1); + changed = 1; + goto end; + } + PrevAxisPos[i] = axis; + } + + for (i = 0; i < SDL_JoystickNumHats(js); i++) { + axis = SDL_JoystickGetHat(js, i); + if (axis != SDL_HAT_CENTERED) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = HAT; + + if (axis & SDL_HAT_UP) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_UP); + } else if (axis & SDL_HAT_DOWN) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_DOWN); + } else if (axis & SDL_HAT_LEFT) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_LEFT); + } else if (axis & SDL_HAT_RIGHT) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_RIGHT); + } + + changed = 1; + goto end; + } + } + } + + // check keyboard events + i = CheckKeyDown(); + if (i != 0) { + if (i != 0x36) g.cfg.PadDef[padnum].KeyDef[key].Key = i; + changed = 1; + goto end; + } + + // check mouse events + if (Button()) { + changed = 2; + goto end; + } + + usleep(1000); + } + +end: + if (js != NULL) { + SDL_JoystickClose(js); + } + + return changed; +} + +int ReadAnalogEvent(int padnum, int analognum, int analogdir) { + SDL_Joystick *js; + int i, changed = 0, t; + Sint16 axis; + + if (g.cfg.PadDef[padnum].DevNum >= 0) { + js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); + SDL_JoystickEventState(SDL_IGNORE); + } else { + js = NULL; + } + + for (t = 0; t < 1000000 / 1000; t++) { + // check joystick events + if (js != NULL) { + SDL_JoystickUpdate(); + + for (i = 0; i < SDL_JoystickNumButtons(js); i++) { + if (SDL_JoystickGetButton(js, i)) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = BUTTON; + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Button = i; + changed = 1; + goto end; + } + } + + for (i = 0; i < NUM_AXES(js); i++) { + axis = SDL_JoystickGetAxis(js, i); + if (abs(axis) > 16383 && (abs(axis - PrevAxisPos[i]) > 4096 || abs(axis - InitialAxisPos[i]) > 4096)) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = AXIS; + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Axis = (i + 1) * (axis > 0 ? 1 : -1); + changed = 1; + goto end; + } + PrevAxisPos[i] = axis; + } + + for (i = 0; i < SDL_JoystickNumHats(js); i++) { + axis = SDL_JoystickGetHat(js, i); + if (axis != SDL_HAT_CENTERED) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = HAT; + + if (axis & SDL_HAT_UP) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_UP); + } else if (axis & SDL_HAT_DOWN) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_DOWN); + } else if (axis & SDL_HAT_LEFT) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_LEFT); + } else if (axis & SDL_HAT_RIGHT) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_RIGHT); + } + + changed = 1; + goto end; + } + } + } + + // check keyboard events + i = CheckKeyDown(); + if (i != 0) { + if (i != 0x36) g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].Key = i; + changed = 1; + goto end; + } + + // check mouse events + if (Button()) { + changed = 2; + goto end; + } + + usleep(1000); + } + +end: + if (js != NULL) { + SDL_JoystickClose(js); + } + + return changed; +} diff --git a/macosx/plugins/DFInput/macsrc/cfg.h b/macosx/plugins/DFInput/macsrc/cfg.h new file mode 100644 index 00000000..99bc103d --- /dev/null +++ b/macosx/plugins/DFInput/macsrc/cfg.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#ifndef CFG_H +#define CFG_H + +#include "pad.h" + +void GetKeyDescription(char *buf, int joynum, int key); +void GetAnalogDescription(char *buf, int joynum, int analognum, int dir); +void InitAxisPos(int padnum); +int ReadDKeyEvent(int padnum, int key); +int ReadAnalogEvent(int padnum, int analognum, int analogdir); + +#endif diff --git a/macosx/plugins/DFInput/macsrc/xkb.c b/macosx/plugins/DFInput/macsrc/xkb.c new file mode 100644 index 00000000..e9345c2b --- /dev/null +++ b/macosx/plugins/DFInput/macsrc/xkb.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "pad.h" + +void InitKeyboard() { + g.PadState[0].KeyStatus = 0xFFFF; + g.PadState[1].KeyStatus = 0xFFFF; +} + +void DestroyKeyboard() { +} + +void CheckKeyboard() { + int i, j, k; + uint16_t key; + + union { + KeyMap km; + KeyMapByteArray k; + } keyState; + + g.PadState[0].KeyStatus = 0xFFFF; + g.PadState[1].KeyStatus = 0xFFFF; + + GetKeys(keyState.km); + +#define KeyDown(X) \ + (keyState.k[((X) - 1) >> 3] & (1 << (((X) - 1) & 7))) + + for (i = 0; i < 2; i++) { + for (j = 0; j < DKEY_TOTAL; j++) { + key = g.cfg.PadDef[i].KeyDef[j].Key; + if (key == 0) continue; + + if (KeyDown(key)) g.PadState[i].KeyStatus &= ~(1 << j); + } + + if (g.cfg.PadDef[i].Type != PSE_PAD_TYPE_ANALOGPAD) continue; + + for (j = 0; j < ANALOG_TOTAL; j++) { + for (k = 0; k < 4; k++) { + key = g.cfg.PadDef[i].AnalogDef[j][k].Key; + if (key == 0) continue; + + g.PadState[i].AnalogKeyStatus[j][k] = (KeyDown(key) ? 1 : 0); + } + } + } +} diff --git a/macosx/plugins/DFSound/English.lproj/Credits.rtf b/macosx/plugins/DFSound/English.lproj/Credits.rtf new file mode 100644 index 00000000..209850ac --- /dev/null +++ b/macosx/plugins/DFSound/English.lproj/Credits.rtf @@ -0,0 +1,14 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\vieww9000\viewh9000\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\b\fs24 \cf0 Macintosh Port: +\f1\b0 \ + Gil Pedersen\ +\ + +\f0\b Original coders: +\f1\b0 \ + Pete Bernert and the P.E.Op.S. team} \ No newline at end of file diff --git a/macosx/plugins/DFSound/English.lproj/InfoPlist.strings b/macosx/plugins/DFSound/English.lproj/InfoPlist.strings new file mode 100755 index 0000000000000000000000000000000000000000..6c79d9c889757aaa8e573337e28688db197e2e1a GIT binary patch literal 538 zcmaKpK~KU!5QX2_U$ODn!-B?mAzmPWCZ-Y_yjLiNP)gHQ6a7d2N%h+;5XE9P+nLV3 zoj338*Jnq8jPAA7OtCVp^sYp6YOlmn6_u@Wq9HE$-to5}w<J@YqH;#&Ct literal 0 HcmV?d00001 diff --git a/macosx/plugins/DFSound/English.lproj/NetSfPeopsSpuPluginMain.nib/classes.nib b/macosx/plugins/DFSound/English.lproj/NetSfPeopsSpuPluginMain.nib/classes.nib new file mode 100644 index 00000000..ab65672a --- /dev/null +++ b/macosx/plugins/DFSound/English.lproj/NetSfPeopsSpuPluginMain.nib/classes.nib @@ -0,0 +1,25 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {cancel = id; ok = id; reset = id; }; + CLASS = NetSfPeopsSPUPluginController; + LANGUAGE = ObjC; + OUTLETS = { + hiCompBox = NSControl; + interpolValue = NetSfPeopsSPUPluginNamedSlider; + irqWaitBox = NetSfPeopsSPUPluginNamedSlider; + monoSoundBox = NSControl; + reverbValue = NSControl; + xaSpeedBox = NSControl; + }; + SUPERCLASS = NSWindowController; + }, + { + CLASS = NetSfPeopsSPUPluginNamedSlider; + LANGUAGE = ObjC; + SUPERCLASS = NSSlider; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/macosx/plugins/DFSound/English.lproj/NetSfPeopsSpuPluginMain.nib/info.nib b/macosx/plugins/DFSound/English.lproj/NetSfPeopsSpuPluginMain.nib/info.nib new file mode 100644 index 00000000..a4d8dd8c --- /dev/null +++ b/macosx/plugins/DFSound/English.lproj/NetSfPeopsSpuPluginMain.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 42 12 546 240 0 0 1024 746 + IBFramework Version + 446.1 + IBOpenObjects + + 6 + + IBSystem Version + 8P2137 + + diff --git a/macosx/plugins/DFSound/English.lproj/NetSfPeopsSpuPluginMain.nib/keyedobjects.nib b/macosx/plugins/DFSound/English.lproj/NetSfPeopsSpuPluginMain.nib/keyedobjects.nib new file mode 100755 index 0000000000000000000000000000000000000000..d56d7754d576a1523df24c1f33e2e476fa00391c GIT binary patch literal 10993 zcmb6<2VfJ```>$aX__W!FG;gU?-)XXmJU`at1Xn-GFr-}hW6TqhNdJb1+n;wh>9pf z5KvSE#0`py3OI0!n<3)j)5_ zzyS{$NB}J)P3z(hSJed;$l=03)}+R z;dZzK?uL6{H#`iFz+QM1o`e_RARNN`!*B%NhVS5e_yK-|U*I=FiJo|gM7oh2l1B!T z;ba6EPbQFwWHOmTW|CRtLQ+L)$$Szf5fUYrlPk$JWEELU)|1WTMsh3JLGB{E$^B$6 z*+-rvPmzP=tJ~z`UE{dpQKOGr|EO_dHNE4ogSh`@%t_MKK+1xLQml5OZ=R| z&yV;ygP%X>Cmhe|xFjxx6F4hp7k4-8;qKvfa=W;DX&1b{kK2vk_j3<$4|03BhY;prcz}C^+sp0ap5UJ0PV?!o zn(x8)F(^3N3(Sly(6+ZwT2>Ljjf3)(Ktpw?Ia1N3O4(0YFop(N zo^q#d6`O^3aSCFa+0Vnj1A@h2#IQLOuE#mWp@wLQzrkNCho|9s^1>(rR+N@a3WcKV zU@Nh+PuL0eBKx?NIN7Hxp_RB;B72EF-%1=z!$2rv^bm4A2Xdhg60Z`hpv8E`RSMox zIa*dTK@K%W$|g*n5NxUqG$0Ala3~m*!-t?h41hcsI5kF}9GM=wXut)w!a&HMjVm@q zqM>;)+NQP|KH#M#3l<4P#&|jDr#=h4C-}Cc-2rgL0S*6)**+!Zer;Ghimn zVmjt#o!HH6E8EU?u-n<4>~6M`-OF~f2iP9=Fx$)av&YyI>`C@CdzMulfeR5wKg@wD zs0JBokkiG1pp0~t_`~&b7$q`Xjzj|u{wRu=Ihcz%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zdzW~bcd2)oce(cp?;7uQ-kZIzc@KGyc;E28>3z%lj`uz92i_08AA3)DKl6U!{mOgN zd&>Kr_XqD!-k-f^yl1_?`@pC34fGB24e<^075awzihZMeV|?R$rM?NiNxpJlg>R~F zx^Jd$w(mmU9ACAs##iT?>x=ld`*!$l_uc8c+qctquWz^S0pA|q!@j+~{l3S1Pxzkn zJ?(qe_q^|*?~Q#2Ml&u@VpNt3+9>6$4_uI8O|T^TmkRBsPnS#KmHZc!}65UMgNDUM^lKUL{^F zt`gUX*NW@K4dNzotHenfNh|3jy=0V9B$H&3tdd=FN^Z$3rAd<1S?VfvlhUQ0Qijx9 z%9e7aeo~$^NE#{?N+YCE(paffnkbb^Q>5wAEa^h2N~)0pQcwy>VW~-4C|x97EG?0k zv{YIqEtjs4R!A$QYoyiET4|khowQN9UfL|(ByEwlO53F!((Tfn(%sTd>0W8K^nkQS zdRW>k?Ux>to{*lDo|c}Ko|g_vFG;URuSv(Hx1@KZPoxvlXVSOQchV2iZ=I-mC;&A6 NpT976-}c?f^ncwiwB-N* literal 0 HcmV?d00001 diff --git a/macosx/plugins/DFSound/Info.plist b/macosx/plugins/DFSound/Info.plist new file mode 100644 index 00000000..88cf687f --- /dev/null +++ b/macosx/plugins/DFSound/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + PeopsSPU + CFBundleIconFile + + CFBundleIdentifier + net.sf.peops.SPUPlugin + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + PSPU + CFBundleVersion + 1.19 + + diff --git a/macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj b/macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj new file mode 100644 index 00000000..e9c81c48 --- /dev/null +++ b/macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj @@ -0,0 +1,343 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 2B4F9962077B042E004E36BA /* NetSfPeopsSpuPluginMain.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2B4F9961077B042E004E36BA /* NetSfPeopsSpuPluginMain.nib */; }; + 2B4F99F9077B0CE4004E36BA /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2B4F99F7077B0CE4004E36BA /* Credits.rtf */; }; + 2B7B2B94072D9BE6007F0C35 /* PluginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B7B2B92072D9BE6007F0C35 /* PluginController.m */; }; + 2B7B2BD1072DAE5D007F0C35 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B7B2BD0072DAE5D007F0C35 /* AppKit.framework */; }; + 2B7B2BE9072DB1B6007F0C35 /* NamedSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B7B2BE7072DB1B6007F0C35 /* NamedSlider.m */; }; + 2BE18A00077EED7F008688C9 /* macosx.c in Sources */ = {isa = PBXBuildFile; fileRef = 2BFF7EFC0715D16A0061278A /* macosx.c */; }; + 2BFF7F3E0715D2E00061278A /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BFF7F3D0715D2E00061278A /* Carbon.framework */; }; + 71E4E7AB109DC529003BB7AC /* dma.c in Sources */ = {isa = PBXBuildFile; fileRef = 71E4E797109DC529003BB7AC /* dma.c */; }; + 71E4E7AC109DC529003BB7AC /* freeze.c in Sources */ = {isa = PBXBuildFile; fileRef = 71E4E79B109DC529003BB7AC /* freeze.c */; }; + 71E4E7AE109DC529003BB7AC /* registers.c in Sources */ = {isa = PBXBuildFile; fileRef = 71E4E79F109DC529003BB7AC /* registers.c */; }; + 71E4E7B0109DC529003BB7AC /* spu.c in Sources */ = {isa = PBXBuildFile; fileRef = 71E4E7A4109DC529003BB7AC /* spu.c */; }; + 71E4E7B1109DC529003BB7AC /* xa.c in Sources */ = {isa = PBXBuildFile; fileRef = 71E4E7A7109DC529003BB7AC /* xa.c */; }; + 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; }; + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; + 2B4F99F8077B0CE4004E36BA /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = ""; }; + 2B6DA89307200A9A009F6FED /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/NetSfPeopsSpuPluginMain.nib; sourceTree = ""; }; + 2B7B2B91072D9BE6007F0C35 /* PluginController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PluginController.h; path = macsrc/PluginController.h; sourceTree = ""; }; + 2B7B2B92072D9BE6007F0C35 /* PluginController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = PluginController.m; path = macsrc/PluginController.m; sourceTree = ""; }; + 2B7B2BD0072DAE5D007F0C35 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 2B7B2BE6072DB1B6007F0C35 /* NamedSlider.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = NamedSlider.h; path = macsrc/NamedSlider.h; sourceTree = ""; }; + 2B7B2BE7072DB1B6007F0C35 /* NamedSlider.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = NamedSlider.m; path = macsrc/NamedSlider.m; sourceTree = ""; }; + 2BFF7EFC0715D16A0061278A /* macosx.c */ = {isa = PBXFileReference; fileEncoding = 12; lastKnownFileType = sourcecode.c.c; name = macosx.c; path = src/macosx.c; sourceTree = ""; }; + 2BFF7F3D0715D2E00061278A /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + 71E4E793109DC529003BB7AC /* adsr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = adsr.c; path = ../../../plugins/dfsound/adsr.c; sourceTree = SOURCE_ROOT; }; + 71E4E794109DC529003BB7AC /* adsr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = adsr.h; path = ../../../plugins/dfsound/adsr.h; sourceTree = SOURCE_ROOT; }; + 71E4E796109DC529003BB7AC /* cfg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cfg.h; path = ../../../plugins/dfsound/cfg.h; sourceTree = SOURCE_ROOT; }; + 71E4E797109DC529003BB7AC /* dma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dma.c; path = ../../../plugins/dfsound/dma.c; sourceTree = SOURCE_ROOT; }; + 71E4E798109DC529003BB7AC /* dma.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dma.h; path = ../../../plugins/dfsound/dma.h; sourceTree = SOURCE_ROOT; }; + 71E4E799109DC529003BB7AC /* dsoundoss.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dsoundoss.h; path = ../../../plugins/dfsound/dsoundoss.h; sourceTree = SOURCE_ROOT; }; + 71E4E79A109DC529003BB7AC /* externals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = externals.h; path = ../../../plugins/dfsound/externals.h; sourceTree = SOURCE_ROOT; }; + 71E4E79B109DC529003BB7AC /* freeze.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = freeze.c; path = ../../../plugins/dfsound/freeze.c; sourceTree = SOURCE_ROOT; }; + 71E4E79C109DC529003BB7AC /* gauss_i.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gauss_i.h; path = ../../../plugins/dfsound/gauss_i.h; sourceTree = SOURCE_ROOT; }; + 71E4E79E109DC529003BB7AC /* psemuxa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = psemuxa.h; path = ../../../plugins/dfsound/psemuxa.h; sourceTree = SOURCE_ROOT; }; + 71E4E79F109DC529003BB7AC /* registers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = registers.c; path = ../../../plugins/dfsound/registers.c; sourceTree = SOURCE_ROOT; }; + 71E4E7A0109DC529003BB7AC /* registers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = registers.h; path = ../../../plugins/dfsound/registers.h; sourceTree = SOURCE_ROOT; }; + 71E4E7A1109DC529003BB7AC /* regs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = regs.h; path = ../../../plugins/dfsound/regs.h; sourceTree = SOURCE_ROOT; }; + 71E4E7A2109DC529003BB7AC /* reverb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = reverb.c; path = ../../../plugins/dfsound/reverb.c; sourceTree = SOURCE_ROOT; }; + 71E4E7A3109DC529003BB7AC /* reverb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = reverb.h; path = ../../../plugins/dfsound/reverb.h; sourceTree = SOURCE_ROOT; }; + 71E4E7A4109DC529003BB7AC /* spu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = spu.c; path = ../../../plugins/dfsound/spu.c; sourceTree = SOURCE_ROOT; }; + 71E4E7A5109DC529003BB7AC /* spu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spu.h; path = ../../../plugins/dfsound/spu.h; sourceTree = SOURCE_ROOT; }; + 71E4E7A6109DC529003BB7AC /* stdafx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = stdafx.h; path = ../../../plugins/dfsound/stdafx.h; sourceTree = SOURCE_ROOT; }; + 71E4E7A7109DC529003BB7AC /* xa.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xa.c; path = ../../../plugins/dfsound/xa.c; sourceTree = SOURCE_ROOT; }; + 71E4E7A8109DC529003BB7AC /* xa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xa.h; path = ../../../plugins/dfsound/xa.h; sourceTree = SOURCE_ROOT; }; + 8D576316048677EA00EA77CD /* PeopsSPU.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PeopsSPU.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D576313048677EA00EA77CD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */, + 2BFF7F3E0715D2E00061278A /* Carbon.framework in Frameworks */, + 2B7B2BD1072DAE5D007F0C35 /* AppKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* PSX Plugin */ = { + isa = PBXGroup; + children = ( + 08FB77AFFE84173DC02AAC07 /* Source */, + 2B7B2B8E072D9BD6007F0C35 /* Classes */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB6FE9D52B211CA2CBB /* Products */, + ); + name = "PSX Plugin"; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 2B7B2BD0072DAE5D007F0C35 /* AppKit.framework */, + 2BFF7F3D0715D2E00061278A /* Carbon.framework */, + 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 8D576317048677EA00EA77CD /* Info.plist */, + 2B4F99F7077B0CE4004E36BA /* Credits.rtf */, + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, + 2B4F9961077B042E004E36BA /* NetSfPeopsSpuPluginMain.nib */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77AFFE84173DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 71E4E793109DC529003BB7AC /* adsr.c */, + 71E4E794109DC529003BB7AC /* adsr.h */, + 71E4E796109DC529003BB7AC /* cfg.h */, + 71E4E797109DC529003BB7AC /* dma.c */, + 71E4E798109DC529003BB7AC /* dma.h */, + 71E4E799109DC529003BB7AC /* dsoundoss.h */, + 71E4E79A109DC529003BB7AC /* externals.h */, + 71E4E79B109DC529003BB7AC /* freeze.c */, + 71E4E79C109DC529003BB7AC /* gauss_i.h */, + 71E4E79E109DC529003BB7AC /* psemuxa.h */, + 71E4E79F109DC529003BB7AC /* registers.c */, + 71E4E7A0109DC529003BB7AC /* registers.h */, + 71E4E7A1109DC529003BB7AC /* regs.h */, + 71E4E7A2109DC529003BB7AC /* reverb.c */, + 71E4E7A3109DC529003BB7AC /* reverb.h */, + 71E4E7A4109DC529003BB7AC /* spu.c */, + 71E4E7A5109DC529003BB7AC /* spu.h */, + 71E4E7A6109DC529003BB7AC /* stdafx.h */, + 71E4E7A7109DC529003BB7AC /* xa.c */, + 71E4E7A8109DC529003BB7AC /* xa.h */, + 2BFF7EFC0715D16A0061278A /* macosx.c */, + ); + name = Source; + sourceTree = ""; + }; + 19C28FB6FE9D52B211CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D576316048677EA00EA77CD /* PeopsSPU.psxplugin */, + ); + name = Products; + sourceTree = ""; + }; + 2B7B2B8E072D9BD6007F0C35 /* Classes */ = { + isa = PBXGroup; + children = ( + 2B7B2B91072D9BE6007F0C35 /* PluginController.h */, + 2B7B2B92072D9BE6007F0C35 /* PluginController.m */, + 2B7B2BE6072DB1B6007F0C35 /* NamedSlider.h */, + 2B7B2BE7072DB1B6007F0C35 /* NamedSlider.m */, + ); + name = Classes; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D57630D048677EA00EA77CD /* PeopsSPU */ = { + isa = PBXNativeTarget; + buildConfigurationList = 71155B260FDFA2EB00EC0BC5 /* Build configuration list for PBXNativeTarget "PeopsSPU" */; + buildPhases = ( + 8D57630F048677EA00EA77CD /* Resources */, + 8D576311048677EA00EA77CD /* Sources */, + 8D576313048677EA00EA77CD /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PeopsSPU; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = "PSX Plugin"; + productReference = 8D576316048677EA00EA77CD /* PeopsSPU.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 71155B2B0FDFA2EB00EC0BC5 /* Build configuration list for PBXProject "PeopsSPU" */; + hasScannedForEncodings = 1; + mainGroup = 089C166AFE841209C02AAC07 /* PSX Plugin */; + projectDirPath = ""; + targets = ( + 8D57630D048677EA00EA77CD /* PeopsSPU */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D57630F048677EA00EA77CD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, + 2B4F9962077B042E004E36BA /* NetSfPeopsSpuPluginMain.nib in Resources */, + 2B4F99F9077B0CE4004E36BA /* Credits.rtf in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D576311048677EA00EA77CD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2B7B2B94072D9BE6007F0C35 /* PluginController.m in Sources */, + 2B7B2BE9072DB1B6007F0C35 /* NamedSlider.m in Sources */, + 2BE18A00077EED7F008688C9 /* macosx.c in Sources */, + 71E4E7AB109DC529003BB7AC /* dma.c in Sources */, + 71E4E7AC109DC529003BB7AC /* freeze.c in Sources */, + 71E4E7AE109DC529003BB7AC /* registers.c in Sources */, + 71E4E7B0109DC529003BB7AC /* spu.c in Sources */, + 71E4E7B1109DC529003BB7AC /* xa.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 2B4F9961077B042E004E36BA /* NetSfPeopsSpuPluginMain.nib */ = { + isa = PBXVariantGroup; + children = ( + 2B6DA89307200A9A009F6FED /* English */, + ); + name = NetSfPeopsSpuPluginMain.nib; + sourceTree = ""; + }; + 2B4F99F7077B0CE4004E36BA /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 2B4F99F8077B0CE4004E36BA /* English */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 71155B270FDFA2EB00EC0BC5 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + _MACOSX, + USEMACOSX, + ); + HEADER_SEARCH_PATHS = ( + src/, + ../../../plugins/dfsound, + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LIBRARY_STYLE = BUNDLE; + OTHER_CFLAGS = "-DUSEMACOSX=1"; + PRODUCT_NAME = PeopsSPU; + SYMROOT = ../../build; + WRAPPER_EXTENSION = psxplugin; + ZERO_LINK = NO; + }; + name = Development; + }; + 71155B290FDFA2EB00EC0BC5 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUGGING_SYMBOLS = NO; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = s; + GCC_PREPROCESSOR_DEFINITIONS = ( + _MACOSX, + USEMACOSX, + ); + HEADER_SEARCH_PATHS = ( + src/, + ../../../plugins/dfsound, + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + LIBRARY_STYLE = BUNDLE; + OTHER_CFLAGS = ""; + OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; + PRODUCT_NAME = PeopsSPU; + SYMROOT = ../../build; + WRAPPER_EXTENSION = psxplugin; + ZERO_LINK = NO; + }; + name = Deployment; + }; + 71155B2C0FDFA2EB00EC0BC5 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Development; + }; + 71155B2E0FDFA2EB00EC0BC5 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Deployment; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 71155B260FDFA2EB00EC0BC5 /* Build configuration list for PBXNativeTarget "PeopsSPU" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71155B270FDFA2EB00EC0BC5 /* Development */, + 71155B290FDFA2EB00EC0BC5 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; + 71155B2B0FDFA2EB00EC0BC5 /* Build configuration list for PBXProject "PeopsSPU" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71155B2C0FDFA2EB00EC0BC5 /* Development */, + 71155B2E0FDFA2EB00EC0BC5 /* Deployment */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Development; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/macosx/plugins/DFSound/macsrc/NamedSlider.h b/macosx/plugins/DFSound/macsrc/NamedSlider.h new file mode 100644 index 00000000..c5a40aa0 --- /dev/null +++ b/macosx/plugins/DFSound/macsrc/NamedSlider.h @@ -0,0 +1,13 @@ +/* NetSfPeopsSPUPluginNamedSlider */ + +#import + +#define NamedSlider NetSfPeopsSPUPluginNamedSlider + +@interface NamedSlider : NSSlider +{ + NSArray *strings; +} + +- (void)setStrings:(NSArray *)theStrings; +@end diff --git a/macosx/plugins/DFSound/macsrc/NamedSlider.m b/macosx/plugins/DFSound/macsrc/NamedSlider.m new file mode 100644 index 00000000..fd07780a --- /dev/null +++ b/macosx/plugins/DFSound/macsrc/NamedSlider.m @@ -0,0 +1,33 @@ +#import "NamedSlider.h" + +@implementation NamedSlider + +- (void)dealloc +{ + [strings release]; + [super dealloc]; +} + +- (void)setStrings:(NSArray *)theStrings +{ + [strings release]; + strings = [theStrings retain]; +} + +- (NSString *)stringValue +{ + int index = [self intValue]; + + if (index >= 0 && index < [strings count]) + return [strings objectAtIndex:index]; + + return @"(Unknown)"; +} + +- (void)setIntValue:(int)value +{ + [super setIntValue:value]; + [self sendAction:[self action] to:[self target]]; +} + +@end diff --git a/macosx/plugins/DFSound/macsrc/PluginController.h b/macosx/plugins/DFSound/macsrc/PluginController.h new file mode 100644 index 00000000..36373b1d --- /dev/null +++ b/macosx/plugins/DFSound/macsrc/PluginController.h @@ -0,0 +1,29 @@ +/* NetSfPeopsSPUPluginController */ + +#import +#import "NamedSlider.h" + +void DoAbout(); +long DoConfiguration(); +void LoadConfiguration(); + +#define PluginController NetSfPeopsSPUPluginController + +@interface PluginController : NSWindowController +{ + IBOutlet NSControl *hiCompBox; + IBOutlet NetSfPeopsSPUPluginNamedSlider *interpolValue; + IBOutlet NSControl *irqWaitBox; + IBOutlet NSControl *monoSoundBox; + IBOutlet NetSfPeopsSPUPluginNamedSlider *reverbValue; + IBOutlet NSControl *xaEnableBox; + IBOutlet NSControl *xaSpeedBox; + + NSMutableDictionary *keyValues; +} +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; +- (IBAction)reset:(id)sender; + +- (void)loadValues; +@end diff --git a/macosx/plugins/DFSound/macsrc/PluginController.m b/macosx/plugins/DFSound/macsrc/PluginController.m new file mode 100644 index 00000000..1fa007f5 --- /dev/null +++ b/macosx/plugins/DFSound/macsrc/PluginController.m @@ -0,0 +1,160 @@ +#import "PluginController.h" +#include "stdafx.h" +#include "externals.h" + +#define APP_ID @"net.sf.peops.SPUPlugin" +#define PrefsKey APP_ID @" Settings" + +static PluginController *pluginController; +char * pConfigFile=NULL; + +void DoAbout() +{ + // Get parent application instance + NSApplication *app = [NSApplication sharedApplication]; + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (path) { + credits = [[[NSAttributedString alloc] initWithPath: path + documentAttributes:NULL] autorelease]; + } else { + credits = [[[NSAttributedString alloc] initWithString:@""] autorelease]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + [app orderFrontStandardAboutPanelWithOptions:[NSDictionary dictionaryWithObjectsAndKeys: + [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", + icon, @"ApplicationIcon", + [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", + [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], @"Version", + [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], @"Copyright", + credits, @"Credits", + nil]]; +} + + +long DoConfiguration() +{ + NSWindow *window; + + if (pluginController == nil) { + pluginController = [[PluginController alloc] initWithWindowNibName:@"NetSfPeopsSpuPluginMain"]; + } + window = [pluginController window]; + + /* load values */ + [pluginController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + + return 0; +} + +void ReadConfig(void) +{ + NSDictionary *keyValues; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: + [[NSMutableDictionary alloc] initWithObjectsAndKeys: + [NSNumber numberWithBool:YES], @"High Compatibility Mode", + [NSNumber numberWithBool:YES], @"SPU IRQ Wait", + [NSNumber numberWithBool:NO], @"XA Pitch", + [NSNumber numberWithInt:0], @"Interpolation Quality", + [NSNumber numberWithInt:1], @"Reverb Quality", + nil], PrefsKey, + nil]]; + + keyValues = [defaults dictionaryForKey:PrefsKey]; + + iUseTimer = [[keyValues objectForKey:@"High Compatibility Mode"] boolValue] ? 2 : 0; + iSPUIRQWait = [[keyValues objectForKey:@"SPU IRQ Wait"] boolValue]; + iDisStereo = [[keyValues objectForKey:@"Mono Sound Output"] boolValue]; + iXAPitch = [[keyValues objectForKey:@"XA Pitch"] boolValue]; + + iUseInterpolation = [[keyValues objectForKey:@"Interpolation Quality"] intValue]; + iUseReverb = [[keyValues objectForKey:@"Reverb Quality"] intValue]; + + iVolume=1; +} + +@implementation PluginController + +- (IBAction)cancel:(id)sender +{ + [self close]; +} + +- (IBAction)ok:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues]; + [writeDic setObject:[NSNumber numberWithInt:[hiCompBox intValue]] forKey:@"High Compatibility Mode"]; + [writeDic setObject:[NSNumber numberWithInt:[irqWaitBox intValue]] forKey:@"SPU IRQ Wait"]; + [writeDic setObject:[NSNumber numberWithInt:[monoSoundBox intValue]] forKey:@"Mono Sound Output"]; + [writeDic setObject:[NSNumber numberWithInt:[xaSpeedBox intValue]] forKey:@"XA Pitch"]; + + [writeDic setObject:[NSNumber numberWithInt:[interpolValue intValue]] forKey:@"Interpolation Quality"]; + [writeDic setObject:[NSNumber numberWithInt:[reverbValue intValue]] forKey:@"Reverb Quality"]; + + // write to defaults + [defaults setObject:writeDic forKey:PrefsKey]; + [defaults synchronize]; + + // and set global values accordingly + ReadConfig(); + + [self close]; +} + +- (IBAction)reset:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults removeObjectForKey:PrefsKey]; + [self loadValues]; +} + +- (void)loadValues +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + ReadConfig(); + + /* load from preferences */ + [keyValues release]; + keyValues = [[defaults dictionaryForKey:PrefsKey] retain]; + + [hiCompBox setIntValue:[[keyValues objectForKey:@"High Compatibility Mode"] intValue]]; + [irqWaitBox setIntValue:[[keyValues objectForKey:@"SPU IRQ Wait"] intValue]]; + [monoSoundBox setIntValue:[[keyValues objectForKey:@"Mono Sound Output"] intValue]]; + [xaSpeedBox setIntValue:[[keyValues objectForKey:@"XA Pitch"] intValue]]; + + [interpolValue setIntValue:[[keyValues objectForKey:@"Interpolation Quality"] intValue]]; + [reverbValue setIntValue:[[keyValues objectForKey:@"Reverb Quality"] intValue]]; +} + +- (void)awakeFromNib +{ + [interpolValue setStrings:[NSArray arrayWithObjects: + @"(No Interpolation)", + @"(Simple Interpolation)", + @"(Gaussian Interpolation)", + @"(Cubic Interpolation)", + nil]]; + + [reverbValue setStrings:[NSArray arrayWithObjects: + @"(No Reverb)", + @"(Simple Reverb)", + @"(PSX Reverb)", + nil]]; +} + +@end diff --git a/macosx/plugins/DFSound/src/macosx.c b/macosx/plugins/DFSound/src/macosx.c new file mode 100755 index 00000000..f329ffcd --- /dev/null +++ b/macosx/plugins/DFSound/src/macosx.c @@ -0,0 +1,203 @@ +/*************************************************************************** + macosx.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_MACOSX + +#ifdef _MACOSX + +#include +#include "externals.h" + +#define kMaxSoundBuffers 20 + +//static int macBufferSize = 2, macBufferCount = 36; +//static float macSoundPitch = 1.0; +static long macSoundVolume = 100; +volatile int soundBufferAt = -1, soundPlayAt = -1, soundQueued = 0; +char *soundBuffer[kMaxSoundBuffers+1], *emptyBuffer; +SndChannelPtr sndChannel; +//ExtSoundHeader sndHeader; +CmpSoundHeader sndHeader; +SndCallBackUPP callBackUPP; +static int bufferIndex; + +//////////////////////////////////////////////////////////////////////// +// small linux time helper... only used for watchdog +//////////////////////////////////////////////////////////////////////// + +unsigned long timeGetTime() +{ + struct timeval tv; + gettimeofday(&tv, 0); // well, maybe there are better ways + return tv.tv_sec * 1000 + tv.tv_usec/1000; // to do that, but at least it works +} + +pascal void MacProcessSound(SndChannelPtr chan, SndCommand *cmd) +{ + #pragma unused (chan, cmd) + + if (soundQueued <= 0) + sndHeader.samplePtr = emptyBuffer; + else + { + sndHeader.samplePtr = soundBuffer[soundPlayAt]; + soundPlayAt++; + if (soundPlayAt >= kMaxSoundBuffers/*macBufferCount*/) + soundPlayAt = 0; + soundQueued--; + } + + SndCommand buffer = { bufferCmd, 0, (long) &sndHeader }; + SndDoImmediate(sndChannel, &buffer); + + SndCommand callback = { callBackCmd, 0, 0 }; + SndDoCommand(sndChannel, &callback, true); +} + +//////////////////////////////////////////////////////////////////////// +// SETUP SOUND +//////////////////////////////////////////////////////////////////////// + +static int buffer_size; +void SetupSound(void) +{ + int count; + + callBackUPP = NewSndCallBackUPP(MacProcessSound); + + if (sndChannel) + { + SndDisposeChannel(sndChannel, true); + sndChannel = nil; + } + + buffer_size = 1; + while (buffer_size < (44100 / 60)) + buffer_size <<= 1; + + memset(&sndHeader, 0, sizeof(sndHeader)); + sndHeader.numChannels = (iDisStereo ? 1 : 2); + sndHeader.sampleRate = 44100 << 16; + sndHeader.encode = cmpSH; + sndHeader.baseFrequency = kMiddleC; + sndHeader.numFrames = buffer_size; + sndHeader.sampleSize = 16; +#ifdef __POWERPC__ + sndHeader.format = k16BitBigEndianFormat; +#else + sndHeader.format = k16BitLittleEndianFormat; +#endif + sndHeader.compressionID = fixedCompression; + + if (soundBufferAt != -1) + { + free(soundBuffer[0]); + free(emptyBuffer); + } + + soundBuffer[0] = (char *) calloc(buffer_size << 2, kMaxSoundBuffers); + for (count = 1; count <= kMaxSoundBuffers; count++) + soundBuffer[count] = soundBuffer[count-1] + (buffer_size << 2); + emptyBuffer = (char *) calloc(buffer_size << 2, 1); + + soundBufferAt = soundPlayAt = soundQueued = 0; + bufferIndex = 0; + + SndNewChannel(&sndChannel, sampledSynth, initStereo, callBackUPP); + + SndCommand sndcmd; + UInt32 volume; + + volume = (UInt32) (256.0 * (float) macSoundVolume / 100.0); + + sndcmd.cmd = volumeCmd; + sndcmd.param1 = 0; + sndcmd.param2 = (volume << 16) | volume; + SndDoCommand(sndChannel, &sndcmd, true); + + sndcmd.cmd = callBackCmd; + sndcmd.param1 = 0; + sndcmd.param2 = 0; + SndDoCommand(sndChannel, &sndcmd, true); +} + +//////////////////////////////////////////////////////////////////////// +// REMOVE SOUND +//////////////////////////////////////////////////////////////////////// + +void RemoveSound(void) +{ + DisposeSndCallBackUPP(callBackUPP); +} + +//////////////////////////////////////////////////////////////////////// +// GET BYTES BUFFERED +//////////////////////////////////////////////////////////////////////// + +unsigned long SoundGetBytesBuffered(void) +{ + int bytes; + int playAt = soundPlayAt; + + if (soundBufferAt < playAt) { + bytes = (soundBuffer[kMaxSoundBuffers]-soundBuffer[playAt])+ + (soundBuffer[soundBufferAt]-soundBuffer[0]); + } else { + bytes = soundBuffer[soundBufferAt]-soundBuffer[playAt]; + } + //printf("sb=%i\n", bytes); + +// if (bytes < SOUNDSIZE/2) +// return 0; + + return bytes; +} + +//////////////////////////////////////////////////////////////////////// +// FEED SOUND DATA +//////////////////////////////////////////////////////////////////////// + +void SoundFeedStreamData(unsigned char* pSound,long lBytes) +{ + int rem; + + if (lBytes > (buffer_size<<2)*kMaxSoundBuffers) { + printf("sound feed overflow!\n"); + return; + } + + rem = soundBuffer[kMaxSoundBuffers]-(soundBuffer[soundBufferAt]+bufferIndex); + if (lBytes > rem) { + memcpy(soundBuffer[soundBufferAt]+bufferIndex, pSound, rem); + lBytes -= rem; pSound += rem; + soundQueued += kMaxSoundBuffers-soundBufferAt; + soundBufferAt = 0; bufferIndex = 0; + } + memcpy(soundBuffer[soundBufferAt]+bufferIndex, pSound, lBytes); + soundBufferAt += (lBytes+bufferIndex)/(buffer_size<<2); + soundQueued += (lBytes+bufferIndex)/(buffer_size<<2); + bufferIndex = (lBytes+bufferIndex)%(buffer_size<<2); + + if (soundQueued >= kMaxSoundBuffers) { + printf("sound buffer overflow!\n"); + } +} + +#endif diff --git a/macosx/plugins/DFXVideo/English.lproj/Credits.rtf b/macosx/plugins/DFXVideo/English.lproj/Credits.rtf new file mode 100644 index 00000000..f49ff39e --- /dev/null +++ b/macosx/plugins/DFXVideo/English.lproj/Credits.rtf @@ -0,0 +1,13 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx565\tx1133\tx1700\tx2266\tx2833\tx3401\tx3967\tx4535\tx5102\tx5669\tx6235\tx6802\ql\qnatural + +\f0\b\fs24 \cf0 Created By +\f1\b0 \ + Pete Bernert and the P.E.Op.S. team\ +\ + +\f0\b Macintosh Port By +\f1\b0 \ + Gil Pedersen} \ No newline at end of file diff --git a/macosx/plugins/DFXVideo/English.lproj/InfoPlist.strings b/macosx/plugins/DFXVideo/English.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..df4dfcb5b5edb7c7d388d837345952fbe6bd5315 GIT binary patch literal 518 zcmZ{hON+ul5QOXOuNXXf@P)94#mfptL4p`|@9`ByjS>?<|B-*v-EYPhE+b*4Cq32G z)iuADnkq6HXsd~0t+muiGfl}Ih?(|ewn~YHIA`zkH|Jc{&f)jU$*w>j9jc<5N_-u4 z^`!#z6x>W9{2QWCn^jii_;LkwH|#@w6Ng|6C3H=}e0q2yEvU@s`tzbNB9png& zYSch`LmzMW16cFNls;C!@)31*R_mHwue1F3^QoeG(-GoGkJ&f)l*+Qju*DiX_d3kH k!(lsNf& + + + + IBDocumentLocation + 19 23 561 249 0 0 1024 746 + IBFramework Version + 446.1 + IBOpenObjects + + 5 + + IBSystem Version + 8P2137 + + diff --git a/macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.nib/keyedobjects.nib b/macosx/plugins/DFXVideo/English.lproj/NetSfPeopsSoftGPUConfig.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..2125a2b3bac2bfc175364245dcb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J-P)^*km)>o{XtXr)+th=mlSl_hnx4vgRVExE? z*!rpUxb-vZY3o_*SJv~^OV;nKKUl9@f41JR{${;x{X;||BWgsQ7$}B_VPd2hBgTt* zFB2sahI76H%&KBp2^The$0`V#FY4KU{Iq`Y%1#!8!Qd}jj z5!Z + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + PeopsSoftGL + CFBundleIdentifier + net.sf.peops.SoftGpuGLPlugin + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + PSGl + CFBundleVersion + 1.16 + + diff --git a/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.nib/classes.nib b/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.nib/classes.nib new file mode 100644 index 00000000..78bbc4f7 --- /dev/null +++ b/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.nib/classes.nib @@ -0,0 +1,22 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + CLASS = NetSfPeopsSoftGPUPluginGLView; + LANGUAGE = ObjC; + SUPERCLASS = NSOpenGLView; + }, + { + CLASS = NetSfPeopsSoftGPUPluginWindow; + LANGUAGE = ObjC; + SUPERCLASS = NSWindow; + }, + { + CLASS = NetSfPeopsSoftGPUPluginWindowController; + LANGUAGE = ObjC; + OUTLETS = {glView = NSOpenGLView; }; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.nib/info.nib b/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.nib/info.nib new file mode 100644 index 00000000..f4ba2521 --- /dev/null +++ b/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 99 26 409 240 0 0 1024 746 + IBFramework Version + 364.0 + IBOpenObjects + + 5 + + IBSystem Version + 7S215 + + diff --git a/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.nib/keyedobjects.nib b/macosx/plugins/DFXVideo/NetSfPeopsSoftGPUInterface.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..fb88d8d3095ce0e405dcb51c5a7e32cf1eeec145 GIT binary patch literal 2247 zcmaJ>Yj_mZ8J;tj1EP>gxC9oE&ANg>44cg+Bv9Js(xlrYo4_QS3xUmS_9P5UcGj8M zWW&1kD3+qd8zQ9`CG4Vzw53+JXfGB~tffjdO%<$ttgX+}+mAkNfAq0WZTrp48tsqz zW9FRiobPbqjm`~^i~amm6(iHo)WW58gQmg&aijLaHaSXENG)keeTdL`)I)E0r#;lsxpkY=)g5;A^!D{{AK0-o zGAKufB4Tk!av)0Pgi6|F!|AoN)*uh1tNx5ld>;f*qz9Ef86{ie5+O(`)JV)J??_cZy+X z8C?(&m!#7*PAUrHv3ZiN9PARAo)>B;J> zMj`Q-%@j1CQ%MoES<^>llP;o*#S-eGOX$M?54NSv0tVD~BuLybBI2TSIsoK3H2N$W zeVNSk0oPr3+nTVG)SCb{nly<)OX;%dgRXn-1xOXvd(_4-%v|`E!pG31z}fu|>@q^0(QTCG<(#(J=TSm#^nT%0n5i8&OJP7trtSp z>$*Gv71*NXZF ztw5_$9cn?{Xb_De6YWO_(B0@Dx)8nnGE05}ihQbPhd-euw^m z{)+yE{=+U{OWAeo26hv>ncc!Ru+6N*_OUzJC>vvk* + +@interface PluginConfigController : NSWindowController +{ + IBOutlet NSControl *autoFullScreen; + IBOutlet NSPopUpButton *ditherMode; + IBOutlet NSControl *fpsCounter; + IBOutlet NSControl *frameSkipping; + IBOutlet NSControl *hackEnable; + IBOutlet NSView *hacksView; + IBOutlet NSControl *vSync; + + NSMutableDictionary *keyValues; +} +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; +- (IBAction)reset:(id)sender; +- (IBAction)hackToggle:(id)sender; + +- (void)loadValues; + +@end diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m new file mode 100644 index 00000000..2d3e667e --- /dev/null +++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m @@ -0,0 +1,216 @@ +#import "PluginConfigController.h" +#include "gpu.h" +#include "cfg.h" +#include "menu.h" +#include "externals.h" + +#define APP_ID @"net.sf.peops.SoftGpuGLPlugin" +#define PrefsKey APP_ID @" Settings" + +static PluginConfigController *windowController; +char * pConfigFile=NULL; + +void AboutDlgProc() +{ + // Get parent application instance + NSApplication *app = [NSApplication sharedApplication]; + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (path) { + credits = [[[NSAttributedString alloc] initWithPath: path + documentAttributes:NULL] autorelease]; + } else { + credits = [[[NSAttributedString alloc] initWithString:@""] autorelease]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + NSSize size = NSMakeSize(64, 64); + [icon setSize:size]; + + [app orderFrontStandardAboutPanelWithOptions:[NSDictionary dictionaryWithObjectsAndKeys: + [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", + icon, @"ApplicationIcon", + [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", + [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], @"Version", + [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], @"Copyright", + credits, @"Credits", + nil]]; +} + + +void SoftDlgProc() +{ + NSWindow *window; + + if (windowController == nil) { + windowController = [[PluginConfigController alloc] initWithWindowNibName:@"NetSfPeopsSoftGPUConfig"]; + } + window = [windowController window]; + + /* load values */ + [windowController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; +} + +void ReadConfig(void) +{ + NSDictionary *keyValues; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: + [[NSMutableDictionary alloc] initWithObjectsAndKeys: + [NSNumber numberWithBool:NO], @"FPS Counter", + [NSNumber numberWithBool:NO], @"Auto Full Screen", + [NSNumber numberWithBool:NO], @"Frame Skipping", + [NSNumber numberWithBool:YES], @"Frame Limit", + [NSNumber numberWithBool:NO], @"VSync", + [NSNumber numberWithBool:NO], @"Enable Hacks", + [NSNumber numberWithInt:1], @"Dither Mode", + [NSNumber numberWithLong:0], @"Hacks", + nil], PrefsKey, + nil]]; + + keyValues = [defaults dictionaryForKey:PrefsKey]; + + iShowFPS = [[keyValues objectForKey:@"FPS Counter"] boolValue]; + iWindowMode = [[keyValues objectForKey:@"Auto Full Screen"] boolValue] ? 0 : 1; + UseFrameSkip = [[keyValues objectForKey:@"Frame Skipping"] boolValue]; + UseFrameLimit = [[keyValues objectForKey:@"Frame Limit"] boolValue]; + //??? = [[keyValues objectForKey:@"VSync"] boolValue]; + iUseFixes = [[keyValues objectForKey:@"Enable Hacks"] boolValue]; + + iUseDither = [[keyValues objectForKey:@"Dither Mode"] intValue]; + dwCfgFixes = [[keyValues objectForKey:@"Hacks"] longValue]; + + iResX = 640; + iResY = 480; + iUseNoStretchBlt = 1; + + fFrameRate = 60; + iFrameLimit = 2; + + if (iShowFPS) + ulKeybits|=KEY_SHOWFPS; + else + ulKeybits&=~KEY_SHOWFPS; + + // additional checks + if(!iColDepth) iColDepth=32; + if(iUseFixes) dwActFixes=dwCfgFixes; + else dwActFixes=0; + SetFixes(); + + if(iFrameLimit==2) SetAutoFrameCap(); + bSkipNextFrame = FALSE; + + szDispBuf[0]=0; + BuildDispMenu(0); +} + +@implementation PluginConfigController + +- (IBAction)cancel:(id)sender +{ + [self close]; +} + +- (IBAction)ok:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues]; + [writeDic setObject:[NSNumber numberWithInt:[fpsCounter intValue]] forKey:@"FPS Counter"]; + [writeDic setObject:[NSNumber numberWithInt:[autoFullScreen intValue]] forKey:@"Auto Full Screen"]; + [writeDic setObject:[NSNumber numberWithInt:[frameSkipping intValue]] forKey:@"Frame Skipping"]; + //[writeDic setObject:[NSNumber numberWithInt:[frameLimit intValue]] forKey:@"Frame Limit"]; + [writeDic setObject:[NSNumber numberWithInt:[vSync intValue]] forKey:@"VSync"]; + [writeDic setObject:[NSNumber numberWithInt:[hackEnable intValue]] forKey:@"Enable Hacks"]; + + [writeDic setObject:[NSNumber numberWithInt:[ditherMode indexOfSelectedItem]] forKey:@"Dither Mode"]; + + unsigned long hackValues = 0; + int i; + NSArray *views = [hacksView subviews]; + for (i=0; i<[views count]; i++) { + NSView *control = [views objectAtIndex:i]; + if ([control isKindOfClass:[NSButton class]]) { + hackValues |= [(NSControl *)control intValue] << ([control tag] - 1); + } + } + + [writeDic setObject:[NSNumber numberWithLong:hackValues] forKey:@"Hacks"]; + + // write to defaults + [defaults setObject:writeDic forKey:PrefsKey]; + [defaults synchronize]; + + // and set global values accordingly + ReadConfig(); + + [self close]; +} + +- (IBAction)reset:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults removeObjectForKey:PrefsKey]; + [self loadValues]; +} + +- (IBAction)hackToggle:(id)sender +{ + BOOL enable = [sender intValue] ? YES : NO; + int i; + NSArray *views = [hacksView subviews]; + + for (i=0; i<[views count]; i++) { + NSView *control = [views objectAtIndex:i]; + if ([control isKindOfClass:[NSButton class]]) { + [(NSControl *)control setEnabled:enable]; + } + } +} + +- (void)loadValues +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + ReadConfig(); + + /* load from preferences */ + [keyValues release]; + keyValues = [[defaults dictionaryForKey:PrefsKey] retain]; + + [fpsCounter setIntValue:[[keyValues objectForKey:@"FPS Counter"] intValue]]; + [autoFullScreen setIntValue:[[keyValues objectForKey:@"Auto Full Screen"] intValue]]; + [frameSkipping setIntValue:[[keyValues objectForKey:@"Frame Skipping"] intValue]]; + [vSync setIntValue:[[keyValues objectForKey:@"VSync"] intValue]]; + [hackEnable setIntValue:[[keyValues objectForKey:@"Enable Hacks"] intValue]]; + + [ditherMode selectItemAtIndex:[[keyValues objectForKey:@"Dither Mode"] intValue]]; + + unsigned long hackValues = [[keyValues objectForKey:@"Hacks"] longValue]; + + int i; + NSArray *views = [hacksView subviews]; + for (i=0; i<[views count]; i++) { + NSView *control = [views objectAtIndex:i]; + if ([control isKindOfClass:[NSButton class]]) { + [(NSControl *)control setIntValue:(hackValues >> ([control tag] - 1)) & 1]; + } + } + + [self hackToggle:hackEnable]; +} + +- (void)awakeFromNib +{ + hacksView = [[hacksView subviews] objectAtIndex:0]; +} + +@end diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.h b/macosx/plugins/DFXVideo/macsrc/PluginGLView.h new file mode 100644 index 00000000..fea3b89a --- /dev/null +++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.h @@ -0,0 +1,63 @@ +/*************************************************************************** + PluginGLView.h + PeopsSoftGPU + + Created by Gil Pedersen on Sun April 18 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define PluginGLView NetSfPeopsSoftGPUPluginGLView + +#import +#import +#include + +#define IMAGE_COUNT 2 + +@interface PluginGLView : NSOpenGLView +{ + GLubyte *image_base; + GLubyte *image[IMAGE_COUNT]; + + GLint buffers; + //GLint frame_rate; + + GLenum texture_hint; + GLboolean rect_texture; + GLboolean client_storage; + GLboolean texture_range; + + struct timeval cycle_time; + + NSLock *glLock; + BOOL noDisplay; + BOOL drawBG; + + int image_width; + int image_height; + int image_width2; + int image_height2; + int image_depth; + int image_type; + float image_tx; + float image_ty; + int whichImage; + int isFullscreen; +} + +- (void)renderScreen; +- (void)swapBuffer; +- (void)clearBuffer:(BOOL)display; +- (void)loadTextures: (GLboolean)first; + +@end diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m new file mode 100644 index 00000000..96b05ff4 --- /dev/null +++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m @@ -0,0 +1,692 @@ +/*************************************************************************** + PluginGLView.m + PeopsSoftGPU + + Created by Gil Pedersen on Sun April 18 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import +#import +#import +#import +#import +#import "PluginGLView.h" +#include "externals.h" +#undef BOOL +#include "gpu.h" +#include "swap.h" + +#include +extern time_t tStart; + +static int mylog2(int val) +{ + int i; + for (i=1; i<31; i++) + if (val <= (1 << i)) + return (1 << i); + + return -1; +} + +#if 0 +void BlitScreen16NS(unsigned char * surf,long x,long y) +{ + unsigned long lu; + unsigned short row,column; + unsigned short dx=PreviousPSXDisplay.Range.x1>>1; + unsigned short dy=PreviousPSXDisplay.DisplayMode.y; + unsigned short LineOffset,SurfOffset; + long lPitch=image_width<<1; + + if(PreviousPSXDisplay.Range.y0) // centering needed? + { + surf+=PreviousPSXDisplay.Range.y0*lPitch; + dy-=PreviousPSXDisplay.Range.y0; + } + + { + unsigned long * SRCPtr = (unsigned long *)(psxVuw + (y<<10) + x); + unsigned long * DSTPtr = ((unsigned long *)surf)+(PreviousPSXDisplay.Range.x0>>1); + + LineOffset = 512 - dx; + SurfOffset = (lPitch>>2) - dx; + + for(column=0;column>10)&0x1f001f); + } + SRCPtr += LineOffset; + DSTPtr += SurfOffset; + } + } +} +#endif + +@implementation PluginGLView + +//- (id)initWithFrame:(NSRect)frameRect +- (id) initWithCoder: (NSCoder *) coder +{ + const GLubyte * strExt; + + if ((self = [super initWithCoder:coder]) == nil) + return nil; + + glLock = [[NSLock alloc] init]; + if (nil == glLock) { + [self release]; + return nil; + } + + // Init pixel format attribs + NSOpenGLPixelFormatAttribute attrs[] = + { + NSOpenGLPFAAccelerated, + NSOpenGLPFANoRecovery, + NSOpenGLPFADoubleBuffer, + 0 + }; + + // Get pixel format from OpenGL + NSOpenGLPixelFormat* pixFmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs]; + if (!pixFmt) + { + NSLog(@"No Accelerated OpenGL pixel format found\n"); + + NSOpenGLPixelFormatAttribute attrs2[] = + { + NSOpenGLPFANoRecovery, + 0 + }; + + // Get pixel format from OpenGL + pixFmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs2]; + if (!pixFmt) { + NSLog(@"No OpenGL pixel format found!\n"); + + [self release]; + return nil; + } + } + + [self setPixelFormat:[pixFmt autorelease]]; + + /* + long swapInterval = 1 ; + [[self openGLContext] + setValues:&swapInterval + forParameter:NSOpenGLCPSwapInterval]; + */ + [glLock lock]; + [[self openGLContext] makeCurrentContext]; + + // Init object members + strExt = glGetString (GL_EXTENSIONS); + texture_range = gluCheckExtension ((const unsigned char *)"GL_APPLE_texture_range", strExt) ? GL_TRUE : GL_FALSE; + texture_hint = GL_STORAGE_SHARED_APPLE ; + client_storage = gluCheckExtension ((const unsigned char *)"GL_APPLE_client_storage", strExt) ? GL_TRUE : GL_FALSE; + rect_texture = gluCheckExtension((const unsigned char *)"GL_EXT_texture_rectangle", strExt) ? GL_TRUE : GL_FALSE; + + // Setup some basic OpenGL stuff + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + + [NSOpenGLContext clearCurrentContext]; + [glLock unlock]; + + image_width = 1024; + image_height = 512; + image_depth = 16; + + image_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; + image_base = (GLubyte *) calloc(((IMAGE_COUNT * image_width * image_height) / 3) * 4, image_depth >> 3); + if (image_base == nil) { + [self release]; + return nil; + } + + // Create and load textures for the first time + [self loadTextures:GL_TRUE]; + + // Init fps timer + //gettimeofday(&cycle_time, NULL); + + drawBG = YES; + + // Call for a redisplay + noDisplay = YES; + PSXDisplay.Disabled = 1; + [self setNeedsDisplay:true]; + + return self; +} + +- (void)dealloc +{ + int i; + + [glLock lock]; + + [[self openGLContext] makeCurrentContext]; + for(i = 0; i < IMAGE_COUNT; i++) + { + GLuint dt = i+1; + glDeleteTextures(1, &dt); + } + if(texture_range) glTextureRangeAPPLE(GL_TEXTURE_RECTANGLE_EXT, IMAGE_COUNT * image_width * image_height * (image_depth >> 3), image_base); + + [NSOpenGLContext clearCurrentContext]; + [glLock unlock]; + [glLock release]; + + if (image_base) + free(image_base); + + [super dealloc]; +} + +- (BOOL)isOpaque +{ + return YES; +} + +- (BOOL)acceptsFirstResponder +{ + return NO; +} + +- (void)drawRect:(NSRect)aRect +{ + // Check if an update has occured to the buffer + if ([self lockFocusIfCanDraw]) { + + // Make this context current + if (drawBG) { + [[NSColor blackColor] setFill]; + [NSBezierPath fillRect:[self visibleRect]]; + } + + //glFinish() ; + // Swap buffer to screen + //[[self openGLContext] flushBuffer]; + + [self unlockFocus]; + } +} + +#if 0 +- (void)update // moved or resized +{ + NSRect rect; + + [super update]; + + [[self openGLContext] makeCurrentContext]; + [[self openGLContext] update]; + + rect = [self bounds]; + + glViewport(0, 0, (int) rect.size.width, (int) rect.size.height); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + //[self setNeedsDisplay:true]; +} +#endif + +- (void)reshape // scrolled, moved or resized +{ + [glLock lock]; + + NSOpenGLContext *oglContext = [self openGLContext]; + NSRect rect; + + [super reshape]; + + [oglContext makeCurrentContext]; + [oglContext update]; + + rect = [[oglContext view] bounds]; + + glViewport(0, 0, (int) rect.size.width, (int) rect.size.height); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + drawBG = YES; + + [NSOpenGLContext clearCurrentContext]; + +// [self setNeedsDisplay:true]; + + [self renderScreen]; + [glLock unlock]; +} + +- (void)renderScreen +{ + int bufferIndex = whichImage; + + if (1/*[glLock tryLock]*/) { + // Make this context current + [[self openGLContext] makeCurrentContext]; + if (PSXDisplay.Disabled) { + glClear(GL_COLOR_BUFFER_BIT); + } else { + // Bind, update and draw new image + if(rect_texture) + { + glBindTexture(GL_TEXTURE_RECTANGLE_EXT, bufferIndex+1); + + glTexSubImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, 0, 0, image_width, image_height, GL_BGRA, image_type, image[bufferIndex]); + glBegin(GL_QUADS); + glTexCoord2f(0.0f, 0.0f); + glVertex2f(-1.0f, 1.0f); + + glTexCoord2f(0.0f, image_height); + glVertex2f(-1.0f, -1.0f); + + glTexCoord2f(image_width, image_height); + glVertex2f(1.0f, -1.0f); + + glTexCoord2f(image_width, 0.0f); + glVertex2f(1.0f, 1.0f); + glEnd(); + } + else + { + glBindTexture(GL_TEXTURE_2D, whichImage+1); + + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, image_width2, image_height2, GL_BGRA, image_type, image[bufferIndex]); + glBegin(GL_QUADS); + glTexCoord2f(0.0f, 0.0f); + glVertex2f(-1.0f, 1.0f); + + glTexCoord2f(0.0f, image_ty); + glVertex2f(-1.0f, -1.0f); + + glTexCoord2f(image_tx, image_ty); + glVertex2f(1.0f, -1.0f); + + glTexCoord2f(image_tx, 0.0f); + glVertex2f(1.0f, 1.0f); + glEnd(); + } + } + + // FPS Display + if(ulKeybits&KEY_SHOWFPS) + { + int len, i; + if(szDebugText[0] && ((time(NULL) - tStart) < 2)) + { + strncpy(szDispBuf, szDebugText, 63); + } + else + { + szDebugText[0]=0; + if (szMenuBuf) { + strncat(szDispBuf, szMenuBuf, 63 - strlen(szDispBuf)); + } + } + + NSRect rect = [[[self openGLContext] view] bounds]; + len = (int) strlen(szDispBuf); + + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + + gluOrtho2D(0.0, rect.size.width, 0.0, rect.size.height); + glDisable(rect_texture ? GL_TEXTURE_RECTANGLE_EXT : GL_TEXTURE_2D); + + glColor4f(0.0, 0.0, 0.0, 0.5); + glRasterPos2f(3.0, rect.size.height - 14.0); + for (i = 0; i < len; i++) { + glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, szDispBuf[i]); + } + + glColor3f(1.0, 1.0, 1.0); + glRasterPos2f(2.0, rect.size.height - 13.0); + for (i = 0; i < len; i++) { + glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, szDispBuf[i]); + } + + + glEnable(rect_texture ? GL_TEXTURE_RECTANGLE_EXT : GL_TEXTURE_2D); + glPopMatrix(); + } + + [[self openGLContext] flushBuffer]; + [NSOpenGLContext clearCurrentContext]; + //[glLock unlock]; + } +} + +- (void)loadTextures:(GLboolean)first +{ + GLint i; + + //[glLock lock]; + [[self openGLContext] makeCurrentContext]; + + /* + printf("Range.x0=%i\n" + "Range.x1=%i\n" + "Range.y0=%i\n" + "Range.y1=%i\n", + PreviousPSXDisplay.Range.x0, + PreviousPSXDisplay.Range.x1, + PreviousPSXDisplay.Range.y0, + PreviousPSXDisplay.Range.y1); + + printf("DisplayMode.x=%d\n" + "DisplayMode.y=%d\n", + PreviousPSXDisplay.DisplayMode.x, + PreviousPSXDisplay.DisplayMode.y); + + printf("DisplayPosition.x=%i\n" + "DisplayPosition.y=%i\n", + PreviousPSXDisplay.DisplayPosition.x, + PreviousPSXDisplay.DisplayPosition.y); + + printf("DisplayEnd.x=%i\n" + "DisplayEnd.y=%i\n", + PreviousPSXDisplay.DisplayEnd.x, + PreviousPSXDisplay.DisplayEnd.y); + + printf("Double=%i\n" + "Height=%i\n", + PreviousPSXDisplay.Double, + PreviousPSXDisplay.Height); + + printf("Disabled=%i\n", PreviousPSXDisplay.Disabled); + */ + + image_width = PreviousPSXDisplay.Range.x1; + image_height = PreviousPSXDisplay.DisplayMode.y; + if (PSXDisplay.RGB24) { + image_depth = 32; + image_type = GL_UNSIGNED_INT_8_8_8_8_REV; + } else { + image_depth = 16; + image_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; + //image_width >>= 1; + } + + if (image_width * image_height * (image_depth >> 3) > ((1024*512*2)/3)*4) + printf("Fatal error: desired dimension are too large! (%ix%i %ibpp)\n", + image_width, image_height, image_depth); + + for(i = 0; i < IMAGE_COUNT; i++) + image[i] = image_base + i * image_width * image_height * (image_depth >> 3); + + if(rect_texture) + { + image_width2 = image_width; + image_height2 = image_height; + image_tx = (float)image_width; + image_ty = (float)image_height; + + if(texture_range) glTextureRangeAPPLE(GL_TEXTURE_RECTANGLE_EXT, IMAGE_COUNT * image_width * image_height * (image_depth >> 3), image_base); + else glTextureRangeAPPLE(GL_TEXTURE_RECTANGLE_EXT, 0, NULL); + + for(i = 0; i < IMAGE_COUNT; i++) + { + if(!first) + { + GLuint dt = i+1; + glDeleteTextures(1, &dt); + } + + glDisable(GL_TEXTURE_2D); + glEnable(GL_TEXTURE_RECTANGLE_EXT); + glBindTexture(GL_TEXTURE_RECTANGLE_EXT, i+1); + + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_STORAGE_HINT_APPLE , texture_hint); + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, client_storage); + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + + glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_RGBA, image_width, + image_height, 0, GL_BGRA, image_type, image[i]); + } + } + else + { + image_width2 = mylog2(image_width); + image_height2 = mylog2(image_height); + image_tx = (float)image_width/(float)image_width2; + image_ty = (float)image_height/(float)image_height2; + + glTextureRangeAPPLE(GL_TEXTURE_RECTANGLE_EXT, 0, NULL); + if(texture_range) glTextureRangeAPPLE(GL_TEXTURE_2D, IMAGE_COUNT * image_width2 * image_height2 * (image_depth >> 3), image_base); + else glTextureRangeAPPLE(GL_TEXTURE_2D, 0, NULL); + + for(i = 0; i < IMAGE_COUNT; i++) + { + if(!first) + { + GLuint dt = i+1; + glDeleteTextures(1, &dt); + } + + glDisable(GL_TEXTURE_RECTANGLE_EXT); + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, i+1); + + //if(texture_range) glTextureRangeAPPLE(GL_TEXTURE_2D, IMAGE_COUNT * image_width2 * image_height2 * (image_depth >> 3), image_base); + //else glTextureRangeAPPLE(GL_TEXTURE_2D, 0, NULL); + + glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_STORAGE_HINT_APPLE , texture_hint); + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, client_storage); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image_width2, + image_height2, 0, GL_BGRA, image_type, image[i]); + } + } + + [NSOpenGLContext clearCurrentContext]; + //[glLock unlock]; +} + +- (void)swapBuffer +{ + unsigned char * surf; + long x = PSXDisplay.DisplayPosition.x; + long y = PSXDisplay.DisplayPosition.y; + unsigned long lu; + unsigned short row,column; + unsigned short dx=(unsigned short)PSXDisplay.DisplayEnd.x;//PreviousPSXDisplay.Range.x1; + unsigned short dy=(unsigned short)PSXDisplay.DisplayEnd.y;//PreviousPSXDisplay.DisplayMode.y; + long lPitch; + + //printf("y=%i",PSXDisplay.DisplayPosition.y); + + if ([glLock tryLock]) { + // make sure the texture area is ready to be written to + glFinishObjectAPPLE(GL_TEXTURE, 2-whichImage); + + if ((image_width != PreviousPSXDisplay.Range.x1) || + (image_height != PreviousPSXDisplay.DisplayMode.y) || + ((PSXDisplay.RGB24 ? 32 : 16) != image_depth)) { + [self loadTextures:NO]; + } + + surf = image[1-whichImage]; + lPitch=image_width2<<(image_depth >> 4); + + if(PreviousPSXDisplay.Range.y0) // centering needed? + { + surf+=PreviousPSXDisplay.Range.y0*lPitch; + dy-=PreviousPSXDisplay.Range.y0; + } + + if(PSXDisplay.RGB24) + { + unsigned char * pD;unsigned int startxy; + + surf+=PreviousPSXDisplay.Range.x0<<2; + + for(column=0;column>24)&0xff)<<16)|(((lu1>>16)&0xff)<<8)|(((lu1>>8)&0xff)); + *(dst+1)= + (((lu1>>0)&0xff)<<16)|(((lu2>>24)&0xff)<<8)|(((lu2>>16)&0xff)); + *(dst+2)= + (((lu2>>8)&0xff)<<16)|(((lu2>>0)&0xff)<<8)|(((lu3>>24)&0xff)); + *(dst+3)= + (((lu3>>16)&0xff)<<16)|(((lu3>>8)&0xff)<<8)|(((lu3>>0)&0xff)); +#else + *(dst)= + (((lu1>>0)&0xff)<<16)|(((lu1>>8)&0xff)<<8)|(((lu1>>16)&0xff)); + *(dst+1)= + (((lu1>>24)&0xff)<<16)|(((lu2>>0)&0xff)<<8)|(((lu2>>8)&0xff)); + *(dst+2)= + (((lu2>>16)&0xff)<<16)|(((lu2>>24)&0xff)<<8)|(((lu3>>0)&0xff)); + *(dst+3)= + (((lu3>>8)&0xff)<<16)|(((lu3>>16)&0xff)<<8)|(((lu3>>24)&0xff)); +#endif + pD+=12; + } + + //for(;row> 1); + + dx >>= 1; + + LineOffset = 512 - dx; + SurfOffset = (lPitch >> 2) - dx; + + for(column=0;column> 10) & 0x1f001f); + } + SRCPtr += LineOffset; + DSTPtr += SurfOffset; + } + } + + // Swap image buffer + whichImage = 1 - whichImage; + + [self renderScreen]; + [glLock unlock]; + } +} + +- (void)clearBuffer:(BOOL)display +{ + if (display == NO) { + //[[self openGLContext] makeCurrentContext]; + //glClear(GL_COLOR_BUFFER_BIT); + //[self loadTextures:NO]; + } else { + noDisplay = YES; +// [self setNeedsDisplay:true]; + } +} +/* +- (void)mouseDown:(NSEvent *)theEvent +{ + PluginWindowController *controller = [[self window] windowController]; + + static unsigned long lastTime = 0; + unsigned long time; + + time = TickCount(); + + if (lastTime != 0) { + if (time - lastTime > GetDblTime()) { + if (isFullscreen) { + [[self openGLContext] clearDrawable]; + } else { + [[self openGLContext] setFullScreen]; + } + isFullscreen = 1-isFullscreen; + lastTime = 0; + return; + } + } + + lastTime = time; +}*/ + +@end diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindow.h b/macosx/plugins/DFXVideo/macsrc/PluginWindow.h new file mode 100644 index 00000000..38a8dfa1 --- /dev/null +++ b/macosx/plugins/DFXVideo/macsrc/PluginWindow.h @@ -0,0 +1,24 @@ +/*************************************************************************** + PluginWindow.h + PeopsSoftGPU + + Created by Gil Pedersen on Wed April 21 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import + +@interface NetSfPeopsSoftGPUPluginWindow : NSWindow +{ +} +@end diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindow.m b/macosx/plugins/DFXVideo/macsrc/PluginWindow.m new file mode 100644 index 00000000..ef4737f1 --- /dev/null +++ b/macosx/plugins/DFXVideo/macsrc/PluginWindow.m @@ -0,0 +1,46 @@ +/*************************************************************************** + PluginWindow.m + PeopsSoftGPU + + Created by Gil Pedersen on Wed April 21 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import "PluginWindow.h" + +@implementation NetSfPeopsSoftGPUPluginWindow +/* +- (BOOL)windowShouldClose:(id)sender +{ + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowDidClose" object:self]; + + return YES; +}*/ + +- (void)sendEvent:(NSEvent *)theEvent +{ + int type = [theEvent type]; + if (type == NSKeyDown || type == NSKeyUp) { + if (type == NSKeyDown && [theEvent keyCode] == 53 /* escape */) { + // reroute to menu event + [[NSApp mainMenu] performKeyEquivalent:theEvent]; + } + + // ignore all key Events + return; + } + + [super sendEvent:theEvent]; +} + +@end diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h new file mode 100644 index 00000000..ff9af258 --- /dev/null +++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.h @@ -0,0 +1,41 @@ +/*************************************************************************** + PluginWindowController.h + PeopsSoftGPU + + Created by Gil Pedersen on Mon April 11 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define PluginWindowController NetSfPeopsSoftGPUPluginWindowController + +#import +#import "PluginGLView.h" + +@class PluginWindowController; + +extern NSWindow *gameWindow; +extern PluginWindowController *gameController; + +@interface PluginWindowController : NSWindowController +{ + IBOutlet NSOpenGLView *glView; + + NSWindow *fullWindow; +} + ++ (id)openGameView; +- (PluginGLView *)getOpenGLView; +- (BOOL)fullscreen; +- (void)setFullscreen:(BOOL)flag; + +@end diff --git a/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m new file mode 100644 index 00000000..48262e56 --- /dev/null +++ b/macosx/plugins/DFXVideo/macsrc/PluginWindowController.m @@ -0,0 +1,227 @@ +/*************************************************************************** + PluginWindowController.m + PeopsSoftGPU + + Created by Gil Pedersen on Tue April 12 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import "PluginWindowController.h" +#import "PluginWindow.h" +#import "Carbon/Carbon.h" +#include "externals.h" +#undef BOOL + +NSWindow *gameWindow; +PluginWindowController *gameController; +NSRect windowFrame; + +@implementation PluginWindowController + ++ (id)openGameView +{ + if (gameWindow == nil) { + if (gameController == nil) { + gameController = [[PluginWindowController alloc] initWithWindowNibName:@"NetSfPeopsSoftGPUInterface"]; + } + gameWindow = [gameController window]; + } + + if (windowFrame.size.width != 0) { + [gameWindow setFrame:windowFrame display:NO]; + } else { + [gameWindow center]; + } + + [gameWindow makeKeyAndOrderFront:nil]; + [gameController showWindow:nil]; + + CGDirectDisplayID display = (CGDirectDisplayID)[[[[gameWindow screen] deviceDescription] objectForKey:@"NSScreenNumber"] longValue]; + if (CGDisplayIsCaptured(display)) { + [gameController setFullscreen:YES]; + } + + return gameController; +} + +- (PluginGLView *)getOpenGLView +{ + return (PluginGLView *)glView; +} + +- (void)dealloc +{ + if (fullWindow) { + [fullWindow orderOut:self]; + [fullWindow autorelease]; + fullWindow = nil; + } + + windowFrame = [[self window] frame]; + + [super dealloc]; +} + +// forget keyDownEvents +- (void)keyDown:(NSEvent *)theEvent +{ + // Not required any more +} + +- (void)mouseDown:(NSEvent *)theEvent +{ + if ([self fullscreen]) { + [self setFullscreen:NO]; + } +} + +- (BOOL)fullscreen +{ + return (fullWindow!=nil); +} + +- (void)setFullscreen:(BOOL)flag +{ + NSWindow *window = [self window]; + NSScreen *screen = [window screen]; + CGDirectDisplayID display = (CGDirectDisplayID)[[[screen deviceDescription] objectForKey:@"NSScreenNumber"] longValue]; + + NSDisableScreenUpdates(); + + if (flag) { + if (!CGDisplayIsCaptured(display)) { + CGDisplayCapture(display); + + CGDisplayCount count = 10; + CGDirectDisplayID displays[10]; + CGGetActiveDisplayList(10, displays, &count); + if (count == 1) { + CGDisplayHideCursor(display); + CGAssociateMouseAndMouseCursorPosition(NO); + } + + //[window orderOut:self]; + } + + int width = CGDisplayPixelsWide(display); + int height = CGDisplayPixelsHigh(display); + + // assume square pixel ratio on the monitor + if ((width*3)/4 < height) { + height = (width*3)/4; + } else { + width = (height*4)/3; + } + + fullWindow = [[NSWindow alloc] initWithContentRect:NSMakeRect((CGDisplayPixelsWide(display)-width)/2, + (CGDisplayPixelsHigh(display)-height)/2, + width, height) + styleMask:NSBorderlessWindowMask + backing:NSBackingStoreRetained + defer:NO + screen:screen]; + + //[[glView openGLContext] setFullScreen]; + [[glView openGLContext] setView:[fullWindow contentView]]; + [glView reshape]; + //[[glView openGLContext] update]; + //[fullWindow setContentView:glView]; + + [fullWindow setBackgroundColor:[NSColor blackColor]]; + [fullWindow setHasShadow:NO]; + [fullWindow setDelegate:self]; + + [fullWindow setLevel:CGShieldingWindowLevel()]; + [fullWindow makeKeyAndOrderFront:self]; + + [[self window] makeKeyAndOrderFront:self]; + } else { + CGDisplayRelease(display); + //CGReleaseAllDisplays(); + + CGAssociateMouseAndMouseCursorPosition(YES); + CGDisplayShowCursor(display); + + if (fullWindow) { + [fullWindow orderOut:self]; + [fullWindow autorelease]; + fullWindow = nil; + + [[glView openGLContext] setView:glView]; + [glView reshape]; + //[window setContentView:glView]; + } + + [[self window] makeKeyAndOrderFront:self]; + } + + NSEnableScreenUpdates(); +} + +- (BOOL)windowShouldZoom:(NSWindow *)sender toFrame:(NSRect)newFrame +{ + [self setFullscreen:YES]; + + return NO; +} + +- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)proposedFrameSize +{ + if (!(([sender resizeFlags] & NSShiftKeyMask) == NSShiftKeyMask)) { + NSRect oldSize = [sender frame]; + NSRect viewSize = [glView frame]; + + float xDiff = NSWidth(oldSize) - NSWidth(viewSize); + float yDiff = NSHeight(oldSize) - NSHeight(viewSize); + + //if ((proposedFrameSize.height / proposedFrameSize.width) < (3.0/4.0)) + // proposedFrameSize.height = ((proposedFrameSize.width - xDiff) * 3.0) / 4.0 + yDiff; + //else + proposedFrameSize.width = ((proposedFrameSize.height - yDiff) * 4.0) / 3.0 + xDiff; + } + + return proposedFrameSize; +} + +- (void)windowWillMiniaturize:(NSNotification *)aNotification +{ + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowWantPause" object:self]; +} + +- (void)windowDidDeminiaturize:(NSNotification *)aNotification +{ + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowWantResume" object:self]; +} + +//- (void)windowDidBecomeMain:(NSNotification *)aNotification +/*- (void)windowDidBecomeKey:(NSNotification *)aNotification +{ + if (iWindowMode==0) { + [self setFullscreen:YES]; + } +}*/ + +- (BOOL)windowShouldClose:(id)sender +{ + if (fullWindow) { + return NO; + } + [[NSNotificationCenter defaultCenter] postNotificationName:@"emuWindowDidClose" object:self]; + [gameController autorelease]; + gameController = nil; + gameWindow = nil; + + return YES; +} + +@end diff --git a/macosx/plugins/DFXVideo/macsrc/drawgl.m b/macosx/plugins/DFXVideo/macsrc/drawgl.m new file mode 100644 index 00000000..17e76477 --- /dev/null +++ b/macosx/plugins/DFXVideo/macsrc/drawgl.m @@ -0,0 +1,181 @@ +/*************************************************************************** + drawgl.m + PeopsSoftGPU + + Created by Gil Pedersen on Sun April 18 2004. + Copyright (c) 2004 Gil Pedersen. + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#import "PluginWindowController.h" +#import "PluginGLView.h" +#include "ExtendedKeys.h" +#include "externals.h" +#include "draw.h" +#include "gpu.h" +#include "menu.h" + +//////////////////////////////////////////////////////////////////////////////////// +// misc globals +//////////////////////////////////////////////////////////////////////////////////// + +int iResX; +int iResY; +long lLowerpart; +BOOL bIsFirstFrame = TRUE; +BOOL bCheckMask=FALSE; +unsigned short sSetMask=0; +unsigned long lSetMask=0; +int iDesktopCol=16; +int iShowFPS=0; +int iWinSize; +int iUseScanLines=0; +int iUseNoStretchBlt=0; +int iFastFwd=0; +int iDebugMode=0; +int iFVDisplay=0; +PSXPoint_t ptCursorPoint[8]; +unsigned short usCursorActive=0; +char * Xpixels; +char * pCaptionText; + +//static PluginWindowController *windowController; +static PluginGLView *glView; + +//////////////////////////////////////////////////////////////////////// + +void DoBufferSwap(void) // SWAP BUFFERS +{ +#if 1 + [glView swapBuffer]; +#else + static long long lastTickCount = -1; + static int skipCount = 0; + long long microTickCount; + long deltaTime; + + Microseconds((struct UnsignedWide *)µTickCount); + deltaTime = (long)(microTickCount - lastTickCount); + if (deltaTime <= (PSXDisplay.PAL ? 1000000/50 : 100000000 / 5994) || + skipCount >= 3) { + skipCount = 0; + [glView swapBuffer]; + } else { + skipCount++; + } + NSLog(@"count: %i", deltaTime); + lastTickCount = microTickCount; +#endif +} + + +//////////////////////////////////////////////////////////////////////// + +void DoClearScreenBuffer(void) // CLEAR DX BUFFER +{ + // clear the screen, and DON'T flush it + [glView clearBuffer:NO]; +} + + +//////////////////////////////////////////////////////////////////////// + +void DoClearFrontBuffer(void) // CLEAR DX BUFFER +{ + // clear the screen, and flush it + [glView clearBuffer:YES]; +} + +//////////////////////////////////////////////////////////////////////// + +unsigned long ulInitDisplay(void) // OPEN GAME WINDOW +{ + bUsingTWin=FALSE; + + InitMenu(); + + bIsFirstFrame = FALSE; + + if(iShowFPS) + { + //iShowFPS=0; + ulKeybits|=KEY_SHOWFPS; + szDispBuf[0]=0; + BuildDispMenu(0); + } + + PluginWindowController *windowController = [PluginWindowController openGameView]; + glView = [windowController getOpenGLView]; + + [[windowController window] setTitle:[NSString stringWithCString:pCaptionText]]; + + return (unsigned long)[windowController window]; +} + + +//////////////////////////////////////////////////////////////////////// + +void CloseDisplay(void) +{ + if (gameController) { + [gameController close]; + [gameController release]; + gameController = nil; + gameWindow = nil; + } +} + + +//////////////////////////////////////////////////////////////////////// + +void CreatePic(unsigned char * pMem) +{ +} + + +/////////////////////////////////////////////////////////////////////////////////////// + +void DestroyPic(void) +{ +} + + +/////////////////////////////////////////////////////////////////////////////////////// + +void DisplayPic(void) +{ +} + + +/////////////////////////////////////////////////////////////////////////////////////// + +void ShowGpuPic(void) +{ + // this is the default implementation... +} + +/////////////////////////////////////////////////////////////////////////////////////// + +void ShowTextGpuPic(void) +{ + // this is the default implementation... +} + + +void HandleKey(int keycode) +{ + switch (keycode) { + case GPU_FULLSCREEN_KEY: + [gameController setFullscreen:![gameController fullscreen]]; + break; + } +} diff --git a/missing b/missing new file mode 100755 index 00000000..1c8ff704 --- /dev/null +++ b/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 00000000..ef7e16fd --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,161 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy + +scriptversion=2006-05-11.19 + +# Original author: Noah Friedman +# Created: 1993-05-16 +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' +IFS=" "" $nl" +errstatus=0 +dirmode= + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit $? + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit $? + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. +case $dirmode in + '') + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version + fi + ;; + *) + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac + +for file +do + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file + shift + IFS=$oIFS + + for d + do + test "x$d" = x && continue + + pathcomp=$pathcomp$d + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr= + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp=$pathcomp/ + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/pcsx.anjuta b/pcsx.anjuta new file mode 100644 index 00000000..2389e4c1 --- /dev/null +++ b/pcsx.anjuta @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am new file mode 100644 index 00000000..ea6e2d2c --- /dev/null +++ b/pixmaps/Makefile.am @@ -0,0 +1,7 @@ +pixmapdir = "$(datadir)/pcsx" +pixmap_DATA = pcsx.jpg + +icondir = "$(datadir)/pixmaps" +icon_DATA = pcsx-icon.png + +EXTRA_DIST = pcsx.jpg pcsx-icon.png diff --git a/pixmaps/Makefile.in b/pixmaps/Makefile.in new file mode 100644 index 00000000..5e6b12d2 --- /dev/null +++ b/pixmaps/Makefile.in @@ -0,0 +1,424 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = pixmaps +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(icondir)" "$(DESTDIR)$(pixmapdir)" +iconDATA_INSTALL = $(INSTALL_DATA) +pixmapDATA_INSTALL = $(INSTALL_DATA) +DATA = $(icon_DATA) $(pixmap_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +pixmapdir = "$(datadir)/pcsx" +pixmap_DATA = pcsx.jpg +icondir = "$(datadir)/pixmaps" +icon_DATA = pcsx-icon.png +EXTRA_DIST = pcsx.jpg pcsx-icon.png +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu pixmaps/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-iconDATA: $(icon_DATA) + @$(NORMAL_INSTALL) + test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" + @list='$(icon_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(iconDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(icondir)/$$f'"; \ + $(iconDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(icondir)/$$f"; \ + done + +uninstall-iconDATA: + @$(NORMAL_UNINSTALL) + @list='$(icon_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(icondir)/$$f'"; \ + rm -f "$(DESTDIR)$(icondir)/$$f"; \ + done +install-pixmapDATA: $(pixmap_DATA) + @$(NORMAL_INSTALL) + test -z "$(pixmapdir)" || $(MKDIR_P) "$(DESTDIR)$(pixmapdir)" + @list='$(pixmap_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pixmapDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pixmapdir)/$$f'"; \ + $(pixmapDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pixmapdir)/$$f"; \ + done + +uninstall-pixmapDATA: + @$(NORMAL_UNINSTALL) + @list='$(pixmap_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pixmapdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pixmapdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(icondir)" "$(DESTDIR)$(pixmapdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-iconDATA install-pixmapDATA + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-iconDATA uninstall-pixmapDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-iconDATA install-info install-info-am install-man \ + install-pdf install-pdf-am install-pixmapDATA install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am uninstall-iconDATA \ + uninstall-pixmapDATA + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/pixmaps/pcsx-icon.png b/pixmaps/pcsx-icon.png new file mode 100755 index 0000000000000000000000000000000000000000..7a0c0ed72f6d6896ee02cac160b14c4449aa6b4c GIT binary patch literal 15923 zcmW-obyU<}6ULWx!6ihbM7q1XQ@XpmLj`+o-Lq5zaI;Lt8w|{}2&f z+_@i?o;EkwuQcy1e;?z&Th{se<;QZDF;QS+?sbGxKjV?(#nHNF9nFP@P01V7<-83G zcw5?Ylo!3H9Xw83+ge10+&N~+=Al555Qan?Dp7z$go;m1Q7k8P{qTWPI+;q{lmk}`X&3? zFfA$5J$FOHPV>m>YGw&Z$)O!5FtMe*eTA2OJO-;_X?*YXwe#9Td+(9IW@QkMTOlv5 zA!YJl48l+0db_3mjMeKRXvWk5NwEU9QX;-$Zo7aG9TqYAxf-(sM@Aj42#X|1TnRK5 z9X4nD9eEuLpHz_dg*0bxp-;a}A?jaA!AB(!9v)uN-tMmP%F4>|a?><*w;ffuNVO#k z7Y+=j?DQ{1s#y7PMXHexs5bDhh{17rrPR_YD*qCge=U9`!;n=_VCCTGzrS}=699Fr zp_!S-1{Xj3PU3BfOc{*3RN)Fuv%#D{jQh5`n)i`B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-|G0u=1eh;%w3gRK1=&6)GDbI`U#iI!*EJeR2vi-Xje)CsT zAR593qzJf#%q<6#k}E3r_L|4WU9x`qy!|Kv*LbyU+zf-TKLnLhE5E$_iY6d;Uk6F_ zY48pJQ#6*Nc)_#3jbxSXPk(g0hlZQGAL!5BI}Cv&C`>-IcH}tw`l>PJ*jO4G???xG zdZg+$VesSE3zBdvKPF}tSyftX*;n5?^ngl%F;sGXeW`O}ra@B;>;zg3mKs<3g(8ZK zbsshI{rlgxq6_!O?f=fsrPq^;{3vt&1nU$l=w!EV4Gd>@$iPcEE=xSF zMUs-XJHvL}ynP-IDl9W0S1Qhzi~IXjYrwROjnDI>`>k}@v)&`o zHH|(((q*$MOxlJ~4JqlbXhKS0!-Hxq$}Y*4mT-02Gpo&paSYn=`7xb7Olb&P=8RkT zcD;uRN+9fvVlOQ%J-n>Fc}L@OcP~uUwz=;9cHz3a`bI`yPyLrmVyFPNlB?JE@3FkeNEs{60KdFK#M7o1ex;e61&F_GldjQ2yxFw)l1lC zMp)02^8=R`U_=t3CxxW74bc{ns)@mq5)^~8EE6y?j}x?@RkOAA3lVWJGTPW}q!XdJ zjAN%~TuHTK&QMFxyI-y1zP>I(K*v80@rn$lX?O$M6Io z&BMEC0@MO2J>NJxzmbJnoIa9+4WrB2T1;~bsVp9~vS=wfxPzgorb_4Xr=qW>8gy7K ztXhxZLn4}?hI>wSAK>-Q_1&YzNW3*|?ijcey-(j-s$Abos$d#-5#8jW`zsDUnjVng z60!56K&6Q@3S)~$P5zpTgWRpR+Ka%XkNX;Zs}Cj zV69%8b7pQXh2F7;C_z5w==;Y+BzjM`wI-}f8N^0MH)cOE&MK67?Z=gfo0+P<+)8J8 zP%+gZVZi?YP|!;5 literal 0 HcmV?d00001 diff --git a/pixmaps/pcsx.jpg b/pixmaps/pcsx.jpg new file mode 100755 index 0000000000000000000000000000000000000000..7aa535ba185d7984922544de5b79245dc2459b1b GIT binary patch literal 46736 zcmbq)V{j&4(C-sF8*5|Rww;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garxGN=`A0W)_+el$9mcNm1F7sUAupOZ-Mt$G8^1q2RU1UkTrRh z>7?bjt0UtaVcqjqmKvPEx9YV?AB4^Nrs-e z2Vw^gk?Su$;2!h+I*C&wAZLeMc z^L_)$dUwh;IA=4)E+;3$Fh!}BV<>r8jVK4#nx8!ErePg6mShD~QZoSEl!i%cY2W3^)Ai%kdLIiZR?KVi) z@gc`~29tX`*5_M$8U^*A)z^gdw4F3kqk^{cyoAj%SfwdXP{qBxl&yRAtVA)HY0L?c z(_RIK(=2eerO0_ybl0oA{{VTbSO|u6covSo2;w|_8rtz?^0?09jEK?3wy*z7SlBu(ib$)U`glajfaJv z*@lKf3uR>^Lb1L}(LBtwlg-aswt%F9izc-MxCA;l_)k?h-!R@=j%25}2Hg&u115sV z1zN^lMuy8CaxJ9cV%JwR^b}MUi=M%y>>=9b8yU4d%J65p+2V~n9wEBHu{T;%ML1>M-EMk2cLsmaJ!lB?&;CQyg?zz?WMSW2EMkzwvoWxTUD0a0~=zpv}CD6 z`7^+6c~4Y%*8$@jTx5Kgm1prIKeLd>7{cV4;K9AMx4O-QdfO3hA&Z(t<;;dkX$VrA zfgIwh6bn3f90`ni@!mwvS4zA{@WLaG9MkYc_Mtf999K7Nx)kvRfyRc(_S@+99^X0` zAXTUeyZA3`;H;n@^?% z#2^ZhQHXREVzH7L-X^+-#u1FJJJepNag2d5;|t>PZd0qraMCNyo##GZi;K0Nlz@)e z&U*nQ*8~u^wFO@D9~j@%zFAIc*mR72XLN|>quRO~C5BzldsM(V++n*i(+#x2#&fpA rB$AlL^)F&x_n(F^8R*aT{{W19d*NEbr+NB*v-(Hz{?CtmF`xh0_dSNb literal 0 HcmV?d00001 diff --git a/plugins/dfcdrom/Makefile.am b/plugins/dfcdrom/Makefile.am new file mode 100644 index 00000000..6edf16bc --- /dev/null +++ b/plugins/dfcdrom/Makefile.am @@ -0,0 +1,35 @@ +bindir = @libdir@/games/psemu/ +libdir = @libdir@/games/psemu/ + +lib_LTLIBRARIES = libDFCdrom.la + +libDFCdrom_la_SOURCES = \ + cdr.c \ + cdr.h \ + cfg.c \ + cdr-linux.c \ + cdr-null.c \ + cdr-libcdio.c \ + util.c + +libDFCdrom_la_CFLAGS = +libDFCdrom_la_LDFLAGS = -module -avoid-version -lpthread + +if USE_LIBCDIO +libDFCdrom_la_CFLAGS += -DUSE_LIBCDIO=1 $(LIBCDIO_CFLAGS) +libDFCdrom_la_LDFLAGS += $(LIBCDIO_LIBS) +endif + +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) \ + -I../../libpcsxcore -I../../include + +bin_PROGRAMS = cfgDFCdrom +cfgDFCdrom_SOURCES = cdrcfg-0.1df/main.c +cfgDFCdrom_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) + +glade_DATA = cdrcfg-0.1df/dfcdrom.glade2 +gladedir = $(datadir)/psemu/ +EXTRA_DIST = $(glade_DATA) diff --git a/plugins/dfcdrom/Makefile.in b/plugins/dfcdrom/Makefile.in new file mode 100644 index 00000000..36544817 --- /dev/null +++ b/plugins/dfcdrom/Makefile.in @@ -0,0 +1,665 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@USE_LIBCDIO_TRUE@am__append_1 = -DUSE_LIBCDIO=1 $(LIBCDIO_CFLAGS) +@USE_LIBCDIO_TRUE@am__append_2 = $(LIBCDIO_LIBS) +bin_PROGRAMS = cfgDFCdrom$(EXEEXT) +subdir = plugins/dfcdrom +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(gladedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libDFCdrom_la_LIBADD = +am_libDFCdrom_la_OBJECTS = libDFCdrom_la-cdr.lo libDFCdrom_la-cfg.lo \ + libDFCdrom_la-cdr-linux.lo libDFCdrom_la-cdr-null.lo \ + libDFCdrom_la-cdr-libcdio.lo libDFCdrom_la-util.lo +libDFCdrom_la_OBJECTS = $(am_libDFCdrom_la_OBJECTS) +libDFCdrom_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libDFCdrom_la_CFLAGS) \ + $(CFLAGS) $(libDFCdrom_la_LDFLAGS) $(LDFLAGS) -o $@ +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_cfgDFCdrom_OBJECTS = main.$(OBJEXT) +cfgDFCdrom_OBJECTS = $(am_cfgDFCdrom_OBJECTS) +am__DEPENDENCIES_1 = +cfgDFCdrom_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libDFCdrom_la_SOURCES) $(cfgDFCdrom_SOURCES) +DIST_SOURCES = $(libDFCdrom_la_SOURCES) $(cfgDFCdrom_SOURCES) +gladeDATA_INSTALL = $(INSTALL_DATA) +DATA = $(glade_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @libdir@/games/psemu/ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@/games/psemu/ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +lib_LTLIBRARIES = libDFCdrom.la +libDFCdrom_la_SOURCES = \ + cdr.c \ + cdr.h \ + cfg.c \ + cdr-linux.c \ + cdr-null.c \ + cdr-libcdio.c \ + util.c + +libDFCdrom_la_CFLAGS = $(am__append_1) +libDFCdrom_la_LDFLAGS = -module -avoid-version -lpthread \ + $(am__append_2) +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) \ + -I../../libpcsxcore -I../../include + +cfgDFCdrom_SOURCES = cdrcfg-0.1df/main.c +cfgDFCdrom_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) +glade_DATA = cdrcfg-0.1df/dfcdrom.glade2 +gladedir = $(datadir)/psemu/ +EXTRA_DIST = $(glade_DATA) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/dfcdrom/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/dfcdrom/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libDFCdrom.la: $(libDFCdrom_la_OBJECTS) $(libDFCdrom_la_DEPENDENCIES) + $(libDFCdrom_la_LINK) -rpath $(libdir) $(libDFCdrom_la_OBJECTS) $(libDFCdrom_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +cfgDFCdrom$(EXEEXT): $(cfgDFCdrom_OBJECTS) $(cfgDFCdrom_DEPENDENCIES) + @rm -f cfgDFCdrom$(EXEEXT) + $(LINK) $(cfgDFCdrom_OBJECTS) $(cfgDFCdrom_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFCdrom_la-cdr-libcdio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFCdrom_la-cdr-linux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFCdrom_la-cdr-null.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFCdrom_la-cdr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFCdrom_la-cfg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFCdrom_la-util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libDFCdrom_la-cdr.lo: cdr.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -MT libDFCdrom_la-cdr.lo -MD -MP -MF $(DEPDIR)/libDFCdrom_la-cdr.Tpo -c -o libDFCdrom_la-cdr.lo `test -f 'cdr.c' || echo '$(srcdir)/'`cdr.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFCdrom_la-cdr.Tpo $(DEPDIR)/libDFCdrom_la-cdr.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdr.c' object='libDFCdrom_la-cdr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -c -o libDFCdrom_la-cdr.lo `test -f 'cdr.c' || echo '$(srcdir)/'`cdr.c + +libDFCdrom_la-cfg.lo: cfg.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -MT libDFCdrom_la-cfg.lo -MD -MP -MF $(DEPDIR)/libDFCdrom_la-cfg.Tpo -c -o libDFCdrom_la-cfg.lo `test -f 'cfg.c' || echo '$(srcdir)/'`cfg.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFCdrom_la-cfg.Tpo $(DEPDIR)/libDFCdrom_la-cfg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg.c' object='libDFCdrom_la-cfg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -c -o libDFCdrom_la-cfg.lo `test -f 'cfg.c' || echo '$(srcdir)/'`cfg.c + +libDFCdrom_la-cdr-linux.lo: cdr-linux.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -MT libDFCdrom_la-cdr-linux.lo -MD -MP -MF $(DEPDIR)/libDFCdrom_la-cdr-linux.Tpo -c -o libDFCdrom_la-cdr-linux.lo `test -f 'cdr-linux.c' || echo '$(srcdir)/'`cdr-linux.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFCdrom_la-cdr-linux.Tpo $(DEPDIR)/libDFCdrom_la-cdr-linux.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdr-linux.c' object='libDFCdrom_la-cdr-linux.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -c -o libDFCdrom_la-cdr-linux.lo `test -f 'cdr-linux.c' || echo '$(srcdir)/'`cdr-linux.c + +libDFCdrom_la-cdr-null.lo: cdr-null.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -MT libDFCdrom_la-cdr-null.lo -MD -MP -MF $(DEPDIR)/libDFCdrom_la-cdr-null.Tpo -c -o libDFCdrom_la-cdr-null.lo `test -f 'cdr-null.c' || echo '$(srcdir)/'`cdr-null.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFCdrom_la-cdr-null.Tpo $(DEPDIR)/libDFCdrom_la-cdr-null.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdr-null.c' object='libDFCdrom_la-cdr-null.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -c -o libDFCdrom_la-cdr-null.lo `test -f 'cdr-null.c' || echo '$(srcdir)/'`cdr-null.c + +libDFCdrom_la-cdr-libcdio.lo: cdr-libcdio.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -MT libDFCdrom_la-cdr-libcdio.lo -MD -MP -MF $(DEPDIR)/libDFCdrom_la-cdr-libcdio.Tpo -c -o libDFCdrom_la-cdr-libcdio.lo `test -f 'cdr-libcdio.c' || echo '$(srcdir)/'`cdr-libcdio.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFCdrom_la-cdr-libcdio.Tpo $(DEPDIR)/libDFCdrom_la-cdr-libcdio.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdr-libcdio.c' object='libDFCdrom_la-cdr-libcdio.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -c -o libDFCdrom_la-cdr-libcdio.lo `test -f 'cdr-libcdio.c' || echo '$(srcdir)/'`cdr-libcdio.c + +libDFCdrom_la-util.lo: util.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -MT libDFCdrom_la-util.lo -MD -MP -MF $(DEPDIR)/libDFCdrom_la-util.Tpo -c -o libDFCdrom_la-util.lo `test -f 'util.c' || echo '$(srcdir)/'`util.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFCdrom_la-util.Tpo $(DEPDIR)/libDFCdrom_la-util.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='libDFCdrom_la-util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFCdrom_la_CFLAGS) $(CFLAGS) -c -o libDFCdrom_la-util.lo `test -f 'util.c' || echo '$(srcdir)/'`util.c + +main.o: cdrcfg-0.1df/main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT main.o -MD -MP -MF $(DEPDIR)/main.Tpo -c -o main.o `test -f 'cdrcfg-0.1df/main.c' || echo '$(srcdir)/'`cdrcfg-0.1df/main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/main.Tpo $(DEPDIR)/main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdrcfg-0.1df/main.c' object='main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o main.o `test -f 'cdrcfg-0.1df/main.c' || echo '$(srcdir)/'`cdrcfg-0.1df/main.c + +main.obj: cdrcfg-0.1df/main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT main.obj -MD -MP -MF $(DEPDIR)/main.Tpo -c -o main.obj `if test -f 'cdrcfg-0.1df/main.c'; then $(CYGPATH_W) 'cdrcfg-0.1df/main.c'; else $(CYGPATH_W) '$(srcdir)/cdrcfg-0.1df/main.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/main.Tpo $(DEPDIR)/main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdrcfg-0.1df/main.c' object='main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o main.obj `if test -f 'cdrcfg-0.1df/main.c'; then $(CYGPATH_W) 'cdrcfg-0.1df/main.c'; else $(CYGPATH_W) '$(srcdir)/cdrcfg-0.1df/main.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-gladeDATA: $(glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(glade_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \ + $(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \ + done + +uninstall-gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(glade_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \ + rm -f "$(DESTDIR)$(gladedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-gladeDATA + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-gladeDATA \ + uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-gladeDATA install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-gladeDATA uninstall-libLTLIBRARIES + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/plugins/dfcdrom/cdr-libcdio.c b/plugins/dfcdrom/cdr-libcdio.c new file mode 100644 index 00000000..738d2031 --- /dev/null +++ b/plugins/dfcdrom/cdr-libcdio.c @@ -0,0 +1,257 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#ifdef USE_LIBCDIO + +#include +#include + +#include "cdr.h" + +static CdIo_t *cdHandle = NULL; + +static void SetSpeed(int speed) { + speed *= 176; + if (speed == 0) speed = 0xFFFF; + + cdio_set_speed(cdHandle, speed); +} + +static void SetSpinDown(unsigned char spindown) { + mmc_cdb_t cdb; + char buf[16]; + + memset(&cdb, 0, sizeof(cdb)); + + cdb.field[0] = 0x5A; + cdb.field[2] = 0x0D; + cdb.field[8] = sizeof(buf); + + if (mmc_run_cmd(cdHandle, 10000, &cdb, SCSI_MMC_DATA_READ, sizeof(buf), buf) != DRIVER_OP_SUCCESS) + return; + + buf[11] = (buf[11] & 0xF0) | (spindown & 0x0F); + + memset(&cdb, 0, sizeof(cdb)); + memset(buf, 0, 2); + + cdb.field[0] = 0x55; + cdb.field[1] = 0x10; + cdb.field[8] = sizeof(buf); + + mmc_run_cmd(cdHandle, 10000, &cdb, SCSI_MMC_DATA_WRITE, sizeof(buf), buf); +} + +static void UnlockDoor() { + mmc_cdb_t cdb; + + memset(&cdb, 0, sizeof(cdb)); + + cdb.field[0] = 0x1E; + cdb.field[4] = 0; + + mmc_run_cmd(cdHandle, 10000, &cdb, SCSI_MMC_DATA_WRITE, 0, NULL); +} + +int OpenCdHandle(const char *dev) { + if (dev == NULL || dev[0] == '\0') { + if ((dev = cdio_get_default_device(NULL)) == NULL) { + return -1; + } + } + +#ifdef __FreeBSD__ + cdHandle = cdio_open_am_cd(dev, "CAM"); +#else + cdHandle = cdio_open_cd(dev); +#endif + + if (cdHandle != NULL) { + SetSpeed(CdrSpeed); + SetSpinDown(SpinDown); + UnlockDoor(); + + return 0; + } + + return -1; +} + +void CloseCdHandle() { + if (cdHandle != NULL) { + cdio_set_speed(cdHandle, 0xFFFF); + SetSpinDown(SPINDOWN_VENDOR_SPECIFIC); + + cdio_destroy(cdHandle); + } + + cdHandle = NULL; +} + +int IsCdHandleOpen() { + return (cdHandle != NULL); +} + +long GetTN(unsigned char *buffer) { + buffer[0] = cdio_get_first_track_num(cdHandle); + buffer[1] = cdio_get_last_track_num(cdHandle); + + return 0; +} + +long GetTD(unsigned char track, unsigned char *buffer) { + msf_t msf; + + if (track == 0) track = CDIO_CDROM_LEADOUT_TRACK; + + if (!cdio_get_track_msf(cdHandle, track, &msf)) { + memset(buffer + 1, 0, 3); + return 0; + } + + buffer[0] = btoi(msf.f); + buffer[1] = btoi(msf.s); + buffer[2] = btoi(msf.m); + + return 0; +} + +long GetTE(unsigned char track, unsigned char *m, unsigned char *s, unsigned char *f) { + unsigned char msf[3]; + + lba_to_msf(cdio_get_track_lba(cdHandle, track + 1) - CD_MSF_OFFSET, msf); + + *m = msf[0]; + *s = msf[1]; + *f = msf[2]; + + return 0; +} + +long ReadSector(crdata *cr) { + int lba; + MMC_READ_CD cdb; + + lba = msf_to_lba(cr->msf.cdmsf_min0, cr->msf.cdmsf_sec0, cr->msf.cdmsf_frame0); + memset(&cdb, 0, sizeof(cdb)); + + cdb.Code = 0xBE; + cdb.IncludeEDC = 1; + cdb.IncludeUserData = 1; + cdb.HeaderCode = 3; + cdb.IncludeSyncData = 1; + cdb.SubChannelSelection = 0; + cdb.StartingLBA[1] = lba >> 16; + cdb.StartingLBA[2] = lba >> 8; + cdb.StartingLBA[3] = lba; + cdb.TransferBlocks[2] = 1; + + if (mmc_run_cmd(cdHandle, 10000, (mmc_cdb_t *)&cdb, SCSI_MMC_DATA_READ, sizeof(*cr), cr) != DRIVER_OP_SUCCESS) + return -1; + + return 0; +} + +long PlayCDDA(unsigned char *sector) { + msf_t start, end; + + if (!cdio_get_track_msf(cdHandle, CDIO_CDROM_LEADOUT_TRACK, &end)) + return -1; + + start.m = itob(sector[0]); + start.s = itob(sector[1]); + start.f = itob(sector[2]); + + if (cdio_audio_play_msf(cdHandle, &start, &end) != DRIVER_OP_SUCCESS) + return -1; + + return 0; +} + +long StopCDDA() { + cdio_subchannel_t subchnl; + + if (cdio_audio_read_subchannel(cdHandle, &subchnl) != DRIVER_OP_SUCCESS) + return -1; + + switch (subchnl.audio_status) { + case CDIO_MMC_READ_SUB_ST_PLAY: + case CDIO_MMC_READ_SUB_ST_PAUSED: + cdio_audio_stop(cdHandle); + } + + return 0; +} + +long GetStatus(int playing, struct CdrStat *stat) { + cdio_subchannel_t subchnl; + + memset(stat, 0, sizeof(struct CdrStat)); + + if (playing) { + if (cdio_audio_read_subchannel(cdHandle, &subchnl) == DRIVER_OP_SUCCESS) { + stat->Time[0] = btoi(subchnl.abs_addr.m); + stat->Time[1] = btoi(subchnl.abs_addr.s); + stat->Time[2] = btoi(subchnl.abs_addr.f); + } + } + + stat->Type = 0x01; + + if (mmc_get_tray_status(cdHandle)) { + stat->Type = 0xff; + stat->Status |= 0x10; + } else { + SetSpeed(CdrSpeed); + SetSpinDown(SpinDown); + UnlockDoor(); + } + + return 0; +} + +unsigned char *ReadSub(const unsigned char *time) { + int lba = msf_to_lba(btoi(time[0]), btoi(time[1]), btoi(time[2])); + static unsigned char buf[CD_FRAMESIZE_RAW + 96]; + + MMC_READ_CD cdb; + + memset(&cdb, 0, sizeof(cdb)); + + cdb.Code = 0xBE; + cdb.IncludeEDC = 1; + cdb.IncludeUserData = 1; + cdb.HeaderCode = 3; + cdb.IncludeSyncData = 1; + cdb.StartingLBA[1] = lba >> 16; + cdb.StartingLBA[2] = lba >> 8; + cdb.StartingLBA[3] = lba; + cdb.TransferBlocks[2] = 1; + cdb.SubChannelSelection = 1; + + if (mmc_run_cmd(cdHandle, 10000, (mmc_cdb_t *)&cdb, SCSI_MMC_DATA_READ, sizeof(buf), buf) != DRIVER_OP_SUCCESS) + return NULL; + + DecodeRawSubData(buf + CD_FRAMESIZE_RAW); + return buf + CD_FRAMESIZE_RAW; +} + +#endif diff --git a/plugins/dfcdrom/cdr-linux.c b/plugins/dfcdrom/cdr-linux.c new file mode 100644 index 00000000..a814962e --- /dev/null +++ b/plugins/dfcdrom/cdr-linux.c @@ -0,0 +1,407 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * Portions based on: cdrdao - write audio CD-Rs in disc-at-once mode + * Copyright (C) 2007 Denis Leroy + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#if defined (__linux__) && !defined (USE_LIBCDIO) + +#include "cdr.h" + +static int cdHandle = -1; +static int ReadMMC = 0, SubQMMC = 0; + +static int SendMMCCmd(const unsigned char *cmd, int cmdLen, const unsigned char *dataOut, + int dataOutLen, unsigned char *dataIn, int dataInLen) +{ + sg_io_hdr_t io_hdr; + + memset(&io_hdr, 0, sizeof(io_hdr)); + + io_hdr.interface_id = 'S'; + io_hdr.cmd_len = cmdLen; + io_hdr.cmdp = (unsigned char *)cmd; + io_hdr.timeout = 10000; + io_hdr.sbp = NULL; + io_hdr.mx_sb_len = 0; + io_hdr.flags = 1; + + if (dataOut != NULL) { + io_hdr.dxferp = (void *)dataOut; + io_hdr.dxfer_len = dataOutLen; + io_hdr.dxfer_direction = SG_DXFER_TO_DEV; + } else if (dataIn != NULL) { + io_hdr.dxferp = (void *)dataIn; + io_hdr.dxfer_len = dataInLen; + io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; + } + + if (ioctl(cdHandle, SG_IO, &io_hdr) < 0) { + return -1; + } + + return io_hdr.status; +} + +static int CheckReadMMC() { + MMC_READ_CD cdb; + unsigned char buf[CD_FRAMESIZE_RAW]; + + memset(&cdb, 0, sizeof(cdb)); + memset(buf, 0xAA, sizeof(buf)); + + cdb.Code = GPCMD_READ_CD; + cdb.IncludeEDC = 0; + cdb.IncludeUserData = 1; + cdb.HeaderCode = 3; + cdb.IncludeSyncData = 1; + cdb.TransferBlocks[2] = 1; + + if (SendMMCCmd((unsigned char *)&cdb, sizeof(cdb), NULL, 0, buf, sizeof(buf)) == 0) { + if (buf[0] != 0xAA) { + PRINTF("Using MMC for data\n"); + return 1; // supported + } + } + + return 0; // NOT supported +} + +static int CheckSubQMMC() { + MMC_READ_CD cdb; + unsigned char buf[CD_FRAMESIZE_RAW + 96]; + + memset(&cdb, 0, sizeof(cdb)); + memset(buf, 0xAA, sizeof(buf)); + + cdb.Code = GPCMD_READ_CD; + cdb.IncludeEDC = 1; + cdb.IncludeUserData = 1; + cdb.HeaderCode = 3; + cdb.IncludeSyncData = 1; + cdb.SubChannelSelection = 1; + cdb.TransferBlocks[2] = 1; + + if (SendMMCCmd((unsigned char *)&cdb, sizeof(cdb), NULL, 0, buf, sizeof(buf)) == 0) { + if (buf[0] != 0xAA && (buf[2352] != 0xAA || buf[2353] != 0xAA)) { + PRINTF("Using MMC for subchannel\n"); + return 1; // supported + } + } + + return 0; // NOT supported +} + +int OpenCdHandle(const char *dev) { + char spindown; + + cdHandle = open(dev, O_RDONLY); + + if (cdHandle != -1) { + ioctl(cdHandle, CDROM_LOCKDOOR, 0); + + spindown = (char)SpinDown; + ioctl(cdHandle, CDROMSETSPINDOWN, &spindown); + + ioctl(cdHandle, CDROM_SELECT_SPEED, CdrSpeed); + + ReadMMC = CheckReadMMC(); + SubQMMC = CheckSubQMMC(); + + return 0; + } + + return -1; +} + +void CloseCdHandle() { + char spindown = SPINDOWN_VENDOR_SPECIFIC; + ioctl(cdHandle, CDROMSETSPINDOWN, &spindown); + + close(cdHandle); + + cdHandle = -1; +} + +int IsCdHandleOpen() { + return (cdHandle != -1); +} + +long GetTN(unsigned char *buffer) { + struct cdrom_tochdr toc; + + if (ioctl(cdHandle, CDROMREADTOCHDR, &toc) == -1) + return -1; + + buffer[0] = toc.cdth_trk0; // start track + buffer[1] = toc.cdth_trk1; // end track + + return 0; +} + +long GetTD(unsigned char track, unsigned char *buffer) { + struct cdrom_tocentry entry; + + if (track == 0) + track = 0xAA; // total time (leadout) + entry.cdte_track = track; + entry.cdte_format = CDROM_MSF; + + if (ioctl(cdHandle, CDROMREADTOCENTRY, &entry) == -1) + return -1; + + buffer[0] = entry.cdte_addr.msf.frame; + buffer[1] = entry.cdte_addr.msf.second; + buffer[2] = entry.cdte_addr.msf.minute; + + return 0; +} + +long GetTE(unsigned char track, unsigned char *m, unsigned char *s, unsigned char *f) { + struct cdrom_tocentry entry; + unsigned char msf[3]; + + if (GetTN(msf) == -1) return -1; + + entry.cdte_track = track + 1; + if (entry.cdte_track > msf[1]) entry.cdte_track = 0xaa; + + entry.cdte_format = CDROM_MSF; + + if (ioctl(cdHandle, CDROMREADTOCENTRY, &entry) == -1) + return -1; + + lba_to_msf(msf_to_lba(entry.cdte_addr.msf.minute, entry.cdte_addr.msf.second, entry.cdte_addr.msf.frame) - CD_MSF_OFFSET, msf); + + *m = msf[0]; + *s = msf[1]; + *f = msf[2]; + + return 0; +} + +long ReadSector(crdata *cr) { + if (ReadMMC) { + MMC_READ_CD cdb; + int lba; + + memset(&cdb, 0, sizeof(cdb)); + + lba = msf_to_lba(cr->msf.cdmsf_min0, cr->msf.cdmsf_sec0, cr->msf.cdmsf_frame0); + + cdb.Code = GPCMD_READ_CD; + cdb.IncludeEDC = 1; + cdb.IncludeUserData = 1; + cdb.HeaderCode = 3; + cdb.IncludeSyncData = 1; + cdb.SubChannelSelection = 0; + cdb.StartingLBA[1] = lba >> 16; + cdb.StartingLBA[2] = lba >> 8; + cdb.StartingLBA[3] = lba; + cdb.TransferBlocks[2] = 1; + + if (SendMMCCmd((unsigned char *)&cdb, sizeof(cdb), NULL, 0, (unsigned char *)cr, sizeof(*cr)) != 0) + return -1; + } else { + if (ioctl(cdHandle, CDROMREADRAW, cr) == -1) + return -1; + } + + return 0; +} + +long PlayCDDA(unsigned char *sector) { + struct cdrom_msf addr; + unsigned char ptmp[4]; + + // 0 is the last track of every cdrom, so play up to there + if (GetTD(0, ptmp) == -1) + return -1; + + addr.cdmsf_min0 = sector[0]; + addr.cdmsf_sec0 = sector[1]; + addr.cdmsf_frame0 = sector[2]; + addr.cdmsf_min1 = ptmp[2]; + addr.cdmsf_sec1 = ptmp[1]; + addr.cdmsf_frame1 = ptmp[0]; + + if (ioctl(cdHandle, CDROMPLAYMSF, &addr) == -1) + return -1; + + return 0; +} + +long StopCDDA() { + struct cdrom_subchnl sc; + + sc.cdsc_format = CDROM_MSF; + if (ioctl(cdHandle, CDROMSUBCHNL, &sc) == -1) + return -1; + + switch (sc.cdsc_audiostatus) { + case CDROM_AUDIO_PAUSED: + case CDROM_AUDIO_PLAY: + ioctl(cdHandle, CDROMSTOP); + break; + } + + return 0; +} + +long GetStatus(int playing, struct CdrStat *stat) { + struct cdrom_subchnl sc; + int ret; + char spindown; + + memset(stat, 0, sizeof(struct CdrStat)); + + if (playing) { // return Time only if playing + sc.cdsc_format = CDROM_MSF; + if (ioctl(cdHandle, CDROMSUBCHNL, &sc) != -1) + memcpy(stat->Time, &sc.cdsc_absaddr.msf, 3); + } + + ret = ioctl(cdHandle, CDROM_DISC_STATUS); + switch (ret) { + case CDS_AUDIO: + stat->Type = 0x02; + break; + case CDS_DATA_1: + case CDS_DATA_2: + case CDS_XA_2_1: + case CDS_XA_2_2: + stat->Type = 0x01; + break; + } + ret = ioctl(cdHandle, CDROM_DRIVE_STATUS); + switch (ret) { + case CDS_NO_DISC: + case CDS_TRAY_OPEN: + stat->Type = 0xff; + stat->Status |= 0x10; + break; + default: + spindown = (char)SpinDown; + ioctl(cdHandle, CDROMSETSPINDOWN, &spindown); + ioctl(cdHandle, CDROM_SELECT_SPEED, CdrSpeed); + ioctl(cdHandle, CDROM_LOCKDOOR, 0); + break; + } + + switch (sc.cdsc_audiostatus) { + case CDROM_AUDIO_PLAY: + stat->Status |= 0x80; + break; + } + + return 0; +} + +static unsigned char *ReadSubMMC(const unsigned char *time) { + static unsigned char buf[CD_FRAMESIZE_RAW + 96]; + int lba = msf_to_lba(btoi(time[0]), btoi(time[1]), btoi(time[2])); + MMC_READ_CD cdb; + + memset(&cdb, 0, sizeof(cdb)); + + cdb.Code = GPCMD_READ_CD; + cdb.IncludeEDC = 1; + cdb.IncludeUserData = 1; + cdb.HeaderCode = 3; + cdb.IncludeSyncData = 1; + cdb.StartingLBA[1] = lba >> 16; + cdb.StartingLBA[2] = lba >> 8; + cdb.StartingLBA[3] = lba; + cdb.TransferBlocks[2] = 1; + cdb.SubChannelSelection = 1; + + if (SendMMCCmd((unsigned char *)&cdb, sizeof(cdb), NULL, 0, buf, sizeof(buf)) != 0) + return NULL; + + DecodeRawSubData(buf + CD_FRAMESIZE_RAW); + return buf + CD_FRAMESIZE_RAW; +} + +static unsigned char *ReadSubIOCTL(const unsigned char *time) { + static struct SubQ subq; + struct cdrom_subchnl subchnl; + int r; + crdata cr; + unsigned short crc; + + cr.msf.cdmsf_min0 = btoi(time[0]); + cr.msf.cdmsf_sec0 = btoi(time[1]); + cr.msf.cdmsf_frame0 = btoi(time[2]); + + if (ioctl(cdHandle, CDROMSEEK, &cr.msf) == -1) { + // will be slower, but there's no other way to make it accurate + if (ioctl(cdHandle, CDROMREADRAW, &cr) == -1) { + return NULL; + } + } + + subchnl.cdsc_format = CDROM_MSF; + r = ioctl(cdHandle, CDROMSUBCHNL, &subchnl); + + if (r == -1) return NULL; + + subq.ControlAndADR = 0x41; + subq.TrackNumber = subchnl.cdsc_trk; + subq.IndexNumber = subchnl.cdsc_ind; + subq.TrackRelativeAddress[0] = itob(subchnl.cdsc_reladdr.msf.minute); + subq.TrackRelativeAddress[1] = itob(subchnl.cdsc_reladdr.msf.second); + subq.TrackRelativeAddress[2] = itob(subchnl.cdsc_reladdr.msf.frame); + subq.AbsoluteAddress[0] = itob(subchnl.cdsc_absaddr.msf.minute); + subq.AbsoluteAddress[1] = itob(subchnl.cdsc_absaddr.msf.second); + subq.AbsoluteAddress[2] = itob(subchnl.cdsc_absaddr.msf.frame); + + // CRC is not supported with IOCTL, fake it. + crc = calcCrc((unsigned char *)&subq + 12, 10); + subq.CRC[0] = (crc >> 8); + subq.CRC[1] = (crc & 0xFF); + + r = msf_to_lba(btoi(time[0]), btoi(time[1]), btoi(time[2])); + + if (GetTE(1, &cr.msf.cdmsf_min0, &cr.msf.cdmsf_sec0, &cr.msf.cdmsf_frame0) == -1) { + cr.msf.cdmsf_min0 = 80; + cr.msf.cdmsf_sec0 = 0; + cr.msf.cdmsf_frame0 = 0; + } + + if (msf_to_lba(cr.msf.cdmsf_min0, cr.msf.cdmsf_sec0, cr.msf.cdmsf_frame0) >= r && + (msf_to_lba(subchnl.cdsc_absaddr.msf.minute, subchnl.cdsc_absaddr.msf.second, subchnl.cdsc_absaddr.msf.frame) != r || + msf_to_lba(subchnl.cdsc_reladdr.msf.minute, subchnl.cdsc_reladdr.msf.second, subchnl.cdsc_reladdr.msf.frame) != r - CD_MSF_OFFSET)) + subq.CRC[1] ^= 1; // time mismatch; report wrong CRC + + PRINTF("subq : %x,%x : %x,%x,%x : %x,%x,%x\n", + subchnl.cdsc_trk, subchnl.cdsc_ind, + itob(subchnl.cdsc_reladdr.msf.minute), itob(subchnl.cdsc_reladdr.msf.second), itob(subchnl.cdsc_reladdr.msf.frame), + itob(subchnl.cdsc_absaddr.msf.minute), itob(subchnl.cdsc_absaddr.msf.second), itob(subchnl.cdsc_absaddr.msf.frame)); + + return (unsigned char *)&subq; +} + +unsigned char *ReadSub(const unsigned char *time) { + if (SubQMMC) return ReadSubMMC(time); + else return ReadSubIOCTL(time); +} + +#endif diff --git a/plugins/dfcdrom/cdr-null.c b/plugins/dfcdrom/cdr-null.c new file mode 100644 index 00000000..c6aa396e --- /dev/null +++ b/plugins/dfcdrom/cdr-null.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "cdr.h" + +#ifdef USE_NULL + +int OpenCdHandle(const char *dev) { + return -1; +} + +void CloseCdHandle() { +} + +int IsCdHandleOpen() { + return 0; +} + +long GetTN(unsigned char *buffer) { + buffer[0] = 0; + buffer[1] = 0; + return 0; +} + +long GetTD(unsigned char track, unsigned char *buffer) { + memset(buffer + 1, 0, 3); + return 0; +} + +long GetTE(unsigned char track, unsigned char *m, unsigned char *s, unsigned char *f) { + return -1; +} + +long ReadSector(crdata *cr) { + return -1; +} + +long PlayCDDA(unsigned char *sector) { + return 0; +} + +long StopCDDA() { + return 0; +} + +long GetStatus(int playing, struct CdrStat *stat) { + return -1; +} + +unsigned char *ReadSub(const unsigned char *time) { + return NULL; +} + +#endif diff --git a/plugins/dfcdrom/cdr.c b/plugins/dfcdrom/cdr.c new file mode 100644 index 00000000..f011684d --- /dev/null +++ b/plugins/dfcdrom/cdr.c @@ -0,0 +1,515 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "cdr.h" + +#ifndef USE_NULL +static char *LibName = N_("CD-ROM Drive Reader"); +#else +static char *LibName = N_("CDR NULL Plugin"); +#endif + +int initial_time = 0; + +pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +pthread_cond_t cond = PTHREAD_COND_INITIALIZER; + +CacheData *cdcache; +unsigned char *cdbuffer; +int cacheaddr; + +crdata cr; + +unsigned char lastTime[3]; +pthread_t thread; +int subqread; +volatile int stopth, found, locked, playing; + +long (*ReadTrackT[])() = { + ReadNormal, + ReadThreaded, +}; + +unsigned char* (*GetBufferT[])() = { + GetBNormal, + GetBThreaded, +}; + +long (*fReadTrack)(); +unsigned char* (*fGetBuffer)(); + +void *CdrThread(void *arg); + +long CDRinit(void) { + thread = (pthread_t)-1; + return 0; +} + +long CDRshutdown(void) { + return 0; +} + +long CDRopen(void) { + LoadConf(); + +#ifndef _MACOSX + if (IsCdHandleOpen()) + return 0; // it's already open +#endif + + if (OpenCdHandle(CdromDev) == -1) { // if we can't open the cdrom we'll works as a null plugin + fprintf(stderr, "CDR: Could not open %s\n", CdromDev); + } + + fReadTrack = ReadTrackT[ReadMode]; + fGetBuffer = GetBufferT[ReadMode]; + + if (ReadMode == THREADED) { + cdcache = (CacheData *)malloc(CacheSize * sizeof(CacheData)); + if (cdcache == NULL) return -1; + memset(cdcache, 0, CacheSize * sizeof(CacheData)); + + found = 0; + } else { + cdbuffer = cr.buf + 12; /* skip sync data */ + } + + if (ReadMode == THREADED) { + pthread_attr_t attr; + + pthread_mutex_init(&mut, NULL); + pthread_cond_init(&cond, NULL); + locked = 0; + + pthread_attr_init(&attr); + pthread_create(&thread, &attr, CdrThread, NULL); + + cacheaddr = -1; + } else thread = (pthread_t)-1; + + playing = 0; + stopth = 0; + initial_time = 0; + + return 0; +} + +long CDRclose(void) { + if (!IsCdHandleOpen()) return 0; + + if (playing) CDRstop(); + + CloseCdHandle(); + + if (thread != (pthread_t)-1) { + if (locked == 0) { + stopth = 1; + while (locked == 0) usleep(5000); + } + + stopth = 2; + pthread_mutex_lock(&mut); + pthread_cond_signal(&cond); + pthread_mutex_unlock(&mut); + + pthread_join(thread, NULL); + pthread_mutex_destroy(&mut); + pthread_cond_destroy(&cond); + } + + if (ReadMode == THREADED) { + free(cdcache); + } + + return 0; +} + +// return Starting and Ending Track +// buffer: +// byte 0 - start track +// byte 1 - end track +long CDRgetTN(unsigned char *buffer) { + long ret; + + if (!IsCdHandleOpen()) { + buffer[0] = 1; + buffer[1] = 1; + return 0; + } + + if (ReadMode == THREADED) pthread_mutex_lock(&mut); + ret = GetTN(buffer); + if (ReadMode == THREADED) pthread_mutex_unlock(&mut); + + return ret; +} + +// return Track Time +// buffer: +// byte 0 - frame +// byte 1 - second +// byte 2 - minute +long CDRgetTD(unsigned char track, unsigned char *buffer) { + long ret; + + if (!IsCdHandleOpen()) { + memset(buffer + 1, 0, 3); + return 0; + } + + if (ReadMode == THREADED) pthread_mutex_lock(&mut); + ret = GetTD(track, buffer); + if (ReadMode == THREADED) pthread_mutex_unlock(&mut); + + return ret; +} + +// normal reading +long ReadNormal() { + if (ReadSector(&cr) == -1) + return -1; + + return 0; +} + +unsigned char* GetBNormal() { + return cdbuffer; +} + +// threaded reading (with cache) +long ReadThreaded() { + int addr = msf_to_lba(cr.msf.cdmsf_min0, cr.msf.cdmsf_sec0, cr.msf.cdmsf_frame0); + int i; + + if (addr >= cacheaddr && addr < (cacheaddr + CacheSize) && cacheaddr != -1) { + i = addr - cacheaddr; + PRINTF("found %d\n", (addr - cacheaddr)); + cdbuffer = cdcache[i].cr.buf + 12; + while (btoi(cdbuffer[0]) != cr.msf.cdmsf_min0 || + btoi(cdbuffer[1]) != cr.msf.cdmsf_sec0 || + btoi(cdbuffer[2]) != cr.msf.cdmsf_frame0) { + if (locked == 1) { + if (cdcache[i].ret == 0) break; + return -1; + } + usleep(5000); + } + PRINTF("%x:%x:%x, %p, %p\n", cdbuffer[0], cdbuffer[1], cdbuffer[2], cdbuffer, cdcache); + found = 1; + + return 0; + } else found = 0; + + if (locked == 0) { + stopth = 1; + while (locked == 0) { usleep(5000); } + stopth = 0; + } + + // not found in cache + locked = 0; + pthread_mutex_lock(&mut); + pthread_cond_signal(&cond); + pthread_mutex_unlock(&mut); + + return 0; +} + +unsigned char* GetBThreaded() { + PRINTF("threadc %d\n", found); + + if (found == 1) return cdbuffer; + cdbuffer = cdcache[0].cr.buf + 12; + while (btoi(cdbuffer[0]) != cr.msf.cdmsf_min0 || + btoi(cdbuffer[1]) != cr.msf.cdmsf_sec0 || + btoi(cdbuffer[2]) != cr.msf.cdmsf_frame0) { + if (locked == 1) return NULL; + usleep(5000); + } + if (cdcache[0].ret == -1) return NULL; + + return cdbuffer; +} + +void *CdrThread(void *arg) { + unsigned char curTime[3]; + int i; + + for (;;) { + locked = 1; + pthread_mutex_lock(&mut); + pthread_cond_wait(&cond, &mut); + + if (stopth == 2) pthread_exit(NULL); + // refill the buffer + cacheaddr = msf_to_lba(cr.msf.cdmsf_min0, cr.msf.cdmsf_sec0, cr.msf.cdmsf_frame0); + + memcpy(curTime, &cr.msf, 3); + + PRINTF("start thc %d:%d:%d\n", curTime[0], curTime[1], curTime[2]); + + for (i = 0; i < CacheSize; i++) { + memcpy(&cdcache[i].cr.msf, curTime, 3); + PRINTF("reading %d:%d:%d\n", curTime[0], curTime[1], curTime[2]); + cdcache[i].ret = ReadSector(&cdcache[i].cr); + + PRINTF("readed %x:%x:%x\n", cdcache[i].cr.buf[12], cdcache[i].cr.buf[13], cdcache[i].cr.buf[14]); + if (cdcache[i].ret == -1) break; + + curTime[2]++; + if (curTime[2] == 75) { + curTime[2] = 0; + curTime[1]++; + if (curTime[1] == 60) { + curTime[1] = 0; + curTime[0]++; + } + } + + if (stopth) break; + } + + pthread_mutex_unlock(&mut); + } + + return NULL; +} + +// read track +// time: +// byte 0 - minute +// byte 1 - second +// byte 2 - frame +// uses bcd format +long CDRreadTrack(unsigned char *time) { + if (!IsCdHandleOpen()) { + memset(cr.buf, 0, DATA_SIZE); + return 0; + } + + PRINTF("CDRreadTrack %d:%d:%d\n", btoi(time[0]), btoi(time[1]), btoi(time[2])); + + if (UseSubQ) memcpy(lastTime, time, 3); + subqread = 0; + + cr.msf.cdmsf_min0 = btoi(time[0]); + cr.msf.cdmsf_sec0 = btoi(time[1]); + cr.msf.cdmsf_frame0 = btoi(time[2]); + + return fReadTrack(); +} + +// return readed track +unsigned char *CDRgetBuffer(void) { + return fGetBuffer(); +} + +// plays cdda audio +// sector: +// byte 0 - minute +// byte 1 - second +// byte 2 - frame +// does NOT uses bcd format +long CDRplay(unsigned char *sector) { + long ret; + + if (!IsCdHandleOpen()) + return 0; + + // If play was called with the same time as the previous call, + // don't restart it. Of course, if play is called with a different + // track, stop playing the current stream. + if (playing) { + if (msf_to_lba(sector[0], sector[1], sector[2]) == initial_time) + return 0; + else + CDRstop(); + } + + initial_time = msf_to_lba(sector[0], sector[1], sector[2]); + + if (ReadMode == THREADED) pthread_mutex_lock(&mut); + ret = PlayCDDA(sector); + if (ReadMode == THREADED) pthread_mutex_unlock(&mut); + + if (ret == 0) { + playing = 1; + return 0; + } + + return -1; +} + +// stops cdda audio +long CDRstop(void) { + long ret; + + if (!IsCdHandleOpen()) + return 0; + + if (ReadMode == THREADED) pthread_mutex_lock(&mut); + ret = StopCDDA(); + if (ReadMode == THREADED) pthread_mutex_unlock(&mut); + + if (ret == 0) { + playing = 0; + initial_time = 0; + + return 0; + } + + return -1; +} + +// reads cdr status +// type: +// 0x00 - unknown +// 0x01 - data +// 0x02 - audio +// 0xff - no cdrom +// status: (only shell open supported) +// 0x00 - unknown +// 0x01 - error +// 0x04 - seek error +// 0x10 - shell open +// 0x20 - reading +// 0x40 - seeking +// 0x80 - playing +// time: +// byte 0 - minute +// byte 1 - second +// byte 2 - frame + +long CDRgetStatus(struct CdrStat *stat) { + long ret; + + if (!IsCdHandleOpen()) + return -1; + + if (ReadMode == THREADED) pthread_mutex_lock(&mut); + ret = GetStatus(playing, stat); + if (ReadMode == THREADED) pthread_mutex_unlock(&mut); + + return ret; +} + +unsigned char *CDRgetBufferSub(void) { + static unsigned char *p = NULL; + + if (!UseSubQ) return NULL; + if (subqread) return p; + + if (ReadMode == THREADED) pthread_mutex_lock(&mut); + p = ReadSub(lastTime); + if (ReadMode == THREADED) pthread_mutex_unlock(&mut); + + if (p != NULL) subqread = 1; + + return p; +} + +// read CDDA sector into buffer +long CDRreadCDDA(unsigned char m, unsigned char s, unsigned char f, unsigned char *buffer) { + unsigned char msf[3] = {m, s, f}; + unsigned char *p; + + if (CDRreadTrack(msf) != 0) return -1; + + p = CDRgetBuffer(); + if (p == NULL) return -1; + + memcpy(buffer, p - 12, CD_FRAMESIZE_RAW); // copy from the beginning of the sector + return 0; +} + +// get Track End Time +long CDRgetTE(unsigned char track, unsigned char *m, unsigned char *s, unsigned char *f) { + long ret; + + if (!IsCdHandleOpen()) return -1; + + if (ReadMode == THREADED) pthread_mutex_lock(&mut); + ret = GetTE(track, m, s, f); + if (ReadMode == THREADED) pthread_mutex_unlock(&mut); + + return ret; +} + +#ifndef _MACOSX + +void ExecCfg(char *arg) { + char cfg[256]; + struct stat buf; + + strcpy(cfg, "./cfgDFCdrom"); + if (stat(cfg, &buf) != -1) { + if (fork() == 0) { + execl(cfg, "cfgDFCdrom", arg, NULL); + exit(0); + } + return; + } + + strcpy(cfg, "./cfg/DFCdrom"); + if (stat(cfg, &buf) != -1) { + if (fork() == 0) { + execl(cfg, "cfgDFCdrom", arg, NULL); + exit(0); + } + return; + } + + fprintf(stderr, "cfgDFCdrom file not found!\n"); +} + +long CDRconfigure() { +#ifndef USE_NULL + ExecCfg("configure"); +#endif + return 0; +} + +void CDRabout() { + ExecCfg("about"); +} + +#endif + +long CDRtest(void) { +#ifndef USE_NULL + if (OpenCdHandle(CdromDev) == -1) + return -1; + CloseCdHandle(); +#endif + return 0; +} + +char *PSEgetLibName(void) { + return _(LibName); +} + +unsigned long PSEgetLibType(void) { + return PSE_LT_CDR; +} + +unsigned long PSEgetLibVersion(void) { + return 1 << 16; +} diff --git a/plugins/dfcdrom/cdr.h b/plugins/dfcdrom/cdr.h new file mode 100644 index 00000000..0ae2c680 --- /dev/null +++ b/plugins/dfcdrom/cdr.h @@ -0,0 +1,215 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#ifndef __CDR_H__ +#define __CDR_H__ + +//#define DEBUG 1 + +#include "config.h" + +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "psemu_plugin_defs.h" + +#if defined (__linux__) + +#include +#include +#include + +#ifndef CDROMSETSPINDOWN +#define CDROMSETSPINDOWN 0x531e +#endif + +#define DEV_DEF "/dev/cdrom" + +#else + +struct cdrom_msf { + unsigned char cdmsf_min0; /* start minute */ + unsigned char cdmsf_sec0; /* start second */ + unsigned char cdmsf_frame0; /* start frame */ + unsigned char cdmsf_min1; /* end minute */ + unsigned char cdmsf_sec1; /* end second */ + unsigned char cdmsf_frame1; /* end frame */ +}; + +#define CD_SECS 60 +#define CD_FRAMES 75 +#define CD_MSF_OFFSET 150 +#define CD_FRAMESIZE_SUB 96 + +#if defined (__FreeBSD__) +#define DEV_DEF "/dev/cd0" +#else +#define DEV_DEF "" +#endif + +#if !defined (USE_LIBCDIO) && !defined (_MACOSX) +#define USE_NULL 1 +#endif + +#endif + +extern char CdromDev[256]; +extern long ReadMode; +extern long UseSubQ; +extern long CacheSize; +extern long CdrSpeed; +extern long SpinDown; + +#define NORMAL 0 +#define THREADED 1 +#define READ_MODES 2 + +#ifndef CD_FRAMESIZE_RAW +#define CD_FRAMESIZE_RAW 2352 +#endif + +#define DATA_SIZE (CD_FRAMESIZE_RAW - 12) + +// spindown codes +#define SPINDOWN_VENDOR_SPECIFIC 0x00 +#define SPINDOWN_125MS 0x01 +#define SPINDOWN_250MS 0x02 +#define SPINDOWN_500MS 0x03 +#define SPINDOWN_1S 0x04 +#define SPINDOWN_2S 0x05 +#define SPINDOWN_4S 0x06 +#define SPINDOWN_8S 0x07 +#define SPINDOWN_16S 0x08 +#define SPINDOWN_32S 0x09 +#define SPINDOWN_1MIN 0x0A +#define SPINDOWN_2MIN 0x0B +#define SPINDOWN_4MIN 0x0C +#define SPINDOWN_8MIN 0x0D +#define SPINDOWN_16MIN 0x0E +#define SPINDOWN_32MIN 0x0F + +typedef struct _MMC_READ_CD { + unsigned char Code; // 0xBE + + unsigned char RelativeAddress : 1; + unsigned char : 1; + unsigned char ExpectedSectorType : 3; + unsigned char Lun : 3; + + unsigned char StartingLBA[4]; + unsigned char TransferBlocks[3]; + + unsigned char : 1; + unsigned char ErrorFlags : 2; + unsigned char IncludeEDC : 1; + unsigned char IncludeUserData : 1; + unsigned char HeaderCode : 2; + unsigned char IncludeSyncData : 1; + + unsigned char SubChannelSelection : 3; + unsigned char : 5; + + unsigned char Ctrl; +} MMC_READ_CD; + +#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */ +#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */ + +struct CdrStat { + unsigned long Type; + unsigned long Status; + unsigned char Time[3]; // current playing time +}; + +struct SubQ { + char res0[12]; + unsigned char ControlAndADR; + unsigned char TrackNumber; + unsigned char IndexNumber; + unsigned char TrackRelativeAddress[3]; + unsigned char Filler; + unsigned char AbsoluteAddress[3]; + unsigned char CRC[2]; + char res1[72]; +}; + +typedef union { + struct cdrom_msf msf; + unsigned char buf[CD_FRAMESIZE_RAW]; +} crdata; + +typedef struct { + crdata cr; + int ret; +} CacheData; + +long ReadNormal(); +long ReadThreaded(); +unsigned char* GetBNormal(); +unsigned char* GetBThreaded(); + +long CDRstop(void); + +void LoadConf(); +void SaveConf(); + +#ifdef DEBUG +#define PRINTF printf +#else +#define PRINTF(...) /* */ +#endif + +unsigned int msf_to_lba(char m, char s, char f); +void lba_to_msf(unsigned int s, unsigned char *msf); +void DecodeRawSubData(unsigned char *subbuffer); +unsigned short calcCrc(unsigned char *d, int len); + +int OpenCdHandle(); +void CloseCdHandle(); +int IsCdHandleOpen(); +long GetTN(unsigned char *buffer); +long GetTD(unsigned char track, unsigned char *buffer); +long GetTE(unsigned char track, unsigned char *m, unsigned char *s, unsigned char *f); +long ReadSector(crdata *cr); +long PlayCDDA(unsigned char *sector); +long StopCDDA(); +long GetStatus(int playing, struct CdrStat *stat); +unsigned char *ReadSub(const unsigned char *time); + +#endif diff --git a/plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2 b/plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2 new file mode 100644 index 00000000..25610e2e --- /dev/null +++ b/plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2 @@ -0,0 +1,324 @@ + + + + + + True + 5 + CDR configuration + True + center + normal + False + + + + True + vertical + + + True + vertical + + + True + 0 + + + True + 10 + + + True + Choose your CD-ROM device or type its path if it's not listed + + + 0 + + + + + + + True + Select CD-ROM device + + + label_item + + + + + 0 + + + + + True + 0 + + + True + vertical + + + True + 5 + + + True + 5 + 5 + Select read mode: + + + False + False + 0 + + + + + True + Normal (No Cache) +Threaded - Faster (With Cache) + + + 1 + + + + + False + False + 0 + + + + + True + + + False + 1 + + + + + True + 5 + 5 + + + True + Cache Size (Def. 64): + + + False + False + 0 + + + + + True + True + 32 32 2048 1 16 0 + 1 + True + + + False + False + end + 1 + + + + + 2 + + + + + True + + + False + 3 + + + + + True + 5 + 5 + + + True + Spindown Time: + + + False + False + 0 + + + + + True + Default +125ms +250ms +500ms +1s +2s +4s +8s +16s +32s +1min +2min +4min +8min +16min +32min + + + False + False + end + 1 + + + + + 4 + + + + + True + + + False + 5 + + + + + True + 5 + 5 + + + True + Cdrom Speed (Def. 0 = MAX): + + + False + False + 0 + + + + + True + True + 0 0 100 1 4 0 + 1 + True + + + False + False + end + 1 + + + + + 6 + + + + + True + + hseparator + + + + False + 7 + + + + + Enable subchannel read + True + True + False + 10 + True + True + + + False + False + 8 + + + + + + + True + Options + + + label_item + + + + + 1 + + + + + 1 + + + + + True + end + + + gtk-close + -6 + True + True + True + False + True + + + + False + False + 0 + + + + + False + end + 0 + + + + + + diff --git a/plugins/dfcdrom/cdrcfg-0.1df/main.c b/plugins/dfcdrom/cdrcfg-0.1df/main.c new file mode 100644 index 00000000..c6111207 --- /dev/null +++ b/plugins/dfcdrom/cdrcfg-0.1df/main.c @@ -0,0 +1,290 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "../cfg.c" + +#include +#include + +GtkWidget *MainWindow; + +// function to check if the device is a cdrom +int is_cdrom(const char *device) { + struct stat st; + int fd = -1; + + // check if the file exist + if (stat(device, &st) < 0) return 0; + + // check if is a block or char device + if (!S_ISCHR(st.st_mode) && !S_ISBLK(st.st_mode)) return 0; + + // try to open the device file descriptor + if ((fd = open(device, O_RDONLY | O_NONBLOCK)) < 0) return 0; + +#ifdef __linux__ + // I need a method to check is a device is really a CD-ROM. + // some problems/ideas are: + // - different protocls (ide, scsi, old proprietary...) + // - maybe we can use major number (see linux/major.h) to do some check. + // major number can be retrieved with (st.st_rdev>>8) + // scsi has SCSI_CDROM_MAJOR but does this cover all scsi drives? + // beside IDE major is the same for hard disks and cdroms... + // and DVDs? + // - another idea is to parse /proc, but again IDE, scsi etc have + // different files... I've not found a way to query "which CD drives + // are available?" + // + // Now I use this ioctl which works also if the drive is empty, + // I hope that is implemented for all the drives... here works + // fine: at least doesn't let me to select my HD as CDs ;) + + // try a ioctl to see if it's a CD-ROM device + if (ioctl(fd, CDROM_GET_CAPABILITY, NULL) < 0) { + close(fd); + return 0; + } +#endif + + close(fd); + + // yes, it seems a CD drive! + return 1; +} + +// fill_drives_list: retrieves available cd drives. At the moment it use a quite +// ugly "brute force" method: we check for the most common location for cdrom +// in /dev and chech if they are cdrom devices. +// If your cdrom path is not listed here you'll have to type it in the dialog +// entry yourself (or add it here and recompile). +// Are there any other common entry to add to the list? (especially scsi, I +// deliberately ignored old non standard cdroms... ) +// If you come up with a better method let me know!! +void fill_drives_list(GtkWidget *widget) { + int i; + GtkListStore *store; + GtkTreeIter iter; + +#if defined (__linux__) + static const char *cdrom_devices[] = { + "/dev/cdrom", + "/dev/cdrom0", + "/dev/cdrom1", + "/dev/cdrom2", + "/dev/cdrom3", + "/dev/cdroms/cdrom0", + "/dev/cdroms/cdrom1", + "/dev/cdroms/cdrom2", + "/dev/cdroms/cdrom3", + "/dev/hda", + "/dev/hdb", + "/dev/hdc", + "/dev/hdd", + "/dev/sda", + "/dev/sdb", + "/dev/sdc", + "/dev/sdd", + "/dev/scd0", + "/dev/scd1", + "/dev/scd2", + "/dev/scd3", + "/dev/optcd", + ""}; +#elif defined (__FreeBSD__) + static const char *cdrom_devices[] = { + "/dev/cd0", + "/dev/cd1", + "/dev/cd2", + "/dev/cd3", + ""}; +#elif defined (__sun) + char cdrom_devices[256][256]; + FILE *fp; + char buf[256], *devname, *nick; + + memset(cdrom_devices, 0, sizeof(cdrom_devices)); + + i = 0; + + fp = popen("eject -l", "r"); + + if (fp != NULL) { + while (!feof(fp) && i < 256) { + fgets(buf, 256, fp); + + devname = strtok(buf, " "); + nick = strtok(NULL, " "); + + if (devname == NULL || nick == NULL) continue; + + if (strstr(nick, "cdrom") != NULL) { + strcpy(cdrom_devices[i++], devname); + } + } + + pclose(fp); + } +#else + static const char *cdrom_devices[] = { "" }; +#endif + + store = gtk_list_store_new(1, G_TYPE_STRING); + + // first we put our current drive + if (CdromDev[0] != '\0') { + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, CdromDev, -1); + } + + i = 0; + + // scan cdrom_devices for real cdrom and add them to list + while (cdrom_devices[i][0] != '\0') { + // check that is not our current dev (already in list) + if (strcmp(cdrom_devices[i], CdromDev) != 0) { + // check that is a cdrom device + if (is_cdrom(cdrom_devices[i])) { + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, cdrom_devices[i], -1); + } + } + ++i; + } + + gtk_combo_box_set_model(GTK_COMBO_BOX(widget), GTK_TREE_MODEL(store)); + gtk_combo_box_entry_set_text_column(GTK_COMBO_BOX_ENTRY(widget), 0); +} + +static void OnConfigExit(GtkWidget *widget, gpointer user_data) { + GladeXML *xml; + + xml = glade_get_widget_tree(MainWindow); + + widget = glade_xml_get_widget(xml, "cddev_comboboxentry"); + strncpy(CdromDev, gtk_entry_get_text(GTK_ENTRY(GTK_BIN(widget)->child)), 255); + CdromDev[255] = '\0'; + + widget = glade_xml_get_widget(xml, "readmode_combobox"); + ReadMode = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); + + widget = glade_xml_get_widget(xml, "subQ_button"); + UseSubQ = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); + + widget = glade_xml_get_widget(xml, "spinCacheSize"); + CacheSize = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget)); + + widget = glade_xml_get_widget(xml, "spinCdrSpeed"); + CdrSpeed = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget)); + + widget = glade_xml_get_widget(xml, "comboSpinDown"); + SpinDown = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); + + SaveConf(); + + gtk_widget_destroy(widget); + gtk_exit(0); +} + +long CDRconfigure() { + GladeXML *xml; + GtkWidget *widget; + + LoadConf(); + + xml = glade_xml_new(DATADIR "dfcdrom.glade2", "CfgWnd", NULL); + if (xml == NULL) { + g_warning("We could not load the interface!"); + return -1; + } + + MainWindow = glade_xml_get_widget(xml, "CfgWnd"); + gtk_window_set_title(GTK_WINDOW(MainWindow), _("CDR configuration")); + + widget = glade_xml_get_widget(xml, "CfgWnd"); + g_signal_connect_data(GTK_OBJECT(widget), "delete_event", + GTK_SIGNAL_FUNC(OnConfigExit), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "cfg_closebutton"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConfigExit), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "cddev_comboboxentry"); + fill_drives_list(widget); + gtk_entry_set_text(GTK_ENTRY(GTK_BIN(widget)->child), CdromDev); + + widget = glade_xml_get_widget(xml, "readmode_combobox"); + gtk_combo_box_set_active(GTK_COMBO_BOX(widget), ReadMode); + + widget = glade_xml_get_widget(xml, "subQ_button"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), UseSubQ); + + widget = glade_xml_get_widget(xml, "spinCacheSize"); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), (float)CacheSize); + + widget = glade_xml_get_widget(xml, "spinCdrSpeed"); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), (float)CdrSpeed); + + widget = glade_xml_get_widget(xml, "comboSpinDown"); + gtk_combo_box_set_active(GTK_COMBO_BOX(widget), SpinDown); + + gtk_widget_show(MainWindow); + gtk_main(); + + return 0; +} + +void CDRabout() { + GtkWidget *widget; + const char *authors[]= {"linuzappz ", + "xobro <_xobro_@tin.it>", + "Wei Mingzhi ", NULL}; + + widget = gtk_about_dialog_new(); + gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(widget), "CD-ROM Device Reader"); + gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "1.0"); + gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors); + gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(widget), "http://pcsxr.codeplex.com/"); + + gtk_dialog_run(GTK_DIALOG(widget)); + gtk_widget_destroy(widget); +} + +int main(int argc, char *argv[]) { +#ifdef ENABLE_NLS + setlocale(LC_ALL, ""); + bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); + textdomain(GETTEXT_PACKAGE); +#endif + + gtk_set_locale(); + gtk_init(&argc, &argv); + + if (argc != 2) return 0; + + if (strcmp(argv[1], "configure") == 0) { + CDRconfigure(); + } else { + CDRabout(); + } + + return 0; +} diff --git a/plugins/dfcdrom/cfg.c b/plugins/dfcdrom/cfg.c new file mode 100644 index 00000000..2bbc8447 --- /dev/null +++ b/plugins/dfcdrom/cfg.c @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "cdr.h" + +char CdromDev[256]; +long ReadMode; +long UseSubQ; +long CacheSize; +long CdrSpeed; +long SpinDown; + +void LoadConf() { + FILE *f; + +#if defined (__sun) + char buf[256], *devname, *nick; + + CdromDev[0] = '\0'; + f = popen("eject -l", "r"); + + if (f != NULL) { + while (!feof(f)) { + fgets(buf, 256, f); + + devname = strtok(buf, " "); + nick = strtok(NULL, " "); + + if (devname == NULL || nick == NULL) continue; + + if (strstr(nick, "cdrom") != NULL) { + strcpy(CdromDev, devname); + break; + } + } + + pclose(f); + } +#else + strcpy(CdromDev, DEV_DEF); +#endif + + ReadMode = THREADED; + UseSubQ = 0; + CacheSize = 64; + CdrSpeed = 0; + SpinDown = SPINDOWN_VENDOR_SPECIFIC; + + f = fopen("dfcdrom.cfg", "r"); + if (f == NULL) return; + + fscanf(f, "CdromDev = %s\n", CdromDev); + fscanf(f, "ReadMode = %ld\n", &ReadMode); + fscanf(f, "UseSubQ = %ld\n", &UseSubQ); + fscanf(f, "CacheSize = %ld\n", &CacheSize); + fscanf(f, "CdrSpeed = %ld\n", &CdrSpeed); + fscanf(f, "SpinDown = %ld\n", &SpinDown); + fclose(f); + + if (ReadMode >= READ_MODES) ReadMode = THREADED; + if (CacheSize <= 0) CacheSize = 32; + if (CacheSize > 2048) CacheSize = 2048; + if (SpinDown <= 0) SpinDown = SPINDOWN_VENDOR_SPECIFIC; + if (SpinDown > SPINDOWN_32MIN) SpinDown = SPINDOWN_32MIN; +} + +void SaveConf() { + FILE *f; + + f = fopen("dfcdrom.cfg", "w"); + if (f == NULL) + return; + + fprintf(f, "CdromDev = %s\n", CdromDev); + fprintf(f, "ReadMode = %ld\n", ReadMode); + fprintf(f, "UseSubQ = %ld\n", UseSubQ); + fprintf(f, "CacheSize = %ld\n", CacheSize); + fprintf(f, "CdrSpeed = %ld\n", CdrSpeed); + fprintf(f, "SpinDown = %ld\n", SpinDown); + fclose(f); +} diff --git a/plugins/dfcdrom/util.c b/plugins/dfcdrom/util.c new file mode 100644 index 00000000..c80c8726 --- /dev/null +++ b/plugins/dfcdrom/util.c @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "cdr.h" + +unsigned int msf_to_lba(char m, char s, char f) { + return (m * CD_SECS + s) * CD_FRAMES + f - CD_MSF_OFFSET; +} + +void lba_to_msf(unsigned int s, unsigned char *msf) { + s += CD_MSF_OFFSET; + + msf[0] = s / CD_FRAMES / CD_SECS; + s = s - msf[0] * CD_FRAMES * CD_SECS; + msf[1] = s / CD_FRAMES; + s = s - msf[1] * CD_FRAMES; + msf[2] = s; +} + +void DecodeRawSubData(unsigned char *subbuffer) { + unsigned char subQData[12]; + int i; + + memset(subQData, 0, sizeof(subQData)); + + for (i = 0; i < 8 * 12; i++) { + if (subbuffer[i] & (1 << 6)) { // only subchannel Q is needed + subQData[i >> 3] |= (1 << (7 - (i & 7))); + } + } + + memcpy(&subbuffer[12], subQData, 12); +} + +// lookup table for crc calculation +static unsigned short crctab[256] = { + 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, 0x8108, + 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, 0x1231, 0x0210, + 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, 0x9339, 0x8318, 0xB37B, + 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE, 0x2462, 0x3443, 0x0420, 0x1401, + 0x64E6, 0x74C7, 0x44A4, 0x5485, 0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, + 0xF5CF, 0xC5AC, 0xD58D, 0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, + 0x5695, 0x46B4, 0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, + 0xC7BC, 0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823, + 0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B, 0x5AF5, + 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12, 0xDBFD, 0xCBDC, + 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A, 0x6CA6, 0x7C87, 0x4CE4, + 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41, 0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, + 0xAD2A, 0xBD0B, 0x8D68, 0x9D49, 0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, + 0x2E32, 0x1E51, 0x0E70, 0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, + 0x9F59, 0x8F78, 0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, + 0xE16F, 0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067, + 0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E, 0x02B1, + 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256, 0xB5EA, 0xA5CB, + 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D, 0x34E2, 0x24C3, 0x14A0, + 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xA7DB, 0xB7FA, 0x8799, 0x97B8, + 0xE75F, 0xF77E, 0xC71D, 0xD73C, 0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, + 0x7676, 0x4615, 0x5634, 0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, + 0xB98A, 0xA9AB, 0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, + 0x28A3, 0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A, + 0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92, 0xFD2E, + 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9, 0x7C26, 0x6C07, + 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1, 0xEF1F, 0xFF3E, 0xCF5D, + 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8, 0x6E17, 0x7E36, 0x4E55, 0x5E74, + 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0 +}; + +unsigned short calcCrc(unsigned char *d, int len) { + unsigned short crc = 0; + int i; + + for (i = 0; i < len; i++) { + crc = crctab[(crc >> 8) ^ d[i]] ^ (crc << 8); + } + + return ~crc; +} diff --git a/plugins/dfinput/Makefile.am b/plugins/dfinput/Makefile.am new file mode 100644 index 00000000..0f5138a6 --- /dev/null +++ b/plugins/dfinput/Makefile.am @@ -0,0 +1,23 @@ +bindir = @libdir@/games/psemu/ +libdir = @libdir@/games/psemu/ + +lib_LTLIBRARIES = libDFInput.la + +libDFInput_la_SOURCES = cfg.c pad.c pad.h sdljoy.c xkb.c analog.c +libDFInput_la_LDFLAGS = -module -avoid-version -lpthread -lX11 \ + `$(SDL_CONFIG) --libs` -L/usr/X11R6/lib64 -L/usr/X11R6/lib + +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) -I/usr/X11R6/include \ + -I../../include -I../../libpcsxcore $(SDL_CFLAGS) + +bin_PROGRAMS = cfgDFInput +cfgDFInput_SOURCES = cfg-gtk2.c pad.h +cfgDFInput_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) +cfgDFInput_LDFLAGS = $(SDL_LIBS) -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 + +glade_DATA = dfinput.glade2 +gladedir = $(datadir)/psemu/ +EXTRA_DIST = $(glade_DATA) diff --git a/plugins/dfinput/Makefile.in b/plugins/dfinput/Makefile.in new file mode 100644 index 00000000..854f5dfd --- /dev/null +++ b/plugins/dfinput/Makefile.in @@ -0,0 +1,600 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = cfgDFInput$(EXEEXT) +subdir = plugins/dfinput +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(gladedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libDFInput_la_LIBADD = +am_libDFInput_la_OBJECTS = cfg.lo pad.lo sdljoy.lo xkb.lo analog.lo +libDFInput_la_OBJECTS = $(am_libDFInput_la_OBJECTS) +libDFInput_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libDFInput_la_LDFLAGS) $(LDFLAGS) -o $@ +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_cfgDFInput_OBJECTS = cfg-gtk2.$(OBJEXT) +cfgDFInput_OBJECTS = $(am_cfgDFInput_OBJECTS) +am__DEPENDENCIES_1 = +cfgDFInput_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +cfgDFInput_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(cfgDFInput_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libDFInput_la_SOURCES) $(cfgDFInput_SOURCES) +DIST_SOURCES = $(libDFInput_la_SOURCES) $(cfgDFInput_SOURCES) +gladeDATA_INSTALL = $(INSTALL_DATA) +DATA = $(glade_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @libdir@/games/psemu/ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@/games/psemu/ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +lib_LTLIBRARIES = libDFInput.la +libDFInput_la_SOURCES = cfg.c pad.c pad.h sdljoy.c xkb.c analog.c +libDFInput_la_LDFLAGS = -module -avoid-version -lpthread -lX11 \ + `$(SDL_CONFIG) --libs` -L/usr/X11R6/lib64 -L/usr/X11R6/lib + +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) -I/usr/X11R6/include \ + -I../../include -I../../libpcsxcore $(SDL_CFLAGS) + +cfgDFInput_SOURCES = cfg-gtk2.c pad.h +cfgDFInput_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) +cfgDFInput_LDFLAGS = $(SDL_LIBS) -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 +glade_DATA = dfinput.glade2 +gladedir = $(datadir)/psemu/ +EXTRA_DIST = $(glade_DATA) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/dfinput/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/dfinput/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libDFInput.la: $(libDFInput_la_OBJECTS) $(libDFInput_la_DEPENDENCIES) + $(libDFInput_la_LINK) -rpath $(libdir) $(libDFInput_la_OBJECTS) $(libDFInput_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +cfgDFInput$(EXEEXT): $(cfgDFInput_OBJECTS) $(cfgDFInput_DEPENDENCIES) + @rm -f cfgDFInput$(EXEEXT) + $(cfgDFInput_LINK) $(cfgDFInput_OBJECTS) $(cfgDFInput_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/analog.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfg-gtk2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pad.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdljoy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkb.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-gladeDATA: $(glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(glade_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \ + $(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \ + done + +uninstall-gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(glade_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \ + rm -f "$(DESTDIR)$(gladedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-gladeDATA + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-gladeDATA \ + uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-gladeDATA install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-gladeDATA uninstall-libLTLIBRARIES + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/plugins/dfinput/analog.c b/plugins/dfinput/analog.c new file mode 100644 index 00000000..8d14b00b --- /dev/null +++ b/plugins/dfinput/analog.c @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2009, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "pad.h" + +void InitAnalog() { + g.PadState[0].AnalogStatus[ANALOG_LEFT][0] = 127; + g.PadState[0].AnalogStatus[ANALOG_LEFT][1] = 127; + g.PadState[0].AnalogStatus[ANALOG_RIGHT][0] = 127; + g.PadState[0].AnalogStatus[ANALOG_RIGHT][1] = 127; + g.PadState[1].AnalogStatus[ANALOG_LEFT][0] = 127; + g.PadState[1].AnalogStatus[ANALOG_LEFT][1] = 127; + g.PadState[1].AnalogStatus[ANALOG_RIGHT][0] = 127; + g.PadState[1].AnalogStatus[ANALOG_RIGHT][1] = 127; + + memset(g.PadState[0].AnalogKeyStatus, 0, sizeof(g.PadState[0].AnalogKeyStatus)); + memset(g.PadState[1].AnalogKeyStatus, 0, sizeof(g.PadState[1].AnalogKeyStatus)); +} + +void CheckAnalog() { + int i, j, k, val; + uint8_t n; + + for (i = 0; i < 2; i++) { + if (g.cfg.PadDef[i].Type != PSE_PAD_TYPE_ANALOGPAD) { + continue; + } + + for (j = 0; j < ANALOG_TOTAL; j++) { + for (k = 0; k < 4; k++) { + if (g.PadState[i].AnalogKeyStatus[j][k]) { + switch (k) { + case ANALOG_XP: g.PadState[i].AnalogStatus[j][0] = 255; k++; break; + case ANALOG_XM: g.PadState[i].AnalogStatus[j][0] = 0; break; + case ANALOG_YP: g.PadState[i].AnalogStatus[j][1] = 255; k++; break; + case ANALOG_YM: g.PadState[i].AnalogStatus[j][1] = 0; break; + } + continue; + } + + switch (g.cfg.PadDef[i].AnalogDef[j][k].JoyEvType) { + case AXIS: + n = abs(g.cfg.PadDef[i].AnalogDef[j][k].J.Axis) - 1; + + if (g.cfg.PadDef[i].AnalogDef[j][k].J.Axis > 0) { + val = SDL_JoystickGetAxis(g.PadState[i].JoyDev, n); + if (val >= 0) { + val += 32640; + val /= 256; + + switch (k) { + case ANALOG_XP: g.PadState[i].AnalogStatus[j][0] = val; break; + case ANALOG_XM: g.PadState[i].AnalogStatus[j][0] = 255 - val; break; + case ANALOG_YP: g.PadState[i].AnalogStatus[j][1] = val; break; + case ANALOG_YM: g.PadState[i].AnalogStatus[j][1] = 255 - val; break; + } + } + } else if (g.cfg.PadDef[i].AnalogDef[j][k].J.Axis < 0) { + val = SDL_JoystickGetAxis(g.PadState[i].JoyDev, n); + if (val <= 0) { + val += 32640; + val /= 256; + + switch (k) { + case ANALOG_XP: g.PadState[i].AnalogStatus[j][0] = 255 - val; break; + case ANALOG_XM: g.PadState[i].AnalogStatus[j][0] = val; break; + case ANALOG_YP: g.PadState[i].AnalogStatus[j][1] = 255 - val; break; + case ANALOG_YM: g.PadState[i].AnalogStatus[j][1] = val; break; + } + } + } + break; + + case HAT: + n = (g.cfg.PadDef[i].AnalogDef[j][k].J.Hat >> 8); + + g.PadState[i].AnalogStatus[j][0] = 0; + + if (SDL_JoystickGetHat(g.PadState[i].JoyDev, n) & (g.cfg.PadDef[i].AnalogDef[j][k].J.Hat & 0xFF)) { + switch (k) { + case ANALOG_XP: g.PadState[i].AnalogStatus[j][0] = 255; k++; break; + case ANALOG_XM: g.PadState[i].AnalogStatus[j][0] = 0; break; + case ANALOG_YP: g.PadState[i].AnalogStatus[j][1] = 255; k++; break; + case ANALOG_YM: g.PadState[i].AnalogStatus[j][1] = 0; break; + } + } else { + switch (k) { + case ANALOG_XP: g.PadState[i].AnalogStatus[j][0] = 127; break; + case ANALOG_XM: g.PadState[i].AnalogStatus[j][0] = 127; break; + case ANALOG_YP: g.PadState[i].AnalogStatus[j][1] = 127; break; + case ANALOG_YM: g.PadState[i].AnalogStatus[j][1] = 127; break; + } + } + break; + + case BUTTON: + if (SDL_JoystickGetButton(g.PadState[i].JoyDev, g.cfg.PadDef[i].AnalogDef[j][k].J.Button)) { + switch (k) { + case ANALOG_XP: g.PadState[i].AnalogStatus[j][0] = 255; k++; break; + case ANALOG_XM: g.PadState[i].AnalogStatus[j][0] = 0; break; + case ANALOG_YP: g.PadState[i].AnalogStatus[j][1] = 255; k++; break; + case ANALOG_YM: g.PadState[i].AnalogStatus[j][1] = 0; break; + } + } else { + switch (k) { + case ANALOG_XP: g.PadState[i].AnalogStatus[j][0] = 127; break; + case ANALOG_XM: g.PadState[i].AnalogStatus[j][0] = 127; break; + case ANALOG_YP: g.PadState[i].AnalogStatus[j][1] = 127; break; + case ANALOG_YM: g.PadState[i].AnalogStatus[j][1] = 127; break; + } + } + break; + + default: + switch (k) { + case ANALOG_XP: g.PadState[i].AnalogStatus[j][0] = 127; break; + case ANALOG_XM: g.PadState[i].AnalogStatus[j][0] = 127; break; + case ANALOG_YP: g.PadState[i].AnalogStatus[j][1] = 127; break; + case ANALOG_YM: g.PadState[i].AnalogStatus[j][1] = 127; break; + } + break; + } + } + } + } +} + +int AnalogKeyPressed(uint16_t Key) { + int i, j, k; + + for (i = 0; i < 2; i++) { + if (g.cfg.PadDef[i].Type != PSE_PAD_TYPE_ANALOGPAD) { + continue; + } + + for (j = 0; j < ANALOG_TOTAL; j++) { + for (k = 0; k < 4; k++) { + if (g.cfg.PadDef[i].AnalogDef[j][k].Key == Key) { + g.PadState[i].AnalogKeyStatus[j][k] = 1; + return 1; + } + } + } + } + + return 0; +} + +int AnalogKeyReleased(uint16_t Key) { + int i, j, k; + + for (i = 0; i < 2; i++) { + if (g.cfg.PadDef[i].Type != PSE_PAD_TYPE_ANALOGPAD) { + continue; + } + + for (j = 0; j < ANALOG_TOTAL; j++) { + for (k = 0; k < 4; k++) { + if (g.cfg.PadDef[i].AnalogDef[j][k].Key == Key) { + g.PadState[i].AnalogKeyStatus[j][k] = 0; + return 1; + } + } + } + } + + return 0; +} diff --git a/plugins/dfinput/cfg-gtk2.c b/plugins/dfinput/cfg-gtk2.c new file mode 100644 index 00000000..cfbd8fa2 --- /dev/null +++ b/plugins/dfinput/cfg-gtk2.c @@ -0,0 +1,738 @@ +/* + * Copyright (c) 2009, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "cfg.c" + +#include +#include +#include +#include + +GtkWidget *MainWindow; + +const int DPad[DKEY_TOTAL] = { + DKEY_UP, + DKEY_DOWN, + DKEY_LEFT, + DKEY_RIGHT, + DKEY_CROSS, + DKEY_CIRCLE, + DKEY_SQUARE, + DKEY_TRIANGLE, + DKEY_L1, + DKEY_R1, + DKEY_L2, + DKEY_R2, + DKEY_SELECT, + DKEY_START, + DKEY_L3, + DKEY_R3 +}; + +const char *DPadText[DKEY_TOTAL] = { + N_("D-Pad Up"), + N_("D-Pad Down"), + N_("D-Pad Left"), + N_("D-Pad Right"), + N_("Cross"), + N_("Circle"), + N_("Square"), + N_("Triangle"), + N_("L1"), + N_("R1"), + N_("L2"), + N_("R2"), + N_("Select"), + N_("Start"), + N_("L3"), + N_("R3") +}; + +const char *AnalogText[] = { + N_("L-Stick Right"), + N_("L-Stick Left"), + N_("L-Stick Down"), + N_("L-Stick Up"), + N_("R-Stick Right"), + N_("R-Stick Left"), + N_("R-Stick Down"), + N_("R-Stick Up") +}; + +static int GetSelectedKeyIndex(int padnum) { + GladeXML *xml; + GtkTreeSelection *selection; + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + gboolean selected; + int i; + + xml = glade_get_widget_tree(MainWindow); + + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(glade_xml_get_widget(xml, padnum == 0 ? "treeview1" : "treeview2"))); + selected = gtk_tree_selection_get_selected(selection, &model, &iter); + + if (!selected) { + return -1; + } + + path = gtk_tree_model_get_path(model, &iter); + i = *gtk_tree_path_get_indices(path); + gtk_tree_path_free(path); + + return i; +} + +static void GetKeyDescription(char *buf, int joynum, int key) { + const char *hatname[16] = {_("Centered"), _("Up"), _("Right"), _("Rightup"), + _("Down"), "", _("Rightdown"), "", _("Left"), _("Leftup"), "", "", + _("Leftdown"), "", "", ""}; + + switch (g.cfg.PadDef[joynum].KeyDef[key].JoyEvType) { + case BUTTON: + sprintf(buf, _("Joystick: Button %d"), g.cfg.PadDef[joynum].KeyDef[key].J.Button); + break; + + case AXIS: + sprintf(buf, _("Joystick: Axis %d%c"), abs(g.cfg.PadDef[joynum].KeyDef[key].J.Axis) - 1, + g.cfg.PadDef[joynum].KeyDef[key].J.Axis > 0 ? '+' : '-'); + break; + + case HAT: + sprintf(buf, _("Joystick: Hat %d %s"), (g.cfg.PadDef[joynum].KeyDef[key].J.Hat >> 8), + hatname[g.cfg.PadDef[joynum].KeyDef[key].J.Hat & 0x0F]); + break; + + case NONE: + default: + buf[0] = '\0'; + break; + } + + if (g.cfg.PadDef[joynum].KeyDef[key].Key != 0) { + if (buf[0] != '\0') { + strcat(buf, " / "); + } + + strcat(buf, _("Keyboard:")); + strcat(buf, " "); + strcat(buf, XKeysymToString(g.cfg.PadDef[joynum].KeyDef[key].Key)); + } else if (buf[0] == '\0') { + strcpy(buf, _("(Not Set)")); + } +} + +static void GetAnalogDescription(char *buf, int joynum, int analognum, int dir) { + const char *hatname[16] = {_("Centered"), _("Up"), _("Right"), _("Rightup"), + _("Down"), "", _("Rightdown"), "", _("Left"), _("Leftup"), "", "", + _("Leftdown"), "", "", ""}; + + switch (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].JoyEvType) { + case BUTTON: + sprintf(buf, _("Joystick: Button %d"), g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Button); + break; + + case AXIS: + sprintf(buf, _("Joystick: Axis %d%c"), abs(g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Axis) - 1, + g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Axis > 0 ? '+' : '-'); + break; + + case HAT: + sprintf(buf, _("Joystick: Hat %d %s"), (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Hat >> 8), + hatname[g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Hat & 0x0F]); + break; + + case NONE: + default: + buf[0] = '\0'; + break; + } + + if (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key != 0) { + if (buf[0] != '\0') { + strcat(buf, " / "); + } + + strcat(buf, _("Keyboard:")); + strcat(buf, " "); + strcat(buf, XKeysymToString(g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key)); + } else if (buf[0] == '\0') { + strcpy(buf, _("(Not Set)")); + } +} + +static void UpdateKeyList() { + const char *widgetname[2] = {"treeview1", "treeview2"}; + + GladeXML *xml; + GtkWidget *widget; + GtkListStore *store; + GtkTreeIter iter; + int i, j; + char buf[256]; + + xml = glade_get_widget_tree(MainWindow); + + for (i = 0; i < 2; i++) { + int total; + + if (g.cfg.PadDef[i].Type == PSE_PAD_TYPE_ANALOGPAD) { + total = DKEY_TOTAL; + } else { + total = DKEY_TOTAL - 2; + } + + widget = glade_xml_get_widget(xml, widgetname[i]); + + store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING); + + for (j = 0; j < total; j++) { + gtk_list_store_append(store, &iter); + GetKeyDescription(buf, i, DPad[j]); + gtk_list_store_set(store, &iter, 0, _(DPadText[j]), 1, buf, -1); + } + + if (g.cfg.PadDef[i].Type == PSE_PAD_TYPE_ANALOGPAD) { + for (j = 0; j < 8; j++) { + gtk_list_store_append(store, &iter); + GetAnalogDescription(buf, i, j / 4, j % 4); + gtk_list_store_set(store, &iter, 0, _(AnalogText[j]), 1, buf, -1); + } + } + + gtk_tree_view_set_model(GTK_TREE_VIEW(widget), GTK_TREE_MODEL(store)); + g_object_unref(G_OBJECT(store)); + gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widget), TRUE); + gtk_widget_show(widget); + } +} + +static void UpdateKey() { + const char *widgetname[2] = {"treeview1", "treeview2"}; + int i, index; + GladeXML *xml; + GtkWidget *widget; + GtkTreeModel *model; + GtkTreeIter iter; + GValue value = {0, }; + char buf[256]; + + xml = glade_get_widget_tree(MainWindow); + + for (i = 0; i < 2; i++) { + index = GetSelectedKeyIndex(i); + if (index == -1) continue; + + widget = glade_xml_get_widget(xml, widgetname[i]); + gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)), &model, &iter); + + if (index < DKEY_TOTAL) { + GetKeyDescription(buf, i, DPad[index]); + } else { + GetAnalogDescription(buf, i, (index - DKEY_TOTAL) / 4, (index - DKEY_TOTAL) % 4); + } + + g_value_init(&value, G_TYPE_STRING); + g_value_set_string(&value, buf); + gtk_list_store_set_value(GTK_LIST_STORE(model), &iter, 1, &value); + } +} + +static void OnConfigExit(GtkWidget *widget, gpointer user_data) { + SavePADConfig(); + + gtk_widget_destroy(widget); + SDL_Quit(); + + gtk_exit(0); +} + +static void TreeSelectionChanged(GtkTreeSelection *selection, gpointer user_data) { + GladeXML *xml; + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + + gboolean selected; + int i; + + selected = gtk_tree_selection_get_selected(selection, &model, &iter); + + if (selected) { + path = gtk_tree_model_get_path(model, &iter); + i = *gtk_tree_path_get_indices(path); + gtk_tree_path_free(path); + + // If a row was selected, and the row is not blank, we can now enable + // some of the disabled widgets + xml = glade_get_widget_tree(MainWindow); + + if ((int)user_data == 0) { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btnchange1")), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btnreset1")), TRUE); + } else { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btnchange2")), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btnreset2")), TRUE); + } + } else { + xml = glade_get_widget_tree(MainWindow); + + if ((int)user_data == 0) { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btnchange1")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btnreset1")), FALSE); + } else { + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btnchange2")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(glade_xml_get_widget(xml, "btnreset2")), FALSE); + } + } +} + +static void OnDeviceChanged(GtkWidget *widget, gpointer user_data) { + int n = (int)user_data, current = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); + current--; + g.cfg.PadDef[n].DevNum = current; +} + +static void OnTypeChanged(GtkWidget *widget, gpointer user_data) { + int n = (int)user_data, current = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); + g.cfg.PadDef[n].Type = (current == 0 ? PSE_PAD_TYPE_STANDARD : PSE_PAD_TYPE_ANALOGPAD); + + UpdateKeyList(); +} + +static void OnThreadedToggled(GtkWidget *widget, gpointer user_data) { + g.cfg.Threaded = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); +} + +static void ReadDKeyEvent(int padnum, int key) { + SDL_Joystick *js; + time_t t; + GdkEvent *ge; + int i; + Sint16 axis, numAxes = 0, InitAxisPos[256], PrevAxisPos[256]; + + if (g.cfg.PadDef[padnum].DevNum >= 0) { + js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); + SDL_JoystickEventState(SDL_IGNORE); + + SDL_JoystickUpdate(); + + numAxes = SDL_JoystickNumAxes(js); + if (numAxes > 256) numAxes = 256; + + for (i = 0; i < numAxes; i++) { + InitAxisPos[i] = PrevAxisPos[i] = SDL_JoystickGetAxis(js, i); + } + } else { + js = NULL; + } + + t = time(NULL); + + while (time(NULL) < t + 10) { + // check joystick events + if (js != NULL) { + SDL_JoystickUpdate(); + + for (i = 0; i < SDL_JoystickNumButtons(js); i++) { + if (SDL_JoystickGetButton(js, i)) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = BUTTON; + g.cfg.PadDef[padnum].KeyDef[key].J.Button = i; + goto end; + } + } + + for (i = 0; i < numAxes; i++) { + axis = SDL_JoystickGetAxis(js, i); + if (abs(axis) > 16383 && (abs(axis - InitAxisPos[i]) > 4096 || abs(axis - PrevAxisPos[i]) > 4096)) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = AXIS; + g.cfg.PadDef[padnum].KeyDef[key].J.Axis = (i + 1) * (axis > 0 ? 1 : -1); + goto end; + } + PrevAxisPos[i] = axis; + } + + for (i = 0; i < SDL_JoystickNumHats(js); i++) { + axis = SDL_JoystickGetHat(js, i); + if (axis != SDL_HAT_CENTERED) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = HAT; + + if (axis & SDL_HAT_UP) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_UP); + } else if (axis & SDL_HAT_DOWN) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_DOWN); + } else if (axis & SDL_HAT_LEFT) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_LEFT); + } else if (axis & SDL_HAT_RIGHT) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_RIGHT); + } + + goto end; + } + } + } + + // check keyboard events + while ((ge = gdk_event_get()) != NULL) { + if (ge->type == GDK_KEY_PRESS) { + if (ge->key.keyval != XK_Escape) { + g.cfg.PadDef[padnum].KeyDef[key].Key = ge->key.keyval; + } + gdk_event_free(ge); + goto end; + } + gdk_event_free(ge); + } + + usleep(5000); + } + +end: + if (js != NULL) { + SDL_JoystickClose(js); + } +} + +static void ReadAnalogEvent(int padnum, int analognum, int analogdir) { + SDL_Joystick *js; + time_t t; + GdkEvent *ge; + int i; + Sint16 axis, numAxes = 0, InitAxisPos[256], PrevAxisPos[256]; + + if (g.cfg.PadDef[padnum].DevNum >= 0) { + js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); + SDL_JoystickEventState(SDL_IGNORE); + + SDL_JoystickUpdate(); + + numAxes = SDL_JoystickNumAxes(js); + if (numAxes > 256) numAxes = 256; + + for (i = 0; i < SDL_JoystickNumAxes(js); i++) { + InitAxisPos[i] = PrevAxisPos[i] = SDL_JoystickGetAxis(js, i); + } + } else { + js = NULL; + } + + t = time(NULL); + + while (time(NULL) < t + 10) { + // check joystick events + if (js != NULL) { + SDL_JoystickUpdate(); + + for (i = 0; i < SDL_JoystickNumButtons(js); i++) { + if (SDL_JoystickGetButton(js, i)) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = BUTTON; + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Button = i; + goto end; + } + } + + for (i = 0; i < numAxes; i++) { + axis = SDL_JoystickGetAxis(js, i); + if (abs(axis) > 16383 && (abs(axis - InitAxisPos[i]) > 4096 || abs(axis - PrevAxisPos[i]) > 4096)) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = AXIS; + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Axis = (i + 1) * (axis > 0 ? 1 : -1); + goto end; + } + PrevAxisPos[i] = axis; + } + + for (i = 0; i < SDL_JoystickNumHats(js); i++) { + axis = SDL_JoystickGetHat(js, i); + if (axis != SDL_HAT_CENTERED) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = HAT; + + if (axis & SDL_HAT_UP) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_UP); + } else if (axis & SDL_HAT_DOWN) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_DOWN); + } else if (axis & SDL_HAT_LEFT) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_LEFT); + } else if (axis & SDL_HAT_RIGHT) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_RIGHT); + } + + goto end; + } + } + } + + // check keyboard events + while ((ge = gdk_event_get()) != NULL) { + if (ge->type == GDK_KEY_PRESS) { + if (ge->key.keyval != XK_Escape) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].Key = ge->key.keyval; + } + gdk_event_free(ge); + goto end; + } + gdk_event_free(ge); + } + + usleep(5000); + } + +end: + if (js != NULL) { + SDL_JoystickClose(js); + } +} + +static void OnChangeClicked(GtkWidget *widget, gpointer user_data) { + int pad = (int)user_data; + int index = GetSelectedKeyIndex(pad); + + if (index == -1) return; + + if (index < DKEY_TOTAL) { + ReadDKeyEvent(pad, DPad[index]); + } else { + index -= DKEY_TOTAL; + ReadAnalogEvent(pad, index / 4, index % 4); + } + + UpdateKey(); +} + +static void OnResetClicked(GtkWidget *widget, gpointer user_data) { + int pad = (int)user_data; + int index = GetSelectedKeyIndex(pad); + + if (index == -1) return; + + if (index < DKEY_TOTAL) { + g.cfg.PadDef[pad].KeyDef[DPad[index]].Key = 0; + g.cfg.PadDef[pad].KeyDef[DPad[index]].JoyEvType = NONE; + g.cfg.PadDef[pad].KeyDef[DPad[index]].J.Button = 0; + } else { + index -= DKEY_TOTAL; + g.cfg.PadDef[pad].AnalogDef[index / 4][index % 4].Key = 0; + g.cfg.PadDef[pad].AnalogDef[index / 4][index % 4].JoyEvType = NONE; + g.cfg.PadDef[pad].AnalogDef[index / 4][index % 4].J.Button = 0; + } + + UpdateKey(); +} + +static void PopulateDevList() { + const char *widgetname[2] = {"combodev1", "combodev2"}; + int i, j, n; + GtkWidget *widget; + GladeXML *xml; + GtkTreeIter iter; + GtkListStore *store; + GtkCellRenderer *renderer; + char buf[256]; + + xml = glade_get_widget_tree(MainWindow); + + for (i = 0; i < 2; i++) { + widget = glade_xml_get_widget(xml, widgetname[i]); + + renderer = gtk_cell_renderer_text_new(); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(widget), renderer, FALSE); + gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(widget), renderer, "text", 0); + + store = gtk_list_store_new(1, G_TYPE_STRING); + + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, _("None"), -1); + + n = SDL_NumJoysticks(); + for (j = 0; j < n; j++) { + sprintf(buf, "%d: %s", j + 1, SDL_JoystickName(j)); + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, buf, -1); + } + + gtk_combo_box_set_model(GTK_COMBO_BOX(widget), GTK_TREE_MODEL(store)); + + n = g.cfg.PadDef[i].DevNum + 1; + if (n > SDL_NumJoysticks()) { + n = 0; + g.cfg.PadDef[i].DevNum = -1; + } + + gtk_combo_box_set_active(GTK_COMBO_BOX(widget), n); + } +} + +long PADconfigure() { + GladeXML *xml; + GtkWidget *widget; + GtkTreeSelection *treesel; + GtkTreeViewColumn *column; + GtkCellRenderer *renderer; + + if (SDL_Init(SDL_INIT_JOYSTICK) == -1) { + fprintf(stderr, "Failed to initialize SDL!\n"); + return -1; + } + + LoadPADConfig(); + + xml = glade_xml_new(DATADIR "dfinput.glade2", "CfgWnd", NULL); + if (xml == NULL) { + g_warning("We could not load the interface!"); + return -1; + } + + MainWindow = glade_xml_get_widget(xml, "CfgWnd"); + gtk_window_set_title(GTK_WINDOW(MainWindow), _("Gamepad/Keyboard Input Configuration")); + + widget = glade_xml_get_widget(xml, "treeview1"); + + // column for key + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Key"), + renderer, "text", 0, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + // column for button + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Button"), + renderer, "text", 1, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); + gtk_tree_selection_set_mode(treesel, GTK_SELECTION_SINGLE); + + g_signal_connect_data(G_OBJECT(treesel), "changed", + G_CALLBACK(TreeSelectionChanged), (gpointer)0, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "treeview2"); + + // column for key + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Key"), + renderer, "text", 0, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + // column for button + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Button"), + renderer, "text", 1, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); + gtk_tree_selection_set_mode(treesel, GTK_SELECTION_SINGLE); + + g_signal_connect_data(G_OBJECT(treesel), "changed", + G_CALLBACK(TreeSelectionChanged), (gpointer)1, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "CfgWnd"); + g_signal_connect_data(GTK_OBJECT(widget), "delete_event", + GTK_SIGNAL_FUNC(OnConfigExit), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btnclose"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConfigExit), NULL, NULL, G_CONNECT_AFTER); + + PopulateDevList(); + UpdateKeyList(); + + widget = glade_xml_get_widget(xml, "checkmt"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), g.cfg.Threaded); + g_signal_connect_data(GTK_OBJECT(widget), "toggled", + GTK_SIGNAL_FUNC(OnThreadedToggled), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "combodev1"); + g_signal_connect_data(GTK_OBJECT(widget), "changed", + GTK_SIGNAL_FUNC(OnDeviceChanged), (gpointer)0, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "combodev2"); + g_signal_connect_data(GTK_OBJECT(widget), "changed", + GTK_SIGNAL_FUNC(OnDeviceChanged), (gpointer)1, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "combotype1"); + gtk_combo_box_set_active(GTK_COMBO_BOX(widget), + g.cfg.PadDef[0].Type == PSE_PAD_TYPE_ANALOGPAD ? 1 : 0); + g_signal_connect_data(GTK_OBJECT(widget), "changed", + GTK_SIGNAL_FUNC(OnTypeChanged), (gpointer)0, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "combotype2"); + gtk_combo_box_set_active(GTK_COMBO_BOX(widget), + g.cfg.PadDef[1].Type == PSE_PAD_TYPE_ANALOGPAD ? 1 : 0); + g_signal_connect_data(GTK_OBJECT(widget), "changed", + GTK_SIGNAL_FUNC(OnTypeChanged), (gpointer)1, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btnchange1"); + gtk_widget_set_sensitive(widget, FALSE); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnChangeClicked), (gpointer)0, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btnreset1"); + gtk_widget_set_sensitive(widget, FALSE); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnResetClicked), (gpointer)0, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btnchange2"); + gtk_widget_set_sensitive(widget, FALSE); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnChangeClicked), (gpointer)1, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "btnreset2"); + gtk_widget_set_sensitive(widget, FALSE); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnResetClicked), (gpointer)1, NULL, G_CONNECT_AFTER); + + gtk_widget_show(MainWindow); + gtk_main(); + + return 0; +} + +void PADabout() { + const char *authors[]= {"Wei Mingzhi ", NULL}; + GtkWidget *widget; + + widget = gtk_about_dialog_new(); + gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(widget), "Gamepad/Keyboard Input"); + gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "1.1"); + gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors); + gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(widget), "http://www.codeplex.com/pcsxr/"); + + gtk_dialog_run(GTK_DIALOG(widget)); + gtk_widget_destroy(widget); +} + +int main(int argc, char *argv[]) { +#ifdef ENABLE_NLS + setlocale(LC_ALL, ""); + bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); + textdomain(GETTEXT_PACKAGE); +#endif + + gtk_set_locale(); + gtk_init(&argc, &argv); + + if (argc > 1 && !strcmp(argv[1], "-about")) { + PADabout(); + } else { + PADconfigure(); + } + + gtk_exit(0); + return 0; +} diff --git a/plugins/dfinput/cfg.c b/plugins/dfinput/cfg.c new file mode 100644 index 00000000..ce9a97f2 --- /dev/null +++ b/plugins/dfinput/cfg.c @@ -0,0 +1,346 @@ +/* + * Copyright (c) 2009, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "pad.h" + +#define CONFIG_FILE "dfinput.cfg" + +GLOBALDATA g; + +static void SetDefaultConfig() { + memset(&g.cfg, 0, sizeof(g.cfg)); + + g.cfg.Threaded = 1; + + g.cfg.PadDef[0].DevNum = 0; + g.cfg.PadDef[1].DevNum = 1; + + g.cfg.PadDef[0].Type = PSE_PAD_TYPE_STANDARD; + g.cfg.PadDef[1].Type = PSE_PAD_TYPE_STANDARD; + + // Pad1 keyboard + g.cfg.PadDef[0].KeyDef[DKEY_SELECT].Key = XK_c; + g.cfg.PadDef[0].KeyDef[DKEY_START].Key = XK_v; + g.cfg.PadDef[0].KeyDef[DKEY_UP].Key = XK_Up; + g.cfg.PadDef[0].KeyDef[DKEY_RIGHT].Key = XK_Right; + g.cfg.PadDef[0].KeyDef[DKEY_DOWN].Key = XK_Down; + g.cfg.PadDef[0].KeyDef[DKEY_LEFT].Key = XK_Left; + g.cfg.PadDef[0].KeyDef[DKEY_L2].Key = XK_e; + g.cfg.PadDef[0].KeyDef[DKEY_R2].Key = XK_t; + g.cfg.PadDef[0].KeyDef[DKEY_L1].Key = XK_w; + g.cfg.PadDef[0].KeyDef[DKEY_R1].Key = XK_r; + g.cfg.PadDef[0].KeyDef[DKEY_TRIANGLE].Key = XK_d; + g.cfg.PadDef[0].KeyDef[DKEY_CIRCLE].Key = XK_x; + g.cfg.PadDef[0].KeyDef[DKEY_CROSS].Key = XK_z; + g.cfg.PadDef[0].KeyDef[DKEY_SQUARE].Key = XK_s; + + // Pad1 joystick + g.cfg.PadDef[0].KeyDef[DKEY_SELECT].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_SELECT].J.Button = 8; + g.cfg.PadDef[0].KeyDef[DKEY_START].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_START].J.Button = 9; + g.cfg.PadDef[0].KeyDef[DKEY_UP].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_UP].J.Axis = -2; + g.cfg.PadDef[0].KeyDef[DKEY_RIGHT].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_RIGHT].J.Axis = 1; + g.cfg.PadDef[0].KeyDef[DKEY_DOWN].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_DOWN].J.Axis = 2; + g.cfg.PadDef[0].KeyDef[DKEY_LEFT].JoyEvType = AXIS; + g.cfg.PadDef[0].KeyDef[DKEY_LEFT].J.Axis = -1; + g.cfg.PadDef[0].KeyDef[DKEY_L2].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_L2].J.Button = 4; + g.cfg.PadDef[0].KeyDef[DKEY_L1].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_L1].J.Button = 6; + g.cfg.PadDef[0].KeyDef[DKEY_R2].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_R2].J.Button = 5; + g.cfg.PadDef[0].KeyDef[DKEY_R1].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_R1].J.Button = 7; + g.cfg.PadDef[0].KeyDef[DKEY_TRIANGLE].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_TRIANGLE].J.Button = 0; + g.cfg.PadDef[0].KeyDef[DKEY_CIRCLE].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_CIRCLE].J.Button = 1; + g.cfg.PadDef[0].KeyDef[DKEY_CROSS].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_CROSS].J.Button = 2; + g.cfg.PadDef[0].KeyDef[DKEY_SQUARE].JoyEvType = BUTTON; + g.cfg.PadDef[0].KeyDef[DKEY_SQUARE].J.Button = 3; + + // Pad2 joystick + g.cfg.PadDef[1].KeyDef[DKEY_SELECT].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_SELECT].J.Button = 8; + g.cfg.PadDef[1].KeyDef[DKEY_START].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_START].J.Button = 9; + g.cfg.PadDef[1].KeyDef[DKEY_UP].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_UP].J.Axis = -2; + g.cfg.PadDef[1].KeyDef[DKEY_RIGHT].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_RIGHT].J.Axis = 1; + g.cfg.PadDef[1].KeyDef[DKEY_DOWN].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_DOWN].J.Axis = 2; + g.cfg.PadDef[1].KeyDef[DKEY_LEFT].JoyEvType = AXIS; + g.cfg.PadDef[1].KeyDef[DKEY_LEFT].J.Axis = -1; + g.cfg.PadDef[1].KeyDef[DKEY_L2].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_L2].J.Button = 4; + g.cfg.PadDef[1].KeyDef[DKEY_L1].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_L1].J.Button = 6; + g.cfg.PadDef[1].KeyDef[DKEY_R2].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_R2].J.Button = 5; + g.cfg.PadDef[1].KeyDef[DKEY_R1].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_R1].J.Button = 7; + g.cfg.PadDef[1].KeyDef[DKEY_TRIANGLE].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_TRIANGLE].J.Button = 0; + g.cfg.PadDef[1].KeyDef[DKEY_CIRCLE].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_CIRCLE].J.Button = 1; + g.cfg.PadDef[1].KeyDef[DKEY_CROSS].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_CROSS].J.Button = 2; + g.cfg.PadDef[1].KeyDef[DKEY_SQUARE].JoyEvType = BUTTON; + g.cfg.PadDef[1].KeyDef[DKEY_SQUARE].J.Button = 3; +} + +void LoadPADConfig() { + FILE *fp; + char buf[256]; + int current, a, b, c; + + SetDefaultConfig(); + + fp = fopen(CONFIG_FILE, "r"); + if (fp == NULL) { + return; + } + + current = 0; + + while (fgets(buf, 256, fp) != NULL) { + if (strncmp(buf, "Threaded=", 9) == 0) { + g.cfg.Threaded = atoi(&buf[9]); + } else if (strncmp(buf, "[PAD", 4) == 0) { + current = atoi(&buf[4]) - 1; + if (current < 0) { + current = 0; + } else if (current > 1) { + current = 1; + } + } else if (strncmp(buf, "DevNum=", 7) == 0) { + g.cfg.PadDef[current].DevNum = atoi(&buf[7]); + } else if (strncmp(buf, "Type=", 5) == 0) { + g.cfg.PadDef[current].Type = atoi(&buf[5]); + } else if (strncmp(buf, "Select=", 7) == 0) { + sscanf(buf, "Select=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_SELECT].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_SELECT].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_SELECT].J.d = c; + } else if (strncmp(buf, "L3=", 3) == 0) { + sscanf(buf, "L3=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_L3].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_L3].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_L3].J.d = c; + } else if (strncmp(buf, "R3=", 3) == 0) { + sscanf(buf, "R3=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_R3].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_R3].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_R3].J.d = c; + } else if (strncmp(buf, "Start=", 6) == 0) { + sscanf(buf, "Start=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_START].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_START].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_START].J.d = c; + } else if (strncmp(buf, "Up=", 3) == 0) { + sscanf(buf, "Up=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_UP].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_UP].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_UP].J.d = c; + } else if (strncmp(buf, "Right=", 6) == 0) { + sscanf(buf, "Right=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_RIGHT].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_RIGHT].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_RIGHT].J.d = c; + } else if (strncmp(buf, "Down=", 5) == 0) { + sscanf(buf, "Down=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_DOWN].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_DOWN].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_DOWN].J.d = c; + } else if (strncmp(buf, "Left=", 5) == 0) { + sscanf(buf, "Left=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_LEFT].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_LEFT].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_LEFT].J.d = c; + } else if (strncmp(buf, "L2=", 3) == 0) { + sscanf(buf, "L2=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_L2].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_L2].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_L2].J.d = c; + } else if (strncmp(buf, "R2=", 3) == 0) { + sscanf(buf, "R2=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_R2].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_R2].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_R2].J.d = c; + } else if (strncmp(buf, "L1=", 3) == 0) { + sscanf(buf, "L1=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_L1].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_L1].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_L1].J.d = c; + } else if (strncmp(buf, "R1=", 3) == 0) { + sscanf(buf, "R1=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_R1].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_R1].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_R1].J.d = c; + } else if (strncmp(buf, "Triangle=", 9) == 0) { + sscanf(buf, "Triangle=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_TRIANGLE].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_TRIANGLE].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_TRIANGLE].J.d = c; + } else if (strncmp(buf, "Circle=", 7) == 0) { + sscanf(buf, "Circle=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_CIRCLE].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_CIRCLE].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_CIRCLE].J.d = c; + } else if (strncmp(buf, "Cross=", 6) == 0) { + sscanf(buf, "Cross=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_CROSS].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_CROSS].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_CROSS].J.d = c; + } else if (strncmp(buf, "Square=", 7) == 0) { + sscanf(buf, "Square=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].KeyDef[DKEY_SQUARE].Key = a; + g.cfg.PadDef[current].KeyDef[DKEY_SQUARE].JoyEvType = b; + g.cfg.PadDef[current].KeyDef[DKEY_SQUARE].J.d = c; + } else if (strncmp(buf, "LeftAnalogXP=", 13) == 0) { + sscanf(buf, "LeftAnalogXP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XP].J.d = c; + } else if (strncmp(buf, "LeftAnalogXM=", 13) == 0) { + sscanf(buf, "LeftAnalogXM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_XM].J.d = c; + } else if (strncmp(buf, "LeftAnalogYP=", 13) == 0) { + sscanf(buf, "LeftAnalogYP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YP].J.d = c; + } else if (strncmp(buf, "LeftAnalogYM=", 13) == 0) { + sscanf(buf, "LeftAnalogYM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_LEFT][ANALOG_YM].J.d = c; + } else if (strncmp(buf, "RightAnalogXP=", 14) == 0) { + sscanf(buf, "RightAnalogXP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XP].J.d = c; + } else if (strncmp(buf, "RightAnalogXM=", 14) == 0) { + sscanf(buf, "RightAnalogXM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_XM].J.d = c; + } else if (strncmp(buf, "RightAnalogYP=", 14) == 0) { + sscanf(buf, "RightAnalogYP=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YP].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YP].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YP].J.d = c; + } else if (strncmp(buf, "RightAnalogYM=", 14) == 0) { + sscanf(buf, "RightAnalogYM=%d,%d,%d", &a, &b, &c); + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YM].Key = a; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YM].JoyEvType = b; + g.cfg.PadDef[current].AnalogDef[ANALOG_RIGHT][ANALOG_YM].J.d = c; + } + } + + fclose(fp); +} + +void SavePADConfig() { + FILE *fp; + int i; + + fp = fopen(CONFIG_FILE, "w"); + if (fp == NULL) { + return; + } + + fprintf(fp, "[CONFIG]\n"); + fprintf(fp, "Threaded=%d\n", g.cfg.Threaded); + fprintf(fp, "\n"); + + for (i = 0; i < 2; i++) { + fprintf(fp, "[PAD%d]\n", i + 1); + fprintf(fp, "DevNum=%d\n", g.cfg.PadDef[i].DevNum); + fprintf(fp, "Type=%d\n", g.cfg.PadDef[i].Type); + + fprintf(fp, "Select=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_SELECT].Key, + g.cfg.PadDef[i].KeyDef[DKEY_SELECT].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_SELECT].J.d); + fprintf(fp, "L3=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_L3].Key, + g.cfg.PadDef[i].KeyDef[DKEY_L3].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_L3].J.d); + fprintf(fp, "R3=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_R3].Key, + g.cfg.PadDef[i].KeyDef[DKEY_R3].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_R3].J.d); + fprintf(fp, "Start=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_START].Key, + g.cfg.PadDef[i].KeyDef[DKEY_START].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_START].J.d); + fprintf(fp, "Up=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_UP].Key, + g.cfg.PadDef[i].KeyDef[DKEY_UP].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_UP].J.d); + fprintf(fp, "Right=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_RIGHT].Key, + g.cfg.PadDef[i].KeyDef[DKEY_RIGHT].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_RIGHT].J.d); + fprintf(fp, "Down=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_DOWN].Key, + g.cfg.PadDef[i].KeyDef[DKEY_DOWN].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_DOWN].J.d); + fprintf(fp, "Left=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_LEFT].Key, + g.cfg.PadDef[i].KeyDef[DKEY_LEFT].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_LEFT].J.d); + fprintf(fp, "L2=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_L2].Key, + g.cfg.PadDef[i].KeyDef[DKEY_L2].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_L2].J.d); + fprintf(fp, "R2=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_R2].Key, + g.cfg.PadDef[i].KeyDef[DKEY_R2].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_R2].J.d); + fprintf(fp, "L1=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_L1].Key, + g.cfg.PadDef[i].KeyDef[DKEY_L1].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_L1].J.d); + fprintf(fp, "R1=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_R1].Key, + g.cfg.PadDef[i].KeyDef[DKEY_R1].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_R1].J.d); + fprintf(fp, "Triangle=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_TRIANGLE].Key, + g.cfg.PadDef[i].KeyDef[DKEY_TRIANGLE].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_TRIANGLE].J.d); + fprintf(fp, "Circle=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_CIRCLE].Key, + g.cfg.PadDef[i].KeyDef[DKEY_CIRCLE].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_CIRCLE].J.d); + fprintf(fp, "Cross=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_CROSS].Key, + g.cfg.PadDef[i].KeyDef[DKEY_CROSS].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_CROSS].J.d); + fprintf(fp, "Square=%d,%d,%d\n", g.cfg.PadDef[i].KeyDef[DKEY_SQUARE].Key, + g.cfg.PadDef[i].KeyDef[DKEY_SQUARE].JoyEvType, g.cfg.PadDef[i].KeyDef[DKEY_SQUARE].J.d); + fprintf(fp, "LeftAnalogXP=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XP].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XP].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XP].J.d); + fprintf(fp, "LeftAnalogXM=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XM].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XM].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_XM].J.d); + fprintf(fp, "LeftAnalogYP=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YP].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YP].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YP].J.d); + fprintf(fp, "LeftAnalogYM=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YM].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YM].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_LEFT][ANALOG_YM].J.d); + fprintf(fp, "RightAnalogXP=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XP].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XP].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XP].J.d); + fprintf(fp, "RightAnalogXM=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XM].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XM].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_XM].J.d); + fprintf(fp, "RightAnalogYP=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YP].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YP].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YP].J.d); + fprintf(fp, "RightAnalogYM=%d,%d,%d\n", g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YM].Key, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YM].JoyEvType, + g.cfg.PadDef[i].AnalogDef[ANALOG_RIGHT][ANALOG_YM].J.d); + + fprintf(fp, "\n"); + } + + fclose(fp); +} diff --git a/plugins/dfinput/dfinput.glade2 b/plugins/dfinput/dfinput.glade2 new file mode 100644 index 00000000..c7bdd114 --- /dev/null +++ b/plugins/dfinput/dfinput.glade2 @@ -0,0 +1,489 @@ + + + + + + 5 + False + center + normal + False + + + True + vertical + 2 + + + True + True + + + True + vertical + 2 + + + True + + + True + 10 + + + True + Device: + + + False + False + 0 + + + + + 150 + True + + + 1 + + + + + False + False + 0 + + + + + True + 10 + + + True + Type: + + + False + False + 0 + + + + + 200 + True + Digital Pad +Analog Pad + + + False + False + 1 + + + + + False + False + 1 + + + + + False + False + 0 + + + + + True + True + 5 + automatic + automatic + True + etched-in + + + 500 + 275 + True + True + + + + + 1 + + + + + True + 20 + center + + + True + True + True + + + True + + + True + gtk-edit + 1 + + + 0 + + + + + True + Change + + + 1 + + + + + + + False + False + 0 + + + + + True + True + True + + + True + + + True + gtk-undo + 1 + + + 0 + + + + + True + Reset + + + 1 + + + + + + + False + False + 1 + + + + + 2 + + + + + + + True + Controller 1 + + + False + tab + + + + + True + vertical + 2 + + + True + + + True + 10 + + + True + Device: + + + False + False + 0 + + + + + 150 + True + + + 1 + + + + + False + False + 0 + + + + + True + 10 + + + True + Type: + + + False + False + 0 + + + + + 200 + True + Digital Pad +Analog Pad + + + False + False + 1 + + + + + False + False + 1 + + + + + False + False + 0 + + + + + True + True + 5 + automatic + automatic + True + etched-in + + + 500 + 275 + True + True + + + + + 1 + + + + + True + 20 + center + + + True + True + True + + + True + + + True + gtk-edit + 1 + + + 0 + + + + + True + Change + + + 1 + + + + + + + False + False + 0 + + + + + True + True + True + + + True + + + True + gtk-undo + 1 + + + 0 + + + + + True + Reset + + + 1 + + + + + + + False + False + 1 + + + + + False + False + 2 + + + + + 1 + + + + + True + Controller 2 + + + 1 + False + tab + + + + + True + vertical + 20 + + + Multi-Threaded (Recommended) + True + True + False + True + + + False + False + 16 + 0 + + + + + 2 + + + + + True + Options + + + 2 + False + tab + + + + + 1 + + + + + True + end + + + gtk-close + True + True + True + True + + + False + False + 0 + + + + + False + end + 0 + + + + + + diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c new file mode 100644 index 00000000..a0207aab --- /dev/null +++ b/plugins/dfinput/pad.c @@ -0,0 +1,392 @@ +/* + * Copyright (c) 2009, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "pad.h" + +char *PSEgetLibName(void) { + return _("Gamepad/Keyboard Input"); +} + +uint32_t PSEgetLibType(void) { + return PSE_LT_PAD; +} + +uint32_t PSEgetLibVersion(void) { + return (1 << 16) | (1 << 8); +} + +long PADinit(long flags) { + LoadPADConfig(); + + g.PadState[0].PadMode = 0; + g.PadState[0].PadID = 0x41; + g.PadState[1].PadMode = 0; + g.PadState[1].PadID = 0x41; + + return PSE_PAD_ERR_SUCCESS; +} + +long PADshutdown(void) { + PADclose(); + return PSE_PAD_ERR_SUCCESS; +} + +static pthread_t ThreadID; +static volatile uint8_t TerminateThread = 0; + +static void *JoyThread(void *param) { + while (!TerminateThread) { + CheckJoy(); + usleep(1000); + } + pthread_exit(0); + return NULL; +} + +long PADopen(unsigned long *Disp) { + g.Disp = (Display *)*Disp; + + if (!g.Opened) { + if (SDL_WasInit(SDL_INIT_EVERYTHING)) { + if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1) { + return PSE_PAD_ERR_FAILURE; + } + } else if (SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_NOPARACHUTE) == -1) { + return PSE_PAD_ERR_FAILURE; + } + + InitSDLJoy(); + InitKeyboard(); + + g.KeyLeftOver = 0; + + if (g.cfg.Threaded) { + TerminateThread = 0; + + if (pthread_create(&ThreadID, NULL, JoyThread, NULL) != 0) { + // thread creation failed, fallback to polling + g.cfg.Threaded = 0; + } + } + } + + g.Opened = 1; + + return PSE_PAD_ERR_SUCCESS; +} + +long PADclose(void) { + if (g.Opened) { + if (g.cfg.Threaded) { + TerminateThread = 1; + pthread_join(ThreadID, NULL); + } + + DestroySDLJoy(); + DestroyKeyboard(); + + if (SDL_WasInit(SDL_INIT_EVERYTHING & ~SDL_INIT_JOYSTICK)) { + SDL_QuitSubSystem(SDL_INIT_JOYSTICK); + } else { + SDL_Quit(); + } + } + + g.Opened = 0; + + return PSE_PAD_ERR_SUCCESS; +} + +long PADquery(void) { + return PSE_PAD_USE_PORT1 | PSE_PAD_USE_PORT2; +} + +static void UpdateInput(void) { + if (!g.cfg.Threaded) CheckJoy(); + CheckKeyboard(); +} + +static uint8_t stdpar[2][8] = { + {0xFF, 0x5A, 0xFF, 0xFF, 0x80, 0x80, 0x80, 0x80}, + {0xFF, 0x5A, 0xFF, 0xFF, 0x80, 0x80, 0x80, 0x80} +}; + +static uint8_t unk46[2][8] = { + {0xFF, 0x5A, 0x00, 0x00, 0x01, 0x02, 0x00, 0x0A}, + {0xFF, 0x5A, 0x00, 0x00, 0x01, 0x02, 0x00, 0x0A} +}; + +static uint8_t unk47[2][8] = { + {0xFF, 0x5A, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00}, + {0xFF, 0x5A, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00} +}; + +static uint8_t unk4c[2][8] = { + {0xFF, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0xFF, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} +}; + +static uint8_t unk4d[2][8] = { + {0xFF, 0x5A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, + {0xFF, 0x5A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} +}; + +static uint8_t stdcfg[2][8] = { + {0xFF, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0xFF, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} +}; + +static uint8_t stdmode[2][8] = { + {0xFF, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0xFF, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} +}; + +static uint8_t stdmodel[2][8] = { + {0xFF, + 0x5A, + 0x01, // 03 - dualshock2, 01 - dualshock + 0x02, // number of modes + 0x01, // current mode: 01 - analog, 00 - digital + 0x02, + 0x01, + 0x00}, + {0xFF, + 0x5A, + 0x01, // 03 - dualshock2, 01 - dualshock + 0x02, // number of modes + 0x01, // current mode: 01 - analog, 00 - digital + 0x02, + 0x01, + 0x00} +}; + +static uint8_t CurPad = 0, CurByte = 0, CurCmd = 0, CmdLen = 0; + +unsigned char PADstartPoll(int pad) { + CurPad = pad - 1; + CurByte = 0; + + return 0xFF; +} + +unsigned char PADpoll(unsigned char value) { + static uint8_t *buf = NULL; + uint16_t n; + + if (CurByte == 0) { + CurByte++; + + // Don't enable Analog/Vibration for a standard pad + if (g.cfg.PadDef[CurPad].Type != PSE_PAD_TYPE_ANALOGPAD) { + CurCmd = CMD_READ_DATA_AND_VIBRATE; + } else { + CurCmd = value; + } + + switch (CurCmd) { + case CMD_CONFIG_MODE: + CmdLen = 8; + buf = stdcfg[CurPad]; + if (stdcfg[CurPad][3] == 0xFF) return 0xF3; + else return g.PadState[CurPad].PadID; + + case CMD_SET_MODE_AND_LOCK: + CmdLen = 8; + buf = stdmode[CurPad]; + return 0xF3; + + case CMD_QUERY_MODEL_AND_MODE: + CmdLen = 8; + buf = stdmodel[CurPad]; + buf[4] = g.PadState[CurPad].PadMode; + return 0xF3; + + case CMD_QUERY_ACT: + CmdLen = 8; + buf = unk46[CurPad]; + return 0xF3; + + case CMD_QUERY_COMB: + CmdLen = 8; + buf = unk47[CurPad]; + return 0xF3; + + case CMD_QUERY_MODE: + CmdLen = 8; + buf = unk4c[CurPad]; + return 0xF3; + + case CMD_VIBRATION_TOGGLE: + CmdLen = 8; + buf = unk4d[CurPad]; + return 0xF3; + + case CMD_READ_DATA_AND_VIBRATE: + default: + UpdateInput(); + + n = g.PadState[CurPad].KeyStatus; + n &= g.PadState[CurPad].JoyKeyStatus; + + stdpar[CurPad][2] = n & 0xFF; + stdpar[CurPad][3] = n >> 8; + + if (g.PadState[CurPad].PadMode == 1) { + CmdLen = 8; + + stdpar[CurPad][4] = g.PadState[CurPad].AnalogStatus[ANALOG_RIGHT][0]; + stdpar[CurPad][5] = g.PadState[CurPad].AnalogStatus[ANALOG_RIGHT][1]; + stdpar[CurPad][6] = g.PadState[CurPad].AnalogStatus[ANALOG_LEFT][0]; + stdpar[CurPad][7] = g.PadState[CurPad].AnalogStatus[ANALOG_LEFT][1]; + } else { + CmdLen = 4; + } + + buf = stdpar[CurPad]; + return g.PadState[CurPad].PadID; + } + } + + switch (CurCmd) { + case CMD_CONFIG_MODE: + if (CurByte == 2) { + switch (value) { + case 0: + buf[2] = 0; + buf[3] = 0; + break; + + case 1: + buf[2] = 0xFF; + buf[3] = 0xFF; + break; + } + } + break; + + case CMD_SET_MODE_AND_LOCK: + if (CurByte == 2) { + g.PadState[CurPad].PadMode = value; + g.PadState[CurPad].PadID = value ? 0x73 : 0x41; + } + break; + + case CMD_QUERY_ACT: + if (CurByte == 2) { + switch (value) { + case 0: // default + buf[5] = 0x02; + buf[6] = 0x00; + buf[7] = 0x0A; + break; + + case 1: // Param std conf change + buf[5] = 0x01; + buf[6] = 0x01; + buf[7] = 0x14; + break; + } + } + break; + + case CMD_QUERY_MODE: + if (CurByte == 2) { + switch (value) { + case 0: // mode 0 - digital mode + buf[5] = PSE_PAD_TYPE_STANDARD; + break; + + case 1: // mode 1 - analog mode + buf[5] = PSE_PAD_TYPE_ANALOGPAD; + break; + } + } + break; + } + + if (CurByte >= CmdLen) return 0; + return buf[CurByte++]; +} + +static long PADreadPort(int num, PadDataS *pad) { + UpdateInput(); + + pad->buttonStatus = (g.PadState[num].KeyStatus & g.PadState[num].JoyKeyStatus); + + // ePSXe different from pcsx, swap bytes + pad->buttonStatus = (pad->buttonStatus >> 8) | (pad->buttonStatus << 8); + + switch (g.cfg.PadDef[num].Type) { + case PSE_PAD_TYPE_ANALOGPAD: // Analog Controller SCPH-1150 + pad->controllerType = PSE_PAD_TYPE_ANALOGPAD; + pad->rightJoyX = g.PadState[num].AnalogStatus[ANALOG_RIGHT][0]; + pad->rightJoyY = g.PadState[num].AnalogStatus[ANALOG_RIGHT][1]; + pad->leftJoyX = g.PadState[num].AnalogStatus[ANALOG_LEFT][0]; + pad->leftJoyY = g.PadState[num].AnalogStatus[ANALOG_LEFT][1]; + break; + + case PSE_PAD_TYPE_STANDARD: // Standard Pad SCPH-1080, SCPH-1150 + default: + pad->controllerType = PSE_PAD_TYPE_STANDARD; + break; + } + + return PSE_PAD_ERR_SUCCESS; +} + +long PADreadPort1(PadDataS *pad) { + return PADreadPort(0, pad); +} + +long PADreadPort2(PadDataS *pad) { + return PADreadPort(1, pad); +} + +long PADkeypressed(void) { + long s; + + CheckKeyboard(); + + s = g.KeyLeftOver; + g.KeyLeftOver = 0; + + return s; +} + +#ifndef _MACOSX + +long PADconfigure(void) { + if (fork() == 0) { + execl("cfg/cfgDFInput", "cfgDFInput", NULL); + exit(0); + } + return PSE_PAD_ERR_SUCCESS; +} + +void PADabout(void) { + if (fork() == 0) { + execl("cfg/cfgDFInput", "cfgDFInput", "-about", NULL); + exit(0); + } +} + +#endif + +long PADtest(void) { + return PSE_PAD_ERR_SUCCESS; +} diff --git a/plugins/dfinput/pad.h b/plugins/dfinput/pad.h new file mode 100644 index 00000000..8347caf8 --- /dev/null +++ b/plugins/dfinput/pad.h @@ -0,0 +1,193 @@ +/* + * Copyright (c) 2009, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#ifndef PAD_H_ +#define PAD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _MACOSX +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifdef _MACOSX +#include +typedef void *Display; +#define ThreadID ThreadID_MACOSX +#else +#include +#include +#include +#include +#endif + +#include "psemu_plugin_defs.h" + +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif + +enum { + DKEY_SELECT = 0, + DKEY_L3, + DKEY_R3, + DKEY_START, + DKEY_UP, + DKEY_RIGHT, + DKEY_DOWN, + DKEY_LEFT, + DKEY_L2, + DKEY_R2, + DKEY_L1, + DKEY_R1, + DKEY_TRIANGLE, + DKEY_CIRCLE, + DKEY_CROSS, + DKEY_SQUARE, + + DKEY_TOTAL +}; + +enum { + ANALOG_LEFT = 0, + ANALOG_RIGHT, + + ANALOG_TOTAL +}; + +enum { NONE = 0, AXIS, HAT, BUTTON }; + +typedef struct tagKeyDef { + uint8_t JoyEvType; + union { + int16_t d; + int16_t Axis; // positive=axis+, negative=axis-, abs(Axis)-1=axis index + uint16_t Hat; // 8-bit for hat number, 8-bit for direction + uint16_t Button; // button number + } J; + uint16_t Key; +} KEYDEF; + +enum { ANALOG_XP = 0, ANALOG_XM, ANALOG_YP, ANALOG_YM }; + +typedef struct tagPadDef { + int8_t DevNum; + uint16_t Type; + KEYDEF KeyDef[DKEY_TOTAL]; + KEYDEF AnalogDef[ANALOG_TOTAL][4]; +} PADDEF; + +typedef struct tagConfig { + uint8_t Threaded; + PADDEF PadDef[2]; +} CONFIG; + +typedef struct tagPadState { + SDL_Joystick *JoyDev; + uint8_t PadMode; + uint8_t PadID; + volatile uint16_t KeyStatus; + volatile uint16_t JoyKeyStatus; + volatile uint8_t AnalogStatus[ANALOG_TOTAL][2]; // 0-255 where 127 is center position + volatile uint8_t AnalogKeyStatus[ANALOG_TOTAL][4]; +} PADSTATE; + +typedef struct tagGlobalData { + CONFIG cfg; + + uint8_t Opened; + Display *Disp; + + PADSTATE PadState[2]; + volatile long KeyLeftOver; +} GLOBALDATA; + +extern GLOBALDATA g; + +enum { + CMD_READ_DATA_AND_VIBRATE = 0x42, + CMD_CONFIG_MODE = 0x43, + CMD_SET_MODE_AND_LOCK = 0x44, + CMD_QUERY_MODEL_AND_MODE = 0x45, + CMD_QUERY_ACT = 0x46, // ?? + CMD_QUERY_COMB = 0x47, // ?? + CMD_QUERY_MODE = 0x4C, // QUERY_MODE ?? + CMD_VIBRATION_TOGGLE = 0x4D, +}; + +// cfg.c functions... +void LoadPADConfig(); +void SavePADConfig(); + +// sdljoy.c functions... +void InitSDLJoy(); +void DestroySDLJoy(); +void CheckJoy(); + +// xkb.c functions... +void InitKeyboard(); +void DestroyKeyboard(); +void CheckKeyboard(); + +// analog.c functions... +void InitAnalog(); +void CheckAnalog(); +int AnalogKeyPressed(uint16_t Key); +int AnalogKeyReleased(uint16_t Key); + +// pad.c functions... +char *PSEgetLibName(void); +uint32_t PSEgetLibType(void); +uint32_t PSEgetLibVersion(void); +long PADinit(long flags); +long PADshutdown(void); +long PADopen(unsigned long *Disp); +long PADclose(void); +long PADquery(void); +unsigned char PADstartPoll(int pad); +unsigned char PADpoll(unsigned char value); +long PADreadPort1(PadDataS *pad); +long PADreadPort2(PadDataS *pad); +long PADkeypressed(void); +long PADconfigure(void); +void PADabout(void); +long PADtest(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/plugins/dfinput/sdljoy.c b/plugins/dfinput/sdljoy.c new file mode 100644 index 00000000..ff4ed467 --- /dev/null +++ b/plugins/dfinput/sdljoy.c @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2009, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "pad.h" + +void InitSDLJoy() { + uint8_t i; + + g.PadState[0].JoyKeyStatus = 0xFFFF; + g.PadState[1].JoyKeyStatus = 0xFFFF; + + for (i = 0; i < 2; i++) { + if (g.cfg.PadDef[i].DevNum >= 0) { + g.PadState[i].JoyDev = SDL_JoystickOpen(g.cfg.PadDef[i].DevNum); + } else { + g.PadState[i].JoyDev = NULL; + } + } + + SDL_JoystickEventState(SDL_IGNORE); + + InitAnalog(); +} + +void DestroySDLJoy() { + uint8_t i; + + if (SDL_WasInit(SDL_INIT_JOYSTICK)) { + for (i = 0; i < 2; i++) { + if (g.PadState[i].JoyDev != NULL) { + SDL_JoystickClose(g.PadState[i].JoyDev); + } + } + } + + for (i = 0; i < 2; i++) { + g.PadState[i].JoyDev = NULL; + } +} + +void CheckJoy() { + uint8_t i, j, n; + + SDL_JoystickUpdate(); + + for (i = 0; i < 2; i++) { + if (g.PadState[i].JoyDev == NULL) { + continue; + } + + for (j = 0; j < DKEY_TOTAL; j++) { + switch (g.cfg.PadDef[i].KeyDef[j].JoyEvType) { + case AXIS: + n = abs(g.cfg.PadDef[i].KeyDef[j].J.Axis) - 1; + + if (g.cfg.PadDef[i].KeyDef[j].J.Axis > 0) { + if (SDL_JoystickGetAxis(g.PadState[i].JoyDev, n) > 16383) { + g.PadState[i].JoyKeyStatus &= ~(1 << j); + } else { + g.PadState[i].JoyKeyStatus |= (1 << j); + } + } else if (g.cfg.PadDef[i].KeyDef[j].J.Axis < 0) { + if (SDL_JoystickGetAxis(g.PadState[i].JoyDev, n) < -16383) { + g.PadState[i].JoyKeyStatus &= ~(1 << j); + } else { + g.PadState[i].JoyKeyStatus |= (1 << j); + } + } + break; + + case HAT: + n = (g.cfg.PadDef[i].KeyDef[j].J.Hat >> 8); + + if (SDL_JoystickGetHat(g.PadState[i].JoyDev, n) & (g.cfg.PadDef[i].KeyDef[j].J.Hat & 0xFF)) { + g.PadState[i].JoyKeyStatus &= ~(1 << j); + } else { + g.PadState[i].JoyKeyStatus |= (1 << j); + } + break; + + case BUTTON: + if (SDL_JoystickGetButton(g.PadState[i].JoyDev, g.cfg.PadDef[i].KeyDef[j].J.Button)) { + g.PadState[i].JoyKeyStatus &= ~(1 << j); + } else { + g.PadState[i].JoyKeyStatus |= (1 << j); + } + break; + + default: + break; + } + } + } + + CheckAnalog(); +} diff --git a/plugins/dfinput/xkb.c b/plugins/dfinput/xkb.c new file mode 100644 index 00000000..bfadef10 --- /dev/null +++ b/plugins/dfinput/xkb.c @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2009, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "pad.h" + +static Atom wmprotocols, wmdelwindow; + +void InitKeyboard() { + wmprotocols = XInternAtom(g.Disp, "WM_PROTOCOLS", 0); + wmdelwindow = XInternAtom(g.Disp, "WM_DELETE_WINDOW", 0); + + XkbSetDetectableAutoRepeat(g.Disp, 1, NULL); + + g.PadState[0].KeyStatus = 0xFFFF; + g.PadState[1].KeyStatus = 0xFFFF; +} + +void DestroyKeyboard() { + XkbSetDetectableAutoRepeat(g.Disp, 0, NULL); +} + +void CheckKeyboard() { + uint8_t i, j, found; + XEvent evt; + XClientMessageEvent *xce; + uint16_t Key; + + while (XPending(g.Disp)) { + XNextEvent(g.Disp, &evt); + switch (evt.type) { + case KeyPress: + Key = XLookupKeysym((XKeyEvent *)&evt, 0); + found = 0; + for (i = 0; i < 2; i++) { + for (j = 0; j < DKEY_TOTAL; j++) { + if (g.cfg.PadDef[i].KeyDef[j].Key == Key) { + found = 1; + g.PadState[i].KeyStatus &= ~(1 << j); + } + } + } + if (!found && !AnalogKeyPressed(Key)) { + g.KeyLeftOver = Key; + } + return; + + case KeyRelease: + Key = XLookupKeysym((XKeyEvent *)&evt, 0); + found = 0; + for (i = 0; i < 2; i++) { + for (j = 0; j < DKEY_TOTAL; j++) { + if (g.cfg.PadDef[i].KeyDef[j].Key == Key) { + found = 1; + g.PadState[i].KeyStatus |= (1 << j); + } + } + } + if (!found && !AnalogKeyReleased(Key)) { + g.KeyLeftOver = ((long)Key | 0x40000000); + } + break; + + case ClientMessage: + xce = (XClientMessageEvent *)&evt; + if (xce->message_type == wmprotocols && (Atom)xce->data.l[0] == wmdelwindow) { + // Fake an ESC key if user clicked the close button on window + g.KeyLeftOver = XK_Escape; + return; + } + break; + } + } +} diff --git a/plugins/dfnet/Makefile.am b/plugins/dfnet/Makefile.am new file mode 100644 index 00000000..36f97682 --- /dev/null +++ b/plugins/dfnet/Makefile.am @@ -0,0 +1,21 @@ +bindir = @libdir@/games/psemu/ +libdir = @libdir@/games/psemu/ + +lib_LTLIBRARIES = libDFNet.la + +libDFNet_la_SOURCES = dfnet.c unix.c cfg.c +libDFNet_la_LDFLAGS = -module -avoid-version + +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) \ + -I../../libpcsxcore -I../../include + +bin_PROGRAMS = cfgDFNet +cfgDFNet_SOURCES = gui.c +cfgDFNet_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) + +glade_DATA = dfnet.glade2 +gladedir = $(datadir)/psemu/ +EXTRA_DIST = $(glade_DATA) diff --git a/plugins/dfnet/Makefile.in b/plugins/dfnet/Makefile.in new file mode 100644 index 00000000..9de71c8a --- /dev/null +++ b/plugins/dfnet/Makefile.in @@ -0,0 +1,592 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = cfgDFNet$(EXEEXT) +subdir = plugins/dfnet +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(gladedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libDFNet_la_LIBADD = +am_libDFNet_la_OBJECTS = dfnet.lo unix.lo cfg.lo +libDFNet_la_OBJECTS = $(am_libDFNet_la_OBJECTS) +libDFNet_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libDFNet_la_LDFLAGS) $(LDFLAGS) -o $@ +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_cfgDFNet_OBJECTS = gui.$(OBJEXT) +cfgDFNet_OBJECTS = $(am_cfgDFNet_OBJECTS) +am__DEPENDENCIES_1 = +cfgDFNet_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libDFNet_la_SOURCES) $(cfgDFNet_SOURCES) +DIST_SOURCES = $(libDFNet_la_SOURCES) $(cfgDFNet_SOURCES) +gladeDATA_INSTALL = $(INSTALL_DATA) +DATA = $(glade_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @libdir@/games/psemu/ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@/games/psemu/ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +lib_LTLIBRARIES = libDFNet.la +libDFNet_la_SOURCES = dfnet.c unix.c cfg.c +libDFNet_la_LDFLAGS = -module -avoid-version +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) \ + -I../../libpcsxcore -I../../include + +cfgDFNet_SOURCES = gui.c +cfgDFNet_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) +glade_DATA = dfnet.glade2 +gladedir = $(datadir)/psemu/ +EXTRA_DIST = $(glade_DATA) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/dfnet/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/dfnet/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libDFNet.la: $(libDFNet_la_OBJECTS) $(libDFNet_la_DEPENDENCIES) + $(libDFNet_la_LINK) -rpath $(libdir) $(libDFNet_la_OBJECTS) $(libDFNet_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +cfgDFNet$(EXEEXT): $(cfgDFNet_OBJECTS) $(cfgDFNet_DEPENDENCIES) + @rm -f cfgDFNet$(EXEEXT) + $(LINK) $(cfgDFNet_OBJECTS) $(cfgDFNet_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfnet.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-gladeDATA: $(glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(glade_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \ + $(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \ + done + +uninstall-gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(glade_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \ + rm -f "$(DESTDIR)$(gladedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-gladeDATA + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-gladeDATA \ + uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-gladeDATA install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-gladeDATA uninstall-libLTLIBRARIES + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/plugins/dfnet/cfg.c b/plugins/dfnet/cfg.c new file mode 100644 index 00000000..a63b074b --- /dev/null +++ b/plugins/dfnet/cfg.c @@ -0,0 +1,37 @@ +// +// DF Netplay Plugin +// +// Based on netSock 0.2 by linuzappz. +// The Plugin is free source code. +// + +#include +#include + +#include "dfnet.h" + +#define CFG_FILENAME "dfnet.cfg" + +void SaveConf() { + FILE *f; + + f = fopen(CFG_FILENAME, "w"); + if (f == NULL) return; + fwrite(&conf, 1, sizeof(conf), f); + fclose(f); +} + +void LoadConf() { + FILE *f; + + f = fopen(CFG_FILENAME, "r"); + if (f == NULL) { + conf.PlayerNum = 1; + conf.PortNum = 33306; + strcpy(conf.ipAddress, "127.0.0.1"); + return; + } + + fread(&conf, 1, sizeof(conf), f); + fclose(f); +} diff --git a/plugins/dfnet/dfnet.c b/plugins/dfnet/dfnet.c new file mode 100644 index 00000000..d76a7574 --- /dev/null +++ b/plugins/dfnet/dfnet.c @@ -0,0 +1,274 @@ +// +// DF Netplay Plugin +// +// Based on netSock 0.2 by linuzappz. +// The Plugin is free source code. +// + +#include +#include +#include +#include +#include +#include +#include +extern int errno; + +#include "dfnet.h" + +const unsigned char version = 2; // NET library v2 +const unsigned char revision = 0; +const unsigned char build = 3; // increase that with each version + +static char *libraryName = N_("Socket Driver"); + +unsigned long CALLBACK PSEgetLibType() { + return PSE_LT_NET; +} + +char* CALLBACK PSEgetLibName() { + return _(libraryName); +} + +unsigned long CALLBACK PSEgetLibVersion() { + return version << 16 | revision << 8 | build; +} + +long CALLBACK NETinit() { + return sockInit(); +} + +int SEND(const void *buf, int Size, int Mode) { + int bytes; + int count = 0; + const char *pData = (const char *)buf; + + if (Mode & PSE_NET_NONBLOCKING) { // NONBLOCKING + int ret; + + FD_ZERO(&wset); + FD_SET(sock, &wset); + + ret = select(sock + 1, NULL, &wset, NULL, &tm); + if (ret == -1) return -1; + + if (FD_ISSET(sock, &wset)) { + return send(sock, pData, Size, 0); + } else { + return 0; + } + } else { // BLOCKING + while (Size > 0) { + bytes = send(sock, pData, Size, 0); + if (bytes < 0) return -1; + pData += bytes; Size -= bytes; + count += bytes; + } + } + + return count; +} + +int RECV(void *buf, int Size, int Mode) { + int bytes; + int count = 0; + char *pData = (char *)buf; + + if (Mode & PSE_NET_NONBLOCKING) { // NONBLOCKING + int ret; + + FD_ZERO(&rset); + FD_SET(sock, &rset); + + ret = select(sock, &rset, NULL, NULL, &tm); + + if (FD_ISSET(sock, &rset)) { + return recv(sock, pData, Size, 0); + } else { + return 0; + } + } else { // BLOCKING + while (Size > 0) { + bytes = recv(sock, pData, Size, 0); + if (bytes == -1) return -1; + pData+= bytes; Size-= bytes; + count+= bytes; + } + } + + return count; +} + +long CALLBACK NETopen(unsigned long *gpuDisp) { + int ret = sockOpen(); + + struct sockaddr_in address; + + if (ret == -1) return -1; + + if (conf.PlayerNum == 1) { + int listen_sock, reuse_addr = 1; + int ret; + + memset((char *)&address, 0, sizeof (address)); + + address.sin_family = AF_INET; + address.sin_port = htons(conf.PortNum); + address.sin_addr.s_addr = INADDR_ANY; + + listen_sock = socket(AF_INET, SOCK_STREAM, 0); + if (listen_sock == -1) + return -1; + + setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, (const char *)&reuse_addr, sizeof(reuse_addr)); + + if (bind(listen_sock,(struct sockaddr *) &address, sizeof(address)) == -1) + return -1; + + if (listen(listen_sock, 1) != 0) + return -1; + + sock = -1; + + WaitCancel = 0; + sockCreateWaitDlg(); + + while (sock < 0) { + FD_ZERO(&rset); + FD_SET(listen_sock, &rset); + + ret = select(listen_sock + 1, &rset, NULL, NULL, &tm); + if (FD_ISSET(listen_sock, &rset)) { + sock = accept(listen_sock, NULL, NULL); + } + + if (WaitCancel) break; + sockDlgUpdate(); + } + close(listen_sock); + + sockDestroyWaitDlg(); + if (WaitCancel == 1) return -1; + } else { + memset((char *)&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_port = htons(conf.PortNum); + address.sin_addr.s_addr = inet_addr(conf.ipAddress); + + sock = socket(AF_INET, SOCK_STREAM, 0); + + if (connect(sock, (struct sockaddr *)&address, sizeof(address))!=0) { + SysMessage(_("error connecting to %s: %s\n"), conf.ipAddress, strerror(errno)); + return -1; + } + } + + PadInit = 0; + PadCount = 0; + PadSize[0] = -1; + PadSize[1] = -1; + PadRecvSize = -1; + PadSendSize = -1; + Ping = sockPing(); + Ping = (sockPing() + Ping) / 2; + Ping = (sockPing() + Ping) / 2; + + if (conf.PlayerNum == 1) { + PadCountMax = (int)(((double)Ping / 1000.0) * 60.0); + if (PadCountMax <= 0) PadCountMax = 1; + SEND(&PadCountMax, 4, PSE_NET_BLOCKING); + } else { + RECV(&PadCountMax, 4, PSE_NET_BLOCKING); + } + + PadSendData = (char *)malloc(PadCountMax * 128); + if (PadSendData == NULL) { + SysMessage(_("Error allocating memory!\n")); return -1; + } + memset(PadSendData, 0xff, PadCountMax); + + return ret; +} + +long CALLBACK NETclose() { + close(sock); + + return 0; +} + +long CALLBACK NETshutdown() { + return sockShutdown(); +} + +void CALLBACK NETpause() { +/* unsigned char Code = 0x80; + + SEND(&Code, 1, PSE_NET_BLOCKING);*/ +} + +void CALLBACK NETresume() { +/* unsigned char Code = 0x80; + + SEND(&Code, 1, PSE_NET_BLOCKING);*/ +} + +long CALLBACK NETsendData(void *pData, int Size, int Mode) { + return SEND(pData, Size, Mode); +} + +long CALLBACK NETrecvData(void *pData, int Size, int Mode) { + return RECV(pData, Size, Mode); +} + +long CALLBACK NETsendPadData(void *pData, int Size) { + if (PadSendSize == -1) { + PadSendSize = Size; + + if (SEND(&PadSendSize, 1, PSE_NET_BLOCKING) == -1) + return -1; + + if (RECV(&PadRecvSize, 1, PSE_NET_BLOCKING) == -1) + return -1; + } + + memcpy(&PadSendData[PadCount], pData, Size); + if (SEND(pData, PadSendSize, PSE_NET_BLOCKING) == -1) + return -1; + + return 0; +} + +long CALLBACK NETrecvPadData(void *pData, int Pad) { + if (PadInit == 0) { + if (conf.PlayerNum == Pad) { + memset(pData, 0xff, PadSendSize); + } else { + memset(pData, 0xff, PadRecvSize); + } + } else { + if (conf.PlayerNum == Pad) { + memcpy(pData, &PadSendData[PadCount == 0 ? PadCountMax-1 : PadCount-1], PadSendSize); + } else { + if (RECV(pData, PadRecvSize, PSE_NET_BLOCKING) == -1) + return -1; + } + } + + if (Pad == 2) { + PadCount++; + if (PadCount == PadCountMax) { + PadCount = 0; + PadInit = 1; + } + } + + return 0; +} + +long CALLBACK NETqueryPlayer() { + return conf.PlayerNum; +} + +long CALLBACK NETtest() { + return 0; +} diff --git a/plugins/dfnet/dfnet.glade2 b/plugins/dfnet/dfnet.glade2 new file mode 100644 index 00000000..36c9b4b6 --- /dev/null +++ b/plugins/dfnet/dfnet.glade2 @@ -0,0 +1,265 @@ + + + + + + 5 + False + True + center + normal + False + + + True + 5 + + + True + 12 + + + True + Select here if you'll be Server (Player1) or Client (Player2). + +If you select Server you must Copy your IP address to the Clipboard and paste if (Ctrl+V) wherever the Client can see it. + +If you selected Client please enter the IP address the Server gave to you in the IP Address Control. + True + + + 0 + + + + + True + 2 + 2 + 8 + 12 + + + True + True + True + + + True + + + True + gtk-copy + + + False + False + 0 + + + + + True + Copy PC IP to Clipboard + + + 1 + + + + + + + 1 + 2 + + + + + True + True + 15 + + + + + 1 + 2 + 1 + 2 + + + + + Server (Player1) + True + True + False + True + True + + + + + Client (Player2) + True + True + False + True + True + rbServer + + + 1 + 2 + + + + + 2 + 1 + + + + + True + 6 + + + True + Do not change if not necessary (remember it must be changed on both sides). + True + + + 0 + + + + + True + + + True + Port Number + + + 0 + + + + + True + True + 5 + + + + 1 + + + + + 1 + + + + + 2 + + + + + 1 + + + + + True + end + + + -5 + True + True + True + + + True + + + True + gtk-network + + + False + False + 0 + + + + + True + Start Game + + + 1 + + + + + + + False + False + 0 + + + + + -6 + True + True + True + + + True + + + True + gtk-no + + + False + False + 0 + + + + + True + Play Offline + + + 1 + + + + + + + False + False + 1 + + + + + False + end + 0 + + + + + + diff --git a/plugins/dfnet/dfnet.h b/plugins/dfnet/dfnet.h new file mode 100644 index 00000000..62f38425 --- /dev/null +++ b/plugins/dfnet/dfnet.h @@ -0,0 +1,80 @@ +// +// DF Netplay Plugin +// +// Based on netSock 0.2 by linuzappz. +// The Plugin is free source code. +// + +#ifndef __DFNET_H__ +#define __DFNET_H__ + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#include + +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif + +typedef void* HWND; + +struct timeval tm; + +#define CALLBACK + +long timeGetTime(); + +#include "psemu_plugin_defs.h" + +typedef struct { + int PlayerNum; + unsigned short PortNum; + char ipAddress[32]; +} Config; + +Config conf; + +void LoadConf(); +void SaveConf(); + +long sock; +char *PadSendData; +char *PadRecvData; +char PadSendSize; +char PadRecvSize; +char PadSize[2]; +int PadCount; +int PadCountMax; +int PadInit; +int Ping; +volatile int WaitCancel; +fd_set rset; +fd_set wset; + +long sockInit(); +long sockShutdown(); +long sockOpen(); +void sockCreateWaitDlg(); +void sockDlgUpdate(); +void sockDestroyWaitDlg(); +int sockPing(); + +int ShowPauseDlg(); +void SysMessage(const char *fmt, ...); + +int SEND(const void *pData, int Size, int Mode); +int RECV(void *pData, int Size, int Mode); + +#endif diff --git a/plugins/dfnet/gui.c b/plugins/dfnet/gui.c new file mode 100644 index 00000000..60e165a7 --- /dev/null +++ b/plugins/dfnet/gui.c @@ -0,0 +1,233 @@ +// +// DF Netplay Plugin +// +// Based on netSock 0.2 by linuzappz. +// The Plugin is free source code. +// + +#include +#include +#include + +#include +#include +#include +#include + +#include "cfg.c" + +void cfgSysMessage(const char *fmt, ...) { + GtkWidget *MsgDlg; + va_list list; + char msg[512]; + + va_start(list, fmt); + vsprintf(msg, fmt, list); + va_end(list); + + if (msg[strlen(msg) - 1] == '\n') msg[strlen(msg) - 1] = 0; + + MsgDlg = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("NetPlay")); + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(MsgDlg), "%s", msg); + + gtk_dialog_run(GTK_DIALOG(MsgDlg)); + gtk_widget_destroy(MsgDlg); +} + +void CFGconfigure() { + cfgSysMessage(_("Nothing to configure")); +} + +#ifdef __linux__ + +#include +#include + +#define MAXINTERFACES 16 + +void sockGetIP(char *IPAddress) { + int fd, intrface; + struct ifreq buf[MAXINTERFACES]; + struct ifconf ifc; + struct sockaddr_in addr; + + strcpy(IPAddress, "127.0.0.1"); + + if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) >= 0) { + ifc.ifc_len = sizeof(buf); + ifc.ifc_buf = (caddr_t)buf; + if (!ioctl(fd, SIOCGIFCONF, (char *)&ifc)) { + intrface = ifc.ifc_len / sizeof(struct ifreq); + while (intrface-- > 0) { + if (!(ioctl(fd, SIOCGIFADDR, (char *)&buf[intrface]))) { + memcpy(&addr, &(buf[intrface].ifr_addr), sizeof(addr)); + strcpy(IPAddress, inet_ntoa(addr.sin_addr)); + break; + } + } + } + close(fd); + } +} + +#else + +void sockGetIP(char *IPAddress) { + struct hostent *host; + char str[256]; + + gethostname(str, 256); + host = gethostbyname(str); + + if (host != NULL) + strcpy(IPAddress, inet_ntoa(*((struct in_addr *)host->h_addr_list[0]))); + else strcpy(IPAddress, "127.0.0.1"); +} + +#endif + +void OnCopyIP(GtkWidget *widget, gpointer user_data) { + char str[256]; + + sockGetIP(str); + gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), str, strlen(str)); + cfgSysMessage(_("IP %s"), str); +} + +long CFGopen() { + GladeXML *xml; + GtkWidget *widget, *MainWindow; + char buf[256]; + + LoadConf(); + + xml = glade_xml_new(DATADIR "dfnet.glade2", "dlgStart", NULL); + if (xml == NULL) { + g_warning("We could not load the interface!"); + return 0; + } + + MainWindow = glade_xml_get_widget(xml, "dlgStart"); + gtk_window_set_title(GTK_WINDOW(MainWindow), _("NetPlay")); + + widget = glade_xml_get_widget(xml, "btnCopyIP"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnCopyIP), NULL, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "tbServerIP"); + gtk_entry_set_text(GTK_ENTRY(widget), conf.ipAddress); + + widget = glade_xml_get_widget(xml, "tbPort"); + sprintf(buf, "%d", conf.PortNum); + gtk_entry_set_text(GTK_ENTRY(widget), buf); + + if (conf.PlayerNum == 1) { + widget = glade_xml_get_widget(xml, "rbServer"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE); + } else { + widget = glade_xml_get_widget(xml, "rbClient"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE); + } + + if (gtk_dialog_run(GTK_DIALOG(MainWindow)) == GTK_RESPONSE_OK) { + widget = glade_xml_get_widget(xml, "tbServerIP"); + strcpy(conf.ipAddress, gtk_entry_get_text(GTK_ENTRY(widget))); + + widget = glade_xml_get_widget(xml, "tbPort"); + conf.PortNum = atoi(gtk_entry_get_text(GTK_ENTRY(widget))); + + widget = glade_xml_get_widget(xml, "rbServer"); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) { + conf.PlayerNum = 1; + } else { + conf.PlayerNum = 2; + } + + SaveConf(); + gtk_widget_destroy(MainWindow); + return 1; + } + + gtk_widget_destroy(MainWindow); + + return 0; +} + +void OnWaitDialog_Abort() { + kill(getppid(), SIGUSR2); +} + +void CFGwait() { + GtkWidget *WaitDlg; + + WaitDlg = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, + GTK_BUTTONS_CANCEL, _("Waiting for connection...")); + + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(WaitDlg), + _("The Client should now Start a Connection, waiting...")); + + gtk_dialog_run(GTK_DIALOG(WaitDlg)); + gtk_widget_destroy(WaitDlg); + + OnWaitDialog_Abort(); +} + +long CFGpause() { + return 0; +} + +void CFGabout() { + const char *authors[]= {"linuzappz ", "Wei Mingzhi ", NULL}; + GtkWidget *widget; + + widget = gtk_about_dialog_new(); + gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(widget), "Socket NetPlay Driver"); + gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "0.21"); + gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors); + gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(widget), "http://www.codeplex.com/pcsxr/"); + + gtk_dialog_run(GTK_DIALOG(widget)); + gtk_widget_destroy(widget); +} + +long CFGmessage(char *args[], int num) { + char msg[512]; + + memset(msg, 0, sizeof(msg)); + while (num) { + strcat(msg, *args); strcat(msg, " "); + num--; args++; + } + cfgSysMessage(msg); + + return 0; +} + +int main(int argc, char *argv[]) { +#ifdef ENABLE_NLS + setlocale(LC_ALL, ""); + bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); + textdomain(GETTEXT_PACKAGE); +#endif + + gtk_set_locale(); + gtk_init(&argc, &argv); + + if (!strcmp(argv[1], "configure")) { + CFGconfigure(); + } else if (!strcmp(argv[1], "open")) { + return CFGopen(); + } else if (!strcmp(argv[1], "wait")) { + CFGwait(); + } else if (!strcmp(argv[1], "pause")) { + return CFGpause(); + } else if (!strcmp(argv[1], "about")) { + CFGabout(); + } else if (!strcmp(argv[1], "message")) { + CFGmessage(&argv[2], argc - 2); + } + + return 0; +} diff --git a/plugins/dfnet/unix.c b/plugins/dfnet/unix.c new file mode 100644 index 00000000..390a5fc3 --- /dev/null +++ b/plugins/dfnet/unix.c @@ -0,0 +1,125 @@ +// +// DF Netplay Plugin +// +// Based on netSock 0.2 by linuzappz. +// The Plugin is free source code. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +extern int errno; + +#include "dfnet.h" + +int ExecCfg(const char *arg, int f) { + char cfg[512]; + + strcpy(cfg, "cfg/cfgDFNet"); + strcat(cfg, " "); + strcat(cfg, arg); + + if (f) { + if (fork() == 0) { system(cfg); exit(0); } + return 0; + } + + return system(cfg); +} + +void SysMessage(const char *fmt, ...) { + va_list list; + char msg[512]; + char cmd[512]; + + va_start(list, fmt); + vsprintf(msg, fmt, list); + va_end(list); + + sprintf(cmd, "message %s\n", msg); + ExecCfg(cmd, 1); +} + +long sockInit() { + conf.PlayerNum = 0; + tm.tv_sec = 0; + tm.tv_usec = 0; + + return 0; +} + +long sockShutdown() { + return 0; +} + +long sockOpen() { + if (ExecCfg("open", 0) == 0) return -1; + + LoadConf(); + + return 0; +} + +int sockPing() { + char data[32]; + struct timeval tv, tvn; + + memset(data, 0, sizeof(data)); + + gettimeofday(&tv, NULL); + SEND(data, 32, PSE_NET_BLOCKING); + RECV(data, 32, PSE_NET_BLOCKING); + gettimeofday(&tvn, NULL); + + return (tvn.tv_sec - tv.tv_sec) * 1000 + + (tvn.tv_usec - tv.tv_usec) / 1000; +} + +void CALLBACK NETconfigure() { + ExecCfg("configure", 1); +} + +void CALLBACK NETabout() { + ExecCfg("about", 1); +} + +pid_t cfgpid = 0; + +void OnWaitDlg_Abort(int num) { + WaitCancel = 1; + cfgpid = 0; +} + +void sockCreateWaitDlg() { + signal(SIGUSR2, OnWaitDlg_Abort); + if ((cfgpid = fork()) == 0) { + execl("cfg/cfgDFNet", "cfgDFNet", "wait", NULL); + exit(0); + } + usleep(100000); +} + +void sockDlgUpdate() { + usleep(100000); +} + +void sockDestroyWaitDlg() { + if (cfgpid > 0) { + kill(cfgpid, SIGKILL); + cfgpid = 0; + } +} + +long timeGetTime() { + struct timeval tv; + + gettimeofday(&tv, NULL); + return (tv.tv_sec) * 1000 + (tv.tv_usec) / 1000; +} diff --git a/plugins/dfsound/Makefile.am b/plugins/dfsound/Makefile.am new file mode 100644 index 00000000..88a7dc8f --- /dev/null +++ b/plugins/dfsound/Makefile.am @@ -0,0 +1,51 @@ +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) \ + -I../../include + +bindir = @libdir@/games/psemu/ +libdir = @libdir@/games/psemu/ + +lib_LTLIBRARIES = libDFSound.la + +libDFSound_la_SOURCES = spu.c cfg.c dma.c freeze.c registers.c + +libDFSound_la_CFLAGS = +libDFSound_la_LDFLAGS = -module -avoid-version -lpthread -lm + +if SOUND_ALSA +libDFSound_la_SOURCES += alsa.c +libDFSound_la_CFLAGS += -DUSEALSA=1 +libDFSound_la_LDFLAGS += $(ALSA_LIBS) +endif + +if SOUND_OSS +libDFSound_la_SOURCES += oss.c +libDFSound_la_CFLAGS += -DUSEOSS=1 +endif + +if SOUND_PULSEAUDIO +libDFSound_la_SOURCES += pulseaudio.c +libDFSound_la_CFLAGS += -DUSEPULSEAUDIO=1 $(PULSEAUDIO_CFLAGS) +libDFSound_la_LDFLAGS += $(PULSEAUDIO_LIBS) +endif + +if SOUND_SDL +libDFSound_la_SOURCES += sdl.c +libDFSound_la_CFLAGS += -DUSESDL=1 $(SDL_CFLAGS) +libDFSound_la_LDFLAGS += $(SDL_LIBS) +endif + +if SOUND_NULL +libDFSound_la_SOURCES += nullsnd.c +libDFSound_la_CFLAGS += -DUSENULL=1 +endif + +bin_PROGRAMS = cfgDFSound +cfgDFSound_SOURCES = spucfg-0.1df/main.c +cfgDFSound_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) + +glade_DATA = spucfg-0.1df/dfsound.glade2 +gladedir = $(datadir)/psemu/ +EXTRA_DIST = $(glade_DATA) diff --git a/plugins/dfsound/Makefile.in b/plugins/dfsound/Makefile.in new file mode 100644 index 00000000..70edf5bf --- /dev/null +++ b/plugins/dfsound/Makefile.in @@ -0,0 +1,711 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@SOUND_ALSA_TRUE@am__append_1 = alsa.c +@SOUND_ALSA_TRUE@am__append_2 = -DUSEALSA=1 +@SOUND_ALSA_TRUE@am__append_3 = $(ALSA_LIBS) +@SOUND_OSS_TRUE@am__append_4 = oss.c +@SOUND_OSS_TRUE@am__append_5 = -DUSEOSS=1 +@SOUND_PULSEAUDIO_TRUE@am__append_6 = pulseaudio.c +@SOUND_PULSEAUDIO_TRUE@am__append_7 = -DUSEPULSEAUDIO=1 $(PULSEAUDIO_CFLAGS) +@SOUND_PULSEAUDIO_TRUE@am__append_8 = $(PULSEAUDIO_LIBS) +@SOUND_SDL_TRUE@am__append_9 = sdl.c +@SOUND_SDL_TRUE@am__append_10 = -DUSESDL=1 $(SDL_CFLAGS) +@SOUND_SDL_TRUE@am__append_11 = $(SDL_LIBS) +@SOUND_NULL_TRUE@am__append_12 = nullsnd.c +@SOUND_NULL_TRUE@am__append_13 = -DUSENULL=1 +bin_PROGRAMS = cfgDFSound$(EXEEXT) +subdir = plugins/dfsound +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(gladedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libDFSound_la_LIBADD = +am__libDFSound_la_SOURCES_DIST = spu.c cfg.c dma.c freeze.c \ + registers.c alsa.c oss.c pulseaudio.c sdl.c nullsnd.c +@SOUND_ALSA_TRUE@am__objects_1 = libDFSound_la-alsa.lo +@SOUND_OSS_TRUE@am__objects_2 = libDFSound_la-oss.lo +@SOUND_PULSEAUDIO_TRUE@am__objects_3 = libDFSound_la-pulseaudio.lo +@SOUND_SDL_TRUE@am__objects_4 = libDFSound_la-sdl.lo +@SOUND_NULL_TRUE@am__objects_5 = libDFSound_la-nullsnd.lo +am_libDFSound_la_OBJECTS = libDFSound_la-spu.lo libDFSound_la-cfg.lo \ + libDFSound_la-dma.lo libDFSound_la-freeze.lo \ + libDFSound_la-registers.lo $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) $(am__objects_4) $(am__objects_5) +libDFSound_la_OBJECTS = $(am_libDFSound_la_OBJECTS) +libDFSound_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libDFSound_la_CFLAGS) \ + $(CFLAGS) $(libDFSound_la_LDFLAGS) $(LDFLAGS) -o $@ +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_cfgDFSound_OBJECTS = main.$(OBJEXT) +cfgDFSound_OBJECTS = $(am_cfgDFSound_OBJECTS) +am__DEPENDENCIES_1 = +cfgDFSound_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libDFSound_la_SOURCES) $(cfgDFSound_SOURCES) +DIST_SOURCES = $(am__libDFSound_la_SOURCES_DIST) $(cfgDFSound_SOURCES) +gladeDATA_INSTALL = $(INSTALL_DATA) +DATA = $(glade_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @libdir@/games/psemu/ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@/games/psemu/ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) \ + -I../../include + +lib_LTLIBRARIES = libDFSound.la +libDFSound_la_SOURCES = spu.c cfg.c dma.c freeze.c registers.c \ + $(am__append_1) $(am__append_4) $(am__append_6) \ + $(am__append_9) $(am__append_12) +libDFSound_la_CFLAGS = $(am__append_2) $(am__append_5) $(am__append_7) \ + $(am__append_10) $(am__append_13) +libDFSound_la_LDFLAGS = -module -avoid-version -lpthread -lm \ + $(am__append_3) $(am__append_8) $(am__append_11) +cfgDFSound_SOURCES = spucfg-0.1df/main.c +cfgDFSound_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) +glade_DATA = spucfg-0.1df/dfsound.glade2 +gladedir = $(datadir)/psemu/ +EXTRA_DIST = $(glade_DATA) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/dfsound/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/dfsound/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libDFSound.la: $(libDFSound_la_OBJECTS) $(libDFSound_la_DEPENDENCIES) + $(libDFSound_la_LINK) -rpath $(libdir) $(libDFSound_la_OBJECTS) $(libDFSound_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +cfgDFSound$(EXEEXT): $(cfgDFSound_OBJECTS) $(cfgDFSound_DEPENDENCIES) + @rm -f cfgDFSound$(EXEEXT) + $(LINK) $(cfgDFSound_OBJECTS) $(cfgDFSound_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFSound_la-alsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFSound_la-cfg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFSound_la-dma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFSound_la-freeze.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFSound_la-nullsnd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFSound_la-oss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFSound_la-pulseaudio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFSound_la-registers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFSound_la-sdl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDFSound_la-spu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libDFSound_la-spu.lo: spu.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -MT libDFSound_la-spu.lo -MD -MP -MF $(DEPDIR)/libDFSound_la-spu.Tpo -c -o libDFSound_la-spu.lo `test -f 'spu.c' || echo '$(srcdir)/'`spu.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFSound_la-spu.Tpo $(DEPDIR)/libDFSound_la-spu.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spu.c' object='libDFSound_la-spu.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -c -o libDFSound_la-spu.lo `test -f 'spu.c' || echo '$(srcdir)/'`spu.c + +libDFSound_la-cfg.lo: cfg.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -MT libDFSound_la-cfg.lo -MD -MP -MF $(DEPDIR)/libDFSound_la-cfg.Tpo -c -o libDFSound_la-cfg.lo `test -f 'cfg.c' || echo '$(srcdir)/'`cfg.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFSound_la-cfg.Tpo $(DEPDIR)/libDFSound_la-cfg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfg.c' object='libDFSound_la-cfg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -c -o libDFSound_la-cfg.lo `test -f 'cfg.c' || echo '$(srcdir)/'`cfg.c + +libDFSound_la-dma.lo: dma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -MT libDFSound_la-dma.lo -MD -MP -MF $(DEPDIR)/libDFSound_la-dma.Tpo -c -o libDFSound_la-dma.lo `test -f 'dma.c' || echo '$(srcdir)/'`dma.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFSound_la-dma.Tpo $(DEPDIR)/libDFSound_la-dma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dma.c' object='libDFSound_la-dma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -c -o libDFSound_la-dma.lo `test -f 'dma.c' || echo '$(srcdir)/'`dma.c + +libDFSound_la-freeze.lo: freeze.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -MT libDFSound_la-freeze.lo -MD -MP -MF $(DEPDIR)/libDFSound_la-freeze.Tpo -c -o libDFSound_la-freeze.lo `test -f 'freeze.c' || echo '$(srcdir)/'`freeze.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFSound_la-freeze.Tpo $(DEPDIR)/libDFSound_la-freeze.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='freeze.c' object='libDFSound_la-freeze.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -c -o libDFSound_la-freeze.lo `test -f 'freeze.c' || echo '$(srcdir)/'`freeze.c + +libDFSound_la-registers.lo: registers.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -MT libDFSound_la-registers.lo -MD -MP -MF $(DEPDIR)/libDFSound_la-registers.Tpo -c -o libDFSound_la-registers.lo `test -f 'registers.c' || echo '$(srcdir)/'`registers.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFSound_la-registers.Tpo $(DEPDIR)/libDFSound_la-registers.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='registers.c' object='libDFSound_la-registers.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -c -o libDFSound_la-registers.lo `test -f 'registers.c' || echo '$(srcdir)/'`registers.c + +libDFSound_la-alsa.lo: alsa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -MT libDFSound_la-alsa.lo -MD -MP -MF $(DEPDIR)/libDFSound_la-alsa.Tpo -c -o libDFSound_la-alsa.lo `test -f 'alsa.c' || echo '$(srcdir)/'`alsa.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFSound_la-alsa.Tpo $(DEPDIR)/libDFSound_la-alsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='alsa.c' object='libDFSound_la-alsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -c -o libDFSound_la-alsa.lo `test -f 'alsa.c' || echo '$(srcdir)/'`alsa.c + +libDFSound_la-oss.lo: oss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -MT libDFSound_la-oss.lo -MD -MP -MF $(DEPDIR)/libDFSound_la-oss.Tpo -c -o libDFSound_la-oss.lo `test -f 'oss.c' || echo '$(srcdir)/'`oss.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFSound_la-oss.Tpo $(DEPDIR)/libDFSound_la-oss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oss.c' object='libDFSound_la-oss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -c -o libDFSound_la-oss.lo `test -f 'oss.c' || echo '$(srcdir)/'`oss.c + +libDFSound_la-pulseaudio.lo: pulseaudio.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -MT libDFSound_la-pulseaudio.lo -MD -MP -MF $(DEPDIR)/libDFSound_la-pulseaudio.Tpo -c -o libDFSound_la-pulseaudio.lo `test -f 'pulseaudio.c' || echo '$(srcdir)/'`pulseaudio.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFSound_la-pulseaudio.Tpo $(DEPDIR)/libDFSound_la-pulseaudio.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pulseaudio.c' object='libDFSound_la-pulseaudio.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -c -o libDFSound_la-pulseaudio.lo `test -f 'pulseaudio.c' || echo '$(srcdir)/'`pulseaudio.c + +libDFSound_la-sdl.lo: sdl.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -MT libDFSound_la-sdl.lo -MD -MP -MF $(DEPDIR)/libDFSound_la-sdl.Tpo -c -o libDFSound_la-sdl.lo `test -f 'sdl.c' || echo '$(srcdir)/'`sdl.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFSound_la-sdl.Tpo $(DEPDIR)/libDFSound_la-sdl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sdl.c' object='libDFSound_la-sdl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -c -o libDFSound_la-sdl.lo `test -f 'sdl.c' || echo '$(srcdir)/'`sdl.c + +libDFSound_la-nullsnd.lo: nullsnd.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -MT libDFSound_la-nullsnd.lo -MD -MP -MF $(DEPDIR)/libDFSound_la-nullsnd.Tpo -c -o libDFSound_la-nullsnd.lo `test -f 'nullsnd.c' || echo '$(srcdir)/'`nullsnd.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libDFSound_la-nullsnd.Tpo $(DEPDIR)/libDFSound_la-nullsnd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nullsnd.c' object='libDFSound_la-nullsnd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDFSound_la_CFLAGS) $(CFLAGS) -c -o libDFSound_la-nullsnd.lo `test -f 'nullsnd.c' || echo '$(srcdir)/'`nullsnd.c + +main.o: spucfg-0.1df/main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT main.o -MD -MP -MF $(DEPDIR)/main.Tpo -c -o main.o `test -f 'spucfg-0.1df/main.c' || echo '$(srcdir)/'`spucfg-0.1df/main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/main.Tpo $(DEPDIR)/main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spucfg-0.1df/main.c' object='main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o main.o `test -f 'spucfg-0.1df/main.c' || echo '$(srcdir)/'`spucfg-0.1df/main.c + +main.obj: spucfg-0.1df/main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT main.obj -MD -MP -MF $(DEPDIR)/main.Tpo -c -o main.obj `if test -f 'spucfg-0.1df/main.c'; then $(CYGPATH_W) 'spucfg-0.1df/main.c'; else $(CYGPATH_W) '$(srcdir)/spucfg-0.1df/main.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/main.Tpo $(DEPDIR)/main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spucfg-0.1df/main.c' object='main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o main.obj `if test -f 'spucfg-0.1df/main.c'; then $(CYGPATH_W) 'spucfg-0.1df/main.c'; else $(CYGPATH_W) '$(srcdir)/spucfg-0.1df/main.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-gladeDATA: $(glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(glade_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \ + $(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \ + done + +uninstall-gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(glade_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \ + rm -f "$(DESTDIR)$(gladedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-gladeDATA + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-gladeDATA \ + uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-gladeDATA install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-gladeDATA uninstall-libLTLIBRARIES + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/plugins/dfsound/adsr.c b/plugins/dfsound/adsr.c new file mode 100644 index 00000000..2496e461 --- /dev/null +++ b/plugins/dfsound/adsr.c @@ -0,0 +1,641 @@ +/*************************************************************************** + adsr.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_ADSR + +// will be included from spu.c +#ifdef _IN_SPU + +//////////////////////////////////////////////////////////////////////// +// ADSR func +//////////////////////////////////////////////////////////////////////// + +unsigned long RateTable[160]; + +void InitADSR(void) // INIT ADSR +{ + unsigned long r,rs,rd;int i; + + memset(RateTable,0,sizeof(unsigned long)*160); // build the rate table according to Neill's rules (see at bottom of file) + + r=3;rs=1;rd=0; + + for(i=32;i<160;i++) // we start at pos 32 with the real values... everything before is 0 + { + if(r<0x3FFFFFFF) + { + r+=rs; + rd++;if(rd==5) {rd=1;rs*=2;} + } + if(r>0x3FFFFFFF) r=0x3FFFFFFF; + + RateTable[i]=r; + } +} + +//////////////////////////////////////////////////////////////////////// + +INLINE void StartADSR(int ch) // MIX ADSR +{ + s_chan[ch].ADSRX.lVolume=1; // and init some adsr vars + s_chan[ch].ADSRX.State=0; + s_chan[ch].ADSRX.EnvelopeVol=0; +} + +//////////////////////////////////////////////////////////////////////// + +INLINE int MixADSR(int ch) // MIX ADSR +{ + if(s_chan[ch].bStop) // should be stopped: + { // do release + if(s_chan[ch].ADSRX.ReleaseModeExp) + { + switch((s_chan[ch].ADSRX.EnvelopeVol>>28)&0x7) + { + case 0: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.ReleaseRate^0x1F))-0x18 +0 + 32]; break; + case 1: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.ReleaseRate^0x1F))-0x18 +4 + 32]; break; + case 2: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.ReleaseRate^0x1F))-0x18 +6 + 32]; break; + case 3: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.ReleaseRate^0x1F))-0x18 +8 + 32]; break; + case 4: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.ReleaseRate^0x1F))-0x18 +9 + 32]; break; + case 5: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.ReleaseRate^0x1F))-0x18 +10+ 32]; break; + case 6: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.ReleaseRate^0x1F))-0x18 +11+ 32]; break; + case 7: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.ReleaseRate^0x1F))-0x18 +12+ 32]; break; + } + } + else + { + s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.ReleaseRate^0x1F))-0x0C + 32]; + } + + if(s_chan[ch].ADSRX.EnvelopeVol<0) + { + s_chan[ch].ADSRX.EnvelopeVol=0; + s_chan[ch].bOn=0; + //s_chan[ch].bReverb=0; + //s_chan[ch].bNoise=0; + } + + s_chan[ch].ADSRX.lVolume=s_chan[ch].ADSRX.EnvelopeVol>>21; + return s_chan[ch].ADSRX.lVolume; + } + else // not stopped yet? + { + if(s_chan[ch].ADSRX.State==0) // -> attack + { + if(s_chan[ch].ADSRX.AttackModeExp) + { + if(s_chan[ch].ADSRX.EnvelopeVol<0x60000000) + s_chan[ch].ADSRX.EnvelopeVol+=RateTable[(s_chan[ch].ADSRX.AttackRate^0x7F)-0x10 + 32]; + else + s_chan[ch].ADSRX.EnvelopeVol+=RateTable[(s_chan[ch].ADSRX.AttackRate^0x7F)-0x18 + 32]; + } + else + { + s_chan[ch].ADSRX.EnvelopeVol+=RateTable[(s_chan[ch].ADSRX.AttackRate^0x7F)-0x10 + 32]; + } + + if(s_chan[ch].ADSRX.EnvelopeVol<0) + { + s_chan[ch].ADSRX.EnvelopeVol=0x7FFFFFFF; + s_chan[ch].ADSRX.State=1; + } + + s_chan[ch].ADSRX.lVolume=s_chan[ch].ADSRX.EnvelopeVol>>21; + return s_chan[ch].ADSRX.lVolume; + } + //--------------------------------------------------// + if(s_chan[ch].ADSRX.State==1) // -> decay + { + switch((s_chan[ch].ADSRX.EnvelopeVol>>28)&0x7) + { + case 0: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.DecayRate^0x1F))-0x18+0 + 32]; break; + case 1: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.DecayRate^0x1F))-0x18+4 + 32]; break; + case 2: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.DecayRate^0x1F))-0x18+6 + 32]; break; + case 3: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.DecayRate^0x1F))-0x18+8 + 32]; break; + case 4: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.DecayRate^0x1F))-0x18+9 + 32]; break; + case 5: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.DecayRate^0x1F))-0x18+10+ 32]; break; + case 6: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.DecayRate^0x1F))-0x18+11+ 32]; break; + case 7: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[(4*(s_chan[ch].ADSRX.DecayRate^0x1F))-0x18+12+ 32]; break; + } + + if(s_chan[ch].ADSRX.EnvelopeVol<0) s_chan[ch].ADSRX.EnvelopeVol=0; + if(((s_chan[ch].ADSRX.EnvelopeVol>>27)&0xF) <= s_chan[ch].ADSRX.SustainLevel) + { + s_chan[ch].ADSRX.State=2; + } + + s_chan[ch].ADSRX.lVolume=s_chan[ch].ADSRX.EnvelopeVol>>21; + return s_chan[ch].ADSRX.lVolume; + } + //--------------------------------------------------// + if(s_chan[ch].ADSRX.State==2) // -> sustain + { + if(s_chan[ch].ADSRX.SustainIncrease) + { + if(s_chan[ch].ADSRX.SustainModeExp) + { + if(s_chan[ch].ADSRX.EnvelopeVol<0x60000000) + s_chan[ch].ADSRX.EnvelopeVol+=RateTable[(s_chan[ch].ADSRX.SustainRate^0x7F)-0x10 + 32]; + else + s_chan[ch].ADSRX.EnvelopeVol+=RateTable[(s_chan[ch].ADSRX.SustainRate^0x7F)-0x18 + 32]; + } + else + { + s_chan[ch].ADSRX.EnvelopeVol+=RateTable[(s_chan[ch].ADSRX.SustainRate^0x7F)-0x10 + 32]; + } + + if(s_chan[ch].ADSRX.EnvelopeVol<0) + { + s_chan[ch].ADSRX.EnvelopeVol=0x7FFFFFFF; + } + } + else + { + if(s_chan[ch].ADSRX.SustainModeExp) + { + switch((s_chan[ch].ADSRX.EnvelopeVol>>28)&0x7) + { + case 0: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[((s_chan[ch].ADSRX.SustainRate^0x7F))-0x1B +0 + 32];break; + case 1: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[((s_chan[ch].ADSRX.SustainRate^0x7F))-0x1B +4 + 32];break; + case 2: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[((s_chan[ch].ADSRX.SustainRate^0x7F))-0x1B +6 + 32];break; + case 3: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[((s_chan[ch].ADSRX.SustainRate^0x7F))-0x1B +8 + 32];break; + case 4: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[((s_chan[ch].ADSRX.SustainRate^0x7F))-0x1B +9 + 32];break; + case 5: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[((s_chan[ch].ADSRX.SustainRate^0x7F))-0x1B +10+ 32];break; + case 6: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[((s_chan[ch].ADSRX.SustainRate^0x7F))-0x1B +11+ 32];break; + case 7: s_chan[ch].ADSRX.EnvelopeVol-=RateTable[((s_chan[ch].ADSRX.SustainRate^0x7F))-0x1B +12+ 32];break; + } + } + else + { + s_chan[ch].ADSRX.EnvelopeVol-=RateTable[((s_chan[ch].ADSRX.SustainRate^0x7F))-0x0F + 32]; + } + + if(s_chan[ch].ADSRX.EnvelopeVol<0) + { + s_chan[ch].ADSRX.EnvelopeVol=0; + } + } + s_chan[ch].ADSRX.lVolume=s_chan[ch].ADSRX.EnvelopeVol>>21; + return s_chan[ch].ADSRX.lVolume; + } + } + return 0; +} + +#endif + +/* +James Higgs ADSR investigations: + +PSX SPU Envelope Timings +~~~~~~~~~~~~~~~~~~~~~~~~ + +First, here is an extract from doomed's SPU doc, which explains the basics +of the SPU "volume envelope": + +*** doomed doc extract start *** + +-------------------------------------------------------------------------- +Voices. +-------------------------------------------------------------------------- +The SPU has 24 hardware voices. These voices can be used to reproduce sample +data, noise or can be used as frequency modulator on the next voice. +Each voice has it's own programmable ADSR envelope filter. The main volume +can be programmed independently for left and right output. + +The ADSR envelope filter works as follows: +Ar = Attack rate, which specifies the speed at which the volume increases + from zero to it's maximum value, as soon as the note on is given. The + slope can be set to lineair or exponential. +Dr = Decay rate specifies the speed at which the volume decreases to the + sustain level. Decay is always decreasing exponentially. +Sl = Sustain level, base level from which sustain starts. +Sr = Sustain rate is the rate at which the volume of the sustained note + increases or decreases. This can be either lineair or exponential. +Rr = Release rate is the rate at which the volume of the note decreases + as soon as the note off is given. + + lvl | + ^ | /\Dr __ + Sl _| _ / _ \__--- \ + | / ---__ \ Rr + | /Ar Sr \ \ + | / \\ + |/___________________\________ + ->time + +The overal volume can also be set to sweep up or down lineairly or +exponentially from it's current value. This can be done seperately +for left and right. + +Relevant SPU registers: +------------------------------------------------------------- +$1f801xx8 Attack/Decay/Sustain level +bit |0f|0e 0d 0c 0b 0a 09 08|07 06 05 04|03 02 01 00| +desc.|Am| Ar |Dr |Sl | + +Am 0 Attack mode Linear + 1 Exponential + +Ar 0-7f attack rate +Dr 0-f decay rate +Sl 0-f sustain level +------------------------------------------------------------- +$1f801xxa Sustain rate, Release Rate. +bit |0f|0e|0d|0c 0b 0a 09 08 07 06|05|04 03 02 01 00| +desc.|Sm|Sd| 0| Sr |Rm|Rr | + +Sm 0 sustain rate mode linear + 1 exponential +Sd 0 sustain rate mode increase + 1 decrease +Sr 0-7f Sustain Rate +Rm 0 Linear decrease + 1 Exponential decrease +Rr 0-1f Release Rate + +Note: decay mode is always Expontial decrease, and thus cannot +be set. +------------------------------------------------------------- +$1f801xxc Current ADSR volume +bit |0f 0e 0d 0c 0b 0a 09 08 07 06 05 04 03 02 01 00| +desc.|ADSRvol | + +ADSRvol Returns the current envelope volume when + read. +-- James' Note: return range: 0 -> 32767 + +*** doomed doc extract end *** + +By using a small PSX proggie to visualise the envelope as it was played, +the following results for envelope timing were obtained: + +1. Attack rate value (linear mode) + + Attack value range: 0 -> 127 + + Value | 48 | 52 | 56 | 60 | 64 | 68 | 72 | | 80 | + ----------------------------------------------------------------- + Frames | 11 | 21 | 42 | 84 | 169| 338| 676| |2890| + + Note: frames is no. of PAL frames to reach full volume (100% + amplitude) + + Hmm, noticing that the time taken to reach full volume doubles + every time we add 4 to our attack value, we know the equation is + of form: + frames = k * 2 ^ (value / 4) + + (You may ponder about envelope generator hardware at this point, + or maybe not... :) + + By substituting some stuff and running some checks, we get: + + k = 0.00257 (close enuf) + + therefore, + frames = 0.00257 * 2 ^ (value / 4) + If you just happen to be writing an emulator, then you can probably + use an equation like: + + %volume_increase_per_tick = 1 / frames + + + ------------------------------------ + Pete: + ms=((1<<(value>>2))*514)/10000 + ------------------------------------ + +2. Decay rate value (only has log mode) + + Decay value range: 0 -> 15 + + Value | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | + ------------------------------------------------ + frames | | | | | 6 | 12 | 24 | 47 | + + Note: frames here is no. of PAL frames to decay to 50% volume. + + formula: frames = k * 2 ^ (value) + + Substituting, we get: k = 0.00146 + + Further info on logarithmic nature: + frames to decay to sustain level 3 = 3 * frames to decay to + sustain level 9 + + Also no. of frames to 25% volume = roughly 1.85 * no. of frames to + 50% volume. + + Frag it - just use linear approx. + + ------------------------------------ + Pete: + ms=((1< 127 + + Value | 48 | 52 | 56 | 60 | 64 | 68 | 72 | + ------------------------------------------- + frames | 9 | 19 | 37 | 74 | 147| 293| 587| + + Here, frames = no. of PAL frames for volume amplitude to go from 100% + to 0% (or vice-versa). + + Same formula as for attack value, just a different value for k: + + k = 0.00225 + + ie: frames = 0.00225 * 2 ^ (value / 4) + + For emulation purposes: + + %volume_increase_or_decrease_per_tick = 1 / frames + + ------------------------------------ + Pete: + ms=((1<<(value>>2))*450)/10000 + ------------------------------------ + + +4. Release rate (linear mode) + + Release rate range: 0 -> 31 + + Value | 13 | 14 | 15 | 16 | 17 | + --------------------------------------------------------------- + frames | 18 | 36 | 73 | 146| 292| + + Here, frames = no. of PAL frames to decay from 100% vol to 0% vol + after "note-off" is triggered. + + Formula: frames = k * 2 ^ (value) + + And so: k = 0.00223 + + ------------------------------------ + Pete: + ms=((1< release phase + { + if(s_chan[ch].ADSR.ReleaseVal!=0) // -> release not 0: do release (if 0: stop right now) + { + if(!s_chan[ch].ADSR.ReleaseVol) // --> release just started? set up the release stuff + { + s_chan[ch].ADSR.ReleaseStartTime=s_chan[ch].ADSR.lTime; + s_chan[ch].ADSR.ReleaseVol=s_chan[ch].ADSR.lVolume; + s_chan[ch].ADSR.ReleaseTime = // --> calc how long does it take to reach the wanted sus level + (s_chan[ch].ADSR.ReleaseTime* + s_chan[ch].ADSR.ReleaseVol)/1024; + } + // -> NO release exp mode used (yet) + v=s_chan[ch].ADSR.ReleaseVol; // -> get last volume + lT=s_chan[ch].ADSR.lTime- // -> how much time is past? + s_chan[ch].ADSR.ReleaseStartTime; + l1=s_chan[ch].ADSR.ReleaseTime; + + if(lT we still have to release + { + v=v-((v*lT)/l1); // --> calc new volume + } + else // -> release is over: now really stop that sample + {v=0;s_chan[ch].bOn=0;s_chan[ch].ADSR.ReleaseVol=0;s_chan[ch].bNoise=0;} + } + else // -> release IS 0: release at once + { + v=0;s_chan[ch].bOn=0;s_chan[ch].ADSR.ReleaseVol=0;s_chan[ch].bNoise=0; + } + } + else + {//--------------------------------------------------// not in release phase: + v=1024; + lT=s_chan[ch].ADSR.lTime; + l1=s_chan[ch].ADSR.AttackTime; + + if(lT0) + { + if(l3!=0) v2+=((v-v2)*lT)/l3; + else v2=v; + } + else + { + if(l3!=0) v2-=(v2*lT)/l3; + else v2=v; + } + + if(v2>v) v2=v; + if(v2<=0) {v2=0;s_chan[ch].bOn=0;s_chan[ch].ADSR.ReleaseVol=0;s_chan[ch].bNoise=0;} + + v=v2; + } + } + } + + //----------------------------------------------------// + // ok, done for this channel, so increase time + + s_chan[ch].ADSR.lTime+=1; // 1 = 1.020408f ms; + + if(v>1024) v=1024; // adjust volume + if(v<0) v=0; + s_chan[ch].ADSR.lVolume=v; // store act volume + + return v; // return the volume factor +*/ + + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- + + +/* +----------------------------------------------------------------------------- +Neill Corlett +Playstation SPU envelope timing notes +----------------------------------------------------------------------------- + +This is preliminary. This may be wrong. But the model described herein fits +all of my experimental data, and it's just simple enough to sound right. + +ADSR envelope level ranges from 0x00000000 to 0x7FFFFFFF internally. +The value returned by channel reg 0xC is (envelope_level>>16). + +Each sample, an increment or decrement value will be added to or +subtracted from this envelope level. + +Create the rate log table. The values double every 4 entries. + entry #0 = 4 + + 4, 5, 6, 7, + 8,10,12,14, + 16,20,24,28, ... + + entry #40 = 4096... + entry #44 = 8192... + entry #48 = 16384... + entry #52 = 32768... + entry #56 = 65536... + +increments and decrements are in terms of ratelogtable[n] +n may exceed the table bounds (plan on n being between -32 and 127). +table values are all clipped between 0x00000000 and 0x3FFFFFFF + +when you "voice on", the envelope is always fully reset. +(yes, it may click. the real thing does this too.) + +envelope level begins at zero. + +each state happens for at least 1 cycle +(transitions are not instantaneous) +this may result in some oddness: if the decay rate is uberfast, it will cut +the envelope from full down to half in one sample, potentially skipping over +the sustain level + +ATTACK +------ +- if the envelope level has overflowed past the max, clip to 0x7FFFFFFF and + proceed to DECAY. + +Linear attack mode: +- line extends upward to 0x7FFFFFFF +- increment per sample is ratelogtable[(Ar^0x7F)-0x10] + +Logarithmic attack mode: +if envelope_level < 0x60000000: + - line extends upward to 0x60000000 + - increment per sample is ratelogtable[(Ar^0x7F)-0x10] +else: + - line extends upward to 0x7FFFFFFF + - increment per sample is ratelogtable[(Ar^0x7F)-0x18] + +DECAY +----- +- if ((envelope_level>>27)&0xF) <= Sl, proceed to SUSTAIN. + Do not clip to the sustain level. +- current line ends at (envelope_level & 0x07FFFFFF) +- decrement per sample depends on (envelope_level>>28)&0x7 + 0: ratelogtable[(4*(Dr^0x1F))-0x18+0] + 1: ratelogtable[(4*(Dr^0x1F))-0x18+4] + 2: ratelogtable[(4*(Dr^0x1F))-0x18+6] + 3: ratelogtable[(4*(Dr^0x1F))-0x18+8] + 4: ratelogtable[(4*(Dr^0x1F))-0x18+9] + 5: ratelogtable[(4*(Dr^0x1F))-0x18+10] + 6: ratelogtable[(4*(Dr^0x1F))-0x18+11] + 7: ratelogtable[(4*(Dr^0x1F))-0x18+12] + (note that this is the same as the release rate formula, except that + decay rates 10-1F aren't possible... those would be slower in theory) + +SUSTAIN +------- +- no terminating condition except for voice off +- Sd=0 (increase) behavior is identical to ATTACK for both log and linear. +- Sd=1 (decrease) behavior: +Linear sustain decrease: +- line extends to 0x00000000 +- decrement per sample is ratelogtable[(Sr^0x7F)-0x0F] +Logarithmic sustain decrease: +- current line ends at (envelope_level & 0x07FFFFFF) +- decrement per sample depends on (envelope_level>>28)&0x7 + 0: ratelogtable[(Sr^0x7F)-0x1B+0] + 1: ratelogtable[(Sr^0x7F)-0x1B+4] + 2: ratelogtable[(Sr^0x7F)-0x1B+6] + 3: ratelogtable[(Sr^0x7F)-0x1B+8] + 4: ratelogtable[(Sr^0x7F)-0x1B+9] + 5: ratelogtable[(Sr^0x7F)-0x1B+10] + 6: ratelogtable[(Sr^0x7F)-0x1B+11] + 7: ratelogtable[(Sr^0x7F)-0x1B+12] + +RELEASE +------- +- if the envelope level has overflowed to negative, clip to 0 and QUIT. + +Linear release mode: +- line extends to 0x00000000 +- decrement per sample is ratelogtable[(4*(Rr^0x1F))-0x0C] + +Logarithmic release mode: +- line extends to (envelope_level & 0x0FFFFFFF) +- decrement per sample depends on (envelope_level>>28)&0x7 + 0: ratelogtable[(4*(Rr^0x1F))-0x18+0] + 1: ratelogtable[(4*(Rr^0x1F))-0x18+4] + 2: ratelogtable[(4*(Rr^0x1F))-0x18+6] + 3: ratelogtable[(4*(Rr^0x1F))-0x18+8] + 4: ratelogtable[(4*(Rr^0x1F))-0x18+9] + 5: ratelogtable[(4*(Rr^0x1F))-0x18+10] + 6: ratelogtable[(4*(Rr^0x1F))-0x18+11] + 7: ratelogtable[(4*(Rr^0x1F))-0x18+12] + +----------------------------------------------------------------------------- +*/ + diff --git a/plugins/dfsound/adsr.h b/plugins/dfsound/adsr.h new file mode 100644 index 00000000..ff2af1ff --- /dev/null +++ b/plugins/dfsound/adsr.h @@ -0,0 +1,19 @@ +/*************************************************************************** + adsr.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +INLINE void StartADSR(int ch); +INLINE int MixADSR(int ch); diff --git a/plugins/dfsound/alsa.c b/plugins/dfsound/alsa.c new file mode 100644 index 00000000..2eba878a --- /dev/null +++ b/plugins/dfsound/alsa.c @@ -0,0 +1,158 @@ +/*************************************************************************** + alsa.c - description + ------------------- + begin : Sat Mar 01 2003 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_OSS + +#include "externals.h" + +#define ALSA_PCM_NEW_HW_PARAMS_API +#define ALSA_PCM_NEW_SW_PARAMS_API +#include + +static snd_pcm_t *handle = NULL; +static snd_pcm_uframes_t buffer_size; + +// SETUP SOUND +void SetupSound(void) +{ + snd_pcm_hw_params_t *hwparams; + snd_pcm_status_t *status; + unsigned int pspeed; + int pchannels; + int format; + unsigned int buffer_time = 100000; + unsigned int period_time = buffer_time / 4; + int err; + + if (iDisStereo) pchannels = 1; + else pchannels=2; + + pspeed = 44100; + format = SND_PCM_FORMAT_S16; + + if ((err = snd_pcm_open(&handle, "default", + SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0) + { + printf("Audio open error: %s\n", snd_strerror(err)); + return; + } + + if((err = snd_pcm_nonblock(handle, 0))<0) + { + printf("Can't set blocking moded: %s\n", snd_strerror(err)); + return; + } + + snd_pcm_hw_params_alloca(&hwparams); + + if((err=snd_pcm_hw_params_any(handle, hwparams))<0) + { + printf("Broken configuration for this PCM: %s\n", snd_strerror(err)); + return; + } + + if((err=snd_pcm_hw_params_set_access(handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED))<0) + { + printf("Access type not available: %s\n", snd_strerror(err)); + return; + } + + if((err=snd_pcm_hw_params_set_format(handle, hwparams, format))<0) + { + printf("Sample format not available: %s\n", snd_strerror(err)); + return; + } + + if((err=snd_pcm_hw_params_set_channels(handle, hwparams, pchannels))<0) + { + printf("Channels count not available: %s\n", snd_strerror(err)); + return; + } + + if((err=snd_pcm_hw_params_set_rate_near(handle, hwparams, &pspeed, 0))<0) + { + printf("Rate not available: %s\n", snd_strerror(err)); + return; + } + + if((err=snd_pcm_hw_params_set_buffer_time_near(handle, hwparams, &buffer_time, 0))<0) + { + printf("Buffer time error: %s\n", snd_strerror(err)); + return; + } + + if((err=snd_pcm_hw_params_set_period_time_near(handle, hwparams, &period_time, 0))<0) + { + printf("Period time error: %s\n", snd_strerror(err)); + return; + } + + if((err=snd_pcm_hw_params(handle, hwparams))<0) + { + printf("Unable to install hw params: %s\n", snd_strerror(err)); + return; + } + + snd_pcm_status_alloca(&status); + if((err=snd_pcm_status(handle, status))<0) + { + printf("Unable to get status: %s\n", snd_strerror(err)); + return; + } + + buffer_size = snd_pcm_status_get_avail(status); +} + +// REMOVE SOUND +void RemoveSound(void) +{ + if(handle != NULL) + { + snd_pcm_drop(handle); + snd_pcm_close(handle); + handle = NULL; + } +} + +// GET BYTES BUFFERED +unsigned long SoundGetBytesBuffered(void) +{ + unsigned long l; + + if (handle == NULL) // failed to open? + return SOUNDSIZE; + l = snd_pcm_avail(handle); + if (l < 0) return 0; + if (l < buffer_size / 2) // can we write in at least the half of fragments? + l = SOUNDSIZE; // -> no? wait + else l = 0; // -> else go on + + return l; +} + +// FEED SOUND DATA +void SoundFeedStreamData(unsigned char* pSound,long lBytes) +{ + if (handle == NULL) return; + + if (snd_pcm_state(handle) == SND_PCM_STATE_XRUN) + snd_pcm_prepare(handle); + snd_pcm_writei(handle,pSound, + iDisStereo ? lBytes / 2 : lBytes / 4); +} diff --git a/plugins/dfsound/cfg.c b/plugins/dfsound/cfg.c new file mode 100644 index 00000000..2acb9c37 --- /dev/null +++ b/plugins/dfsound/cfg.c @@ -0,0 +1,167 @@ +/*************************************************************************** + cfg.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_CFG + +#include "externals.h" + +//////////////////////////////////////////////////////////////////////// +// LINUX CONFIG/ABOUT HANDLING +//////////////////////////////////////////////////////////////////////// + +#include + +//////////////////////////////////////////////////////////////////////// +// START EXTERNAL CFG TOOL +//////////////////////////////////////////////////////////////////////// + +void StartCfgTool(char * pCmdLine) +{ + FILE * cf; + char filename[255]; + + strcpy(filename,"cfgDFSound"); + cf=fopen(filename,"rb"); + if(cf!=NULL) + { + fclose(cf); + if(fork()==0) + { + execl("./cfgDFSound","cfgDFSound",pCmdLine,NULL); + exit(0); + } + } + else + { + strcpy(filename,"cfg/cfgDFSound"); + cf=fopen(filename,"rb"); + if(cf!=NULL) + { + fclose(cf); + if(fork()==0) + { + chdir("cfg"); + execl("./cfgDFSound","cfgDFSound",pCmdLine,NULL); + exit(0); + } + } + else + { + sprintf(filename,"%s/cfgDFSound",getenv("HOME")); + cf=fopen(filename,"rb"); + if(cf!=NULL) + { + fclose(cf); + if(fork()==0) + { + chdir(getenv("HOME")); + execl("./cfgDFSound","cfgDFSound",pCmdLine,NULL); + exit(0); + } + } + else printf("Sound error: cfgDFSound not found!\n"); + } + } +} + +///////////////////////////////////////////////////////// +// READ LINUX CONFIG FILE +///////////////////////////////////////////////////////// + +void ReadConfigFile(void) +{ + FILE *in;char t[256];int len; + char * pB, * p; + + strcpy(t,"dfsound.cfg"); + in = fopen(t,"rb"); + if(!in) + { + strcpy(t,"cfg/dfsound.cfg"); + in = fopen(t,"rb"); + if(!in) + { + sprintf(t,"%s/dfsound.cfg",getenv("HOME")); + in = fopen(t,"rb"); + if(!in) return; + } + } + + pB = (char *)malloc(32767); + memset(pB,0,32767); + + len = fread(pB, 1, 32767, in); + fclose(in); + + strcpy(t,"\nVolume");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iVolume=4-atoi(p+len); + if(iVolume<1) iVolume=1; + if(iVolume>4) iVolume=4; + + strcpy(t,"\nXAPitch");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iXAPitch=atoi(p+len); + if(iXAPitch<0) iXAPitch=0; + if(iXAPitch>1) iXAPitch=1; + + strcpy(t,"\nHighCompMode");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iUseTimer=atoi(p+len); + if(iUseTimer<0) iUseTimer=0; + // note: timer mode 1 (win time events) is not supported + // in linux. But timer mode 2 (spuupdate) is safe to use. + if(iUseTimer) iUseTimer=2; + + strcpy(t,"\nSPUIRQWait");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iSPUIRQWait=atoi(p+len); + if(iSPUIRQWait<0) iSPUIRQWait=0; + if(iSPUIRQWait>1) iSPUIRQWait=1; + + strcpy(t,"\nUseReverb");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iUseReverb=atoi(p+len); + if(iUseReverb<0) iUseReverb=0; + if(iUseReverb>2) iUseReverb=2; + + strcpy(t,"\nUseInterpolation");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iUseInterpolation=atoi(p+len); + if(iUseInterpolation<0) iUseInterpolation=0; + if(iUseInterpolation>3) iUseInterpolation=3; + + strcpy(t,"\nDisStereo");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iDisStereo=atoi(p+len); + if(iDisStereo<0) iDisStereo=0; + if(iDisStereo>1) iDisStereo=1; + + free(pB); +} + +///////////////////////////////////////////////////////// +// READ CONFIG called by spu funcs +///////////////////////////////////////////////////////// + +void ReadConfig(void) +{ + iVolume=2; + iXAPitch=0; + iSPUIRQWait=1; + iUseTimer=2; + iUseReverb=2; + iUseInterpolation=2; + iDisStereo=0; + + ReadConfigFile(); +} diff --git a/plugins/dfsound/cfg.h b/plugins/dfsound/cfg.h new file mode 100644 index 00000000..f64d6d62 --- /dev/null +++ b/plugins/dfsound/cfg.h @@ -0,0 +1,19 @@ +/*************************************************************************** + cfg.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +void ReadConfig(void); +void StartCfgTool(char * pCmdLine); diff --git a/plugins/dfsound/dma.c b/plugins/dfsound/dma.c new file mode 100644 index 00000000..f92d0666 --- /dev/null +++ b/plugins/dfsound/dma.c @@ -0,0 +1,97 @@ +/*************************************************************************** + dma.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_DMA + +#include "externals.h" + +//////////////////////////////////////////////////////////////////////// +// READ DMA (one value) +//////////////////////////////////////////////////////////////////////// + +unsigned short CALLBACK SPUreadDMA(void) +{ + unsigned short s=spuMem[spuAddr>>1]; + spuAddr+=2; + if(spuAddr>0x7ffff) spuAddr=0; + + iSpuAsyncWait=0; + + return s; +} + +//////////////////////////////////////////////////////////////////////// +// READ DMA (many values) +//////////////////////////////////////////////////////////////////////// + +void CALLBACK SPUreadDMAMem(unsigned short * pusPSXMem,int iSize) +{ + int i; + + for(i=0;i>1]; // spu addr got by writeregister + spuAddr+=2; // inc spu addr + if(spuAddr>0x7ffff) spuAddr=0; // wrap + } + + iSpuAsyncWait=0; +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +// to investigate: do sound data updates by writedma affect spu +// irqs? Will an irq be triggered, if new data is written to +// the memory irq address? + +//////////////////////////////////////////////////////////////////////// +// WRITE DMA (one value) +//////////////////////////////////////////////////////////////////////// + +void CALLBACK SPUwriteDMA(unsigned short val) +{ + spuMem[spuAddr>>1] = val; // spu addr got by writeregister + + spuAddr+=2; // inc spu addr + if(spuAddr>0x7ffff) spuAddr=0; // wrap + + iSpuAsyncWait=0; +} + +//////////////////////////////////////////////////////////////////////// +// WRITE DMA (many values) +//////////////////////////////////////////////////////////////////////// + +void CALLBACK SPUwriteDMAMem(unsigned short * pusPSXMem,int iSize) +{ + int i; + + for(i=0;i>1] = *pusPSXMem++; // spu addr got by writeregister + spuAddr+=2; // inc spu addr + if(spuAddr>0x7ffff) spuAddr=0; // wrap + } + + iSpuAsyncWait=0; +} + +//////////////////////////////////////////////////////////////////////// diff --git a/plugins/dfsound/dma.h b/plugins/dfsound/dma.h new file mode 100644 index 00000000..440536fe --- /dev/null +++ b/plugins/dfsound/dma.h @@ -0,0 +1,31 @@ +/*************************************************************************** + dma.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2002/05/15 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + + +unsigned short CALLBACK SPUreadDMA(void); +void CALLBACK SPUreadDMAMem(unsigned short * pusPSXMem,int iSize); +void CALLBACK SPUwriteDMA(unsigned short val); +void CALLBACK SPUwriteDMAMem(unsigned short * pusPSXMem,int iSize); diff --git a/plugins/dfsound/dsoundoss.h b/plugins/dfsound/dsoundoss.h new file mode 100644 index 00000000..3702312f --- /dev/null +++ b/plugins/dfsound/dsoundoss.h @@ -0,0 +1,22 @@ +/*************************************************************************** + dsoundoss.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +void SetupSound(void); +void RemoveSound(void); +unsigned long SoundGetBytesBuffered(void); +void SoundFeedStreamData(unsigned char* pSound,long lBytes); +unsigned long timeGetTime_spu(); diff --git a/plugins/dfsound/externals.h b/plugins/dfsound/externals.h new file mode 100644 index 00000000..f8562046 --- /dev/null +++ b/plugins/dfsound/externals.h @@ -0,0 +1,286 @@ +/*************************************************************************** + externals.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include + +///////////////////////////////////////////////////////// +// generic defines +///////////////////////////////////////////////////////// + +#define PSE_LT_SPU 4 +#define PSE_SPU_ERR_SUCCESS 0 +#define PSE_SPU_ERR -60 +#define PSE_SPU_ERR_NOTCONFIGURED PSE_SPU_ERR - 1 +#define PSE_SPU_ERR_INIT PSE_SPU_ERR - 2 +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +//////////////////////////////////////////////////////////////////////// +// spu defines +//////////////////////////////////////////////////////////////////////// + +// sound buffer sizes +// 400 ms complete sound buffer +#define SOUNDSIZE 70560 +// 137 ms test buffer... if less than that is buffered, a new upload will happen +#define TESTSIZE 24192 + +// num of channels +#define MAXCHAN 24 + +// ~ 1 ms of data +#define NSSIZE 45 + +/////////////////////////////////////////////////////////// +// struct defines +/////////////////////////////////////////////////////////// + +// ADSR INFOS PER CHANNEL +typedef struct +{ + int AttackModeExp; + long AttackTime; + long DecayTime; + long SustainLevel; + int SustainModeExp; + long SustainModeDec; + long SustainTime; + int ReleaseModeExp; + unsigned long ReleaseVal; + long ReleaseTime; + long ReleaseStartTime; + long ReleaseVol; + long lTime; + long lVolume; +} ADSRInfo; + +typedef struct +{ + int State; + int AttackModeExp; + int AttackRate; + int DecayRate; + int SustainLevel; + int SustainModeExp; + int SustainIncrease; + int SustainRate; + int ReleaseModeExp; + int ReleaseRate; + int EnvelopeVol; + long lVolume; + long lDummy1; + long lDummy2; +} ADSRInfoEx; + +/////////////////////////////////////////////////////////// + +// Tmp Flags + +// used for debug channel muting +#define FLAG_MUTE 1 + +// used for simple interpolation +#define FLAG_IPOL0 2 +#define FLAG_IPOL1 4 + +/////////////////////////////////////////////////////////// + +// MAIN CHANNEL STRUCT +typedef struct +{ + // no mutexes used anymore... don't need them to sync access + //HANDLE hMutex; + + int bNew; // start flag + + int iSBPos; // mixing stuff + int spos; + int sinc; + int SB[32+32]; // Pete added another 32 dwords in 1.6 ... prevents overflow issues with gaussian/cubic interpolation (thanx xodnizel!), and can be used for even better interpolations, eh? :) + int sval; + + unsigned char * pStart; // start ptr into sound mem + unsigned char * pCurr; // current pos in sound mem + unsigned char * pLoop; // loop ptr in sound mem + + int bOn; // is channel active (sample playing?) + int bStop; // is channel stopped (sample _can_ still be playing, ADSR Release phase) + int bReverb; // can we do reverb on this channel? must have ctrl register bit, to get active + int iActFreq; // current psx pitch + int iUsedFreq; // current pc pitch + int iLeftVolume; // left volume + int iLeftVolRaw; // left psx volume value + int bIgnoreLoop; // ignore loop bit, if an external loop address is used + int iMute; // mute mode + int iRightVolume; // right volume + int iRightVolRaw; // right psx volume value + int iRawPitch; // raw pitch (0...3fff) + int iIrqDone; // debug irq done flag + int s_1; // last decoding infos + int s_2; + int bRVBActive; // reverb active flag + int iRVBOffset; // reverb offset + int iRVBRepeat; // reverb repeat + int bNoise; // noise active flag + int bFMod; // freq mod (0=off, 1=sound channel, 2=freq channel) + int iRVBNum; // another reverb helper + int iOldNoise; // old noise val for this channel + ADSRInfo ADSR; // active ADSR settings + ADSRInfoEx ADSRX; // next ADSR settings (will be moved to active on sample start) +} SPUCHAN; + +/////////////////////////////////////////////////////////// + +typedef struct +{ + int StartAddr; // reverb area start addr in samples + int CurrAddr; // reverb area curr addr in samples + + int VolLeft; + int VolRight; + int iLastRVBLeft; + int iLastRVBRight; + int iRVBLeft; + int iRVBRight; + + int FB_SRC_A; // (offset) + int FB_SRC_B; // (offset) + int IIR_ALPHA; // (coef.) + int ACC_COEF_A; // (coef.) + int ACC_COEF_B; // (coef.) + int ACC_COEF_C; // (coef.) + int ACC_COEF_D; // (coef.) + int IIR_COEF; // (coef.) + int FB_ALPHA; // (coef.) + int FB_X; // (coef.) + int IIR_DEST_A0; // (offset) + int IIR_DEST_A1; // (offset) + int ACC_SRC_A0; // (offset) + int ACC_SRC_A1; // (offset) + int ACC_SRC_B0; // (offset) + int ACC_SRC_B1; // (offset) + int IIR_SRC_A0; // (offset) + int IIR_SRC_A1; // (offset) + int IIR_DEST_B0; // (offset) + int IIR_DEST_B1; // (offset) + int ACC_SRC_C0; // (offset) + int ACC_SRC_C1; // (offset) + int ACC_SRC_D0; // (offset) + int ACC_SRC_D1; // (offset) + int IIR_SRC_B1; // (offset) + int IIR_SRC_B0; // (offset) + int MIX_DEST_A0; // (offset) + int MIX_DEST_A1; // (offset) + int MIX_DEST_B0; // (offset) + int MIX_DEST_B1; // (offset) + int IN_COEF_L; // (coef.) + int IN_COEF_R; // (coef.) +} REVERBInfo; + +/////////////////////////////////////////////////////////// +// SPU.C globals +/////////////////////////////////////////////////////////// + +#ifndef _IN_SPU + +// psx buffers / addresses + +extern unsigned short regArea[]; +extern unsigned short spuMem[]; +extern unsigned char * spuMemC; +extern unsigned char * pSpuIrq; +extern unsigned char * pSpuBuffer; + +// user settings + +extern int iVolume; +extern int iXAPitch; +extern int iUseTimer; +extern int iSPUIRQWait; +extern int iDebugMode; +extern int iRecordMode; +extern int iUseReverb; +extern int iUseInterpolation; +extern int iDisStereo; +// MISC + +extern int iSpuAsyncWait; + +extern SPUCHAN s_chan[]; +extern REVERBInfo rvb; + +extern unsigned long dwNoiseVal; +extern unsigned short spuCtrl; +extern unsigned short spuStat; +extern unsigned short spuIrq; +extern unsigned long spuAddr; +extern int bEndThread; +extern int bThreadEnded; +extern int bSpuInit; +extern unsigned long dwNewChannel; + +extern int SSumR[]; +extern int SSumL[]; +extern int iCycle; +extern short * pS; + +extern void (CALLBACK *cddavCallback)(unsigned short,unsigned short); + +#endif + +/////////////////////////////////////////////////////////// +// XA.C globals +/////////////////////////////////////////////////////////// + +#ifndef _IN_XA + +extern xa_decode_t * xapGlobal; + +extern uint32_t * XAFeed; +extern uint32_t * XAPlay; +extern uint32_t * XAStart; +extern uint32_t * XAEnd; + +extern uint32_t XARepeat; +extern uint32_t XALastVal; + +extern uint32_t * CDDAFeed; +extern uint32_t * CDDAPlay; +extern uint32_t * CDDAStart; +extern uint32_t * CDDAEnd; + +extern int iLeftXAVol; +extern int iRightXAVol; + +#endif + +/////////////////////////////////////////////////////////// +// REVERB.C globals +/////////////////////////////////////////////////////////// + +#ifndef _IN_REVERB + +extern int * sRVBPlay; +extern int * sRVBEnd; +extern int * sRVBStart; +extern int iReverbOff; +extern int iReverbRepeat; +extern int iReverbNum; + +#endif diff --git a/plugins/dfsound/freeze.c b/plugins/dfsound/freeze.c new file mode 100644 index 00000000..12fdc1fd --- /dev/null +++ b/plugins/dfsound/freeze.c @@ -0,0 +1,214 @@ +/*************************************************************************** + freeze.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_FREEZE + +#include "externals.h" +#include "registers.h" +#include "spu.h" +#include "regs.h" + +//////////////////////////////////////////////////////////////////////// +// freeze structs +//////////////////////////////////////////////////////////////////////// + +typedef struct +{ + char szSPUName[8]; + uint32_t ulFreezeVersion; + uint32_t ulFreezeSize; + unsigned char cSPUPort[0x200]; + unsigned char cSPURam[0x80000]; + xa_decode_t xaS; +} SPUFreeze_t; + +typedef struct +{ + unsigned short spuIrq; + uint32_t pSpuIrq; + uint32_t spuAddr; + uint32_t dummy1; + uint32_t dummy2; + uint32_t dummy3; + + SPUCHAN s_chan[MAXCHAN]; + +} SPUOSSFreeze_t; + +//////////////////////////////////////////////////////////////////////// + +void LoadStateV5(SPUFreeze_t * pF); // newest version +void LoadStateUnknown(SPUFreeze_t * pF); // unknown format + +extern int lastch; + +//////////////////////////////////////////////////////////////////////// +// SPUFREEZE: called by main emu on savestate load/save +//////////////////////////////////////////////////////////////////////// + +long CALLBACK SPUfreeze(uint32_t ulFreezeMode,SPUFreeze_t * pF) +{ + int i;SPUOSSFreeze_t * pFO; + + if(!pF) return 0; // first check + + if(ulFreezeMode) // info or save? + {//--------------------------------------------------// + if(ulFreezeMode==1) + memset(pF,0,sizeof(SPUFreeze_t)+sizeof(SPUOSSFreeze_t)); + + strcpy(pF->szSPUName,"PBOSS"); + pF->ulFreezeVersion=5; + pF->ulFreezeSize=sizeof(SPUFreeze_t)+sizeof(SPUOSSFreeze_t); + + if(ulFreezeMode==2) return 1; // info mode? ok, bye + // save mode: + RemoveTimer(); // stop timer + + memcpy(pF->cSPURam,spuMem,0x80000); // copy common infos + memcpy(pF->cSPUPort,regArea,0x200); + + if(xapGlobal && XAPlay!=XAFeed) // some xa + { + pF->xaS=*xapGlobal; + } + else + memset(&pF->xaS,0,sizeof(xa_decode_t)); // or clean xa + + pFO=(SPUOSSFreeze_t *)(pF+1); // store special stuff + + pFO->spuIrq=spuIrq; + if(pSpuIrq) pFO->pSpuIrq = (unsigned long)pSpuIrq-(unsigned long)spuMemC; + + pFO->spuAddr=spuAddr; + if(pFO->spuAddr==0) pFO->spuAddr=0xbaadf00d; + + for(i=0;is_chan[i],(void *)&s_chan[i],sizeof(SPUCHAN)); + if(pFO->s_chan[i].pStart) + pFO->s_chan[i].pStart-=(unsigned long)spuMemC; + if(pFO->s_chan[i].pCurr) + pFO->s_chan[i].pCurr-=(unsigned long)spuMemC; + if(pFO->s_chan[i].pLoop) + pFO->s_chan[i].pLoop-=(unsigned long)spuMemC; + } + + SetupTimer(); // sound processing on again + + return 1; + //--------------------------------------------------// + } + + if(ulFreezeMode!=0) return 0; // bad mode? bye + + RemoveTimer(); // we stop processing while doing the save! + + memcpy(spuMem,pF->cSPURam,0x80000); // get ram + memcpy(regArea,pF->cSPUPort,0x200); + + if(pF->xaS.nsamples<=4032) // start xa again + SPUplayADPCMchannel(&pF->xaS); + + xapGlobal=0; + + if(!strcmp(pF->szSPUName,"PBOSS") && pF->ulFreezeVersion==5) + LoadStateV5(pF); + else LoadStateUnknown(pF); + + lastch = -1; + + // repair some globals + for(i=0;i<=62;i+=2) + SPUwriteRegister(H_Reverb+i,regArea[(H_Reverb+i-0xc00)>>1]); + SPUwriteRegister(H_SPUReverbAddr,regArea[(H_SPUReverbAddr-0xc00)>>1]); + SPUwriteRegister(H_SPUrvolL,regArea[(H_SPUrvolL-0xc00)>>1]); + SPUwriteRegister(H_SPUrvolR,regArea[(H_SPUrvolR-0xc00)>>1]); + + SPUwriteRegister(H_SPUctrl,(unsigned short)(regArea[(H_SPUctrl-0xc00)>>1]|0x4000)); + SPUwriteRegister(H_SPUstat,regArea[(H_SPUstat-0xc00)>>1]); + SPUwriteRegister(H_CDLeft,regArea[(H_CDLeft-0xc00)>>1]); + SPUwriteRegister(H_CDRight,regArea[(H_CDRight-0xc00)>>1]); + + // fix to prevent new interpolations from crashing + for(i=0;ispuIrq; + if(pFO->pSpuIrq) pSpuIrq = pFO->pSpuIrq+spuMemC; else pSpuIrq=NULL; + + if(pFO->spuAddr) + { + spuAddr = pFO->spuAddr; + if (spuAddr == 0xbaadf00d) spuAddr = 0; + } + + for(i=0;is_chan[i],sizeof(SPUCHAN)); + + s_chan[i].pStart+=(unsigned long)spuMemC; + s_chan[i].pCurr+=(unsigned long)spuMemC; + s_chan[i].pLoop+=(unsigned long)spuMemC; + s_chan[i].iMute=0; + s_chan[i].iIrqDone=0; + } +} + +//////////////////////////////////////////////////////////////////////// + +void LoadStateUnknown(SPUFreeze_t * pF) +{ + int i; + + for(i=0;i>1)) // can we write in at least the half of fragments? + l=SOUNDSIZE; // -> no? wait + else l=0; // -> else go on + } + + return l; +} + +//////////////////////////////////////////////////////////////////////// +// FEED SOUND DATA +//////////////////////////////////////////////////////////////////////// + +void SoundFeedStreamData(unsigned char* pSound,long lBytes) +{ + if(oss_audio_fd == -1) return; + write(oss_audio_fd,pSound,lBytes); +} diff --git a/plugins/dfsound/psemuxa.h b/plugins/dfsound/psemuxa.h new file mode 100644 index 00000000..84c62604 --- /dev/null +++ b/plugins/dfsound/psemuxa.h @@ -0,0 +1,28 @@ +//============================================ +//=== Audio XA decoding +//=== Kazzuya +//============================================ + +#ifndef DECODEXA_H +#define DECODEXA_H + +typedef struct +{ + long y0, y1; +} ADPCM_Decode_t; + +typedef struct +{ + int freq; + int nbits; + int stereo; + int nsamples; + ADPCM_Decode_t left, right; + short pcm[16384]; +} xa_decode_t; + +long xa_decode_sector( xa_decode_t *xdp, + unsigned char *sectorp, + int is_first_sector ); + +#endif diff --git a/plugins/dfsound/pulseaudio.c b/plugins/dfsound/pulseaudio.c new file mode 100644 index 00000000..60051557 --- /dev/null +++ b/plugins/dfsound/pulseaudio.c @@ -0,0 +1,354 @@ +/*************************************************************************** + pulseaudio.c - description + ------------------- +begin : Thu Feb 04 2010 +copyright : (C) 2010 by Tristin Celestin +email : cetris1@umbc.edu +comment : Much of this was taken from simple.c, in the pulseaudio + library +***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#ifdef USEPULSEAUDIO + +#define _IN_OSS + +#include "externals.h" +#include + +//////////////////////////////////////////////////////////////////////// +// pulseaudio structs +//////////////////////////////////////////////////////////////////////// + +typedef struct { + pa_threaded_mainloop *mainloop; + pa_context *context; + pa_mainloop_api *api; + pa_stream *stream; + pa_sample_spec spec; + int first; +} Device; + +typedef struct { + unsigned int frequency; + unsigned int latency_in_msec; +} Settings; + +//////////////////////////////////////////////////////////////////////// +// pulseaudio globals +//////////////////////////////////////////////////////////////////////// + +static Device device = { + .mainloop = NULL, + .api = NULL, + .context = NULL, + .stream = NULL +}; + +static Settings settings = { + .frequency = 44100, + .latency_in_msec = 20, +}; + +// the number of bytes written in SoundFeedStreamData +const int mixlen = 3240; + +// used to calculate how much space is used in the buffer, for debugging purposes +//int maxlength = 0; + +//////////////////////////////////////////////////////////////////////// +// CALLBACKS FOR THREADED MAINLOOP +//////////////////////////////////////////////////////////////////////// +static void context_state_cb (pa_context *context, void *userdata) +{ + Device *dev = userdata; + + if ((context == NULL) || (dev == NULL)) + return; + + switch (pa_context_get_state (context)) + { + case PA_CONTEXT_READY: + case PA_CONTEXT_TERMINATED: + case PA_CONTEXT_FAILED: + pa_threaded_mainloop_signal (dev->mainloop, 0); + break; + + case PA_CONTEXT_UNCONNECTED: + case PA_CONTEXT_CONNECTING: + case PA_CONTEXT_AUTHORIZING: + case PA_CONTEXT_SETTING_NAME: + break; + } +} + +static void stream_state_cb (pa_stream *stream, void * userdata) +{ + Device *dev = userdata; + + if ((stream == NULL) || (dev == NULL)) + return; + + switch (pa_stream_get_state (stream)) + { + case PA_STREAM_READY: + case PA_STREAM_FAILED: + case PA_STREAM_TERMINATED: + pa_threaded_mainloop_signal (dev->mainloop, 0); + break; + + case PA_STREAM_UNCONNECTED: + case PA_STREAM_CREATING: + break; + } +} + +static void stream_latency_update_cb (pa_stream *stream, void *userdata) +{ + Device *dev = userdata; + + if ((stream == NULL) || (dev == NULL)) + return; + + pa_threaded_mainloop_signal (dev->mainloop, 0); +} + +static void stream_request_cb (pa_stream *stream, size_t length, void *userdata) +{ + Device *dev = userdata; + + if ((stream == NULL) || (dev == NULL)) + return; + pa_threaded_mainloop_signal (dev->mainloop, 0); +} + +//////////////////////////////////////////////////////////////////////// +// SETUP SOUND +//////////////////////////////////////////////////////////////////////// + +void SetupSound (void) +{ + int error_number; + + // Acquire mainloop /////////////////////////////////////////////////////// + device.mainloop = pa_threaded_mainloop_new (); + if (device.mainloop == NULL) + { + fprintf (stderr, "Could not acquire PulseAudio main loop\n"); + return; + } + + // Acquire context //////////////////////////////////////////////////////// + device.api = pa_threaded_mainloop_get_api (device.mainloop); + device.context = pa_context_new (device.api, "PCSX"); + pa_context_set_state_callback (device.context, context_state_cb, &device); + + if (device.context == NULL) + { + fprintf (stderr, "Could not acquire PulseAudio device context\n"); + return; + } + + // Connect to PulseAudio server /////////////////////////////////////////// + if (pa_context_connect (device.context, NULL, 0, NULL) < 0) + { + error_number = pa_context_errno (device.context); + fprintf (stderr, "Could not connect to PulseAudio server: %s\n", pa_strerror(error_number)); + return; + } + + // Run mainloop until sever context is ready ////////////////////////////// + pa_threaded_mainloop_lock (device.mainloop); + if (pa_threaded_mainloop_start (device.mainloop) < 0) + { + fprintf (stderr, "Could not start mainloop\n"); + return; + } + + pa_context_state_t context_state; + context_state = pa_context_get_state (device.context); + while (context_state != PA_CONTEXT_READY) + { + context_state = pa_context_get_state (device.context); + if (! PA_CONTEXT_IS_GOOD (context_state)) + { + error_number = pa_context_errno (device.context); + fprintf (stderr, "Context state is not good: %s\n", pa_strerror (error_number)); + return; + } + else if (context_state == PA_CONTEXT_READY) + break; + else + fprintf (stderr, "PulseAudio context state is %d\n", context_state); + pa_threaded_mainloop_wait (device.mainloop); + } + + // Set sample spec //////////////////////////////////////////////////////// + device.spec.format = PA_SAMPLE_S16NE; + if (iDisStereo) + device.spec.channels = 1; + else + device.spec.channels = 2; + device.spec.rate = settings.frequency; + + pa_buffer_attr buffer_attributes; + buffer_attributes.tlength = pa_bytes_per_second (& device.spec) / 5; + buffer_attributes.maxlength = buffer_attributes.tlength * 3; + buffer_attributes.minreq = buffer_attributes.tlength / 3; + buffer_attributes.prebuf = buffer_attributes.tlength; + + //maxlength = buffer_attributes.maxlength; + //fprintf (stderr, "Total space: %u\n", buffer_attributes.maxlength); + //fprintf (stderr, "Minimum request size: %u\n", buffer_attributes.minreq); + //fprintf (stderr, "Bytes needed before playback: %u\n", buffer_attributes.prebuf); + //fprintf (stderr, "Target buffer size: %lu\n", buffer_attributes.tlength); + + // Acquire new stream using spec ////////////////////////////////////////// + device.stream = pa_stream_new (device.context, "PCSX", &device.spec, NULL); + if (device.stream == NULL) + { + error_number = pa_context_errno (device.context); + fprintf (stderr, "Could not acquire new PulseAudio stream: %s\n", pa_strerror (error_number)); + return; + } + + // Set callbacks for server events //////////////////////////////////////// + pa_stream_set_state_callback (device.stream, stream_state_cb, &device); + pa_stream_set_write_callback (device.stream, stream_request_cb, &device); + pa_stream_set_latency_update_callback (device.stream, stream_latency_update_cb, &device); + + // Ready stream for playback ////////////////////////////////////////////// + pa_stream_flags_t flags = (pa_stream_flags_t) (PA_STREAM_ADJUST_LATENCY | PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_AUTO_TIMING_UPDATE); + //pa_stream_flags_t flags = (pa_stream_flags_t) (PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_AUTO_TIMING_UPDATE | PA_STREAM_EARLY_REQUESTS); + if (pa_stream_connect_playback (device.stream, NULL, &buffer_attributes, flags, NULL, NULL) < 0) + { + pa_context_errno (device.context); + fprintf (stderr, "Could not connect for playback: %s\n", pa_strerror (error_number)); + return; + } + + // Run mainloop until stream is ready ///////////////////////////////////// + pa_stream_state_t stream_state; + stream_state = pa_stream_get_state (device.stream); + while (stream_state != PA_STREAM_READY) + { + stream_state = pa_stream_get_state (device.stream); + + if (stream_state == PA_STREAM_READY) + break; + + else if (! PA_STREAM_IS_GOOD (stream_state)) + { + error_number = pa_context_errno (device.context); + fprintf (stderr, "Stream state is not good: %s\n", pa_strerror (error_number)); + return; + } + else + fprintf (stderr, "PulseAudio stream state is %d\n", stream_state); + pa_threaded_mainloop_wait (device.mainloop); + } + + pa_threaded_mainloop_unlock (device.mainloop); + + fprintf (stderr, "PulseAudio should be connected\n"); + return; +} + +//////////////////////////////////////////////////////////////////////// +// REMOVE SOUND +//////////////////////////////////////////////////////////////////////// +void RemoveSound (void) +{ + if (device.mainloop != NULL) + pa_threaded_mainloop_stop (device.mainloop); + + // Release in reverse order of acquisition + if (device.stream != NULL) + { + pa_stream_unref (device.stream); + device.stream = NULL; + + } + if (device.context != NULL) + { + pa_context_disconnect (device.context); + pa_context_unref (device.context); + device.context = NULL; + } + + if (device.mainloop != NULL) + { + pa_threaded_mainloop_free (device.mainloop); + device.mainloop = NULL; + } + +} + +//////////////////////////////////////////////////////////////////////// +// GET BYTES BUFFERED +//////////////////////////////////////////////////////////////////////// + +unsigned long SoundGetBytesBuffered (void) +{ + int free_space; + int error_code; + long latency; + int playing = 0; + + if ((device.mainloop == NULL) || (device.api == NULL) || ( device.context == NULL) || (device.stream == NULL)) + return SOUNDSIZE; + + pa_threaded_mainloop_lock (device.mainloop); + free_space = pa_stream_writable_size (device.stream); + pa_threaded_mainloop_unlock (device.mainloop); + + //fprintf (stderr, "Free space: %d\n", free_space); + //fprintf (stderr, "Used space: %d\n", maxlength - free_space); + if (free_space < mixlen * 3) + { + // Don't buffer anymore, just play + //fprintf (stderr, "Not buffering.\n"); + return SOUNDSIZE; + } + else + { + // Buffer some sound + //fprintf (stderr, "Buffering.\n"); + return 0; + } +} + +//////////////////////////////////////////////////////////////////////// +// FEED SOUND DATA +//////////////////////////////////////////////////////////////////////// + +void SoundFeedStreamData (unsigned char *pSound, long lBytes) +{ + int error_code; + int size; + + if (device.mainloop != NULL) + { + pa_threaded_mainloop_lock (device.mainloop); + if (pa_stream_write (device.stream, pSound, lBytes, NULL, 0LL, PA_SEEK_RELATIVE) < 0) + { + fprintf (stderr, "Could not perform write\n"); + } + else + { + //fprintf (stderr, "Wrote %d bytes\n", lBytes); + pa_threaded_mainloop_unlock (device.mainloop); + } + } +} +#endif diff --git a/plugins/dfsound/registers.c b/plugins/dfsound/registers.c new file mode 100644 index 00000000..b684914f --- /dev/null +++ b/plugins/dfsound/registers.c @@ -0,0 +1,589 @@ +/*************************************************************************** + registers.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_REGISTERS + +#include "externals.h" +#include "registers.h" +#include "regs.h" +#include "reverb.h" + +/* +// adsr time values (in ms) by James Higgs ... see the end of +// the adsr.c source for details + +#define ATTACK_MS 514L +#define DECAYHALF_MS 292L +#define DECAY_MS 584L +#define SUSTAIN_MS 450L +#define RELEASE_MS 446L +*/ + +// we have a timebase of 1.020408f ms, not 1 ms... so adjust adsr defines +#define ATTACK_MS 494L +#define DECAYHALF_MS 286L +#define DECAY_MS 572L +#define SUSTAIN_MS 441L +#define RELEASE_MS 437L + +//////////////////////////////////////////////////////////////////////// +// WRITE REGISTERS: called by main emu +//////////////////////////////////////////////////////////////////////// + +void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val) +{ + const unsigned long r=reg&0xfff; + regArea[(r-0xc00)>>1] = val; + + if(r>=0x0c00 && r<0x0d80) // some channel info? + { + int ch=(r>>4)-0xc0; // calc channel + switch(r&0x0f) + { + //------------------------------------------------// r volume + case 0: + SetVolumeL((unsigned char)ch,val); + break; + //------------------------------------------------// l volume + case 2: + SetVolumeR((unsigned char)ch,val); + break; + //------------------------------------------------// pitch + case 4: + SetPitch(ch,val); + break; + //------------------------------------------------// start + case 6: + s_chan[ch].pStart=spuMemC+((unsigned long) val<<3); + break; + //------------------------------------------------// level with pre-calcs + case 8: + { + const unsigned long lval=val;unsigned long lx; + //---------------------------------------------// + s_chan[ch].ADSRX.AttackModeExp=(lval&0x8000)?1:0; + s_chan[ch].ADSRX.AttackRate=(lval>>8) & 0x007f; + s_chan[ch].ADSRX.DecayRate=(lval>>4) & 0x000f; + s_chan[ch].ADSRX.SustainLevel=lval & 0x000f; + //---------------------------------------------// + if(!iDebugMode) break; + //---------------------------------------------// stuff below is only for debug mode + + s_chan[ch].ADSR.AttackModeExp=(lval&0x8000)?1:0; //0x007f + + lx=(((lval>>8) & 0x007f)>>2); // attack time to run from 0 to 100% volume + lx=min(31,lx); // no overflow on shift! + if(lx) + { + lx = (1<>4) & 0x000f; // decay: + if(lx) // our const decay value is time it takes from 100% to 0% of volume + { + lx = ((1<<(lx))*DECAY_MS)/10000L; + if(!lx) lx=1; + } + s_chan[ch].ADSR.DecayTime = // so calc how long does it take to run from 100% to the wanted sus level + (lx*(1024-s_chan[ch].ADSR.SustainLevel))/1024; + } + break; + //------------------------------------------------// adsr times with pre-calcs + case 10: + { + const unsigned long lval=val;unsigned long lx; + + //----------------------------------------------// + s_chan[ch].ADSRX.SustainModeExp = (lval&0x8000)?1:0; + s_chan[ch].ADSRX.SustainIncrease= (lval&0x4000)?0:1; + s_chan[ch].ADSRX.SustainRate = (lval>>6) & 0x007f; + s_chan[ch].ADSRX.ReleaseModeExp = (lval&0x0020)?1:0; + s_chan[ch].ADSRX.ReleaseRate = lval & 0x001f; + //----------------------------------------------// + if(!iDebugMode) break; + //----------------------------------------------// stuff below is only for debug mode + + s_chan[ch].ADSR.SustainModeExp = (lval&0x8000)?1:0; + s_chan[ch].ADSR.ReleaseModeExp = (lval&0x0020)?1:0; + + lx=((((lval>>6) & 0x007f)>>2)); // sustain time... often very high + lx=min(31,lx); // values are used to hold the volume + if(lx) // until a sound stop occurs + { // the highest value we reach (due to + lx = (1< no multithread fuckups + s_chan[ch].pLoop=spuMemC+((unsigned long) val<<3); + s_chan[ch].bIgnoreLoop=1; + //ReleaseMutex(s_chan[ch].hMutex); // -> oki, on with the thread + break; + //------------------------------------------------// + } + iSpuAsyncWait=0; + return; + } + + switch(r) + { + //-------------------------------------------------// + case H_SPUaddr: + spuAddr = (unsigned long) val<<3; + break; + //-------------------------------------------------// + case H_SPUdata: + spuMem[spuAddr>>1] = val; + spuAddr+=2; + if(spuAddr>0x7ffff) spuAddr=0; + break; + //-------------------------------------------------// + case H_SPUctrl: + spuCtrl=val; + break; + //-------------------------------------------------// + case H_SPUstat: + spuStat=val & 0xf800; + break; + //-------------------------------------------------// + case H_SPUReverbAddr: + if(val==0xFFFF || val<=0x200) + {rvb.StartAddr=rvb.CurrAddr=0;} + else + { + const long iv=(unsigned long)val<<2; + if(rvb.StartAddr!=iv) + { + rvb.StartAddr=(unsigned long)val<<2; + rvb.CurrAddr=rvb.StartAddr; + } + } + break; + //-------------------------------------------------// + case H_SPUirqAddr: + spuIrq = val; + pSpuIrq=spuMemC+((unsigned long) val<<3); + break; + //-------------------------------------------------// + case H_SPUrvolL: + rvb.VolLeft=val; + break; + //-------------------------------------------------// + case H_SPUrvolR: + rvb.VolRight=val; + break; + //-------------------------------------------------// + +/* + case H_ExtLeft: + //auxprintf("EL %d\n",val); + break; + //-------------------------------------------------// + case H_ExtRight: + //auxprintf("ER %d\n",val); + break; + //-------------------------------------------------// + case H_SPUmvolL: + //auxprintf("ML %d\n",val); + break; + //-------------------------------------------------// + case H_SPUmvolR: + //auxprintf("MR %d\n",val); + break; + //-------------------------------------------------// + case H_SPUMute1: + //auxprintf("M0 %04x\n",val); + break; + //-------------------------------------------------// + case H_SPUMute2: + //auxprintf("M1 %04x\n",val); + break; +*/ + //-------------------------------------------------// + case H_SPUon1: + SoundOn(0,16,val); + break; + //-------------------------------------------------// + case H_SPUon2: + SoundOn(16,24,val); + break; + //-------------------------------------------------// + case H_SPUoff1: + SoundOff(0,16,val); + break; + //-------------------------------------------------// + case H_SPUoff2: + SoundOff(16,24,val); + break; + //-------------------------------------------------// + case H_CDLeft: + iLeftXAVol=val & 0x7fff; + if(cddavCallback) cddavCallback(0,val); + break; + case H_CDRight: + iRightXAVol=val & 0x7fff; + if(cddavCallback) cddavCallback(1,val); + break; + //-------------------------------------------------// + case H_FMod1: + FModOn(0,16,val); + break; + //-------------------------------------------------// + case H_FMod2: + FModOn(16,24,val); + break; + //-------------------------------------------------// + case H_Noise1: + NoiseOn(0,16,val); + break; + //-------------------------------------------------// + case H_Noise2: + NoiseOn(16,24,val); + break; + //-------------------------------------------------// + case H_RVBon1: + ReverbOn(0,16,val); + break; + //-------------------------------------------------// + case H_RVBon2: + ReverbOn(16,24,val); + break; + //-------------------------------------------------// + case H_Reverb+0: + + rvb.FB_SRC_A=val; + + // OK, here's the fake REVERB stuff... + // depending on effect we do more or less delay and repeats... bah + // still... better than nothing :) + + SetREVERB(val); + break; + + + case H_Reverb+2 : rvb.FB_SRC_B=(short)val; break; + case H_Reverb+4 : rvb.IIR_ALPHA=(short)val; break; + case H_Reverb+6 : rvb.ACC_COEF_A=(short)val; break; + case H_Reverb+8 : rvb.ACC_COEF_B=(short)val; break; + case H_Reverb+10 : rvb.ACC_COEF_C=(short)val; break; + case H_Reverb+12 : rvb.ACC_COEF_D=(short)val; break; + case H_Reverb+14 : rvb.IIR_COEF=(short)val; break; + case H_Reverb+16 : rvb.FB_ALPHA=(short)val; break; + case H_Reverb+18 : rvb.FB_X=(short)val; break; + case H_Reverb+20 : rvb.IIR_DEST_A0=(short)val; break; + case H_Reverb+22 : rvb.IIR_DEST_A1=(short)val; break; + case H_Reverb+24 : rvb.ACC_SRC_A0=(short)val; break; + case H_Reverb+26 : rvb.ACC_SRC_A1=(short)val; break; + case H_Reverb+28 : rvb.ACC_SRC_B0=(short)val; break; + case H_Reverb+30 : rvb.ACC_SRC_B1=(short)val; break; + case H_Reverb+32 : rvb.IIR_SRC_A0=(short)val; break; + case H_Reverb+34 : rvb.IIR_SRC_A1=(short)val; break; + case H_Reverb+36 : rvb.IIR_DEST_B0=(short)val; break; + case H_Reverb+38 : rvb.IIR_DEST_B1=(short)val; break; + case H_Reverb+40 : rvb.ACC_SRC_C0=(short)val; break; + case H_Reverb+42 : rvb.ACC_SRC_C1=(short)val; break; + case H_Reverb+44 : rvb.ACC_SRC_D0=(short)val; break; + case H_Reverb+46 : rvb.ACC_SRC_D1=(short)val; break; + case H_Reverb+48 : rvb.IIR_SRC_B1=(short)val; break; + case H_Reverb+50 : rvb.IIR_SRC_B0=(short)val; break; + case H_Reverb+52 : rvb.MIX_DEST_A0=(short)val; break; + case H_Reverb+54 : rvb.MIX_DEST_A1=(short)val; break; + case H_Reverb+56 : rvb.MIX_DEST_B0=(short)val; break; + case H_Reverb+58 : rvb.MIX_DEST_B1=(short)val; break; + case H_Reverb+60 : rvb.IN_COEF_L=(short)val; break; + case H_Reverb+62 : rvb.IN_COEF_R=(short)val; break; + } + + iSpuAsyncWait=0; +} + +//////////////////////////////////////////////////////////////////////// +// READ REGISTER: called by main emu +//////////////////////////////////////////////////////////////////////// + +unsigned short CALLBACK SPUreadRegister(unsigned long reg) +{ + const unsigned long r=reg&0xfff; + + iSpuAsyncWait=0; + + if(r>=0x0c00 && r<0x0d80) + { + switch(r&0x0f) + { + case 12: // get adsr vol + { + const int ch=(r>>4)-0xc0; + if(s_chan[ch].bNew) return 1; // we are started, but not processed? return 1 + if(s_chan[ch].ADSRX.lVolume && // same here... we haven't decoded one sample yet, so no envelope yet. return 1 as well + !s_chan[ch].ADSRX.EnvelopeVol) + return 1; + return (unsigned short)(s_chan[ch].ADSRX.EnvelopeVol>>16); + } + + case 14: // get loop address + { + const int ch=(r>>4)-0xc0; + if(s_chan[ch].pLoop==NULL) return 0; + return (unsigned short)((s_chan[ch].pLoop-spuMemC)>>3); + } + } + } + + switch(r) + { + case H_SPUctrl: + return spuCtrl; + + case H_SPUstat: + return spuStat; + + case H_SPUaddr: + return (unsigned short)(spuAddr>>3); + + case H_SPUdata: + { + unsigned short s=spuMem[spuAddr>>1]; + spuAddr+=2; + if(spuAddr>0x7ffff) spuAddr=0; + return s; + } + + case H_SPUirqAddr: + return spuIrq; + + //case H_SPUIsOn1: + // return IsSoundOn(0,16); + + //case H_SPUIsOn2: + // return IsSoundOn(16,24); + + } + + return regArea[(r-0xc00)>>1]; +} + +//////////////////////////////////////////////////////////////////////// +// SOUND ON register write +//////////////////////////////////////////////////////////////////////// + +void SoundOn(int start,int end,unsigned short val) // SOUND ON PSX COMAND +{ + int ch; + + for(ch=start;ch>=1) // loop channels + { + if((val&1) && s_chan[ch].pStart) // mmm... start has to be set before key on !?! + { + s_chan[ch].bIgnoreLoop=0; + s_chan[ch].bNew=1; + dwNewChannel|=(1<>=1) // loop channels + { + if(val&1) // && s_chan[i].bOn) mmm... + { + s_chan[ch].bStop=1; + } + } +} + +//////////////////////////////////////////////////////////////////////// +// FMOD register write +//////////////////////////////////////////////////////////////////////// + +void FModOn(int start,int end,unsigned short val) // FMOD ON PSX COMMAND +{ + int ch; + + for(ch=start;ch>=1) // loop channels + { + if(val&1) // -> fmod on/off + { + if(ch>0) + { + s_chan[ch].bFMod=1; // --> sound channel + s_chan[ch-1].bFMod=2; // --> freq channel + } + } + else + { + s_chan[ch].bFMod=0; // --> turn off fmod + } + } +} + +//////////////////////////////////////////////////////////////////////// +// NOISE register write +//////////////////////////////////////////////////////////////////////// + +void NoiseOn(int start,int end,unsigned short val) // NOISE ON PSX COMMAND +{ + int ch; + + for(ch=start;ch>=1) // loop channels + { + if(val&1) // -> noise on/off + { + s_chan[ch].bNoise=1; + } + else + { + s_chan[ch].bNoise=0; + } + } +} + +//////////////////////////////////////////////////////////////////////// +// LEFT VOLUME register write +//////////////////////////////////////////////////////////////////////// + +// please note: sweep and phase invert are wrong... but I've never seen +// them used + +void SetVolumeL(unsigned char ch,short vol) // LEFT VOLUME +{ + s_chan[ch].iLeftVolRaw=vol; + + if(vol&0x8000) // sweep? + { + short sInc=1; // -> sweep up? + if(vol&0x2000) sInc=-1; // -> or down? + if(vol&0x1000) vol^=0xffff; // -> mmm... phase inverted? have to investigate this + vol=((vol&0x7f)+1)/2; // -> sweep: 0..127 -> 0..64 + vol+=vol/(2*sInc); // -> HACK: we don't sweep right now, so we just raise/lower the volume by the half! + vol*=128; + } + else // no sweep: + { + if(vol&0x4000) // -> mmm... phase inverted? have to investigate this + //vol^=0xffff; + vol=0x3fff-(vol&0x3fff); + } + + vol&=0x3fff; + s_chan[ch].iLeftVolume=vol; // store volume +} + +//////////////////////////////////////////////////////////////////////// +// RIGHT VOLUME register write +//////////////////////////////////////////////////////////////////////// + +void SetVolumeR(unsigned char ch,short vol) // RIGHT VOLUME +{ + s_chan[ch].iRightVolRaw=vol; + + if(vol&0x8000) // comments... see above :) + { + short sInc=1; + if(vol&0x2000) sInc=-1; + if(vol&0x1000) vol^=0xffff; + vol=((vol&0x7f)+1)/2; + vol+=vol/(2*sInc); + vol*=128; + } + else + { + if(vol&0x4000) //vol=vol^=0xffff; + vol=0x3fff-(vol&0x3fff); + } + + vol&=0x3fff; + + s_chan[ch].iRightVolume=vol; +} + +//////////////////////////////////////////////////////////////////////// +// PITCH register write +//////////////////////////////////////////////////////////////////////// + +void SetPitch(int ch,unsigned short val) // SET PITCH +{ + int NP; + if(val>0x3fff) NP=0x3fff; // get pitch val + else NP=val; + + s_chan[ch].iRawPitch=NP; + + NP=(44100L*NP)/4096L; // calc frequency + if(NP<1) NP=1; // some security + s_chan[ch].iActFreq=NP; // store frequency +} + +//////////////////////////////////////////////////////////////////////// +// REVERB register write +//////////////////////////////////////////////////////////////////////// + +void ReverbOn(int start,int end,unsigned short val) // REVERB ON PSX COMMAND +{ + int ch; + + for(ch=start;ch>=1) // loop channels + { + if(val&1) // -> reverb on/off + { + s_chan[ch].bReverb=1; + } + else + { + s_chan[ch].bReverb=0; + } + } +} diff --git a/plugins/dfsound/registers.h b/plugins/dfsound/registers.h new file mode 100644 index 00000000..f2a93970 --- /dev/null +++ b/plugins/dfsound/registers.h @@ -0,0 +1,144 @@ +/*************************************************************************** + registers.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define H_SPUReverbAddr 0x0da2 +#define H_SPUirqAddr 0x0da4 +#define H_SPUaddr 0x0da6 +#define H_SPUdata 0x0da8 +#define H_SPUctrl 0x0daa +#define H_SPUstat 0x0dae +#define H_SPUmvolL 0x0d80 +#define H_SPUmvolR 0x0d82 +#define H_SPUrvolL 0x0d84 +#define H_SPUrvolR 0x0d86 +#define H_SPUon1 0x0d88 +#define H_SPUon2 0x0d8a +#define H_SPUoff1 0x0d8c +#define H_SPUoff2 0x0d8e +#define H_FMod1 0x0d90 +#define H_FMod2 0x0d92 +#define H_Noise1 0x0d94 +#define H_Noise2 0x0d96 +#define H_RVBon1 0x0d98 +#define H_RVBon2 0x0d9a +#define H_SPUMute1 0x0d9c +#define H_SPUMute2 0x0d9e +#define H_CDLeft 0x0db0 +#define H_CDRight 0x0db2 +#define H_ExtLeft 0x0db4 +#define H_ExtRight 0x0db6 +#define H_Reverb 0x0dc0 +#define H_SPUPitch0 0x0c04 +#define H_SPUPitch1 0x0c14 +#define H_SPUPitch2 0x0c24 +#define H_SPUPitch3 0x0c34 +#define H_SPUPitch4 0x0c44 +#define H_SPUPitch5 0x0c54 +#define H_SPUPitch6 0x0c64 +#define H_SPUPitch7 0x0c74 +#define H_SPUPitch8 0x0c84 +#define H_SPUPitch9 0x0c94 +#define H_SPUPitch10 0x0ca4 +#define H_SPUPitch11 0x0cb4 +#define H_SPUPitch12 0x0cc4 +#define H_SPUPitch13 0x0cd4 +#define H_SPUPitch14 0x0ce4 +#define H_SPUPitch15 0x0cf4 +#define H_SPUPitch16 0x0d04 +#define H_SPUPitch17 0x0d14 +#define H_SPUPitch18 0x0d24 +#define H_SPUPitch19 0x0d34 +#define H_SPUPitch20 0x0d44 +#define H_SPUPitch21 0x0d54 +#define H_SPUPitch22 0x0d64 +#define H_SPUPitch23 0x0d74 + +#define H_SPUStartAdr0 0x0c06 +#define H_SPUStartAdr1 0x0c16 +#define H_SPUStartAdr2 0x0c26 +#define H_SPUStartAdr3 0x0c36 +#define H_SPUStartAdr4 0x0c46 +#define H_SPUStartAdr5 0x0c56 +#define H_SPUStartAdr6 0x0c66 +#define H_SPUStartAdr7 0x0c76 +#define H_SPUStartAdr8 0x0c86 +#define H_SPUStartAdr9 0x0c96 +#define H_SPUStartAdr10 0x0ca6 +#define H_SPUStartAdr11 0x0cb6 +#define H_SPUStartAdr12 0x0cc6 +#define H_SPUStartAdr13 0x0cd6 +#define H_SPUStartAdr14 0x0ce6 +#define H_SPUStartAdr15 0x0cf6 +#define H_SPUStartAdr16 0x0d06 +#define H_SPUStartAdr17 0x0d16 +#define H_SPUStartAdr18 0x0d26 +#define H_SPUStartAdr19 0x0d36 +#define H_SPUStartAdr20 0x0d46 +#define H_SPUStartAdr21 0x0d56 +#define H_SPUStartAdr22 0x0d66 +#define H_SPUStartAdr23 0x0d76 + +#define H_SPULoopAdr0 0x0c0e +#define H_SPULoopAdr1 0x0c1e +#define H_SPULoopAdr2 0x0c2e +#define H_SPULoopAdr3 0x0c3e +#define H_SPULoopAdr4 0x0c4e +#define H_SPULoopAdr5 0x0c5e +#define H_SPULoopAdr6 0x0c6e +#define H_SPULoopAdr7 0x0c7e +#define H_SPULoopAdr8 0x0c8e +#define H_SPULoopAdr9 0x0c9e +#define H_SPULoopAdr10 0x0cae +#define H_SPULoopAdr11 0x0cbe +#define H_SPULoopAdr12 0x0cce +#define H_SPULoopAdr13 0x0cde +#define H_SPULoopAdr14 0x0cee +#define H_SPULoopAdr15 0x0cfe +#define H_SPULoopAdr16 0x0d0e +#define H_SPULoopAdr17 0x0d1e +#define H_SPULoopAdr18 0x0d2e +#define H_SPULoopAdr19 0x0d3e +#define H_SPULoopAdr20 0x0d4e +#define H_SPULoopAdr21 0x0d5e +#define H_SPULoopAdr22 0x0d6e +#define H_SPULoopAdr23 0x0d7e + +#define H_SPU_ADSRLevel0 0x0c08 +#define H_SPU_ADSRLevel1 0x0c18 +#define H_SPU_ADSRLevel2 0x0c28 +#define H_SPU_ADSRLevel3 0x0c38 +#define H_SPU_ADSRLevel4 0x0c48 +#define H_SPU_ADSRLevel5 0x0c58 +#define H_SPU_ADSRLevel6 0x0c68 +#define H_SPU_ADSRLevel7 0x0c78 +#define H_SPU_ADSRLevel8 0x0c88 +#define H_SPU_ADSRLevel9 0x0c98 +#define H_SPU_ADSRLevel10 0x0ca8 +#define H_SPU_ADSRLevel11 0x0cb8 +#define H_SPU_ADSRLevel12 0x0cc8 +#define H_SPU_ADSRLevel13 0x0cd8 +#define H_SPU_ADSRLevel14 0x0ce8 +#define H_SPU_ADSRLevel15 0x0cf8 +#define H_SPU_ADSRLevel16 0x0d08 +#define H_SPU_ADSRLevel17 0x0d18 +#define H_SPU_ADSRLevel18 0x0d28 +#define H_SPU_ADSRLevel19 0x0d38 +#define H_SPU_ADSRLevel20 0x0d48 +#define H_SPU_ADSRLevel21 0x0d58 +#define H_SPU_ADSRLevel22 0x0d68 +#define H_SPU_ADSRLevel23 0x0d78 + diff --git a/plugins/dfsound/regs.h b/plugins/dfsound/regs.h new file mode 100644 index 00000000..3d2689bc --- /dev/null +++ b/plugins/dfsound/regs.h @@ -0,0 +1,27 @@ +/*************************************************************************** + regs.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +void SoundOn(int start,int end,unsigned short val); +void SoundOff(int start,int end,unsigned short val); +void FModOn(int start,int end,unsigned short val); +void NoiseOn(int start,int end,unsigned short val); +void SetVolumeL(unsigned char ch,short vol); +void SetVolumeR(unsigned char ch,short vol); +void SetPitch(int ch,unsigned short val); +void ReverbOn(int start,int end,unsigned short val); +void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val); + diff --git a/plugins/dfsound/reverb.c b/plugins/dfsound/reverb.c new file mode 100644 index 00000000..92e31fcb --- /dev/null +++ b/plugins/dfsound/reverb.c @@ -0,0 +1,462 @@ +/*************************************************************************** + reverb.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_REVERB + +// will be included from spu.c +#ifdef _IN_SPU + +//////////////////////////////////////////////////////////////////////// +// globals +//////////////////////////////////////////////////////////////////////// + +// REVERB info and timing vars... + +int * sRVBPlay = 0; +int * sRVBEnd = 0; +int * sRVBStart = 0; +int iReverbOff = -1; // some delay factor for reverb +int iReverbRepeat = 0; +int iReverbNum = 1; + +//////////////////////////////////////////////////////////////////////// +// SET REVERB +//////////////////////////////////////////////////////////////////////// + +void SetREVERB(unsigned short val) +{ + switch(val) + { + case 0x0000: iReverbOff=-1; break; // off + case 0x007D: iReverbOff=32; iReverbNum=2; iReverbRepeat=128; break; // ok room + + case 0x0033: iReverbOff=32; iReverbNum=2; iReverbRepeat=64; break; // studio small + case 0x00B1: iReverbOff=48; iReverbNum=2; iReverbRepeat=96; break; // ok studio medium + case 0x00E3: iReverbOff=64; iReverbNum=2; iReverbRepeat=128; break; // ok studio large ok + + case 0x01A5: iReverbOff=128; iReverbNum=4; iReverbRepeat=32; break; // ok hall + case 0x033D: iReverbOff=256; iReverbNum=4; iReverbRepeat=64; break; // space echo + case 0x0001: iReverbOff=184; iReverbNum=3; iReverbRepeat=128; break; // echo/delay + case 0x0017: iReverbOff=128; iReverbNum=2; iReverbRepeat=128; break; // half echo + default: iReverbOff=32; iReverbNum=1; iReverbRepeat=0; break; + } +} + +//////////////////////////////////////////////////////////////////////// +// START REVERB +//////////////////////////////////////////////////////////////////////// + +INLINE void StartREVERB(int ch) +{ + if(s_chan[ch].bReverb && (spuCtrl&0x80)) // reverb possible? + { + if(iUseReverb==2) s_chan[ch].bRVBActive=1; + else + if(iUseReverb==1 && iReverbOff>0) // -> fake reverb used? + { + s_chan[ch].bRVBActive=1; // -> activate it + s_chan[ch].iRVBOffset=iReverbOff*45; + s_chan[ch].iRVBRepeat=iReverbRepeat*45; + s_chan[ch].iRVBNum =iReverbNum; + } + } + else s_chan[ch].bRVBActive=0; // else -> no reverb +} + +//////////////////////////////////////////////////////////////////////// +// HELPER FOR NEILL'S REVERB: re-inits our reverb mixing buf +//////////////////////////////////////////////////////////////////////// + +INLINE void InitREVERB(void) +{ + if(iUseReverb==2) + {memset(sRVBStart,0,NSSIZE*2*4);} +} + +//////////////////////////////////////////////////////////////////////// +// STORE REVERB +//////////////////////////////////////////////////////////////////////// + +INLINE void StoreREVERB(int ch,int ns) +{ + if(iUseReverb==0) return; + else + if(iUseReverb==2) // -------------------------------- // Neil's reverb + { + const int iRxl=(s_chan[ch].sval*s_chan[ch].iLeftVolume)/0x4000; + const int iRxr=(s_chan[ch].sval*s_chan[ch].iRightVolume)/0x4000; + + ns<<=1; + + *(sRVBStart+ns) +=iRxl; // -> we mix all active reverb channels into an extra buffer + *(sRVBStart+ns+1)+=iRxr; + } + else // --------------------------------------------- // Pete's easy fake reverb + { + int * pN;int iRn,iRr=0; + + // we use the half channel volume (/0x8000) for the first reverb effects, quarter for next and so on + + int iRxl=(s_chan[ch].sval*s_chan[ch].iLeftVolume)/0x8000; + int iRxr=(s_chan[ch].sval*s_chan[ch].iRightVolume)/0x8000; + + for(iRn=1;iRn<=s_chan[ch].iRVBNum;iRn++,iRr+=s_chan[ch].iRVBRepeat,iRxl/=2,iRxr/=2) + { + pN=sRVBPlay+((s_chan[ch].iRVBOffset+iRr+ns)<<1); + if(pN>=sRVBEnd) pN=sRVBStart+(pN-sRVBEnd); + + (*pN)+=iRxl; + pN++; + (*pN)+=iRxr; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +INLINE int g_buffer(int iOff) // get_buffer content helper: takes care about wraps +{ + short * p=(short *)spuMem; + iOff=(iOff*4)+rvb.CurrAddr; + while(iOff>0x3FFFF) iOff=rvb.StartAddr+(iOff-0x40000); + while(iOff0x3FFFF) iOff=rvb.StartAddr+(iOff-0x40000); + while(iOff32767L) iVal=32767L; + *(p+iOff)=(short)iVal; +} + +//////////////////////////////////////////////////////////////////////// + +INLINE void s_buffer1(int iOff,int iVal) // set_buffer (+1 sample) content helper: takes care about wraps and clipping +{ + short * p=(short *)spuMem; + iOff=(iOff*4)+rvb.CurrAddr+1; + while(iOff>0x3FFFF) iOff=rvb.StartAddr+(iOff-0x40000); + while(iOff32767L) iVal=32767L; + *(p+iOff)=(short)iVal; +} + +//////////////////////////////////////////////////////////////////////// + +INLINE int MixREVERBLeft(int ns) +{ + if(iUseReverb==0) return 0; + else + if(iUseReverb==2) + { + static int iCnt=0; // this func will be called with 44.1 khz + + if(!rvb.StartAddr) // reverb is off + { + rvb.iLastRVBLeft=rvb.iLastRVBRight=rvb.iRVBLeft=rvb.iRVBRight=0; + return 0; + } + + iCnt++; + + if(iCnt&1) // we work on every second left value: downsample to 22 khz + { + if(spuCtrl&0x80) // -> reverb on? oki + { + int ACC0,ACC1,FB_A0,FB_A1,FB_B0,FB_B1; + + const int INPUT_SAMPLE_L=*(sRVBStart+(ns<<1)); + const int INPUT_SAMPLE_R=*(sRVBStart+(ns<<1)+1); + + const int IIR_INPUT_A0 = (g_buffer(rvb.IIR_SRC_A0) * rvb.IIR_COEF)/32768L + (INPUT_SAMPLE_L * rvb.IN_COEF_L)/32768L; + const int IIR_INPUT_A1 = (g_buffer(rvb.IIR_SRC_A1) * rvb.IIR_COEF)/32768L + (INPUT_SAMPLE_R * rvb.IN_COEF_R)/32768L; + const int IIR_INPUT_B0 = (g_buffer(rvb.IIR_SRC_B0) * rvb.IIR_COEF)/32768L + (INPUT_SAMPLE_L * rvb.IN_COEF_L)/32768L; + const int IIR_INPUT_B1 = (g_buffer(rvb.IIR_SRC_B1) * rvb.IIR_COEF)/32768L + (INPUT_SAMPLE_R * rvb.IN_COEF_R)/32768L; + + const int IIR_A0 = (IIR_INPUT_A0 * rvb.IIR_ALPHA)/32768L + (g_buffer(rvb.IIR_DEST_A0) * (32768L - rvb.IIR_ALPHA))/32768L; + const int IIR_A1 = (IIR_INPUT_A1 * rvb.IIR_ALPHA)/32768L + (g_buffer(rvb.IIR_DEST_A1) * (32768L - rvb.IIR_ALPHA))/32768L; + const int IIR_B0 = (IIR_INPUT_B0 * rvb.IIR_ALPHA)/32768L + (g_buffer(rvb.IIR_DEST_B0) * (32768L - rvb.IIR_ALPHA))/32768L; + const int IIR_B1 = (IIR_INPUT_B1 * rvb.IIR_ALPHA)/32768L + (g_buffer(rvb.IIR_DEST_B1) * (32768L - rvb.IIR_ALPHA))/32768L; + + s_buffer1(rvb.IIR_DEST_A0, IIR_A0); + s_buffer1(rvb.IIR_DEST_A1, IIR_A1); + s_buffer1(rvb.IIR_DEST_B0, IIR_B0); + s_buffer1(rvb.IIR_DEST_B1, IIR_B1); + + ACC0 = (g_buffer(rvb.ACC_SRC_A0) * rvb.ACC_COEF_A)/32768L + + (g_buffer(rvb.ACC_SRC_B0) * rvb.ACC_COEF_B)/32768L + + (g_buffer(rvb.ACC_SRC_C0) * rvb.ACC_COEF_C)/32768L + + (g_buffer(rvb.ACC_SRC_D0) * rvb.ACC_COEF_D)/32768L; + ACC1 = (g_buffer(rvb.ACC_SRC_A1) * rvb.ACC_COEF_A)/32768L + + (g_buffer(rvb.ACC_SRC_B1) * rvb.ACC_COEF_B)/32768L + + (g_buffer(rvb.ACC_SRC_C1) * rvb.ACC_COEF_C)/32768L + + (g_buffer(rvb.ACC_SRC_D1) * rvb.ACC_COEF_D)/32768L; + + FB_A0 = g_buffer(rvb.MIX_DEST_A0 - rvb.FB_SRC_A); + FB_A1 = g_buffer(rvb.MIX_DEST_A1 - rvb.FB_SRC_A); + FB_B0 = g_buffer(rvb.MIX_DEST_B0 - rvb.FB_SRC_B); + FB_B1 = g_buffer(rvb.MIX_DEST_B1 - rvb.FB_SRC_B); + + s_buffer(rvb.MIX_DEST_A0, ACC0 - (FB_A0 * rvb.FB_ALPHA)/32768L); + s_buffer(rvb.MIX_DEST_A1, ACC1 - (FB_A1 * rvb.FB_ALPHA)/32768L); + + s_buffer(rvb.MIX_DEST_B0, (rvb.FB_ALPHA * ACC0)/32768L - (FB_A0 * (int)(rvb.FB_ALPHA^0xFFFF8000))/32768L - (FB_B0 * rvb.FB_X)/32768L); + s_buffer(rvb.MIX_DEST_B1, (rvb.FB_ALPHA * ACC1)/32768L - (FB_A1 * (int)(rvb.FB_ALPHA^0xFFFF8000))/32768L - (FB_B1 * rvb.FB_X)/32768L); + + rvb.iLastRVBLeft = rvb.iRVBLeft; + rvb.iLastRVBRight = rvb.iRVBRight; + + rvb.iRVBLeft = (g_buffer(rvb.MIX_DEST_A0)+g_buffer(rvb.MIX_DEST_B0))/3; + rvb.iRVBRight = (g_buffer(rvb.MIX_DEST_A1)+g_buffer(rvb.MIX_DEST_B1))/3; + + rvb.iRVBLeft = (rvb.iRVBLeft * rvb.VolLeft) / 0x4000; + rvb.iRVBRight = (rvb.iRVBRight * rvb.VolRight) / 0x4000; + + rvb.CurrAddr++; + if(rvb.CurrAddr>0x3ffff) rvb.CurrAddr=rvb.StartAddr; + + return rvb.iLastRVBLeft+(rvb.iRVBLeft-rvb.iLastRVBLeft)/2; + } + else // -> reverb off + { + rvb.iLastRVBLeft=rvb.iLastRVBRight=rvb.iRVBLeft=rvb.iRVBRight=0; + } + + rvb.CurrAddr++; + if(rvb.CurrAddr>0x3ffff) rvb.CurrAddr=rvb.StartAddr; + } + + return rvb.iLastRVBLeft; + } + else // easy fake reverb: + { + const int iRV=*sRVBPlay; // -> simply take the reverb mix buf value + *sRVBPlay++=0; // -> init it after + if(sRVBPlay>=sRVBEnd) sRVBPlay=sRVBStart; // -> and take care about wrap arounds + return iRV; // -> return reverb mix buf val + } +} + +//////////////////////////////////////////////////////////////////////// + +INLINE int MixREVERBRight(void) +{ + if(iUseReverb==0) return 0; + else + if(iUseReverb==2) // Neill's reverb: + { + int i=rvb.iLastRVBRight+(rvb.iRVBRight-rvb.iLastRVBRight)/2; + rvb.iLastRVBRight=rvb.iRVBRight; + return i; // -> just return the last right reverb val (little bit scaled by the previous right val) + } + else // easy fake reverb: + { + const int iRV=*sRVBPlay; // -> simply take the reverb mix buf value + *sRVBPlay++=0; // -> init it after + if(sRVBPlay>=sRVBEnd) sRVBPlay=sRVBStart; // -> and take care about wrap arounds + return iRV; // -> return reverb mix buf val + } +} + +//////////////////////////////////////////////////////////////////////// + +#endif + +/* +----------------------------------------------------------------------------- +PSX reverb hardware notes +by Neill Corlett +----------------------------------------------------------------------------- + +Yadda yadda disclaimer yadda probably not perfect yadda well it's okay anyway +yadda yadda. + +----------------------------------------------------------------------------- + +Basics +------ + +- The reverb buffer is 22khz 16-bit mono PCM. +- It starts at the reverb address given by 1DA2, extends to + the end of sound RAM, and wraps back to the 1DA2 address. + +Setting the address at 1DA2 resets the current reverb work address. + +This work address ALWAYS increments every 1/22050 sec., regardless of +whether reverb is enabled (bit 7 of 1DAA set). + +And the contents of the reverb buffer ALWAYS play, scaled by the +"reverberation depth left/right" volumes (1D84/1D86). +(which, by the way, appear to be scaled so 3FFF=approx. 1.0, 4000=-1.0) + +----------------------------------------------------------------------------- + +Register names +-------------- + +These are probably not their real names. +These are probably not even correct names. +We will use them anyway, because we can. + +1DC0: FB_SRC_A (offset) +1DC2: FB_SRC_B (offset) +1DC4: IIR_ALPHA (coef.) +1DC6: ACC_COEF_A (coef.) +1DC8: ACC_COEF_B (coef.) +1DCA: ACC_COEF_C (coef.) +1DCC: ACC_COEF_D (coef.) +1DCE: IIR_COEF (coef.) +1DD0: FB_ALPHA (coef.) +1DD2: FB_X (coef.) +1DD4: IIR_DEST_A0 (offset) +1DD6: IIR_DEST_A1 (offset) +1DD8: ACC_SRC_A0 (offset) +1DDA: ACC_SRC_A1 (offset) +1DDC: ACC_SRC_B0 (offset) +1DDE: ACC_SRC_B1 (offset) +1DE0: IIR_SRC_A0 (offset) +1DE2: IIR_SRC_A1 (offset) +1DE4: IIR_DEST_B0 (offset) +1DE6: IIR_DEST_B1 (offset) +1DE8: ACC_SRC_C0 (offset) +1DEA: ACC_SRC_C1 (offset) +1DEC: ACC_SRC_D0 (offset) +1DEE: ACC_SRC_D1 (offset) +1DF0: IIR_SRC_B1 (offset) +1DF2: IIR_SRC_B0 (offset) +1DF4: MIX_DEST_A0 (offset) +1DF6: MIX_DEST_A1 (offset) +1DF8: MIX_DEST_B0 (offset) +1DFA: MIX_DEST_B1 (offset) +1DFC: IN_COEF_L (coef.) +1DFE: IN_COEF_R (coef.) + +The coefficients are signed fractional values. +-32768 would be -1.0 + 32768 would be 1.0 (if it were possible... the highest is of course 32767) + +The offsets are (byte/8) offsets into the reverb buffer. +i.e. you multiply them by 8, you get byte offsets. +You can also think of them as (samples/4) offsets. +They appear to be signed. They can be negative. +None of the documented presets make them negative, though. + +Yes, 1DF0 and 1DF2 appear to be backwards. Not a typo. + +----------------------------------------------------------------------------- + +What it does +------------ + +We take all reverb sources: +- regular channels that have the reverb bit on +- cd and external sources, if their reverb bits are on +and mix them into one stereo 44100hz signal. + +Lowpass/downsample that to 22050hz. The PSX uses a proper bandlimiting +algorithm here, but I haven't figured out the hysterically exact specifics. +I use an 8-tap filter with these coefficients, which are nice but probably +not the real ones: + +0.037828187894 +0.157538631280 +0.321159685278 +0.449322115345 +0.449322115345 +0.321159685278 +0.157538631280 +0.037828187894 + +So we have two input samples (INPUT_SAMPLE_L, INPUT_SAMPLE_R) every 22050hz. + +* IN MY EMULATION, I divide these by 2 to make it clip less. + (and of course the L/R output coefficients are adjusted to compensate) + The real thing appears to not do this. + +At every 22050hz tick: +- If the reverb bit is enabled (bit 7 of 1DAA), execute the reverb + steady-state algorithm described below +- AFTERWARDS, retrieve the "wet out" L and R samples from the reverb buffer + (This part may not be exactly right and I guessed at the coefs. TODO: check later.) + L is: 0.333 * (buffer[MIX_DEST_A0] + buffer[MIX_DEST_B0]) + R is: 0.333 * (buffer[MIX_DEST_A1] + buffer[MIX_DEST_B1]) +- Advance the current buffer position by 1 sample + +The wet out L and R are then upsampled to 44100hz and played at the +"reverberation depth left/right" (1D84/1D86) volume, independent of the main +volume. + +----------------------------------------------------------------------------- + +Reverb steady-state +------------------- + +The reverb steady-state algorithm is fairly clever, and of course by +"clever" I mean "batshit insane". + +buffer[x] is relative to the current buffer position, not the beginning of +the buffer. Note that all buffer offsets must wrap around so they're +contained within the reverb work area. + +Clipping is performed at the end... maybe also sooner, but definitely at +the end. + +IIR_INPUT_A0 = buffer[IIR_SRC_A0] * IIR_COEF + INPUT_SAMPLE_L * IN_COEF_L; +IIR_INPUT_A1 = buffer[IIR_SRC_A1] * IIR_COEF + INPUT_SAMPLE_R * IN_COEF_R; +IIR_INPUT_B0 = buffer[IIR_SRC_B0] * IIR_COEF + INPUT_SAMPLE_L * IN_COEF_L; +IIR_INPUT_B1 = buffer[IIR_SRC_B1] * IIR_COEF + INPUT_SAMPLE_R * IN_COEF_R; + +IIR_A0 = IIR_INPUT_A0 * IIR_ALPHA + buffer[IIR_DEST_A0] * (1.0 - IIR_ALPHA); +IIR_A1 = IIR_INPUT_A1 * IIR_ALPHA + buffer[IIR_DEST_A1] * (1.0 - IIR_ALPHA); +IIR_B0 = IIR_INPUT_B0 * IIR_ALPHA + buffer[IIR_DEST_B0] * (1.0 - IIR_ALPHA); +IIR_B1 = IIR_INPUT_B1 * IIR_ALPHA + buffer[IIR_DEST_B1] * (1.0 - IIR_ALPHA); + +buffer[IIR_DEST_A0 + 1sample] = IIR_A0; +buffer[IIR_DEST_A1 + 1sample] = IIR_A1; +buffer[IIR_DEST_B0 + 1sample] = IIR_B0; +buffer[IIR_DEST_B1 + 1sample] = IIR_B1; + +ACC0 = buffer[ACC_SRC_A0] * ACC_COEF_A + + buffer[ACC_SRC_B0] * ACC_COEF_B + + buffer[ACC_SRC_C0] * ACC_COEF_C + + buffer[ACC_SRC_D0] * ACC_COEF_D; +ACC1 = buffer[ACC_SRC_A1] * ACC_COEF_A + + buffer[ACC_SRC_B1] * ACC_COEF_B + + buffer[ACC_SRC_C1] * ACC_COEF_C + + buffer[ACC_SRC_D1] * ACC_COEF_D; + +FB_A0 = buffer[MIX_DEST_A0 - FB_SRC_A]; +FB_A1 = buffer[MIX_DEST_A1 - FB_SRC_A]; +FB_B0 = buffer[MIX_DEST_B0 - FB_SRC_B]; +FB_B1 = buffer[MIX_DEST_B1 - FB_SRC_B]; + +buffer[MIX_DEST_A0] = ACC0 - FB_A0 * FB_ALPHA; +buffer[MIX_DEST_A1] = ACC1 - FB_A1 * FB_ALPHA; +buffer[MIX_DEST_B0] = (FB_ALPHA * ACC0) - FB_A0 * (FB_ALPHA^0x8000) - FB_B0 * FB_X; +buffer[MIX_DEST_B1] = (FB_ALPHA * ACC1) - FB_A1 * (FB_ALPHA^0x8000) - FB_B1 * FB_X; + +----------------------------------------------------------------------------- +*/ + diff --git a/plugins/dfsound/reverb.h b/plugins/dfsound/reverb.h new file mode 100644 index 00000000..ce618187 --- /dev/null +++ b/plugins/dfsound/reverb.h @@ -0,0 +1,21 @@ +/*************************************************************************** + reverb.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +void SetREVERB(unsigned short val); +INLINE void StartREVERB(int ch); +INLINE void StoreREVERB(int ch,int ns); + diff --git a/plugins/dfsound/sdl.c b/plugins/dfsound/sdl.c new file mode 100644 index 00000000..45ccba2d --- /dev/null +++ b/plugins/dfsound/sdl.c @@ -0,0 +1,135 @@ +/* SDL Driver for P.E.Op.S Sound Plugin + * Copyright (c) 2010, Wei Mingzhi . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include "stdafx.h" + +#include "externals.h" +#include + +#define BUFFER_SIZE 22050 + +short *pSndBuffer = NULL; +int iBufSize = 0; +volatile int iReadPos = 0, iWritePos = 0; + +static void SOUND_FillAudio(void *unused, Uint8 *stream, int len) { + short *p = (short *)stream; + + len /= sizeof(short); + + while (iReadPos != iWritePos && len > 0) { + *p++ = pSndBuffer[iReadPos++]; + if (iReadPos >= iBufSize) iReadPos = 0; + --len; + } + + // Fill remaining space with zero + while (len > 0) { + *p++ = 0; + --len; + } +} + +static void InitSDL() { + if (SDL_WasInit(SDL_INIT_EVERYTHING)) { + SDL_InitSubSystem(SDL_INIT_AUDIO); + } else { + SDL_Init(SDL_INIT_AUDIO | SDL_INIT_NOPARACHUTE); + } +} + +static void DestroySDL() { + if (SDL_WasInit(SDL_INIT_EVERYTHING & ~SDL_INIT_AUDIO)) { + SDL_QuitSubSystem(SDL_INIT_AUDIO); + } else { + SDL_Quit(); + } +} + +void SetupSound(void) { + SDL_AudioSpec spec; + + if (pSndBuffer != NULL) return; + + InitSDL(); + + spec.freq = 44100; + spec.format = AUDIO_S16SYS; + spec.channels = iDisStereo ? 1 : 2; + spec.samples = 512; + spec.callback = SOUND_FillAudio; + + if (SDL_OpenAudio(&spec, NULL) < 0) { + DestroySDL(); + return; + } + + iBufSize = BUFFER_SIZE; + if (iDisStereo) iBufSize /= 2; + + pSndBuffer = (short *)malloc(iBufSize * sizeof(short)); + if (pSndBuffer == NULL) { + SDL_CloseAudio(); + return; + } + + iReadPos = 0; + iWritePos = 0; + + SDL_PauseAudio(0); +} + +void RemoveSound(void) { + if (pSndBuffer == NULL) return; + + SDL_CloseAudio(); + DestroySDL(); + + free(pSndBuffer); + pSndBuffer = NULL; +} + +unsigned long SoundGetBytesBuffered(void) { + int size; + + if (pSndBuffer == NULL) return SOUNDSIZE; + + size = iReadPos - iWritePos; + if (size <= 0) size += iBufSize; + + if (size < iBufSize / 2) return SOUNDSIZE; + + return 0; +} + +void SoundFeedStreamData(unsigned char *pSound, long lBytes) { + short *p = (short *)pSound; + + if (pSndBuffer == NULL) return; + + while (lBytes > 0) { + if (((iWritePos + 1) % iBufSize) == iReadPos) break; + + pSndBuffer[iWritePos] = *p++; + + ++iWritePos; + if (iWritePos >= iBufSize) iWritePos = 0; + + lBytes -= sizeof(short); + } +} diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c new file mode 100644 index 00000000..c086c06b --- /dev/null +++ b/plugins/dfsound/spu.c @@ -0,0 +1,1029 @@ +/*************************************************************************** + spu.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_SPU + +#include "externals.h" +#include "cfg.h" +#include "dsoundoss.h" +#include "regs.h" + +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif + +#if defined (USEMACOSX) +static char * libraryName = N_("Mac OS X Sound"); +#elif defined (USEALSA) +static char * libraryName = N_("ALSA Sound"); +#elif defined (USEOSS) +static char * libraryName = N_("OSS Sound"); +#elif defined (USESDL) +static char * libraryName = N_("SDL Sound"); +#elif defined (USEPULSEAUDIO) +static char * libraryName = N_("PulseAudio Sound"); +#else +static char * libraryName = N_("NULL Sound"); +#endif + +static char * libraryInfo = N_("P.E.Op.S. Sound Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n"); + +// globals + +// psx buffer / addresses + +unsigned short regArea[10000]; +unsigned short spuMem[256*1024]; +unsigned char * spuMemC; +unsigned char * pSpuIrq=0; +unsigned char * pSpuBuffer; +unsigned char * pMixIrq=0; + +// user settings + +int iVolume=3; +int iXAPitch=1; +int iUseTimer=2; +int iSPUIRQWait=1; +int iDebugMode=0; +int iRecordMode=0; +int iUseReverb=2; +int iUseInterpolation=2; +int iDisStereo=0; + +// MAIN infos struct for each channel + +SPUCHAN s_chan[MAXCHAN+1]; // channel + 1 infos (1 is security for fmod handling) +REVERBInfo rvb; + +unsigned long dwNoiseVal=1; // global noise generator +int iSpuAsyncWait=0; + +unsigned short spuCtrl=0; // some vars to store psx reg infos +unsigned short spuStat=0; +unsigned short spuIrq=0; +unsigned long spuAddr=0xffffffff; // address into spu mem +int bEndThread=0; // thread handlers +int bThreadEnded=0; +int bSpuInit=0; +int bSPUIsOpen=0; + +static pthread_t thread = (pthread_t)-1; // thread id (linux) + +unsigned long dwNewChannel=0; // flags for faster testing, if new channel starts + +void (CALLBACK *irqCallback)(void)=0; // func of main emu, called on spu irq +void (CALLBACK *cddavCallback)(unsigned short,unsigned short)=0; + +// certain globals (were local before, but with the new timeproc I need em global) + +static const int f[5][2] = { { 0, 0 }, + { 60, 0 }, + { 115, -52 }, + { 98, -55 }, + { 122, -60 } }; +int SSumR[NSSIZE]; +int SSumL[NSSIZE]; +int iFMod[NSSIZE]; +int iCycle = 0; +short * pS; + +int lastch=-1; // last channel processed on spu irq in timer mode +static int lastns=0; // last ns pos +static int iSecureStart=0; // secure start counter + +//////////////////////////////////////////////////////////////////////// +// CODE AREA +//////////////////////////////////////////////////////////////////////// + +// dirty inline func includes + +#include "reverb.c" +#include "adsr.c" + +//////////////////////////////////////////////////////////////////////// +// helpers for simple interpolation + +// +// easy interpolation on upsampling, no special filter, just "Pete's common sense" tm +// +// instead of having n equal sample values in a row like: +// ____ +// |____ +// +// we compare the current delta change with the next delta change. +// +// if curr_delta is positive, +// +// - and next delta is smaller (or changing direction): +// \. +// -__ +// +// - and next delta significant (at least twice) bigger: +// --_ +// \. +// +// - and next delta is nearly same: +// \. +// \. +// +// +// if curr_delta is negative, +// +// - and next delta is smaller (or changing direction): +// _-- +// / +// +// - and next delta significant (at least twice) bigger: +// / +// __- +// +// - and next delta is nearly same: +// / +// / +// + + +INLINE void InterpolateUp(int ch) +{ + if(s_chan[ch].SB[32]==1) // flag == 1? calc step and set flag... and don't change the value in this pass + { + const int id1=s_chan[ch].SB[30]-s_chan[ch].SB[29]; // curr delta to next val + const int id2=s_chan[ch].SB[31]-s_chan[ch].SB[30]; // and next delta to next-next val :) + + s_chan[ch].SB[32]=0; + + if(id1>0) // curr delta positive + { + if(id2id1) + {s_chan[ch].SB[28]=id1;s_chan[ch].SB[32]=2;} + else + if(id2>(id1<<1)) + s_chan[ch].SB[28]=(id1*s_chan[ch].sinc)/0x10000L; + else + s_chan[ch].SB[28]=(id1*s_chan[ch].sinc)/0x20000L; + } + } + else + if(s_chan[ch].SB[32]==2) // flag 1: calc step and set flag... and don't change the value in this pass + { + s_chan[ch].SB[32]=0; + + s_chan[ch].SB[28]=(s_chan[ch].SB[28]*s_chan[ch].sinc)/0x20000L; + if(s_chan[ch].sinc<=0x8000) + s_chan[ch].SB[29]=s_chan[ch].SB[30]-(s_chan[ch].SB[28]*((0x10000/s_chan[ch].sinc)-1)); + else s_chan[ch].SB[29]+=s_chan[ch].SB[28]; + } + else // no flags? add bigger val (if possible), calc smaller step, set flag1 + s_chan[ch].SB[29]+=s_chan[ch].SB[28]; +} + +// +// even easier interpolation on downsampling, also no special filter, again just "Pete's common sense" tm +// + +INLINE void InterpolateDown(int ch) +{ + if(s_chan[ch].sinc>=0x20000L) // we would skip at least one val? + { + s_chan[ch].SB[29]+=(s_chan[ch].SB[30]-s_chan[ch].SB[29])/2; // add easy weight + if(s_chan[ch].sinc>=0x30000L) // we would skip even more vals? + s_chan[ch].SB[29]+=(s_chan[ch].SB[31]-s_chan[ch].SB[30])/2;// add additional next weight + } +} + +//////////////////////////////////////////////////////////////////////// +// helpers for gauss interpolation + +#define gval0 (((short*)(&s_chan[ch].SB[29]))[gpos]) +#define gval(x) (((short*)(&s_chan[ch].SB[29]))[(gpos+x)&3]) + +#include "gauss_i.h" + +//////////////////////////////////////////////////////////////////////// + +#include "xa.c" + +//////////////////////////////////////////////////////////////////////// +// START SOUND... called by main thread to setup a new sound on a channel +//////////////////////////////////////////////////////////////////////// + +INLINE void StartSound(int ch) +{ + StartADSR(ch); + StartREVERB(ch); + + s_chan[ch].pCurr=s_chan[ch].pStart; // set sample start + + s_chan[ch].s_1=0; // init mixing vars + s_chan[ch].s_2=0; + s_chan[ch].iSBPos=28; + + s_chan[ch].bNew=0; // init channel flags + s_chan[ch].bStop=0; + s_chan[ch].bOn=1; + + s_chan[ch].SB[29]=0; // init our interpolation helpers + s_chan[ch].SB[30]=0; + + if(iUseInterpolation>=2) // gauss interpolation? + {s_chan[ch].spos=0x30000L;s_chan[ch].SB[28]=0;} // -> start with more decoding + else {s_chan[ch].spos=0x10000L;s_chan[ch].SB[31]=0;} // -> no/simple interpolation starts with one 44100 decoding + + dwNewChannel&=~(1< take it and calc steps + s_chan[ch].sinc=s_chan[ch].iRawPitch<<4; + if(!s_chan[ch].sinc) s_chan[ch].sinc=1; + if(iUseInterpolation==1) s_chan[ch].SB[32]=1; // -> freq change in simle imterpolation mode: set flag +} + +//////////////////////////////////////////////////////////////////////// + +INLINE void FModChangeFrequency(int ch,int ns) +{ + int NP=s_chan[ch].iRawPitch; + + NP=((32768L+iFMod[ns])*NP)/32768L; + + if(NP>0x3fff) NP=0x3fff; + if(NP<0x1) NP=0x1; + + NP=(44100L*NP)/(4096L); // calc frequency + + s_chan[ch].iActFreq=NP; + s_chan[ch].iUsedFreq=NP; + s_chan[ch].sinc=(((NP/10)<<16)/4410); + if(!s_chan[ch].sinc) s_chan[ch].sinc=1; + if(iUseInterpolation==1) // freq change in simple interpolation mode + s_chan[ch].SB[32]=1; + iFMod[ns]=0; +} + +//////////////////////////////////////////////////////////////////////// + +// noise handler... just produces some noise data +// surely wrong... and no noise frequency (spuCtrl&0x3f00) will be used... +// and sometimes the noise will be used as fmod modulation... pfff + +INLINE int iGetNoiseVal(int ch) +{ + int fa; + + if((dwNoiseVal<<=1)&0x80000000L) + { + dwNoiseVal^=0x0040001L; + fa=((dwNoiseVal>>2)&0x7fff); + fa=-fa; + } + else fa=(dwNoiseVal>>2)&0x7fff; + + // mmm... depending on the noise freq we allow bigger/smaller changes to the previous val + fa=s_chan[ch].iOldNoise+((fa-s_chan[ch].iOldNoise)/((0x001f-((spuCtrl&0x3f00)>>9))+1)); + if(fa>32767L) fa=32767L; + if(fa<-32767L) fa=-32767L; + s_chan[ch].iOldNoise=fa; + + if(iUseInterpolation<2) // no gauss/cubic interpolation? + s_chan[ch].SB[29] = fa; // -> store noise val in "current sample" slot + return fa; +} + +//////////////////////////////////////////////////////////////////////// + +INLINE void StoreInterpolationVal(int ch,int fa) +{ + if(s_chan[ch].bFMod==2) // fmod freq channel + s_chan[ch].SB[29]=fa; + else + { + if((spuCtrl&0x4000)==0) fa=0; // muted? + else // else adjust + { + if(fa>32767L) fa=32767L; + if(fa<-32767L) fa=-32767L; + } + + if(iUseInterpolation>=2) // gauss/cubic interpolation + { + int gpos = s_chan[ch].SB[28]; + gval0 = fa; + gpos = (gpos+1) & 3; + s_chan[ch].SB[28] = gpos; + } + else + if(iUseInterpolation==1) // simple interpolation + { + s_chan[ch].SB[28] = 0; + s_chan[ch].SB[29] = s_chan[ch].SB[30]; // -> helpers for simple linear interpolation: delay real val for two slots, and calc the two deltas, for a 'look at the future behaviour' + s_chan[ch].SB[30] = s_chan[ch].SB[31]; + s_chan[ch].SB[31] = fa; + s_chan[ch].SB[32] = 1; // -> flag: calc new interolation + } + else s_chan[ch].SB[29]=fa; // no interpolation + } +} + +//////////////////////////////////////////////////////////////////////// + +INLINE int iGetInterpolationVal(int ch) +{ + int fa; + + if(s_chan[ch].bFMod==2) return s_chan[ch].SB[29]; + + switch(iUseInterpolation) + { + //--------------------------------------------------// + case 3: // cubic interpolation + { + long xd;int gpos; + xd = ((s_chan[ch].spos) >> 1)+1; + gpos = s_chan[ch].SB[28]; + + fa = gval(3) - 3*gval(2) + 3*gval(1) - gval0; + fa *= (xd - (2<<15)) / 6; + fa >>= 15; + fa += gval(2) - gval(1) - gval(1) + gval0; + fa *= (xd - (1<<15)) >> 1; + fa >>= 15; + fa += gval(1) - gval0; + fa *= xd; + fa >>= 15; + fa = fa + gval0; + + } break; + //--------------------------------------------------// + case 2: // gauss interpolation + { + int vl, vr;int gpos; + vl = (s_chan[ch].spos >> 6) & ~3; + gpos = s_chan[ch].SB[28]; + vr=(gauss[vl]*gval0)&~2047; + vr+=(gauss[vl+1]*gval(1))&~2047; + vr+=(gauss[vl+2]*gval(2))&~2047; + vr+=(gauss[vl+3]*gval(3))&~2047; + fa = vr>>11; + } break; + //--------------------------------------------------// + case 1: // simple interpolation + { + if(s_chan[ch].sinc<0x10000L) // -> upsampling? + InterpolateUp(ch); // --> interpolate up + else InterpolateDown(ch); // --> else down + fa=s_chan[ch].SB[29]; + } break; + //--------------------------------------------------// + default: // no interpolation + { + fa=s_chan[ch].SB[29]; + } break; + //--------------------------------------------------// + } + + return fa; +} + +//////////////////////////////////////////////////////////////////////// +// MAIN SPU FUNCTION +// here is the main job handler... thread, timer or direct func call +// basically the whole sound processing is done in this fat func! +//////////////////////////////////////////////////////////////////////// + +// 5 ms waiting phase, if buffer is full and no new sound has to get started +// .. can be made smaller (smallest val: 1 ms), but bigger waits give +// better performance + +#define PAUSE_W 5 +#define PAUSE_L 5000 + +//////////////////////////////////////////////////////////////////////// + +static void *MAINThread(void *arg) +{ + int s_1,s_2,fa,ns; +#ifndef _MACOSX + int voldiv = iVolume; +#else + const int voldiv = 2; +#endif + unsigned char * start;unsigned int nSample; + int ch,predict_nr,shift_factor,flags,d,s; + int bIRQReturn=0; + + while(!bEndThread) // until we are shutting down + { + // ok, at the beginning we are looking if there is + // enuff free place in the dsound/oss buffer to + // fill in new data, or if there is a new channel to start. + // if not, we wait (thread) or return (timer/spuasync) + // until enuff free place is available/a new channel gets + // started + + if(dwNewChannel) // new channel should start immedately? + { // (at least one bit 0 ... MAXCHANNEL is set?) + iSecureStart++; // -> set iSecure + if(iSecureStart>5) iSecureStart=0; // (if it is set 5 times - that means on 5 tries a new samples has been started - in a row, we will reset it, to give the sound update a chance) + } + else iSecureStart=0; // 0: no new channel should start + + while(!iSecureStart && !bEndThread && // no new start? no thread end? + (SoundGetBytesBuffered()>TESTSIZE)) // and still enuff data in sound buffer? + { + iSecureStart=0; // reset secure + + if(iUseTimer) return 0; // linux no-thread mode? bye + usleep(PAUSE_L); // else sleep for x ms (linux) + + if(dwNewChannel) iSecureStart=1; // if a new channel kicks in (or, of course, sound buffer runs low), we will leave the loop + } + + //--------------------------------------------------// continue from irq handling in timer mode? + + if(lastch>=0) // will be -1 if no continue is pending + { + ch=lastch; ns=lastns; lastch=-1; // -> setup all kind of vars to continue + goto GOON; // -> directly jump to the continue point + } + + //--------------------------------------------------// + //- main channel loop -// + //--------------------------------------------------// + { + for(ch=0;ch=0x10000L) + { + if(s_chan[ch].iSBPos==28) // 28 reached? + { + start=s_chan[ch].pCurr; // set up the current pos + + if (start == (unsigned char*)-1) // special "stop" sign + { + s_chan[ch].bOn=0; // -> turn everything off + s_chan[ch].ADSRX.lVolume=0; + s_chan[ch].ADSRX.EnvelopeVol=0; + goto ENDX; // -> and done for this channel + } + + s_chan[ch].iSBPos=0; + + //////////////////////////////////////////// spu irq handler here? mmm... do it later + + s_1=s_chan[ch].s_1; + s_2=s_chan[ch].s_2; + + predict_nr=(int)*start;start++; + shift_factor=predict_nr&0xf; + predict_nr >>= 4; + flags=(int)*start;start++; + + // -------------------------------------- // + + for (nSample=0;nSample<28;start++) + { + d=(int)*start; + s=((d&0xf)<<12); + if(s&0x8000) s|=0xffff0000; + + fa=(s >> shift_factor); + fa=fa + ((s_1 * f[predict_nr][0])>>6) + ((s_2 * f[predict_nr][1])>>6); + s_2=s_1;s_1=fa; + s=((d & 0xf0) << 8); + + s_chan[ch].SB[nSample++]=fa; + + if(s&0x8000) s|=0xffff0000; + fa=(s>>shift_factor); + fa=fa + ((s_1 * f[predict_nr][0])>>6) + ((s_2 * f[predict_nr][1])>>6); + s_2=s_1;s_1=fa; + + s_chan[ch].SB[nSample++]=fa; + } + + //////////////////////////////////////////// irq check + + if(irqCallback && (spuCtrl&0x40)) // some callback and irq active? + { + if((pSpuIrq > start-16 && // irq address reached? + pSpuIrq <= start) || + ((flags&1) && // special: irq on looping addr, when stop/loop flag is set + (pSpuIrq > s_chan[ch].pLoop-16 && + pSpuIrq <= s_chan[ch].pLoop))) + { + s_chan[ch].iIrqDone=1; // -> debug flag + irqCallback(); // -> call main emu + + if(iSPUIRQWait) // -> option: wait after irq for main emu + { + iSpuAsyncWait=1; + bIRQReturn=1; + } + } + } + + //////////////////////////////////////////// flag handler + + if((flags&4) && (!s_chan[ch].bIgnoreLoop)) + s_chan[ch].pLoop=start-16; // loop adress + + if(flags&1) // 1: stop/loop + { + // We play this block out first... + //if(!(flags&2)) // 1+2: do loop... otherwise: stop + if(flags!=3 || s_chan[ch].pLoop==NULL) // PETE: if we don't check exactly for 3, loop hang ups will happen (DQ4, for example) + { // and checking if pLoop is set avoids crashes, yeah + start = (unsigned char*)-1; + } + else + { + start = s_chan[ch].pLoop; + } + } + + s_chan[ch].pCurr=start; // store values for next cycle + s_chan[ch].s_1=s_1; + s_chan[ch].s_2=s_2; + + if(bIRQReturn) // special return for "spu irq - wait for cpu action" + { + bIRQReturn=0; + if(iUseTimer!=2) + { + DWORD dwWatchTime=timeGetTime_spu()+2500; + + while(iSpuAsyncWait && !bEndThread && + timeGetTime_spu() store 1T sample data, use that to do fmod on next channel + else // no fmod freq channel + { + ////////////////////////////////////////////// + // ok, left/right sound volume (psx volume goes from 0 ... 0x3fff) + + if(s_chan[ch].iMute) + s_chan[ch].sval=0; // debug mute + else + { + SSumL[ns]+=(s_chan[ch].sval*s_chan[ch].iLeftVolume)/0x4000L; + SSumR[ns]+=(s_chan[ch].sval*s_chan[ch].iRightVolume)/0x4000L; + } + + ////////////////////////////////////////////// + // now let us store sound data for reverb + + if(s_chan[ch].bRVBActive) StoreREVERB(ch,ns); + } + + //////////////////////////////////////////////// + // ok, go on until 1 ms data of this channel is collected + + ns++; + s_chan[ch].spos += s_chan[ch].sinc; + + } +ENDX: ; + } + } + + //---------------------------------------------------// + //- here we have another 1 ms of sound data + //---------------------------------------------------// + // mix XA infos (if any) + + MixXA(); + + /////////////////////////////////////////////////////// + // mix all channels (including reverb) into one buffer + + if(iDisStereo) // no stereo? + { + int dl, dr; + for (ns = 0; ns < NSSIZE; ns++) + { + SSumL[ns] += MixREVERBLeft(ns); + + dl = SSumL[ns] / voldiv; SSumL[ns] = 0; + if (dl < -32767) dl = -32767; if (dl > 32767) dl = 32767; + + SSumR[ns] += MixREVERBRight(); + + dr = SSumR[ns] / voldiv; SSumR[ns] = 0; + if (dr < -32767) dr = -32767; if (dr > 32767) dr = 32767; + *pS++ = (dl + dr) / 2; + } + } + else // stereo: + for (ns = 0; ns < NSSIZE; ns++) + { + SSumL[ns] += MixREVERBLeft(ns); + + d = SSumL[ns] / voldiv; SSumL[ns] = 0; + if (d < -32767) d = -32767; if (d > 32767) d = 32767; + *pS++ = d; + + SSumR[ns] += MixREVERBRight(); + + d = SSumR[ns] / voldiv; SSumR[ns] = 0; + if(d < -32767) d = -32767; if(d > 32767) d = 32767; + *pS++ = d; + } + + ////////////////////////////////////////////////////// + // special irq handling in the decode buffers (0x0000-0x1000) + // we know: + // the decode buffers are located in spu memory in the following way: + // 0x0000-0x03ff CD audio left + // 0x0400-0x07ff CD audio right + // 0x0800-0x0bff Voice 1 + // 0x0c00-0x0fff Voice 3 + // and decoded data is 16 bit for one sample + // we assume: + // even if voices 1/3 are off or no cd audio is playing, the internal + // play positions will move on and wrap after 0x400 bytes. + // Therefore: we just need a pointer from spumem+0 to spumem+3ff, and + // increase this pointer on each sample by 2 bytes. If this pointer + // (or 0x400 offsets of this pointer) hits the spuirq address, we generate + // an IRQ. Only problem: the "wait for cpu" option is kinda hard to do here + // in some of Peops timer modes. So: we ignore this option here (for now). + + if(pMixIrq && irqCallback) + { + for(ns=0;ns=pMixIrq+(ch*0x400) && pSpuIrqspuMemC+0x3ff) pMixIrq=spuMemC; + } + } + + InitREVERB(); + + // feed the sound + // wanna have around 1/60 sec (16.666 ms) updates + if (iCycle++ > 16) + { + SoundFeedStreamData((unsigned char *)pSpuBuffer, + ((unsigned char *)pS) - ((unsigned char *)pSpuBuffer)); + pS = (short *)pSpuBuffer; + iCycle = 0; + } + } + + // end of big main loop... + + bThreadEnded = 1; + + return 0; +} + +// SPU ASYNC... even newer epsxe func +// 1 time every 'cycle' cycles... harhar + +void CALLBACK SPUasync(unsigned long cycle) +{ + if(iSpuAsyncWait) + { + iSpuAsyncWait++; + if(iSpuAsyncWait<=64) return; + iSpuAsyncWait=0; + } + + if(iUseTimer==2) // special mode, only used in Linux by this spu (or if you enable the experimental Windows mode) + { + if(!bSpuInit) return; // -> no init, no call + + MAINThread(0); // -> linux high-compat mode + } +} + +// SPU UPDATE... new epsxe func +// 1 time every 32 hsync lines +// (312/32)x50 in pal +// (262/32)x60 in ntsc + +// since epsxe 1.5.2 (linux) uses SPUupdate, not SPUasync, I will +// leave that func in the linux port, until epsxe linux is using +// the async function as well + +void CALLBACK SPUupdate(void) +{ + SPUasync(0); +} + +// XA AUDIO + +void CALLBACK SPUplayADPCMchannel(xa_decode_t *xap) +{ + if(!xap) return; + if(!xap->freq) return; // no xa freq ? bye + + FeedXA(xap); // call main XA feeder +} + +// CDDA AUDIO +void CALLBACK SPUplayCDDAchannel(short *pcm, int nbytes) +{ + if (!pcm) return; + if (nbytes<=0) return; + + FeedCDDA((unsigned char *)pcm, nbytes); +} + +// SETUPTIMER: init of certain buffers and threads/timers +void SetupTimer(void) +{ + memset(SSumR,0,NSSIZE*sizeof(int)); // init some mixing buffers + memset(SSumL,0,NSSIZE*sizeof(int)); + memset(iFMod,0,NSSIZE*sizeof(int)); + pS=(short *)pSpuBuffer; // setup soundbuffer pointer + + bEndThread=0; // init thread vars + bThreadEnded=0; + bSpuInit=1; // flag: we are inited + + if(!iUseTimer) // linux: use thread + { + pthread_create(&thread, NULL, MAINThread, NULL); + } +} + +// REMOVETIMER: kill threads/timers +void RemoveTimer(void) +{ + bEndThread=1; // raise flag to end thread + + if(!iUseTimer) // linux tread? + { + int i=0; + while(!bThreadEnded && i<2000) {usleep(1000L);i++;} // -> wait until thread has ended + if(thread!=(pthread_t)-1) {pthread_cancel(thread);thread=(pthread_t)-1;} // -> cancel thread anyway + } + + bThreadEnded=0; // no more spu is running + bSpuInit=0; +} + +// SETUPSTREAMS: init most of the spu buffers +void SetupStreams(void) +{ + int i; + + pSpuBuffer=(unsigned char *)malloc(32768); // alloc mixing buffer + + if(iUseReverb==1) i=88200*2; + else i=NSSIZE*2; + + sRVBStart = (int *)malloc(i*4); // alloc reverb buffer + memset(sRVBStart,0,i*4); + sRVBEnd = sRVBStart + i; + sRVBPlay = sRVBStart; + + XAStart = // alloc xa buffer + (uint32_t *)malloc(44100 * sizeof(uint32_t)); + XAEnd = XAStart + 44100; + XAPlay = XAStart; + XAFeed = XAStart; + + CDDAStart = // alloc cdda buffer + (uint32_t *)malloc(16384 * sizeof(uint32_t)); + CDDAEnd = CDDAStart + 16384; + CDDAPlay = CDDAStart; + CDDAFeed = CDDAStart + 1; + + for(i=0;i init sustain + s_chan[i].iMute=0; + s_chan[i].iIrqDone=0; + s_chan[i].pLoop=spuMemC; + s_chan[i].pStart=spuMemC; + s_chan[i].pCurr=spuMemC; + } + + pMixIrq=spuMemC; // enable decoded buffer irqs by setting the address +} + +// REMOVESTREAMS: free most buffer +void RemoveStreams(void) +{ + free(pSpuBuffer); // free mixing buffer + pSpuBuffer = NULL; + free(sRVBStart); // free reverb buffer + sRVBStart = NULL; + free(XAStart); // free XA buffer + XAStart = NULL; + free(CDDAStart); // free CDDA buffer + CDDAStart = NULL; +} + +// INIT/EXIT STUFF + +// SPUINIT: this func will be called first by the main emu +long CALLBACK SPUinit(void) +{ + spuMemC = (unsigned char *)spuMem; // just small setup + memset((void *)&rvb, 0, sizeof(REVERBInfo)); + InitADSR(); + + iVolume = 3; + iReverbOff = -1; + spuIrq = 0; + spuAddr = 0xffffffff; + bEndThread = 0; + bThreadEnded = 0; + spuMemC = (unsigned char *)spuMem; + pMixIrq = 0; + memset((void *)s_chan, 0, (MAXCHAN + 1) * sizeof(SPUCHAN)); + pSpuIrq = 0; + iSPUIRQWait = 1; + lastch = -1; + + ReadConfig(); // read user stuff + SetupStreams(); // prepare streaming + + return 0; +} + +// SPUOPEN: called by main emu after init +long CALLBACK SPUopen(void) +{ + if (bSPUIsOpen) return 0; // security for some stupid main emus + + SetupSound(); // setup sound (before init!) + SetupTimer(); // timer for feeding data + + bSPUIsOpen = 1; + + return PSE_SPU_ERR_SUCCESS; +} + +// SPUCLOSE: called before shutdown +long CALLBACK SPUclose(void) +{ + if (!bSPUIsOpen) return 0; // some security + + bSPUIsOpen = 0; // no more open + + RemoveTimer(); // no more feeding + RemoveSound(); // no more sound handling + + return 0; +} + +// SPUSHUTDOWN: called by main emu on final exit +long CALLBACK SPUshutdown(void) +{ + SPUclose(); + RemoveStreams(); // no more streaming + + return 0; +} + +// SPUTEST: we don't test, we are always fine ;) +long CALLBACK SPUtest(void) +{ + return 0; +} + +// SPUCONFIGURE: call config dialog +long CALLBACK SPUconfigure(void) +{ +#ifdef _MACOSX + DoConfiguration(); +#else + StartCfgTool("CFG"); +#endif + return 0; +} + +// SPUABOUT: show about window +void CALLBACK SPUabout(void) +{ +#ifdef _MACOSX + DoAbout(); +#else + StartCfgTool("ABOUT"); +#endif +} + +// SETUP CALLBACKS +// this functions will be called once, +// passes a callback that should be called on SPU-IRQ/cdda volume change +void CALLBACK SPUregisterCallback(void (CALLBACK *callback)(void)) +{ + irqCallback = callback; +} + +void CALLBACK SPUregisterCDDAVolume(void (CALLBACK *CDDAVcallback)(unsigned short,unsigned short)) +{ + cddavCallback = CDDAVcallback; +} + +// COMMON PLUGIN INFO FUNCS +char * CALLBACK PSEgetLibName(void) +{ + return _(libraryName); +} + +unsigned long CALLBACK PSEgetLibType(void) +{ + return PSE_LT_SPU; +} + +unsigned long CALLBACK PSEgetLibVersion(void) +{ + return (1 << 16) | (6 << 8); +} + +char * SPUgetLibInfos(void) +{ + return _(libraryInfo); +} diff --git a/plugins/dfsound/spu.h b/plugins/dfsound/spu.h new file mode 100644 index 00000000..8912684b --- /dev/null +++ b/plugins/dfsound/spu.h @@ -0,0 +1,21 @@ +/*************************************************************************** + spu.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +void SetupTimer(void); +void RemoveTimer(void); +void CALLBACK SPUplayADPCMchannel(xa_decode_t *xap); +void CALLBACK SPUplayCDDAchannel(short *pcm, int bytes); \ No newline at end of file diff --git a/plugins/dfsound/spucfg-0.1df/dfsound.glade2 b/plugins/dfsound/spucfg-0.1df/dfsound.glade2 new file mode 100644 index 00000000..c071a09e --- /dev/null +++ b/plugins/dfsound/spucfg-0.1df/dfsound.glade2 @@ -0,0 +1,308 @@ + + + + + + True + 10 + Configure Sound + False + True + center + dialog + + + + True + vertical + 6 + + + True + 0 + + + True + 6 + 6 + 12 + 12 + + + True + 6 + 3 + 2 + 6 + 6 + + + True + 0 + Volume: + right + + + GTK_FILL + + + + + + True + 0 + Interpolation: + right + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Reverb: + right + + + 1 + 2 + GTK_FILL + + + + + + True + Low +Medium +Loud +Loudest + + + 1 + 2 + GTK_FILL + + + + + True + Off +Simple +Playstation + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + None +Simple +Gaussian +Cubic + + + 1 + 2 + 2 + 3 + GTK_FILL + GTK_FILL + + + + + + + + + True + <b>General</b> + True + + + label_item + + + + + 0 + + + + + True + 0 + + + True + 6 + 6 + 12 + 12 + + + True + 6 + vertical + 6 + + + Adjust XA speed + True + True + False + Choose this if XA music is played too quickly. + True + True + + + False + False + 0 + + + + + + + + + True + <b>XA Music</b> + True + + + label_item + + + + + 1 + + + + + True + 0 + + + True + 6 + 6 + 12 + 12 + + + True + 6 + vertical + 6 + + + High compatibility mode + True + True + False + Use the asynchronous SPU interface. + True + True + + + False + False + 0 + + + + + SPU IRQ Wait + True + True + False + Wait for CPU; only useful for some games. + True + True + + + False + False + 1 + + + + + Single channel sound + True + True + False + Play only one channel for a performance boost. + True + True + + + False + False + 2 + + + + + + + + + True + <b>Compatibility</b> + True + + + label_item + + + + + 2 + + + + + True + 12 + end + + + gtk-close + True + True + True + False + True + + + False + False + 0 + + + + + 3 + + + + + + diff --git a/plugins/dfsound/spucfg-0.1df/main.c b/plugins/dfsound/spucfg-0.1df/main.c new file mode 100644 index 00000000..dd38645a --- /dev/null +++ b/plugins/dfsound/spucfg-0.1df/main.c @@ -0,0 +1,258 @@ +#include "config.h" + +#include +#include +#include +#include +#include + +#include +#include + +#ifdef ENABLE_NLS +#include +#include +#endif + +#define READBINARY "rb" +#define WRITEBINARY "wb" +#define CONFIG_FILENAME "dfsound.cfg" + +void SaveConfig(GtkWidget *widget, gpointer user_datal); + +/* This function checks for the value being outside the accepted range, + and returns the appropriate boundary value */ +int set_limit (char *p, int len, int lower, int upper) +{ + int val = 0; + + if (p) + val = atoi(p + len); + + if (val < lower) + val = lower; + if (val > upper) + val = upper; + + return val; +} + +void on_about_clicked (GtkWidget *widget, gpointer user_data) +{ + gtk_widget_destroy (widget); + exit (0); +} + +void OnConfigClose(GtkWidget *widget, gpointer user_data) +{ + GladeXML *xml = (GladeXML *)user_data; + + gtk_widget_destroy(glade_xml_get_widget(xml, "CfgWnd")); + gtk_exit(0); +} + +int main(int argc, char *argv[]) +{ + GtkWidget *widget; + GladeXML *xml; + FILE *in; + char t[256]; + int len, val = 0; + char *pB, *p; + char cfg[255]; + +#ifdef ENABLE_NLS + setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + + if (argc != 2) { + printf ("Usage: cfgDFSound {ABOUT | CFG}\n"); + return 0; + } + + if (strcmp(argv[1], "CFG") != 0 && strcmp(argv[1], "ABOUT") != 0) { + printf ("Usage: cfgDFSound {ABOUT | CFG}\n"); + return 0; + } + + gtk_set_locale(); + gtk_init(&argc, &argv); + + if (strcmp(argv[1], "ABOUT") == 0) { + const char *authors[]= {"Pete Bernert and the P.E.Op.S. team", "Ryan Schultz", "Andrew Burton", NULL}; + widget = gtk_about_dialog_new (); + gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (widget), "dfsound PCSX Sound Plugin"); + gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (widget), "1.6"); + gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (widget), authors); + gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (widget), "http://pcsx-df.sourceforge.net/"); + + g_signal_connect_data(GTK_OBJECT(widget), "response", + GTK_SIGNAL_FUNC(on_about_clicked), NULL, NULL, G_CONNECT_AFTER); + + gtk_widget_show (widget); + gtk_main(); + + return 0; + } + + xml = glade_xml_new(DATADIR "dfsound.glade2", "CfgWnd", NULL); + if (!xml) { + g_warning("We could not load the interface!"); + return 255; + } + + strcpy(cfg, CONFIG_FILENAME); + + in = fopen(cfg, READBINARY); + if (in) { + pB = (char *)malloc(32767); + memset(pB, 0, 32767); + len = fread(pB, 1, 32767, in); + fclose(in); + } else { + pB = 0; + printf ("Error - no configuration file\n"); + /* TODO Raise error - no configuration file */ + } + + /* ADB TODO Replace a lot of the following with common functions */ + if (pB) { + strcpy(t, "\nVolume"); + p = strstr(pB, t); + if (p) { + p = strstr(p, "="); + len = 1; + } + val = set_limit (p, len, 0, 4); + } else val = 2; + + gtk_combo_box_set_active(GTK_COMBO_BOX (glade_xml_get_widget(xml, "cbVolume2")), val); + + if (pB) { + strcpy(t, "\nUseInterpolation"); + p = strstr(pB, t); + if (p) { + p = strstr(p, "="); + len = 1; + } + val = set_limit (p, len, 0, 3); + } else val = 2; + + gtk_combo_box_set_active(GTK_COMBO_BOX (glade_xml_get_widget(xml, "cbInterpolation2")), val); + + if (pB) { + strcpy(t, "\nXAPitch"); + p = strstr(pB, t); + if (p) { + p = strstr(p, "="); + len = 1; + } + val = set_limit (p, len, 0, 1); + } else val = 0; + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "chkXASpeed")), val); + + if (pB) { + strcpy(t, "\nHighCompMode"); + p = strstr(pB, t); + if (p) { + p = strstr(p, "="); + len = 1; + } + val = set_limit (p, len, 0, 1); + } else val = 0; + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "chkHiCompat")), val); + + if (pB) { + strcpy(t, "\nSPUIRQWait"); + p = strstr(pB, t); + if (p) { + p = strstr(p, "="); + len = 1; + } + + val = set_limit (p, len, 0, 1); + } else val = 1; + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "chkIRQWait")), val); + + if (pB) { + strcpy(t, "\nDisStereo"); + p = strstr(pB, t); + if (p) { + p = strstr(p, "="); + len = 1; + } + + val = set_limit (p, len, 0, 1); + } else val = 0; + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "chkDisStereo")), val); + + if (pB) { + strcpy(t, "\nUseReverb"); + p = strstr(pB, t); + if (p) { + p = strstr(p, "="); + len = 1; + } + val = set_limit (p, len, 0, 2); + } else val = 2; + + gtk_combo_box_set_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "cbReverb2")), val); + + if (pB) + free(pB); + + widget = glade_xml_get_widget(xml, "CfgWnd"); + g_signal_connect_data(GTK_OBJECT(widget), "destroy", + GTK_SIGNAL_FUNC(SaveConfig), xml, NULL, 0); + + widget = glade_xml_get_widget(xml, "btn_close"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConfigClose), xml, NULL, G_CONNECT_AFTER); + + gtk_main(); + return 0; +} + +void SaveConfig(GtkWidget *widget, gpointer user_data) +{ + GladeXML *xml = (GladeXML *)user_data; + FILE *fp; + int val; + + fp = fopen(CONFIG_FILENAME, WRITEBINARY); + if (fp == NULL) { + fprintf(stderr, "Unable to write to configuration file %s!\n", CONFIG_FILENAME); + gtk_exit(0); + } + + val = gtk_combo_box_get_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "cbVolume2"))); + fprintf(fp, "\nVolume = %d\n", val); + + val = gtk_combo_box_get_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "cbInterpolation2"))); + fprintf(fp, "\nUseInterpolation = %d\n", val); + + val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "chkXASpeed"))); + fprintf(fp, "\nXAPitch = %d\n", val); + + val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "chkHiCompat"))); + fprintf(fp, "\nHighCompMode = %d\n", val); + + val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "chkIRQWait"))); + fprintf(fp, "\nSPUIRQWait = %d\n", val); + + val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "chkDisStereo"))); + fprintf(fp, "\nDisStereo = %d\n", val); + + val = gtk_combo_box_get_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "cbReverb2"))); + fprintf(fp, "\nUseReverb = %d\n", val); + + fclose(fp); + gtk_exit(0); +} diff --git a/plugins/dfsound/stdafx.h b/plugins/dfsound/stdafx.h new file mode 100644 index 00000000..8be88489 --- /dev/null +++ b/plugins/dfsound/stdafx.h @@ -0,0 +1,46 @@ +/*************************************************************************** + StdAfx.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _MACOSX +#include "config.h" +#endif +#include +#include +#include +#include +#include +#ifdef USEOSS +#include +#endif +#include +#include +#define RRand(range) (random()%range) +#include +#include +#include + +#undef CALLBACK +#define CALLBACK +#define DWORD unsigned long +#define LOWORD(l) ((unsigned short)(l)) +#define HIWORD(l) ((unsigned short)(((unsigned long)(l) >> 16) & 0xFFFF)) + +#ifndef INLINE +#define INLINE inline +#endif + +#include "psemuxa.h" diff --git a/plugins/dfsound/xa.c b/plugins/dfsound/xa.c new file mode 100644 index 00000000..fdae4f9e --- /dev/null +++ b/plugins/dfsound/xa.c @@ -0,0 +1,410 @@ +/*************************************************************************** + xa.c - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" +#define _IN_XA +#include + +// will be included from spu.c +#ifdef _IN_SPU + +//////////////////////////////////////////////////////////////////////// +// XA GLOBALS +//////////////////////////////////////////////////////////////////////// + +xa_decode_t * xapGlobal=0; + +uint32_t * XAFeed = NULL; +uint32_t * XAPlay = NULL; +uint32_t * XAStart = NULL; +uint32_t * XAEnd = NULL; + +uint32_t XARepeat = 0; +uint32_t XALastVal = 0; + +uint32_t * CDDAFeed = NULL; +uint32_t * CDDAPlay = NULL; +uint32_t * CDDAStart = NULL; +uint32_t * CDDAEnd = NULL; + +int iLeftXAVol = 32767; +int iRightXAVol = 32767; + +static int gauss_ptr = 0; +static int gauss_window[8] = {0, 0, 0, 0, 0, 0, 0, 0}; + +#define gvall0 gauss_window[gauss_ptr] +#define gvall(x) gauss_window[(gauss_ptr+x)&3] +#define gvalr0 gauss_window[4+gauss_ptr] +#define gvalr(x) gauss_window[4+((gauss_ptr+x)&3)] + +//////////////////////////////////////////////////////////////////////// +// MIX XA & CDDA +//////////////////////////////////////////////////////////////////////// + +INLINE void MixXA(void) +{ + int ns; + uint32_t l; + + for(ns=0;ns>16)&0xffff)) * iRightXAVol)/32768; +#else + SSumL[ns]+=(((short)(XALastVal&0xffff)) * iLeftXAVol)/32767; + SSumR[ns]+=(((short)((XALastVal>>16)&0xffff)) * iRightXAVol)/32767; +#endif + } + + if(XAPlay==XAFeed && XARepeat) + { + XARepeat--; + for(;ns>16)&0xffff)) * iRightXAVol)/32768; +#else + SSumL[ns]+=(((short)(XALastVal&0xffff)) * iLeftXAVol)/32767; + SSumR[ns]+=(((short)((XALastVal>>16)&0xffff)) * iRightXAVol)/32767; +#endif + } + } + + for(ns=0;ns>16)&0xffff)) * iRightXAVol)/32767; + } +} + +//////////////////////////////////////////////////////////////////////// +// small linux time helper... only used for watchdog +//////////////////////////////////////////////////////////////////////// + +unsigned long timeGetTime_spu() +{ + struct timeval tv; + gettimeofday(&tv, 0); // well, maybe there are better ways + return tv.tv_sec * 1000 + tv.tv_usec/1000; // to do that, but at least it works +} + +//////////////////////////////////////////////////////////////////////// +// FEED XA +//////////////////////////////////////////////////////////////////////// + +INLINE void FeedXA(xa_decode_t *xap) +{ + int sinc,spos,i,iSize,iPlace,vl,vr; + + if(!bSPUIsOpen) return; + + xapGlobal = xap; // store info for save states + XARepeat = 100; // set up repeat + +#ifdef XA_HACK + iSize=((45500*xap->nsamples)/xap->freq); // get size +#else + iSize=((44100*xap->nsamples)/xap->freq); // get size +#endif + if(!iSize) return; // none? bye + + if(XAFeed=10) + { + if(!dwFPS) dwFPS=1; + dw1=1000000/dwFPS; + if(dw1>=(dwL1-100) && dw1<=(dwL1+100)) dw1=dwL1; + else dwL1=dw1; + dw2=(xap->freq*100/xap->nsamples); + if((!dw1)||((dw2+100)>=dw1)) iLastSize=0; + else + { + iLastSize=iSize*dw2/dw1; + if(iLastSize>iPlace) iLastSize=iPlace; + iSize=iLastSize; + } + iFPSCnt=0;dwFPS=0; + } + else + { + if(iLastSize) iSize=iLastSize; + } + } + //----------------------------------------------------// + + spos=0x10000L; + sinc = (xap->nsamples << 16) / iSize; // calc freq by num / size + + if(xap->stereo) +{ + uint32_t * pS=(uint32_t *)xap->pcm; + uint32_t l=0; + + if(iXAPitch) + { + int32_t l1,l2;short s; + for(i=0;i=0x10000L) + { + l = *pS++; + gauss_window[gauss_ptr] = (short)LOWORD(l); + gauss_window[4+gauss_ptr] = (short)HIWORD(l); + gauss_ptr = (gauss_ptr+1) & 3; + spos -= 0x10000L; + } + vl = (spos >> 6) & ~3; + vr=(gauss[vl]*gvall0)&~2047; + vr+=(gauss[vl+1]*gvall(1))&~2047; + vr+=(gauss[vl+2]*gvall(2))&~2047; + vr+=(gauss[vl+3]*gvall(3))&~2047; + l= (vr >> 11) & 0xffff; + vr=(gauss[vl]*gvalr0)&~2047; + vr+=(gauss[vl+1]*gvalr(1))&~2047; + vr+=(gauss[vl+2]*gvalr(2))&~2047; + vr+=(gauss[vl+3]*gvalr(3))&~2047; + l |= vr << 5; + } + else + { + while(spos>=0x10000L) + { + l = *pS++; + spos -= 0x10000L; + } + } + + s=(short)LOWORD(l); + l1=s; + l1=(l1*iPlace)/iSize; + if(l1<-32767) l1=-32767; + if(l1> 32767) l1=32767; + s=(short)HIWORD(l); + l2=s; + l2=(l2*iPlace)/iSize; + if(l2<-32767) l2=-32767; + if(l2> 32767) l2=32767; + l=(l1&0xffff)|(l2<<16); + + *XAFeed++=l; + + if(XAFeed==XAEnd) XAFeed=XAStart; + if(XAFeed==XAPlay) + { + if(XAPlay!=XAStart) XAFeed=XAPlay-1; + break; + } + + spos += sinc; + } + } + else + { + for(i=0;i=0x10000L) + { + l = *pS++; + gauss_window[gauss_ptr] = (short)LOWORD(l); + gauss_window[4+gauss_ptr] = (short)HIWORD(l); + gauss_ptr = (gauss_ptr+1) & 3; + spos -= 0x10000L; + } + vl = (spos >> 6) & ~3; + vr=(gauss[vl]*gvall0)&~2047; + vr+=(gauss[vl+1]*gvall(1))&~2047; + vr+=(gauss[vl+2]*gvall(2))&~2047; + vr+=(gauss[vl+3]*gvall(3))&~2047; + l= (vr >> 11) & 0xffff; + vr=(gauss[vl]*gvalr0)&~2047; + vr+=(gauss[vl+1]*gvalr(1))&~2047; + vr+=(gauss[vl+2]*gvalr(2))&~2047; + vr+=(gauss[vl+3]*gvalr(3))&~2047; + l |= vr << 5; + } + else + { + while(spos>=0x10000L) + { + l = *pS++; + spos -= 0x10000L; + } + } + + *XAFeed++=l; + + if(XAFeed==XAEnd) XAFeed=XAStart; + if(XAFeed==XAPlay) + { + if(XAPlay!=XAStart) XAFeed=XAPlay-1; + break; + } + + spos += sinc; + } + } + } + else + { + unsigned short * pS=(unsigned short *)xap->pcm; + uint32_t l;short s=0; + + if(iXAPitch) + { + int32_t l1; + for(i=0;i=0x10000L) + { + gauss_window[gauss_ptr] = (short)*pS++; + gauss_ptr = (gauss_ptr+1) & 3; + spos -= 0x10000L; + } + vl = (spos >> 6) & ~3; + vr=(gauss[vl]*gvall0)&~2047; + vr+=(gauss[vl+1]*gvall(1))&~2047; + vr+=(gauss[vl+2]*gvall(2))&~2047; + vr+=(gauss[vl+3]*gvall(3))&~2047; + l1=s= vr >> 11; + l1 &= 0xffff; + } + else + { + while(spos>=0x10000L) + { + s = *pS++; + spos -= 0x10000L; + } + l1=s; + } + + l1=(l1*iPlace)/iSize; + if(l1<-32767) l1=-32767; + if(l1> 32767) l1=32767; + l=(l1&0xffff)|(l1<<16); + *XAFeed++=l; + + if(XAFeed==XAEnd) XAFeed=XAStart; + if(XAFeed==XAPlay) + { + if(XAPlay!=XAStart) XAFeed=XAPlay-1; + break; + } + + spos += sinc; + } + } + else + { + for(i=0;i=0x10000L) + { + gauss_window[gauss_ptr] = (short)*pS++; + gauss_ptr = (gauss_ptr+1) & 3; + spos -= 0x10000L; + } + vl = (spos >> 6) & ~3; + vr=(gauss[vl]*gvall0)&~2047; + vr+=(gauss[vl+1]*gvall(1))&~2047; + vr+=(gauss[vl+2]*gvall(2))&~2047; + vr+=(gauss[vl+3]*gvall(3))&~2047; + l=s= vr >> 11; + l &= 0xffff; + } + else + { + while(spos>=0x10000L) + { + s = *pS++; + spos -= 0x10000L; + } + l=s; + } + + *XAFeed++=(l|(l<<16)); + + if(XAFeed==XAEnd) XAFeed=XAStart; + if(XAFeed==XAPlay) + { + if(XAPlay!=XAStart) XAFeed=XAPlay-1; + break; + } + + spos += sinc; + } + } + } +} + +//////////////////////////////////////////////////////////////////////// +// FEED CDDA +//////////////////////////////////////////////////////////////////////// + +INLINE void FeedCDDA(unsigned char *pcm, int nBytes) +{ + while(nBytes>0) + { + if(CDDAFeed==CDDAEnd) CDDAFeed=CDDAStart; + while(CDDAFeed==CDDAPlay-1|| + (CDDAFeed==CDDAEnd-1&&CDDAPlay==CDDAStart)) + { + if (!iUseTimer) usleep(1000); + else return; + } + *CDDAFeed++=(*pcm | (*(pcm+1)<<8) | (*(pcm+2)<<16) | (*(pcm+3)<<24)); + nBytes-=4; + pcm+=4; + } +} + +#endif diff --git a/plugins/dfsound/xa.h b/plugins/dfsound/xa.h new file mode 100644 index 00000000..0928eba2 --- /dev/null +++ b/plugins/dfsound/xa.h @@ -0,0 +1,20 @@ +/*************************************************************************** + xa.h - description + ------------------- + begin : Wed May 15 2002 + copyright : (C) 2002 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +INLINE void MixXA(void); +INLINE void FeedXA(xa_decode_t *xap); +INLINE void FeedCDDA(unsigned char *pcm, int nBytes); diff --git a/plugins/dfxvideo/Makefile.am b/plugins/dfxvideo/Makefile.am new file mode 100644 index 00000000..89ba770e --- /dev/null +++ b/plugins/dfxvideo/Makefile.am @@ -0,0 +1,36 @@ +STRIP_FPIC = sh $(top_srcdir)/strip_fPIC.sh + +SUFFIXES = .asm + +.asm.lo: + $(LIBTOOL) --tag=CC --mode=compile \ + $(STRIP_FPIC) $(NASM) -f elf -d ELF -I${srcdir}/ $< + +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) -I/usr/X11R6/include \ + -I../../libpcsxcore \ + -I../../include + +bindir = @libdir@/games/psemu/ +libdir = @libdir@/games/psemu/ + +lib_LTLIBRARIES = libDFXVideo.la + +libDFXVideo_la_SOURCES = gpu.c cfg.c draw.c fps.c key.c menu.c prim.c soft.c zn.c +if X86_NASM +libDFXVideo_la_SOURCES += i386.asm +INCLUDES += -DUSE_NASM=1 +endif +libDFXVideo_la_LDFLAGS = -module -avoid-version +libDFXVideo_la_LDFLAGS += -L/usr/X11R6/lib64 -L/usr/X11R6/lib \ + -lX11 -lXv -lXext -lm + +bin_PROGRAMS = cfgDFXVideo +cfgDFXVideo_SOURCES = gpucfg-0.1df/main.c +cfgDFXVideo_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) -L/usr/X11R6/lib -lXext + +glade_DATA = gpucfg-0.1df/dfxvideo.glade2 +gladedir = $(datadir)/psemu/ +EXTRA_DIST = $(glade_DATA) diff --git a/plugins/dfxvideo/Makefile.in b/plugins/dfxvideo/Makefile.in new file mode 100644 index 00000000..6bacfcf9 --- /dev/null +++ b/plugins/dfxvideo/Makefile.in @@ -0,0 +1,626 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@X86_NASM_TRUE@am__append_1 = i386.asm +@X86_NASM_TRUE@am__append_2 = -DUSE_NASM=1 +bin_PROGRAMS = cfgDFXVideo$(EXEEXT) +subdir = plugins/dfxvideo +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(gladedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libDFXVideo_la_LIBADD = +am__libDFXVideo_la_SOURCES_DIST = gpu.c cfg.c draw.c fps.c key.c \ + menu.c prim.c soft.c zn.c i386.asm +@X86_NASM_TRUE@am__objects_1 = i386.lo +am_libDFXVideo_la_OBJECTS = gpu.lo cfg.lo draw.lo fps.lo key.lo \ + menu.lo prim.lo soft.lo zn.lo $(am__objects_1) +libDFXVideo_la_OBJECTS = $(am_libDFXVideo_la_OBJECTS) +libDFXVideo_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libDFXVideo_la_LDFLAGS) $(LDFLAGS) -o $@ +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_cfgDFXVideo_OBJECTS = main.$(OBJEXT) +cfgDFXVideo_OBJECTS = $(am_cfgDFXVideo_OBJECTS) +am__DEPENDENCIES_1 = +cfgDFXVideo_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libDFXVideo_la_SOURCES) $(cfgDFXVideo_SOURCES) +DIST_SOURCES = $(am__libDFXVideo_la_SOURCES_DIST) \ + $(cfgDFXVideo_SOURCES) +gladeDATA_INSTALL = $(INSTALL_DATA) +DATA = $(glade_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @libdir@/games/psemu/ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@/games/psemu/ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +STRIP_FPIC = sh $(top_srcdir)/strip_fPIC.sh +SUFFIXES = .asm +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" $(GTK2_CFLAGS) \ + $(GLADE2_CFLAGS) -I/usr/X11R6/include -I../../libpcsxcore \ + -I../../include $(am__append_2) +lib_LTLIBRARIES = libDFXVideo.la +libDFXVideo_la_SOURCES = gpu.c cfg.c draw.c fps.c key.c menu.c prim.c \ + soft.c zn.c $(am__append_1) +libDFXVideo_la_LDFLAGS = -module -avoid-version -L/usr/X11R6/lib64 \ + -L/usr/X11R6/lib -lX11 -lXv -lXext -lm +cfgDFXVideo_SOURCES = gpucfg-0.1df/main.c +cfgDFXVideo_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) -L/usr/X11R6/lib -lXext +glade_DATA = gpucfg-0.1df/dfxvideo.glade2 +gladedir = $(datadir)/psemu/ +EXTRA_DIST = $(glade_DATA) +all: all-am + +.SUFFIXES: +.SUFFIXES: .asm .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/dfxvideo/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/dfxvideo/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libDFXVideo.la: $(libDFXVideo_la_OBJECTS) $(libDFXVideo_la_DEPENDENCIES) + $(libDFXVideo_la_LINK) -rpath $(libdir) $(libDFXVideo_la_OBJECTS) $(libDFXVideo_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +cfgDFXVideo$(EXEEXT): $(cfgDFXVideo_OBJECTS) $(cfgDFXVideo_DEPENDENCIES) + @rm -f cfgDFXVideo$(EXEEXT) + $(LINK) $(cfgDFXVideo_OBJECTS) $(cfgDFXVideo_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/draw.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/key.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prim.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soft.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zn.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +main.o: gpucfg-0.1df/main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT main.o -MD -MP -MF $(DEPDIR)/main.Tpo -c -o main.o `test -f 'gpucfg-0.1df/main.c' || echo '$(srcdir)/'`gpucfg-0.1df/main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/main.Tpo $(DEPDIR)/main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpucfg-0.1df/main.c' object='main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o main.o `test -f 'gpucfg-0.1df/main.c' || echo '$(srcdir)/'`gpucfg-0.1df/main.c + +main.obj: gpucfg-0.1df/main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT main.obj -MD -MP -MF $(DEPDIR)/main.Tpo -c -o main.obj `if test -f 'gpucfg-0.1df/main.c'; then $(CYGPATH_W) 'gpucfg-0.1df/main.c'; else $(CYGPATH_W) '$(srcdir)/gpucfg-0.1df/main.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/main.Tpo $(DEPDIR)/main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpucfg-0.1df/main.c' object='main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o main.obj `if test -f 'gpucfg-0.1df/main.c'; then $(CYGPATH_W) 'gpucfg-0.1df/main.c'; else $(CYGPATH_W) '$(srcdir)/gpucfg-0.1df/main.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-gladeDATA: $(glade_DATA) + @$(NORMAL_INSTALL) + test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" + @list='$(glade_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \ + $(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \ + done + +uninstall-gladeDATA: + @$(NORMAL_UNINSTALL) + @list='$(glade_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \ + rm -f "$(DESTDIR)$(gladedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(gladedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-gladeDATA + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-gladeDATA \ + uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-gladeDATA install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-gladeDATA uninstall-libLTLIBRARIES + + +.asm.lo: + $(LIBTOOL) --tag=CC --mode=compile \ + $(STRIP_FPIC) $(NASM) -f elf -d ELF -I${srcdir}/ $< +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/plugins/dfxvideo/cfg.c b/plugins/dfxvideo/cfg.c new file mode 100644 index 00000000..9baf8bc2 --- /dev/null +++ b/plugins/dfxvideo/cfg.c @@ -0,0 +1,318 @@ +/*************************************************************************** + cfg.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_CFG + +#include +#include +#include + +#undef FALSE +#undef TRUE +#define MAKELONG(low,high) ((unsigned long)(((unsigned short)(low)) | (((unsigned long)((unsigned short)(high))) << 16))) + +#include "externals.h" +#include "cfg.h" +#include "gpu.h" + +char * pConfigFile = NULL; + +// CONFIG FILE helpers.... +// some helper macros: + +#define GetValue(name, var) \ + p = strstr(pB, name); \ + if (p != NULL) { \ + p+=strlen(name); \ + while ((*p == ' ') || (*p == '=')) p++; \ + if (*p != '\n') var = atoi(p); \ + } + +#define GetFloatValue(name, var) \ + p = strstr(pB, name); \ + if (p != NULL) { \ + p+=strlen(name); \ + while ((*p == ' ') || (*p == '=')) p++; \ + if (*p != '\n') var = (float)atof(p); \ + } + +#define SetValue(name, var) \ + p = strstr(pB, name); \ + if (p != NULL) { \ + p+=strlen(name); \ + while ((*p == ' ') || (*p == '=')) p++; \ + if (*p != '\n') { \ + len = sprintf(t1, "%d", var); \ + strncpy(p, t1, len); \ + if (p[len] != ' ' && p[len] != '\n' && p[len] != 0) p[len] = ' '; \ + } \ + } \ + else { \ + size+=sprintf(pB+size, "%s = %d\n", name, var); \ + } + +#define SetFloatValue(name, var) \ + p = strstr(pB, name); \ + if (p != NULL) { \ + p+=strlen(name); \ + while ((*p == ' ') || (*p == '=')) p++; \ + if (*p != '\n') { \ + len = sprintf(t1, "%.1f", (double)var); \ + strncpy(p, t1, len); \ + if (p[len] != ' ' && p[len] != '\n' && p[len] != 0) p[len] = ' '; \ + } \ + } \ + else { \ + size+=sprintf(pB+size, "%s = %.1f\n", name, (double)var); \ + } + +void ReadConfigFile() +{ + struct stat buf; + FILE *in;char t[256];int len, size; + char * pB, * p; + + if(pConfigFile) + strcpy(t,pConfigFile); + else + { + strcpy(t,"dfxvideo.cfg"); + in = fopen(t,"rb"); + if (!in) + { + strcpy(t,"cfg/dfxvideo.cfg"); + in = fopen(t,"rb"); + if(!in) sprintf(t,"%s/.pcsx/plugins/dfxvideo.cfg",getenv("HOME")); + else fclose(in); + } + else fclose(in); + } + + if (stat(t, &buf) == -1) return; + size = buf.st_size; + + in = fopen(t,"rb"); + if (!in) return; + + pB=(char *)malloc(size + 1); + memset(pB,0,size + 1); + + len = fread(pB, 1, size, in); + fclose(in); + + GetValue("ResX", iResX); + if(iResX<20) iResX=20; + iResX=(iResX/4)*4; + + GetValue("ResY", iResY); + if(iResY<20) iResY=20; + iResY=(iResY/4)*4; + + iWinSize=MAKELONG(iResX,iResY); + + GetValue("NoStretch", iUseNoStretchBlt); + + GetValue("Dithering", iUseDither); + + GetValue("FullScreen", iWindowMode); + if(iWindowMode!=0) iWindowMode=0; + else iWindowMode=1; + + GetValue("ShowFPS", iShowFPS); + if(iShowFPS<0) iShowFPS=0; + if(iShowFPS>1) iShowFPS=1; + + GetValue("Maintain43", iMaintainAspect); + if(iMaintainAspect<0) iMaintainAspect=0; + if(iMaintainAspect>1) iMaintainAspect=1; + + GetValue("UseFrameLimit", UseFrameLimit); + if(UseFrameLimit<0) UseFrameLimit=0; + if(UseFrameLimit>1) UseFrameLimit=1; + + GetValue("UseFrameSkip", UseFrameSkip); + if(UseFrameSkip<0) UseFrameSkip=0; + if(UseFrameSkip>1) UseFrameSkip=1; + + GetValue("FPSDetection", iFrameLimit); + if(iFrameLimit<1) iFrameLimit=1; + if(iFrameLimit>2) iFrameLimit=2; + + GetFloatValue("FrameRate", fFrameRate); + fFrameRate/=10; + if(fFrameRate<10.0f) fFrameRate=10.0f; + if(fFrameRate>1000.0f) fFrameRate=1000.0f; + + GetValue("CfgFixes", dwCfgFixes); + + GetValue("UseFixes", iUseFixes); + if(iUseFixes<0) iUseFixes=0; + if(iUseFixes>1) iUseFixes=1; + + free(pB); +} + +void ExecCfg(char *arg) { + char cfg[256]; + struct stat buf; + + strcpy(cfg, "./cfgDFXVideo"); + if (stat(cfg, &buf) != -1) { + if (fork() == 0) { + execl(cfg, "cfgDFXVideo", arg, NULL); + exit(0); + } + return; + } + + strcpy(cfg, "./cfg/cfgDFXVideo"); + if (stat(cfg, &buf) != -1) { + if (fork() == 0) { + execl(cfg, "cfgDFXVideo", arg, NULL); + exit(0); + } + return; + } + + sprintf(cfg, "%s/.pcsx/plugins/cfg/cfgDFXVideo", getenv("HOME")); + if (stat(cfg, &buf) != -1) { + if (fork() == 0) { + execl(cfg, "cfgDFXVideo", arg, NULL); + exit(0); + } + return; + } + + printf("ERROR: cfgDFXVideo file not found!\n"); +} + +void SoftDlgProc(void) +{ + ExecCfg("CFG"); +} + +void AboutDlgProc(void) +{ + char args[256]; + + sprintf(args, "ABOUT"); + ExecCfg(args); +} + +void ReadConfig(void) +{ + // defaults + iResX=640;iResY=480; + iWinSize=MAKELONG(iResX,iResY); + iColDepth=32; + iWindowMode=1; + iMaintainAspect=0; + UseFrameLimit=1; + UseFrameSkip=0; + iFrameLimit=2; + fFrameRate=200.0f; + dwCfgFixes=0; + iUseFixes=0; + iUseNoStretchBlt=0; + iUseDither=0; + iShowFPS=0; + + // read sets + ReadConfigFile(); + + // additional checks + if(!iColDepth) iColDepth=32; + if(iUseFixes) dwActFixes=dwCfgFixes; + SetFixes(); +} + +void WriteConfig(void) { + + struct stat buf; + FILE *out;char t[256];int len, size; + char * pB, * p; char t1[8]; + + if(pConfigFile) + strcpy(t,pConfigFile); + else + { + strcpy(t,"dfxvideo.cfg"); + out = fopen(t,"rb"); + if (!out) + { + strcpy(t,"cfg/dfxvideo.cfg"); + out = fopen(t,"rb"); + if(!out) sprintf(t,"%s/.pcsx/plugins/dfxvideo.cfg",getenv("HOME")); + else fclose(out); + } + else fclose(out); + } + + if (stat(t, &buf) != -1) size = buf.st_size; + else size = 0; + + out = fopen(t,"rb"); + if (!out) { + // defaults + iResX=640;iResY=480; + iColDepth=32; + iWindowMode=1; + iMaintainAspect=0; + UseFrameLimit=0; + UseFrameSkip=0; + iFrameLimit=2; + fFrameRate=200.0f; + dwCfgFixes=0; + iUseFixes=0; + iUseNoStretchBlt=0; + iUseDither=0; + iShowFPS=0; + + size = 0; + pB=(char *)malloc(4096); + memset(pB,0,4096); + } + else { + pB=(char *)malloc(size+4096); + memset(pB,0,size+4096); + + len = fread(pB, 1, size, out); + fclose(out); + } + + SetValue("ResX", iResX); + SetValue("ResY", iResY); + SetValue("NoStretch", iUseNoStretchBlt); + SetValue("Dithering", iUseDither); + SetValue("FullScreen", !iWindowMode); + SetValue("ShowFPS", iShowFPS); + SetValue("Maintain43", iMaintainAspect); + SetValue("UseFrameLimit", UseFrameLimit); + SetValue("UseFrameSkip", UseFrameSkip); + SetValue("FPSDetection", iFrameLimit); + SetFloatValue("FrameRate", fFrameRate); + SetValue("CfgFixes", (unsigned int)dwCfgFixes); + SetValue("UseFixes", iUseFixes); + + out = fopen(t,"wb"); + if (!out) return; + + len = fwrite(pB, 1, size, out); + fclose(out); + + free(pB); +} diff --git a/plugins/dfxvideo/cfg.h b/plugins/dfxvideo/cfg.h new file mode 100644 index 00000000..fa259f30 --- /dev/null +++ b/plugins/dfxvideo/cfg.h @@ -0,0 +1,28 @@ +/*************************************************************************** + cfg.h - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _GPU_CFG_H_ +#define _GPU_CFG_H_ + +void ReadConfig(void); +void WriteConfig(void); +void ReadWinSizeConfig(void); + +void SoftDlgProc(void); +void AboutDlgProc(void); + +#endif // _GPU_CFG_H_ diff --git a/plugins/dfxvideo/draw.c b/plugins/dfxvideo/draw.c new file mode 100644 index 00000000..fe7f87a6 --- /dev/null +++ b/plugins/dfxvideo/draw.c @@ -0,0 +1,2047 @@ +/*************************************************************************** + draw.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_DRAW + +#include "externals.h" +#include "gpu.h" +#include "draw.h" +#include "prim.h" +#include "menu.h" +#include "interp.h" +#include "swap.h" + +// misc globals +int iResX; +int iResY; +long lLowerpart; +BOOL bIsFirstFrame = TRUE; +BOOL bCheckMask = FALSE; +unsigned short sSetMask = 0; +unsigned long lSetMask = 0; +int iDesktopCol = 16; +int iShowFPS = 0; +int iWinSize; +int iMaintainAspect = 0; +int iUseNoStretchBlt = 0; +int iFastFwd = 0; +int iDebugMode = 0; +int iFVDisplay = 0; +PSXPoint_t ptCursorPoint[8]; +unsigned short usCursorActive = 0; + +//unsigned int LUT16to32[65536]; +//unsigned int RGBtoYUV[65536]; + +#include +#include +#include +#include +#include +int xv_port = -1; +int xv_id = -1; +int xv_depth = 0; +int yuv_port = -1; +int yuv_id = -1; +int use_yuv = 0; +int xv_vsync = 0; + +XShmSegmentInfo shminfo; +int finalw,finalh; + +extern XvImage *XvShmCreateImage(Display*, XvPortID, int, char*, int, int, XShmSegmentInfo*); + +#include + +// prototypes +void hq2x_32( unsigned char * srcPtr, DWORD srcPitch, unsigned char * dstPtr, int width, int height); +void hq3x_32( unsigned char * srcPtr, DWORD srcPitch, unsigned char * dstPtr, int width, int height); + +//////////////////////////////////////////////////////////////////////// +// generic 2xSaI helpers +//////////////////////////////////////////////////////////////////////// + +void * pSaISmallBuff=NULL; +void * pSaIBigBuff=NULL; + +#define GET_RESULT(A, B, C, D) ((A != C || A != D) - (B != C || B != D)) + +static __inline int GetResult1(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E) +{ + int x = 0; + int y = 0; + int r = 0; + if (A == C) x+=1; else if (B == C) y+=1; + if (A == D) x+=1; else if (B == D) y+=1; + if (x <= 1) r+=1; + if (y <= 1) r-=1; + return r; +} + +static __inline int GetResult2(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E) +{ + int x = 0; + int y = 0; + int r = 0; + if (A == C) x+=1; else if (B == C) y+=1; + if (A == D) x+=1; else if (B == D) y+=1; + if (x <= 1) r-=1; + if (y <= 1) r+=1; + return r; +} + +#define colorMask8 0x00FEFEFE +#define lowPixelMask8 0x00010101 +#define qcolorMask8 0x00FCFCFC +#define qlowpixelMask8 0x00030303 + +#define INTERPOLATE8(A, B) ((((A & colorMask8) >> 1) + ((B & colorMask8) >> 1) + (A & B & lowPixelMask8))) +#define Q_INTERPOLATE8(A, B, C, D) (((((A & qcolorMask8) >> 2) + ((B & qcolorMask8) >> 2) + ((C & qcolorMask8) >> 2) + ((D & qcolorMask8) >> 2) \ + + ((((A & qlowpixelMask8) + (B & qlowpixelMask8) + (C & qlowpixelMask8) + (D & qlowpixelMask8)) >> 2) & qlowpixelMask8)))) + + +void Super2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + DWORD srcPitchHalf = srcPitch>>1; + int finWidth = srcPitch>>2; + DWORD line; + DWORD *dP; + DWORD *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA0, colorA1, colorA2, colorA3, + colorB0, colorB1, colorB2, colorB3, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + finalw=width<<1; + finalh=height<<1; + + line = 0; + + { + for (; height; height-=1) + { + bP = (DWORD *)srcPtr; + dP = (DWORD *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- B1 B2 +// 4 5 6 S2 +// 1 2 3 S1 +// A1 A2 + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) {iYA=0;} + else {iYA=finWidth;} + if(height>4) {iYB=finWidth;iYC=srcPitchHalf;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + colorB0 = *(bP- iYA - iXA); + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + colorB3 = *(bP- iYA + iXC); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA0 = *(bP + iYC - iXA); + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + colorA3 = *(bP + iYC + iXC); + + if (color2 == color6 && color5 != color3) + { + product2b = product1b = color2; + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1b = color5; + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color1&0x00ffffff), (colorA1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color4&0x00ffffff), (colorB1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorA2&0x00ffffff), (colorS1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorB2&0x00ffffff), (colorS2&0x00ffffff)); + + if (r > 0) + product2b = product1b = color6; + else + if (r < 0) + product2b = product1b = color5; + else + { + product2b = product1b = INTERPOLATE8(color5, color6); + } + } + else + { + if (color6 == color3 && color3 == colorA1 && color2 != colorA2 && color3 != colorA0) + product2b = Q_INTERPOLATE8 (color3, color3, color3, color2); + else + if (color5 == color2 && color2 == colorA2 && colorA1 != color3 && color2 != colorA3) + product2b = Q_INTERPOLATE8 (color2, color2, color2, color3); + else + product2b = INTERPOLATE8 (color2, color3); + + if (color6 == color3 && color6 == colorB1 && color5 != colorB2 && color6 != colorB0) + product1b = Q_INTERPOLATE8 (color6, color6, color6, color5); + else + if (color5 == color2 && color5 == colorB2 && colorB1 != color6 && color5 != colorB3) + product1b = Q_INTERPOLATE8 (color6, color5, color5, color5); + else + product1b = INTERPOLATE8 (color5, color6); + } + + if (color5 == color3 && color2 != color6 && color4 == color5 && color5 != colorA2) + product2a = INTERPOLATE8(color2, color5); + else + if (color5 == color1 && color6 == color5 && color4 != color2 && color5 != colorA0) + product2a = INTERPOLATE8(color2, color5); + else + product2a = color2; + + if (color2 == color6 && color5 != color3 && color1 == color2 && color2 != colorB2) + product1a = INTERPOLATE8(color2, color5); + else + if (color4 == color2 && color3 == color2 && color1 != color5 && color2 != colorB0) + product1a = INTERPOLATE8(color2, color5); + else + product1a = color5; + + *dP=product1a; + *(dP+1)=product1b; + *(dP+(srcPitchHalf))=product2a; + *(dP+1+(srcPitchHalf))=product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +//////////////////////////////////////////////////////////////////////// + +void Std2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + DWORD srcPitchHalf = srcPitch>>1; + int finWidth = srcPitch>>2; + DWORD line; + DWORD *dP; + DWORD *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + + finalw=width<<1; + finalh=height<<1; + + DWORD colorA, colorB; + DWORD colorC, colorD, + colorE, colorF, colorG, colorH, + colorI, colorJ, colorK, colorL, + colorM, colorN, colorO, colorP; + DWORD product, product1, product2; + + line = 0; + + { + for (; height; height-=1) + { + bP = (DWORD *)srcPtr; + dP = (DWORD *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- +// Map of the pixels: I|E F|J +// G|A B|K +// H|C D|L +// M|N O|P + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) {iYA=0;} + else {iYA=finWidth;} + if(height>4) {iYB=finWidth;iYC=srcPitchHalf;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + colorI = *(bP- iYA - iXA); + colorE = *(bP- iYA); + colorF = *(bP- iYA + iXB); + colorJ = *(bP- iYA + iXC); + + colorG = *(bP - iXA); + colorA = *(bP); + colorB = *(bP + iXB); + colorK = *(bP + iXC); + + colorH = *(bP + iYB - iXA); + colorC = *(bP + iYB); + colorD = *(bP + iYB + iXB); + colorL = *(bP + iYB + iXC); + + colorM = *(bP + iYC - iXA); + colorN = *(bP + iYC); + colorO = *(bP + iYC + iXB); + colorP = *(bP + iYC + iXC); + + + if((colorA == colorD) && (colorB != colorC)) + { + if(((colorA == colorE) && (colorB == colorL)) || + ((colorA == colorC) && (colorA == colorF) && + (colorB != colorE) && (colorB == colorJ))) + { + product = colorA; + } + else + { + product = INTERPOLATE8(colorA, colorB); + } + + if(((colorA == colorG) && (colorC == colorO)) || + ((colorA == colorB) && (colorA == colorH) && + (colorG != colorC) && (colorC == colorM))) + { + product1 = colorA; + } + else + { + product1 = INTERPOLATE8(colorA, colorC); + } + product2 = colorA; + } + else + if((colorB == colorC) && (colorA != colorD)) + { + if(((colorB == colorF) && (colorA == colorH)) || + ((colorB == colorE) && (colorB == colorD) && + (colorA != colorF) && (colorA == colorI))) + { + product = colorB; + } + else + { + product = INTERPOLATE8(colorA, colorB); + } + + if(((colorC == colorH) && (colorA == colorF)) || + ((colorC == colorG) && (colorC == colorD) && + (colorA != colorH) && (colorA == colorI))) + { + product1 = colorC; + } + else + { + product1=INTERPOLATE8(colorA, colorC); + } + product2 = colorB; + } + else + if((colorA == colorD) && (colorB == colorC)) + { + if (colorA == colorB) + { + product = colorA; + product1 = colorA; + product2 = colorA; + } + else + { + register int r = 0; + product1 = INTERPOLATE8(colorA, colorC); + product = INTERPOLATE8(colorA, colorB); + + r += GetResult1 (colorA&0x00FFFFFF, colorB&0x00FFFFFF, colorG&0x00FFFFFF, colorE&0x00FFFFFF, colorI&0x00FFFFFF); + r += GetResult2 (colorB&0x00FFFFFF, colorA&0x00FFFFFF, colorK&0x00FFFFFF, colorF&0x00FFFFFF, colorJ&0x00FFFFFF); + r += GetResult2 (colorB&0x00FFFFFF, colorA&0x00FFFFFF, colorH&0x00FFFFFF, colorN&0x00FFFFFF, colorM&0x00FFFFFF); + r += GetResult1 (colorA&0x00FFFFFF, colorB&0x00FFFFFF, colorL&0x00FFFFFF, colorO&0x00FFFFFF, colorP&0x00FFFFFF); + + if (r > 0) + product2 = colorA; + else + if (r < 0) + product2 = colorB; + else + { + product2 = Q_INTERPOLATE8(colorA, colorB, colorC, colorD); + } + } + } + else + { + product2 = Q_INTERPOLATE8(colorA, colorB, colorC, colorD); + + if ((colorA == colorC) && (colorA == colorF) && + (colorB != colorE) && (colorB == colorJ)) + { + product = colorA; + } + else + if ((colorB == colorE) && (colorB == colorD) && (colorA != colorF) && (colorA == colorI)) + { + product = colorB; + } + else + { + product = INTERPOLATE8(colorA, colorB); + } + + if ((colorA == colorB) && (colorA == colorH) && + (colorG != colorC) && (colorC == colorM)) + { + product1 = colorA; + } + else + if ((colorC == colorG) && (colorC == colorD) && + (colorA != colorH) && (colorA == colorI)) + { + product1 = colorC; + } + else + { + product1 = INTERPOLATE8(colorA, colorC); + } + } + +////////////////////////// + + *dP=colorA; + *(dP+1)=product; + *(dP+(srcPitchHalf))=product1; + *(dP+1+(srcPitchHalf))=product2; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +//////////////////////////////////////////////////////////////////////// + +void SuperEagle_ex8(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch<<1; + DWORD srcPitchHalf = srcPitch>>1; + int finWidth = srcPitch>>2; + DWORD line; + DWORD *dP; + DWORD *bP; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA1, colorA2, + colorB1, colorB2, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + finalw=width<<1; + finalh=height<<1; + + line = 0; + + { + for (; height; height-=1) + { + bP = (DWORD *)srcPtr; + dP = (DWORD *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { + if(finish==finWidth) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) {iYA=0;} + else {iYA=finWidth;} + if(height>4) {iYB=finWidth;iYC=srcPitchHalf;} + else + if(height>3) {iYB=finWidth;iYC=finWidth;} + else {iYB=0;iYC=0;} + + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + + if(color2 == color6 && color5 != color3) + { + product1b = product2a = color2; + if((color1 == color2) || + (color6 == colorB2)) + { + product1a = INTERPOLATE8(color2, color5); + product1a = INTERPOLATE8(color2, product1a); + } + else + { + product1a = INTERPOLATE8(color5, color6); + } + + if((color6 == colorS2) || + (color2 == colorA1)) + { + product2b = INTERPOLATE8(color2, color3); + product2b = INTERPOLATE8(color2, product2b); + } + else + { + product2b = INTERPOLATE8(color2, color3); + } + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1a = color5; + + if ((colorB1 == color5) || + (color3 == colorS1)) + { + product1b = INTERPOLATE8(color5, color6); + product1b = INTERPOLATE8(color5, product1b); + } + else + { + product1b = INTERPOLATE8(color5, color6); + } + + if ((color3 == colorA2) || + (color4 == color5)) + { + product2a = INTERPOLATE8(color5, color2); + product2a = INTERPOLATE8(color5, product2a); + } + else + { + product2a = INTERPOLATE8(color2, color3); + } + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color1&0x00ffffff), (colorA1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color4&0x00ffffff), (colorB1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorA2&0x00ffffff), (colorS1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorB2&0x00ffffff), (colorS2&0x00ffffff)); + + if (r > 0) + { + product1b = product2a = color2; + product1a = product2b = INTERPOLATE8(color5, color6); + } + else + if (r < 0) + { + product2b = product1a = color5; + product1b = product2a = INTERPOLATE8(color5, color6); + } + else + { + product2b = product1a = color5; + product1b = product2a = color2; + } + } + else + { + product2b = product1a = INTERPOLATE8(color2, color6); + product2b = Q_INTERPOLATE8(color3, color3, color3, product2b); + product1a = Q_INTERPOLATE8(color5, color5, color5, product1a); + + product2a = product1b = INTERPOLATE8(color5, color3); + product2a = Q_INTERPOLATE8(color2, color2, color2, product2a); + product1b = Q_INTERPOLATE8(color6, color6, color6, product1b); + } + +//////////////////////////////// + + *dP=product1a; + *(dP+1)=product1b; + *(dP+(srcPitchHalf))=product2a; + *(dP+1+(srcPitchHalf))=product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +///////////////////////// + +//#include + +static __inline void scale2x_32_def_whole(uint32_t* dst0, uint32_t* dst1, const uint32_t* src0, const uint32_t* src1, const uint32_t* src2, unsigned count) +{ + + //assert(count >= 2); + + // first pixel + if (src0[0] != src2[0] && src1[0] != src1[1]) { + dst0[0] = src1[0] == src0[0] ? src0[0] : src1[0]; + dst0[1] = src1[1] == src0[0] ? src0[0] : src1[0]; + dst1[0] = src1[0] == src2[0] ? src2[0] : src1[0]; + dst1[1] = src1[1] == src2[0] ? src2[0] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + } + ++src0; + ++src1; + ++src2; + dst0 += 2; + dst1 += 2; + + // central pixels + count -= 2; + while (count) { + if (src0[0] != src2[0] && src1[-1] != src1[1]) { + dst0[0] = src1[-1] == src0[0] ? src0[0] : src1[0]; + dst0[1] = src1[1] == src0[0] ? src0[0] : src1[0]; + dst1[0] = src1[-1] == src2[0] ? src2[0] : src1[0]; + dst1[1] = src1[1] == src2[0] ? src2[0] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + } + + ++src0; + ++src1; + ++src2; + dst0 += 2; + dst1 += 2; + --count; + } + + // last pixel + if (src0[0] != src2[0] && src1[-1] != src1[0]) { + dst0[0] = src1[-1] == src0[0] ? src0[0] : src1[0]; + dst0[1] = src1[0] == src0[0] ? src0[0] : src1[0]; + dst1[0] = src1[-1] == src2[0] ? src2[0] : src1[0]; + dst1[1] = src1[0] == src2[0] ? src2[0] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + } +} + +void Scale2x_ex8(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstPtr, int width, int height) +{ + //const int srcpitch = srcPitch; + const int dstPitch = srcPitch<<1; + + int count = height; + + finalw=width<<1; + finalh=height<<1; + + uint32_t *dst0 = (uint32_t *)dstPtr; + uint32_t *dst1 = dst0 + (dstPitch >> 2); + + uint32_t *src0 = (uint32_t *)srcPtr; + uint32_t *src1 = src0 + (srcPitch >> 2); + uint32_t *src2 = src1 + (srcPitch >> 2); + scale2x_32_def_whole(dst0, dst1, src0, src0, src1, width); + + count -= 2; + while(count) { + dst0 += dstPitch >> 1; + dst1 += dstPitch >> 1; + scale2x_32_def_whole(dst0, dst1, src0, src0, src1, width); + src0 = src1; + src1 = src2; + src2 += srcPitch >> 2; + --count; + } + dst0 += dstPitch >> 1; + dst1 += dstPitch >> 1; + scale2x_32_def_whole(dst0, dst1, src0, src1, src1, width); + +} + +//////////////////////////////////////////////////////////////////////// + +static __inline void scale3x_32_def_whole(uint32_t* dst0, uint32_t* dst1, uint32_t* dst2, const uint32_t* src0, const uint32_t* src1, const uint32_t* src2, unsigned count) +{ + //assert(count >= 2); + + //first pixel + if (src0[0] != src2[0] && src1[0] != src1[1]) { + dst0[0] = src1[0]; + dst0[1] = (src1[0] == src0[0] && src1[0] != src0[1]) || (src1[1] == src0[0] && src1[0] != src0[0]) ? src0[0] : src1[0]; + dst0[2] = src1[1] == src0[0] ? src1[1] : src1[0]; + dst1[0] = (src1[0] == src0[0] && src1[0] != src2[0]) || (src1[0] == src2[0] && src1[0] != src0[0]) ? src1[0] : src1[0]; + dst1[1] = src1[0]; + dst1[2] = (src1[1] == src0[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src0[1]) ? src1[1] : src1[0]; + dst2[0] = src1[0]; + dst2[1] = (src1[0] == src2[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src2[0]) ? src2[0] : src1[0]; + dst2[2] = src1[1] == src2[0] ? src1[1] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst0[2] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + dst1[2] = src1[0]; + dst2[0] = src1[0]; + dst2[1] = src1[0]; + dst2[2] = src1[0]; + } + ++src0; + ++src1; + ++src2; + dst0 += 3; + dst1 += 3; + dst2 += 3; + + //central pixels + count -= 2; + while (count) { + if (src0[0] != src2[0] && src1[-1] != src1[1]) { + dst0[0] = src1[-1] == src0[0] ? src1[-1] : src1[0]; + dst0[1] = (src1[-1] == src0[0] && src1[0] != src0[1]) || (src1[1] == src0[0] && src1[0] != src0[-1]) ? src0[0] : src1[0]; + dst0[2] = src1[1] == src0[0] ? src1[1] : src1[0]; + dst1[0] = (src1[-1] == src0[0] && src1[0] != src2[-1]) || (src1[-1] == src2[0] && src1[0] != src0[-1]) ? src1[-1] : src1[0]; + dst1[1] = src1[0]; + dst1[2] = (src1[1] == src0[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src0[1]) ? src1[1] : src1[0]; + dst2[0] = src1[-1] == src2[0] ? src1[-1] : src1[0]; + dst2[1] = (src1[-1] == src2[0] && src1[0] != src2[1]) || (src1[1] == src2[0] && src1[0] != src2[-1]) ? src2[0] : src1[0]; + dst2[2] = src1[1] == src2[0] ? src1[1] : src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst0[2] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + dst1[2] = src1[0]; + dst2[0] = src1[0]; + dst2[1] = src1[0]; + dst2[2] = src1[0]; + } + + ++src0; + ++src1; + ++src2; + dst0 += 3; + dst1 += 3; + dst2 += 3; + --count; + } + + // last pixel + if (src0[0] != src2[0] && src1[-1] != src1[0]) { + dst0[0] = src1[-1] == src0[0] ? src1[-1] : src1[0]; + dst0[1] = (src1[-1] == src0[0] && src1[0] != src0[0]) || (src1[0] == src0[0] && src1[0] != src0[-1]) ? src0[0] : src1[0]; + dst0[2] = src1[0]; + dst1[0] = (src1[-1] == src0[0] && src1[0] != src2[-1]) || (src1[-1] == src2[0] && src1[0] != src0[-1]) ? src1[-1] : src1[0]; + dst1[1] = src1[0]; + dst1[2] = (src1[0] == src0[0] && src1[0] != src2[0]) || (src1[0] == src2[0] && src1[0] != src0[0]) ? src1[0] : src1[0]; + dst2[0] = src1[-1] == src2[0] ? src1[-1] : src1[0]; + dst2[1] = (src1[-1] == src2[0] && src1[0] != src2[0]) || (src1[0] == src2[0] && src1[0] != src2[-1]) ? src2[0] : src1[0]; + dst2[2] = src1[0]; + } else { + dst0[0] = src1[0]; + dst0[1] = src1[0]; + dst0[2] = src1[0]; + dst1[0] = src1[0]; + dst1[1] = src1[0]; + dst1[2] = src1[0]; + dst2[0] = src1[0]; + dst2[1] = src1[0]; + dst2[2] = src1[0]; + } +} + + +void Scale3x_ex8(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstPtr, int width, int height) +{ + int count = height; + + int dstPitch = srcPitch*3; + int dstRowPixels = dstPitch>>2; + + finalw=width*3; + finalh=height*3; + + uint32_t *dst0 = (uint32_t *)dstPtr; + uint32_t *dst1 = dst0 + dstRowPixels; + uint32_t *dst2 = dst1 + dstRowPixels; + + uint32_t *src0 = (uint32_t *)srcPtr; + uint32_t *src1 = src0 + (srcPitch >> 2); + uint32_t *src2 = src1 + (srcPitch >> 2); + scale3x_32_def_whole(dst0, dst1, dst2, src0, src0, src2, width); + + count -= 2; + while(count) { + dst0 += dstRowPixels*3; + dst1 += dstRowPixels*3; + dst2 += dstRowPixels*3; + + scale3x_32_def_whole(dst0, dst1, dst2, src0, src1, src2, width); + src0 = src1; + src1 = src2; + src2 += srcPitch >> 2; + --count; + } + + dst0 += dstRowPixels*3; + dst1 += dstRowPixels*3; + dst2 += dstRowPixels*3; + + scale3x_32_def_whole(dst0, dst1, dst2, src0, src1, src1, width); +} + + +//////////////////////////////////////////////////////////////////////// + +#ifndef MAX +#define MAX(a,b) (((a) > (b)) ? (a) : (b)) +#define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#endif + + +//////////////////////////////////////////////////////////////////////// +// X STUFF :) +//////////////////////////////////////////////////////////////////////// + + +static Cursor cursor; +XVisualInfo vi; +static XVisualInfo *myvisual; +Display *display; +static Colormap colormap; +Window window; +static GC hGC; +static XImage * Ximage; +static XvImage * XCimage; +static XImage * XFimage; +static XImage * XPimage=0 ; +char * Xpixels; +char * pCaptionText; + +static int fx=0; + + +static Atom xv_intern_atom_if_exists( Display *display, char const * atom_name ) +{ + XvAttribute * attributes; + int attrib_count,i; + Atom xv_atom = None; + + attributes = XvQueryPortAttributes( display, xv_port, &attrib_count ); + if( attributes!=NULL ) + { + for ( i = 0; i < attrib_count; ++i ) + { + if ( strcmp(attributes[i].name, atom_name ) == 0 ) + { + xv_atom = XInternAtom( display, atom_name, False ); + break; // found what we want, break out + } + } + XFree( attributes ); + } + + return xv_atom; +} + + + +// close display + +void DestroyDisplay(void) +{ + if(display) + { + XFreeColormap(display, colormap); + if(hGC) + { + XFreeGC(display,hGC); + hGC = 0; + } + if(Ximage) + { + XDestroyImage(Ximage); + Ximage=0; + } + if(XCimage) + { + XFree(XCimage); + XCimage=0; + } + if(XFimage) + { + XDestroyImage(XFimage); + XFimage=0; + } + + XShmDetach(display,&shminfo); + shmdt(shminfo.shmaddr); + shmctl(shminfo.shmid,IPC_RMID,NULL); + + Atom atom_vsync = xv_intern_atom_if_exists(display, "XV_SYNC_TO_VBLANK"); + if (atom_vsync != None) { + XvSetPortAttribute(display, xv_port, atom_vsync, xv_vsync); + } + + XSync(display,False); + + XCloseDisplay(display); + } +} + +static int depth=0; +int root_window_id=0; + + +// Create display + +void CreateDisplay(void) +{ + XSetWindowAttributes winattr; + int myscreen; + Screen * screen; + XEvent event; + XSizeHints hints; + XWMHints wm_hints; + MotifWmHints mwmhints; + Atom mwmatom; + + Atom delwindow; + + XGCValues gcv; + int i; + + int ret, j, p; + int formats; + unsigned int p_num_adaptors=0, p_num_ports=0; + + XvAdaptorInfo *ai; + XvImageFormatValues *fo; + + // Open display + display = XOpenDisplay(NULL); + + if (!display) + { + fprintf (stderr,"Failed to open display!!!\n"); + DestroyDisplay(); + return; + } + + myscreen=DefaultScreen(display); + + // desktop fullscreen switch + if (!iWindowMode) fx = 1; + + screen=DefaultScreenOfDisplay(display); + + root_window_id=RootWindow(display,DefaultScreen(display)); + + //Look for an Xvideo RGB port + ret = XvQueryAdaptors(display, root_window_id, &p_num_adaptors, &ai); + if (ret != Success) { + if (ret == XvBadExtension) + printf("XvBadExtension returned at XvQueryExtension.\n"); + else + if (ret == XvBadAlloc) + printf("XvBadAlloc returned at XvQueryExtension.\n"); + else + printf("other error happaned at XvQueryAdaptors.\n"); + + exit(-1); + } + + depth = DefaultDepth(display, myscreen); + + for (i = 0; i < p_num_adaptors; i++) { + p_num_ports = ai[i].base_id + ai[i].num_ports; + for (p = ai[i].base_id; p < p_num_ports; p++) { + fo = XvListImageFormats(display, p, &formats); + for (j = 0; j < formats; j++) { + //backup YUV mode + //hmm, should I bother check guid == 55595659-0000-0010-8000-00aa00389b71? + //and check byte order? fo[j].byte_order == LSBFirst +#ifdef __BIG_ENDIAN__ + if ( fo[j].type == XvYUV && fo[j].bits_per_pixel == 16 && fo[j].format == XvPacked && strncmp("YUYV", fo[j].component_order, 5) == 0 ) +#else + if ( fo[j].type == XvYUV && fo[j].bits_per_pixel == 16 && fo[j].format == XvPacked && strncmp("UYVY", fo[j].component_order, 5) == 0 ) +#endif + { + yuv_port = p; + yuv_id = fo[j].id; + } + if (fo[j].type == XvRGB && fo[j].bits_per_pixel == 32) + { + xv_port = p; + xv_id = fo[j].id; + xv_depth = fo[j].depth; + printf("RGB mode found. id: %x, depth: %d\n", xv_id, xv_depth); + + if (xv_depth != depth) { + printf("Warning: Depth does not match screen depth (%d)\n", depth); + } + else { + //break out of loops + j = formats; + p = p_num_ports; + i = p_num_adaptors; + } + } + } + if (fo) + XFree(fo); + } + } + if (p_num_adaptors > 0) + XvFreeAdaptorInfo(ai); + if (xv_port == -1 && yuv_port == -1) + { + printf("RGB & YUV not found. Quitting.\n"); + exit(-1); + } + else if (xv_port == -1 && yuv_port != -1) + { + use_yuv = 1; + printf("RGB not found. Using YUV.\n"); + xv_port = yuv_port; + xv_id = yuv_id; + } + else if (xv_depth && xv_depth != depth && yuv_port != -1) + { + use_yuv = 1; + printf("Acceptable RGB mode not found. Using YUV.\n"); + xv_port = yuv_port; + xv_id = yuv_id; + } + + Atom atom_vsync = xv_intern_atom_if_exists(display, "XV_SYNC_TO_VBLANK"); + if (atom_vsync != None) { + XvGetPortAttribute(display, xv_port, atom_vsync, &xv_vsync); + XvSetPortAttribute(display, xv_port, atom_vsync, 0); + } + +myvisual = 0; + +if(XMatchVisualInfo(display,myscreen, depth, TrueColor, &vi)) + myvisual = &vi; + +if (!myvisual) +{ + fprintf(stderr,"Failed to obtain visual!\n"); + DestroyDisplay(); + return; +} + + if(myvisual->red_mask==0x00007c00 && + myvisual->green_mask==0x000003e0 && + myvisual->blue_mask==0x0000001f) + {iColDepth=15;} + else + if(myvisual->red_mask==0x0000f800 && + myvisual->green_mask==0x000007e0 && + myvisual->blue_mask==0x0000001f) + {iColDepth=16;} + else + if(myvisual->red_mask==0x00ff0000 && + myvisual->green_mask==0x0000ff00 && + myvisual->blue_mask==0x000000ff) + {iColDepth=32;} + else + { + iColDepth=0; +/* fprintf(stderr,"COLOR DEPTH NOT SUPPORTED!\n"); + fprintf(stderr,"r: %08lx\n",myvisual->red_mask); + fprintf(stderr,"g: %08lx\n",myvisual->green_mask); + fprintf(stderr,"b: %08lx\n",myvisual->blue_mask); + DestroyDisplay(); + return;*/ + } + + // pffff... much work for a simple blank cursor... oh, well... + if(iWindowMode) cursor=XCreateFontCursor(display,XC_trek); + else + { + Pixmap p1,p2; + XImage * img; + XColor b,w; + char * idata; + XGCValues GCv; + GC GCc; + + memset(&b,0,sizeof(XColor)); + memset(&w,0,sizeof(XColor)); + idata=(char *)malloc(8); + memset(idata,0,8); + + p1=XCreatePixmap(display,RootWindow(display,myvisual->screen),8,8,1); + p2=XCreatePixmap(display,RootWindow(display,myvisual->screen),8,8,1); + + img = XCreateImage(display,myvisual->visual, + 1,XYBitmap,0,idata,8,8,8,1); + + GCv.function = GXcopy; + GCv.foreground = ~0; + GCv.background = 0; + GCv.plane_mask = AllPlanes; + GCc = XCreateGC(display,p1, + (GCFunction|GCForeground|GCBackground|GCPlaneMask),&GCv); + + XPutImage(display, p1,GCc,img,0,0,0,0,8,8); + XPutImage(display, p2,GCc,img,0,0,0,0,8,8); + XFreeGC(display, GCc); + + cursor = XCreatePixmapCursor(display,p1,p2,&b,&w,0,0); + + XFreePixmap(display,p1); + XFreePixmap(display,p2); + XDestroyImage(img); // will free idata as well + } + + colormap=XCreateColormap(display,root_window_id, + myvisual->visual,AllocNone); + + winattr.background_pixel=0; + winattr.border_pixel=WhitePixelOfScreen(screen); + winattr.bit_gravity=ForgetGravity; + winattr.win_gravity=NorthWestGravity; + winattr.backing_store=NotUseful; + + winattr.override_redirect=False; + winattr.save_under=False; + winattr.event_mask=0; + winattr.do_not_propagate_mask=0; + winattr.colormap=colormap; + winattr.cursor=None; + + window=XCreateWindow(display,root_window_id, + 0,0,iResX,iResY, + 0,myvisual->depth, + InputOutput,myvisual->visual, + CWBorderPixel | CWBackPixel | + CWEventMask | CWDontPropagate | + CWColormap | CWCursor, + &winattr); + + if(!window) + { + fprintf(stderr,"Failed in XCreateWindow()!!!\n"); + DestroyDisplay(); + return; + } + + delwindow = XInternAtom(display,"WM_DELETE_WINDOW",0); + XSetWMProtocols(display, window, &delwindow, 1); + + hints.flags=USPosition|USSize; + hints.base_width = iResX; + hints.base_height = iResY; + + wm_hints.input=1; + wm_hints.flags=InputHint; + + XSetWMHints(display,window,&wm_hints); + XSetWMNormalHints(display,window,&hints); + if(pCaptionText) + XStoreName(display,window,pCaptionText); + else XStoreName(display,window,"P.E.Op.S SoftX PSX Gpu"); + + XDefineCursor(display,window,cursor); + + // hack to get rid of window title bar + if (fx) + { + mwmhints.flags=MWM_HINTS_DECORATIONS; + mwmhints.decorations=0; + mwmatom=XInternAtom(display,"_MOTIF_WM_HINTS",0); + XChangeProperty(display,window,mwmatom,mwmatom,32, + PropModeReplace,(unsigned char *)&mwmhints,4); + } + + // key stuff + XSelectInput(display, + window, + FocusChangeMask | ExposureMask | + KeyPressMask | KeyReleaseMask + ); + + XMapRaised(display,window); + XClearWindow(display,window); + XWindowEvent(display,window,ExposureMask,&event); + + if (fx) // fullscreen + { + XResizeWindow(display,window,screen->width,screen->height); + + hints.min_width = hints.max_width = hints.base_width = screen->width; + hints.min_height= hints.max_height = hints.base_height = screen->height; + + XSetWMNormalHints(display,window,&hints); + + // set the window layer for GNOME + { + XEvent xev; + + memset(&xev, 0, sizeof(xev)); + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = 1; + xev.xclient.message_type = XInternAtom(display, "_NET_WM_STATE", 0); + xev.xclient.window = window; + xev.xclient.format = 32; + xev.xclient.data.l[0] = 1; + xev.xclient.data.l[1] = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", 0); + xev.xclient.data.l[2] = 0; + xev.xclient.data.l[3] = 0; + xev.xclient.data.l[4] = 0; + + XSendEvent(display, root_window_id, 0, + SubstructureRedirectMask | SubstructureNotifyMask, &xev); + } + } + + gcv.graphics_exposures = False; + hGC = XCreateGC(display,window, + GCGraphicsExposures, &gcv); + if(!hGC) + { + fprintf(stderr,"No gfx context!!!\n"); + DestroyDisplay(); + } + + + + Xpixels = (char *)malloc(220*15*4); + memset(Xpixels,255,220*15*4); + XFimage = XCreateImage(display,myvisual->visual, + depth, ZPixmap, 0, + (char *)Xpixels, + 220, 15, + depth>16 ? 32 : 16, + 0); + + Xpixels = (char *)malloc(8*8*4); + memset(Xpixels,0,8*8*4); + XCimage = XvCreateImage(display,xv_port,xv_id, + (char *)Xpixels, 8, 8); + + +/* +Allocate max that could be needed: +Big(est?) PSX res: 640x512 +32bpp (times 4) +2xsai func= 3xwidth,3xheight += approx 11.8mb +*/ +shminfo.shmid = shmget(IPC_PRIVATE, 640*512*4*3*3, IPC_CREAT | 0777); +shminfo.shmaddr = shmat(shminfo.shmid, 0, 0); +shminfo.readOnly = 0; + + if (!XShmAttach(display, &shminfo)) { + printf("XShmAttach failed !\n"); + exit (-1); + } +} + +void (*p2XSaIFunc) (unsigned char *, DWORD, unsigned char *, int, int); +unsigned char *pBackBuffer = 0; + +void BlitScreen32(unsigned char *surf, int32_t x, int32_t y) +{ + unsigned char *pD; + unsigned int startxy; + uint32_t lu; + unsigned short s; + unsigned short row, column; + unsigned short dx = PreviousPSXDisplay.Range.x1; + unsigned short dy = PreviousPSXDisplay.DisplayMode.y; + + int32_t lPitch = PSXDisplay.DisplayMode.x << 2; + + uint32_t *destpix; + + if (PreviousPSXDisplay.Range.y0) // centering needed? + { + memset(surf, 0, (PreviousPSXDisplay.Range.y0 >> 1) * lPitch); + + dy -= PreviousPSXDisplay.Range.y0; + surf += (PreviousPSXDisplay.Range.y0 >> 1) * lPitch; + + memset(surf + dy * lPitch, + 0, ((PreviousPSXDisplay.Range.y0 + 1) >> 1) * lPitch); + } + + if (PreviousPSXDisplay.Range.x0) + { + for (column = 0; column < dy; column++) + { + destpix = (uint32_t *)(surf + (column * lPitch)); + memset(destpix, 0, PreviousPSXDisplay.Range.x0 << 2); + } + surf += PreviousPSXDisplay.Range.x0 << 2; + } + + if (PSXDisplay.RGB24) + { + for (column = 0; column < dy; column++) + { + startxy = ((1024) * (column + y)) + x; + pD = (unsigned char *)&psxVuw[startxy]; + destpix = (uint32_t *)(surf + (column * lPitch)); + for (row = 0; row < dx; row++) + { + lu = *((uint32_t *)pD); + destpix[row] = + 0xff000000 | (RED(lu) << 16) | (GREEN(lu) << 8) | (BLUE(lu)); + pD += 3; + } + } + } + else + { + for (column = 0;column> 7) & 0xf8)) | 0xff000000; + } + } + } +} + +void BlitToYUV(unsigned char * surf,int32_t x,int32_t y) +{ + unsigned char * pD; + unsigned int startxy; + uint32_t lu;unsigned short s; + unsigned short row,column; + unsigned short dx = PreviousPSXDisplay.Range.x1; + unsigned short dy = PreviousPSXDisplay.DisplayMode.y; + int Y,U,V, R,G,B; + + int32_t lPitch = PSXDisplay.DisplayMode.x << 2; + uint32_t *destpix; + + if (PreviousPSXDisplay.Range.y0) // centering needed? + { + for (column = 0; column < (PreviousPSXDisplay.Range.y0 >> 1); column++) + { + destpix = (uint32_t *)(surf + column * lPitch); + for (row = 0; row < dx; row++) + { + destpix[row] = (4 << 24) | (128 << 16) | (4 << 8) | 128; + } + } + + dy -= PreviousPSXDisplay.Range.y0; + surf += (PreviousPSXDisplay.Range.y0 >> 1) * lPitch; + + for (column = 0; column < (PreviousPSXDisplay.Range.y0 + 1) >> 1; column++) + { + destpix = (uint32_t *)(surf + (dy + column) * lPitch); + for (row = 0; row < dx; row++) + { + destpix[row] = (4 << 24) | (128 << 16) | (4 << 8) | 128; + } + } + } + + if (PreviousPSXDisplay.Range.x0) + { + for (column = 0; column < dy; column++) + { + destpix = (uint32_t *)(surf + (column * lPitch)); + for (row = 0; row < PreviousPSXDisplay.Range.x0; row++) + { + destpix[row] = (4 << 24) | (128 << 16) | (4 << 8) | 128; + } + } + surf += PreviousPSXDisplay.Range.x0 << 2; + } + + if (PSXDisplay.RGB24) + { + for (column = 0; column < dy; column++) + { + startxy = (1024 * (column + y)) + x; + pD = (unsigned char *)&psxVuw[startxy]; + destpix = (uint32_t *)(surf + (column * lPitch)); + for (row = 0; row < dx; row++) + { + lu = *((uint32_t *)pD); + + R = RED(lu); + G = GREEN(lu); + B = BLUE(lu); + + Y = min(abs(R * 2104 + G * 4130 + B * 802 + 4096 + 131072) >> 13, 235); + U = min(abs(R * -1214 + G * -2384 + B * 3598 + 4096 + 1048576) >> 13, 240); + V = min(abs(R * 3598 + G * -3013 + B * -585 + 4096 + 1048576) >> 13, 240); + +#ifdef __BIG_ENDIAN__ + destpix[row] = Y << 24 | U << 16 | Y << 8 | V; +#else + destpix[row] = Y << 24 | V << 16 | Y << 8 | U; +#endif + pD += 3; + } + } + } + else + { + for (column = 0; column < dy; column++) + { + startxy = (1024 * (column + y)) + x; + destpix = (uint32_t *)(surf + (column * lPitch)); + for (row = 0; row < dx; row++) + { + s = GETLE16(&psxVuw[startxy++]); + + R = (s << 3) &0xf8; + G = (s >> 2) &0xf8; + B = (s >> 7) &0xf8; + + Y = min(abs(R * 2104 + G * 4130 + B * 802 + 4096 + 131072) >> 13, 235); + U = min(abs(R * -1214 + G * -2384 + B * 3598 + 4096 + 1048576) >> 13, 240); + V = min(abs(R * 3598 + G * -3013 + B * -585 + 4096 + 1048576) >> 13, 240); + +#ifdef __BIG_ENDIAN__ + destpix[row] = Y << 24 | U << 16 | Y << 8 | V; +#else + destpix[row] = Y << 24 | V << 16 | Y << 8 | U; +#endif + } + } + } +} + +//dst will have half the pitch (32bit to 16bit) +void RGB2YUV(uint32_t *s, int width, int height, uint32_t *d) +{ + int x,y; + int R,G,B, Y1,Y2,U,V; + + for (y=0; y>1; x++) { + R = (*s >> 16) & 0xff; + G = (*s >> 8) & 0xff; + B = *s & 0xff; + s++; + + Y1 = min(abs(R * 2104 + G * 4130 + B * 802 + 4096 + 131072) >> 13, 235); + U = min(abs(R * -1214 + G * -2384 + B * 3598 + 4096 + 1048576) >> 13, 240); + V = min(abs(R * 3598 + G * -3013 + B * -585 + 4096 + 1048576) >> 13, 240); + + R = (*s >> 16) & 0xff; + G = (*s >> 8) & 0xff; + B = *s & 0xff; + s++; + + Y2 = min(abs(R * 2104 + G * 4130 + B * 802 + 4096 + 131072) >> 13, 235); + +#ifdef __BIG_ENDIAN__ + *d = V | Y2 << 8 | U << 16 | Y1 << 24; +#else + *d = U | Y1 << 8 | V << 16 | Y2 << 24; +#endif + d++; + } + } +} + +extern time_t tStart; + +//Note: dest x,y,w,h are both input and output variables +inline void MaintainAspect(unsigned int *dx,unsigned int *dy,unsigned int *dw,unsigned int *dh) +{ + //Currently just 4/3 aspect ratio + int t; + + if (*dw * 3 > *dh * 4) { + t = *dh * 4.0f / 3; //new width aspect + *dx = (*dw - t) / 2; //centering + *dw = t; + } else { + t = *dw * 3.0f / 4; + *dy = (*dh - t) / 2; + *dh = t; + } +} + +void DoBufferSwap(void) +{ + Screen *screen; + Window _dw; + XvImage *xvi; + unsigned int dstx, dsty, srcy = 0; + unsigned int _d, _w, _h; //don't care about _d + + finalw = PSXDisplay.DisplayMode.x; + finalh = PSXDisplay.DisplayMode.y; + + if (finalw == 0 || finalh == 0) + return; + + XSync(display,False); + + if(use_yuv) { + if (iUseNoStretchBlt==0 || finalw > 320 || finalh > 256) { + BlitToYUV((unsigned char *)shminfo.shmaddr, PSXDisplay.DisplayPosition.x, PSXDisplay.DisplayPosition.y); + finalw <<= 1; + } else { + BlitScreen32((unsigned char *)pBackBuffer, PSXDisplay.DisplayPosition.x, PSXDisplay.DisplayPosition.y); + p2XSaIFunc(pBackBuffer, finalw<<2, (unsigned char *)pSaIBigBuff,finalw,finalh); + RGB2YUV( (uint32_t*)pSaIBigBuff, finalw, finalh, (uint32_t*)shminfo.shmaddr); + } + } else if(iUseNoStretchBlt==0 || finalw > 320 || finalh > 256) { + BlitScreen32((unsigned char *)shminfo.shmaddr, PSXDisplay.DisplayPosition.x, PSXDisplay.DisplayPosition.y); + } else { + BlitScreen32((unsigned char *)pBackBuffer, PSXDisplay.DisplayPosition.x, PSXDisplay.DisplayPosition.y); + p2XSaIFunc(pBackBuffer, finalw<<2, (unsigned char *)shminfo.shmaddr,finalw,finalh); + } + + XGetGeometry(display, window, &_dw, (int *)&_d, (int *)&_d, &_w, &_h, &_d, &_d); + if (use_yuv) { + xvi = XvShmCreateImage(display, yuv_port, yuv_id, 0, finalw, finalh, &shminfo); + } else + xvi = XvShmCreateImage(display, xv_port, xv_id, 0, finalw, finalh, &shminfo); + + xvi->data = shminfo.shmaddr; + + screen=DefaultScreenOfDisplay(display); + //screennum = DefaultScreen(display); + + if (!iWindowMode) { + _w = screen->width; + _h = screen->height; + } + + dstx = 0; + dsty = 0; + + if (iMaintainAspect) + MaintainAspect(&dstx, &dsty, &_w, &_h); + + if (ulKeybits&KEY_SHOWFPS) //to avoid flicker, don't paint overtop FPS bar + { + srcy = 15 * finalh / _h; + dsty += 15; + } + + XvShmPutImage(display, xv_port, window, hGC, xvi, + 0,srcy, //src x,y + finalw,finalh, //src w,h + dstx,dsty, //dst x,y + _w,_h, //dst w,h + 1 + ); + + if(ulKeybits&KEY_SHOWFPS) //DisplayText(); // paint menu text + { + if(szDebugText[0] && ((time(NULL) - tStart) < 2)) + { + strcpy(szDispBuf,szDebugText); + } + else + { + szDebugText[0]=0; + strcat(szDispBuf,szMenuBuf); + } + + //XPutImage(display,window,hGC, XFimage, + // 0, 0, 0, 0, 220,15); + XFree(xvi); + xvi = XvCreateImage(display, xv_port, xv_id, XFimage->data, 220, 15); + XvPutImage(display, xv_port, window, hGC, xvi, + 0,0, //src x,y + 220,15, //src w,h + 0,0, //dst x,y + 220,15 //dst w,h + ); + + XDrawString(display,window,hGC,2,13,szDispBuf,strlen(szDispBuf)); + } + + //if(XPimage) DisplayPic(); + + + XFree(xvi); +} + +void DoClearScreenBuffer(void) // CLEAR DX BUFFER +{ + Window _dw; + unsigned int _d, _w, _h; //don't care about _d + + XGetGeometry(display, window, &_dw, (int *)&_d, (int *)&_d, &_w, &_h, &_d, &_d); + + XvPutImage(display, xv_port, window, hGC, XCimage, + 0, 0, 8, 8, 0, 0, _w, _h); + //XSync(display,False); +} + +void DoClearFrontBuffer(void) // CLEAR DX BUFFER +{/* + XPutImage(display,window,hGC, XCimage, + 0, 0, 0, 0, iResX, iResY); + XSync(display,False);*/ +} + +int Xinitialize() +{ + iDesktopCol=32; + + + if(iUseNoStretchBlt>0) + { + pBackBuffer=(unsigned char *)malloc(640*512*sizeof(uint32_t)); + memset(pBackBuffer,0,640*512*sizeof(uint32_t)); + if (use_yuv) { + pSaIBigBuff=malloc(640*512*4*3*3); + memset(pSaIBigBuff,0,640*512*4*3*3); + } + } + + p2XSaIFunc=NULL; + + if(iUseNoStretchBlt==1) + { + p2XSaIFunc=Std2xSaI_ex8; + } + + if(iUseNoStretchBlt==2) + { + p2XSaIFunc=Super2xSaI_ex8; + } + + if(iUseNoStretchBlt==3) + { + p2XSaIFunc=SuperEagle_ex8; + } + + if(iUseNoStretchBlt==4) + { + p2XSaIFunc=Scale2x_ex8; + } + if(iUseNoStretchBlt==5) + { + p2XSaIFunc=Scale3x_ex8; + } + if(iUseNoStretchBlt==6) + { + p2XSaIFunc=hq2x_32; + } + if(iUseNoStretchBlt==7) + { + p2XSaIFunc=hq3x_32; + } + + bUsingTWin=FALSE; + + InitMenu(); + + bIsFirstFrame = FALSE; // done + + if(iShowFPS) + { + iShowFPS=0; + ulKeybits|=KEY_SHOWFPS; + szDispBuf[0]=0; + BuildDispMenu(0); + } + + return 0; +} + +void Xcleanup() // X CLEANUP +{ + CloseMenu(); + + if(iUseNoStretchBlt>0) + { + if(pBackBuffer) free(pBackBuffer); + pBackBuffer=0; + if(pSaIBigBuff) free(pSaIBigBuff); + pSaIBigBuff=0; + } +} + +unsigned long ulInitDisplay(void) +{ + CreateDisplay(); // x stuff + Xinitialize(); // init x + return (unsigned long)display; +} + +void CloseDisplay(void) +{ + Xcleanup(); // cleanup dx + DestroyDisplay(); +} + +void CreatePic(unsigned char * pMem) +{ + unsigned char * p=(unsigned char *)malloc(128*96*4); + unsigned char * ps; int x,y; + + ps=p; + + if(iDesktopCol==16) + { + unsigned short s; + for(y=0;y<96;y++) + { + for(x=0;x<128;x++) + { + s=(*(pMem+0))>>3; + s|=((*(pMem+1))&0xfc)<<3; + s|=((*(pMem+2))&0xf8)<<8; + pMem+=3; + *((unsigned short *)(ps+y*256+x*2))=s; + } + } + } + else + if(iDesktopCol==15) + { + unsigned short s; + for(y=0;y<96;y++) + { + for(x=0;x<128;x++) + { + s=(*(pMem+0))>>3; + s|=((*(pMem+1))&0xfc)<<2; + s|=((*(pMem+2))&0xf8)<<7; + pMem+=3; + *((unsigned short *)(ps+y*256+x*2))=s; + } + } + } + else + if(iDesktopCol==32) + { + uint32_t l; + for(y=0;y<96;y++) + { + for(x=0;x<128;x++) + { + l= *(pMem+0); + l|=(*(pMem+1))<<8; + l|=(*(pMem+2))<<16; + pMem+=3; + *((uint32_t *)(ps+y*512+x*4))=l; + } + } + } + + XPimage = XCreateImage(display,myvisual->visual, + depth, ZPixmap, 0, + (char *)p, + 128, 96, + depth>16 ? 32 : 16, + 0); +} + +void DestroyPic(void) +{ + if(XPimage) + { /* + XPutImage(display,window,hGC, XCimage, + 0, 0, 0, 0, iResX, iResY);*/ + XDestroyImage(XPimage); + XPimage=0; + } +} + +void DisplayPic(void) +{ + XPutImage(display,window,hGC, XPimage, + 0, 0, iResX-128, 0,128,96); +} + +void ShowGpuPic(void) +{ +} + +void ShowTextGpuPic(void) +{ +} + +static void hq2x_32_def(uint32_t * dst0, uint32_t * dst1, const uint32_t * src0, const uint32_t * src1, const uint32_t * src2, unsigned count) +{ + static unsigned char cache_vert_mask[640]; + unsigned char cache_horiz_mask = 0; + + unsigned i; + unsigned char mask; + uint32_t c[9]; + + if (src0 == src1) //processing first row + memset(cache_vert_mask, 0, count); + + for(i=0;i0) { + c[0] = src0[-1]; + c[3] = src1[-1]; + c[6] = src2[-1]; + } else { + c[0] = c[1]; + c[3] = c[4]; + c[6] = c[7]; + } + + if (i> 2); + + uint32_t *src0 = (uint32_t *)srcPtr; + uint32_t *src1 = src0 + (srcPitch >> 2); + uint32_t *src2 = src1 + (srcPitch >> 2); + hq2x_32_def(dst0, dst1, src0, src0, src1, width); + + + count -= 2; + while(count) { + dst0 += dstPitch >> 1; //next 2 lines (dstPitch / 4 char per int * 2) + dst1 += dstPitch >> 1; + hq2x_32_def(dst0, dst1, src0, src1, src2, width); + src0 = src1; + src1 = src2; + src2 += srcPitch >> 2; + --count; + } + dst0 += dstPitch >> 1; + dst1 += dstPitch >> 1; + hq2x_32_def(dst0, dst1, src0, src1, src1, width); +} + +static void hq3x_32_def(uint32_t* dst0, uint32_t* dst1, uint32_t* dst2, const uint32_t* src0, const uint32_t* src1, const uint32_t* src2, unsigned count) +{ + static unsigned char cache_vert_mask[640]; + unsigned char cache_horiz_mask = 0; + + unsigned i; + unsigned char mask; + uint32_t c[9]; + + if (src0 == src1) //processing first row + memset(cache_vert_mask, 0, count); + + for(i=0;i0) { + c[0] = src0[-1]; + c[3] = src1[-1]; + c[6] = src2[-1]; + } else { + c[0] = c[1]; + c[3] = c[4]; + c[6] = c[7]; + } + + if (i>2; + + finalw=width*3; + finalh=height*3; + + uint32_t *dst0 = (uint32_t *)dstPtr; + uint32_t *dst1 = dst0 + dstRowPixels; + uint32_t *dst2 = dst1 + dstRowPixels; + + uint32_t *src0 = (uint32_t *)srcPtr; + uint32_t *src1 = src0 + (srcPitch >> 2); + uint32_t *src2 = src1 + (srcPitch >> 2); + hq3x_32_def(dst0, dst1, dst2, src0, src0, src2, width); + + count -= 2; + while(count) { + dst0 += dstRowPixels * 3; + dst1 += dstRowPixels * 3; + dst2 += dstRowPixels * 3; + + hq3x_32_def(dst0, dst1, dst2, src0, src1, src2, width); + src0 = src1; + src1 = src2; + src2 += srcPitch >> 2; + --count; + } + dst0 += dstRowPixels * 3; + dst1 += dstRowPixels * 3; + dst2 += dstRowPixels * 3; + + hq3x_32_def(dst0, dst1, dst2, src0, src1, src1, width); + +} diff --git a/plugins/dfxvideo/draw.h b/plugins/dfxvideo/draw.h new file mode 100644 index 00000000..2454a1f4 --- /dev/null +++ b/plugins/dfxvideo/draw.h @@ -0,0 +1,46 @@ +/*************************************************************************** + draw.h - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _GPU_DRAW_H_ +#define _GPU_DRAW_H_ + +void DoBufferSwap(void); +void DoClearScreenBuffer(void); +void DoClearFrontBuffer(void); +unsigned long ulInitDisplay(void); +void CloseDisplay(void); +void CreatePic(unsigned char * pMem); +void DestroyPic(void); +void DisplayPic(void); +void ShowGpuPic(void); +void ShowTextGpuPic(void); + +typedef struct { +#define MWM_HINTS_DECORATIONS 2 + long flags; + long functions; + long decorations; + long input_mode; +} MotifWmHints; + +#ifdef _WINDOWS +void MoveScanLineArea(HWND hwnd); +#endif + +/////////////////////////////////////////////////////////////////////// + +#endif // _GPU_DRAW_H_ diff --git a/plugins/dfxvideo/externals.h b/plugins/dfxvideo/externals.h new file mode 100644 index 00000000..2c29faf2 --- /dev/null +++ b/plugins/dfxvideo/externals.h @@ -0,0 +1,315 @@ +/*************************************************************************** + externals.h - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define INFO_TW 0 +#define INFO_DRAWSTART 1 +#define INFO_DRAWEND 2 +#define INFO_DRAWOFF 3 + +#define SHADETEXBIT(x) ((x>>24) & 0x1) +#define SEMITRANSBIT(x) ((x>>25) & 0x1) +#define PSXRGB(r,g,b) ((g<<10)|(b<<5)|r) + +#define DATAREGISTERMODES unsigned short + +#define DR_NORMAL 0 +#define DR_VRAMTRANSFER 1 + + +#define GPUSTATUS_ODDLINES 0x80000000 +#define GPUSTATUS_DMABITS 0x60000000 // Two bits +#define GPUSTATUS_READYFORCOMMANDS 0x10000000 +#define GPUSTATUS_READYFORVRAM 0x08000000 +#define GPUSTATUS_IDLE 0x04000000 +#define GPUSTATUS_DISPLAYDISABLED 0x00800000 +#define GPUSTATUS_INTERLACED 0x00400000 +#define GPUSTATUS_RGB24 0x00200000 +#define GPUSTATUS_PAL 0x00100000 +#define GPUSTATUS_DOUBLEHEIGHT 0x00080000 +#define GPUSTATUS_WIDTHBITS 0x00070000 // Three bits +#define GPUSTATUS_MASKENABLED 0x00001000 +#define GPUSTATUS_MASKDRAWN 0x00000800 +#define GPUSTATUS_DRAWINGALLOWED 0x00000400 +#define GPUSTATUS_DITHER 0x00000200 + +#define GPUIsBusy (lGPUstatusRet &= ~GPUSTATUS_IDLE) +#define GPUIsIdle (lGPUstatusRet |= GPUSTATUS_IDLE) + +#define GPUIsNotReadyForCommands (lGPUstatusRet &= ~GPUSTATUS_READYFORCOMMANDS) +#define GPUIsReadyForCommands (lGPUstatusRet |= GPUSTATUS_READYFORCOMMANDS) + +#define __X11_C_ +//X11 render +#define __inline inline +#define CALLBACK + +#include +#include +#include +#include +#ifndef _MACGL +#include +#include +#endif +#include +#include +#include + +///////////////////////////////////////////////////////////////////////////// + +typedef struct VRAMLOADTTAG +{ + short x; + short y; + short Width; + short Height; + short RowsRemaining; + short ColsRemaining; + unsigned short *ImagePtr; +} VRAMLoad_t; + +///////////////////////////////////////////////////////////////////////////// + +typedef struct PSXPOINTTAG +{ + int32_t x; + int32_t y; +} PSXPoint_t; + +typedef struct PSXSPOINTTAG +{ + short x; + short y; +} PSXSPoint_t; + +typedef struct PSXRECTTAG +{ + short x0; + short x1; + short y0; + short y1; +} PSXRect_t; + +// linux defines for some windows stuff + +#define FALSE 0 +#define TRUE 1 +#define BOOL unsigned short +#define LOWORD(l) ((unsigned short)(l)) +#define HIWORD(l) ((unsigned short)(((uint32_t)(l) >> 16) & 0xFFFF)) +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#define DWORD uint32_t +#define __int64 long long int + +typedef struct RECTTAG +{ + int left; + int top; + int right; + int bottom; +}RECT; + + + +///////////////////////////////////////////////////////////////////////////// + +typedef struct TWINTAG +{ + PSXRect_t Position; +} TWin_t; + +///////////////////////////////////////////////////////////////////////////// + +typedef struct PSXDISPLAYTAG +{ + PSXPoint_t DisplayModeNew; + PSXPoint_t DisplayMode; + PSXPoint_t DisplayPosition; + PSXPoint_t DisplayEnd; + + int32_t Double; + int32_t Height; + int32_t PAL; + int32_t InterlacedNew; + int32_t Interlaced; + int32_t RGB24New; + int32_t RGB24; + PSXSPoint_t DrawOffset; + int32_t Disabled; + PSXRect_t Range; + +} PSXDisplay_t; + +///////////////////////////////////////////////////////////////////////////// + +// draw.c + +#ifndef _IN_DRAW + +extern char * pCaptionText; + +extern int iResX; +extern int iResY; +extern int32_t GlobalTextAddrX,GlobalTextAddrY,GlobalTextTP; +extern int32_t GlobalTextREST,GlobalTextABR,GlobalTextPAGE; +extern short ly0,lx0,ly1,lx1,ly2,lx2,ly3,lx3; +extern long lLowerpart; +extern BOOL bIsFirstFrame; +extern int iWinSize; +extern BOOL bCheckMask; +extern unsigned short sSetMask; +extern unsigned long lSetMask; +extern BOOL bDeviceOK; +extern short g_m1; +extern short g_m2; +extern short g_m3; +extern short DrawSemiTrans; +extern int iUseGammaVal; +extern int iMaintainAspect; +extern int iDesktopCol; +extern int iUseNoStretchBlt; +extern int iShowFPS; +extern int iFastFwd; +extern int iDebugMode; +extern int iFVDisplay; +extern PSXPoint_t ptCursorPoint[]; +extern unsigned short usCursorActive; + + +#endif + +// prim.c + +#ifndef _IN_PRIMDRAW + +extern BOOL bUsingTWin; +extern TWin_t TWin; +//extern unsigned long clutid; +extern void (*primTableJ[256])(unsigned char *); +extern void (*primTableSkip[256])(unsigned char *); +extern unsigned short usMirror; +extern int iDither; +extern uint32_t dwCfgFixes; +extern uint32_t dwActFixes; +extern uint32_t dwEmuFixes; +extern int iUseFixes; +extern int iUseDither; +extern BOOL bDoVSyncUpdate; +extern int32_t drawX; +extern int32_t drawY; +extern int32_t drawW; +extern int32_t drawH; + +#endif + +// gpu.c + +#ifndef _IN_GPU + +extern VRAMLoad_t VRAMWrite; +extern VRAMLoad_t VRAMRead; +extern DATAREGISTERMODES DataWriteMode; +extern DATAREGISTERMODES DataReadMode; +extern int iColDepth; +extern int iWindowMode; +extern char szDispBuf[]; +extern char szMenuBuf[]; +extern char szDebugText[]; +extern short sDispWidths[]; +extern BOOL bDebugText; +//extern unsigned int iMaxDMACommandCounter; +//extern unsigned long dwDMAChainStop; +extern PSXDisplay_t PSXDisplay; +extern PSXDisplay_t PreviousPSXDisplay; +extern BOOL bSkipNextFrame; +extern long lGPUstatusRet; +//extern long drawingLines; +extern unsigned char * psxVSecure; +extern unsigned char * psxVub; +extern signed char * psxVsb; +extern unsigned short * psxVuw; +extern signed short * psxVsw; +extern uint32_t * psxVul; +extern int32_t * psxVsl; +extern unsigned short * psxVuw_eom; +extern BOOL bChangeWinMode; +extern long lSelectedSlot; +extern BOOL bInitCap; +extern DWORD dwLaceCnt; +extern uint32_t lGPUInfoVals[]; +extern uint32_t ulStatusControl[]; + +#endif + +// menu.c + +#ifndef _IN_MENU + +extern uint32_t dwCoreFlags; + +#endif + +// key.c + +#ifndef _IN_KEY + +extern unsigned long ulKeybits; + +#endif + +// fps.c + +#ifndef _IN_FPS + +extern int UseFrameLimit; +extern int UseFrameSkip; +extern float fFrameRate; +extern int iFrameLimit; +extern float fFrameRateHz; +extern float fps_skip; +extern float fps_cur; + +#endif + +// key.c + +#ifndef _IN_KEY + +#endif + +// cfg.c + +#ifndef _IN_CFG + +extern char * pConfigFile; + +#endif + +// zn.c + +#ifndef _IN_ZN + +extern uint32_t dwGPUVersion; +extern int iGPUHeight; +extern int iGPUHeightMask; +extern int GlobalTextIL; +extern int iTileCheat; + +#endif + + diff --git a/plugins/dfxvideo/fps.c b/plugins/dfxvideo/fps.c new file mode 100644 index 00000000..2edcd30b --- /dev/null +++ b/plugins/dfxvideo/fps.c @@ -0,0 +1,357 @@ +/*************************************************************************** + fps.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_FPS + +#include + +#include "externals.h" +#include "fps.h" +#include "gpu.h" + +// FPS stuff +float fFrameRateHz=0; +DWORD dwFrameRateTicks=16; +float fFrameRate; +int iFrameLimit; +int UseFrameLimit=0; +int UseFrameSkip=0; + +// FPS skipping / limit +BOOL bInitCap = TRUE; +float fps_skip = 0; +float fps_cur = 0; + +#define MAXLACE 16 + +void CheckFrameRate(void) +{ + if(UseFrameSkip) // skipping mode? + { + if(!(dwActFixes&0x80)) // not old skipping mode? + { + dwLaceCnt++; // -> store cnt of vsync between frames + if(dwLaceCnt>=MAXLACE && UseFrameLimit) // -> if there are many laces without screen toggling, + { // do std frame limitation + if(dwLaceCnt==MAXLACE) bInitCap=TRUE; + FrameCap(); + } + } + else if(UseFrameLimit) FrameCap(); + calcfps(); // -> calc fps display in skipping mode + } + else // non-skipping mode: + { + if(UseFrameLimit) FrameCap(); // -> do it + if(ulKeybits&KEY_SHOWFPS) calcfps(); // -> and calc fps display + } +} + +#define TIMEBASE 100000 + +unsigned long timeGetTime() +{ + struct timeval tv; + gettimeofday(&tv, 0); // well, maybe there are better ways + return tv.tv_sec * 100000 + tv.tv_usec/10; // to do that, but at least it works +} + +void FrameCap (void) +{ + static unsigned long curticks, lastticks, _ticks_since_last_update; + static unsigned int TicksToWait = 0; + int overslept=0, tickstogo=0; + BOOL Waiting = TRUE; + + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + + if((_ticks_since_last_update > TicksToWait) || + (curticks dwFrameRateTicks) + TicksToWait=0; + else + TicksToWait=dwFrameRateTicks - overslept; + } + else + { + while (Waiting) + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + tickstogo = TicksToWait - _ticks_since_last_update; + if ((_ticks_since_last_update > TicksToWait) || + (curticks < lastticks) || tickstogo < overslept) + { + Waiting = FALSE; + lastticks = curticks; + overslept = _ticks_since_last_update - TicksToWait; + TicksToWait = dwFrameRateTicks - overslept; + return; + } + if (tickstogo >= 200 && !(dwActFixes&16)) + usleep(tickstogo*10 - 200); + } + } + } +} + +#define MAXSKIP 120 + +void FrameSkip(void) +{ + static int iNumSkips=0,iAdditionalSkip=0; // number of additional frames to skip + static DWORD dwLastLace=0; // helper var for frame limitation + static DWORD curticks, lastticks, _ticks_since_last_update; + int tickstogo=0; + static int overslept=0; + + if(!dwLaceCnt) return; // important: if no updatelace happened, we ignore it completely + + if(iNumSkips) // we are in skipping mode? + { + dwLastLace+=dwLaceCnt; // -> calc frame limit helper (number of laces) + bSkipNextFrame = TRUE; // -> we skip next frame + iNumSkips--; // -> ok, one done + } + else // ok, no additional skipping has to be done... + { // we check now, if some limitation is needed, or a new skipping has to get started + DWORD dwWaitTime; + + if(bInitCap || bSkipNextFrame) // first time or we skipped before? + { + if(UseFrameLimit && !bInitCap) // frame limit wanted and not first time called? + { + DWORD dwT=_ticks_since_last_update; // -> that's the time of the last drawn frame + dwLastLace+=dwLaceCnt; // -> and that's the number of updatelace since the start of the last drawn frame + + curticks = timeGetTime(); // -> now we calc the time of the last drawn frame + the time we spent skipping + _ticks_since_last_update= dwT+curticks - lastticks; + + dwWaitTime=dwLastLace*dwFrameRateTicks; // -> and now we calc the time the real psx would have needed + + if(_ticks_since_last_update we were too fast? + { + if((dwWaitTime-_ticks_since_last_update)> // -> some more security, to prevent + (60*dwFrameRateTicks)) // wrong waiting times + _ticks_since_last_update=dwWaitTime; + + while(_ticks_since_last_update loop until we have reached the real psx time + { // (that's the additional limitation, yup) + curticks = timeGetTime(); + _ticks_since_last_update = dwT+curticks - lastticks; + } + } + else // we were still too slow ?!!? + { + if(iAdditionalSkip well, somewhen we really have to stop skipping on very slow systems + { + iAdditionalSkip++; // -> inc our watchdog var + dwLaceCnt=0; // -> reset lace count + lastticks = timeGetTime(); + return; // -> done, we will skip next frame to get more speed + } + } + } + + bInitCap=FALSE; // -> ok, we have inited the frameskip func + iAdditionalSkip=0; // -> init additional skip + bSkipNextFrame=FALSE; // -> we don't skip the next frame + lastticks = timeGetTime(); // -> we store the start time of the next frame + dwLaceCnt=0; // -> and we start to count the laces + dwLastLace=0; + _ticks_since_last_update=0; + return; // -> done, the next frame will get drawn + } + + bSkipNextFrame=FALSE; // init the frame skip signal to 'no skipping' first + + curticks = timeGetTime(); // get the current time (we are now at the end of one drawn frame) + _ticks_since_last_update = curticks - lastticks; + + dwLastLace=dwLaceCnt; // store curr count (frame limitation helper) + dwWaitTime=dwLaceCnt*dwFrameRateTicks; // calc the 'real psx lace time' + if (dwWaitTime >= overslept) + dwWaitTime-=overslept; + + if(_ticks_since_last_update>dwWaitTime) // hey, we needed way too long for that frame... + { + if(UseFrameLimit) // if limitation, we skip just next frame, + { // and decide after, if we need to do more + iNumSkips=0; + } + else + { + iNumSkips=_ticks_since_last_update/dwWaitTime; // -> calc number of frames to skip to catch up + iNumSkips--; // -> since we already skip next frame, one down + if(iNumSkips>MAXSKIP) iNumSkips=MAXSKIP; // -> well, somewhere we have to draw a line + } + bSkipNextFrame = TRUE; // -> signal for skipping the next frame + } + else // we were faster than real psx? fine :) + if(UseFrameLimit) // frame limit used? so we wait til the 'real psx time' has been reached + { + if(dwLaceCnt>MAXLACE) // -> security check + _ticks_since_last_update=dwWaitTime; + + while(_ticks_since_last_update just do a waiting loop... + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + + tickstogo = dwWaitTime - _ticks_since_last_update; + if (tickstogo-overslept >= 200 && !(dwActFixes&16)) + usleep(tickstogo*10 - 200); + } + } + overslept = _ticks_since_last_update - dwWaitTime; + if (overslept < 0) + overslept = 0; + lastticks = timeGetTime(); // ok, start time of the next frame + } + + dwLaceCnt=0; // init lace counter +} + +void calcfps(void) +{ + static unsigned long curticks,_ticks_since_last_update,lastticks; + static long fps_cnt = 0; + static unsigned long fps_tck = 1; + static long fpsskip_cnt = 0; + static unsigned long fpsskip_tck = 1; + + { + curticks = timeGetTime(); + _ticks_since_last_update=curticks-lastticks; + + if(UseFrameSkip && !UseFrameLimit && _ticks_since_last_update) + fps_skip=min(fps_skip,((float)TIMEBASE/(float)_ticks_since_last_update+1.0f)); + + lastticks = curticks; + } + + if(UseFrameSkip && UseFrameLimit) + { + fpsskip_tck += _ticks_since_last_update; + + if(++fpsskip_cnt==2) + { + fps_skip = (float)2000/(float)fpsskip_tck; + fps_skip +=6.0f; + fpsskip_cnt = 0; + fpsskip_tck = 1; + } + } + + fps_tck += _ticks_since_last_update; + + if(++fps_cnt==20) + { + fps_cur = (float)(TIMEBASE*20)/(float)fps_tck; + + fps_cnt = 0; + fps_tck = 1; + + //if(UseFrameLimit && fps_cur>fFrameRateHz) // optical adjust ;) avoids flickering fps display + //fps_cur=fFrameRateHz; + } + +} + +void PCFrameCap (void) +{ + static unsigned long curticks, lastticks, _ticks_since_last_update; + static unsigned long TicksToWait = 0; + BOOL Waiting = TRUE; + + while (Waiting) + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + if ((_ticks_since_last_update > TicksToWait) || + (curticks < lastticks)) + { + Waiting = FALSE; + lastticks = curticks; + TicksToWait = (TIMEBASE/ (unsigned long)fFrameRateHz); + } + } +} + +void PCcalcfps(void) +{ + static unsigned long curticks,_ticks_since_last_update,lastticks; + static long fps_cnt = 0; + static float fps_acc = 0; + float CurrentFPS=0; + + curticks = timeGetTime(); + _ticks_since_last_update=curticks-lastticks; + if(_ticks_since_last_update) + CurrentFPS=(float)TIMEBASE/(float)_ticks_since_last_update; + else CurrentFPS = 0; + lastticks = curticks; + + fps_acc += CurrentFPS; + + if(++fps_cnt==10) + { + fps_cur = fps_acc / 10; + fps_acc = 0; + fps_cnt = 0; + } + + fps_skip=CurrentFPS+1.0f; +} + +void SetAutoFrameCap(void) +{ + if(iFrameLimit==1) + { + fFrameRateHz = fFrameRate; + dwFrameRateTicks=(TIMEBASE*100 / (unsigned long)(fFrameRateHz*100)); + return; + } + + if(dwActFixes&32) + { + if (PSXDisplay.Interlaced) + fFrameRateHz = PSXDisplay.PAL?50.0f:60.0f; + else fFrameRateHz = PSXDisplay.PAL?25.0f:30.0f; + } + else + { + fFrameRateHz = PSXDisplay.PAL?50.0f:59.94f; + dwFrameRateTicks=(TIMEBASE*100 / (unsigned long)(fFrameRateHz*100)); + } +} + +void SetFPSHandler(void) +{ +} + +void InitFPS(void) +{ + if(!fFrameRate) fFrameRate=200.0f; + if(fFrameRateHz==0) fFrameRateHz=fFrameRate; // set user framerate + dwFrameRateTicks=(TIMEBASE / (unsigned long)fFrameRateHz); +} diff --git a/plugins/dfxvideo/fps.h b/plugins/dfxvideo/fps.h new file mode 100644 index 00000000..ff7e72b0 --- /dev/null +++ b/plugins/dfxvideo/fps.h @@ -0,0 +1,31 @@ +/*************************************************************************** + fps.h - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _FPS_INTERNALS_H +#define _FPS_INTERNALS_H + +void FrameCap(void); +void FrameSkip(void); +void calcfps(void); +void PCFrameCap (void); +void PCcalcfps(void); +void SetAutoFrameCap(void); +void SetFPSHandler(void); +void InitFPS(void); +void CheckFrameRate(void); + +#endif // _FPS_INTERNALS_H diff --git a/plugins/dfxvideo/gpu.c b/plugins/dfxvideo/gpu.c new file mode 100644 index 00000000..7dd359ff --- /dev/null +++ b/plugins/dfxvideo/gpu.c @@ -0,0 +1,1952 @@ +/*************************************************************************** + gpu.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _MACGL +#include "config.h" +#endif + +#define _IN_GPU + +#include "externals.h" +#include "gpu.h" +#include "draw.h" +#include "cfg.h" +#include "prim.h" +#include "stdint.h" +#include "psemu_plugin_defs.h" +#include "menu.h" +#include "key.h" +#include "fps.h" +#include "swap.h" + +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif + +//////////////////////////////////////////////////////////////////////// +// PPDK developer must change libraryName field and can change revision and build +//////////////////////////////////////////////////////////////////////// + +const unsigned char version = 1; // do not touch - library for PSEmu 1.x +const unsigned char revision = 1; +const unsigned char build = 17; // increase that with each version + +#ifdef _MACGL +static char *libraryName = N_("SoftGL Driver"); +static char *libraryInfo = N_("P.E.Op.S. SoftGL Driver V1.17\nCoded by Pete Bernert and the P.E.Op.S. team\n"); +#else +static char *libraryName = N_("XVideo Driver"); +static char *libraryInfo = N_("P.E.Op.S. Xvideo Driver V1.17\nCoded by Pete Bernert and the P.E.Op.S. team\n"); +#endif + +static char *PluginAuthor = N_("Pete Bernert and the P.E.Op.S. team"); + +//////////////////////////////////////////////////////////////////////// +// memory image of the PSX vram +//////////////////////////////////////////////////////////////////////// + +unsigned char *psxVSecure; +unsigned char *psxVub; +signed char *psxVsb; +unsigned short *psxVuw; +unsigned short *psxVuw_eom; +signed short *psxVsw; +uint32_t *psxVul; +int32_t *psxVsl; + +//////////////////////////////////////////////////////////////////////// +// GPU globals +//////////////////////////////////////////////////////////////////////// + +static long lGPUdataRet; +long lGPUstatusRet; +char szDispBuf[64]; +char szMenuBuf[36]; +char szDebugText[512]; +uint32_t ulStatusControl[256]; + +static uint32_t gpuDataM[256]; +static unsigned char gpuCommand = 0; +static long gpuDataC = 0; +static long gpuDataP = 0; + +VRAMLoad_t VRAMWrite; +VRAMLoad_t VRAMRead; +DATAREGISTERMODES DataWriteMode; +DATAREGISTERMODES DataReadMode; + +BOOL bSkipNextFrame = FALSE; +DWORD dwLaceCnt=0; +int iColDepth; +int iWindowMode; +short sDispWidths[8] = {256,320,512,640,368,384,512,640}; +PSXDisplay_t PSXDisplay; +PSXDisplay_t PreviousPSXDisplay; +long lSelectedSlot=0; +BOOL bChangeWinMode=FALSE; +BOOL bDoLazyUpdate=FALSE; +uint32_t lGPUInfoVals[16]; +static int iFakePrimBusy=0; + +//////////////////////////////////////////////////////////////////////// +// some misc external display funcs +//////////////////////////////////////////////////////////////////////// + +#include +time_t tStart; + +void CALLBACK GPUdisplayText(char * pText) // some debug func +{ + if(!pText) {szDebugText[0]=0;return;} + if(strlen(pText)>511) return; + time(&tStart); + strcpy(szDebugText,pText); +} + +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUdisplayFlags(unsigned long dwFlags) // some info func +{ + dwCoreFlags=dwFlags; + BuildDispMenu(0); +} + +//////////////////////////////////////////////////////////////////////// +// stuff to make this a true PDK module +//////////////////////////////////////////////////////////////////////// + +char * CALLBACK PSEgetLibName(void) +{ + return _(libraryName); +} + +unsigned long CALLBACK PSEgetLibType(void) +{ + return PSE_LT_GPU; +} + +unsigned long CALLBACK PSEgetLibVersion(void) +{ + return version<<16|revision<<8|build; +} + +char * GPUgetLibInfos(void) +{ + return _(libraryInfo); +} + +//////////////////////////////////////////////////////////////////////// +// Snapshot func +//////////////////////////////////////////////////////////////////////// + +static char * pGetConfigInfos(int iCfg) +{ + char szO[2][4]={"off","on "}; + char szTxt[256]; + char * pB = (char *)malloc(32767); + + if (!pB) return NULL; + *pB = 0; + //----------------------------------------------------// + sprintf(szTxt,"Plugin: %s %d.%d.%d\r\n",libraryName,version,revision,build); + strcat(pB,szTxt); + sprintf(szTxt,"Author: %s\r\n\r\n",PluginAuthor); + strcat(pB,szTxt); + //----------------------------------------------------// + if(iCfg && iWindowMode) + sprintf(szTxt,"Resolution/Color:\r\n- %dx%d ",LOWORD(iWinSize),HIWORD(iWinSize)); + else + sprintf(szTxt,"Resolution/Color:\r\n- %dx%d ",iResX,iResY); + strcat(pB,szTxt); + if(iWindowMode && iCfg) + strcpy(szTxt,"Window mode\r\n"); + else + if(iWindowMode) + sprintf(szTxt,"Window mode - [%d Bit]\r\n",iDesktopCol); + else + sprintf(szTxt,"Fullscreen - [%d Bit]\r\n",iColDepth); + strcat(pB,szTxt); + + sprintf(szTxt,"Stretch mode: %d\r\n",iUseNoStretchBlt); + strcat(pB,szTxt); + sprintf(szTxt,"Dither mode: %d\r\n\r\n",iUseDither); + strcat(pB,szTxt); + //----------------------------------------------------// + sprintf(szTxt,"Framerate:\r\n- FPS limit: %s\r\n",szO[UseFrameLimit]); + strcat(pB,szTxt); + sprintf(szTxt,"- Frame skipping: %s",szO[UseFrameSkip]); + strcat(pB,szTxt); + if(iFastFwd) strcat(pB," (fast forward)"); + strcat(pB,"\r\n"); + if(iFrameLimit==2) + strcpy(szTxt,"- FPS limit: Auto\r\n\r\n"); + else sprintf(szTxt,"- FPS limit: %.1f\r\n\r\n",fFrameRate); + strcat(pB,szTxt); + //----------------------------------------------------// +#ifndef _MACGL + strcpy(szTxt,"Misc:\r\n- MaintainAspect: "); + if(iMaintainAspect == 0) strcat(szTxt,"disabled"); + else + if(iMaintainAspect == 1) strcat(szTxt,"enabled"); + strcat(szTxt,"\r\n"); + strcat(pB,szTxt); +#endif + sprintf(szTxt,"- Game fixes: %s [%08x]\r\n",szO[iUseFixes],dwCfgFixes); + strcat(pB,szTxt); + //----------------------------------------------------// + return pB; +} + +static void DoTextSnapShot(int iNum) +{ + FILE *txtfile; + char szTxt[256]; + char *pB; + + sprintf(szTxt,"%s/pcsx%04d.txt",getenv("HOME"),iNum); + + if ((txtfile = fopen(szTxt, "wb")) == NULL) + return; + + pB = pGetConfigInfos(0); + if (pB) + { + fwrite(pB, strlen(pB), 1, txtfile); + free(pB); + } + fclose(txtfile); +} + +void CALLBACK GPUmakeSnapshot(void) +{ + FILE *bmpfile; + char filename[256]; + unsigned char header[0x36]; + long size, height; + unsigned char line[1024 * 3]; + short i, j; + unsigned char empty[2] = {0,0}; + unsigned short color; + unsigned long snapshotnr = 0; + unsigned char *pD; + + height = PreviousPSXDisplay.DisplayMode.y; + + size = height * PreviousPSXDisplay.Range.x1 * 3 + 0x38; + + // fill in proper values for BMP + + // hardcoded BMP header + memset(header, 0, 0x36); + header[0] = 'B'; + header[1] = 'M'; + header[2] = size & 0xff; + header[3] = (size >> 8) & 0xff; + header[4] = (size >> 16) & 0xff; + header[5] = (size >> 24) & 0xff; + header[0x0a] = 0x36; + header[0x0e] = 0x28; + header[0x12] = PreviousPSXDisplay.Range.x1 % 256; + header[0x13] = PreviousPSXDisplay.Range.x1 / 256; + header[0x16] = height % 256; + header[0x17] = height / 256; + header[0x1a] = 0x01; + header[0x1c] = 0x18; + header[0x26] = 0x12; + header[0x27] = 0x0B; + header[0x2A] = 0x12; + header[0x2B] = 0x0B; + + // increment snapshot value & try to get filename + do + { + snapshotnr++; + sprintf(filename, "%s/pcsx%04ld.bmp", getenv("HOME"), snapshotnr); + + bmpfile = fopen(filename,"rb"); + if (bmpfile == NULL) + break; + + fclose(bmpfile); + } + while(TRUE); + + // try opening new snapshot file + if ((bmpfile = fopen(filename,"wb")) == NULL) + return; + + fwrite(header, 0x36, 1, bmpfile); + for (i = height + PSXDisplay.DisplayPosition.y - 1; i >= PSXDisplay.DisplayPosition.y; i--) + { + pD = (unsigned char *)&psxVuw[i * 1024 + PSXDisplay.DisplayPosition.x]; + for (j = 0; j < PreviousPSXDisplay.Range.x1; j++) + { + if (PSXDisplay.RGB24) + { + uint32_t lu = *(uint32_t *)pD; + line[j * 3 + 2] = RED(lu); + line[j * 3 + 1] = GREEN(lu); + line[j * 3 + 0] = BLUE(lu); + pD += 3; + } + else + { + color = GETLE16(pD); + line[j * 3 + 2] = (color << 3) & 0xf1; + line[j * 3 + 1] = (color >> 2) & 0xf1; + line[j * 3 + 0] = (color >> 7) & 0xf1; + pD += 2; + } + } + fwrite(line, PreviousPSXDisplay.Range.x1 * 3, 1, bmpfile); + } + fwrite(empty, 0x2, 1, bmpfile); + fclose(bmpfile); + + DoTextSnapShot(snapshotnr); +} + +//////////////////////////////////////////////////////////////////////// +// INIT, will be called after lib load... well, just do some var init... +//////////////////////////////////////////////////////////////////////// + +long CALLBACK GPUinit() // GPU INIT +{ + memset(ulStatusControl,0,256*sizeof(uint32_t)); // init save state scontrol field + + szDebugText[0] = 0; // init debug text buffer + + psxVSecure = (unsigned char *)malloc((iGPUHeight*2)*1024 + (1024*1024)); // always alloc one extra MB for soft drawing funcs security + if (!psxVSecure) + return -1; + + //!!! ATTENTION !!! + psxVub=psxVSecure + 512 * 1024; // security offset into double sized psx vram! + + psxVsb=(signed char *)psxVub; // different ways of accessing PSX VRAM + psxVsw=(signed short *)psxVub; + psxVsl=(int32_t *)psxVub; + psxVuw=(unsigned short *)psxVub; + psxVul=(uint32_t *)psxVub; + + psxVuw_eom=psxVuw+1024*iGPUHeight; // pre-calc of end of vram + + memset(psxVSecure,0x00,(iGPUHeight*2)*1024 + (1024*1024)); + memset(lGPUInfoVals,0x00,16*sizeof(uint32_t)); + + SetFPSHandler(); + + PSXDisplay.RGB24 = FALSE; // init some stuff + PSXDisplay.Interlaced = FALSE; + PSXDisplay.DrawOffset.x = 0; + PSXDisplay.DrawOffset.y = 0; + PSXDisplay.DisplayMode.x= 320; + PSXDisplay.DisplayMode.y= 240; + PreviousPSXDisplay.DisplayMode.x= 320; + PreviousPSXDisplay.DisplayMode.y= 240; + PSXDisplay.Disabled = FALSE; + PreviousPSXDisplay.Range.x0 =0; + PreviousPSXDisplay.Range.y0 =0; + PSXDisplay.Range.x0=0; + PSXDisplay.Range.x1=0; + PreviousPSXDisplay.DisplayModeNew.y=0; + PSXDisplay.Double = 1; + lGPUdataRet = 0x400; + + DataWriteMode = DR_NORMAL; + + // Reset transfer values, to prevent mis-transfer of data + memset(&VRAMWrite, 0, sizeof(VRAMLoad_t)); + memset(&VRAMRead, 0, sizeof(VRAMLoad_t)); + + // device initialised already ! + lGPUstatusRet = 0x14802000; + GPUIsIdle; + GPUIsReadyForCommands; + bDoVSyncUpdate = TRUE; + + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// Here starts all... +//////////////////////////////////////////////////////////////////////// + + +long GPUopen(unsigned long * disp,char * CapText,char * CfgFile) +{ + unsigned long d; + + pCaptionText=CapText; + + + ReadConfig(); // read registry + + InitFPS(); + + bIsFirstFrame = TRUE; // we have to init later + bDoVSyncUpdate = TRUE; + + d=ulInitDisplay(); // setup x + + if(disp) + *disp=d; // wanna x pointer? ok + + if(d) return 0; + return -1; +} + + +//////////////////////////////////////////////////////////////////////// +// time to leave... +//////////////////////////////////////////////////////////////////////// + +long CALLBACK GPUclose() // GPU CLOSE +{ + + ReleaseKeyHandler(); // de-subclass window + + CloseDisplay(); // shutdown direct draw + + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// I shot the sheriff +//////////////////////////////////////////////////////////////////////// + +long CALLBACK GPUshutdown() // GPU SHUTDOWN +{ + free(psxVSecure); + + return 0; // nothinh to do +} + +//////////////////////////////////////////////////////////////////////// +// Update display (swap buffers) +//////////////////////////////////////////////////////////////////////// + +void updateDisplay(void) // UPDATE DISPLAY +{ + if(PSXDisplay.Disabled) // disable? + { + DoClearFrontBuffer(); // -> clear frontbuffer + return; // -> and bye + } + + if(dwActFixes&32) // pc fps calculation fix + { + if(UseFrameLimit) PCFrameCap(); // -> brake + if(UseFrameSkip || ulKeybits&KEY_SHOWFPS) + PCcalcfps(); + } + + if(ulKeybits&KEY_SHOWFPS) // make fps display buf + { + sprintf(szDispBuf,"FPS %06.1f",fps_cur); + } + + if(iFastFwd) // fastfwd ? + { + static int fpscount; UseFrameSkip=1; + + if(!bSkipNextFrame) DoBufferSwap(); // -> to skip or not to skip + if(fpscount%6) // -> skip 6/7 frames + bSkipNextFrame = TRUE; + else bSkipNextFrame = FALSE; + fpscount++; + if(fpscount >= (int)fFrameRateHz) fpscount = 0; + return; + } + + if(UseFrameSkip) // skip ? + { + if(!bSkipNextFrame) DoBufferSwap(); // -> to skip or not to skip + if(dwActFixes&0xa0) // -> pc fps calculation fix/old skipping fix + { + if((fps_skip < fFrameRateHz) && !(bSkipNextFrame)) // -> skip max one in a row + {bSkipNextFrame = TRUE; fps_skip=fFrameRateHz;} + else bSkipNextFrame = FALSE; + } + else FrameSkip(); + } + else // no skip ? + { + DoBufferSwap(); // -> swap + } +} + +//////////////////////////////////////////////////////////////////////// +// roughly emulated screen centering bits... not complete !!! +//////////////////////////////////////////////////////////////////////// + +void ChangeDispOffsetsX(void) // X CENTER +{ + long lx,l; + + if(!PSXDisplay.Range.x1) return; + + l=PreviousPSXDisplay.DisplayMode.x; + + l*=(long)PSXDisplay.Range.x1; + l/=2560;lx=l;l&=0xfffffff8; + + if(l==PreviousPSXDisplay.Range.y1) return; // abusing range.y1 for + PreviousPSXDisplay.Range.y1=(short)l; // storing last x range and test + + if(lx>=PreviousPSXDisplay.DisplayMode.x) + { + PreviousPSXDisplay.Range.x1= + (short)PreviousPSXDisplay.DisplayMode.x; + PreviousPSXDisplay.Range.x0=0; + } + else + { + PreviousPSXDisplay.Range.x1=(short)l; + + PreviousPSXDisplay.Range.x0= + (PSXDisplay.Range.x0-500)/8; + + if(PreviousPSXDisplay.Range.x0<0) + PreviousPSXDisplay.Range.x0=0; + + if((PreviousPSXDisplay.Range.x0+lx)> + PreviousPSXDisplay.DisplayMode.x) + { + PreviousPSXDisplay.Range.x0= + (short)(PreviousPSXDisplay.DisplayMode.x-lx); + PreviousPSXDisplay.Range.x0+=2; //??? + + PreviousPSXDisplay.Range.x1+=(short)(lx-l); + + PreviousPSXDisplay.Range.x1-=2; // makes linux stretching easier + + } + + + // some linux alignment security + PreviousPSXDisplay.Range.x0=PreviousPSXDisplay.Range.x0>>1; + PreviousPSXDisplay.Range.x0=PreviousPSXDisplay.Range.x0<<1; + PreviousPSXDisplay.Range.x1=PreviousPSXDisplay.Range.x1>>1; + PreviousPSXDisplay.Range.x1=PreviousPSXDisplay.Range.x1<<1; + + + DoClearScreenBuffer(); + } + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// + +void ChangeDispOffsetsY(void) // Y CENTER +{ + int iT,iO=PreviousPSXDisplay.Range.y0; + int iOldYOffset=PreviousPSXDisplay.DisplayModeNew.y; + +// new + + if((PreviousPSXDisplay.DisplayModeNew.x+PSXDisplay.DisplayModeNew.y)>iGPUHeight) + { + int dy1=iGPUHeight-PreviousPSXDisplay.DisplayModeNew.x; + int dy2=(PreviousPSXDisplay.DisplayModeNew.x+PSXDisplay.DisplayModeNew.y)-iGPUHeight; + + if(dy1>=dy2) + { + PreviousPSXDisplay.DisplayModeNew.y=-dy2; + } + else + { + PSXDisplay.DisplayPosition.y=0; + PreviousPSXDisplay.DisplayModeNew.y=-dy1; + } + } + else PreviousPSXDisplay.DisplayModeNew.y=0; + +// eon + + if(PreviousPSXDisplay.DisplayModeNew.y!=iOldYOffset) // if old offset!=new offset: recalc height + { + PSXDisplay.Height = PSXDisplay.Range.y1 - + PSXDisplay.Range.y0 + + PreviousPSXDisplay.DisplayModeNew.y; + PSXDisplay.DisplayModeNew.y=PSXDisplay.Height*PSXDisplay.Double; + } + +// + + if(PSXDisplay.PAL) iT=48; else iT=28; + + if(PSXDisplay.Range.y0>=iT) + { + PreviousPSXDisplay.Range.y0= + (short)((PSXDisplay.Range.y0-iT-4)*PSXDisplay.Double); + if(PreviousPSXDisplay.Range.y0<0) + PreviousPSXDisplay.Range.y0=0; + PSXDisplay.DisplayModeNew.y+= + PreviousPSXDisplay.Range.y0; + } + else + PreviousPSXDisplay.Range.y0=0; + + if(iO!=PreviousPSXDisplay.Range.y0) + { + DoClearScreenBuffer(); + } +} + +//////////////////////////////////////////////////////////////////////// +// check if update needed +//////////////////////////////////////////////////////////////////////// + +void updateDisplayIfChanged(void) // UPDATE DISPLAY IF CHANGED +{ + if ((PSXDisplay.DisplayMode.y == PSXDisplay.DisplayModeNew.y) && + (PSXDisplay.DisplayMode.x == PSXDisplay.DisplayModeNew.x)) + { + if((PSXDisplay.RGB24 == PSXDisplay.RGB24New) && + (PSXDisplay.Interlaced == PSXDisplay.InterlacedNew)) return; + } + + PSXDisplay.RGB24 = PSXDisplay.RGB24New; // get new infos + + PSXDisplay.DisplayMode.y = PSXDisplay.DisplayModeNew.y; + PSXDisplay.DisplayMode.x = PSXDisplay.DisplayModeNew.x; + PreviousPSXDisplay.DisplayMode.x= // previous will hold + min(640,PSXDisplay.DisplayMode.x); // max 640x512... that's + PreviousPSXDisplay.DisplayMode.y= // the size of my + min(512,PSXDisplay.DisplayMode.y); // back buffer surface + PSXDisplay.Interlaced = PSXDisplay.InterlacedNew; + + PSXDisplay.DisplayEnd.x= // calc end of display + PSXDisplay.DisplayPosition.x+ PSXDisplay.DisplayMode.x; + PSXDisplay.DisplayEnd.y= + PSXDisplay.DisplayPosition.y+ PSXDisplay.DisplayMode.y+PreviousPSXDisplay.DisplayModeNew.y; + PreviousPSXDisplay.DisplayEnd.x= + PreviousPSXDisplay.DisplayPosition.x+ PSXDisplay.DisplayMode.x; + PreviousPSXDisplay.DisplayEnd.y= + PreviousPSXDisplay.DisplayPosition.y+ PSXDisplay.DisplayMode.y+PreviousPSXDisplay.DisplayModeNew.y; + + ChangeDispOffsetsX(); + + if(iFrameLimit==2) SetAutoFrameCap(); // -> set it + + if(UseFrameSkip) updateDisplay(); // stupid stuff when frame skipping enabled +} + +//////////////////////////////////////////////////////////////////////// + +#ifndef _MACGL + +#include "draw.h" + +void ChangeWindowMode(void) // TOGGLE FULLSCREEN - WINDOW +{ + extern Display *display; + extern Window window; + extern int root_window_id; + Screen *screen; + XSizeHints hints; + MotifWmHints mwmhints; + Atom mwmatom; + + screen=DefaultScreenOfDisplay(display); + iWindowMode=!iWindowMode; + + if(!iWindowMode) // fullscreen + { + mwmhints.flags=MWM_HINTS_DECORATIONS; + mwmhints.functions=0; + mwmhints.decorations=0; + mwmhints.input_mode=0; + mwmatom=XInternAtom(display,"_MOTIF_WM_HINTS",0); + XChangeProperty(display,window,mwmatom,mwmatom,32, + PropModeReplace,(unsigned char *)&mwmhints,5); + + XResizeWindow(display,window,screen->width,screen->height); + + hints.min_width = hints.max_width = hints.base_width = screen->width; + hints.min_height= hints.max_height = hints.base_height = screen->height; + + XSetWMNormalHints(display,window,&hints); + + { + XEvent xev; + + memset(&xev, 0, sizeof(xev)); + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = 1; + xev.xclient.message_type = XInternAtom(display, "_NET_WM_STATE", 0); + xev.xclient.window = window; + xev.xclient.format = 32; + xev.xclient.data.l[0] = 1; + xev.xclient.data.l[1] = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", 0); + xev.xclient.data.l[2] = 0; + xev.xclient.data.l[3] = 0; + xev.xclient.data.l[4] = 0; + + XSendEvent(display, root_window_id, 0, + SubstructureRedirectMask | SubstructureNotifyMask, &xev); + } + } else { + { + XEvent xev; + + memset(&xev, 0, sizeof(xev)); + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = 1; + xev.xclient.message_type = XInternAtom(display, "_NET_WM_STATE", 0); + xev.xclient.window = window; + xev.xclient.format = 32; + xev.xclient.data.l[0] = 0; + xev.xclient.data.l[1] = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", 0); + xev.xclient.data.l[2] = 0; + xev.xclient.data.l[3] = 0; + xev.xclient.data.l[4] = 0; + + XSendEvent(display, root_window_id, 0, + SubstructureRedirectMask | SubstructureNotifyMask, &xev); + } + + mwmhints.flags=MWM_HINTS_DECORATIONS; + mwmhints.functions=0; + mwmhints.decorations=1; + mwmhints.input_mode=0; + mwmatom=XInternAtom(display,"_MOTIF_WM_HINTS",0); + + //This shouldn't work on 64 bit longs, but it does...in fact, it breaks when I change all the mwmhints to int. + //I don't pretend to understand it. + XChangeProperty(display,window,mwmatom,mwmatom,32, + PropModeReplace,(unsigned char *)&mwmhints,5); + + hints.flags=USPosition|USSize; + hints.base_width = iResX; + hints.base_height = iResY; + XSetWMNormalHints(display,window,&hints); + + XResizeWindow(display,window,iResX,iResY); +} + + DoClearScreenBuffer(); + + bChangeWinMode=FALSE; + bDoVSyncUpdate=TRUE; +} + +#endif + +//////////////////////////////////////////////////////////////////////// +// gun cursor func: player=0-7, x=0-511, y=0-255 +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUcursor(int iPlayer,int x,int y) +{ + if(iPlayer<0) return; + if(iPlayer>7) return; + + usCursorActive|=(1<511) x=511; + if(y<0) y=0; + if(y>255) y=255; + + ptCursorPoint[iPlayer].x=x; + ptCursorPoint[iPlayer].y=y; +} + +//////////////////////////////////////////////////////////////////////// +// update lace is called evry VSync +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUupdateLace(void) // VSYNC +{ + if(!(dwActFixes&1)) + lGPUstatusRet^=0x80000000; // odd/even bit + + if(!(dwActFixes&32)) // std fps limitation? + CheckFrameRate(); + + if(PSXDisplay.Interlaced) // interlaced mode? + { + if(bDoVSyncUpdate && PSXDisplay.DisplayMode.x>0 && PSXDisplay.DisplayMode.y>0) + { + updateDisplay(); + } + } + else // non-interlaced? + { + if(dwActFixes&64) // lazy screen update fix + { + if(bDoLazyUpdate && !UseFrameSkip) + updateDisplay(); + bDoLazyUpdate=FALSE; + } + else + { + if(bDoVSyncUpdate && !UseFrameSkip) // some primitives drawn? + updateDisplay(); // -> update display + } + } +#ifndef _MACGL + if(bChangeWinMode) ChangeWindowMode(); // toggle full - window mode +#endif + bDoVSyncUpdate=FALSE; // vsync done +} + +//////////////////////////////////////////////////////////////////////// +// process read request from GPU status register +//////////////////////////////////////////////////////////////////////// + + +uint32_t CALLBACK GPUreadStatus(void) // READ STATUS +{ + if(dwActFixes&1) + { + static int iNumRead=0; // odd/even hack + if((iNumRead++)==2) + { + iNumRead=0; + lGPUstatusRet^=0x80000000; // interlaced bit toggle... we do it on every 3 read status... needed by some games (like ChronoCross) with old epsxe versions (1.5.2 and older) + } + } + + if(iFakePrimBusy) // 27.10.2007 - PETE : emulating some 'busy' while drawing... pfff + { + iFakePrimBusy--; + + if(iFakePrimBusy&1) // we do a busy-idle-busy-idle sequence after/while drawing prims + { + GPUIsBusy; + GPUIsNotReadyForCommands; + } + else + { + GPUIsIdle; + GPUIsReadyForCommands; + } + } + return lGPUstatusRet; +} + +//////////////////////////////////////////////////////////////////////// +// processes data send to GPU status register +// these are always single packet commands. +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUwriteStatus(uint32_t gdata) // WRITE STATUS +{ + uint32_t lCommand=(gdata>>24)&0xff; + + ulStatusControl[lCommand]=gdata; // store command for freezing + + switch(lCommand) + { + //--------------------------------------------------// + // reset gpu + case 0x00: + memset(lGPUInfoVals,0x00,16*sizeof(uint32_t)); + lGPUstatusRet=0x14802000; + PSXDisplay.Disabled=1; + DataWriteMode=DataReadMode=DR_NORMAL; + PSXDisplay.DrawOffset.x=PSXDisplay.DrawOffset.y=0; + drawX=drawY=0;drawW=drawH=0; + sSetMask=0;lSetMask=0;bCheckMask=FALSE; + usMirror=0; + GlobalTextAddrX=0;GlobalTextAddrY=0; + GlobalTextTP=0;GlobalTextABR=0; + PSXDisplay.RGB24=FALSE; + PSXDisplay.Interlaced=FALSE; + bUsingTWin = FALSE; + return; + //--------------------------------------------------// + // dis/enable display + case 0x03: + + PreviousPSXDisplay.Disabled = PSXDisplay.Disabled; + PSXDisplay.Disabled = (gdata & 1); + + if(PSXDisplay.Disabled) + lGPUstatusRet|=GPUSTATUS_DISPLAYDISABLED; + else lGPUstatusRet&=~GPUSTATUS_DISPLAYDISABLED; + return; + + //--------------------------------------------------// + // setting transfer mode + case 0x04: + gdata &= 0x03; // Only want the lower two bits + + DataWriteMode=DataReadMode=DR_NORMAL; + if(gdata==0x02) DataWriteMode=DR_VRAMTRANSFER; + if(gdata==0x03) DataReadMode =DR_VRAMTRANSFER; + lGPUstatusRet&=~GPUSTATUS_DMABITS; // Clear the current settings of the DMA bits + lGPUstatusRet|=(gdata << 29); // Set the DMA bits according to the received data + + return; + //--------------------------------------------------// + // setting display position + case 0x05: + { + PreviousPSXDisplay.DisplayPosition.x = PSXDisplay.DisplayPosition.x; + PreviousPSXDisplay.DisplayPosition.y = PSXDisplay.DisplayPosition.y; + +//////// +/* + PSXDisplay.DisplayPosition.y = (short)((gdata>>10)&0x3ff); + if (PSXDisplay.DisplayPosition.y & 0x200) + PSXDisplay.DisplayPosition.y |= 0xfffffc00; + if(PSXDisplay.DisplayPosition.y<0) + { + PreviousPSXDisplay.DisplayModeNew.y=PSXDisplay.DisplayPosition.y/PSXDisplay.Double; + PSXDisplay.DisplayPosition.y=0; + } + else PreviousPSXDisplay.DisplayModeNew.y=0; +*/ + +// new + if(iGPUHeight==1024) + { + if(dwGPUVersion==2) + PSXDisplay.DisplayPosition.y = (short)((gdata>>12)&0x3ff); + else PSXDisplay.DisplayPosition.y = (short)((gdata>>10)&0x3ff); + } + else PSXDisplay.DisplayPosition.y = (short)((gdata>>10)&0x1ff); + + // store the same val in some helper var, we need it on later compares + PreviousPSXDisplay.DisplayModeNew.x=PSXDisplay.DisplayPosition.y; + + if((PSXDisplay.DisplayPosition.y+PSXDisplay.DisplayMode.y)>iGPUHeight) + { + int dy1=iGPUHeight-PSXDisplay.DisplayPosition.y; + int dy2=(PSXDisplay.DisplayPosition.y+PSXDisplay.DisplayMode.y)-iGPUHeight; + + if(dy1>=dy2) + { + PreviousPSXDisplay.DisplayModeNew.y=-dy2; + } + else + { + PSXDisplay.DisplayPosition.y=0; + PreviousPSXDisplay.DisplayModeNew.y=-dy1; + } + } + else PreviousPSXDisplay.DisplayModeNew.y=0; +// eon + + PSXDisplay.DisplayPosition.x = (short)(gdata & 0x3ff); + PSXDisplay.DisplayEnd.x= + PSXDisplay.DisplayPosition.x+ PSXDisplay.DisplayMode.x; + PSXDisplay.DisplayEnd.y= + PSXDisplay.DisplayPosition.y+ PSXDisplay.DisplayMode.y + PreviousPSXDisplay.DisplayModeNew.y; + PreviousPSXDisplay.DisplayEnd.x= + PreviousPSXDisplay.DisplayPosition.x+ PSXDisplay.DisplayMode.x; + PreviousPSXDisplay.DisplayEnd.y= + PreviousPSXDisplay.DisplayPosition.y+ PSXDisplay.DisplayMode.y + PreviousPSXDisplay.DisplayModeNew.y; + + bDoVSyncUpdate=TRUE; + + if (!(PSXDisplay.Interlaced)) // stupid frame skipping option + { + if(UseFrameSkip) updateDisplay(); + if(dwActFixes&64) bDoLazyUpdate=TRUE; + } + }return; + //--------------------------------------------------// + // setting width + case 0x06: + + PSXDisplay.Range.x0=(short)(gdata & 0x7ff); + PSXDisplay.Range.x1=(short)((gdata>>12) & 0xfff); + + PSXDisplay.Range.x1-=PSXDisplay.Range.x0; + + ChangeDispOffsetsX(); + + return; + //--------------------------------------------------// + // setting height + case 0x07: + { + + PSXDisplay.Range.y0=(short)(gdata & 0x3ff); + PSXDisplay.Range.y1=(short)((gdata>>10) & 0x3ff); + + PreviousPSXDisplay.Height = PSXDisplay.Height; + + PSXDisplay.Height = PSXDisplay.Range.y1 - + PSXDisplay.Range.y0 + + PreviousPSXDisplay.DisplayModeNew.y; + + if(PreviousPSXDisplay.Height!=PSXDisplay.Height) + { + PSXDisplay.DisplayModeNew.y=PSXDisplay.Height*PSXDisplay.Double; + + ChangeDispOffsetsY(); + + updateDisplayIfChanged(); + } + return; + } + //--------------------------------------------------// + // setting display infos + case 0x08: + + PSXDisplay.DisplayModeNew.x = + sDispWidths[(gdata & 0x03) | ((gdata & 0x40) >> 4)]; + + if (gdata&0x04) PSXDisplay.Double=2; + else PSXDisplay.Double=1; + + PSXDisplay.DisplayModeNew.y = PSXDisplay.Height*PSXDisplay.Double; + + ChangeDispOffsetsY(); + + PSXDisplay.PAL = (gdata & 0x08)?TRUE:FALSE; // if 1 - PAL mode, else NTSC + PSXDisplay.RGB24New = (gdata & 0x10)?TRUE:FALSE; // if 1 - TrueColor + PSXDisplay.InterlacedNew = (gdata & 0x20)?TRUE:FALSE; // if 1 - Interlace + + lGPUstatusRet&=~GPUSTATUS_WIDTHBITS; // Clear the width bits + lGPUstatusRet|= + (((gdata & 0x03) << 17) | + ((gdata & 0x40) << 10)); // Set the width bits + + if(PSXDisplay.InterlacedNew) + { + if(!PSXDisplay.Interlaced) + { + PreviousPSXDisplay.DisplayPosition.x = PSXDisplay.DisplayPosition.x; + PreviousPSXDisplay.DisplayPosition.y = PSXDisplay.DisplayPosition.y; + } + lGPUstatusRet|=GPUSTATUS_INTERLACED; + } + else lGPUstatusRet&=~GPUSTATUS_INTERLACED; + + if (PSXDisplay.PAL) + lGPUstatusRet|=GPUSTATUS_PAL; + else lGPUstatusRet&=~GPUSTATUS_PAL; + + if (PSXDisplay.Double==2) + lGPUstatusRet|=GPUSTATUS_DOUBLEHEIGHT; + else lGPUstatusRet&=~GPUSTATUS_DOUBLEHEIGHT; + + if (PSXDisplay.RGB24New) + lGPUstatusRet|=GPUSTATUS_RGB24; + else lGPUstatusRet&=~GPUSTATUS_RGB24; + + updateDisplayIfChanged(); + + return; + //--------------------------------------------------// + // ask about GPU version and other stuff + case 0x10: + + gdata&=0xff; + + switch(gdata) + { + case 0x02: + lGPUdataRet=lGPUInfoVals[INFO_TW]; // tw infos + return; + case 0x03: + lGPUdataRet=lGPUInfoVals[INFO_DRAWSTART]; // draw start + return; + case 0x04: + lGPUdataRet=lGPUInfoVals[INFO_DRAWEND]; // draw end + return; + case 0x05: + case 0x06: + lGPUdataRet=lGPUInfoVals[INFO_DRAWOFF]; // draw offset + return; + case 0x07: + if(dwGPUVersion==2) + lGPUdataRet=0x01; + else lGPUdataRet=0x02; // gpu type + return; + case 0x08: + case 0x0F: // some bios addr? + lGPUdataRet=0xBFC03720; + return; + } + return; + //--------------------------------------------------// + } +} + +//////////////////////////////////////////////////////////////////////// +// vram read/write helpers, needed by LEWPY's optimized vram read/write :) +//////////////////////////////////////////////////////////////////////// + +__inline void FinishedVRAMWrite(void) +{ +/* +// NEWX + if(!PSXDisplay.Interlaced && UseFrameSkip) // stupid frame skipping + { + VRAMWrite.Width +=VRAMWrite.x; + VRAMWrite.Height+=VRAMWrite.y; + if(VRAMWrite.x=PSXDisplay.DisplayPosition.x && + VRAMWrite.y=PSXDisplay.DisplayPosition.y) + updateDisplay(); + } +*/ + + // Set register to NORMAL operation + DataWriteMode = DR_NORMAL; + // Reset transfer values, to prevent mis-transfer of data + VRAMWrite.x = 0; + VRAMWrite.y = 0; + VRAMWrite.Width = 0; + VRAMWrite.Height = 0; + VRAMWrite.ColsRemaining = 0; + VRAMWrite.RowsRemaining = 0; +} + +__inline void FinishedVRAMRead(void) +{ + // Set register to NORMAL operation + DataReadMode = DR_NORMAL; + // Reset transfer values, to prevent mis-transfer of data + VRAMRead.x = 0; + VRAMRead.y = 0; + VRAMRead.Width = 0; + VRAMRead.Height = 0; + VRAMRead.ColsRemaining = 0; + VRAMRead.RowsRemaining = 0; + + // Indicate GPU is no longer ready for VRAM data in the STATUS REGISTER + lGPUstatusRet&=~GPUSTATUS_READYFORVRAM; +} + +//////////////////////////////////////////////////////////////////////// +// core read from vram +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUreadDataMem(uint32_t * pMem, int iSize) +{ + int i; + + if(DataReadMode!=DR_VRAMTRANSFER) return; + + GPUIsBusy; + + // adjust read ptr, if necessary + while(VRAMRead.ImagePtr>=psxVuw_eom) + VRAMRead.ImagePtr-=iGPUHeight*1024; + while(VRAMRead.ImagePtr 0) && (VRAMRead.RowsRemaining > 0)) + { + // lower 16 bit + lGPUdataRet=(uint32_t)GETLE16(VRAMRead.ImagePtr); + + VRAMRead.ImagePtr++; + if(VRAMRead.ImagePtr>=psxVuw_eom) VRAMRead.ImagePtr-=iGPUHeight*1024; + VRAMRead.RowsRemaining --; + + if(VRAMRead.RowsRemaining<=0) + { + VRAMRead.RowsRemaining = VRAMRead.Width; + VRAMRead.ColsRemaining--; + VRAMRead.ImagePtr += 1024 - VRAMRead.Width; + if(VRAMRead.ImagePtr>=psxVuw_eom) VRAMRead.ImagePtr-=iGPUHeight*1024; + } + + // higher 16 bit (always, even if it's an odd width) + lGPUdataRet|=(uint32_t)GETLE16(VRAMRead.ImagePtr)<<16; + PUTLE32(pMem, lGPUdataRet); pMem++; + + if(VRAMRead.ColsRemaining <= 0) + {FinishedVRAMRead();goto ENDREAD;} + + VRAMRead.ImagePtr++; + if(VRAMRead.ImagePtr>=psxVuw_eom) VRAMRead.ImagePtr-=iGPUHeight*1024; + VRAMRead.RowsRemaining--; + if(VRAMRead.RowsRemaining<=0) + { + VRAMRead.RowsRemaining = VRAMRead.Width; + VRAMRead.ColsRemaining--; + VRAMRead.ImagePtr += 1024 - VRAMRead.Width; + if(VRAMRead.ImagePtr>=psxVuw_eom) VRAMRead.ImagePtr-=iGPUHeight*1024; + } + if(VRAMRead.ColsRemaining <= 0) + {FinishedVRAMRead();goto ENDREAD;} + } + else {FinishedVRAMRead();goto ENDREAD;} + } + +ENDREAD: + GPUIsIdle; +} + + +//////////////////////////////////////////////////////////////////////// + +uint32_t CALLBACK GPUreadData(void) +{ + uint32_t l; + GPUreadDataMem(&l,1); + return lGPUdataRet; +} + +//////////////////////////////////////////////////////////////////////// +// processes data send to GPU data register +// extra table entries for fixing polyline troubles +//////////////////////////////////////////////////////////////////////// + +const unsigned char primTableCX[256] = +{ + // 00 + 0,0,3,0,0,0,0,0, + // 08 + 0,0,0,0,0,0,0,0, + // 10 + 0,0,0,0,0,0,0,0, + // 18 + 0,0,0,0,0,0,0,0, + // 20 + 4,4,4,4,7,7,7,7, + // 28 + 5,5,5,5,9,9,9,9, + // 30 + 6,6,6,6,9,9,9,9, + // 38 + 8,8,8,8,12,12,12,12, + // 40 + 3,3,3,3,0,0,0,0, + // 48 +// 5,5,5,5,6,6,6,6, // FLINE + 254,254,254,254,254,254,254,254, + // 50 + 4,4,4,4,0,0,0,0, + // 58 +// 7,7,7,7,9,9,9,9, // GLINE + 255,255,255,255,255,255,255,255, + // 60 + 3,3,3,3,4,4,4,4, + // 68 + 2,2,2,2,3,3,3,3, // 3=SPRITE1??? + // 70 + 2,2,2,2,3,3,3,3, + // 78 + 2,2,2,2,3,3,3,3, + // 80 + 4,0,0,0,0,0,0,0, + // 88 + 0,0,0,0,0,0,0,0, + // 90 + 0,0,0,0,0,0,0,0, + // 98 + 0,0,0,0,0,0,0,0, + // a0 + 3,0,0,0,0,0,0,0, + // a8 + 0,0,0,0,0,0,0,0, + // b0 + 0,0,0,0,0,0,0,0, + // b8 + 0,0,0,0,0,0,0,0, + // c0 + 3,0,0,0,0,0,0,0, + // c8 + 0,0,0,0,0,0,0,0, + // d0 + 0,0,0,0,0,0,0,0, + // d8 + 0,0,0,0,0,0,0,0, + // e0 + 0,1,1,1,1,1,1,0, + // e8 + 0,0,0,0,0,0,0,0, + // f0 + 0,0,0,0,0,0,0,0, + // f8 + 0,0,0,0,0,0,0,0 +}; + +void CALLBACK GPUwriteDataMem(uint32_t * pMem, int iSize) +{ + unsigned char command; + uint32_t gdata=0; + int i=0; + GPUIsBusy; + GPUIsNotReadyForCommands; + +STARTVRAM: + + if(DataWriteMode==DR_VRAMTRANSFER) + { + BOOL bFinished=FALSE; + + // make sure we are in vram + while(VRAMWrite.ImagePtr>=psxVuw_eom) + VRAMWrite.ImagePtr-=iGPUHeight*1024; + while(VRAMWrite.ImagePtr0) + { + while(VRAMWrite.RowsRemaining>0) + { + if(i>=iSize) {goto ENDVRAM;} + i++; + + gdata=GETLE32(pMem); pMem++; + + PUTLE16(VRAMWrite.ImagePtr, (unsigned short)gdata); VRAMWrite.ImagePtr++; + if(VRAMWrite.ImagePtr>=psxVuw_eom) VRAMWrite.ImagePtr-=iGPUHeight*1024; + VRAMWrite.RowsRemaining --; + + if(VRAMWrite.RowsRemaining <= 0) + { + VRAMWrite.ColsRemaining--; + if (VRAMWrite.ColsRemaining <= 0) // last pixel is odd width + { + gdata=(gdata&0xFFFF)|(((uint32_t)GETLE16(VRAMWrite.ImagePtr))<<16); + FinishedVRAMWrite(); + bDoVSyncUpdate=TRUE; + goto ENDVRAM; + } + VRAMWrite.RowsRemaining = VRAMWrite.Width; + VRAMWrite.ImagePtr += 1024 - VRAMWrite.Width; + } + + PUTLE16(VRAMWrite.ImagePtr, (unsigned short)(gdata>>16)); VRAMWrite.ImagePtr++; + if(VRAMWrite.ImagePtr>=psxVuw_eom) VRAMWrite.ImagePtr-=iGPUHeight*1024; + VRAMWrite.RowsRemaining --; + } + + VRAMWrite.RowsRemaining = VRAMWrite.Width; + VRAMWrite.ColsRemaining--; + VRAMWrite.ImagePtr += 1024 - VRAMWrite.Width; + bFinished=TRUE; + } + + FinishedVRAMWrite(); + if(bFinished) bDoVSyncUpdate=TRUE; + } + +ENDVRAM: + + if(DataWriteMode==DR_NORMAL) + { + void (* *primFunc)(unsigned char *); + if(bSkipNextFrame) primFunc=primTableSkip; + else primFunc=primTableJ; + + for(;i>24) & 0xff); + +//if(command>=0xb0 && command<0xc0) auxprintf("b0 %x!!!!!!!!!\n",command); + + if(primTableCX[command]) + { + gpuDataC = primTableCX[command]; + gpuCommand = command; + PUTLE32(&gpuDataM[0], gdata); + gpuDataP = 1; + } + else continue; + } + else + { + PUTLE32(&gpuDataM[gpuDataP], gdata); + if(gpuDataC>128) + { + if((gpuDataC==254 && gpuDataP>=3) || + (gpuDataC==255 && gpuDataP>=4 && !(gpuDataP&1))) + { + if((gpuDataM[gpuDataP] & 0xF000F000) == 0x50005000) + gpuDataP=gpuDataC-1; + } + } + gpuDataP++; + } + + if(gpuDataP == gpuDataC) + { + gpuDataC=gpuDataP=0; + primFunc[gpuCommand]((unsigned char *)gpuDataM); + if(dwEmuFixes&0x0001 || dwActFixes&0x0400) // hack for emulating "gpu busy" in some games + iFakePrimBusy=4; } + } + } + + lGPUdataRet=gdata; + + GPUIsReadyForCommands; + GPUIsIdle; +} + +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUwriteData(uint32_t gdata) +{ + PUTLE32(&gdata, gdata); + GPUwriteDataMem(&gdata,1); +} + +//////////////////////////////////////////////////////////////////////// +// this functions will be removed soon (or 'soonish')... not really needed, but some emus want them +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUsetMode(unsigned long gdata) +{ +// Peops does nothing here... +// DataWriteMode=(gdata&1)?DR_VRAMTRANSFER:DR_NORMAL; +// DataReadMode =(gdata&2)?DR_VRAMTRANSFER:DR_NORMAL; +} + +long CALLBACK GPUgetMode(void) +{ + long iT=0; + + if(DataWriteMode==DR_VRAMTRANSFER) iT|=0x1; + if(DataReadMode ==DR_VRAMTRANSFER) iT|=0x2; + return iT; +} + +//////////////////////////////////////////////////////////////////////// +// call config dlg +//////////////////////////////////////////////////////////////////////// + +long CALLBACK GPUconfigure(void) +{ + SoftDlgProc(); + + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// sets all kind of act fixes +//////////////////////////////////////////////////////////////////////// + +void SetFixes(void) + { + if(dwActFixes&0x02) sDispWidths[4]=384; + else sDispWidths[4]=368; + } + +//////////////////////////////////////////////////////////////////////// +// process gpu commands +//////////////////////////////////////////////////////////////////////// + +unsigned long lUsedAddr[3]; + +__inline BOOL CheckForEndlessLoop(unsigned long laddr) +{ + if(laddr==lUsedAddr[1]) return TRUE; + if(laddr==lUsedAddr[2]) return TRUE; + + if(laddr 2000000) break; + if(CheckForEndlessLoop(addr)) break; + + count = baseAddrB[addr+3]; + + dmaMem=addr+4; + + if(count>0) GPUwriteDataMem(&baseAddrL[dmaMem>>2],count); + + addr = GETLE32(&baseAddrL[addr>>2])&0xffffff; + } + while (addr != 0xffffff); + + GPUIsIdle; + + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// show about dlg +//////////////////////////////////////////////////////////////////////// + + +void CALLBACK GPUabout(void) // ABOUT +{ + AboutDlgProc(); + return; +} + +//////////////////////////////////////////////////////////////////////// +// We are ever fine ;) +//////////////////////////////////////////////////////////////////////// + +long CALLBACK GPUtest(void) +{ + // if test fails this function should return negative value for error (unable to continue) + // and positive value for warning (can continue but output might be crappy) + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// Freeze +//////////////////////////////////////////////////////////////////////// + +typedef struct GPUFREEZETAG +{ + uint32_t ulFreezeVersion; // should be always 1 for now (set by main emu) + uint32_t ulStatus; // current gpu status + uint32_t ulControl[256]; // latest control register values + unsigned char psxVRam[1024*1024*2]; // current VRam image (full 2 MB for ZN) +} GPUFreeze_t; + +//////////////////////////////////////////////////////////////////////// + +long CALLBACK GPUfreeze(uint32_t ulGetFreezeData,GPUFreeze_t * pF) +{ + //----------------------------------------------------// + if(ulGetFreezeData==2) // 2: info, which save slot is selected? (just for display) + { + long lSlotNum=*((long *)pF); + if(lSlotNum<0) return 0; + if(lSlotNum>8) return 0; + lSelectedSlot=lSlotNum+1; + BuildDispMenu(0); + return 1; + } + //----------------------------------------------------// + if(!pF) return 0; // some checks + if(pF->ulFreezeVersion!=1) return 0; + + if(ulGetFreezeData==1) // 1: get data + { + pF->ulStatus=lGPUstatusRet; + memcpy(pF->ulControl,ulStatusControl,256*sizeof(uint32_t)); + memcpy(pF->psxVRam, psxVub, 1024*iGPUHeight*2); + + return 1; + } + + if(ulGetFreezeData!=0) return 0; // 0: set data + + lGPUstatusRet=pF->ulStatus; + memcpy(ulStatusControl,pF->ulControl,256*sizeof(uint32_t)); + memcpy(psxVub, pF->psxVRam, 1024*iGPUHeight*2); + +// RESET TEXTURE STORE HERE, IF YOU USE SOMETHING LIKE THAT + + GPUwriteStatus(ulStatusControl[0]); + GPUwriteStatus(ulStatusControl[1]); + GPUwriteStatus(ulStatusControl[2]); + GPUwriteStatus(ulStatusControl[3]); + GPUwriteStatus(ulStatusControl[8]); // try to repair things + GPUwriteStatus(ulStatusControl[6]); + GPUwriteStatus(ulStatusControl[7]); + GPUwriteStatus(ulStatusControl[5]); + GPUwriteStatus(ulStatusControl[4]); + + return 1; +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////// +// SAVE STATE DISPLAY STUFF +//////////////////////////////////////////////////////////////////////// + +// font 0-9, 24x20 pixels, 1 byte = 4 dots +// 00 = black +// 01 = white +// 10 = red +// 11 = transparent + +unsigned char cFont[10][120]= +{ +// 0 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 1 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 2 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 3 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 4 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x14,0x00,0x00, + 0x80,0x00,0x14,0x14,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 5 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 6 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x15,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 7 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 8 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 9 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x15,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +} +}; + +//////////////////////////////////////////////////////////////////////// + +void PaintPicDot(unsigned char * p,unsigned char c) +{ + + if(c==0) {*p++=0x00;*p++=0x00;*p=0x00;return;} // black + if(c==1) {*p++=0xff;*p++=0xff;*p=0xff;return;} // white + if(c==2) {*p++=0x00;*p++=0x00;*p=0xff;return;} // red + // transparent +} + +//////////////////////////////////////////////////////////////////////// +// the main emu allocs 128x96x3 bytes, and passes a ptr +// to it in pMem... the plugin has to fill it with +// 8-8-8 bit BGR screen data (Win 24 bit BMP format +// without header). +// Beware: the func can be called at any time, +// so you have to use the frontbuffer to get a fully +// rendered picture + +// LINUX version: + +extern char * Xpixels; + +void GPUgetScreenPic(unsigned char * pMem) +{ +/* + unsigned short c;unsigned char * pf;int x,y; + + float XS=(float)iResX/128; + float YS=(float)iResY/96; + + pf=pMem; + memset(pMem, 0, 128*96*3); + + if(Xpixels) + { + unsigned char * ps=(unsigned char *)Xpixels; + { + long lPitch=iResX<<2; + uint32_t sx; + + for(y=0;y<96;y++) + { + for(x=0;x<128;x++) + { + sx=*((uint32_t *)((ps)+ + (((int)((float)y*YS))*lPitch)+ + ((int)((float)x*XS))*4)); + *(pf+0)=(sx&0xff); + *(pf+1)=(sx&0xff00)>>8; + *(pf+2)=(sx&0xff0000)>>16; + pf+=3; + } + } + } + } + + + ///////////////////////////////////////////////////////////////////// + // generic number/border painter + + pf=pMem+(103*3); // offset to number rect + + for(y=0;y<20;y++) // loop the number rect pixel + { + for(x=0;x<6;x++) + { + c=cFont[lSelectedSlot][x+y*6]; // get 4 char dot infos at once (number depends on selected slot) + PaintPicDot(pf,(c&0xc0)>>6);pf+=3; // paint the dots into the rect + PaintPicDot(pf,(c&0x30)>>4);pf+=3; + PaintPicDot(pf,(c&0x0c)>>2);pf+=3; + PaintPicDot(pf,(c&0x03)); pf+=3; + } + pf+=104*3; // next rect y line + } + + pf=pMem; // ptr to first pos in 128x96 pic + for(x=0;x<128;x++) // loop top/bottom line + { + *(pf+(95*128*3))=0x00;*pf++=0x00; + *(pf+(95*128*3))=0x00;*pf++=0x00; // paint it red + *(pf+(95*128*3))=0xff;*pf++=0xff; + } + pf=pMem; // ptr to first pos + for(y=0;y<96;y++) // loop left/right line + { + *(pf+(127*3))=0x00;*pf++=0x00; + *(pf+(127*3))=0x00;*pf++=0x00; // paint it red + *(pf+(127*3))=0xff;*pf++=0xff; + pf+=127*3; // offset to next line + } +*/ +} + + +//////////////////////////////////////////////////////////////////////// +// func will be called with 128x96x3 BGR data. +// the plugin has to store the data and display +// it in the upper right corner. +// If the func is called with a NULL ptr, you can +// release your picture data and stop displaying +// the screen pic + +void CALLBACK GPUshowScreenPic(unsigned char * pMem) +{ + DestroyPic(); // destroy old pic data + if(pMem==0) return; // done + CreatePic(pMem); // create new pic... don't free pMem or something like that... just read from it +} + +void CALLBACK GPUsetfix(uint32_t dwFixBits) +{ + dwEmuFixes=dwFixBits; +} diff --git a/plugins/dfxvideo/gpu.h b/plugins/dfxvideo/gpu.h new file mode 100644 index 00000000..e8730f27 --- /dev/null +++ b/plugins/dfxvideo/gpu.h @@ -0,0 +1,60 @@ +/*************************************************************************** + gpu.h - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _GPU_INTERNALS_H +#define _GPU_INTERNALS_H + +#define OPAQUEON 10 +#define OPAQUEOFF 11 + +#define KEY_RESETTEXSTORE 1 +#define KEY_SHOWFPS 2 +#define KEY_RESETOPAQUE 4 +#define KEY_RESETDITHER 8 +#define KEY_RESETFILTER 16 +#define KEY_RESETADVBLEND 32 +//#define KEY_BLACKWHITE 64 +#define KEY_BADTEXTURES 128 +#define KEY_CHECKTHISOUT 256 + +#if !defined(__BIG_ENDIAN__) || defined(__x86_64__) || defined(__i386__) +#ifndef __LITTLE_ENDIAN__ +#define __LITTLE_ENDIAN__ +#endif +#endif + +#ifdef __LITTLE_ENDIAN__ +#define RED(x) (x & 0xff) +#define BLUE(x) ((x>>16) & 0xff) +#define GREEN(x) ((x>>8) & 0xff) +#define COLOR(x) (x & 0xffffff) +#elif defined __BIG_ENDIAN__ +#define RED(x) ((x>>24) & 0xff) +#define BLUE(x) ((x>>8) & 0xff) +#define GREEN(x) ((x>>16) & 0xff) +#define COLOR(x) SWAP32(x & 0xffffff) +#endif + +///////////////////////////////////////////////////////////////////////////// + +void updateDisplay(void); +void SetAutoFrameCap(void); +void SetFixes(void); + +///////////////////////////////////////////////////////////////////////////// + +#endif // _GPU_INTERNALS_H diff --git a/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 new file mode 100644 index 00000000..ded3c1a2 --- /dev/null +++ b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 @@ -0,0 +1,625 @@ + + + + + + True + 10 + Configure X11 Video + False + True + center + dialog + + + + True + vertical + 6 + + + True + 0 + + + True + 6 + 6 + 12 + 12 + + + True + vertical + + + True + 3 + 2 + 30 + 6 + + + True + 0 + Initial Window Size: + + + GTK_FILL + + + + + + True + 0 + Stretching: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Dithering: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + 0: None +1: 2xSai +2: 2xSuperSai +3: SuperEagle +4: Scale2x +5: Scale3x +6: HQ2X +7: HQ3X + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 1 + 0: Off (fastest) +1: Game dependant +2: Always + + + 1 + 2 + 2 + 3 + GTK_FILL + GTK_FILL + + + + + True + 10 + + + True + 2 + 320x240 +640x480 +800x600 +1024x768 +1152x864 +1280x1024 +1600x1200 + + + 0 + + + + + Fullscreen + True + True + False + True + Toggle windowed/fullscreen mode. + True + True + + + False + False + 1 + + + + + 1 + 2 + + + + + 0 + + + + + True + + + Maintain 4:3 Aspect Ratio + True + True + False + True + True + + + False + False + 0 + + + + + 1 + + + + + + + + + True + <b>Screen</b> + True + + + label_item + + + + + 0 + + + + + True + 0 + + + True + 6 + 6 + 12 + 12 + + + True + vertical + + + Show FPS + True + True + False + Toggle whether the FPS will be shown. + True + True + + + False + False + 0 + + + + + Enable frame skipping + True + True + False + Skip frames when rendering. + True + True + + + False + False + 1 + + + + + True + 3 + 12 + + + Set FPS + True + True + False + Enable this if games display too quickly. + True + True + + + GTK_FILL + + + + + + True + True + 4 + 200.0 + + + 1 + 2 + + + + + + + Autodetect FPS limit + True + True + False + True + True + True + True + + + 2 + 3 + + + + + False + False + 2 + + + + + + + + + True + <b>Framerate</b> + True + + + label_item + + + + + 1 + + + + + True + 0 + + + True + 6 + 6 + 12 + 12 + + + True + vertical + + + Use game fixes + True + True + False + True + True + + + False + False + 0 + + + + + True + 19 + + + True + 6 + 2 + 16 + + + Disable CPU Saving + True + True + False + For precise framerate + True + True + + + 4 + 5 + GTK_FILL + + + + + + Odd/even bit hack + True + True + False + Chrono Cross + True + True + + + GTK_FILL + + + + + + PC FPS calculation + True + True + False + Better FPS limit in some + True + True + + + 5 + 6 + GTK_FILL + + + + + + Expand screen width + True + True + False + Capcom fighting games + True + True + + + 1 + 2 + GTK_FILL + + + + + + Ignore brightness color + True + True + False + Black screens in Lunar + True + True + + + 2 + 3 + GTK_FILL + + + + + + Disable coordinate check + True + True + False + Compatibility mode + True + True + + + 3 + 4 + GTK_FILL + + + + + + Lazy screen update + True + True + False + True + Pandemonium 2 + True + True + + + 1 + 2 + GTK_FILL + + + + + + Old frame skipping + True + True + False + True + Skip every second frame + True + True + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + Repeated flat tex triangles + True + True + False + True + Needed by Dark Forces + True + True + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + + Draw quads with triangles + True + True + False + True + better g-colors, worse textures + True + True + + + 1 + 2 + 3 + 4 + GTK_FILL + + + + + + Fake 'gpu busy' states + True + True + False + True + Toggle busy flags after drawing + True + True + + + 1 + 2 + 4 + 5 + GTK_FILL + + + + + + + + + + + 1 + + + + + + + + + True + <b>Compatibility</b> + True + + + label_item + + + + + 2 + + + + + True + 12 + end + + + gtk-close + True + True + True + False + True + + + False + False + 0 + + + + + 3 + + + + + + diff --git a/plugins/dfxvideo/gpucfg-0.1df/main.c b/plugins/dfxvideo/gpucfg-0.1df/main.c new file mode 100644 index 00000000..ddc99296 --- /dev/null +++ b/plugins/dfxvideo/gpucfg-0.1df/main.c @@ -0,0 +1,464 @@ +#include +#include + +#include "config.h" + +#ifdef ENABLE_NLS +#include +#include +#endif + +#include +#include +#include +#include +#include + +void SaveConfig(GtkWidget *widget, gpointer user_datal); + +#define READBINARY "rb" +#define WRITEBINARY "wb" +#define CONFIG_FILENAME "dfxvideo.cfg" + +enum { + VIDMODE_320x200 = 0, + VIDMODE_640x480, + VIDMODE_800x600, + VIDMODE_1024x768, + VIDMODE_1152x864, + VIDMODE_1280x1024, + VIDMODE_1600x1200 +}; /* Video_modes */ + +/*ADB static GtkWidget * wndMain=0;*/ + +/* This function checks for the value being outside the accepted range, + and returns the appropriate boundary value */ +int set_limit (char *p, int len, int lower, int upper) +{ + int val = 0; + + if (p) + val = atoi(p + len); + /* printf("Checking for val %d greater than %d and lower than %d, ", val, lower, upper);*/ + if (val < lower) + val = lower; + if (val > upper) + val = upper; + /* printf ("val is now %d\n", val);*/ + return val; +} + +void on_about_clicked(GtkWidget *widget, gpointer user_data) +{ + gtk_widget_destroy (widget); + exit (0); +} + +void set_widget_sensitive(GtkWidget *widget, gpointer user_data) +{ + gtk_widget_set_sensitive (widget, (int)user_data); +} + +void on_fullscreen_toggled(GtkWidget *widget, gpointer user_data) +{ + GtkWidget *check, *resCombo2; + GladeXML *xml; + xml = (GladeXML*) user_data; + + check = glade_xml_get_widget(xml, "checkFullscreen"); + resCombo2 = glade_xml_get_widget(xml, "resCombo2"); + + set_widget_sensitive(resCombo2, !gtk_toggle_button_get_active(check)); +} + +void on_use_fixes_toggled(GtkWidget *widget, gpointer user_data) +{ + GtkWidget *check, *table_fixes; + GladeXML *xml; + xml = (GladeXML*) user_data; + check = glade_xml_get_widget (xml, "checkUseFixes"); + + table_fixes = glade_xml_get_widget (xml, "table_fixes"); + + /* Set the state of each of the fixes to the value of the use fixes toggle */ + gtk_container_foreach (GTK_CONTAINER (table_fixes), (GtkCallback) set_widget_sensitive, + (void *)gtk_toggle_button_get_active (check)); +} + +void on_fps_toggled(GtkWidget *widget, gpointer user_data) +{ + GtkWidget *checkSetFPS, *checkAutoFPSLimit, *entryFPS; + GladeXML *xml; + + xml = (GladeXML*) user_data; + checkSetFPS = glade_xml_get_widget(xml, "checkSetFPS"); + checkAutoFPSLimit = glade_xml_get_widget(xml, "checkAutoFPSLimit"); + entryFPS = glade_xml_get_widget(xml, "entryFPS"); + + set_widget_sensitive(entryFPS, + gtk_toggle_button_get_active(checkSetFPS) && !gtk_toggle_button_get_active(checkAutoFPSLimit)); + set_widget_sensitive(checkAutoFPSLimit, gtk_toggle_button_get_active(checkSetFPS)); +} + +void OnConfigClose(GtkWidget *widget, gpointer user_data) +{ + GladeXML *xml = (GladeXML *)user_data; + + gtk_widget_destroy(glade_xml_get_widget(xml, "CfgWnd")); + gtk_exit(0); +} + +int +main (int argc, char *argv[]) +{ + GtkWidget *CfgWnd, *widget; + GladeXML *xml; + FILE *in;char t[256];int len,val; + float valf; + char * pB, * p; + char cfg[255]; + int i; + char tempstr[50]; + +#ifdef ENABLE_NLS + setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + + if (argc!=2) { + printf("Usage: cfgDFXVideo {ABOUT | CFG}\n"); + return 0; + } + if(strcmp(argv[1],"CFG")!=0 && strcmp(argv[1],"ABOUT")!=0) { + printf("Usage: cfgDFXVideo {ABOUT | CFG}\n"); + return 0; + } + + gtk_set_locale (); + gtk_init (&argc, &argv); + + + if (strcmp(argv[1], "ABOUT") == 0) { + const char *authors[]= {"Pete Bernert and the P.E.Op.S. team", "Ryan Schultz", "Andrew Burton", NULL}; + widget = gtk_about_dialog_new (); + gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (widget), "P.E.Op.S PCSX Video Plugin"); + gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (widget), "1.17"); + gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (widget), authors); + gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (widget), "http://pcsx-df.sourceforge.net/"); + + g_signal_connect_data(GTK_OBJECT(widget), "response", + GTK_SIGNAL_FUNC(on_about_clicked), NULL, NULL, G_CONNECT_AFTER); + + gtk_widget_show (widget); + gtk_main(); + + return 0; + } + + xml = glade_xml_new(DATADIR "dfxvideo.glade2", "CfgWnd", NULL); + if (!xml) { + g_warning("We could not load the interface!"); + return -1; + } + + /*ADB wndMain = glade_xml_get_widget(xml, "CfgWnd");*/ + + strcpy(cfg, CONFIG_FILENAME); + + in = fopen(cfg,READBINARY); + /* ADB TODO This is bad - asking for problems; need to read in line by line */ + if(in) + { + pB=(char *)malloc(32767); + memset(pB,0,32767); + len = fread(pB, 1, 32767, in); + fclose(in); + } + else{ pB=0;printf("Couldn't find config file %s\n", cfg);} +/* ADB TODO Parse this like we parse the config file in PCSX - use common functions! */ + val=1; + if(pB) + { + strcpy(t,"\nResX");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + val = set_limit (p, len, 0, 1600); + } + + if (val == 1600) val = VIDMODE_1600x1200; + else if (val == 1280) val = VIDMODE_1280x1024; + else if (val == 1152) val = VIDMODE_1152x864; + else if (val == 1024) val = VIDMODE_1024x768; + else if (val == 800) val = VIDMODE_800x600; + else if (val == 640) val = VIDMODE_640x480; + else if (val == 320) val = VIDMODE_320x200; + + gtk_combo_box_set_active(GTK_COMBO_BOX (glade_xml_get_widget(xml, "resCombo2")), val); + + val=0; + if(pB) + { + strcpy(t,"\nNoStretch");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + + val = set_limit (p, len, 0, 9); + } + + gtk_combo_box_set_active(GTK_COMBO_BOX (glade_xml_get_widget(xml, "stretchCombo2")), val); + + val=0; + if(pB) + { + strcpy(t,"\nDithering");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + + val = set_limit (p, len, 0, 2); + } + + gtk_combo_box_set_active(GTK_COMBO_BOX (glade_xml_get_widget(xml, "ditherCombo2")), val); + + val=0; + if(pB) + { + strcpy(t,"\nMaintain43");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + + val = set_limit (p, len, 0, 1); + } + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "maintain43")), val); + + val=0; //ADB Leave - these are default values + if(pB) + { + strcpy(t,"\nFullScreen");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + + val = set_limit (p, len, 0, 1); + } + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "checkFullscreen")), val); + + val=0; + if(pB) + { + strcpy(t,"\nShowFPS");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + + val = set_limit (p, len, 0, 1); + } + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "checkShowFPS")), val); + + val=1; + if(pB) + { + strcpy(t,"\nUseFrameLimit");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + + val = set_limit (p, len, 0, 1); + } + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "checkSetFPS")), val); + + val=0; + if(pB) + { + strcpy(t,"\nFPSDetection");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + + val = set_limit (p, len, 1, 2); + } + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "checkAutoFPSLimit")), (val-1)); + + val=0; + if(pB) + { + strcpy(t,"\nUseFrameSkip");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + val = set_limit (p, len, 0, 1); + } + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "checkFrameSkip")), val); + + valf=200; + if(pB) + { + strcpy(t,"\nFrameRate");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) valf=(float)atoi(p+len) / 10; + if(valf<1) valf=1; + if(valf>500) valf=500; + } + sprintf(tempstr,"%.1f",valf); + gtk_entry_set_text(glade_xml_get_widget(xml, "entryFPS"),tempstr); + + val=0; + if(pB) + { + strcpy(t,"\nUseFixes");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + + val = set_limit (p, len, 0, 1); + } + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "checkUseFixes")), val); + + + if(pB) + { + strcpy(t,"\nCfgFixes");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if (p) + val = atoi(p + len); + } + + for (i=0; i<11; i++) + { + sprintf(tempstr, "checkFix%d", i+1); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, tempstr)), (val>>i)&1 ); + } + + + if(pB) free(pB); + + widget = glade_xml_get_widget(xml, "CfgWnd"); + g_signal_connect_data(GTK_OBJECT(widget), "destroy", + GTK_SIGNAL_FUNC(SaveConfig), xml, NULL, 0); + + widget = glade_xml_get_widget(xml, "btn_close"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(OnConfigClose), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "checkFullscreen"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_fullscreen_toggled), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "checkUseFixes"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_use_fixes_toggled), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "checkSetFPS"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_fps_toggled), xml, NULL, G_CONNECT_AFTER); + + widget = glade_xml_get_widget(xml, "checkAutoFPSLimit"); + g_signal_connect_data(GTK_OBJECT(widget), "clicked", + GTK_SIGNAL_FUNC(on_fps_toggled), xml, NULL, G_CONNECT_AFTER); + + on_fullscreen_toggled(widget, (gpointer) xml); + on_fps_toggled(widget, (gpointer) xml); + on_use_fixes_toggled(widget, (gpointer) xml); + + gtk_main (); + return 0; +} + + +void SetCfgVal(char * pB,char * pE,int val) +{ + char * p, *ps, *pC;char t[32]; + + sprintf(t,"%d",val); + + p=strstr(pB,pE); + if(p) + { + p=strstr(p,"="); + if(!p) return; + p++; + while(*p && *p!='\n' && (*p<'0' || *p>'9')) p++; + if(*p==0 || *p=='\n') return; + ps=p; + while(*p>='0' && *p<='9') p++; + pC=(char *)malloc(32767); + strcpy(pC,p); + strcpy(ps,t); + strcat(pB,pC); + free(pC); + } + else + { + strcat(pB,pE); + strcat(pB," = "); + strcat(pB,t); + strcat(pB,"\n"); + } +} + +void SaveConfig(GtkWidget *widget, gpointer user_data) +{ + FILE *in;int len,val;char * pB; + GladeXML *xml; + char cfg[255]; + char tempstr[50]; + int i; + struct stat buf; + + pB=(char *)malloc(32767); + memset(pB,0,32767); + + strcpy(cfg, CONFIG_FILENAME); + + /* ADB TODO Why do we read this in just to replace it again? */ + in = fopen(cfg,READBINARY); + if(in) + { + len = fread(pB, 1, 32767, in); + fclose(in); + } + xml = (GladeXML*) user_data; + + val = gtk_combo_box_get_active (GTK_COMBO_BOX (glade_xml_get_widget (xml, "resCombo2"))); + + if (val == VIDMODE_320x200) { SetCfgVal(pB,"\nResX",320); SetCfgVal(pB,"\nResY",240); } + else if (val == VIDMODE_640x480) { SetCfgVal(pB,"\nResX",640); SetCfgVal(pB,"\nResY",480); } + else if (val == VIDMODE_800x600) { SetCfgVal(pB,"\nResX",800); SetCfgVal(pB,"\nResY",600); } + else if (val == VIDMODE_1024x768) { SetCfgVal(pB,"\nResX",1024); SetCfgVal(pB,"\nResY",768); } + else if (val == VIDMODE_1152x864) { SetCfgVal(pB,"\nResX",1152); SetCfgVal(pB,"\nResY",864); } + else if (val == VIDMODE_1280x1024) { SetCfgVal(pB,"\nResX",1280); SetCfgVal(pB,"\nResY",1024); } + else if (val == VIDMODE_1600x1200) { SetCfgVal(pB,"\nResX",1600); SetCfgVal(pB,"\nResY",1200); } + + val = gtk_combo_box_get_active (GTK_COMBO_BOX (glade_xml_get_widget (xml, "stretchCombo2"))); + SetCfgVal(pB,"\nNoStretch",val); + + val = gtk_combo_box_get_active (GTK_COMBO_BOX (glade_xml_get_widget (xml, "ditherCombo2"))); + SetCfgVal(pB,"\nDithering",val); + + val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "maintain43"))); + SetCfgVal(pB,"\nMaintain43",val); + + val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkFullscreen"))); + SetCfgVal(pB,"\nFullScreen",val); + + val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkShowFPS"))); + SetCfgVal(pB,"\nShowFPS",val); + + val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkSetFPS"))); + SetCfgVal(pB,"\nUseFrameLimit",val); + + val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkAutoFPSLimit"))); + SetCfgVal(pB,"\nFPSDetection",val+1); + + val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkFrameSkip"))); + SetCfgVal(pB,"\nUseFrameSkip",val); + + //Framerate stored *10 + val = atof(gtk_entry_get_text(glade_xml_get_widget(xml, "entryFPS"))) * 10; + SetCfgVal(pB,"\nFrameRate",val); + + val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkUseFixes"))); + SetCfgVal(pB,"\nUseFixes",val); + + + val = 0; + for (i=0; i<11; i++) + { + sprintf(tempstr, "checkFix%d", i+1); + if( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, tempstr))) ) + val |= 1 << i; + } + + SetCfgVal(pB,"\nCfgFixes",val); + + + + if((in=fopen(cfg, WRITEBINARY))!=NULL) + { + fwrite(pB,strlen(pB),1,in); + fclose(in); + } + + free(pB); + + // Close the window and exit control from the plugin + gtk_exit (0); +} diff --git a/plugins/dfxvideo/hq2x.h b/plugins/dfxvideo/hq2x.h new file mode 100644 index 00000000..e69b8e1a --- /dev/null +++ b/plugins/dfxvideo/hq2x.h @@ -0,0 +1,1870 @@ +#define P0 dst0[0] +#define P1 dst0[1] +#define P2 dst1[0] +#define P3 dst1[1] +#define MUR interp_32_diff(c[1], c[5]) +#define MDR interp_32_diff(c[5], c[7]) +#define MDL interp_32_diff(c[7], c[3]) +#define MUL interp_32_diff(c[3], c[1]) +#define IC(p0) c[p0] +#define I11(p0,p1) interp_32_11(c[p0], c[p1]) +#define I211(p0,p1,p2) interp_32_211(c[p0], c[p1], c[p2]) +#define I31(p0,p1) interp_32_31(c[p0], c[p1]) +#define I332(p0,p1,p2) interp_32_332(c[p0], c[p1], c[p2]) +#define I431(p0,p1,p2) interp_32_431(c[p0], c[p1], c[p2]) +#define I521(p0,p1,p2) interp_32_521(c[p0], c[p1], c[p2]) +#define I53(p0,p1) interp_32_53(c[p0], c[p1]) +#define I611(p0,p1,p2) interp_32_611(c[p0], c[p1], c[p2]) +#define I71(p0,p1) interp_32_71(c[p0], c[p1]) +#define I772(p0,p1,p2) interp_32_772(c[p0], c[p1], c[p2]) +#define I97(p0,p1) interp_32_97(c[p0], c[p1]) +#define I1411(p0,p1,p2) interp_32_1411(c[p0], c[p1], c[p2]) +#define I151(p0,p1) interp_32_151(c[p0], c[p1]) + +case 0 : +case 1 : +case 4 : +case 5 : +case 32 : +case 33 : +case 36 : +case 37 : +case 128 : +case 129 : +case 132 : +case 133 : +case 160 : +case 161 : +case 164 : +case 165 : +{ + P0 = I211(4, 1, 3); + P1 = I211(4, 1, 5); + P2 = I211(4, 3, 7); + P3 = I211(4, 5, 7); +} break; +case 2 : +case 34 : +case 130 : +case 162 : +{ + P0 = I31(4, 0); + P1 = I31(4, 2); + P2 = I211(4, 3, 7); + P3 = I211(4, 5, 7); +} break; +case 3 : +case 35 : +case 131 : +case 163 : +{ + P0 = I31(4, 3); + P1 = I31(4, 2); + P2 = I211(4, 3, 7); + P3 = I211(4, 5, 7); +} break; +case 6 : +case 38 : +case 134 : +case 166 : +{ + P0 = I31(4, 0); + P1 = I31(4, 5); + P2 = I211(4, 3, 7); + P3 = I211(4, 5, 7); +} break; +case 7 : +case 39 : +case 135 : +case 167 : +{ + P0 = I31(4, 3); + P1 = I31(4, 5); + P2 = I211(4, 3, 7); + P3 = I211(4, 5, 7); +} break; +case 8 : +case 12 : +case 136 : +case 140 : +{ + P0 = I31(4, 0); + P1 = I211(4, 1, 5); + P2 = I31(4, 6); + P3 = I211(4, 5, 7); +} break; +case 9 : +case 13 : +case 137 : +case 141 : +{ + P0 = I31(4, 1); + P1 = I211(4, 1, 5); + P2 = I31(4, 6); + P3 = I211(4, 5, 7); +} break; +case 10 : +case 138 : +{ + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I211(4, 5, 7); + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I211(4, 1, 3); + } +} break; +case 11 : +case 139 : +{ + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I211(4, 5, 7); + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } +} break; +case 14 : +case 142 : +{ + P2 = I31(4, 6); + P3 = I211(4, 5, 7); + if (MUL) { + P0 = I31(4, 0); + P1 = I31(4, 5); + } else { + P0 = I332(1, 3, 4); + P1 = I521(4, 1, 5); + } +} break; +case 15 : +case 143 : +{ + P2 = I31(4, 6); + P3 = I211(4, 5, 7); + if (MUL) { + P0 = IC(4); + P1 = I31(4, 5); + } else { + P0 = I332(1, 3, 4); + P1 = I521(4, 1, 5); + } +} break; +case 16 : +case 17 : +case 48 : +case 49 : +{ + P0 = I211(4, 1, 3); + P1 = I31(4, 2); + P2 = I211(4, 3, 7); + P3 = I31(4, 8); +} break; +case 18 : +case 50 : +{ + P0 = I31(4, 0); + P2 = I211(4, 3, 7); + P3 = I31(4, 8); + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 19 : +case 51 : +{ + P2 = I211(4, 3, 7); + P3 = I31(4, 8); + if (MUR) { + P0 = I31(4, 3); + P1 = I31(4, 2); + } else { + P0 = I521(4, 1, 3); + P1 = I332(1, 5, 4); + } +} break; +case 20 : +case 21 : +case 52 : +case 53 : +{ + P0 = I211(4, 1, 3); + P1 = I31(4, 1); + P2 = I211(4, 3, 7); + P3 = I31(4, 8); +} break; +case 22 : +case 54 : +{ + P0 = I31(4, 0); + P2 = I211(4, 3, 7); + P3 = I31(4, 8); + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 23 : +case 55 : +{ + P2 = I211(4, 3, 7); + P3 = I31(4, 8); + if (MUR) { + P0 = I31(4, 3); + P1 = IC(4); + } else { + P0 = I521(4, 1, 3); + P1 = I332(1, 5, 4); + } +} break; +case 24 : +case 66 : +{ + P0 = I31(4, 0); + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I31(4, 8); +} break; +case 25 : +{ + P0 = I31(4, 1); + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I31(4, 8); +} break; +case 26 : +case 31 : +case 95 : +{ + P2 = I31(4, 6); + P3 = I31(4, 8); + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 27 : +case 75 : +{ + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I31(4, 8); + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } +} break; +case 28 : +{ + P0 = I31(4, 0); + P1 = I31(4, 1); + P2 = I31(4, 6); + P3 = I31(4, 8); +} break; +case 29 : +{ + P0 = I31(4, 1); + P1 = I31(4, 1); + P2 = I31(4, 6); + P3 = I31(4, 8); +} break; +case 30 : +case 86 : +{ + P0 = I31(4, 0); + P2 = I31(4, 6); + P3 = I31(4, 8); + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 40 : +case 44 : +case 168 : +case 172 : +{ + P0 = I31(4, 0); + P1 = I211(4, 1, 5); + P2 = I31(4, 7); + P3 = I211(4, 5, 7); +} break; +case 41 : +case 45 : +case 169 : +case 173 : +{ + P0 = I31(4, 1); + P1 = I211(4, 1, 5); + P2 = I31(4, 7); + P3 = I211(4, 5, 7); +} break; +case 42 : +case 170 : +{ + P1 = I31(4, 2); + P3 = I211(4, 5, 7); + if (MUL) { + P0 = I31(4, 0); + P2 = I31(4, 7); + } else { + P0 = I332(1, 3, 4); + P2 = I521(4, 3, 7); + } +} break; +case 43 : +case 171 : +{ + P1 = I31(4, 2); + P3 = I211(4, 5, 7); + if (MUL) { + P0 = IC(4); + P2 = I31(4, 7); + } else { + P0 = I332(1, 3, 4); + P2 = I521(4, 3, 7); + } +} break; +case 46 : +case 174 : +{ + P1 = I31(4, 5); + P2 = I31(4, 7); + P3 = I211(4, 5, 7); + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } +} break; +case 47 : +case 175 : +{ + P1 = I31(4, 5); + P2 = I31(4, 7); + P3 = I211(4, 5, 7); + if (MUL) { + P0 = IC(4); + } else { + P0 = I1411(4, 1, 3); + } +} break; +case 56 : +{ + P0 = I31(4, 0); + P1 = I31(4, 2); + P2 = I31(4, 7); + P3 = I31(4, 8); +} break; +case 57 : +{ + P0 = I31(4, 1); + P1 = I31(4, 2); + P2 = I31(4, 7); + P3 = I31(4, 8); +} break; +case 58 : +{ + P2 = I31(4, 7); + P3 = I31(4, 8); + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 59 : +{ + P2 = I31(4, 7); + P3 = I31(4, 8); + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 60 : +{ + P0 = I31(4, 0); + P1 = I31(4, 1); + P2 = I31(4, 7); + P3 = I31(4, 8); +} break; +case 61 : +{ + P0 = I31(4, 1); + P1 = I31(4, 1); + P2 = I31(4, 7); + P3 = I31(4, 8); +} break; +case 62 : +{ + P0 = I31(4, 0); + P2 = I31(4, 7); + P3 = I31(4, 8); + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 63 : +{ + P2 = I31(4, 7); + P3 = I31(4, 8); + if (MUL) { + P0 = IC(4); + } else { + P0 = I1411(4, 1, 3); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 64 : +case 65 : +case 68 : +case 69 : +{ + P0 = I211(4, 1, 3); + P1 = I211(4, 1, 5); + P2 = I31(4, 6); + P3 = I31(4, 8); +} break; +case 67 : +{ + P0 = I31(4, 3); + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I31(4, 8); +} break; +case 70 : +{ + P0 = I31(4, 0); + P1 = I31(4, 5); + P2 = I31(4, 6); + P3 = I31(4, 8); +} break; +case 71 : +{ + P0 = I31(4, 3); + P1 = I31(4, 5); + P2 = I31(4, 6); + P3 = I31(4, 8); +} break; +case 72 : +case 76 : +{ + P0 = I31(4, 0); + P1 = I211(4, 1, 5); + P3 = I31(4, 8); + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I211(4, 3, 7); + } +} break; +case 73 : +case 77 : +{ + P1 = I211(4, 1, 5); + P3 = I31(4, 8); + if (MDL) { + P0 = I31(4, 1); + P2 = I31(4, 6); + } else { + P0 = I521(4, 3, 1); + P2 = I332(3, 7, 4); + } +} break; +case 74 : +case 107 : +case 123 : +{ + P1 = I31(4, 2); + P3 = I31(4, 8); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } +} break; +case 78 : +{ + P1 = I31(4, 5); + P3 = I31(4, 8); + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } +} break; +case 79 : +{ + P1 = I31(4, 5); + P3 = I31(4, 8); + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } +} break; +case 80 : +case 81 : +{ + P0 = I211(4, 1, 3); + P1 = I31(4, 2); + P2 = I31(4, 6); + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I211(4, 5, 7); + } +} break; +case 82 : +case 214 : +case 222 : +{ + P0 = I31(4, 0); + P2 = I31(4, 6); + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 83 : +{ + P0 = I31(4, 3); + P2 = I31(4, 6); + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 84 : +case 85 : +{ + P0 = I211(4, 1, 3); + P2 = I31(4, 6); + if (MDR) { + P1 = I31(4, 1); + P3 = I31(4, 8); + } else { + P1 = I521(4, 5, 1); + P3 = I332(5, 7, 4); + } +} break; +case 87 : +{ + P0 = I31(4, 3); + P2 = I31(4, 6); + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 88 : +case 248 : +case 250 : +{ + P0 = I31(4, 0); + P1 = I31(4, 2); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } +} break; +case 89 : +{ + P0 = I31(4, 1); + P1 = I31(4, 2); + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } +} break; +case 90 : +{ + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 91 : +{ + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 92 : +{ + P0 = I31(4, 0); + P1 = I31(4, 1); + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } +} break; +case 93 : +{ + P0 = I31(4, 1); + P1 = I31(4, 1); + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } +} break; +case 94 : +{ + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 96 : +case 97 : +case 100 : +case 101 : +{ + P0 = I211(4, 1, 3); + P1 = I211(4, 1, 5); + P2 = I31(4, 3); + P3 = I31(4, 8); +} break; +case 98 : +{ + P0 = I31(4, 0); + P1 = I31(4, 2); + P2 = I31(4, 3); + P3 = I31(4, 8); +} break; +case 99 : +{ + P0 = I31(4, 3); + P1 = I31(4, 2); + P2 = I31(4, 3); + P3 = I31(4, 8); +} break; +case 102 : +{ + P0 = I31(4, 0); + P1 = I31(4, 5); + P2 = I31(4, 3); + P3 = I31(4, 8); +} break; +case 103 : +{ + P0 = I31(4, 3); + P1 = I31(4, 5); + P2 = I31(4, 3); + P3 = I31(4, 8); +} break; +case 104 : +case 108 : +{ + P0 = I31(4, 0); + P1 = I211(4, 1, 5); + P3 = I31(4, 8); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } +} break; +case 105 : +case 109 : +{ + P1 = I211(4, 1, 5); + P3 = I31(4, 8); + if (MDL) { + P0 = I31(4, 1); + P2 = IC(4); + } else { + P0 = I521(4, 3, 1); + P2 = I332(3, 7, 4); + } +} break; +case 106 : +case 120 : +{ + P0 = I31(4, 0); + P1 = I31(4, 2); + P3 = I31(4, 8); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } +} break; +case 110 : +{ + P0 = I31(4, 0); + P1 = I31(4, 5); + P3 = I31(4, 8); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } +} break; +case 111 : +{ + P1 = I31(4, 5); + P3 = I31(4, 8); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } + if (MUL) { + P0 = IC(4); + } else { + P0 = I1411(4, 1, 3); + } +} break; +case 112 : +case 113 : +{ + P0 = I211(4, 1, 3); + P1 = I31(4, 2); + if (MDR) { + P2 = I31(4, 3); + P3 = I31(4, 8); + } else { + P2 = I521(4, 7, 3); + P3 = I332(5, 7, 4); + } +} break; +case 114 : +{ + P0 = I31(4, 0); + P2 = I31(4, 3); + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 115 : +{ + P0 = I31(4, 3); + P2 = I31(4, 3); + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 116 : +case 117 : +{ + P0 = I211(4, 1, 3); + P1 = I31(4, 1); + P2 = I31(4, 3); + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } +} break; +case 118 : +{ + P0 = I31(4, 0); + P2 = I31(4, 3); + P3 = I31(4, 8); + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 119 : +{ + P2 = I31(4, 3); + P3 = I31(4, 8); + if (MUR) { + P0 = I31(4, 3); + P1 = IC(4); + } else { + P0 = I521(4, 1, 3); + P1 = I332(1, 5, 4); + } +} break; +case 121 : +{ + P0 = I31(4, 1); + P1 = I31(4, 2); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } +} break; +case 122 : +{ + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } + if (MDR) { + P3 = I31(4, 8); + } else { + P3 = I611(4, 5, 7); + } + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 124 : +{ + P0 = I31(4, 0); + P1 = I31(4, 1); + P3 = I31(4, 8); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } +} break; +case 125 : +{ + P1 = I31(4, 1); + P3 = I31(4, 8); + if (MDL) { + P0 = I31(4, 1); + P2 = IC(4); + } else { + P0 = I521(4, 3, 1); + P2 = I332(3, 7, 4); + } +} break; +case 126 : +{ + P0 = I31(4, 0); + P3 = I31(4, 8); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 127 : +{ + P3 = I31(4, 8); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } + if (MUL) { + P0 = IC(4); + } else { + P0 = I1411(4, 1, 3); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 144 : +case 145 : +case 176 : +case 177 : +{ + P0 = I211(4, 1, 3); + P1 = I31(4, 2); + P2 = I211(4, 3, 7); + P3 = I31(4, 7); +} break; +case 146 : +case 178 : +{ + P0 = I31(4, 0); + P2 = I211(4, 3, 7); + if (MUR) { + P1 = I31(4, 2); + P3 = I31(4, 7); + } else { + P1 = I332(1, 5, 4); + P3 = I521(4, 5, 7); + } +} break; +case 147 : +case 179 : +{ + P0 = I31(4, 3); + P2 = I211(4, 3, 7); + P3 = I31(4, 7); + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 148 : +case 149 : +case 180 : +case 181 : +{ + P0 = I211(4, 1, 3); + P1 = I31(4, 1); + P2 = I211(4, 3, 7); + P3 = I31(4, 7); +} break; +case 150 : +case 182 : +{ + P0 = I31(4, 0); + P2 = I211(4, 3, 7); + if (MUR) { + P1 = IC(4); + P3 = I31(4, 7); + } else { + P1 = I332(1, 5, 4); + P3 = I521(4, 5, 7); + } +} break; +case 151 : +case 183 : +{ + P0 = I31(4, 3); + P2 = I211(4, 3, 7); + P3 = I31(4, 7); + if (MUR) { + P1 = IC(4); + } else { + P1 = I1411(4, 1, 5); + } +} break; +case 152 : +{ + P0 = I31(4, 0); + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I31(4, 7); +} break; +case 153 : +{ + P0 = I31(4, 1); + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I31(4, 7); +} break; +case 154 : +{ + P2 = I31(4, 6); + P3 = I31(4, 7); + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 155 : +{ + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I31(4, 7); + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } +} break; +case 156 : +{ + P0 = I31(4, 0); + P1 = I31(4, 1); + P2 = I31(4, 6); + P3 = I31(4, 7); +} break; +case 157 : +{ + P0 = I31(4, 1); + P1 = I31(4, 1); + P2 = I31(4, 6); + P3 = I31(4, 7); +} break; +case 158 : +{ + P2 = I31(4, 6); + P3 = I31(4, 7); + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 159 : +{ + P2 = I31(4, 6); + P3 = I31(4, 7); + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I1411(4, 1, 5); + } +} break; +case 184 : +{ + P0 = I31(4, 0); + P1 = I31(4, 2); + P2 = I31(4, 7); + P3 = I31(4, 7); +} break; +case 185 : +{ + P0 = I31(4, 1); + P1 = I31(4, 2); + P2 = I31(4, 7); + P3 = I31(4, 7); +} break; +case 186 : +{ + P2 = I31(4, 7); + P3 = I31(4, 7); + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 187 : +{ + P1 = I31(4, 2); + P3 = I31(4, 7); + if (MUL) { + P0 = IC(4); + P2 = I31(4, 7); + } else { + P0 = I332(1, 3, 4); + P2 = I521(4, 3, 7); + } +} break; +case 188 : +{ + P0 = I31(4, 0); + P1 = I31(4, 1); + P2 = I31(4, 7); + P3 = I31(4, 7); +} break; +case 189 : +{ + P0 = I31(4, 1); + P1 = I31(4, 1); + P2 = I31(4, 7); + P3 = I31(4, 7); +} break; +case 190 : +{ + P0 = I31(4, 0); + P2 = I31(4, 7); + if (MUR) { + P1 = IC(4); + P3 = I31(4, 7); + } else { + P1 = I332(1, 5, 4); + P3 = I521(4, 5, 7); + } +} break; +case 191 : +{ + P2 = I31(4, 7); + P3 = I31(4, 7); + if (MUL) { + P0 = IC(4); + } else { + P0 = I1411(4, 1, 3); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I1411(4, 1, 5); + } +} break; +case 192 : +case 193 : +case 196 : +case 197 : +{ + P0 = I211(4, 1, 3); + P1 = I211(4, 1, 5); + P2 = I31(4, 6); + P3 = I31(4, 5); +} break; +case 194 : +{ + P0 = I31(4, 0); + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I31(4, 5); +} break; +case 195 : +{ + P0 = I31(4, 3); + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I31(4, 5); +} break; +case 198 : +{ + P0 = I31(4, 0); + P1 = I31(4, 5); + P2 = I31(4, 6); + P3 = I31(4, 5); +} break; +case 199 : +{ + P0 = I31(4, 3); + P1 = I31(4, 5); + P2 = I31(4, 6); + P3 = I31(4, 5); +} break; +case 200 : +case 204 : +{ + P0 = I31(4, 0); + P1 = I211(4, 1, 5); + if (MDL) { + P2 = I31(4, 6); + P3 = I31(4, 5); + } else { + P2 = I332(3, 7, 4); + P3 = I521(4, 7, 5); + } +} break; +case 201 : +case 205 : +{ + P0 = I31(4, 1); + P1 = I211(4, 1, 5); + P3 = I31(4, 5); + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } +} break; +case 202 : +{ + P1 = I31(4, 2); + P3 = I31(4, 5); + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } +} break; +case 203 : +{ + P1 = I31(4, 2); + P2 = I31(4, 6); + P3 = I31(4, 5); + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } +} break; +case 206 : +{ + P1 = I31(4, 5); + P3 = I31(4, 5); + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } +} break; +case 207 : +{ + P2 = I31(4, 6); + P3 = I31(4, 5); + if (MUL) { + P0 = IC(4); + P1 = I31(4, 5); + } else { + P0 = I332(1, 3, 4); + P1 = I521(4, 1, 5); + } +} break; +case 208 : +case 209 : +{ + P0 = I211(4, 1, 3); + P1 = I31(4, 2); + P2 = I31(4, 6); + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } +} break; +case 210 : +case 216 : +{ + P0 = I31(4, 0); + P1 = I31(4, 2); + P2 = I31(4, 6); + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } +} break; +case 211 : +{ + P0 = I31(4, 3); + P1 = I31(4, 2); + P2 = I31(4, 6); + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } +} break; +case 212 : +case 213 : +{ + P0 = I211(4, 1, 3); + P2 = I31(4, 6); + if (MDR) { + P1 = I31(4, 1); + P3 = IC(4); + } else { + P1 = I521(4, 5, 1); + P3 = I332(5, 7, 4); + } +} break; +case 215 : +{ + P0 = I31(4, 3); + P2 = I31(4, 6); + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I1411(4, 1, 5); + } +} break; +case 217 : +{ + P0 = I31(4, 1); + P1 = I31(4, 2); + P2 = I31(4, 6); + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } +} break; +case 218 : +{ + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 219 : +{ + P1 = I31(4, 2); + P2 = I31(4, 6); + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } +} break; +case 220 : +{ + P0 = I31(4, 0); + P1 = I31(4, 1); + if (MDL) { + P2 = I31(4, 6); + } else { + P2 = I611(4, 3, 7); + } + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } +} break; +case 221 : +{ + P0 = I31(4, 1); + P2 = I31(4, 6); + if (MDR) { + P1 = I31(4, 1); + P3 = IC(4); + } else { + P1 = I521(4, 5, 1); + P3 = I332(5, 7, 4); + } +} break; +case 223 : +{ + P2 = I31(4, 6); + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I1411(4, 1, 5); + } +} break; +case 224 : +case 225 : +case 228 : +case 229 : +{ + P0 = I211(4, 1, 3); + P1 = I211(4, 1, 5); + P2 = I31(4, 3); + P3 = I31(4, 5); +} break; +case 226 : +{ + P0 = I31(4, 0); + P1 = I31(4, 2); + P2 = I31(4, 3); + P3 = I31(4, 5); +} break; +case 227 : +{ + P0 = I31(4, 3); + P1 = I31(4, 2); + P2 = I31(4, 3); + P3 = I31(4, 5); +} break; +case 230 : +{ + P0 = I31(4, 0); + P1 = I31(4, 5); + P2 = I31(4, 3); + P3 = I31(4, 5); +} break; +case 231 : +{ + P0 = I31(4, 3); + P1 = I31(4, 5); + P2 = I31(4, 3); + P3 = I31(4, 5); +} break; +case 232 : +case 236 : +{ + P0 = I31(4, 0); + P1 = I211(4, 1, 5); + if (MDL) { + P2 = IC(4); + P3 = I31(4, 5); + } else { + P2 = I332(3, 7, 4); + P3 = I521(4, 7, 5); + } +} break; +case 233 : +case 237 : +{ + P0 = I31(4, 1); + P1 = I211(4, 1, 5); + P3 = I31(4, 5); + if (MDL) { + P2 = IC(4); + } else { + P2 = I1411(4, 3, 7); + } +} break; +case 234 : +{ + P1 = I31(4, 2); + P3 = I31(4, 5); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } + if (MUL) { + P0 = I31(4, 0); + } else { + P0 = I611(4, 1, 3); + } +} break; +case 235 : +{ + P1 = I31(4, 2); + P3 = I31(4, 5); + if (MDL) { + P2 = IC(4); + } else { + P2 = I1411(4, 3, 7); + } + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } +} break; +case 238 : +{ + P0 = I31(4, 0); + P1 = I31(4, 5); + if (MDL) { + P2 = IC(4); + P3 = I31(4, 5); + } else { + P2 = I332(3, 7, 4); + P3 = I521(4, 7, 5); + } +} break; +case 239 : +{ + P1 = I31(4, 5); + P3 = I31(4, 5); + if (MDL) { + P2 = IC(4); + } else { + P2 = I1411(4, 3, 7); + } + if (MUL) { + P0 = IC(4); + } else { + P0 = I1411(4, 1, 3); + } +} break; +case 240 : +case 241 : +{ + P0 = I211(4, 1, 3); + P1 = I31(4, 2); + if (MDR) { + P2 = I31(4, 3); + P3 = IC(4); + } else { + P2 = I521(4, 7, 3); + P3 = I332(5, 7, 4); + } +} break; +case 242 : +{ + P0 = I31(4, 0); + P2 = I31(4, 3); + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } + if (MUR) { + P1 = I31(4, 2); + } else { + P1 = I611(4, 1, 5); + } +} break; +case 243 : +{ + P0 = I31(4, 3); + P1 = I31(4, 2); + if (MDR) { + P2 = I31(4, 3); + P3 = IC(4); + } else { + P2 = I521(4, 7, 3); + P3 = I332(5, 7, 4); + } +} break; +case 244 : +case 245 : +{ + P0 = I211(4, 1, 3); + P1 = I31(4, 1); + P2 = I31(4, 3); + if (MDR) { + P3 = IC(4); + } else { + P3 = I1411(4, 5, 7); + } +} break; +case 246 : +{ + P0 = I31(4, 0); + P2 = I31(4, 3); + if (MDR) { + P3 = IC(4); + } else { + P3 = I1411(4, 5, 7); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 247 : +{ + P0 = I31(4, 3); + P2 = I31(4, 3); + if (MDR) { + P3 = IC(4); + } else { + P3 = I1411(4, 5, 7); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I1411(4, 1, 5); + } +} break; +case 249 : +{ + P0 = I31(4, 1); + P1 = I31(4, 2); + if (MDL) { + P2 = IC(4); + } else { + P2 = I1411(4, 3, 7); + } + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } +} break; +case 251 : +{ + P1 = I31(4, 2); + if (MDL) { + P2 = IC(4); + } else { + P2 = I1411(4, 3, 7); + } + if (MDR) { + P3 = IC(4); + } else { + P3 = I211(4, 5, 7); + } + if (MUL) { + P0 = IC(4); + } else { + P0 = I211(4, 1, 3); + } +} break; +case 252 : +{ + P0 = I31(4, 0); + P1 = I31(4, 1); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } + if (MDR) { + P3 = IC(4); + } else { + P3 = I1411(4, 5, 7); + } +} break; +case 253 : +{ + P0 = I31(4, 1); + P1 = I31(4, 1); + if (MDL) { + P2 = IC(4); + } else { + P2 = I1411(4, 3, 7); + } + if (MDR) { + P3 = IC(4); + } else { + P3 = I1411(4, 5, 7); + } +} break; +case 254 : +{ + P0 = I31(4, 0); + if (MDL) { + P2 = IC(4); + } else { + P2 = I211(4, 3, 7); + } + if (MDR) { + P3 = IC(4); + } else { + P3 = I1411(4, 5, 7); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I211(4, 1, 5); + } +} break; +case 255 : +{ + if (MDL) { + P2 = IC(4); + } else { + P2 = I1411(4, 3, 7); + } + if (MDR) { + P3 = IC(4); + } else { + P3 = I1411(4, 5, 7); + } + if (MUL) { + P0 = IC(4); + } else { + P0 = I1411(4, 1, 3); + } + if (MUR) { + P1 = IC(4); + } else { + P1 = I1411(4, 1, 5); + } +} break; + +#undef P0 +#undef P1 +#undef P2 +#undef P3 +#undef MUR +#undef MDR +#undef MDL +#undef MUL +#undef IC +#undef I11 +#undef I211 +#undef I31 +#undef I332 +#undef I431 +#undef I521 +#undef I53 +#undef I611 +#undef I71 +#undef I772 +#undef I97 +#undef I1411 +#undef I151 diff --git a/plugins/dfxvideo/hq3x.h b/plugins/dfxvideo/hq3x.h new file mode 100644 index 00000000..4809b794 --- /dev/null +++ b/plugins/dfxvideo/hq3x.h @@ -0,0 +1,2970 @@ +/* + * This file is part of the Advance project. + * + * Copyright (C) 2004 Andrea Mazzoleni + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * In addition, as a special exception, Andrea Mazzoleni + * gives permission to link the code of this program with + * the MAME library (or with modified versions of MAME that use the + * same license as MAME), and distribute linked combinations including + * the two. You must obey the GNU General Public License in all + * respects for all of the code used other than MAME. If you modify + * this file, you may extend this exception to your version of the + * file, but you are not obligated to do so. If you do not wish to + * do so, delete this exception statement from your version. + */ + +/* + * This effect is a rewritten implementation of the hq effect made by Maxim Stepin + */ + +#define P0 dst0[0] +#define P1 dst0[1] +#define P2 dst0[2] +#define P3 dst1[0] +#define P4 dst1[1] +#define P5 dst1[2] +#define P6 dst2[0] +#define P7 dst2[1] +#define P8 dst2[2] +#define MUR interp_32_diff(c[1], c[5]) +#define MDR interp_32_diff(c[5], c[7]) +#define MDL interp_32_diff(c[7], c[3]) +#define MUL interp_32_diff(c[3], c[1]) +#define IC(p0) c[p0] +#define I11(p0,p1) interp_32_11(c[p0], c[p1]) +#define I211(p0,p1,p2) interp_32_211(c[p0], c[p1], c[p2]) +#define I31(p0,p1) interp_32_31(c[p0], c[p1]) +#define I332(p0,p1,p2) interp_32_332(c[p0], c[p1], c[p2]) +#define I431(p0,p1,p2) interp_32_431(c[p0], c[p1], c[p2]) +#define I521(p0,p1,p2) interp_32_521(c[p0], c[p1], c[p2]) +#define I53(p0,p1) interp_32_53(c[p0], c[p1]) +#define I611(p0,p1,p2) interp_32_611(c[p0], c[p1], c[p2]) +#define I71(p0,p1) interp_32_71(c[p0], c[p1]) +#define I772(p0,p1,p2) interp_32_772(c[p0], c[p1], c[p2]) +#define I97(p0,p1) interp_32_97(c[p0], c[p1]) +#define I1411(p0,p1,p2) interp_32_1411(c[p0], c[p1], c[p2]) +#define I151(p0,p1) interp_32_151(c[p0], c[p1]) + +case 0 : +case 1 : +case 4 : +case 5 : +case 32 : +case 33 : +case 36 : +case 37 : +case 128 : +case 129 : +case 132 : +case 133 : +case 160 : +case 161 : +case 164 : +case 165 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); + +} break; +case 2 : +case 34 : +case 130 : +case 162 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +} break; +case 3 : +case 35 : +case 131 : +case 163 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +} break; +case 6 : +case 38 : +case 134 : +case 166 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4,5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +} break; +case 7 : +case 39 : +case 135 : +case 167 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4,5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +} break; +case 8 : +case 12 : +case 136 : +case 140 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +} break; +case 9 : +case 13 : +case 137 : +case 141 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +} break; +case 10 : +case 138 : +{ +P2 = I31(4, 2); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +if (MUL) { + P0 = I31(4, 0); + P1 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); + P3 = I71(4, 3); +} +} break; +case 11 : +case 139 : +{ +P2 = I31(4, 2); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); + P3 = I71(4, 3); +} +} break; +case 14 : +case 142 : +{ +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +if (MUL) { + P0 = I31(4, 0); + P1 = IC(4); + P2 = I31(4,5); + P3 = IC(4); +} else { + P0 = I11(1, 3); + P1 = I31(1, 4); + P2 = I211(4, 1, 5); + P3 = I31(4, 3); +} +} break; +case 15 : +case 143 : +{ +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P2 = I31(4,5); + P3 = IC(4); +} else { + P0 = I11(1, 3); + P1 = I31(1, 4); + P2 = I211(4, 1, 5); + P3 = I31(4, 3); +} +} break; +case 16 : +case 17 : +case 48 : +case 49 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +} break; +case 18 : +case 50 : +{ +P0 = I31(4, 0); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +if (MUR) { + P1 = IC(4); + P2 = I31(4, 2); + P5 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 19 : +case 51 : +{ +P3 = I31(4, 3); +P4 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +if (MUR) { + P0 = I31(4, 3); + P1 = IC(4); + P2 = I31(4, 2); + P5 = IC(4); +} else { + P0 = I211(4, 1, 3); + P1 = I31(1, 4); + P2 = I11(1, 5); + P5 = I31(4,5); +} +} break; +case 20 : +case 21 : +case 52 : +case 53 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +} break; +case 22 : +case 54 : +{ +P0 = I31(4, 0); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 23 : +case 55 : +{ +P3 = I31(4, 3); +P4 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +if (MUR) { + P0 = I31(4, 3); + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P0 = I211(4, 1, 3); + P1 = I31(1, 4); + P2 = I11(1, 5); + P5 = I31(4,5); +} +} break; +case 24 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 8); +} break; +case 25 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 8); +} break; +case 26 : +case 31 : +{ +P1 = IC(4); +P4 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 8); +if (MUL) { + P0 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P3 = I71(4, 3); +} +if (MUR) { + P2 = IC(4); + P5 = IC(4); +} else { + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 27 : +{ +P2 = I31(4, 2); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 8); +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); + P3 = I71(4, 3); +} +} break; +case 28 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 8); +} break; +case 29 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 8); +} break; +case 30 : +{ +P0 = I31(4, 0); +P3 = IC(4); +P4 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 8); +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 40 : +case 44 : +case 168 : +case 172 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +} break; +case 41 : +case 45 : +case 169 : +case 173 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +} break; +case 42 : +case 170 : +{ +P2 = I31(4, 2); +P4 = IC(4); +P5 = I31(4,5); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +if (MUL) { + P0 = I31(4, 0); + P1 = IC(4); + P3 = IC(4); + P6 = I31(4, 7); +} else { + P0 = I11(1, 3); + P1 = I31(4,1); + P3 = I31(3, 4); + P6 = I211(4, 3, 7); +} +} break; +case 43 : +case 171 : +{ +P2 = I31(4, 2); +P4 = IC(4); +P5 = I31(4,5); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); + P6 = I31(4, 7); +} else { + P0 = I11(1, 3); + P1 = I31(4,1); + P3 = I31(3, 4); + P6 = I211(4, 3, 7); +} +} break; +case 46 : +case 174 : +{ +P1 = IC(4); +P2 = I31(4,5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +} break; +case 47 : +case 175 : +{ +P1 = IC(4); +P2 = I31(4,5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I211(4, 5, 7); +if (MUL) { + P0 = IC(4); +} else { + P0 = I211(4, 1, 3); +} +} break; +case 56 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +} break; +case 57 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +} break; +case 58 : +{ +P1 = IC(4); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 59 : +{ +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); + P3 = I71(4, 3); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 60 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +} break; +case 61 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +} break; +case 62 : +{ +P0 = I31(4, 0); +P3 = IC(4); +P4 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 63 : +{ +P1 = IC(4); +P3 = IC(4); +P4 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 8); +if (MUL) { + P0 = IC(4); +} else { + P0 = I211(4, 1, 3); +} +if (MUR) { + P2 = IC(4); + P5 = IC(4); +} else { + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 64 : +case 65 : +case 68 : +case 69 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4, 8); +} break; +case 66 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4, 8); +} break; +case 67 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4, 8); +} break; +case 70 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4,5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4, 8); +} break; +case 71 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4,5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4, 8); +} break; +case 72 : +case 76 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P4 = IC(4); +P5 = I31(4,5); +P8 = I31(4, 8); +if (MDL) { + P3 = IC(4); + P6 = I31(4, 6); + P7 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +} break; +case 73 : +case 77 : +{ +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P4 = IC(4); +P5 = I31(4,5); +P8 = I31(4, 8); +if (MDL) { + P0 = I31(4,1); + P3 = IC(4); + P6 = I31(4, 6); + P7 = IC(4); +} else { + P0 = I211(4, 1, 3); + P3 = I31(3, 4); + P6 = I11(3, 7); + P7 = I31(4, 7); +} +} break; +case 74 : +case 107 : +{ +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P8 = I31(4, 8); +if (MDL) { + P6 = IC(4); + P7 = IC(4); +} else { + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +if (MUL) { + P0 = IC(4); + P1 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); +} +} break; +case 75 : +{ +P2 = I31(4, 2); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4, 8); +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); + P3 = I71(4, 3); +} +} break; +case 78 : +{ +P1 = IC(4); +P2 = I31(4,5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P7 = IC(4); +P8 = I31(4, 8); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +} break; +case 79 : +{ +P2 = I31(4,5); +P4 = IC(4); +P5 = I31(4,5); +P7 = IC(4); +P8 = I31(4, 8); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); + P3 = I71(4, 3); +} +} break; +case 80 : +case 81 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P5 = IC(4); + P7 = IC(4); + P8 = I31(4, 8); +} else { + P5 = I71(4, 5); + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +} break; +case 82 : +case 214 : +{ +P0 = I31(4, 0); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P7 = IC(4); + P8 = IC(4); +} else { + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +if (MUR) { + P1 = IC(4); + P2 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); +} +} break; +case 83 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = IC(4); +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 84 : +case 85 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P2 = I31(4,1); + P5 = IC(4); + P7 = IC(4); + P8 = I31(4, 8); +} else { + P2 = I211(4, 1, 5); + P5 = I31(5, 4); + P7 = I31(4, 7); + P8 = I11(5, 7); +} +} break; +case 86 : +{ +P0 = I31(4, 0); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4, 8); +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 87 : +{ +P0 = I31(4, 3); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I31(4, 6); +P7 = IC(4); +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 88 : +case 248 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4, 2); +P4 = IC(4); +P7 = IC(4); +if (MDL) { + P3 = IC(4); + P6 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); +} +if (MDR) { + P5 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P8 = I772(5, 7, 4); +} +} break; +case 89 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P7 = IC(4); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +} break; +case 90 : +{ +P1 = IC(4); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P7 = IC(4); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 91 : +{ +P4 = IC(4); +P5 = IC(4); +P7 = IC(4); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); + P3 = I71(4, 3); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 92 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P7 = IC(4); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +} break; +case 93 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P7 = IC(4); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +} break; +case 94 : +{ +P3 = IC(4); +P4 = IC(4); +P7 = IC(4); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 95 : +{ +P1 = IC(4); +P4 = IC(4); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4, 8); +if (MUL) { + P0 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P3 = I71(4, 3); +} +if (MUR) { + P2 = IC(4); + P5 = IC(4); +} else { + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 96 : +case 97 : +case 100 : +case 101 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4, 8); +} break; +case 98 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4, 8); +} break; +case 99 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4, 8); +} break; +case 102 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4,5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4, 8); +} break; +case 103 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4,5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4, 8); +} break; +case 104 : +case 108 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P4 = IC(4); +P5 = I31(4,5); +P8 = I31(4, 8); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +} break; +case 105 : +case 109 : +{ +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P4 = IC(4); +P5 = I31(4,5); +P8 = I31(4, 8); +if (MDL) { + P0 = I31(4,1); + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P0 = I211(4, 1, 3); + P3 = I31(3, 4); + P6 = I11(3, 7); + P7 = I31(4, 7); +} +} break; +case 106 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4, 2); +P4 = IC(4); +P5 = I31(4,5); +P8 = I31(4, 8); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +} break; +case 110 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4,5); +P4 = IC(4); +P5 = I31(4,5); +P8 = I31(4, 8); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +} break; +case 111 : +{ +P1 = IC(4); +P2 = I31(4,5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P8 = I31(4, 8); +if (MDL) { + P6 = IC(4); + P7 = IC(4); +} else { + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +if (MUL) { + P0 = IC(4); +} else { + P0 = I211(4, 1, 3); +} +} break; +case 112 : +case 113 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +if (MDR) { + P5 = IC(4); + P6 = I31(4, 3); + P7 = IC(4); + P8 = I31(4, 8); +} else { + P5 = I31(4,5); + P6 = I211(4, 3, 7); + P7 = I31(7, 4); + P8 = I11(5, 7); +} +} break; +case 114 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 3); +P7 = IC(4); +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 115 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 3); +P7 = IC(4); +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 116 : +case 117 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 3); +P7 = IC(4); +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +} break; +case 118 : +{ +P0 = I31(4, 0); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4, 8); +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 119 : +{ +P3 = I31(4, 3); +P4 = IC(4); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4, 8); +if (MUR) { + P0 = I31(4, 3); + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P0 = I211(4, 1, 3); + P1 = I31(1, 4); + P2 = I11(1, 5); + P5 = I31(4,5); +} +} break; +case 120 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4, 2); +P4 = IC(4); +P5 = IC(4); +P8 = I31(4, 8); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +} break; +case 121 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4, 2); +P4 = IC(4); +P5 = IC(4); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +} break; +case 122 : +{ +P1 = IC(4); +P4 = IC(4); +P5 = IC(4); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +if (MDR) { + P8 = I31(4, 8); +} else { + P8 = I211(4, 5, 7); +} +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 123 : +{ +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P8 = I31(4, 8); +if (MDL) { + P6 = IC(4); + P7 = IC(4); +} else { + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +if (MUL) { + P0 = IC(4); + P1 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); +} +} break; +case 124 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4,1); +P4 = IC(4); +P5 = IC(4); +P8 = I31(4, 8); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +} break; +case 125 : +{ +P1 = I31(4,1); +P2 = I31(4,1); +P4 = IC(4); +P5 = IC(4); +P8 = I31(4, 8); +if (MDL) { + P0 = I31(4,1); + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P0 = I211(4, 1, 3); + P3 = I31(3, 4); + P6 = I11(3, 7); + P7 = I31(4, 7); +} +} break; +case 126 : +{ +P0 = I31(4, 0); +P4 = IC(4); +P8 = I31(4, 8); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 127 : +{ +P4 = IC(4); +P8 = I31(4, 8); +if (MDL) { + P6 = IC(4); + P7 = IC(4); +} else { + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); +} else { + P0 = I211(4, 1, 3); + P1 = I71(4, 1); + P3 = I71(4, 3); +} +if (MUR) { + P2 = IC(4); + P5 = IC(4); +} else { + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 144 : +case 145 : +case 176 : +case 177 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I31(4, 7); +} break; +case 146 : +case 178 : +{ +P0 = I31(4, 0); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +if (MUR) { + P1 = IC(4); + P2 = I31(4, 2); + P5 = IC(4); + P8 = I31(4, 7); +} else { + P1 = I31(4,1); + P2 = I11(1, 5); + P5 = I31(5, 4); + P8 = I211(4, 5, 7); +} +} break; +case 147 : +case 179 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I31(4, 7); +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 148 : +case 149 : +case 180 : +case 181 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I31(4, 7); +} break; +case 150 : +case 182 : +{ +P0 = I31(4, 0); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); + P8 = I31(4, 7); +} else { + P1 = I31(4,1); + P2 = I11(1, 5); + P5 = I31(5, 4); + P8 = I211(4, 5, 7); +} +} break; +case 151 : +case 183 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I211(4, 3, 7); +P7 = I31(4, 7); +P8 = I31(4, 7); +if (MUR) { + P2 = IC(4); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 152 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 7); +} break; +case 153 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 7); +} break; +case 154 : +{ +P1 = IC(4); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 7); +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 155 : +{ +P2 = I31(4, 2); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 7); +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); + P3 = I71(4, 3); +} +} break; +case 156 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 7); +} break; +case 157 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 7); +} break; +case 158 : +{ +P3 = IC(4); +P4 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 7); +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); + P5 = I71(4, 5); +} +} break; +case 159 : +{ +P1 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +P7 = I31(4, 7); +P8 = I31(4, 7); +if (MUL) { + P0 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P3 = I71(4, 3); +} +if (MUR) { + P2 = IC(4); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 184 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 7); +} break; +case 185 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 7); +} break; +case 186 : +{ +P1 = IC(4); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 7); +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 187 : +{ +P2 = I31(4, 2); +P4 = IC(4); +P5 = IC(4); +P7 = I31(4, 7); +P8 = I31(4, 7); +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); + P6 = I31(4, 7); +} else { + P0 = I11(1, 3); + P1 = I31(4,1); + P3 = I31(3, 4); + P6 = I211(4, 3, 7); +} +} break; +case 188 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 7); +} break; +case 189 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 7); +} break; +case 190 : +{ +P0 = I31(4, 0); +P3 = IC(4); +P4 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); + P8 = I31(4, 7); +} else { + P1 = I31(4,1); + P2 = I11(1, 5); + P5 = I31(5, 4); + P8 = I211(4, 5, 7); +} +} break; +case 191 : +{ +P1 = IC(4); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 7); +P7 = I31(4, 7); +P8 = I31(4, 7); +if (MUL) { + P0 = IC(4); +} else { + P0 = I211(4, 1, 3); +} +if (MUR) { + P2 = IC(4); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 192 : +case 193 : +case 196 : +case 197 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4,5); +} break; +case 194 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4,5); +} break; +case 195 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4,5); +} break; +case 198 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4,5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4,5); +} break; +case 199 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4,5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4,5); +} break; +case 200 : +case 204 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P4 = IC(4); +P5 = I31(4,5); +if (MDL) { + P3 = IC(4); + P6 = I31(4, 6); + P7 = IC(4); + P8 = I31(4,5); +} else { + P3 = I31(4, 3); + P6 = I11(3, 7); + P7 = I31(7, 4); + P8 = I211(4, 5, 7); +} +} break; +case 201 : +case 205 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P7 = IC(4); +P8 = I31(4,5); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +} break; +case 202 : +{ +P1 = IC(4); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P7 = IC(4); +P8 = I31(4,5); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +} break; +case 203 : +{ +P2 = I31(4, 2); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4,5); +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); + P3 = I71(4, 3); +} +} break; +case 206 : +{ +P1 = IC(4); +P2 = I31(4,5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P7 = IC(4); +P8 = I31(4,5); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +} break; +case 207 : +{ +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 6); +P7 = IC(4); +P8 = I31(4,5); +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P2 = I31(4,5); + P3 = IC(4); +} else { + P0 = I11(1, 3); + P1 = I31(1, 4); + P2 = I211(4, 1, 5); + P3 = I31(4, 3); +} +} break; +case 208 : +case 209 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +} break; +case 210 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +} break; +case 211 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +} break; +case 212 : +case 213 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P2 = I31(4,1); + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P2 = I211(4, 1, 5); + P5 = I31(5, 4); + P7 = I31(4, 7); + P8 = I11(5, 7); +} +} break; +case 215 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P7 = IC(4); + P8 = IC(4); +} else { + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +if (MUR) { + P2 = IC(4); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 216 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +} break; +case 217 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +} break; +case 218 : +{ +P1 = IC(4); +P3 = IC(4); +P4 = IC(4); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MDR) { + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 219 : +{ +P2 = I31(4, 2); +P4 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +if (MUL) { + P0 = IC(4); + P1 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); + P3 = I71(4, 3); +} +} break; +case 220 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +if (MDL) { + P6 = I31(4, 6); +} else { + P6 = I211(4, 3, 7); +} +if (MDR) { + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +} break; +case 221 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P2 = I31(4,1); + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P2 = I211(4, 1, 5); + P5 = I31(5, 4); + P7 = I31(4, 7); + P8 = I11(5, 7); +} +} break; +case 222 : +{ +P0 = I31(4, 0); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P7 = IC(4); + P8 = IC(4); +} else { + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +if (MUR) { + P1 = IC(4); + P2 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); +} +} break; +case 223 : +{ +P4 = IC(4); +P6 = I31(4, 6); +if (MDR) { + P7 = IC(4); + P8 = IC(4); +} else { + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +if (MUL) { + P0 = IC(4); + P3 = IC(4); +} else { + P0 = I772(1, 3, 4); + P3 = I71(4, 3); +} +if (MUR) { + P1 = IC(4); + P2 = IC(4); + P5 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I211(4, 1, 5); + P5 = I71(4, 5); +} +} break; +case 224 : +case 225 : +case 228 : +case 229 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4,5); +} break; +case 226 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4,5); +} break; +case 227 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4,5); +} break; +case 230 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4,5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4,5); +} break; +case 231 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4,5); +P3 = I31(4, 3); +P4 = IC(4); +P5 = I31(4,5); +P6 = I31(4, 3); +P7 = IC(4); +P8 = I31(4,5); +} break; +case 232 : +case 236 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P4 = IC(4); +P5 = I31(4,5); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); + P8 = I31(4,5); +} else { + P3 = I31(4, 3); + P6 = I11(3, 7); + P7 = I31(7, 4); + P8 = I211(4, 5, 7); +} +} break; +case 233 : +case 237 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I211(4, 1, 5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P7 = IC(4); +P8 = I31(4,5); +if (MDL) { + P6 = IC(4); +} else { + P6 = I211(4, 3, 7); +} +} break; +case 234 : +{ +P1 = IC(4); +P2 = I31(4, 2); +P4 = IC(4); +P5 = I31(4,5); +P8 = I31(4,5); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); + P7 = I71(4, 7); +} +if (MUL) { + P0 = I31(4, 0); +} else { + P0 = I211(4, 1, 3); +} +} break; +case 235 : +{ +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P7 = IC(4); +P8 = I31(4,5); +if (MDL) { + P6 = IC(4); +} else { + P6 = I211(4, 3, 7); +} +if (MUL) { + P0 = IC(4); + P1 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); +} +} break; +case 238 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4,5); +P4 = IC(4); +P5 = I31(4,5); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); + P8 = I31(4,5); +} else { + P3 = I31(4, 3); + P6 = I11(3, 7); + P7 = I31(7, 4); + P8 = I211(4, 5, 7); +} +} break; +case 239 : +{ +P1 = IC(4); +P2 = I31(4,5); +P3 = IC(4); +P4 = IC(4); +P5 = I31(4,5); +P7 = IC(4); +P8 = I31(4,5); +if (MDL) { + P6 = IC(4); +} else { + P6 = I211(4, 3, 7); +} +if (MUL) { + P0 = IC(4); +} else { + P0 = I211(4, 1, 3); +} +} break; +case 240 : +case 241 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +if (MDR) { + P5 = IC(4); + P6 = I31(4, 3); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I31(4,5); + P6 = I211(4, 3, 7); + P7 = I31(7, 4); + P8 = I11(5, 7); +} +} break; +case 242 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P3 = I31(4, 3); +P4 = IC(4); +P6 = I31(4, 3); +if (MDR) { + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P7 = I71(4, 7); + P8 = I772(5, 7, 4); +} +if (MUR) { + P2 = I31(4, 2); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 243 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P2 = I31(4, 2); +P3 = I31(4, 3); +P4 = IC(4); +if (MDR) { + P5 = IC(4); + P6 = I31(4, 3); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I31(4,5); + P6 = I211(4, 3, 7); + P7 = I31(7, 4); + P8 = I11(5, 7); +} +} break; +case 244 : +case 245 : +{ +P0 = I211(4, 1, 3); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 3); +P7 = IC(4); +if (MDR) { + P8 = IC(4); +} else { + P8 = I211(4, 5, 7); +} +} break; +case 246 : +{ +P0 = I31(4, 0); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 3); +P7 = IC(4); +if (MDR) { + P8 = IC(4); +} else { + P8 = I211(4, 5, 7); +} +if (MUR) { + P1 = IC(4); + P2 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); +} +} break; +case 247 : +{ +P0 = I31(4, 3); +P1 = IC(4); +P3 = I31(4, 3); +P4 = IC(4); +P5 = IC(4); +P6 = I31(4, 3); +P7 = IC(4); +if (MDR) { + P8 = IC(4); +} else { + P8 = I211(4, 5, 7); +} +if (MUR) { + P2 = IC(4); +} else { + P2 = I211(4, 1, 5); +} +} break; +case 249 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4, 2); +P3 = IC(4); +P4 = IC(4); +P7 = IC(4); +if (MDL) { + P6 = IC(4); +} else { + P6 = I211(4, 3, 7); +} +if (MDR) { + P5 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P8 = I772(5, 7, 4); +} +} break; +case 250 : +{ +P0 = I31(4, 0); +P1 = IC(4); +P2 = I31(4, 2); +P4 = IC(4); +P7 = IC(4); +if (MDL) { + P3 = IC(4); + P6 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); +} +if (MDR) { + P5 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P8 = I772(5, 7, 4); +} +} break; +case 251 : +{ +P2 = I31(4, 2); +P4 = IC(4); +if (MDL) { + P3 = IC(4); + P6 = IC(4); + P7 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I211(4, 3, 7); + P7 = I71(4, 7); +} +if (MDR) { + P5 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P8 = I772(5, 7, 4); +} +if (MUL) { + P0 = IC(4); + P1 = IC(4); +} else { + P0 = I772(1, 3, 4); + P1 = I71(4, 1); +} +} break; +case 252 : +{ +P0 = I31(4, 0); +P1 = I31(4,1); +P2 = I31(4,1); +P4 = IC(4); +P5 = IC(4); +P7 = IC(4); +if (MDL) { + P3 = IC(4); + P6 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); +} +if (MDR) { + P8 = IC(4); +} else { + P8 = I211(4, 5, 7); +} +} break; +case 253 : +{ +P0 = I31(4,1); +P1 = I31(4,1); +P2 = I31(4,1); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P7 = IC(4); +if (MDL) { + P6 = IC(4); +} else { + P6 = I211(4, 3, 7); +} +if (MDR) { + P8 = IC(4); +} else { + P8 = I211(4, 5, 7); +} +} break; +case 254 : +{ +P0 = I31(4, 0); +P4 = IC(4); +if (MDL) { + P3 = IC(4); + P6 = IC(4); +} else { + P3 = I71(4, 3); + P6 = I772(3, 7, 4); +} +if (MDR) { + P5 = IC(4); + P7 = IC(4); + P8 = IC(4); +} else { + P5 = I71(4, 5); + P7 = I71(4, 7); + P8 = I211(4, 5, 7); +} +if (MUR) { + P1 = IC(4); + P2 = IC(4); +} else { + P1 = I71(4, 1); + P2 = I772(1, 5, 4); +} +} break; +case 255 : +{ +P1 = IC(4); +P3 = IC(4); +P4 = IC(4); +P5 = IC(4); +P7 = IC(4); +if (MDL) { + P6 = IC(4); +} else { + P6 = I211(4, 3, 7); +} +if (MDR) { + P8 = IC(4); +} else { + P8 = I211(4, 5, 7); +} +if (MUL) { + P0 = IC(4); +} else { + P0 = I211(4, 1, 3); +} +if (MUR) { + P2 = IC(4); +} else { + P2 = I211(4, 1, 5); +} +} break; + +#undef P0 +#undef P1 +#undef P2 +#undef P3 +#undef P4 +#undef P5 +#undef P6 +#undef P7 +#undef P8 +#undef MUR +#undef MDR +#undef MDL +#undef MUL +#undef IC +#undef I11 +#undef I211 +#undef I31 +#undef I332 +#undef I431 +#undef I521 +#undef I53 +#undef I611 +#undef I71 +#undef I772 +#undef I97 +#undef I1411 +#undef I151 diff --git a/plugins/dfxvideo/i386.asm b/plugins/dfxvideo/i386.asm new file mode 100644 index 00000000..86d6e231 --- /dev/null +++ b/plugins/dfxvideo/i386.asm @@ -0,0 +1,67 @@ +; i386.asm - description +; ------------------- +; begin : Sun Nov 08 2001 +; copyright : (C) 2001 by Pete Bernert +; email : BlackDove@addcom.de + +; ported from inline gcc to nasm by linuzappz + + +; This program is free software; you can redistribute it and/or modify * +; it under the terms of the GNU General Public License as published by * +; the Free Software Foundation; either version 2 of the License, or * +; (at your option) any later version. See also the license.txt file for * +; additional informations. * + + +bits 32 + +section .text + +%include "macros.inc" + +NEWSYM i386_BGR24to16 + push ebp + mov ebp, esp + push ebx + push edx + + mov eax, [ebp+8] ; this can hold the G value + mov ebx, eax ; this can hold the R value + mov edx, eax ; this can hold the B value + shr ebx, 3 ; move the R value + and edx, 00f80000h ; mask the B value + shr edx, 9 ; move the B value + and eax, 00f800h ; mask the G value + shr eax, 6 ; move the G value + and ebx, 0000001fh ; mask the R value + or eax, ebx ; add R to G value + or eax, edx ; add B to RG value + pop edx + pop ebx + mov esp, ebp + pop ebp + ret + +NEWSYM i386_shl10idiv + push ebp + mov ebp, esp + push ebx + push edx + + mov eax, [ebp+8] + mov ebx, [ebp+12] + mov edx, eax + shl eax, 10 + sar edx, 22 + idiv ebx + + pop edx + pop ebx + mov esp, ebp + pop ebp + ret +%ifidn __OUTPUT_FORMAT__,elf +section .note.GNU-stack noalloc noexec nowrite progbits +%endif + diff --git a/plugins/dfxvideo/interp.h b/plugins/dfxvideo/interp.h new file mode 100644 index 00000000..30432371 --- /dev/null +++ b/plugins/dfxvideo/interp.h @@ -0,0 +1,298 @@ +/* + * This file is part of the Advance project. + * + * Copyright (C) 2003 Andrea Mazzoleni + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * In addition, as a special exception, Andrea Mazzoleni + * gives permission to link the code of this program with + * the MAME library (or with modified versions of MAME that use the + * same license as MAME), and distribute linked combinations including + * the two. You must obey the GNU General Public License in all + * respects for all of the code used other than MAME. If you modify + * this file, you may extend this exception to your version of the + * file, but you are not obligated to do so. If you do not wish to + * do so, delete this exception statement from your version. + */ + +#ifndef __INTERP_H +#define __INTERP_H + +/***************************************************************************/ +/* Basic types */ + +/***************************************************************************/ +/* interpolation */ + +static unsigned interp_mask[2]; +static unsigned interp_bits_per_pixel; + +#define INTERP_16_MASK_1(v) (v & interp_mask[0]) +#define INTERP_16_MASK_2(v) (v & interp_mask[1]) + +static __inline unsigned short interp_16_521(unsigned short p1, unsigned short p2, unsigned short p3) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1)*5 + INTERP_16_MASK_1(p2)*2 + INTERP_16_MASK_1(p3)*1) / 8) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1)*5 + INTERP_16_MASK_2(p2)*2 + INTERP_16_MASK_2(p3)*1) / 8); +} + +static __inline unsigned short interp_16_332(unsigned short p1, unsigned short p2, unsigned short p3) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1)*3 + INTERP_16_MASK_1(p2)*3 + INTERP_16_MASK_1(p3)*2) / 8) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1)*3 + INTERP_16_MASK_2(p2)*3 + INTERP_16_MASK_2(p3)*2) / 8); +} + +static __inline unsigned short interp_16_611(unsigned short p1, unsigned short p2, unsigned short p3) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1)*6 + INTERP_16_MASK_1(p2) + INTERP_16_MASK_1(p3)) / 8) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1)*6 + INTERP_16_MASK_2(p2) + INTERP_16_MASK_2(p3)) / 8); +} + +static __inline unsigned short interp_16_71(unsigned short p1, unsigned short p2) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1)*7 + INTERP_16_MASK_1(p2)) / 8) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1)*7 + INTERP_16_MASK_2(p2)) / 8); +} + +static __inline unsigned short interp_16_211(unsigned short p1, unsigned short p2, unsigned short p3) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1)*2 + INTERP_16_MASK_1(p2) + INTERP_16_MASK_1(p3)) / 4) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1)*2 + INTERP_16_MASK_2(p2) + INTERP_16_MASK_2(p3)) / 4); +} + +static __inline unsigned short interp_16_772(unsigned short p1, unsigned short p2, unsigned short p3) +{ + return INTERP_16_MASK_1(((INTERP_16_MASK_1(p1) + INTERP_16_MASK_1(p2))*7 + INTERP_16_MASK_1(p3)*2) / 16) + | INTERP_16_MASK_2(((INTERP_16_MASK_2(p1) + INTERP_16_MASK_2(p2))*7 + INTERP_16_MASK_2(p3)*2) / 16); +} + +static __inline unsigned short interp_16_11(unsigned short p1, unsigned short p2) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1) + INTERP_16_MASK_1(p2)) / 2) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1) + INTERP_16_MASK_2(p2)) / 2); +} + +static __inline unsigned short interp_16_31(unsigned short p1, unsigned short p2) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1)*3 + INTERP_16_MASK_1(p2)) / 4) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1)*3 + INTERP_16_MASK_2(p2)) / 4); +} + +static __inline unsigned short interp_16_1411(unsigned short p1, unsigned short p2, unsigned short p3) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1)*14 + INTERP_16_MASK_1(p2) + INTERP_16_MASK_1(p3)) / 16) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1)*14 + INTERP_16_MASK_2(p2) + INTERP_16_MASK_2(p3)) / 16); +} + +static __inline unsigned short interp_16_431(unsigned short p1, unsigned short p2, unsigned short p3) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1)*4 + INTERP_16_MASK_1(p2)*3 + INTERP_16_MASK_1(p3)) / 8) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1)*4 + INTERP_16_MASK_2(p2)*3 + INTERP_16_MASK_2(p3)) / 8); +} + +static __inline unsigned short interp_16_53(unsigned short p1, unsigned short p2) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1)*5 + INTERP_16_MASK_1(p2)*3) / 8) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1)*5 + INTERP_16_MASK_2(p2)*3) / 8); +} + +static __inline unsigned short interp_16_151(unsigned short p1, unsigned short p2) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1)*15 + INTERP_16_MASK_1(p2)) / 16) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1)*15 + INTERP_16_MASK_2(p2)) / 16); +} + +static __inline unsigned short interp_16_97(unsigned short p1, unsigned short p2) +{ + return INTERP_16_MASK_1((INTERP_16_MASK_1(p1)*9 + INTERP_16_MASK_1(p2)*7) / 16) + | INTERP_16_MASK_2((INTERP_16_MASK_2(p1)*9 + INTERP_16_MASK_2(p2)*7) / 16); +} + +#define INTERP_32_MASK_1(v) (v & 0xFF00FF) +#define INTERP_32_MASK_2(v) (v & 0x00FF00) + +static __inline unsigned int interp_32_521(unsigned int p1, unsigned int p2, unsigned int p3) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1)*5 + INTERP_32_MASK_1(p2)*2 + INTERP_32_MASK_1(p3)*1) / 8) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1)*5 + INTERP_32_MASK_2(p2)*2 + INTERP_32_MASK_2(p3)*1) / 8); +} + +static __inline unsigned int interp_32_332(unsigned int p1, unsigned int p2, unsigned int p3) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1)*3 + INTERP_32_MASK_1(p2)*3 + INTERP_32_MASK_1(p3)*2) / 8) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1)*3 + INTERP_32_MASK_2(p2)*3 + INTERP_32_MASK_2(p3)*2) / 8); +} + +static __inline unsigned int interp_32_211(unsigned int p1, unsigned int p2, unsigned int p3) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1)*2 + INTERP_32_MASK_1(p2) + INTERP_32_MASK_1(p3)) / 4) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1)*2 + INTERP_32_MASK_2(p2) + INTERP_32_MASK_2(p3)) / 4); +} + +static __inline unsigned int interp_32_611(unsigned int p1, unsigned int p2, unsigned int p3) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1)*6 + INTERP_32_MASK_1(p2) + INTERP_32_MASK_1(p3)) / 8) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1)*6 + INTERP_32_MASK_2(p2) + INTERP_32_MASK_2(p3)) / 8); +} + +static __inline unsigned int interp_32_71(unsigned int p1, unsigned int p2) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1)*7 + INTERP_32_MASK_1(p2)) / 8) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1)*7 + INTERP_32_MASK_2(p2)) / 8); +} + +static __inline unsigned int interp_32_772(unsigned int p1, unsigned int p2, unsigned int p3) +{ + return INTERP_32_MASK_1(((INTERP_32_MASK_1(p1) + INTERP_32_MASK_1(p2))*7 + INTERP_32_MASK_1(p3)*2) / 16) + | INTERP_32_MASK_2(((INTERP_32_MASK_2(p1) + INTERP_32_MASK_2(p2))*7 + INTERP_32_MASK_2(p3)*2) / 16); +} + +static __inline unsigned int interp_32_11(unsigned int p1, unsigned int p2) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1) + INTERP_32_MASK_1(p2)) / 2) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1) + INTERP_32_MASK_2(p2)) / 2); +} + +static __inline unsigned int interp_32_31(unsigned int p1, unsigned int p2) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1)*3 + INTERP_32_MASK_1(p2)) / 4) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1)*3 + INTERP_32_MASK_2(p2)) / 4); +} + +static __inline unsigned int interp_32_1411(unsigned int p1, unsigned int p2, unsigned int p3) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1)*14 + INTERP_32_MASK_1(p2) + INTERP_32_MASK_1(p3)) / 16) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1)*14 + INTERP_32_MASK_2(p2) + INTERP_32_MASK_2(p3)) / 16); +} + +static __inline unsigned int interp_32_431(unsigned int p1, unsigned int p2, unsigned int p3) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1)*4 + INTERP_32_MASK_1(p2)*3 + INTERP_32_MASK_1(p3)) / 8) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1)*4 + INTERP_32_MASK_2(p2)*3 + INTERP_32_MASK_2(p3)) / 8); +} + +static __inline unsigned int interp_32_53(unsigned int p1, unsigned int p2) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1)*5 + INTERP_32_MASK_1(p2)*3) / 8) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1)*5 + INTERP_32_MASK_2(p2)*3) / 8); +} + +static __inline unsigned int interp_32_151(unsigned int p1, unsigned int p2) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1)*15 + INTERP_32_MASK_1(p2)) / 16) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1)*15 + INTERP_32_MASK_2(p2)) / 16); +} + +static __inline unsigned int interp_32_97(unsigned int p1, unsigned int p2) +{ + return INTERP_32_MASK_1((INTERP_32_MASK_1(p1)*9 + INTERP_32_MASK_1(p2)*7) / 16) + | INTERP_32_MASK_2((INTERP_32_MASK_2(p1)*9 + INTERP_32_MASK_2(p2)*7) / 16); +} + +/***************************************************************************/ +/* diff */ + +#define INTERP_Y_LIMIT (0x30*4) +#define INTERP_U_LIMIT (0x07*4) +#define INTERP_V_LIMIT (0x06*8) + +inline static int interp_16_diff(unsigned short p1, unsigned short p2) +{ + int r, g, b; + int y, u, v; + + if (p1 == p2) + return 0; + + if (interp_bits_per_pixel == 16) { + b = (int)((p1 & 0x1F) - (p2 & 0x1F)) << 3; + g = (int)((p1 & 0x7E0) - (p2 & 0x7E0)) >> 3; + r = (int)((p1 & 0xF800) - (p2 & 0xF800)) >> 8; + } else { + b = (int)((p1 & 0x1F) - (p2 & 0x1F)) << 3; + g = (int)((p1 & 0x3E0) - (p2 & 0x3E0)) >> 2; + r = (int)((p1 & 0x7C00) - (p2 & 0x7C00)) >> 7; + } + + y = r + g + b; + u = r - b; + v = -r + 2*g - b; + + if (y < -INTERP_Y_LIMIT || y > INTERP_Y_LIMIT) + return 1; + + if (u < -INTERP_U_LIMIT || u > INTERP_U_LIMIT) + return 1; + + if (v < -INTERP_V_LIMIT || v > INTERP_V_LIMIT) + return 1; + + return 0; +} + +inline static int interp_32_diff(unsigned int p1, unsigned int p2) +{ + int r, g, b; + int y, u, v; + + if ((p1 & 0xF8F8F8) == (p2 & 0xF8F8F8)) + return 0; + + b = (int)((p1 & 0xFF) - (p2 & 0xFF)); + g = (int)((p1 & 0xFF00) - (p2 & 0xFF00)) >> 8; + r = (int)((p1 & 0xFF0000) - (p2 & 0xFF0000)) >> 16; + + y = r + g + b; + u = r - b; + v = -r + 2*g - b; + + if (y < -INTERP_Y_LIMIT || y > INTERP_Y_LIMIT) + return 1; + + if (u < -INTERP_U_LIMIT || u > INTERP_U_LIMIT) + return 1; + + if (v < -INTERP_V_LIMIT || v > INTERP_V_LIMIT) + return 1; + + return 0; +} + +#if 0 + +static void interp_set(unsigned bits_per_pixel) +{ + interp_bits_per_pixel = bits_per_pixel; + + switch (bits_per_pixel) { + case 15 : + interp_mask[0] = 0x7C1F; + interp_mask[1] = 0x03E0; + break; + case 16 : + interp_mask[0] = 0xF81F; + interp_mask[1] = 0x07E0; + break; + case 32 : + interp_mask[0] = 0xFF00FF; + interp_mask[1] = 0x00FF00; + break; + } +} + +#endif + +#endif diff --git a/plugins/dfxvideo/key.c b/plugins/dfxvideo/key.c new file mode 100644 index 00000000..061bc0c4 --- /dev/null +++ b/plugins/dfxvideo/key.c @@ -0,0 +1,95 @@ +/*************************************************************************** + key.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_KEY + +#include "externals.h" +#include "menu.h" +#include "gpu.h" +#include "draw.h" +#include "key.h" + +#define VK_INSERT 65379 +#define VK_HOME 65360 +#define VK_PRIOR 65365 +#define VK_NEXT 65366 +#define VK_END 65367 +#define VK_DEL 65535 +#define VK_F5 65474 + +void GPUmakeSnapshot(void); + +unsigned long ulKeybits=0; + +void GPUkeypressed(int keycode) +{ + switch(keycode) + { + case 0xFFC9: //X11 key: F12 + case ((1<<29) | 0xFF0D): //special keycode from pcsx-df: alt-enter + bChangeWinMode=TRUE; + break; + case VK_F5: + GPUmakeSnapshot(); + break; + + case VK_INSERT: + if(iUseFixes) {iUseFixes=0;dwActFixes=0;} + else {iUseFixes=1;dwActFixes=dwCfgFixes;} + SetFixes(); + if(iFrameLimit==2) SetAutoFrameCap(); + break; + + case VK_DEL: + if(ulKeybits&KEY_SHOWFPS) + { + ulKeybits&=~KEY_SHOWFPS; + DoClearScreenBuffer(); + } + else + { + ulKeybits|=KEY_SHOWFPS; + szDispBuf[0]=0; + BuildDispMenu(0); + } + break; + + case VK_PRIOR: BuildDispMenu(-1); break; + case VK_NEXT: BuildDispMenu( 1); break; + case VK_END: SwitchDispMenu(1); break; + case VK_HOME: SwitchDispMenu(-1); break; + case 0x60: + { + iFastFwd = 1 - iFastFwd; + bSkipNextFrame = FALSE; + UseFrameSkip = iFastFwd; + BuildDispMenu(0); + break; + } +#ifdef _MACGL + default: { void HandleKey(int keycode); HandleKey(keycode); } +#endif + } +} + +void SetKeyHandler(void) +{ +} + +void ReleaseKeyHandler(void) +{ +} diff --git a/plugins/dfxvideo/key.h b/plugins/dfxvideo/key.h new file mode 100644 index 00000000..5f85cb6f --- /dev/null +++ b/plugins/dfxvideo/key.h @@ -0,0 +1,24 @@ +/*************************************************************************** + key.h - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _KEY_INTERNALS_H +#define _KEY_INTERNALS_H + +void SetKeyHandler(void); +void ReleaseKeyHandler(void); + +#endif // _KEY_INTERNALS_H diff --git a/plugins/dfxvideo/macros.inc b/plugins/dfxvideo/macros.inc new file mode 100644 index 00000000..47829285 --- /dev/null +++ b/plugins/dfxvideo/macros.inc @@ -0,0 +1,40 @@ +; macros.inc - description +; ------------------- +; begin : Sun Nov 08 2001 +; based on ZSNES macros.mac +; email : linuzappz@pcsx.net + +; This program is free software; you can redistribute it and/or modify * +; it under the terms of the GNU General Public License as published by * +; the Free Software Foundation; either version 2 of the License, or * +; (at your option) any later version. See also the license.txt file for * +; additional informations. * + + +%ifdef __WIN32__ + +%imacro EXTSYM 1-* +%rep %0 + extern _%1 + %define %1 _%1 +%rotate 1 +%endrep +%endmacro + +%imacro NEWSYM 1 + global _%1 + _%1: + %1: +%endmacro + +%else + +%define EXTSYM extern + +%imacro NEWSYM 1 + global %1 + %1: +%endmacro + +%endif + diff --git a/plugins/dfxvideo/menu.c b/plugins/dfxvideo/menu.c new file mode 100644 index 00000000..33d111d9 --- /dev/null +++ b/plugins/dfxvideo/menu.c @@ -0,0 +1,167 @@ +/*************************************************************************** + menu.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_MENU + +#include "externals.h" +#include "draw.h" +#include "menu.h" +#include "gpu.h" + +unsigned long dwCoreFlags = 0; + +// create lists/stuff for fonts (actually there are no more lists, but I am too lazy to change the func names ;) +void InitMenu(void) +{ +} + +// kill existing lists/fonts +void CloseMenu(void) +{ + DestroyPic(); +} + +// DISPLAY FPS/MENU TEXT + +#include +extern time_t tStart; + +int iMPos=0; // menu arrow pos + +void DisplayText(void) // DISPLAY TEXT +{ +} + +// Build Menu buffer (== Dispbuffer without FPS)... +void BuildDispMenu(int iInc) +{ + if(!(ulKeybits&KEY_SHOWFPS)) return; // mmm, cheater ;) + + iMPos+=iInc; // up or down + if(iMPos<0) iMPos=3; // wrap around + if(iMPos>3) iMPos=0; + + strcpy(szMenuBuf," FL FS DI GF "); // main menu items + + if(UseFrameLimit) // set marks + { + if(iFrameLimit==1) szMenuBuf[2] = '+'; + else szMenuBuf[2] = '*'; + } + if(iFastFwd) szMenuBuf[7] = '~'; + else + if(UseFrameSkip) szMenuBuf[7] = '*'; + + if(iUseDither) // set marks + { + if(iUseDither==1) szMenuBuf[12] = '+'; + else szMenuBuf[12] = '*'; + } + + if(dwActFixes) szMenuBuf[17] = '*'; + + if(dwCoreFlags&1) szMenuBuf[23] = 'A'; + if(dwCoreFlags&2) szMenuBuf[23] = 'M'; + + if(dwCoreFlags&0xff00) //A/M/G/D + { + if((dwCoreFlags&0x0f00)==0x0000) // D + szMenuBuf[23] = 'D'; + else + if((dwCoreFlags&0x0f00)==0x0100) // A + szMenuBuf[23] = 'A'; + else + if((dwCoreFlags&0x0f00)==0x0200) // M + szMenuBuf[23] = 'M'; + else + if((dwCoreFlags&0x0f00)==0x0300) // G + szMenuBuf[23] = 'G'; + + szMenuBuf[24]='0'+(char)((dwCoreFlags&0xf000)>>12); // number + } + + + if(lSelectedSlot) szMenuBuf[26] = '0'+(char)lSelectedSlot; + + szMenuBuf[(iMPos+1)*5]='<'; // set arrow + +} + +// Some menu action... +void SwitchDispMenu(int iStep) // SWITCH DISP MENU +{ + if(!(ulKeybits&KEY_SHOWFPS)) return; // tststs + + switch(iMPos) + { + case 0: // frame limit + { + int iType=0; + bInitCap = TRUE; + + if(UseFrameLimit) iType=iFrameLimit; + iType+=iStep; + if(iType<0) iType=2; + if(iType>2) iType=0; + if(iType==0) UseFrameLimit=0; + else + { + UseFrameLimit=1; + iFrameLimit=iType; + SetAutoFrameCap(); + } + } break; + + case 1: // frame skip + bInitCap = TRUE; + if(iStep>0) + { + if(!UseFrameSkip) {UseFrameSkip=1;iFastFwd = 0;} + else + { + if(!iFastFwd) iFastFwd=1; + else {UseFrameSkip=0;iFastFwd = 0;} + } + } + else + { + if(!UseFrameSkip) {UseFrameSkip=1;iFastFwd = 1;} + else + { + if(iFastFwd) iFastFwd=0; + else {UseFrameSkip=0;iFastFwd = 0;} + } + } + bSkipNextFrame=FALSE; + break; + + case 2: // dithering + iUseDither+=iStep; + if(iUseDither<0) iUseDither=2; + if(iUseDither>2) iUseDither=0; + break; + + case 3: // special fixes + if(iUseFixes) {iUseFixes=0;dwActFixes=0;} + else {iUseFixes=1;dwActFixes=dwCfgFixes;} + SetFixes(); + if(iFrameLimit==2) SetAutoFrameCap(); + break; + } + + BuildDispMenu(0); // update info +} diff --git a/plugins/dfxvideo/menu.h b/plugins/dfxvideo/menu.h new file mode 100644 index 00000000..ac244180 --- /dev/null +++ b/plugins/dfxvideo/menu.h @@ -0,0 +1,27 @@ +/*************************************************************************** + menu.h - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _GPU_MENU_H_ +#define _GPU_MENU_H_ + +void DisplayText(void); +void CloseMenu(void); +void InitMenu(void); +void BuildDispMenu(int iInc); +void SwitchDispMenu(int iStep); + +#endif // _GPU_MENU_H_ diff --git a/plugins/dfxvideo/prim.c b/plugins/dfxvideo/prim.c new file mode 100644 index 00000000..097f202e --- /dev/null +++ b/plugins/dfxvideo/prim.c @@ -0,0 +1,1661 @@ +/*************************************************************************** + prim.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_PRIMDRAW + +#include "externals.h" +#include "gpu.h" +#include "draw.h" +#include "soft.h" +#include "swap.h" + +//////////////////////////////////////////////////////////////////////// +// globals +//////////////////////////////////////////////////////////////////////// + +BOOL bUsingTWin=FALSE; +TWin_t TWin; +//unsigned long clutid; // global clut +unsigned short usMirror=0; // sprite mirror +int iDither=0; +int32_t drawX; +int32_t drawY; +int32_t drawW; +int32_t drawH; +uint32_t dwCfgFixes; +uint32_t dwActFixes=0; +uint32_t dwEmuFixes=0; +int iUseFixes; +int iUseDither=0; +BOOL bDoVSyncUpdate=FALSE; + +//////////////////////////////////////////////////////////////////////// +// Some ASM color convertion by LEWPY +//////////////////////////////////////////////////////////////////////// + +#ifdef USE_NASM + +#define BGR24to16 i386_BGR24to16 +__inline unsigned short BGR24to16 (uint32_t BGR); + +#else + +__inline unsigned short BGR24to16 (uint32_t BGR) +{ + return (unsigned short)(((BGR>>3)&0x1f)|((BGR&0xf80000)>>9)|((BGR&0xf800)>>6)); +} + +#endif + +//////////////////////////////////////////////////////////////////////// +// Update global TP infos +//////////////////////////////////////////////////////////////////////// + +__inline void UpdateGlobalTP(unsigned short gdata) +{ + GlobalTextAddrX = (gdata << 6) & 0x3c0; // texture addr + + if(iGPUHeight==1024) + { + if(dwGPUVersion==2) + { + GlobalTextAddrY =((gdata & 0x60 ) << 3); + GlobalTextIL =(gdata & 0x2000) >> 13; + GlobalTextABR = (unsigned short)((gdata >> 7) & 0x3); + GlobalTextTP = (gdata >> 9) & 0x3; + if(GlobalTextTP==3) GlobalTextTP=2; + usMirror =0; + lGPUstatusRet = (lGPUstatusRet & 0xffffe000 ) | (gdata & 0x1fff ); + + // tekken dithering? right now only if dithering is forced by user + if(iUseDither==2) iDither=2; else iDither=0; + + return; + } + else + { + GlobalTextAddrY = (unsigned short)(((gdata << 4) & 0x100) | ((gdata >> 2) & 0x200)); + } + } + else GlobalTextAddrY = (gdata << 4) & 0x100; + + GlobalTextTP = (gdata >> 7) & 0x3; // tex mode (4,8,15) + + if(GlobalTextTP==3) GlobalTextTP=2; // seen in Wild9 :( + + GlobalTextABR = (gdata >> 5) & 0x3; // blend mode + + lGPUstatusRet&=~0x000001ff; // Clear the necessary bits + lGPUstatusRet|=(gdata & 0x01ff); // set the necessary bits + + switch(iUseDither) + { + case 0: + iDither=0; + break; + case 1: + if(lGPUstatusRet&0x0200) iDither=2; + else iDither=0; + break; + case 2: + iDither=2; + break; + } +} + +//////////////////////////////////////////////////////////////////////// + +__inline void SetRenderMode(uint32_t DrawAttributes) +{ + DrawSemiTrans = (SEMITRANSBIT(DrawAttributes)) ? TRUE : FALSE; + + if(SHADETEXBIT(DrawAttributes)) + {g_m1=g_m2=g_m3=128;} + else + { + if((dwActFixes&4) && ((DrawAttributes&0x00ffffff)==0)) + DrawAttributes|=0x007f7f7f; + + g_m1=(short)(DrawAttributes&0xff); + g_m2=(short)((DrawAttributes>>8)&0xff); + g_m3=(short)((DrawAttributes>>16)&0xff); + } +} + +//////////////////////////////////////////////////////////////////////// + +// oki, here are the psx gpu coord rules: poly coords are +// 11 bit signed values (-1024...1023). If the x or y distance +// exceeds 1024, the polygon will not be drawn. +// Since quads are treated as two triangles by the real gpu, +// this 'discard rule' applies to each of the quad's triangle +// (so one triangle can be drawn, the other one discarded). +// Also, y drawing is wrapped at 512 one time, +// then it will get negative (and therefore not drawn). The +// 'CheckCoord' funcs are a simple (not comlete!) approach to +// do things right, I will add a better detection soon... the +// current approach will be easier to do in hw/accel plugins, imho + +// 11 bit signed +#define SIGNSHIFT 21 +#define CHKMAX_X 1024 +#define CHKMAX_Y 512 + +void AdjustCoord4() +{ + lx0=(short)(((int)lx0<>SIGNSHIFT); + lx1=(short)(((int)lx1<>SIGNSHIFT); + lx2=(short)(((int)lx2<>SIGNSHIFT); + lx3=(short)(((int)lx3<>SIGNSHIFT); + ly0=(short)(((int)ly0<>SIGNSHIFT); + ly1=(short)(((int)ly1<>SIGNSHIFT); + ly2=(short)(((int)ly2<>SIGNSHIFT); + ly3=(short)(((int)ly3<>SIGNSHIFT); +} + +void AdjustCoord3() +{ + lx0=(short)(((int)lx0<>SIGNSHIFT); + lx1=(short)(((int)lx1<>SIGNSHIFT); + lx2=(short)(((int)lx2<>SIGNSHIFT); + ly0=(short)(((int)ly0<>SIGNSHIFT); + ly1=(short)(((int)ly1<>SIGNSHIFT); + ly2=(short)(((int)ly2<>SIGNSHIFT); +} + +void AdjustCoord2() +{ + lx0=(short)(((int)lx0<>SIGNSHIFT); + lx1=(short)(((int)lx1<>SIGNSHIFT); + ly0=(short)(((int)ly0<>SIGNSHIFT); + ly1=(short)(((int)ly1<>SIGNSHIFT); +} + +void AdjustCoord1() +{ + lx0=(short)(((int)lx0<>SIGNSHIFT); + ly0=(short)(((int)ly0<>SIGNSHIFT); + + if(lx0<-512 && PSXDisplay.DrawOffset.x<=-512) + lx0+=2048; + + if(ly0<-512 && PSXDisplay.DrawOffset.y<=-512) + ly0+=2048; +} + +//////////////////////////////////////////////////////////////////////// +// special checks... nascar, syphon filter 2, mgs +//////////////////////////////////////////////////////////////////////// + +// xenogears FT4: not removed correctly right now... the tri 0,1,2 +// should get removed, the tri 1,2,3 should stay... pfff + +// x -466 1023 180 1023 +// y 20 -228 222 -100 + +// 0 __1 +// \ / \ +// 2___3 + +__inline BOOL CheckCoord4() +{ + if(lx0<0) + { + if(((lx1-lx0)>CHKMAX_X) || + ((lx2-lx0)>CHKMAX_X)) + { + if(lx3<0) + { + if((lx1-lx3)>CHKMAX_X) return TRUE; + if((lx2-lx3)>CHKMAX_X) return TRUE; + } + } + } + if(lx1<0) + { + if((lx0-lx1)>CHKMAX_X) return TRUE; + if((lx2-lx1)>CHKMAX_X) return TRUE; + if((lx3-lx1)>CHKMAX_X) return TRUE; + } + if(lx2<0) + { + if((lx0-lx2)>CHKMAX_X) return TRUE; + if((lx1-lx2)>CHKMAX_X) return TRUE; + if((lx3-lx2)>CHKMAX_X) return TRUE; + } + if(lx3<0) + { + if(((lx1-lx3)>CHKMAX_X) || + ((lx2-lx3)>CHKMAX_X)) + { + if(lx0<0) + { + if((lx1-lx0)>CHKMAX_X) return TRUE; + if((lx2-lx0)>CHKMAX_X) return TRUE; + } + } + } + + + if(ly0<0) + { + if((ly1-ly0)>CHKMAX_Y) return TRUE; + if((ly2-ly0)>CHKMAX_Y) return TRUE; + } + if(ly1<0) + { + if((ly0-ly1)>CHKMAX_Y) return TRUE; + if((ly2-ly1)>CHKMAX_Y) return TRUE; + if((ly3-ly1)>CHKMAX_Y) return TRUE; + } + if(ly2<0) + { + if((ly0-ly2)>CHKMAX_Y) return TRUE; + if((ly1-ly2)>CHKMAX_Y) return TRUE; + if((ly3-ly2)>CHKMAX_Y) return TRUE; + } + if(ly3<0) + { + if((ly1-ly3)>CHKMAX_Y) return TRUE; + if((ly2-ly3)>CHKMAX_Y) return TRUE; + } + + return FALSE; +} + +__inline BOOL CheckCoord3() +{ + if(lx0<0) + { + if((lx1-lx0)>CHKMAX_X) return TRUE; + if((lx2-lx0)>CHKMAX_X) return TRUE; + } + if(lx1<0) + { + if((lx0-lx1)>CHKMAX_X) return TRUE; + if((lx2-lx1)>CHKMAX_X) return TRUE; + } + if(lx2<0) + { + if((lx0-lx2)>CHKMAX_X) return TRUE; + if((lx1-lx2)>CHKMAX_X) return TRUE; + } + if(ly0<0) + { + if((ly1-ly0)>CHKMAX_Y) return TRUE; + if((ly2-ly0)>CHKMAX_Y) return TRUE; + } + if(ly1<0) + { + if((ly0-ly1)>CHKMAX_Y) return TRUE; + if((ly2-ly1)>CHKMAX_Y) return TRUE; + } + if(ly2<0) + { + if((ly0-ly2)>CHKMAX_Y) return TRUE; + if((ly1-ly2)>CHKMAX_Y) return TRUE; + } + + return FALSE; +} + + +__inline BOOL CheckCoord2() +{ + if(lx0<0) + { + if((lx1-lx0)>CHKMAX_X) return TRUE; + } + if(lx1<0) + { + if((lx0-lx1)>CHKMAX_X) return TRUE; + } + if(ly0<0) + { + if((ly1-ly0)>CHKMAX_Y) return TRUE; + } + if(ly1<0) + { + if((ly0-ly1)>CHKMAX_Y) return TRUE; + } + + return FALSE; +} + +__inline BOOL CheckCoordL(short slx0,short sly0,short slx1,short sly1) +{ + if(slx0<0) + { + if((slx1-slx0)>CHKMAX_X) return TRUE; + } + if(slx1<0) + { + if((slx0-slx1)>CHKMAX_X) return TRUE; + } + if(sly0<0) + { + if((sly1-sly0)>CHKMAX_Y) return TRUE; + } + if(sly1<0) + { + if((sly0-sly1)>CHKMAX_Y) return TRUE; + } + + return FALSE; +} + + +//////////////////////////////////////////////////////////////////////// +// mask stuff... used in silent hill +//////////////////////////////////////////////////////////////////////// + +void cmdSTP(unsigned char * baseAddr) +{ + uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]); + + lGPUstatusRet&=~0x1800; // Clear the necessary bits + lGPUstatusRet|=((gdata & 0x03) << 11); // Set the necessary bits + + if(gdata&1) {sSetMask=0x8000;lSetMask=0x80008000;} + else {sSetMask=0; lSetMask=0; } + + if(gdata&2) bCheckMask=TRUE; + else bCheckMask=FALSE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: Set texture page infos +//////////////////////////////////////////////////////////////////////// + +void cmdTexturePage(unsigned char * baseAddr) +{ + uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]); + + lGPUstatusRet&=~0x000007ff; + lGPUstatusRet|=(gdata & 0x07ff); + + usMirror=gdata&0x3000; + + UpdateGlobalTP((unsigned short)gdata); + GlobalTextREST = (gdata&0x00ffffff)>>9; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: turn on/off texture window +//////////////////////////////////////////////////////////////////////// + +void cmdTextureWindow(unsigned char *baseAddr) +{ + uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]); + + uint32_t YAlign,XAlign; + + lGPUInfoVals[INFO_TW]=gdata&0xFFFFF; + + if(gdata & 0x020) + TWin.Position.y1 = 8; // xxxx1 + else if (gdata & 0x040) + TWin.Position.y1 = 16; // xxx10 + else if (gdata & 0x080) + TWin.Position.y1 = 32; // xx100 + else if (gdata & 0x100) + TWin.Position.y1 = 64; // x1000 + else if (gdata & 0x200) + TWin.Position.y1 = 128; // 10000 + else + TWin.Position.y1 = 256; // 00000 + + // Texture window size is determined by the least bit set of the relevant 5 bits + + if (gdata & 0x001) + TWin.Position.x1 = 8; // xxxx1 + else if (gdata & 0x002) + TWin.Position.x1 = 16; // xxx10 + else if (gdata & 0x004) + TWin.Position.x1 = 32; // xx100 + else if (gdata & 0x008) + TWin.Position.x1 = 64; // x1000 + else if (gdata & 0x010) + TWin.Position.x1 = 128; // 10000 + else + TWin.Position.x1 = 256; // 00000 + + // Re-calculate the bit field, because we can't trust what is passed in the data + + + YAlign = (uint32_t)(32 - (TWin.Position.y1 >> 3)); + XAlign = (uint32_t)(32 - (TWin.Position.x1 >> 3)); + + // Absolute position of the start of the texture window + + TWin.Position.y0 = (short)(((gdata >> 15) & YAlign) << 3); + TWin.Position.x0 = (short)(((gdata >> 10) & XAlign) << 3); + + if((TWin.Position.x0 == 0 && // tw turned off + TWin.Position.y0 == 0 && + TWin.Position.x1 == 0 && + TWin.Position.y1 == 0) || + (TWin.Position.x1 == 256 && + TWin.Position.y1 == 256)) + { + bUsingTWin = FALSE; // -> just do it + } + else // otherwise + { + bUsingTWin = TRUE; // -> tw turned on + } +} + +//////////////////////////////////////////////////////////////////////// +// cmd: start of drawing area... primitives will be clipped inside +//////////////////////////////////////////////////////////////////////// + + + +void cmdDrawAreaStart(unsigned char * baseAddr) +{ + uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]); + + drawX = gdata & 0x3ff; // for soft drawing + + if(dwGPUVersion==2) + { + lGPUInfoVals[INFO_DRAWSTART]=gdata&0x3FFFFF; + drawY = (gdata>>12)&0x3ff; + if(drawY>=1024) drawY=1023; // some security + } + else + { + lGPUInfoVals[INFO_DRAWSTART]=gdata&0xFFFFF; + drawY = (gdata>>10)&0x3ff; + if(drawY>=512) drawY=511; // some security + } +} + +//////////////////////////////////////////////////////////////////////// +// cmd: end of drawing area... primitives will be clipped inside +//////////////////////////////////////////////////////////////////////// + +void cmdDrawAreaEnd(unsigned char * baseAddr) +{ + uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]); + + drawW = gdata & 0x3ff; // for soft drawing + + if(dwGPUVersion==2) + { + lGPUInfoVals[INFO_DRAWEND]=gdata&0x3FFFFF; + drawH = (gdata>>12)&0x3ff; + if(drawH>=1024) drawH=1023; // some security + } + else + { + lGPUInfoVals[INFO_DRAWEND]=gdata&0xFFFFF; + drawH = (gdata>>10)&0x3ff; + if(drawH>=512) drawH=511; // some security + } +} + +//////////////////////////////////////////////////////////////////////// +// cmd: draw offset... will be added to prim coords +//////////////////////////////////////////////////////////////////////// + +void cmdDrawOffset(unsigned char * baseAddr) +{ + uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]); + + PSXDisplay.DrawOffset.x = (short)(gdata & 0x7ff); + + if(dwGPUVersion==2) + { + lGPUInfoVals[INFO_DRAWOFF]=gdata&0x7FFFFF; + PSXDisplay.DrawOffset.y = (short)((gdata>>12) & 0x7ff); + } + else + { + lGPUInfoVals[INFO_DRAWOFF]=gdata&0x3FFFFF; + PSXDisplay.DrawOffset.y = (short)((gdata>>11) & 0x7ff); + } + + PSXDisplay.DrawOffset.y=(short)(((int)PSXDisplay.DrawOffset.y<<21)>>21); + PSXDisplay.DrawOffset.x=(short)(((int)PSXDisplay.DrawOffset.x<<21)>>21); +} + +//////////////////////////////////////////////////////////////////////// +// cmd: load image to vram +//////////////////////////////////////////////////////////////////////// + +void primLoadImage(unsigned char * baseAddr) +{ + unsigned short *sgpuData = ((unsigned short *) baseAddr); + + VRAMWrite.x = GETLEs16(&sgpuData[2])&0x3ff; + VRAMWrite.y = GETLEs16(&sgpuData[3])&iGPUHeightMask; + VRAMWrite.Width = GETLEs16(&sgpuData[4]); + VRAMWrite.Height = GETLEs16(&sgpuData[5]); + + DataWriteMode = DR_VRAMTRANSFER; + + VRAMWrite.ImagePtr = psxVuw + (VRAMWrite.y<<10) + VRAMWrite.x; + VRAMWrite.RowsRemaining = VRAMWrite.Width; + VRAMWrite.ColsRemaining = VRAMWrite.Height; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: vram -> psx mem +//////////////////////////////////////////////////////////////////////// + +void primStoreImage(unsigned char * baseAddr) +{ + unsigned short *sgpuData = ((unsigned short *) baseAddr); + + VRAMRead.x = GETLEs16(&sgpuData[2])&0x03ff; + VRAMRead.y = GETLEs16(&sgpuData[3])&iGPUHeightMask; + VRAMRead.Width = GETLEs16(&sgpuData[4]); + VRAMRead.Height = GETLEs16(&sgpuData[5]); + + VRAMRead.ImagePtr = psxVuw + (VRAMRead.y<<10) + VRAMRead.x; + VRAMRead.RowsRemaining = VRAMRead.Width; + VRAMRead.ColsRemaining = VRAMRead.Height; + + DataReadMode = DR_VRAMTRANSFER; + + lGPUstatusRet |= GPUSTATUS_READYFORVRAM; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: blkfill - NO primitive! Doesn't care about draw areas... +//////////////////////////////////////////////////////////////////////// + +void primBlkFill(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + short sX = GETLEs16(&sgpuData[2]); + short sY = GETLEs16(&sgpuData[3]); + short sW = GETLEs16(&sgpuData[4]) & 0x3ff; + short sH = GETLEs16(&sgpuData[5]) & 0x3ff; + + sW = (sW+15) & ~15; + + // Increase H & W if they are one short of full values, because they never can be full values + if (sH >= 1023) sH=1024; + if (sW >= 1023) sW=1024; + + // x and y of end pos + sW+=sX; + sH+=sY; + + FillSoftwareArea(sX, sY, sW, sH, BGR24to16(GETLE32(&gpuData[0]))); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: move image vram -> vram +//////////////////////////////////////////////////////////////////////// + +void primMoveImage(unsigned char * baseAddr) +{ + short *sgpuData = ((short *) baseAddr); + + short imageY0,imageX0,imageY1,imageX1,imageSX,imageSY,i,j; + + imageX0 = GETLEs16(&sgpuData[2])&0x03ff; + imageY0 = GETLEs16(&sgpuData[3])&iGPUHeightMask; + imageX1 = GETLEs16(&sgpuData[4])&0x03ff; + imageY1 = GETLEs16(&sgpuData[5])&iGPUHeightMask; + imageSX = GETLEs16(&sgpuData[6]); + imageSY = GETLEs16(&sgpuData[7]); + + if((imageX0 == imageX1) && (imageY0 == imageY1)) return; + if(imageSX<=0) return; + if(imageSY<=0) return; + + // ZN SF2: screwed moves + // + // move sgpuData[2],sgpuData[3],sgpuData[4],sgpuData[5],sgpuData[6],sgpuData[7] + // + // move 365 182 32723 -21846 17219 15427 + // move 127 160 147 -1 20817 13409 + // move 141 165 16275 -21862 -32126 13442 + // move 161 136 24620 -1 16962 13388 + // move 168 138 32556 -13090 -29556 15500 + // + // and here's the hack for it: + + if(iGPUHeight==1024 && GETLEs16(&sgpuData[7])>1024) return; + + if((imageY0+imageSY)>iGPUHeight || + (imageX0+imageSX)>1024 || + (imageY1+imageSY)>iGPUHeight || + (imageX1+imageSX)>1024) + { + int i,j; + for(j=0;j>1; + + SRCPtr = (uint32_t *)(psxVuw + (1024*imageY0) + imageX0); + DSTPtr = (uint32_t *)(psxVuw + (1024*imageY1) + imageX1); + + LineOffset = 512 - dx; + + for(j=0;j=PSXDisplay.DisplayPosition.x && + imageY1=PSXDisplay.DisplayPosition.y) + updateDisplay(); + } +*/ + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: draw free-size Tile +//////////////////////////////////////////////////////////////////////// + +//#define SMALLDEBUG +//#include + +void primTileS(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t*)baseAddr); + short *sgpuData = ((short *) baseAddr); + short sW = GETLEs16(&sgpuData[4]) & 0x3ff; + short sH = GETLEs16(&sgpuData[5]) & iGPUHeightMask; // mmm... limit tiles to 0x1ff or height? + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + + if(!(dwActFixes&8)) AdjustCoord1(); + + // x and y of start + ly2 = ly3 = ly0+sH +PSXDisplay.DrawOffset.y; + ly0 = ly1 = ly0 +PSXDisplay.DrawOffset.y; + lx1 = lx2 = lx0+sW +PSXDisplay.DrawOffset.x; + lx0 = lx3 = lx0 +PSXDisplay.DrawOffset.x; + + DrawSemiTrans = (SEMITRANSBIT(GETLE32(&gpuData[0]))) ? TRUE : FALSE; + + if(!(iTileCheat && sH==32 && GETLE32(&gpuData[0])==0x60ffffff)) // special cheat for certain ZiNc games + FillSoftwareAreaTrans(lx0,ly0,lx2,ly2, + BGR24to16(GETLE32(&gpuData[0]))); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: draw 1 dot Tile (point) +//////////////////////////////////////////////////////////////////////// + +void primTile1(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t*)baseAddr); + short *sgpuData = ((short *) baseAddr); + short sH = 1; + short sW = 1; + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + + if(!(dwActFixes&8)) AdjustCoord1(); + + // x and y of start + ly2 = ly3 = ly0+sH +PSXDisplay.DrawOffset.y; + ly0 = ly1 = ly0 +PSXDisplay.DrawOffset.y; + lx1 = lx2 = lx0+sW +PSXDisplay.DrawOffset.x; + lx0 = lx3 = lx0 +PSXDisplay.DrawOffset.x; + + DrawSemiTrans = (SEMITRANSBIT(GETLE32(&gpuData[0]))) ? TRUE : FALSE; + + FillSoftwareAreaTrans(lx0,ly0,lx2,ly2, + BGR24to16(GETLE32(&gpuData[0]))); // Takes Start and Offset + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: draw 8 dot Tile (small rect) +//////////////////////////////////////////////////////////////////////// + +void primTile8(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t*)baseAddr); + short *sgpuData = ((short *) baseAddr); + short sH = 8; + short sW = 8; + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + + if(!(dwActFixes&8)) AdjustCoord1(); + + // x and y of start + ly2 = ly3 = ly0+sH +PSXDisplay.DrawOffset.y; + ly0 = ly1 = ly0 +PSXDisplay.DrawOffset.y; + lx1 = lx2 = lx0+sW +PSXDisplay.DrawOffset.x; + lx0 = lx3 = lx0 +PSXDisplay.DrawOffset.x; + + DrawSemiTrans = (SEMITRANSBIT(GETLE32(&gpuData[0]))) ? TRUE : FALSE; + + FillSoftwareAreaTrans(lx0,ly0,lx2,ly2, + BGR24to16(GETLE32(&gpuData[0]))); // Takes Start and Offset + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: draw 16 dot Tile (medium rect) +//////////////////////////////////////////////////////////////////////// + +void primTile16(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t*)baseAddr); + short *sgpuData = ((short *) baseAddr); + short sH = 16; + short sW = 16; + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + + if(!(dwActFixes&8)) AdjustCoord1(); + + // x and y of start + ly2 = ly3 = ly0+sH +PSXDisplay.DrawOffset.y; + ly0 = ly1 = ly0 +PSXDisplay.DrawOffset.y; + lx1 = lx2 = lx0+sW +PSXDisplay.DrawOffset.x; + lx0 = lx3 = lx0 +PSXDisplay.DrawOffset.x; + + DrawSemiTrans = (SEMITRANSBIT(GETLE32(&gpuData[0]))) ? TRUE : FALSE; + + FillSoftwareAreaTrans(lx0,ly0,lx2,ly2, + BGR24to16(GETLE32(&gpuData[0]))); // Takes Start and Offset + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: small sprite (textured rect) +//////////////////////////////////////////////////////////////////////// + +void primSprt8(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + + if(!(dwActFixes&8)) AdjustCoord1(); + + SetRenderMode(GETLE32(&gpuData[0])); + + if(bUsingTWin) DrawSoftwareSpriteTWin(baseAddr,8,8); + else + if(usMirror) DrawSoftwareSpriteMirror(baseAddr,8,8); + else DrawSoftwareSprite(baseAddr,8,8, + baseAddr[8], + baseAddr[9]); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: medium sprite (textured rect) +//////////////////////////////////////////////////////////////////////// + +void primSprt16(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + + if(!(dwActFixes&8)) AdjustCoord1(); + + SetRenderMode(GETLE32(&gpuData[0])); + + if(bUsingTWin) DrawSoftwareSpriteTWin(baseAddr,16,16); + else + if(usMirror) DrawSoftwareSpriteMirror(baseAddr,16,16); + else DrawSoftwareSprite(baseAddr,16,16, + baseAddr[8], + baseAddr[9]); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: free-size sprite (textured rect) +//////////////////////////////////////////////////////////////////////// + +// func used on texture coord wrap +void primSprtSRest(unsigned char * baseAddr,unsigned short type) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + unsigned short sTypeRest=0; + + short s; + short sX = GETLEs16(&sgpuData[2]); + short sY = GETLEs16(&sgpuData[3]); + short sW = GETLEs16(&sgpuData[6]) & 0x3ff; + short sH = GETLEs16(&sgpuData[7]) & 0x1ff; + short tX = baseAddr[8]; + short tY = baseAddr[9]; + + switch(type) + { + case 1: + s=256-baseAddr[8]; + sW-=s; + sX+=s; + tX=0; + break; + case 2: + s=256-baseAddr[9]; + sH-=s; + sY+=s; + tY=0; + break; + case 3: + s=256-baseAddr[8]; + sW-=s; + sX+=s; + tX=0; + s=256-baseAddr[9]; + sH-=s; + sY+=s; + tY=0; + break; + case 4: + s=512-baseAddr[8]; + sW-=s; + sX+=s; + tX=0; + break; + case 5: + s=512-baseAddr[9]; + sH-=s; + sY+=s; + tY=0; + break; + case 6: + s=512-baseAddr[8]; + sW-=s; + sX+=s; + tX=0; + s=512-baseAddr[9]; + sH-=s; + sY+=s; + tY=0; + break; + } + + SetRenderMode(GETLE32(&gpuData[0])); + + if(tX+sW>256) {sW=256-tX;sTypeRest+=1;} + if(tY+sH>256) {sH=256-tY;sTypeRest+=2;} + + lx0 = sX; + ly0 = sY; + + if(!(dwActFixes&8)) AdjustCoord1(); + + DrawSoftwareSprite(baseAddr,sW,sH,tX,tY); + + if(sTypeRest && type<4) + { + if(sTypeRest&1 && type==1) primSprtSRest(baseAddr,4); + if(sTypeRest&2 && type==2) primSprtSRest(baseAddr,5); + if(sTypeRest==3 && type==3) primSprtSRest(baseAddr,6); + } + +} + +//////////////////////////////////////////////////////////////////////// + +void primSprtS(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + short sW,sH; + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + + if(!(dwActFixes&8)) AdjustCoord1(); + + sW = GETLEs16(&sgpuData[6]) & 0x3ff; + sH = GETLEs16(&sgpuData[7]) & 0x1ff; + + SetRenderMode(GETLE32(&gpuData[0])); + + if(bUsingTWin) DrawSoftwareSpriteTWin(baseAddr,sW,sH); + else + if(usMirror) DrawSoftwareSpriteMirror(baseAddr,sW,sH); + else + { + unsigned short sTypeRest=0; + short tX=baseAddr[8]; + short tY=baseAddr[9]; + + if(tX+sW>256) {sW=256-tX;sTypeRest+=1;} + if(tY+sH>256) {sH=256-tY;sTypeRest+=2;} + + DrawSoftwareSprite(baseAddr,sW,sH,tX,tY); + + if(sTypeRest) + { + if(sTypeRest&1) primSprtSRest(baseAddr,1); + if(sTypeRest&2) primSprtSRest(baseAddr,2); + if(sTypeRest==3) primSprtSRest(baseAddr,3); + } + + } + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: flat shaded Poly4 +//////////////////////////////////////////////////////////////////////// + +void primPolyF4(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + lx1 = GETLEs16(&sgpuData[4]); + ly1 = GETLEs16(&sgpuData[5]); + lx2 = GETLEs16(&sgpuData[6]); + ly2 = GETLEs16(&sgpuData[7]); + lx3 = GETLEs16(&sgpuData[8]); + ly3 = GETLEs16(&sgpuData[9]); + + if(!(dwActFixes&8)) + { + AdjustCoord4(); + if(CheckCoord4()) return; + } + + offsetPSX4(); + DrawSemiTrans = (SEMITRANSBIT(GETLE32(&gpuData[0]))) ? TRUE : FALSE; + + drawPoly4F(GETLE32(&gpuData[0])); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: smooth shaded Poly4 +//////////////////////////////////////////////////////////////////////// + +void primPolyG4(unsigned char * baseAddr) +{ + uint32_t *gpuData = (uint32_t *)baseAddr; + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + lx1 = GETLEs16(&sgpuData[6]); + ly1 = GETLEs16(&sgpuData[7]); + lx2 = GETLEs16(&sgpuData[10]); + ly2 = GETLEs16(&sgpuData[11]); + lx3 = GETLEs16(&sgpuData[14]); + ly3 = GETLEs16(&sgpuData[15]); + + if(!(dwActFixes&8)) + { + AdjustCoord4(); + if(CheckCoord4()) return; + } + + offsetPSX4(); + DrawSemiTrans = (SEMITRANSBIT(GETLE32(&gpuData[0]))) ? TRUE : FALSE; + + drawPoly4G(GETLE32(&gpuData[0]), GETLE32(&gpuData[2]), + GETLE32(&gpuData[4]), GETLE32(&gpuData[6])); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: flat shaded Texture3 +//////////////////////////////////////////////////////////////////////// + +void primPolyFT3(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + lx1 = GETLEs16(&sgpuData[6]); + ly1 = GETLEs16(&sgpuData[7]); + lx2 = GETLEs16(&sgpuData[10]); + ly2 = GETLEs16(&sgpuData[11]); + + lLowerpart=GETLE32(&gpuData[4])>>16; + UpdateGlobalTP((unsigned short)lLowerpart); + + if(!(dwActFixes&8)) + { + AdjustCoord3(); + if(CheckCoord3()) return; + } + + offsetPSX3(); + SetRenderMode(GETLE32(&gpuData[0])); + + drawPoly3FT(baseAddr); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: flat shaded Texture4 +//////////////////////////////////////////////////////////////////////// + +void primPolyFT4(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + lx1 = GETLEs16(&sgpuData[6]); + ly1 = GETLEs16(&sgpuData[7]); + lx2 = GETLEs16(&sgpuData[10]); + ly2 = GETLEs16(&sgpuData[11]); + lx3 = GETLEs16(&sgpuData[14]); + ly3 = GETLEs16(&sgpuData[15]); + + lLowerpart=GETLE32(&gpuData[4])>>16; + UpdateGlobalTP((unsigned short)lLowerpart); + + if(!(dwActFixes&8)) + { + AdjustCoord4(); + if(CheckCoord4()) return; + } + + offsetPSX4(); + + SetRenderMode(GETLE32(&gpuData[0])); + + drawPoly4FT(baseAddr); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: smooth shaded Texture3 +//////////////////////////////////////////////////////////////////////// + +void primPolyGT3(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + lx1 = GETLEs16(&sgpuData[8]); + ly1 = GETLEs16(&sgpuData[9]); + lx2 = GETLEs16(&sgpuData[14]); + ly2 = GETLEs16(&sgpuData[15]); + + lLowerpart=GETLE32(&gpuData[5])>>16; + UpdateGlobalTP((unsigned short)lLowerpart); + + if(!(dwActFixes&8)) + { + AdjustCoord3(); + if(CheckCoord3()) return; + } + + offsetPSX3(); + DrawSemiTrans = (SEMITRANSBIT(GETLE32(&gpuData[0]))) ? TRUE : FALSE; + + if(SHADETEXBIT(GETLE32(&gpuData[0]))) + { + gpuData[0] = (gpuData[0]&HOST2LE32(0xff000000))|HOST2LE32(0x00808080); + gpuData[3] = (gpuData[3]&HOST2LE32(0xff000000))|HOST2LE32(0x00808080); + gpuData[6] = (gpuData[6]&HOST2LE32(0xff000000))|HOST2LE32(0x00808080); + } + + drawPoly3GT(baseAddr); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: smooth shaded Poly3 +//////////////////////////////////////////////////////////////////////// + +void primPolyG3(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + lx1 = GETLEs16(&sgpuData[6]); + ly1 = GETLEs16(&sgpuData[7]); + lx2 = GETLEs16(&sgpuData[10]); + ly2 = GETLEs16(&sgpuData[11]); + + if(!(dwActFixes&8)) + { + AdjustCoord3(); + if(CheckCoord3()) return; + } + + offsetPSX3(); + DrawSemiTrans = (SEMITRANSBIT(GETLE32(&gpuData[0]))) ? TRUE : FALSE; + + drawPoly3G(GETLE32(&gpuData[0]), GETLE32(&gpuData[2]), GETLE32(&gpuData[4])); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: smooth shaded Texture4 +//////////////////////////////////////////////////////////////////////// + +void primPolyGT4(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + lx1 = GETLEs16(&sgpuData[8]); + ly1 = GETLEs16(&sgpuData[9]); + lx2 = GETLEs16(&sgpuData[14]); + ly2 = GETLEs16(&sgpuData[15]); + lx3 = GETLEs16(&sgpuData[20]); + ly3 = GETLEs16(&sgpuData[21]); + + lLowerpart=GETLE32(&gpuData[5])>>16; + UpdateGlobalTP((unsigned short)lLowerpart); + + if(!(dwActFixes&8)) + { + AdjustCoord4(); + if(CheckCoord4()) return; + } + + offsetPSX4(); + DrawSemiTrans = (SEMITRANSBIT(GETLE32(&gpuData[0]))) ? TRUE : FALSE; + + if(SHADETEXBIT(GETLE32(&gpuData[0]))) + { + gpuData[0] = (gpuData[0]&HOST2LE32(0xff000000))|HOST2LE32(0x00808080); + gpuData[3] = (gpuData[3]&HOST2LE32(0xff000000))|HOST2LE32(0x00808080); + gpuData[6] = (gpuData[6]&HOST2LE32(0xff000000))|HOST2LE32(0x00808080); + gpuData[9] = (gpuData[9]&HOST2LE32(0xff000000))|HOST2LE32(0x00808080); + } + + drawPoly4GT(baseAddr); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: smooth shaded Poly3 +//////////////////////////////////////////////////////////////////////// + +void primPolyF3(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + lx1 = GETLEs16(&sgpuData[4]); + ly1 = GETLEs16(&sgpuData[5]); + lx2 = GETLEs16(&sgpuData[6]); + ly2 = GETLEs16(&sgpuData[7]); + + if(!(dwActFixes&8)) + { + AdjustCoord3(); + if(CheckCoord3()) return; + } + + offsetPSX3(); + SetRenderMode(GETLE32(&gpuData[0])); + + drawPoly3F(GETLE32(&gpuData[0])); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: skipping shaded polylines +//////////////////////////////////////////////////////////////////////// + +void primLineGSkip(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + int iMax=255; + int i=2; + + ly1 = (short)((GETLE32(&gpuData[1])>>16) & 0xffff); + lx1 = (short)(GETLE32(&gpuData[1]) & 0xffff); + + while(!(((GETLE32(&gpuData[i]) & 0xF000F000) == 0x50005000) && i>=4)) + { + i++; + ly1 = (short)((GETLE32(&gpuData[i])>>16) & 0xffff); + lx1 = (short)(GETLE32(&gpuData[i]) & 0xffff); + i++;if(i>iMax) break; + } +} + +//////////////////////////////////////////////////////////////////////// +// cmd: shaded polylines +//////////////////////////////////////////////////////////////////////// + +void primLineGEx(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + int iMax=255; + uint32_t lc0,lc1; + short slx0,slx1,sly0,sly1;int i=2;BOOL bDraw=TRUE; + + sly1 = (short)((GETLE32(&gpuData[1])>>16) & 0xffff); + slx1 = (short)(GETLE32(&gpuData[1]) & 0xffff); + + if(!(dwActFixes&8)) + { + slx1=(short)(((int)slx1<>SIGNSHIFT); + sly1=(short)(((int)sly1<>SIGNSHIFT); + } + + lc1 = gpuData[0] & 0xffffff; + + DrawSemiTrans = (SEMITRANSBIT(GETLE32(&gpuData[0]))) ? TRUE : FALSE; + + while(!(((GETLE32(&gpuData[i]) & 0xF000F000) == 0x50005000) && i>=4)) + { + sly0=sly1; slx0=slx1; lc0=lc1; + lc1=GETLE32(&gpuData[i]) & 0xffffff; + + i++; + + // no check needed on gshaded polyline positions + // if((gpuData[i] & 0xF000F000) == 0x50005000) break; + + sly1 = (short)((GETLE32(&gpuData[i])>>16) & 0xffff); + slx1 = (short)(GETLE32(&gpuData[i]) & 0xffff); + + if(!(dwActFixes&8)) + { + slx1=(short)(((int)slx1<>SIGNSHIFT); + sly1=(short)(((int)sly1<>SIGNSHIFT); + if(CheckCoordL(slx0,sly0,slx1,sly1)) bDraw=FALSE; else bDraw=TRUE; + } + + if ((lx0 != lx1) || (ly0 != ly1)) + { + ly0=sly0; + lx0=slx0; + ly1=sly1; + lx1=slx1; + + offsetPSX2(); + if(bDraw) DrawSoftwareLineShade(lc0, lc1); + } + i++; + if(i>iMax) break; + } + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: shaded polyline2 +//////////////////////////////////////////////////////////////////////// + +void primLineG2(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + lx1 = GETLEs16(&sgpuData[6]); + ly1 = GETLEs16(&sgpuData[7]); + + if(!(dwActFixes&8)) + { + AdjustCoord2(); + if(CheckCoord2()) return; + } + + if((lx0 == lx1) && (ly0 == ly1)) {lx1++;ly1++;} + + DrawSemiTrans = (SEMITRANSBIT(GETLE32(&gpuData[0]))) ? TRUE : FALSE; + offsetPSX2(); + DrawSoftwareLineShade(GETLE32(&gpuData[0]),GETLE32(&gpuData[2])); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: skipping flat polylines +//////////////////////////////////////////////////////////////////////// + +void primLineFSkip(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + int i=2,iMax=255; + + ly1 = (short)((GETLE32(&gpuData[1])>>16) & 0xffff); + lx1 = (short)(GETLE32(&gpuData[1]) & 0xffff); + + while(!(((GETLE32(&gpuData[i]) & 0xF000F000) == 0x50005000) && i>=3)) + { + ly1 = (short)((GETLE32(&gpuData[i])>>16) & 0xffff); + lx1 = (short)(GETLE32(&gpuData[i]) & 0xffff); + i++;if(i>iMax) break; + } +} + +//////////////////////////////////////////////////////////////////////// +// cmd: drawing flat polylines +//////////////////////////////////////////////////////////////////////// + +void primLineFEx(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + int iMax; + short slx0,slx1,sly0,sly1;int i=2;BOOL bDraw=TRUE; + + iMax=255; + + sly1 = (short)((GETLE32(&gpuData[1])>>16) & 0xffff); + slx1 = (short)(GETLE32(&gpuData[1]) & 0xffff); + if(!(dwActFixes&8)) + { + slx1=(short)(((int)slx1<>SIGNSHIFT); + sly1=(short)(((int)sly1<>SIGNSHIFT); + } + + SetRenderMode(GETLE32(&gpuData[0])); + + while(!(((GETLE32(&gpuData[i]) & 0xF000F000) == 0x50005000) && i>=3)) + { + sly0 = sly1;slx0=slx1; + sly1 = (short)((GETLE32(&gpuData[i])>>16) & 0xffff); + slx1 = (short)(GETLE32(&gpuData[i]) & 0xffff); + if(!(dwActFixes&8)) + { + slx1=(short)(((int)slx1<>SIGNSHIFT); + sly1=(short)(((int)sly1<>SIGNSHIFT); + + if(CheckCoordL(slx0,sly0,slx1,sly1)) bDraw=FALSE; else bDraw=TRUE; + } + + ly0=sly0; + lx0=slx0; + ly1=sly1; + lx1=slx1; + + offsetPSX2(); + if(bDraw) DrawSoftwareLineFlat(GETLE32(&gpuData[0])); + + i++;if(i>iMax) break; + } + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: drawing flat polyline2 +//////////////////////////////////////////////////////////////////////// + +void primLineF2(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = GETLEs16(&sgpuData[2]); + ly0 = GETLEs16(&sgpuData[3]); + lx1 = GETLEs16(&sgpuData[4]); + ly1 = GETLEs16(&sgpuData[5]); + + if(!(dwActFixes&8)) + { + AdjustCoord2(); + if(CheckCoord2()) return; + } + + if((lx0 == lx1) && (ly0 == ly1)) {lx1++;ly1++;} + + offsetPSX2(); + SetRenderMode(GETLE32(&gpuData[0])); + + DrawSoftwareLineFlat(GETLE32(&gpuData[0])); + + bDoVSyncUpdate=TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: well, easiest command... not implemented +//////////////////////////////////////////////////////////////////////// + +void primNI(unsigned char *bA) +{ +} + +//////////////////////////////////////////////////////////////////////// +// cmd func ptr table +//////////////////////////////////////////////////////////////////////// + + +void (*primTableJ[256])(unsigned char *) = +{ + // 00 + primNI,primNI,primBlkFill,primNI,primNI,primNI,primNI,primNI, + // 08 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 10 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 18 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 20 + primPolyF3,primPolyF3,primPolyF3,primPolyF3,primPolyFT3,primPolyFT3,primPolyFT3,primPolyFT3, + // 28 + primPolyF4,primPolyF4,primPolyF4,primPolyF4,primPolyFT4,primPolyFT4,primPolyFT4,primPolyFT4, + // 30 + primPolyG3,primPolyG3,primPolyG3,primPolyG3,primPolyGT3,primPolyGT3,primPolyGT3,primPolyGT3, + // 38 + primPolyG4,primPolyG4,primPolyG4,primPolyG4,primPolyGT4,primPolyGT4,primPolyGT4,primPolyGT4, + // 40 + primLineF2,primLineF2,primLineF2,primLineF2,primNI,primNI,primNI,primNI, + // 48 + primLineFEx,primLineFEx,primLineFEx,primLineFEx,primLineFEx,primLineFEx,primLineFEx,primLineFEx, + // 50 + primLineG2,primLineG2,primLineG2,primLineG2,primNI,primNI,primNI,primNI, + // 58 + primLineGEx,primLineGEx,primLineGEx,primLineGEx,primLineGEx,primLineGEx,primLineGEx,primLineGEx, + // 60 + primTileS,primTileS,primTileS,primTileS,primSprtS,primSprtS,primSprtS,primSprtS, + // 68 + primTile1,primTile1,primTile1,primTile1,primNI,primNI,primNI,primNI, + // 70 + primTile8,primTile8,primTile8,primTile8,primSprt8,primSprt8,primSprt8,primSprt8, + // 78 + primTile16,primTile16,primTile16,primTile16,primSprt16,primSprt16,primSprt16,primSprt16, + // 80 + primMoveImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 88 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 90 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 98 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // a0 + primLoadImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // a8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // b0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // b8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // c0 + primStoreImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // c8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // d0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // d8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // e0 + primNI,cmdTexturePage,cmdTextureWindow,cmdDrawAreaStart,cmdDrawAreaEnd,cmdDrawOffset,cmdSTP,primNI, + // e8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // f0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // f8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI +}; + +//////////////////////////////////////////////////////////////////////// +// cmd func ptr table for skipping +//////////////////////////////////////////////////////////////////////// + +void (*primTableSkip[256])(unsigned char *) = +{ + // 00 + primNI,primNI,primBlkFill,primNI,primNI,primNI,primNI,primNI, + // 08 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 10 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 18 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 20 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 28 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 30 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 38 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 40 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 48 + primLineFSkip,primLineFSkip,primLineFSkip,primLineFSkip,primLineFSkip,primLineFSkip,primLineFSkip,primLineFSkip, + // 50 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 58 + primLineGSkip,primLineGSkip,primLineGSkip,primLineGSkip,primLineGSkip,primLineGSkip,primLineGSkip,primLineGSkip, + // 60 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 68 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 70 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 78 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 80 + primMoveImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 88 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 90 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 98 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // a0 + primLoadImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // a8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // b0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // b8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // c0 + primStoreImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // c8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // d0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // d8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // e0 + primNI,cmdTexturePage,cmdTextureWindow,cmdDrawAreaStart,cmdDrawAreaEnd,cmdDrawOffset,cmdSTP,primNI, + // e8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // f0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // f8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI +}; diff --git a/plugins/dfxvideo/prim.h b/plugins/dfxvideo/prim.h new file mode 100644 index 00000000..c37c12b0 --- /dev/null +++ b/plugins/dfxvideo/prim.h @@ -0,0 +1,24 @@ +/*************************************************************************** + prim.h - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _PRIMDRAW_H_ +#define _PRIMDRAW_H_ + +void UploadScreen (long Position); +void PrepareFullScreenUpload (long Position); + +#endif // _PRIMDRAW_H_ diff --git a/plugins/dfxvideo/soft.c b/plugins/dfxvideo/soft.c new file mode 100644 index 00000000..21625664 --- /dev/null +++ b/plugins/dfxvideo/soft.c @@ -0,0 +1,8483 @@ +/*************************************************************************** + soft.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_SOFT + +#include "externals.h" +#include "soft.h" + +//#define VC_INLINE +#include "gpu.h" +#include "prim.h" +#include "menu.h" +#include "swap.h" + +//////////////////////////////////////////////////////////////////////////////////// +// "NO EDGE BUFFER" POLY VERSION... FUNCS BASED ON FATMAP.TXT FROM MRI / Doomsday +//////////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////////// +// defines +//////////////////////////////////////////////////////////////////////////////////// + +// switches for painting textured quads as 2 triangles (small glitches, but better shading!) +// can be toggled by game fix 0x200 in version 1.17 anyway, so let the defines enabled! + +#define POLYQUAD3 +#define POLYQUAD3GT + +// fast solid loops... a bit more additional code, of course + +#define FASTSOLID + +// psx blending mode 3 with 25% incoming color (instead 50% without the define) + +#define HALFBRIGHTMODE3 + +// color decode defines + +#define XCOL1(x) (x & 0x1f) +#define XCOL2(x) (x & 0x3e0) +#define XCOL3(x) (x & 0x7c00) + +#define XCOL1D(x) (x & 0x1f) +#define XCOL2D(x) ((x>>5) & 0x1f) +#define XCOL3D(x) ((x>>10) & 0x1f) + +#define X32TCOL1(x) ((x & 0x001f001f)<<7) +#define X32TCOL2(x) ((x & 0x03e003e0)<<2) +#define X32TCOL3(x) ((x & 0x7c007c00)>>3) + +#define X32COL1(x) (x & 0x001f001f) +#define X32COL2(x) ((x>>5) & 0x001f001f) +#define X32COL3(x) ((x>>10) & 0x001f001f) + +#define X32ACOL1(x) (x & 0x001e001e) +#define X32ACOL2(x) ((x>>5) & 0x001e001e) +#define X32ACOL3(x) ((x>>10) & 0x001e001e) + +#define X32BCOL1(x) (x & 0x001c001c) +#define X32BCOL2(x) ((x>>5) & 0x001c001c) +#define X32BCOL3(x) ((x>>10) & 0x001c001c) + +#define X32PSXCOL(r,g,b) ((g<<10)|(b<<5)|r) + +#define XPSXCOL(r,g,b) ((g&0x7c00)|(b&0x3e0)|(r&0x1f)) + +//////////////////////////////////////////////////////////////////////////////////// +// soft globals +//////////////////////////////////////////////////////////////////////////////////// + +short g_m1=255,g_m2=255,g_m3=255; +short DrawSemiTrans=FALSE; +short Ymin; +short Ymax; + +short ly0,lx0,ly1,lx1,ly2,lx2,ly3,lx3; // global psx vertex coords +int32_t GlobalTextAddrX,GlobalTextAddrY,GlobalTextTP; +int32_t GlobalTextREST,GlobalTextABR,GlobalTextPAGE; + +//////////////////////////////////////////////////////////////////////// +// POLYGON OFFSET FUNCS +//////////////////////////////////////////////////////////////////////// + +void offsetPSXLine(void) +{ + short x0,x1,y0,y1,dx,dy;float px,py; + + x0 = lx0+1+PSXDisplay.DrawOffset.x; + x1 = lx1+1+PSXDisplay.DrawOffset.x; + y0 = ly0+1+PSXDisplay.DrawOffset.y; + y1 = ly1+1+PSXDisplay.DrawOffset.y; + + dx=x1-x0; + dy=y1-y0; + + // tricky line width without sqrt + + if(dx>=0) + { + if(dy>=0) + { + px=0.5f; + if(dx>dy) py=-0.5f; + else if(dxdy) px= 0.5f; + else if(dx=0) + { + py=0.5f; + dx=-dx; + if(dx>dy) px=-0.5f; + else if(dxdy) py=-0.5f; + else if(dx>10; + x-=(y<<10); + + coeff = dithertable[(y&3)*4+(x&3)]; + + rlow = r&7; glow = g&7; blow = b&7; + + r>>=3; g>>=3; b>>=3; + + if ((r < 0x1F) && rlow > coeff) r++; + if ((g < 0x1F) && glow > coeff) g++; + if ((b < 0x1F) && blow > coeff) b++; + + PUTLE16(pdest, ((unsigned short)b<<10) | + ((unsigned short)g<<5) | + (unsigned short)r | sM); +} + +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////// + +__inline void GetShadeTransCol_Dither(unsigned short * pdest, int32_t m1, int32_t m2, int32_t m3) +{ + int32_t r,g,b; + + if(bCheckMask && (*pdest & HOST2LE16(0x8000))) return; + + if(DrawSemiTrans) + { + r=((XCOL1D(GETLE16(pdest)))<<3); + b=((XCOL2D(GETLE16(pdest)))<<3); + g=((XCOL3D(GETLE16(pdest)))<<3); + + if(GlobalTextABR==0) + { + r=(r>>1)+(m1>>1); + b=(b>>1)+(m2>>1); + g=(g>>1)+(m3>>1); + } + else + if(GlobalTextABR==1) + { + r+=m1; + b+=m2; + g+=m3; + } + else + if(GlobalTextABR==2) + { + r-=m1; + b-=m2; + g-=m3; + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r+=(m1>>2); + b+=(m2>>2); + g+=(m3>>2); +#else + r+=(m1>>1); + b+=(m2>>1); + g+=(m3>>1); +#endif + } + } + else + { + r=m1; + b=m2; + g=m3; + } + + if(r&0x7FFFFF00) r=0xff; + if(b&0x7FFFFF00) b=0xff; + if(g&0x7FFFFF00) g=0xff; + + Dither16(pdest,r,b,g,sSetMask); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetShadeTransCol(unsigned short * pdest,unsigned short color) +{ + if(bCheckMask && (*pdest & HOST2LE16(0x8000))) return; + + if(DrawSemiTrans) + { + int32_t r,g,b; + + if(GlobalTextABR==0) + { + PUTLE16(pdest, (((GETLE16(pdest)&0x7bde)>>1)+(((color)&0x7bde)>>1))|sSetMask);//0x8000; + return; +/* + r=(XCOL1(*pdest)>>1)+((XCOL1(color))>>1); + b=(XCOL2(*pdest)>>1)+((XCOL2(color))>>1); + g=(XCOL3(*pdest)>>1)+((XCOL3(color))>>1); +*/ + } + else + if(GlobalTextABR==1) + { + r=(XCOL1(GETLE16(pdest)))+((XCOL1(color))); + b=(XCOL2(GETLE16(pdest)))+((XCOL2(color))); + g=(XCOL3(GETLE16(pdest)))+((XCOL3(color))); + } + else + if(GlobalTextABR==2) + { + r=(XCOL1(GETLE16(pdest)))-((XCOL1(color))); + b=(XCOL2(GETLE16(pdest)))-((XCOL2(color))); + g=(XCOL3(GETLE16(pdest)))-((XCOL3(color))); + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(XCOL1(GETLE16(pdest)))+((XCOL1(color))>>2); + b=(XCOL2(GETLE16(pdest)))+((XCOL2(color))>>2); + g=(XCOL3(GETLE16(pdest)))+((XCOL3(color))>>2); +#else + r=(XCOL1(GETLE16(pdest)))+((XCOL1(color))>>1); + b=(XCOL2(GETLE16(pdest)))+((XCOL2(color))>>1); + g=(XCOL3(GETLE16(pdest)))+((XCOL3(color))>>1); +#endif + } + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + PUTLE16(pdest, (XPSXCOL(r,g,b))|sSetMask);//0x8000; + } + else PUTLE16(pdest, color|sSetMask); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetShadeTransCol32(uint32_t * pdest,uint32_t color) +{ + if(DrawSemiTrans) + { + int32_t r,g,b; + + if(GlobalTextABR==0) + { + if(!bCheckMask) + { + PUTLE32(pdest, (((GETLE32(pdest)&0x7bde7bde)>>1)+(((color)&0x7bde7bde)>>1))|lSetMask);//0x80008000; + return; + } + r=(X32ACOL1(GETLE32(pdest))>>1)+((X32ACOL1(color))>>1); + b=(X32ACOL2(GETLE32(pdest))>>1)+((X32ACOL2(color))>>1); + g=(X32ACOL3(GETLE32(pdest))>>1)+((X32ACOL3(color))>>1); + } + else + if(GlobalTextABR==1) + { + r=(X32COL1(GETLE32(pdest)))+((X32COL1(color))); + b=(X32COL2(GETLE32(pdest)))+((X32COL2(color))); + g=(X32COL3(GETLE32(pdest)))+((X32COL3(color))); + } + else + if(GlobalTextABR==2) + { + int32_t sr,sb,sg,src,sbc,sgc,c; + src=XCOL1(color);sbc=XCOL2(color);sgc=XCOL3(color); + c=GETLE32(pdest)>>16; + sr=(XCOL1(c))-src; if(sr&0x8000) sr=0; + sb=(XCOL2(c))-sbc; if(sb&0x8000) sb=0; + sg=(XCOL3(c))-sgc; if(sg&0x8000) sg=0; + r=((int32_t)sr)<<16;b=((int32_t)sb)<<11;g=((int32_t)sg)<<6; + c=LOWORD(GETLE32(pdest)); + sr=(XCOL1(c))-src; if(sr&0x8000) sr=0; + sb=(XCOL2(c))-sbc; if(sb&0x8000) sb=0; + sg=(XCOL3(c))-sgc; if(sg&0x8000) sg=0; + r|=sr;b|=sb>>5;g|=sg>>10; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(X32COL1(GETLE32(pdest)))+((X32BCOL1(color))>>2); + b=(X32COL2(GETLE32(pdest)))+((X32BCOL2(color))>>2); + g=(X32COL3(GETLE32(pdest)))+((X32BCOL3(color))>>2); +#else + r=(X32COL1(GETLE32(pdest)))+((X32ACOL1(color))>>1); + b=(X32COL2(GETLE32(pdest)))+((X32ACOL2(color))>>1); + g=(X32COL3(GETLE32(pdest)))+((X32ACOL3(color))>>1); +#endif + } + + if(r&0x7FE00000) r=0x1f0000|(r&0xFFFF); + if(r&0x7FE0) r=0x1f |(r&0xFFFF0000); + if(b&0x7FE00000) b=0x1f0000|(b&0xFFFF); + if(b&0x7FE0) b=0x1f |(b&0xFFFF0000); + if(g&0x7FE00000) g=0x1f0000|(g&0xFFFF); + if(g&0x7FE0) g=0x1f |(g&0xFFFF0000); + + if(bCheckMask) + { + uint32_t ma=GETLE32(pdest); + PUTLE32(pdest, (X32PSXCOL(r,g,b))|lSetMask);//0x80008000; + if(ma&0x80000000) PUTLE32(pdest, (ma&0xFFFF0000)|(*pdest&0xFFFF)); + if(ma&0x00008000) PUTLE32(pdest, (ma&0xFFFF) |(*pdest&0xFFFF0000)); + return; + } + PUTLE32(pdest, (X32PSXCOL(r,g,b))|lSetMask);//0x80008000; + } + else + { + if(bCheckMask) + { + uint32_t ma=GETLE32(pdest); + PUTLE32(pdest, color|lSetMask);//0x80008000; + if(ma&0x80000000) PUTLE32(pdest, (ma&0xFFFF0000)|(GETLE32(pdest)&0xFFFF)); + if(ma&0x00008000) PUTLE32(pdest, (ma&0xFFFF) |(GETLE32(pdest)&0xFFFF0000)); + return; + } + + PUTLE32(pdest, color|lSetMask);//0x80008000; + } +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG(unsigned short * pdest,unsigned short color) +{ + int32_t r,g,b;unsigned short l; + + if(color==0) return; + + if(bCheckMask && (*pdest & HOST2LE16(0x8000))) return; + + l=sSetMask|(color&0x8000); + + if(DrawSemiTrans && (color&0x8000)) + { + if(GlobalTextABR==0) + { + unsigned short d; + d =(GETLE16(pdest)&0x7bde)>>1; + color =((color) &0x7bde)>>1; + r=(XCOL1(d))+((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(d))+((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(d))+((((XCOL3(color)))* g_m3)>>7); + +/* + r=(XCOL1(*pdest)>>1)+((((XCOL1(color))>>1)* g_m1)>>7); + b=(XCOL2(*pdest)>>1)+((((XCOL2(color))>>1)* g_m2)>>7); + g=(XCOL3(*pdest)>>1)+((((XCOL3(color))>>1)* g_m3)>>7); +*/ + } + else + if(GlobalTextABR==1) + { + r=(XCOL1(GETLE16(pdest)))+((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(GETLE16(pdest)))+((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(GETLE16(pdest)))+((((XCOL3(color)))* g_m3)>>7); + } + else + if(GlobalTextABR==2) + { + r=(XCOL1(GETLE16(pdest)))-((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(GETLE16(pdest)))-((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(GETLE16(pdest)))-((((XCOL3(color)))* g_m3)>>7); + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(XCOL1(GETLE16(pdest)))+((((XCOL1(color))>>2)* g_m1)>>7); + b=(XCOL2(GETLE16(pdest)))+((((XCOL2(color))>>2)* g_m2)>>7); + g=(XCOL3(GETLE16(pdest)))+((((XCOL3(color))>>2)* g_m3)>>7); +#else + r=(XCOL1(GETLE16(pdest)))+((((XCOL1(color))>>1)* g_m1)>>7); + b=(XCOL2(GETLE16(pdest)))+((((XCOL2(color))>>1)* g_m2)>>7); + g=(XCOL3(GETLE16(pdest)))+((((XCOL3(color))>>1)* g_m3)>>7); +#endif + } + } + else + { + r=((XCOL1(color))* g_m1)>>7; + b=((XCOL2(color))* g_m2)>>7; + g=((XCOL3(color))* g_m3)>>7; + } + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + PUTLE16(pdest, (XPSXCOL(r,g,b))|l); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG_S(unsigned short * pdest,unsigned short color) +{ + int32_t r,g,b;unsigned short l; + + if(color==0) return; + + l=sSetMask|(color&0x8000); + + r=((XCOL1(color))* g_m1)>>7; + b=((XCOL2(color))* g_m2)>>7; + g=((XCOL3(color))* g_m3)>>7; + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + PUTLE16(pdest, (XPSXCOL(r,g,b))|l); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG_SPR(unsigned short * pdest,unsigned short color) +{ + int32_t r,g,b;unsigned short l; + + if(color==0) return; + + if(bCheckMask && (GETLE16(pdest) & 0x8000)) return; + + l=sSetMask|(color&0x8000); + + if(DrawSemiTrans && (color&0x8000)) + { + if(GlobalTextABR==0) + { + unsigned short d; + d =(GETLE16(pdest)&0x7bde)>>1; + color =((color) &0x7bde)>>1; + r=(XCOL1(d))+((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(d))+((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(d))+((((XCOL3(color)))* g_m3)>>7); + +/* + r=(XCOL1(*pdest)>>1)+((((XCOL1(color))>>1)* g_m1)>>7); + b=(XCOL2(*pdest)>>1)+((((XCOL2(color))>>1)* g_m2)>>7); + g=(XCOL3(*pdest)>>1)+((((XCOL3(color))>>1)* g_m3)>>7); +*/ + } + else + if(GlobalTextABR==1) + { + r=(XCOL1(GETLE16(pdest)))+((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(GETLE16(pdest)))+((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(GETLE16(pdest)))+((((XCOL3(color)))* g_m3)>>7); + } + else + if(GlobalTextABR==2) + { + r=(XCOL1(GETLE16(pdest)))-((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(GETLE16(pdest)))-((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(GETLE16(pdest)))-((((XCOL3(color)))* g_m3)>>7); + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(XCOL1(GETLE16(pdest)))+((((XCOL1(color))>>2)* g_m1)>>7); + b=(XCOL2(GETLE16(pdest)))+((((XCOL2(color))>>2)* g_m2)>>7); + g=(XCOL3(GETLE16(pdest)))+((((XCOL3(color))>>2)* g_m3)>>7); +#else + r=(XCOL1(GETLE16(pdest)))+((((XCOL1(color))>>1)* g_m1)>>7); + b=(XCOL2(GETLE16(pdest)))+((((XCOL2(color))>>1)* g_m2)>>7); + g=(XCOL3(GETLE16(pdest)))+((((XCOL3(color))>>1)* g_m3)>>7); +#endif + } + } + else + { + r=((XCOL1(color))* g_m1)>>7; + b=((XCOL2(color))* g_m2)>>7; + g=((XCOL3(color))* g_m3)>>7; + } + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + PUTLE16(pdest, (XPSXCOL(r,g,b))|l); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG32(uint32_t * pdest,uint32_t color) +{ + int32_t r,g,b,l; + + if(color==0) return; + + l=lSetMask|(color&0x80008000); + + if(DrawSemiTrans && (color&0x80008000)) + { + if(GlobalTextABR==0) + { + r=((((X32TCOL1(GETLE32(pdest)))+((X32COL1(color)) * g_m1))&0xFF00FF00)>>8); + b=((((X32TCOL2(GETLE32(pdest)))+((X32COL2(color)) * g_m2))&0xFF00FF00)>>8); + g=((((X32TCOL3(GETLE32(pdest)))+((X32COL3(color)) * g_m3))&0xFF00FF00)>>8); + } + else + if(GlobalTextABR==1) + { + r=(X32COL1(GETLE32(pdest)))+(((((X32COL1(color)))* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(GETLE32(pdest)))+(((((X32COL2(color)))* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(GETLE32(pdest)))+(((((X32COL3(color)))* g_m3)&0xFF80FF80)>>7); + } + else + if(GlobalTextABR==2) + { + int32_t t; + r=(((((X32COL1(color)))* g_m1)&0xFF80FF80)>>7); + t=(GETLE32(pdest)&0x001f0000)-(r&0x003f0000); if(t&0x80000000) t=0; + r=(GETLE32(pdest)&0x0000001f)-(r&0x0000003f); if(r&0x80000000) r=0; + r|=t; + + b=(((((X32COL2(color)))* g_m2)&0xFF80FF80)>>7); + t=((GETLE32(pdest)>>5)&0x001f0000)-(b&0x003f0000); if(t&0x80000000) t=0; + b=((GETLE32(pdest)>>5)&0x0000001f)-(b&0x0000003f); if(b&0x80000000) b=0; + b|=t; + + g=(((((X32COL3(color)))* g_m3)&0xFF80FF80)>>7); + t=((GETLE32(pdest)>>10)&0x001f0000)-(g&0x003f0000); if(t&0x80000000) t=0; + g=((GETLE32(pdest)>>10)&0x0000001f)-(g&0x0000003f); if(g&0x80000000) g=0; + g|=t; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(X32COL1(GETLE32(pdest)))+(((((X32BCOL1(color))>>2)* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(GETLE32(pdest)))+(((((X32BCOL2(color))>>2)* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(GETLE32(pdest)))+(((((X32BCOL3(color))>>2)* g_m3)&0xFF80FF80)>>7); +#else + r=(X32COL1(GETLE32(pdest)))+(((((X32ACOL1(color))>>1)* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(GETLE32(pdest)))+(((((X32ACOL2(color))>>1)* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(GETLE32(pdest)))+(((((X32ACOL3(color))>>1)* g_m3)&0xFF80FF80)>>7); +#endif + } + + if(!(color&0x8000)) + { + r=(r&0xffff0000)|((((X32COL1(color))* g_m1)&0x0000FF80)>>7); + b=(b&0xffff0000)|((((X32COL2(color))* g_m2)&0x0000FF80)>>7); + g=(g&0xffff0000)|((((X32COL3(color))* g_m3)&0x0000FF80)>>7); + } + if(!(color&0x80000000)) + { + r=(r&0xffff)|((((X32COL1(color))* g_m1)&0xFF800000)>>7); + b=(b&0xffff)|((((X32COL2(color))* g_m2)&0xFF800000)>>7); + g=(g&0xffff)|((((X32COL3(color))* g_m3)&0xFF800000)>>7); + } + + } + else + { + r=(((X32COL1(color))* g_m1)&0xFF80FF80)>>7; + b=(((X32COL2(color))* g_m2)&0xFF80FF80)>>7; + g=(((X32COL3(color))* g_m3)&0xFF80FF80)>>7; + } + + if(r&0x7FE00000) r=0x1f0000|(r&0xFFFF); + if(r&0x7FE0) r=0x1f |(r&0xFFFF0000); + if(b&0x7FE00000) b=0x1f0000|(b&0xFFFF); + if(b&0x7FE0) b=0x1f |(b&0xFFFF0000); + if(g&0x7FE00000) g=0x1f0000|(g&0xFFFF); + if(g&0x7FE0) g=0x1f |(g&0xFFFF0000); + + if(bCheckMask) + { + uint32_t ma=GETLE32(pdest); + + PUTLE32(pdest, (X32PSXCOL(r,g,b))|l); + + if((color&0xffff)==0 ) PUTLE32(pdest, (ma&0xffff)|(GETLE32(pdest)&0xffff0000)); + if((color&0xffff0000)==0) PUTLE32(pdest, (ma&0xffff0000)|(GETLE32(pdest)&0xffff)); + if(ma&0x80000000) PUTLE32(pdest, (ma&0xFFFF0000)|(GETLE32(pdest)&0xFFFF)); + if(ma&0x00008000) PUTLE32(pdest, (ma&0xFFFF) |(GETLE32(pdest)&0xFFFF0000)); + + return; + } + if((color&0xffff)==0 ) {PUTLE32(pdest, (GETLE32(pdest)&0xffff)|(((X32PSXCOL(r,g,b))|l)&0xffff0000));return;} + if((color&0xffff0000)==0) {PUTLE32(pdest, (GETLE32(pdest)&0xffff0000)|(((X32PSXCOL(r,g,b))|l)&0xffff));return;} + + PUTLE32(pdest, (X32PSXCOL(r,g,b))|l); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG32_S(uint32_t * pdest,uint32_t color) +{ + int32_t r,g,b; + + if(color==0) return; + + r=(((X32COL1(color))* g_m1)&0xFF80FF80)>>7; + b=(((X32COL2(color))* g_m2)&0xFF80FF80)>>7; + g=(((X32COL3(color))* g_m3)&0xFF80FF80)>>7; + + if(r&0x7FE00000) r=0x1f0000|(r&0xFFFF); + if(r&0x7FE0) r=0x1f |(r&0xFFFF0000); + if(b&0x7FE00000) b=0x1f0000|(b&0xFFFF); + if(b&0x7FE0) b=0x1f |(b&0xFFFF0000); + if(g&0x7FE00000) g=0x1f0000|(g&0xFFFF); + if(g&0x7FE0) g=0x1f |(g&0xFFFF0000); + + if((color&0xffff)==0) {PUTLE32(pdest, (GETLE32(pdest)&0xffff)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff0000));return;} + if((color&0xffff0000)==0) {PUTLE32(pdest, (GETLE32(pdest)&0xffff0000)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff));return;} + + PUTLE32(pdest, (X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000)); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG32_SPR(uint32_t * pdest,uint32_t color) +{ + int32_t r,g,b; + + if(color==0) return; + + if(DrawSemiTrans && (color&0x80008000)) + { + if(GlobalTextABR==0) + { + r=((((X32TCOL1(GETLE32(pdest)))+((X32COL1(color)) * g_m1))&0xFF00FF00)>>8); + b=((((X32TCOL2(GETLE32(pdest)))+((X32COL2(color)) * g_m2))&0xFF00FF00)>>8); + g=((((X32TCOL3(GETLE32(pdest)))+((X32COL3(color)) * g_m3))&0xFF00FF00)>>8); + } + else + if(GlobalTextABR==1) + { + r=(X32COL1(GETLE32(pdest)))+(((((X32COL1(color)))* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(GETLE32(pdest)))+(((((X32COL2(color)))* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(GETLE32(pdest)))+(((((X32COL3(color)))* g_m3)&0xFF80FF80)>>7); + } + else + if(GlobalTextABR==2) + { + int32_t t; + r=(((((X32COL1(color)))* g_m1)&0xFF80FF80)>>7); + t=(GETLE32(pdest)&0x001f0000)-(r&0x003f0000); if(t&0x80000000) t=0; + r=(GETLE32(pdest)&0x0000001f)-(r&0x0000003f); if(r&0x80000000) r=0; + r|=t; + + b=(((((X32COL2(color)))* g_m2)&0xFF80FF80)>>7); + t=((GETLE32(pdest)>>5)&0x001f0000)-(b&0x003f0000); if(t&0x80000000) t=0; + b=((GETLE32(pdest)>>5)&0x0000001f)-(b&0x0000003f); if(b&0x80000000) b=0; + b|=t; + + g=(((((X32COL3(color)))* g_m3)&0xFF80FF80)>>7); + t=((GETLE32(pdest)>>10)&0x001f0000)-(g&0x003f0000); if(t&0x80000000) t=0; + g=((GETLE32(pdest)>>10)&0x0000001f)-(g&0x0000003f); if(g&0x80000000) g=0; + g|=t; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(X32COL1(GETLE32(pdest)))+(((((X32BCOL1(color))>>2)* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(GETLE32(pdest)))+(((((X32BCOL2(color))>>2)* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(GETLE32(pdest)))+(((((X32BCOL3(color))>>2)* g_m3)&0xFF80FF80)>>7); +#else + r=(X32COL1(GETLE32(pdest)))+(((((X32ACOL1(color))>>1)* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(GETLE32(pdest)))+(((((X32ACOL2(color))>>1)* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(GETLE32(pdest)))+(((((X32ACOL3(color))>>1)* g_m3)&0xFF80FF80)>>7); +#endif + } + + if(!(color&0x8000)) + { + r=(r&0xffff0000)|((((X32COL1(color))* g_m1)&0x0000FF80)>>7); + b=(b&0xffff0000)|((((X32COL2(color))* g_m2)&0x0000FF80)>>7); + g=(g&0xffff0000)|((((X32COL3(color))* g_m3)&0x0000FF80)>>7); + } + if(!(color&0x80000000)) + { + r=(r&0xffff)|((((X32COL1(color))* g_m1)&0xFF800000)>>7); + b=(b&0xffff)|((((X32COL2(color))* g_m2)&0xFF800000)>>7); + g=(g&0xffff)|((((X32COL3(color))* g_m3)&0xFF800000)>>7); + } + + } + else + { + r=(((X32COL1(color))* g_m1)&0xFF80FF80)>>7; + b=(((X32COL2(color))* g_m2)&0xFF80FF80)>>7; + g=(((X32COL3(color))* g_m3)&0xFF80FF80)>>7; + } + + if(r&0x7FE00000) r=0x1f0000|(r&0xFFFF); + if(r&0x7FE0) r=0x1f |(r&0xFFFF0000); + if(b&0x7FE00000) b=0x1f0000|(b&0xFFFF); + if(b&0x7FE0) b=0x1f |(b&0xFFFF0000); + if(g&0x7FE00000) g=0x1f0000|(g&0xFFFF); + if(g&0x7FE0) g=0x1f |(g&0xFFFF0000); + + if(bCheckMask) + { + uint32_t ma=GETLE32(pdest); + + PUTLE32(pdest, (X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000)); + + if((color&0xffff)==0 ) PUTLE32(pdest, (ma&0xffff)|(GETLE32(pdest)&0xffff0000)); + if((color&0xffff0000)==0) PUTLE32(pdest, (ma&0xffff0000)|(GETLE32(pdest)&0xffff)); + if(ma&0x80000000) PUTLE32(pdest, (ma&0xFFFF0000)|(GETLE32(pdest)&0xFFFF)); + if(ma&0x00008000) PUTLE32(pdest, (ma&0xFFFF) |(GETLE32(pdest)&0xFFFF0000)); + + return; + } + if((color&0xffff)==0 ) {PUTLE32(pdest, (GETLE32(pdest)&0xffff)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff0000));return;} + if((color&0xffff0000)==0) {PUTLE32(pdest, (GETLE32(pdest)&0xffff0000)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff));return;} + + PUTLE32(pdest, (X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000)); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColGX_Dither(unsigned short * pdest,unsigned short color,int32_t m1,int32_t m2,int32_t m3) +{ + int32_t r,g,b; + + if(color==0) return; + + if(bCheckMask && (*pdest & HOST2LE16(0x8000))) return; + + m1=(((XCOL1D(color)))*m1)>>4; + m2=(((XCOL2D(color)))*m2)>>4; + m3=(((XCOL3D(color)))*m3)>>4; + + if(DrawSemiTrans && (color&0x8000)) + { + r=((XCOL1D(GETLE16(pdest)))<<3); + b=((XCOL2D(GETLE16(pdest)))<<3); + g=((XCOL3D(GETLE16(pdest)))<<3); + + if(GlobalTextABR==0) + { + r=(r>>1)+(m1>>1); + b=(b>>1)+(m2>>1); + g=(g>>1)+(m3>>1); + } + else + if(GlobalTextABR==1) + { + r+=m1; + b+=m2; + g+=m3; + } + else + if(GlobalTextABR==2) + { + r-=m1; + b-=m2; + g-=m3; + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r+=(m1>>2); + b+=(m2>>2); + g+=(m3>>2); +#else + r+=(m1>>1); + b+=(m2>>1); + g+=(m3>>1); +#endif + } + } + else + { + r=m1; + b=m2; + g=m3; + } + + if(r&0x7FFFFF00) r=0xff; + if(b&0x7FFFFF00) b=0xff; + if(g&0x7FFFFF00) g=0xff; + + Dither16(pdest,r,b,g,sSetMask|(color&0x8000)); + +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColGX(unsigned short * pdest,unsigned short color,short m1,short m2,short m3) +{ + int32_t r,g,b;unsigned short l; + + if(color==0) return; + + if(bCheckMask && (*pdest & HOST2LE16(0x8000))) return; + + l=sSetMask|(color&0x8000); + + if(DrawSemiTrans && (color&0x8000)) + { + if(GlobalTextABR==0) + { + unsigned short d; + d =(GETLE16(pdest)&0x7bde)>>1; + color =((color) &0x7bde)>>1; + r=(XCOL1(d))+((((XCOL1(color)))* m1)>>7); + b=(XCOL2(d))+((((XCOL2(color)))* m2)>>7); + g=(XCOL3(d))+((((XCOL3(color)))* m3)>>7); +/* + r=(XCOL1(*pdest)>>1)+((((XCOL1(color))>>1)* m1)>>7); + b=(XCOL2(*pdest)>>1)+((((XCOL2(color))>>1)* m2)>>7); + g=(XCOL3(*pdest)>>1)+((((XCOL3(color))>>1)* m3)>>7); +*/ + } + else + if(GlobalTextABR==1) + { + r=(XCOL1(GETLE16(pdest)))+((((XCOL1(color)))* m1)>>7); + b=(XCOL2(GETLE16(pdest)))+((((XCOL2(color)))* m2)>>7); + g=(XCOL3(GETLE16(pdest)))+((((XCOL3(color)))* m3)>>7); + } + else + if(GlobalTextABR==2) + { + r=(XCOL1(GETLE16(pdest)))-((((XCOL1(color)))* m1)>>7); + b=(XCOL2(GETLE16(pdest)))-((((XCOL2(color)))* m2)>>7); + g=(XCOL3(GETLE16(pdest)))-((((XCOL3(color)))* m3)>>7); + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(XCOL1(GETLE16(pdest)))+((((XCOL1(color))>>2)* m1)>>7); + b=(XCOL2(GETLE16(pdest)))+((((XCOL2(color))>>2)* m2)>>7); + g=(XCOL3(GETLE16(pdest)))+((((XCOL3(color))>>2)* m3)>>7); +#else + r=(XCOL1(GETLE16(pdest)))+((((XCOL1(color))>>1)* m1)>>7); + b=(XCOL2(GETLE16(pdest)))+((((XCOL2(color))>>1)* m2)>>7); + g=(XCOL3(GETLE16(pdest)))+((((XCOL3(color))>>1)* m3)>>7); +#endif + } + } + else + { + r=((XCOL1(color))* m1)>>7; + b=((XCOL2(color))* m2)>>7; + g=((XCOL3(color))* m3)>>7; + } + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + PUTLE16(pdest, (XPSXCOL(r,g,b))|l); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColGX_S(unsigned short * pdest,unsigned short color,short m1,short m2,short m3) +{ + int32_t r,g,b; + + if(color==0) return; + + r=((XCOL1(color))* m1)>>7; + b=((XCOL2(color))* m2)>>7; + g=((XCOL3(color))* m3)>>7; + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + PUTLE16(pdest, (XPSXCOL(r,g,b))|sSetMask|(color&0x8000)); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColGX32_S(uint32_t * pdest,uint32_t color,short m1,short m2,short m3) +{ + int32_t r,g,b; + + if(color==0) return; + + r=(((X32COL1(color))* m1)&0xFF80FF80)>>7; + b=(((X32COL2(color))* m2)&0xFF80FF80)>>7; + g=(((X32COL3(color))* m3)&0xFF80FF80)>>7; + + if(r&0x7FE00000) r=0x1f0000|(r&0xFFFF); + if(r&0x7FE0) r=0x1f |(r&0xFFFF0000); + if(b&0x7FE00000) b=0x1f0000|(b&0xFFFF); + if(b&0x7FE0) b=0x1f |(b&0xFFFF0000); + if(g&0x7FE00000) g=0x1f0000|(g&0xFFFF); + if(g&0x7FE0) g=0x1f |(g&0xFFFF0000); + + if((color&0xffff)==0) {PUTLE32(pdest, (GETLE32(pdest)&0xffff)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff0000));return;} + if((color&0xffff0000)==0) {PUTLE32(pdest, (GETLE32(pdest)&0xffff0000)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff));return;} + + PUTLE32(pdest, (X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000)); +} + +//////////////////////////////////////////////////////////////////////// +// FILL FUNCS +//////////////////////////////////////////////////////////////////////// + +void FillSoftwareAreaTrans(short x0,short y0,short x1, // FILL AREA TRANS + short y1,unsigned short col) +{ + short j,i,dx,dy; + + if(y0>y1) return; + if(x0>x1) return; + + if(x1drawW) return; + if(y0>drawH) return; + + x1=min(x1,drawW+1); + y1=min(y1,drawH+1); + x0=max(x0,drawX); + y0=max(y0,drawY); + + if(y0>=iGPUHeight) return; + if(x0>1023) return; + + if(y1>iGPUHeight) y1=iGPUHeight; + if(x1>1024) x1=1024; + + dx=x1-x0;dy=y1-y0; + + if(dx==1 && dy==1 && x0==1020 && y0==511) // special fix for pinball game... emu protection??? + { +/* +m->v 1020 511 1 1 +writedatamem 0x00000000 1 +tile1 newcol 7fff (orgcol 0xffffff), oldvram 0 +v->m 1020 511 1 1 +readdatamem 0x00007fff 1 +m->v 1020 511 1 1 +writedatamem 0x00000000 1 +tile1 newcol 8000 (orgcol 0xffffff), oldvram 0 +v->m 1020 511 1 1 +readdatamem 0x00008000 1 +*/ + + static int iCheat=0; + col+=iCheat; + if(iCheat==1) iCheat=0; else iCheat=1; + } + + + if(dx&1) // slow fill + { + unsigned short *DSTPtr; + unsigned short LineOffset; + DSTPtr = psxVuw + (1024*y0) + x0; + LineOffset = 1024 - dx; + for(i=0;i>=1; + DSTPtr = (uint32_t *)(psxVuw + (1024*y0) + x0); + LineOffset = 512 - dx; + + if(!bCheckMask && !DrawSemiTrans) + { + for(i=0;iy1) return; + if(x0>x1) return; + + if(y0>=iGPUHeight) return; + if(x0>1023) return; + + if(y1>iGPUHeight) y1=iGPUHeight; + if(x1>1024) x1=1024; + + dx=x1-x0;dy=y1-y0; + if(dx&1) + { + unsigned short *DSTPtr; + unsigned short LineOffset; + + DSTPtr = psxVuw + (1024*y0) + x0; + LineOffset = 1024 - dx; + + for(i=0;i>=1; + DSTPtr = (uint32_t *)(psxVuw + (1024*y0) + x0); + LineOffset = 512 - dx; + + for(i=0;iy - v1->y; + if(height == 0) return 0; + delta_right_x = (v2->x - v1->x) / height; + right_x = v1->x; + + right_section_height = height; + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline int LeftSection_F(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_left_x = (v2->x - v1->x) / height; + left_x = v1->x; + + left_section_height = height; + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL NextRow_F(void) +{ + if(--left_section_height<=0) + { + if(--left_section <= 0) {return TRUE;} + if(LeftSection_F() <= 0) {return TRUE;} + } + else + { + left_x += delta_left_x; + } + + if(--right_section_height<=0) + { + if(--right_section<=0) {return TRUE;} + if(RightSection_F() <=0) {return TRUE;} + } + else + { + right_x += delta_right_x; + } + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL SetupSections_F(short x1, short y1, short x2, short y2, short x3, short y3) +{ + soft_vertex * v1, * v2, * v3; + int height,longest; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + + height = v3->y - v1->y; + if(height == 0) {return FALSE;} + longest = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest == 0) {return FALSE;} + + if(longest < 0) + { + right_array[0] = v3; + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + left_array[0] = v3; + left_array[1] = v1; + left_section = 1; + + if(LeftSection_F() <= 0) return FALSE; + if(RightSection_F() <= 0) + { + right_section--; + if(RightSection_F() <= 0) return FALSE; + } + } + else + { + left_array[0] = v3; + left_array[1] = v2; + left_array[2] = v1; + left_section = 2; + right_array[0] = v3; + right_array[1] = v1; + right_section = 1; + + if(RightSection_F() <= 0) return FALSE; + if(LeftSection_F() <= 0) + { + left_section--; + if(LeftSection_F() <= 0) return FALSE; + } + } + + Ymin=v1->y; + Ymax=min(v3->y-1,drawH); + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +__inline int RightSection_G(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_right_x = (v2->x - v1->x) / height; + right_x = v1->x; + + right_section_height = height; + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline int LeftSection_G(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_left_x = (v2->x - v1->x) / height; + left_x = v1->x; + + delta_left_R = ((v2->R - v1->R)) / height; + left_R = v1->R; + delta_left_G = ((v2->G - v1->G)) / height; + left_G = v1->G; + delta_left_B = ((v2->B - v1->B)) / height; + left_B = v1->B; + + left_section_height = height; + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL NextRow_G(void) +{ + if(--left_section_height<=0) + { + if(--left_section <= 0) {return TRUE;} + if(LeftSection_G() <= 0) {return TRUE;} + } + else + { + left_x += delta_left_x; + left_R += delta_left_R; + left_G += delta_left_G; + left_B += delta_left_B; + } + + if(--right_section_height<=0) + { + if(--right_section<=0) {return TRUE;} + if(RightSection_G() <=0) {return TRUE;} + } + else + { + right_x += delta_right_x; + } + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL SetupSections_G(short x1,short y1,short x2,short y2,short x3,short y3,int32_t rgb1, int32_t rgb2, int32_t rgb3) +{ + soft_vertex * v1, * v2, * v3; + int height,longest,temp; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v1->R=(rgb1) & 0x00ff0000; + v1->G=(rgb1<<8) & 0x00ff0000; + v1->B=(rgb1<<16) & 0x00ff0000; + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v2->R=(rgb2) & 0x00ff0000; + v2->G=(rgb2<<8) & 0x00ff0000; + v2->B=(rgb2<<16) & 0x00ff0000; + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v3->R=(rgb3) & 0x00ff0000; + v3->G=(rgb3<<8) & 0x00ff0000; + v3->B=(rgb3<<16) & 0x00ff0000; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + + height = v3->y - v1->y; + if(height == 0) {return FALSE;} + temp=(((v2->y - v1->y) << 16) / height); + longest = temp * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest == 0) {return FALSE;} + + if(longest < 0) + { + right_array[0] = v3; + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + left_array[0] = v3; + left_array[1] = v1; + left_section = 1; + + if(LeftSection_G() <= 0) return FALSE; + if(RightSection_G() <= 0) + { + right_section--; + if(RightSection_G() <= 0) return FALSE; + } + if(longest > -0x1000) longest = -0x1000; + } + else + { + left_array[0] = v3; + left_array[1] = v2; + left_array[2] = v1; + left_section = 2; + right_array[0] = v3; + right_array[1] = v1; + right_section = 1; + + if(RightSection_G() <= 0) return FALSE; + if(LeftSection_G() <= 0) + { + left_section--; + if(LeftSection_G() <= 0) return FALSE; + } + if(longest < 0x1000) longest = 0x1000; + } + + Ymin=v1->y; + Ymax=min(v3->y-1,drawH); + + delta_right_R=shl10idiv(temp*((v3->R - v1->R)>>10)+((v1->R - v2->R)<<6),longest); + delta_right_G=shl10idiv(temp*((v3->G - v1->G)>>10)+((v1->G - v2->G)<<6),longest); + delta_right_B=shl10idiv(temp*((v3->B - v1->B)>>10)+((v1->B - v2->B)<<6),longest); + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +__inline int RightSection_FT(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_right_x = (v2->x - v1->x) / height; + right_x = v1->x; + + right_section_height = height; + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline int LeftSection_FT(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_left_x = (v2->x - v1->x) / height; + left_x = v1->x; + + delta_left_u = ((v2->u - v1->u)) / height; + left_u = v1->u; + delta_left_v = ((v2->v - v1->v)) / height; + left_v = v1->v; + + left_section_height = height; + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL NextRow_FT(void) +{ + if(--left_section_height<=0) + { + if(--left_section <= 0) {return TRUE;} + if(LeftSection_FT() <= 0) {return TRUE;} + } + else + { + left_x += delta_left_x; + left_u += delta_left_u; + left_v += delta_left_v; + } + + if(--right_section_height<=0) + { + if(--right_section<=0) {return TRUE;} + if(RightSection_FT() <=0) {return TRUE;} + } + else + { + right_x += delta_right_x; + } + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL SetupSections_FT(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3) +{ + soft_vertex * v1, * v2, * v3; + int height,longest,temp; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v1->u=tx1<<16;v1->v=ty1<<16; + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v2->u=tx2<<16;v2->v=ty2<<16; + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v3->u=tx3<<16;v3->v=ty3<<16; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + + height = v3->y - v1->y; + if(height == 0) {return FALSE;} + + temp=(((v2->y - v1->y) << 16) / height); + longest = temp * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + + if(longest == 0) {return FALSE;} + + if(longest < 0) + { + right_array[0] = v3; + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + left_array[0] = v3; + left_array[1] = v1; + left_section = 1; + + if(LeftSection_FT() <= 0) return FALSE; + if(RightSection_FT() <= 0) + { + right_section--; + if(RightSection_FT() <= 0) return FALSE; + } + if(longest > -0x1000) longest = -0x1000; + } + else + { + left_array[0] = v3; + left_array[1] = v2; + left_array[2] = v1; + left_section = 2; + right_array[0] = v3; + right_array[1] = v1; + right_section = 1; + + if(RightSection_FT() <= 0) return FALSE; + if(LeftSection_FT() <= 0) + { + left_section--; + if(LeftSection_FT() <= 0) return FALSE; + } + if(longest < 0x1000) longest = 0x1000; + } + + Ymin=v1->y; + Ymax=min(v3->y-1,drawH); + + delta_right_u=shl10idiv(temp*((v3->u - v1->u)>>10)+((v1->u - v2->u)<<6),longest); + delta_right_v=shl10idiv(temp*((v3->v - v1->v)>>10)+((v1->v - v2->v)<<6),longest); + +/* +Mmm... adjust neg tex deltas... will sometimes cause slight +texture distortions + + longest>>=16; + if(longest) + { + if(longest<0) longest=-longest; + if(delta_right_u<0) + delta_right_u-=delta_right_u/longest; + if(delta_right_v<0) + delta_right_v-=delta_right_v/longest; + } +*/ + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +__inline int RightSection_GT(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_right_x = (v2->x - v1->x) / height; + right_x = v1->x; + + right_section_height = height; + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline int LeftSection_GT(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_left_x = (v2->x - v1->x) / height; + left_x = v1->x; + + delta_left_u = ((v2->u - v1->u)) / height; + left_u = v1->u; + delta_left_v = ((v2->v - v1->v)) / height; + left_v = v1->v; + + delta_left_R = ((v2->R - v1->R)) / height; + left_R = v1->R; + delta_left_G = ((v2->G - v1->G)) / height; + left_G = v1->G; + delta_left_B = ((v2->B - v1->B)) / height; + left_B = v1->B; + + left_section_height = height; + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL NextRow_GT(void) +{ + if(--left_section_height<=0) + { + if(--left_section <= 0) {return TRUE;} + if(LeftSection_GT() <= 0) {return TRUE;} + } + else + { + left_x += delta_left_x; + left_u += delta_left_u; + left_v += delta_left_v; + left_R += delta_left_R; + left_G += delta_left_G; + left_B += delta_left_B; + } + + if(--right_section_height<=0) + { + if(--right_section<=0) {return TRUE;} + if(RightSection_GT() <=0) {return TRUE;} + } + else + { + right_x += delta_right_x; + } + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL SetupSections_GT(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, int32_t rgb1, int32_t rgb2, int32_t rgb3) +{ + soft_vertex * v1, * v2, * v3; + int height,longest,temp; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v1->u=tx1<<16;v1->v=ty1<<16; + v1->R=(rgb1) & 0x00ff0000; + v1->G=(rgb1<<8) & 0x00ff0000; + v1->B=(rgb1<<16) & 0x00ff0000; + + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v2->u=tx2<<16;v2->v=ty2<<16; + v2->R=(rgb2) & 0x00ff0000; + v2->G=(rgb2<<8) & 0x00ff0000; + v2->B=(rgb2<<16) & 0x00ff0000; + + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v3->u=tx3<<16;v3->v=ty3<<16; + v3->R=(rgb3) & 0x00ff0000; + v3->G=(rgb3<<8) & 0x00ff0000; + v3->B=(rgb3<<16) & 0x00ff0000; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + + height = v3->y - v1->y; + if(height == 0) {return FALSE;} + + temp=(((v2->y - v1->y) << 16) / height); + longest = temp * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + + if(longest == 0) {return FALSE;} + + if(longest < 0) + { + right_array[0] = v3; + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + left_array[0] = v3; + left_array[1] = v1; + left_section = 1; + + if(LeftSection_GT() <= 0) return FALSE; + if(RightSection_GT() <= 0) + { + right_section--; + if(RightSection_GT() <= 0) return FALSE; + } + + if(longest > -0x1000) longest = -0x1000; + } + else + { + left_array[0] = v3; + left_array[1] = v2; + left_array[2] = v1; + left_section = 2; + right_array[0] = v3; + right_array[1] = v1; + right_section = 1; + + if(RightSection_GT() <= 0) return FALSE; + if(LeftSection_GT() <= 0) + { + left_section--; + if(LeftSection_GT() <= 0) return FALSE; + } + if(longest < 0x1000) longest = 0x1000; + } + + Ymin=v1->y; + Ymax=min(v3->y-1,drawH); + + delta_right_R=shl10idiv(temp*((v3->R - v1->R)>>10)+((v1->R - v2->R)<<6),longest); + delta_right_G=shl10idiv(temp*((v3->G - v1->G)>>10)+((v1->G - v2->G)<<6),longest); + delta_right_B=shl10idiv(temp*((v3->B - v1->B)>>10)+((v1->B - v2->B)<<6),longest); + + delta_right_u=shl10idiv(temp*((v3->u - v1->u)>>10)+((v1->u - v2->u)<<6),longest); + delta_right_v=shl10idiv(temp*((v3->v - v1->v)>>10)+((v1->v - v2->v)<<6),longest); + + +/* +Mmm... adjust neg tex deltas... will sometimes cause slight +texture distortions + longest>>=16; + if(longest) + { + if(longest<0) longest=-longest; + if(delta_right_u<0) + delta_right_u-=delta_right_u/longest; + if(delta_right_v<0) + delta_right_v-=delta_right_v/longest; + } +*/ + + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +__inline int RightSection_F4(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + right_section_height = height; + right_x = v1->x; + if(height == 0) + { + return 0; + } + delta_right_x = (v2->x - v1->x) / height; + + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline int LeftSection_F4(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + left_section_height = height; + left_x = v1->x; + if(height == 0) + { + return 0; + } + delta_left_x = (v2->x - v1->x) / height; + + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL NextRow_F4(void) +{ + if(--left_section_height<=0) + { + if(--left_section > 0) + while(LeftSection_F4()<=0) + { + if(--left_section <= 0) break; + } + } + else + { + left_x += delta_left_x; + } + + if(--right_section_height<=0) + { + if(--right_section > 0) + while(RightSection_F4()<=0) + { + if(--right_section<=0) break; + } + } + else + { + right_x += delta_right_x; + } + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL SetupSections_F4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4) +{ + soft_vertex * v1, * v2, * v3, * v4; + int height,width,longest1,longest2; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v4 = vtx+3; v4->x=x4<<16;v4->y=y4; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v1->y > v4->y) { soft_vertex * v = v1; v1 = v4; v4 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + if(v2->y > v4->y) { soft_vertex * v = v2; v2 = v4; v4 = v; } + if(v3->y > v4->y) { soft_vertex * v = v3; v3 = v4; v4 = v; } + + height = v4->y - v1->y; if(height == 0) height =1; + width = (v4->x - v1->x)>>16; + longest1 = (((v2->y - v1->y) << 16) / height) * width + (v1->x - v2->x); + longest2 = (((v3->y - v1->y) << 16) / height) * width + (v1->x - v3->x); + + if(longest1 < 0) // 2 is right + { + if(longest2 < 0) // 3 is right + { + left_array[0] = v4; + left_array[1] = v1; + left_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 3 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v2; // 2 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 2 + right_array[2] = v2; // 3 + right_array[3] = v1; // 4 + right_section = 3; + } + } + } + else + { + left_array[0] = v4; + left_array[1] = v3; // 1 + left_array[2] = v1; // 2 + left_section = 2; // 3 + right_array[0] = v4; // 4 + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + } + } + else + { + if(longest2 < 0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 3 + left_section = 2; // 4 + right_array[0] = v4; + right_array[1] = v3; + right_array[2] = v1; + right_section = 2; + } + else + { + right_array[0] = v4; + right_array[1] = v1; + right_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 3 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 2 + left_array[2] = v2; // 3 + left_array[3] = v1; // 4 + left_section = 3; + } + } + } + } + + while(LeftSection_F4()<=0) + { + if(--left_section <= 0) break; + } + + while(RightSection_F4()<=0) + { + if(--right_section <= 0) break; + } + + Ymin=v1->y; + Ymax=min(v4->y-1,drawH); + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +__inline int RightSection_FT4(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + right_section_height = height; + right_x = v1->x; + right_u = v1->u; + right_v = v1->v; + if(height == 0) + { + return 0; + } + delta_right_x = (v2->x - v1->x) / height; + delta_right_u = (v2->u - v1->u) / height; + delta_right_v = (v2->v - v1->v) / height; + + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline int LeftSection_FT4(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + left_section_height = height; + left_x = v1->x; + left_u = v1->u; + left_v = v1->v; + if(height == 0) + { + return 0; + } + delta_left_x = (v2->x - v1->x) / height; + delta_left_u = (v2->u - v1->u) / height; + delta_left_v = (v2->v - v1->v) / height; + + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL NextRow_FT4(void) +{ + if(--left_section_height<=0) + { + if(--left_section > 0) + while(LeftSection_FT4()<=0) + { + if(--left_section <= 0) break; + } + } + else + { + left_x += delta_left_x; + left_u += delta_left_u; + left_v += delta_left_v; + } + + if(--right_section_height<=0) + { + if(--right_section > 0) + while(RightSection_FT4()<=0) + { + if(--right_section<=0) break; + } + } + else + { + right_x += delta_right_x; + right_u += delta_right_u; + right_v += delta_right_v; + } + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL SetupSections_FT4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +{ + soft_vertex * v1, * v2, * v3, * v4; + int height,width,longest1,longest2; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v1->u=tx1<<16;v1->v=ty1<<16; + + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v2->u=tx2<<16;v2->v=ty2<<16; + + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v3->u=tx3<<16;v3->v=ty3<<16; + + v4 = vtx+3; v4->x=x4<<16;v4->y=y4; + v4->u=tx4<<16;v4->v=ty4<<16; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v1->y > v4->y) { soft_vertex * v = v1; v1 = v4; v4 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + if(v2->y > v4->y) { soft_vertex * v = v2; v2 = v4; v4 = v; } + if(v3->y > v4->y) { soft_vertex * v = v3; v3 = v4; v4 = v; } + + height = v4->y - v1->y; if(height == 0) height =1; + width = (v4->x - v1->x)>>16; + longest1 = (((v2->y - v1->y) << 16) / height) * width + (v1->x - v2->x); + longest2 = (((v3->y - v1->y) << 16) / height) * width + (v1->x - v3->x); + + if(longest1 < 0) // 2 is right + { + if(longest2 < 0) // 3 is right + { + left_array[0] = v4; + left_array[1] = v1; + left_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 3 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v2; // 2 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 2 + right_array[2] = v2; // 3 + right_array[3] = v1; // 4 + right_section = 3; + } + } + } + else + { + left_array[0] = v4; + left_array[1] = v3; // 1 + left_array[2] = v1; // 2 + left_section = 2; // 3 + right_array[0] = v4; // 4 + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + } + } + else + { + if(longest2 < 0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 3 + left_section = 2; // 4 + right_array[0] = v4; + right_array[1] = v3; + right_array[2] = v1; + right_section = 2; + } + else + { + right_array[0] = v4; + right_array[1] = v1; + right_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 3 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 2 + left_array[2] = v2; // 3 + left_array[3] = v1; // 4 + left_section = 3; + } + } + } + } + + while(LeftSection_FT4()<=0) + { + if(--left_section <= 0) break; + } + + while(RightSection_FT4()<=0) + { + if(--right_section <= 0) break; + } + + Ymin=v1->y; + Ymax=min(v4->y-1,drawH); + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +__inline int RightSection_GT4(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + right_section_height = height; + right_x = v1->x; + right_u = v1->u; + right_v = v1->v; + right_R = v1->R; + right_G = v1->G; + right_B = v1->B; + + if(height == 0) + { + return 0; + } + delta_right_x = (v2->x - v1->x) / height; + delta_right_u = (v2->u - v1->u) / height; + delta_right_v = (v2->v - v1->v) / height; + delta_right_R = (v2->R - v1->R) / height; + delta_right_G = (v2->G - v1->G) / height; + delta_right_B = (v2->B - v1->B) / height; + + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline int LeftSection_GT4(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + left_section_height = height; + left_x = v1->x; + left_u = v1->u; + left_v = v1->v; + left_R = v1->R; + left_G = v1->G; + left_B = v1->B; + + if(height == 0) + { + return 0; + } + delta_left_x = (v2->x - v1->x) / height; + delta_left_u = (v2->u - v1->u) / height; + delta_left_v = (v2->v - v1->v) / height; + delta_left_R = (v2->R - v1->R) / height; + delta_left_G = (v2->G - v1->G) / height; + delta_left_B = (v2->B - v1->B) / height; + + return height; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL NextRow_GT4(void) +{ + if(--left_section_height<=0) + { + if(--left_section > 0) + while(LeftSection_GT4()<=0) + { + if(--left_section <= 0) break; + } + } + else + { + left_x += delta_left_x; + left_u += delta_left_u; + left_v += delta_left_v; + left_R += delta_left_R; + left_G += delta_left_G; + left_B += delta_left_B; + } + + if(--right_section_height<=0) + { + if(--right_section > 0) + while(RightSection_GT4()<=0) + { + if(--right_section<=0) break; + } + } + else + { + right_x += delta_right_x; + right_u += delta_right_u; + right_v += delta_right_v; + right_R += delta_right_R; + right_G += delta_right_G; + right_B += delta_right_B; + } + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +__inline BOOL SetupSections_GT4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,int32_t rgb1,int32_t rgb2,int32_t rgb3,int32_t rgb4) +{ + soft_vertex * v1, * v2, * v3, * v4; + int height,width,longest1,longest2; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v1->u=tx1<<16;v1->v=ty1<<16; + v1->R=(rgb1) & 0x00ff0000; + v1->G=(rgb1<<8) & 0x00ff0000; + v1->B=(rgb1<<16) & 0x00ff0000; + + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v2->u=tx2<<16;v2->v=ty2<<16; + v2->R=(rgb2) & 0x00ff0000; + v2->G=(rgb2<<8) & 0x00ff0000; + v2->B=(rgb2<<16) & 0x00ff0000; + + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v3->u=tx3<<16;v3->v=ty3<<16; + v3->R=(rgb3) & 0x00ff0000; + v3->G=(rgb3<<8) & 0x00ff0000; + v3->B=(rgb3<<16) & 0x00ff0000; + + v4 = vtx+3; v4->x=x4<<16;v4->y=y4; + v4->u=tx4<<16;v4->v=ty4<<16; + v4->R=(rgb4) & 0x00ff0000; + v4->G=(rgb4<<8) & 0x00ff0000; + v4->B=(rgb4<<16) & 0x00ff0000; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v1->y > v4->y) { soft_vertex * v = v1; v1 = v4; v4 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + if(v2->y > v4->y) { soft_vertex * v = v2; v2 = v4; v4 = v; } + if(v3->y > v4->y) { soft_vertex * v = v3; v3 = v4; v4 = v; } + + height = v4->y - v1->y; if(height == 0) height =1; + width = (v4->x - v1->x)>>16; + longest1 = (((v2->y - v1->y) << 16) / height) * width + (v1->x - v2->x); + longest2 = (((v3->y - v1->y) << 16) / height) * width + (v1->x - v3->x); + + if(longest1 < 0) // 2 is right + { + if(longest2 < 0) // 3 is right + { + left_array[0] = v4; + left_array[1] = v1; + left_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 3 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v2; // 2 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 2 + right_array[2] = v2; // 3 + right_array[3] = v1; // 4 + right_section = 3; + } + } + } + else + { + left_array[0] = v4; + left_array[1] = v3; // 1 + left_array[2] = v1; // 2 + left_section = 2; // 3 + right_array[0] = v4; // 4 + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + } + } + else + { + if(longest2 < 0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 3 + left_section = 2; // 4 + right_array[0] = v4; + right_array[1] = v3; + right_array[2] = v1; + right_section = 2; + } + else + { + right_array[0] = v4; + right_array[1] = v1; + right_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 3 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 2 + left_array[2] = v2; // 3 + left_array[3] = v1; // 4 + left_section = 3; + } + } + } + } + + while(LeftSection_GT4()<=0) + { + if(--left_section <= 0) break; + } + + while(RightSection_GT4()<=0) + { + if(--right_section <= 0) break; + } + + Ymin=v1->y; + Ymax=min(v4->y-1,drawH); + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +// POLY FUNCS +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////// +// POLY 3/4 FLAT SHADED +//////////////////////////////////////////////////////////////////////// + +__inline void drawPoly3Fi(short x1,short y1,short x2,short y2,short x3,short y3,int32_t rgb) +{ + int i,j,xmin,xmax,ymin,ymax; + unsigned short color;uint32_t lcolor; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_F(x1,y1,x2,y2,x3,y3)) return; + + ymax=Ymax; + + color = ((rgb & 0x00f80000)>>9) | ((rgb & 0x0000f800)>>6) | ((rgb & 0x000000f8)>>3); + lcolor=lSetMask|(((uint32_t)(color))<<16)|color; + + for(ymin=Ymin;ymin> 16; if(drawX>xmin) xmin=drawX; + xmax=(right_x >> 16)-1; if(drawW> 16; if(drawX>xmin) xmin=drawX; + xmax=(right_x >> 16)-1; if(drawWdrawW && lx1>drawW && lx2>drawW && lx3>drawW) return; + if(ly0>drawH && ly1>drawH && ly2>drawH && ly3>drawH) return; + if(lx0=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_F4(lx0,ly0,lx1,ly1,lx2,ly2,lx3,ly3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin>9) | ((rgb & 0x0000f800)>>6) | ((rgb & 0x000000f8)>>3); + lcolor= lSetMask|(((uint32_t)(color))<<16)|color; + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + color |=sSetMask; + for (i=ymin;i<=ymax;i++) + { + xmin=left_x >> 16; if(drawX>xmin) xmin=drawX; + xmax=(right_x >> 16)-1; if(drawW> 16; if(drawX>xmin) xmin=drawX; + xmax=(right_x >> 16)-1; if(drawWdrawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TEx4_IL(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +{ + int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY,YAdjust,XAdjust; + int32_t clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + XAdjust=((posX+difX)>>16); + + TXV=(posY+difY)>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC2= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + XAdjust=((posX+difX)>>16); + + TXV=(posY+difY)>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC2= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TEx4_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY,YAdjust,XAdjust; + int32_t clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin>1); + + difX=delta_right_u;difX2=difX<<1; + difY=delta_right_v;difY2=difY<<1; + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16);//-1; //!!!!!!!!!!!!!!!! + if(xmax>xmin) xmax--; + + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +#ifdef POLYQUAD3 + +void drawPoly4TEx4_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + drawPoly3TEx4(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY); + drawPoly3TEx4(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY); +} + +#endif + +// more exact: + +void drawPoly4TEx4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx4_IL(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int32_t num; + int32_t i,j=0,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV; + int32_t difX, difY, difX2, difY2; + int32_t posX=0,posY=0,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + XAdjust=((posX+difX)>>16); + + TXV=(posY+difY)>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC2= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + XAdjust=(posX>>16); + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + + } + if(NextRow_FT4()) return; + } +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + XAdjust=((posX+difX)>>16); + + TXV=(posY+difY)>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC2= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx4_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin>1); + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx4_TW_S(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin>1); + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_SPR((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_SPR(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } +} +//////////////////////////////////////////////////////////////////////// +// POLY 3 F-SHADED TEX PAL 8 +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TEx8(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>5)&(int32_t)0xFFFFF800)+YAdjust+(posX>>16)]; + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + ((posX+difX)>>16)]; + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(posX>>16)]; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>5)&(int32_t)0xFFFFF800)+YAdjust+(posX>>16)]; + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + ((posX+difX)>>16)]; + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(posX>>16)]; + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TEx8_IL(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +{ + int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV,TXU; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + TXU=(posX+difX)>>16; + TXV=(posY+difY)>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC2= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + TXU=posX>>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + TXU=(posX+difX)>>16; + TXV=(posY+difY)>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC2= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + TXU=posX>>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TEx8_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16);//-1; //!!!!!!!!!!!!!!!! + if(xmax>xmin) xmax--; + + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +#ifdef POLYQUAD3 + +void drawPoly4TEx8_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + drawPoly3TEx8(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY); + + drawPoly3TEx8(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY); +} + +#endif + +// more exact: + +void drawPoly4TEx8(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>5)&(int32_t)0xFFFFF800)+YAdjust+(posX>>16)]; + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + ((posX+difX)>>16)]; + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(posX>>16)]; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>5)&(int32_t)0xFFFFF800)+YAdjust+(posX>>16)]; + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + ((posX+difX)>>16)]; + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(posX>>16)]; + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx8_IL(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV,TXU; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + TXU=(posX+difX)>>16; + TXV=(posY+difY)>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC2= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + TXU=posX>>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + TXU=(posX+difX)>>16; + TXV=(posY+difY)>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC2= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + TXU=posX>>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx8_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx8_TW_S(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32_SPR((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG_SPR(&psxVuw[(i<<10)+j],GETLE16(&psxVuw[clutP+tC1])); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// +// POLY 3 F-SHADED TEX 15 BIT +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TD(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX]))<<16)| + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX])); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX])); + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX]))<<16)| + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX])); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX])); + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TD_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)| + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)| + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + } + if(NextRow_FT()) + { + return; + } + } +} + + +//////////////////////////////////////////////////////////////////////// + +#ifdef POLYQUAD3 + +void drawPoly4TD_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +{ + drawPoly3TD(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4); + drawPoly3TD(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4); +} + +#endif + +// more exact: + +void drawPoly4TD(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX]))<<16)| + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX])); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX])); + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX]))<<16)| + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX])); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX])); + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TD_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)| + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY)<<10)+TWin.Position.y0+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)| + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TD_TW_S(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)| + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY)<<10)+TWin.Position.y0+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)| + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_SPR(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])); + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// +// POLY 3/4 G-SHADED +//////////////////////////////////////////////////////////////////////// + +__inline void drawPoly3Gi(short x1,short y1,short x2,short y2,short x3,short y3,int32_t rgb1, int32_t rgb2, int32_t rgb3) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_G(x1,y1,x2,y2,x3,y3,rgb1,rgb2,rgb3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1;if(drawW=xmin) + { + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>3)&0x001f0000)| + (((cR1) >> 9)&0x7c00)|(((cG1) >> 14)&0x03e0)|(((cB1) >> 19)&0x001f))|lSetMask); + + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + PUTLE16(&psxVuw[(i<<10)+j], (((cR1 >> 9)&0x7c00)|((cG1 >> 14)&0x03e0)|((cB1 >> 19)&0x001f))|sSetMask); + } + if(NextRow_G()) return; + } + return; + } + +#endif + + if(iDither==2) + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1;if(drawW=xmin) + { + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16),(cG1>>16),(cR1>>16)); + + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_G()) return; + } + else + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1;if(drawW=xmin) + { + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin> 9)&0x7c00)|((cG1 >> 14)&0x03e0)|((cB1 >> 19)&0x001f)); + + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_G()) return; + } + +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3G(int32_t rgb1, int32_t rgb2, int32_t rgb3) +{ + drawPoly3Gi(lx0,ly0,lx1,ly1,lx2,ly2,rgb1,rgb2,rgb3); +} + +// draw two g-shaded tris for right psx shading emulation + +void drawPoly4G(int32_t rgb1, int32_t rgb2, int32_t rgb3, int32_t rgb4) +{ + drawPoly3Gi(lx1,ly1,lx3,ly3,lx2,ly2, + rgb2,rgb4,rgb3); + drawPoly3Gi(lx0,ly0,lx1,ly1,lx2,ly2, + rgb1,rgb2,rgb3); +} + +//////////////////////////////////////////////////////////////////////// +// POLY 3/4 G-SHADED TEX PAL4 +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx4(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY,int32_t col1, int32_t col2, int32_t col3) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=((right_x) >> 16)-1; //!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx4_IL(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY,int32_t col1, int32_t col2, int32_t col3) +{ + int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=((right_x) >> 16)-1; //!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + XAdjust=((posX+difX)>>16); + + TXV=(posY+difY)>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC2= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx4_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY,int32_t col1, int32_t col2, int32_t col3) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin>1); + + difR=delta_right_R; + difG=delta_right_G; + difB=delta_right_B; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + difX=delta_right_u;difX2=difX<<1; + difY=delta_right_v;difY2=difY<<1; + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans && !iDither) + { + for (i=ymin;i<=ymax;i++) + { + xmin=((left_x) >> 16); + xmax=((right_x) >> 16)-1; //!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +// note: the psx is doing g-shaded quads as two g-shaded tris, +// like the following func... sadly texturing is not 100% +// correct that way, so small texture distortions can +// happen... + +void drawPoly4TGEx4_TRI_IL(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int32_t col1, int32_t col2, int32_t col3, int32_t col4) +{ + drawPoly3TGEx4_IL(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + drawPoly3TGEx4_IL(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +#ifdef POLYQUAD3GT + +void drawPoly4TGEx4_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int32_t col1, int32_t col2, int32_t col3, int32_t col4) +{ + drawPoly3TGEx4(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + drawPoly3TGEx4(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +#endif + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TGEx4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int32_t col1, int32_t col2, int32_t col4, int32_t col3) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4,col1,col2,col3,col4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TGEx4_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int32_t col1, int32_t col2, int32_t col3, int32_t col4) +{ + drawPoly3TGEx4_TW(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + + drawPoly3TGEx4_TW(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +//////////////////////////////////////////////////////////////////////// +// POLY 3/4 G-SHADED TEX PAL8 +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx8(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY,int32_t col1, int32_t col2, int32_t col3) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; // !!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>5)&(int32_t)0xFFFFF800)+YAdjust+((posX>>16))]; + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + (((posX+difX)>>16))]; + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+((posX>>16))]; + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>5)&(int32_t)0xFFFFF800)+YAdjust+((posX>>16))]; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx8_IL(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY,int32_t col1, int32_t col2, int32_t col3) +{ + int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV,TXU; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; // !!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + TXU=(posX+difX)>>16; + TXV=(posY+difY)>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC2= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + TXU=posX>>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (GETLE16(&psxVuw[(n_yi<<10)+YAdjust+n_xi]) >> ((TXU & 0x01)<<3)) & 0xff; + + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx8_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY,int32_t col1, int32_t col2, int32_t col3) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; // !!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +// note: two g-shaded tris: small texture distortions can happen + +void drawPoly4TGEx8_TRI_IL(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int32_t col1, int32_t col2, int32_t col3, int32_t col4) +{ + drawPoly3TGEx8_IL(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + drawPoly3TGEx8_IL(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +#ifdef POLYQUAD3GT + +void drawPoly4TGEx8_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int32_t col1, int32_t col2, int32_t col3, int32_t col4) +{ + drawPoly3TGEx8(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + drawPoly3TGEx8(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +#endif + +void drawPoly4TGEx8(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int32_t col1, int32_t col2, int32_t col4, int32_t col3) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4,col1,col2,col3,col4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>5)&(int32_t)0xFFFFF800)+YAdjust+(posX>>16)]; + tC2 = psxVub[(((posY+difY)>>5)&(int32_t)0xFFFFF800)+YAdjust+ + ((posX+difX)>>16)]; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1])| + ((int32_t)GETLE16(&psxVuw[clutP+tC2]))<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int32_t)0xFFFFF800)+YAdjust+(posX>>16)]; + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>5)&(int32_t)0xFFFFF800)+YAdjust+(posX>>16)]; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[clutP+tC1]), + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TGEx8_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int32_t col1, int32_t col2, int32_t col3, int32_t col4) +{ + drawPoly3TGEx8_TW(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + drawPoly3TGEx8_TW(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +//////////////////////////////////////////////////////////////////////// +// POLY 3 G-SHADED TEX 15 BIT +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGD(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,int32_t col1, int32_t col2, int32_t col3) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX]))<<16)| + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX]), + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX]), + (cB1>>16),(cG1>>16),(cR1>>16)); + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX]), + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX]), + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGD_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,int32_t col1, int32_t col2, int32_t col3) +{ + int i,j,xmin,xmax,ymin,ymax; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + int32_t difX, difY,difX2, difY2; + int32_t posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]))<<16)| + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]), + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]), + (cB1>>16),(cG1>>16),(cR1>>16)); + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]), + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]), + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +// note: two g-shaded tris: small texture distortions can happen + +#ifdef POLYQUAD3GT + +void drawPoly4TGD_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, int32_t col1, int32_t col2, int32_t col3, int32_t col4) +{ + drawPoly3TGD(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + col2,col4,col3); + drawPoly3TGD(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + col1,col2,col3); +} + +#endif + +void drawPoly4TGD(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, int32_t col1, int32_t col2, int32_t col4, int32_t col3) +{ + int32_t num; + int32_t i,j,xmin,xmax,ymin,ymax; + int32_t cR1,cG1,cB1; + int32_t difR,difB,difG,difR2,difB2,difG2; + int32_t difX, difY, difX2, difY2; + int32_t posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4,col1,col2,col3,col4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX]))<<16)| + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX]), + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX]), + (cB1>>16),(cG1>>16),(cR1>>16)); + } + if(NextRow_GT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX]), + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + GETLE16(&psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX]), + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TGD_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, int32_t col1, int32_t col2, int32_t col3, int32_t col4) +{ + drawPoly3TGD_TW(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + col2,col4,col3); + drawPoly3TGD_TW(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + col1,col2,col3); +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + + +/* +// no real rect test, but it does its job the way I need it +__inline BOOL IsNoRect(void) +{ + if(lx0==lx1 && lx2==lx3) return FALSE; + if(lx0==lx2 && lx1==lx3) return FALSE; + if(lx0==lx3 && lx1==lx2) return FALSE; + return TRUE; +} +*/ + +// real rect test +__inline BOOL IsNoRect(void) +{ + if(!(dwActFixes&0x200)) return FALSE; + + if(ly0==ly1) + { + if(lx1==lx3 && ly3==ly2 && lx2==lx0) return FALSE; + if(lx1==lx2 && ly2==ly3 && lx3==lx0) return FALSE; + return TRUE; + } + + if(ly0==ly2) + { + if(lx2==lx3 && ly3==ly1 && lx1==lx0) return FALSE; + if(lx2==lx1 && ly1==ly3 && lx3==lx0) return FALSE; + return TRUE; + } + + if(ly0==ly3) + { + if(lx3==lx2 && ly2==ly1 && lx1==lx0) return FALSE; + if(lx3==lx1 && ly1==ly2 && lx2==lx0) return FALSE; + return TRUE; + } + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3FT(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + + if(GlobalTextIL && GlobalTextTP<2) + { + if(GlobalTextTP==0) + drawPoly3TEx4_IL(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + else + drawPoly3TEx8_IL(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + } + + if(!bUsingTWin && !(dwActFixes&0x100)) + { + switch(GlobalTextTP) // depending on texture mode + { + case 0: + drawPoly3TEx4(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly3TEx8(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly3TD(lx0,ly0,lx1,ly1,lx2,ly2,(GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff)); + return; + } + return; + } + + switch(GlobalTextTP) // depending on texture mode + { + case 0: + drawPoly3TEx4_TW(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly3TEx8_TW(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly3TD_TW(lx0,ly0,lx1,ly1,lx2,ly2,(GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff)); + return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4FT(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + + if(GlobalTextIL && GlobalTextTP<2) + { + if(GlobalTextTP==0) + drawPoly4TEx4_IL(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + else + drawPoly4TEx8_IL(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + } + + if(!bUsingTWin) + { +#ifdef POLYQUAD3GT + if(IsNoRect()) + { + switch (GlobalTextTP) + { + case 0: + drawPoly4TEx4_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly4TEx8_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly4TD_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff)); + return; + } + return; + } +#endif + + switch (GlobalTextTP) + { + case 0: // grandia investigations needed + drawPoly4TEx4(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly4TEx8(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly4TD(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff)); + return; + } + return; + } + + switch (GlobalTextTP) + { + case 0: + drawPoly4TEx4_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly4TEx8_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff), ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly4TD_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[4]) & 0x000000ff), ((GETLE32(&gpuData[4])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),(GETLE32(&gpuData[6]) & 0x000000ff), ((GETLE32(&gpuData[6])>>8) & 0x000000ff)); + return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3GT(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + + if(GlobalTextIL && GlobalTextTP<2) + { + if(GlobalTextTP==0) + drawPoly3TGEx4_IL(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6])); + else + drawPoly3TGEx8_IL(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6])); + return; + } + + if(!bUsingTWin) + { + switch (GlobalTextTP) + { + case 0: + drawPoly3TGEx4(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6])); + return; + case 1: + drawPoly3TGEx8(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6])); + return; + case 2: + drawPoly3TGD(lx0,ly0,lx1,ly1,lx2,ly2,(GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6])); + return; + } + return; + } + + switch(GlobalTextTP) + { + case 0: + drawPoly3TGEx4_TW(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6])); + return; + case 1: + drawPoly3TGEx8_TW(lx0,ly0,lx1,ly1,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6])); + return; + case 2: + drawPoly3TGD_TW(lx0,ly0,lx1,ly1,lx2,ly2,(GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6])); + return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4GT(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + + if(GlobalTextIL && GlobalTextTP<2) + { + if(GlobalTextTP==0) + drawPoly4TGEx4_TRI_IL(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[11]) & 0x000000ff), ((GETLE32(&gpuData[11])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0),((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6]),GETLE32(&gpuData[9])); + else + drawPoly4TGEx8_TRI_IL(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[11]) & 0x000000ff), ((GETLE32(&gpuData[11])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0),((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6]),GETLE32(&gpuData[9])); + return; + } + + if(!bUsingTWin) + { +#ifdef POLYQUAD3GT + if(IsNoRect()) + { + switch (GlobalTextTP) + { + case 0: + drawPoly4TGEx4_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[11]) & 0x000000ff), ((GETLE32(&gpuData[11])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0),((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6]),GETLE32(&gpuData[9])); + + return; + case 1: + drawPoly4TGEx8_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[11]) & 0x000000ff), ((GETLE32(&gpuData[11])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0),((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6]),GETLE32(&gpuData[9])); + return; + case 2: + drawPoly4TGD_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(GETLE32(&gpuData[2]) & 0x000000ff),((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[11]) & 0x000000ff), ((GETLE32(&gpuData[11])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6]),GETLE32(&gpuData[9])); + return; + } + return; + } +#endif + + switch (GlobalTextTP) + { + case 0: + drawPoly4TGEx4(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[11]) & 0x000000ff), ((GETLE32(&gpuData[11])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0),((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6]),GETLE32(&gpuData[9])); + + return; + case 1: + drawPoly4TGEx8(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[11]) & 0x000000ff), ((GETLE32(&gpuData[11])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0),((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6]),GETLE32(&gpuData[9])); + return; + case 2: + drawPoly4TGD(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(GETLE32(&gpuData[2]) & 0x000000ff),((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[11]) & 0x000000ff), ((GETLE32(&gpuData[11])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6]),GETLE32(&gpuData[9])); + return; + } + return; + } + + switch (GlobalTextTP) + { + case 0: + drawPoly4TGEx4_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[11]) & 0x000000ff), ((GETLE32(&gpuData[11])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0),((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6]),GETLE32(&gpuData[9])); + return; + case 1: + drawPoly4TGEx8_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (GETLE32(&gpuData[2]) & 0x000000ff), ((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[11]) & 0x000000ff), ((GETLE32(&gpuData[11])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff), + ((GETLE32(&gpuData[2])>>12) & 0x3f0),((GETLE32(&gpuData[2])>>22) & iGPUHeightMask), + GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6]),GETLE32(&gpuData[9])); + return; + case 2: + drawPoly4TGD_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(GETLE32(&gpuData[2]) & 0x000000ff),((GETLE32(&gpuData[2])>>8) & 0x000000ff), (GETLE32(&gpuData[5]) & 0x000000ff), ((GETLE32(&gpuData[5])>>8) & 0x000000ff),(GETLE32(&gpuData[11]) & 0x000000ff), ((GETLE32(&gpuData[11])>>8) & 0x000000ff),(GETLE32(&gpuData[8]) & 0x000000ff), ((GETLE32(&gpuData[8])>>8) & 0x000000ff),GETLE32(&gpuData[0]),GETLE32(&gpuData[3]),GETLE32(&gpuData[6]),GETLE32(&gpuData[9])); + return; + } +} + +//////////////////////////////////////////////////////////////////////// +// SPRITE FUNCS +//////////////////////////////////////////////////////////////////////// + +void DrawSoftwareSpriteTWin(unsigned char * baseAddr,int32_t w,int32_t h) +{ + uint32_t *gpuData = (uint32_t *)baseAddr; + short sx0,sy0,sx1,sy1,sx2,sy2,sx3,sy3; + short tx0,ty0,tx1,ty1,tx2,ty2,tx3,ty3; + + sx0=lx0; + sy0=ly0; + + sx0=sx3=sx0+PSXDisplay.DrawOffset.x; + sx1=sx2=sx0+w; + sy0=sy1=sy0+PSXDisplay.DrawOffset.y; + sy2=sy3=sy0+h; + + tx0=tx3=GETLE32(&gpuData[2])&0xff; + tx1=tx2=tx0+w; + ty0=ty1=(GETLE32(&gpuData[2])>>8)&0xff; + ty2=ty3=ty0+h; + + switch (GlobalTextTP) + { + case 0: + drawPoly4TEx4_TW_S(sx0,sy0,sx1,sy1,sx2,sy2,sx3,sy3, + tx0,ty0,tx1,ty1,tx2,ty2,tx3,ty3, + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly4TEx8_TW_S(sx0,sy0,sx1,sy1,sx2,sy2,sx3,sy3, + tx0,ty0,tx1,ty1,tx2,ty2,tx3,ty3, + ((GETLE32(&gpuData[2])>>12) & 0x3f0), ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly4TD_TW_S(sx0,sy0,sx1,sy1,sx2,sy2,sx3,sy3, + tx0,ty0,tx1,ty1,tx2,ty2,tx3,ty3); + return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void DrawSoftwareSpriteMirror(unsigned char * baseAddr,int32_t w,int32_t h) +{ + int32_t sprtY,sprtX,sprtW,sprtH,lXDir,lYDir; + int32_t clutY0,clutX0,clutP,textX0,textY0,sprtYa,sprCY,sprCX,sprA; + short tC; + uint32_t *gpuData = (uint32_t *)baseAddr; + sprtY = ly0; + sprtX = lx0; + sprtH = h; + sprtW = w; + clutY0 = (GETLE32(&gpuData[2])>>22) & iGPUHeightMask; + clutX0 = (GETLE32(&gpuData[2])>>12) & 0x3f0; + clutP = (clutY0<<11) + (clutX0<<1); + textY0 = ((GETLE32(&gpuData[2])>>8) & 0x000000ff) + GlobalTextAddrY; + textX0 = (GETLE32(&gpuData[2]) & 0x000000ff); + + sprtX+=PSXDisplay.DrawOffset.x; + sprtY+=PSXDisplay.DrawOffset.y; + +// while (sprtX>1023) sprtX-=1024; +// while (sprtY>MAXYLINESMIN1) sprtY-=MAXYLINES; + + if(sprtX>drawW) + { +// if((sprtX+sprtW)>1023) sprtX-=1024; +// else return; + return; + } + + if(sprtY>drawH) + { +// if ((sprtY+sprtH)>MAXYLINESMIN1) sprtY-=MAXYLINES; +// else return; + return; + } + + if(sprtYdrawH) sprtH=drawH-sprtY+1; + if((sprtX+sprtW)>drawW) sprtW=drawW-sprtX+1; + + if(usMirror&0x1000) lXDir=-1; else lXDir=1; + if(usMirror&0x2000) lYDir=-1; else lYDir=1; + + switch (GlobalTextTP) + { + case 0: // texture is 4-bit + + sprtW=sprtW/2; + textX0=(GlobalTextAddrX<<1)+(textX0>>1); + sprtYa=(sprtY<<10); + clutP=(clutY0<<10)+clutX0; + for (sprCY=0;sprCY>4)&0xf)])); + GetTextureTransColG_SPR(&psxVuw[sprA+1],GETLE16(&psxVuw[clutP+(tC&0xf)])); + } + return; + + case 1: + + clutP>>=1; + for(sprCY=0;sprCYdrawW) return; + if(sprtY>drawH) return; + + tdx=tx+sprtW; + tdy=ty+sprtH; + + sprtW+=sprtX; + sprtH+=sprtY; + + // Pete is too lazy to make a faster version ;) + + if(GlobalTextTP==0) + drawPoly4TEx4_IL(sprtX,sprtY,sprtX,sprtH,sprtW,sprtH,sprtW,sprtY, + tx,ty, tx,tdy, tdx,tdy, tdx,ty, + (GETLE32(&gpuData[2])>>12) & 0x3f0, ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); + + + else + drawPoly4TEx8_IL(sprtX,sprtY,sprtX,sprtH,sprtW,sprtH,sprtW,sprtY, + tx,ty, tx,tdy, tdx,tdy, tdx,ty, + (GETLE32(&gpuData[2])>>12) & 0x3f0, ((GETLE32(&gpuData[2])>>22) & iGPUHeightMask)); +} + +//////////////////////////////////////////////////////////////////////// + +void DrawSoftwareSprite(unsigned char * baseAddr,short w,short h,int32_t tx,int32_t ty) +{ + int32_t sprtY,sprtX,sprtW,sprtH; + int32_t clutY0,clutX0,clutP,textX0,textY0,sprtYa,sprCY,sprCX,sprA; + short tC,tC2; + uint32_t *gpuData = (uint32_t *)baseAddr; + unsigned char * pV; + BOOL bWT,bWS; + + if(GlobalTextIL && GlobalTextTP<2) + {DrawSoftwareSprite_IL(baseAddr,w,h,tx,ty);return;} + + sprtY = ly0; + sprtX = lx0; + sprtH = h; + sprtW = w; + clutY0 = (GETLE32(&gpuData[2])>>22) & iGPUHeightMask; + clutX0 = (GETLE32(&gpuData[2])>>12) & 0x3f0; + + clutP = (clutY0<<11) + (clutX0<<1); + + textY0 =ty+ GlobalTextAddrY; + textX0 =tx; + + sprtX+=PSXDisplay.DrawOffset.x; + sprtY+=PSXDisplay.DrawOffset.y; + + //while (sprtX>1023) sprtX-=1024; + //while (sprtY>MAXYLINESMIN1) sprtY-=MAXYLINES; + + if(sprtX>drawW) + { +// if((sprtX+sprtW)>1023) sprtX-=1024; +// else return; + return; + } + + if(sprtY>drawH) + { +// if ((sprtY+sprtH)>MAXYLINESMIN1) sprtY-=MAXYLINES; +// else return; + return; + } + + if(sprtYdrawH) sprtH=drawH-sprtY+1; + if((sprtX+sprtW)>drawW) sprtW=drawW-sprtX+1; + + + bWT=FALSE; + bWS=FALSE; + + switch (GlobalTextTP) + { + case 0: + + if(textX0&1) {bWS=TRUE;sprtW--;} + if(sprtW&1) bWT=TRUE; + + sprtW=sprtW>>1; + textX0=(GlobalTextAddrX<<1)+(textX0>>1)+(textY0<<11); + sprtYa=(sprtY<<10)+sprtX; + clutP=(clutY0<<10)+clutX0; + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + for (sprCY=0;sprCY>4)&0xf)])); + } + + for (sprCX=0;sprCX>4)&0xf)]))<<16)| + GETLE16(&psxVuw[clutP+(tC&0x0f)])); + } + + if(bWT) + { + tC=*pV; + GetTextureTransColG_S(&psxVuw[sprA],GETLE16(&psxVuw[clutP+(tC&0x0f)])); + } + } + return; + } + +#endif + + for (sprCY=0;sprCY>4)&0xf)])); + } + + for (sprCX=0;sprCX>4)&0xf)])<<16))| + GETLE16(&psxVuw[clutP+(tC&0x0f)])); + } + + if(bWT) + { + tC=*pV; + GetTextureTransColG_SPR(&psxVuw[sprA],GETLE16(&psxVuw[clutP+(tC&0x0f)])); + } + } + return; + + case 1: + clutP>>=1;sprtW--; + textX0+=(GlobalTextAddrX<<1) + (textY0<<11); + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + for(sprCY=0;sprCY 0) + { + dr = ((int32_t)r1 - (int32_t)r0) / dx; + dg = ((int32_t)g1 - (int32_t)g0) / dx; + db = ((int32_t)b1 - (int32_t)b0) / dx; + } + else + { + dr = ((int32_t)r1 - (int32_t)r0); + dg = ((int32_t)g1 - (int32_t)g0); + db = ((int32_t)b1 - (int32_t)b0); + } + + d = 2*dy - dx; /* Initial value of d */ + incrE = 2*dy; /* incr. used for move to E */ + incrSE = 2*(dy - dx); /* incr. used for move to SE */ + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + while(x0 < x1) + { + if (d <= 0) + { + d = d + incrE; /* Choose E */ + } + else + { + d = d + incrSE; /* Choose SE */ + y0++; + } + x0++; + + r0+=dr; + g0+=dg; + b0+=db; + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + } +} + +/////////////////////////////////////////////////////////////////////// + +void Line_S_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb1) +{ + int dx, dy, incrS, incrSE, d; + uint32_t r0, g0, b0, r1, g1, b1; + int32_t dr, dg, db; + + r0 = (rgb0 & 0x00ff0000); + g0 = (rgb0 & 0x0000ff00) << 8; + b0 = (rgb0 & 0x000000ff) << 16; + r1 = (rgb1 & 0x00ff0000); + g1 = (rgb1 & 0x0000ff00) << 8; + b1 = (rgb1 & 0x000000ff) << 16; + + dx = x1 - x0; + dy = y1 - y0; + + if (dy > 0) + { + dr = ((int32_t)r1 - (int32_t)r0) / dy; + dg = ((int32_t)g1 - (int32_t)g0) / dy; + db = ((int32_t)b1 - (int32_t)b0) / dy; + } + else + { + dr = ((int32_t)r1 - (int32_t)r0); + dg = ((int32_t)g1 - (int32_t)g0); + db = ((int32_t)b1 - (int32_t)b0); + } + + d = 2*dx - dy; /* Initial value of d */ + incrS = 2*dx; /* incr. used for move to S */ + incrSE = 2*(dx - dy); /* incr. used for move to SE */ + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + while(y0 < y1) + { + if (d <= 0) + { + d = d + incrS; /* Choose S */ + } + else + { + d = d + incrSE; /* Choose SE */ + x0++; + } + y0++; + + r0+=dr; + g0+=dg; + b0+=db; + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + } +} + +/////////////////////////////////////////////////////////////////////// + +void Line_N_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb1) +{ + int dx, dy, incrN, incrNE, d; + uint32_t r0, g0, b0, r1, g1, b1; + int32_t dr, dg, db; + + r0 = (rgb0 & 0x00ff0000); + g0 = (rgb0 & 0x0000ff00) << 8; + b0 = (rgb0 & 0x000000ff) << 16; + r1 = (rgb1 & 0x00ff0000); + g1 = (rgb1 & 0x0000ff00) << 8; + b1 = (rgb1 & 0x000000ff) << 16; + + dx = x1 - x0; + dy = -(y1 - y0); + + if (dy > 0) + { + dr = ((int32_t)r1 - (int32_t)r0) / dy; + dg = ((int32_t)g1 - (int32_t)g0) / dy; + db = ((int32_t)b1 - (int32_t)b0) / dy; + } + else + { + dr = ((int32_t)r1 - (int32_t)r0); + dg = ((int32_t)g1 - (int32_t)g0); + db = ((int32_t)b1 - (int32_t)b0); + } + + d = 2*dx - dy; /* Initial value of d */ + incrN = 2*dx; /* incr. used for move to N */ + incrNE = 2*(dx - dy); /* incr. used for move to NE */ + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + while(y0 > y1) + { + if (d <= 0) + { + d = d + incrN; /* Choose N */ + } + else + { + d = d + incrNE; /* Choose NE */ + x0++; + } + y0--; + + r0+=dr; + g0+=dg; + b0+=db; + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + } +} + +/////////////////////////////////////////////////////////////////////// + +void Line_E_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb1) +{ + int dx, dy, incrE, incrNE, d; + uint32_t r0, g0, b0, r1, g1, b1; + int32_t dr, dg, db; + + r0 = (rgb0 & 0x00ff0000); + g0 = (rgb0 & 0x0000ff00) << 8; + b0 = (rgb0 & 0x000000ff) << 16; + r1 = (rgb1 & 0x00ff0000); + g1 = (rgb1 & 0x0000ff00) << 8; + b1 = (rgb1 & 0x000000ff) << 16; + + dx = x1 - x0; + dy = -(y1 - y0); + + if (dx > 0) + { + dr = ((int32_t)r1 - (int32_t)r0) / dx; + dg = ((int32_t)g1 - (int32_t)g0) / dx; + db = ((int32_t)b1 - (int32_t)b0) / dx; + } + else + { + dr = ((int32_t)r1 - (int32_t)r0); + dg = ((int32_t)g1 - (int32_t)g0); + db = ((int32_t)b1 - (int32_t)b0); + } + + d = 2*dy - dx; /* Initial value of d */ + incrE = 2*dy; /* incr. used for move to E */ + incrNE = 2*(dy - dx); /* incr. used for move to NE */ + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + while(x0 < x1) + { + if (d <= 0) + { + d = d + incrE; /* Choose E */ + } + else + { + d = d + incrNE; /* Choose NE */ + y0--; + } + x0++; + + r0+=dr; + g0+=dg; + b0+=db; + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + } +} + +/////////////////////////////////////////////////////////////////////// + +void VertLineShade(int x, int y0, int y1, uint32_t rgb0, uint32_t rgb1) +{ + int y, dy; + uint32_t r0, g0, b0, r1, g1, b1; + int32_t dr, dg, db; + + r0 = (rgb0 & 0x00ff0000); + g0 = (rgb0 & 0x0000ff00) << 8; + b0 = (rgb0 & 0x000000ff) << 16; + r1 = (rgb1 & 0x00ff0000); + g1 = (rgb1 & 0x0000ff00) << 8; + b1 = (rgb1 & 0x000000ff) << 16; + + dy = (y1 - y0); + + if (dy > 0) + { + dr = ((int32_t)r1 - (int32_t)r0) / dy; + dg = ((int32_t)g1 - (int32_t)g0) / dy; + db = ((int32_t)b1 - (int32_t)b0) / dy; + } + else + { + dr = ((int32_t)r1 - (int32_t)r0); + dg = ((int32_t)g1 - (int32_t)g0); + db = ((int32_t)b1 - (int32_t)b0); + } + + if (y0 < drawY) + { + r0+=dr*(drawY - y0); + g0+=dg*(drawY - y0); + b0+=db*(drawY - y0); + y0 = drawY; + } + + if (y1 > drawH) + y1 = drawH; + + for (y = y0; y <= y1; y++) + { + GetShadeTransCol(&psxVuw[(y<<10)+x],(unsigned short)(((r0 >> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + r0+=dr; + g0+=dg; + b0+=db; + } +} + +/////////////////////////////////////////////////////////////////////// + +void HorzLineShade(int y, int x0, int x1, uint32_t rgb0, uint32_t rgb1) +{ + int x, dx; + uint32_t r0, g0, b0, r1, g1, b1; + int32_t dr, dg, db; + + r0 = (rgb0 & 0x00ff0000); + g0 = (rgb0 & 0x0000ff00) << 8; + b0 = (rgb0 & 0x000000ff) << 16; + r1 = (rgb1 & 0x00ff0000); + g1 = (rgb1 & 0x0000ff00) << 8; + b1 = (rgb1 & 0x000000ff) << 16; + + dx = (x1 - x0); + + if (dx > 0) + { + dr = ((int32_t)r1 - (int32_t)r0) / dx; + dg = ((int32_t)g1 - (int32_t)g0) / dx; + db = ((int32_t)b1 - (int32_t)b0) / dx; + } + else + { + dr = ((int32_t)r1 - (int32_t)r0); + dg = ((int32_t)g1 - (int32_t)g0); + db = ((int32_t)b1 - (int32_t)b0); + } + + if (x0 < drawX) + { + r0+=dr*(drawX - x0); + g0+=dg*(drawX - x0); + b0+=db*(drawX - x0); + x0 = drawX; + } + + if (x1 > drawW) + x1 = drawW; + + for (x = x0; x <= x1; x++) + { + GetShadeTransCol(&psxVuw[(y<<10)+x],(unsigned short)(((r0 >> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + r0+=dr; + g0+=dg; + b0+=db; + } +} + +/////////////////////////////////////////////////////////////////////// + +void Line_E_SE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) +{ + int dx, dy, incrE, incrSE, d, x, y; + + dx = x1 - x0; + dy = y1 - y0; + d = 2*dy - dx; /* Initial value of d */ + incrE = 2*dy; /* incr. used for move to E */ + incrSE = 2*(dy - dx); /* incr. used for move to SE */ + x = x0; + y = y0; + if ((x>=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y y1) + { + if (d <= 0) + { + d = d + incrN; /* Choose N */ + y--; + } + else + { + d = d + incrNE; /* Choose NE */ + x++; + y--; + } + if ((x>=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y drawH) + y1 = drawH; + + for (y = y0; y <= y1; y++) + GetShadeTransCol(&psxVuw[(y<<10)+x], colour); +} + +/////////////////////////////////////////////////////////////////////// + +void HorzLineFlat(int y, int x0, int x1, unsigned short colour) +{ + int x; + + if (x0 < drawX) + x0 = drawX; + + if (x1 > drawW) + x1 = drawW; + + for (x = x0; x <= x1; x++) + GetShadeTransCol(&psxVuw[(y << 10) + x], colour); +} + +/////////////////////////////////////////////////////////////////////// + +/* Bresenham Line drawing function */ +void DrawSoftwareLineShade(int32_t rgb0, int32_t rgb1) +{ + short x0, y0, x1, y1, xt, yt; + int32_t rgbt; + double m, dy, dx; + + if (lx0 > drawW && lx1 > drawW) return; + if (ly0 > drawH && ly1 > drawH) return; + if (lx0 < drawX && lx1 < drawX) return; + if (ly0 < drawY && ly1 < drawY) return; + if (drawY >= drawH) return; + if (drawX >= drawW) return; + + x0 = lx0; + y0 = ly0; + x1 = lx1; + y1 = ly1; + + dx = x1 - x0; + dy = y1 - y0; + + if (dx == 0) + { + if (dy > 0) + VertLineShade(x0, y0, y1, rgb0, rgb1); + else + VertLineShade(x0, y1, y0, rgb1, rgb0); + } + else + if (dy == 0) + { + if (dx > 0) + HorzLineShade(y0, x0, x1, rgb0, rgb1); + else + HorzLineShade(y0, x1, x0, rgb1, rgb0); + } + else + { + if (dx < 0) + { + xt = x0; + yt = y0; + rgbt = rgb0; + x0 = x1; + y0 = y1; + rgb0 = rgb1; + x1 = xt; + y1 = yt; + rgb1 = rgbt; + + dx = x1 - x0; + dy = y1 - y0; + } + + m = dy / dx; + + if (m >= 0) + { + if (m > 1) + Line_S_SE_Shade(x0, y0, x1, y1, rgb0, rgb1); + else + Line_E_SE_Shade(x0, y0, x1, y1, rgb0, rgb1); + } + else + if (m < -1) + Line_N_NE_Shade(x0, y0, x1, y1, rgb0, rgb1); + else + Line_E_NE_Shade(x0, y0, x1, y1, rgb0, rgb1); + } +} + +/////////////////////////////////////////////////////////////////////// + +void DrawSoftwareLineFlat(int32_t rgb) +{ + short x0, y0, x1, y1, xt, yt; + double m, dy, dx; + unsigned short colour = 0; + + if (lx0 > drawW && lx1 > drawW) return; + if (ly0 > drawH && ly1 > drawH) return; + if (lx0 < drawX && lx1 < drawX) return; + if (ly0 < drawY && ly1 < drawY) return; + if (drawY >= drawH) return; + if (drawX >= drawW) return; + + colour = ((rgb & 0x00f80000) >> 9) | ((rgb & 0x0000f800) >> 6) | ((rgb & 0x000000f8) >> 3); + + x0 = lx0; + y0 = ly0; + x1 = lx1; + y1 = ly1; + + dx = x1 - x0; + dy = y1 - y0; + + if (dx == 0) + { + if (dy == 0) + return; // Nothing to draw + else if (dy > 0) + VertLineFlat(x0, y0, y1, colour); + else + VertLineFlat(x0, y1, y0, colour); + } + else + if (dy == 0) + { + if (dx > 0) + HorzLineFlat(y0, x0, x1, colour); + else + HorzLineFlat(y0, x1, x0, colour); + } + else + { + if (dx < 0) + { + xt = x0; + yt = y0; + x0 = x1; + y0 = y1; + x1 = xt; + y1 = yt; + + dx = x1 - x0; + dy = y1 - y0; + } + + m = dy/dx; + + if (m >= 0) + { + if (m > 1) + Line_S_SE_Flat(x0, y0, x1, y1, colour); + else + Line_E_SE_Flat(x0, y0, x1, y1, colour); + } + else + if (m < -1) + Line_N_NE_Flat(x0, y0, x1, y1, colour); + else + Line_E_NE_Flat(x0, y0, x1, y1, colour); + } +} + +/////////////////////////////////////////////////////////////////////// diff --git a/plugins/dfxvideo/soft.h b/plugins/dfxvideo/soft.h new file mode 100644 index 00000000..f52d5c03 --- /dev/null +++ b/plugins/dfxvideo/soft.h @@ -0,0 +1,42 @@ +/*************************************************************************** + soft.h - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _GPU_SOFT_H_ +#define _GPU_SOFT_H_ + +void offsetPSXLine(void); +void offsetPSX2(void); +void offsetPSX3(void); +void offsetPSX4(void); + +void FillSoftwareAreaTrans(short x0,short y0,short x1,short y1,unsigned short col); +void FillSoftwareArea(short x0,short y0,short x1,short y1,unsigned short col); +void drawPoly3G(int32_t rgb1, int32_t rgb2, int32_t rgb3); +void drawPoly4G(int32_t rgb1, int32_t rgb2, int32_t rgb3, int32_t rgb4); +void drawPoly3F(int32_t rgb); +void drawPoly4F(int32_t rgb); +void drawPoly4FT(unsigned char * baseAddr); +void drawPoly4GT(unsigned char * baseAddr); +void drawPoly3FT(unsigned char * baseAddr); +void drawPoly3GT(unsigned char * baseAddr); +void DrawSoftwareSprite(unsigned char * baseAddr,short w,short h,int32_t tx,int32_t ty); +void DrawSoftwareSpriteTWin(unsigned char * baseAddr,int32_t w,int32_t h); +void DrawSoftwareSpriteMirror(unsigned char * baseAddr,int32_t w,int32_t h); +void DrawSoftwareLineShade(int32_t rgb0, int32_t rgb1); +void DrawSoftwareLineFlat(int32_t rgb); + +#endif // _GPU_SOFT_H_ diff --git a/plugins/dfxvideo/swap.h b/plugins/dfxvideo/swap.h new file mode 100644 index 00000000..3f7ac21d --- /dev/null +++ b/plugins/dfxvideo/swap.h @@ -0,0 +1,71 @@ +#include + +// byteswappings + +#define SWAP16(x) ({ uint16_t y=(x); (((y)>>8 & 0xff) | ((y)<<8 & 0xff00)); }) +#define SWAP32(x) ({ uint32_t y=(x); (((y)>>24 & 0xfful) | ((y)>>8 & 0xff00ul) | ((y)<<8 & 0xff0000ul) | ((y)<<24 & 0xff000000ul)); }) + +#ifdef __BIG_ENDIAN__ + +// big endian config +#define HOST2LE32(x) SWAP32(x) +#define HOST2BE32(x) (x) +#define LE2HOST32(x) SWAP32(x) +#define BE2HOST32(x) (x) + +#define HOST2LE16(x) SWAP16(x) +#define HOST2BE16(x) (x) +#define LE2HOST16(x) SWAP16(x) +#define BE2HOST16(x) (x) + +#else + +// little endian config +#define HOST2LE32(x) (x) +#define HOST2BE32(x) SWAP32(x) +#define LE2HOST32(x) (x) +#define BE2HOST32(x) SWAP32(x) + +#define HOST2LE16(x) (x) +#define HOST2BE16(x) SWAP16(x) +#define LE2HOST16(x) (x) +#define BE2HOST16(x) SWAP16(x) + +#endif + +#define GETLEs16(X) ((int16_t)GETLE16((uint16_t *)X)) +#define GETLEs32(X) ((int16_t)GETLE32((uint16_t *)X)) + +#if defined(__PPC__) && defined(__BIG_ENDIAN__) + +// GCC style +static __inline__ uint16_t GETLE16(uint16_t *ptr) { + uint16_t ret; __asm__ ("lhbrx %0, 0, %1" : "=r" (ret) : "r" (ptr)); + return ret; +} +static __inline__ uint32_t GETLE32(uint32_t *ptr) { + uint32_t ret; + __asm__ ("lwbrx %0, 0, %1" : "=r" (ret) : "r" (ptr)); + return ret; +} +static __inline__ uint32_t GETLE16D(uint32_t *ptr) { + uint32_t ret; + __asm__ ("lwbrx %0, 0, %1\n" + "rlwinm %0, %0, 16, 0, 31" : "=r" (ret) : "r" (ptr)); + return ret; +} + +static __inline__ void PUTLE16(uint16_t *ptr, uint16_t val) { + __asm__ ("sthbrx %0, 0, %1" : : "r" (val), "r" (ptr) : "memory"); +} +static __inline__ void PUTLE32(uint32_t *ptr, uint32_t val) { + __asm__ ("stwbrx %0, 0, %1" : : "r" (val), "r" (ptr) : "memory"); +} + +#else +#define GETLE16(X) LE2HOST16(*(uint16_t *)X) +#define GETLE32(X) LE2HOST32(*(uint32_t *)X) +#define GETLE16D(X) ({uint32_t val = GETLE32(X); (val<<16 | val >> 16);}) +#define PUTLE16(X, Y) do{*((uint16_t *)X)=HOST2LE16((uint16_t)Y);}while(0) +#define PUTLE32(X, Y) do{*((uint32_t *)X)=HOST2LE16((uint32_t)Y);}while(0) +#endif diff --git a/plugins/dfxvideo/zn.c b/plugins/dfxvideo/zn.c new file mode 100644 index 00000000..ea8537b6 --- /dev/null +++ b/plugins/dfxvideo/zn.c @@ -0,0 +1,255 @@ +/*************************************************************************** + zn.c - description + ------------------- + begin : Sat Jan 31 2004 + copyright : (C) 2004 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define _IN_ZN + +#include "externals.h" + +// --------------------------------------------------- // +// - psx gpu plugin interface prototypes-------------- // +// --------------------------------------------------- // + +long GPUopen(unsigned long *disp, const char *CapText, const char *CfgFile); + +void CALLBACK GPUdisplayText(char * pText); +void CALLBACK GPUdisplayFlags(uint32_t dwFlags); +void CALLBACK GPUmakeSnapshot(void); +long CALLBACK GPUinit(); +long CALLBACK GPUclose(); +long CALLBACK GPUshutdown(); +void CALLBACK GPUcursor(int iPlayer,int x,int y); +void CALLBACK GPUupdateLace(void); +uint32_t CALLBACK GPUreadStatus(void); +void CALLBACK GPUwriteStatus(uint32_t gdata); +void CALLBACK GPUreadDataMem(uint32_t * pMem, int iSize); +uint32_t CALLBACK GPUreadData(void); +void CALLBACK GPUwriteDataMem(uint32_t * pMem, int iSize); +void CALLBACK GPUwriteData(uint32_t gdata); +void CALLBACK GPUsetMode(uint32_t gdata); +long CALLBACK GPUgetMode(void); +long CALLBACK GPUdmaChain(uint32_t * baseAddrL, uint32_t addr); +long CALLBACK GPUconfigure(void); +void CALLBACK GPUabout(void); +long CALLBACK GPUtest(void); +long CALLBACK GPUfreeze(uint32_t ulGetFreezeData,void * pF); +void CALLBACK GPUgetScreenPic(unsigned char * pMem); +void CALLBACK GPUshowScreenPic(unsigned char * pMem); + +void CALLBACK GPUkeypressed(int keycode); + + +// --------------------------------------------------- // +// - zn gpu interface -------------------------------- // +// --------------------------------------------------- // + +uint32_t dwGPUVersion=0; +int iGPUHeight=512; +int iGPUHeightMask=511; +int GlobalTextIL=0; +int iTileCheat=0; + +// --------------------------------------------------- // +// --------------------------------------------------- // +// --------------------------------------------------- // + +typedef struct GPUOTAG + { + uint32_t Version; // Version of structure - currently 1 + long hWnd; // Window handle + uint32_t ScreenRotation; // 0 = 0CW, 1 = 90CW, 2 = 180CW, 3 = 270CW = 90CCW + uint32_t GPUVersion; // 0 = a, 1 = b, 2 = c + const char* GameName; // NULL terminated string + const char* CfgFile; // NULL terminated string + } GPUConfiguration_t; + +// --------------------------------------------------- // +// --------------------------------------------------- // +// --------------------------------------------------- // + +void CALLBACK ZN_GPUdisplayFlags(uint32_t dwFlags) +{ + GPUdisplayFlags(dwFlags); +} + +// --------------------------------------------------- // + +void CALLBACK ZN_GPUmakeSnapshot(void) +{ + GPUmakeSnapshot(); +} + +// --------------------------------------------------- // + +long CALLBACK ZN_GPUinit() +{ // we always set the vram size to 2MB, if the ZN interface is used + iGPUHeight=1024; + iGPUHeightMask=1023; + + return GPUinit(); +} + +// --------------------------------------------------- // + +long CALLBACK ZN_GPUopen(void * vcfg) +{ + GPUConfiguration_t * cfg=(GPUConfiguration_t *)vcfg; + long lret; + + if(!cfg) return -1; + if(cfg->Version!=1) return -1; + + lret = GPUopen(&cfg->hWnd, cfg->GameName, cfg->CfgFile); + + +/* + if(!lstrcmp(cfg->GameName,"kikaioh") || + !lstrcmp(cfg->GameName,"sr2j") || + !lstrcmp(cfg->GameName,"rvschool_a")) + iTileCheat=1; +*/ + + // some ZN games seem to erase the cluts with a 'white' TileS... strange.. + // I've added a cheat to avoid this issue. We can set it globally (for + // all ZiNc games) without much risk + + iTileCheat=1; + + dwGPUVersion=cfg->GPUVersion; + + return lret; +} + +// --------------------------------------------------- // + +long CALLBACK ZN_GPUclose() +{ + return GPUclose(); +} + +// --------------------------------------------------- // + +long CALLBACK ZN_GPUshutdown() +{ + return GPUshutdown(); +} + +// --------------------------------------------------- // + +void CALLBACK ZN_GPUupdateLace(void) +{ + GPUupdateLace(); +} + +// --------------------------------------------------- // + +uint32_t CALLBACK ZN_GPUreadStatus(void) +{ + return GPUreadStatus(); +} + +// --------------------------------------------------- // + +void CALLBACK ZN_GPUwriteStatus(uint32_t gdata) +{ + GPUwriteStatus(gdata); +} + +// --------------------------------------------------- // + +long CALLBACK ZN_GPUdmaSliceOut(uint32_t *baseAddrL, uint32_t addr, uint32_t iSize) +{ + GPUreadDataMem(baseAddrL+addr,iSize); + return 0; +} + +// --------------------------------------------------- // + +uint32_t CALLBACK ZN_GPUreadData(void) +{ + return GPUreadData(); +} + +// --------------------------------------------------- // + +void CALLBACK ZN_GPUsetMode(uint32_t gdata) +{ + GPUsetMode(gdata); +} + +// --------------------------------------------------- // + +long CALLBACK ZN_GPUgetMode(void) +{ + return GPUgetMode(); +} + +// --------------------------------------------------- // + +long CALLBACK ZN_GPUdmaSliceIn(uint32_t *baseAddrL, uint32_t addr, uint32_t iSize) +{ + GPUwriteDataMem(baseAddrL+addr,iSize); + return 0; +} +// --------------------------------------------------- // + +void CALLBACK ZN_GPUwriteData(uint32_t gdata) +{ + GPUwriteDataMem(&gdata,1); +} + +// --------------------------------------------------- // + +long CALLBACK ZN_GPUdmaChain(uint32_t * baseAddrL, uint32_t addr) +{ + return GPUdmaChain(baseAddrL,addr); +} + +// --------------------------------------------------- // + +long CALLBACK ZN_GPUtest(void) +{ + return GPUtest(); +} + +// --------------------------------------------------- // + +long CALLBACK ZN_GPUfreeze(uint32_t ulGetFreezeData,void * pF) +{ + return GPUfreeze(ulGetFreezeData,pF); +} + +// --------------------------------------------------- // + +void CALLBACK ZN_GPUgetScreenPic(unsigned char * pMem) +{ + GPUgetScreenPic(pMem); +} + +// --------------------------------------------------- // + +void CALLBACK ZN_GPUshowScreenPic(unsigned char * pMem) +{ + GPUshowScreenPic(pMem); +} + +// --------------------------------------------------- // + +void CALLBACK ZN_GPUkeypressed(int keycode) +{ + GPUkeypressed(keycode); +} + diff --git a/plugins/peopsxgl/Makefile.am b/plugins/peopsxgl/Makefile.am new file mode 100644 index 00000000..d88dc94b --- /dev/null +++ b/plugins/peopsxgl/Makefile.am @@ -0,0 +1,24 @@ +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) -I/usr/X11R6/include \ + -I../../libpcsxcore -I../../include -fPIC + +bindir = @libdir@/games/psemu/ +libdir = @libdir@/games/psemu/ + +lib_LTLIBRARIES = libpeopsxgl.la + +libpeopsxgl_la_SOURCES = cfg.c draw.c fps.c gpu.c key.c menu.c \ + prim.c soft.c texture.c +libpeopsxgl_la_LDFLAGS = -module -avoid-version \ + -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -lXxf86vm -lGL -lm + +bin_PROGRAMS = cfgpeopsxgl +cfgpeopsxgl_SOURCES = gpucfg/main.c gpucfg/callbacks.c gpucfg/interface.c \ + gpucfg/support.c +cfgpeopsxgl_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) + +#glade_DATA = gpucfg-0.1df/peopsxgl.glade2 +#gladedir = $(datadir)/psemu/ +#EXTRA_DIST = $(glade_DATA) diff --git a/plugins/peopsxgl/Makefile.in b/plugins/peopsxgl/Makefile.in new file mode 100644 index 00000000..ca39e390 --- /dev/null +++ b/plugins/peopsxgl/Makefile.in @@ -0,0 +1,643 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = cfgpeopsxgl$(EXEEXT) +subdir = plugins/peopsxgl +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libpeopsxgl_la_LIBADD = +am_libpeopsxgl_la_OBJECTS = cfg.lo draw.lo fps.lo gpu.lo key.lo \ + menu.lo prim.lo soft.lo texture.lo +libpeopsxgl_la_OBJECTS = $(am_libpeopsxgl_la_OBJECTS) +libpeopsxgl_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libpeopsxgl_la_LDFLAGS) $(LDFLAGS) -o $@ +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_cfgpeopsxgl_OBJECTS = main.$(OBJEXT) callbacks.$(OBJEXT) \ + interface.$(OBJEXT) support.$(OBJEXT) +cfgpeopsxgl_OBJECTS = $(am_cfgpeopsxgl_OBJECTS) +am__DEPENDENCIES_1 = +cfgpeopsxgl_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libpeopsxgl_la_SOURCES) $(cfgpeopsxgl_SOURCES) +DIST_SOURCES = $(libpeopsxgl_la_SOURCES) $(cfgpeopsxgl_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLADE2_CFLAGS = @GLADE2_CFLAGS@ +GLADE2_LIBS = @GLADE2_LIBS@ +GLIB2_CFLAGS = @GLIB2_CFLAGS@ +GLIB2_LIBS = @GLIB2_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@ +LIBCDIO_LIBS = @LIBCDIO_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NASM = @NASM@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PEOPSXGL = @PEOPSXGL@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +PULSEAUDIO_CFLAGS = @PULSEAUDIO_CFLAGS@ +PULSEAUDIO_LIBS = @PULSEAUDIO_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @libdir@/games/psemu/ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@/games/psemu/ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ + -DLOCALE_DIR=\"${datadir}/locale/\" \ + -DDATADIR=\"${datadir}/psemu/\" \ + $(GTK2_CFLAGS) $(GLADE2_CFLAGS) -I/usr/X11R6/include \ + -I../../libpcsxcore -I../../include -fPIC + +lib_LTLIBRARIES = libpeopsxgl.la +libpeopsxgl_la_SOURCES = cfg.c draw.c fps.c gpu.c key.c menu.c \ + prim.c soft.c texture.c + +libpeopsxgl_la_LDFLAGS = -module -avoid-version \ + -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -lXxf86vm -lGL -lm + +cfgpeopsxgl_SOURCES = gpucfg/main.c gpucfg/callbacks.c gpucfg/interface.c \ + gpucfg/support.c + +cfgpeopsxgl_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/peopsxgl/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/peopsxgl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libpeopsxgl.la: $(libpeopsxgl_la_OBJECTS) $(libpeopsxgl_la_DEPENDENCIES) + $(libpeopsxgl_la_LINK) -rpath $(libdir) $(libpeopsxgl_la_OBJECTS) $(libpeopsxgl_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +cfgpeopsxgl$(EXEEXT): $(cfgpeopsxgl_OBJECTS) $(cfgpeopsxgl_DEPENDENCIES) + @rm -f cfgpeopsxgl$(EXEEXT) + $(LINK) $(cfgpeopsxgl_OBJECTS) $(cfgpeopsxgl_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callbacks.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/draw.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/key.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prim.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soft.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +main.o: gpucfg/main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT main.o -MD -MP -MF $(DEPDIR)/main.Tpo -c -o main.o `test -f 'gpucfg/main.c' || echo '$(srcdir)/'`gpucfg/main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/main.Tpo $(DEPDIR)/main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpucfg/main.c' object='main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o main.o `test -f 'gpucfg/main.c' || echo '$(srcdir)/'`gpucfg/main.c + +main.obj: gpucfg/main.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT main.obj -MD -MP -MF $(DEPDIR)/main.Tpo -c -o main.obj `if test -f 'gpucfg/main.c'; then $(CYGPATH_W) 'gpucfg/main.c'; else $(CYGPATH_W) '$(srcdir)/gpucfg/main.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/main.Tpo $(DEPDIR)/main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpucfg/main.c' object='main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o main.obj `if test -f 'gpucfg/main.c'; then $(CYGPATH_W) 'gpucfg/main.c'; else $(CYGPATH_W) '$(srcdir)/gpucfg/main.c'; fi` + +callbacks.o: gpucfg/callbacks.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT callbacks.o -MD -MP -MF $(DEPDIR)/callbacks.Tpo -c -o callbacks.o `test -f 'gpucfg/callbacks.c' || echo '$(srcdir)/'`gpucfg/callbacks.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/callbacks.Tpo $(DEPDIR)/callbacks.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpucfg/callbacks.c' object='callbacks.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o callbacks.o `test -f 'gpucfg/callbacks.c' || echo '$(srcdir)/'`gpucfg/callbacks.c + +callbacks.obj: gpucfg/callbacks.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT callbacks.obj -MD -MP -MF $(DEPDIR)/callbacks.Tpo -c -o callbacks.obj `if test -f 'gpucfg/callbacks.c'; then $(CYGPATH_W) 'gpucfg/callbacks.c'; else $(CYGPATH_W) '$(srcdir)/gpucfg/callbacks.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/callbacks.Tpo $(DEPDIR)/callbacks.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpucfg/callbacks.c' object='callbacks.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o callbacks.obj `if test -f 'gpucfg/callbacks.c'; then $(CYGPATH_W) 'gpucfg/callbacks.c'; else $(CYGPATH_W) '$(srcdir)/gpucfg/callbacks.c'; fi` + +interface.o: gpucfg/interface.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interface.o -MD -MP -MF $(DEPDIR)/interface.Tpo -c -o interface.o `test -f 'gpucfg/interface.c' || echo '$(srcdir)/'`gpucfg/interface.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/interface.Tpo $(DEPDIR)/interface.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpucfg/interface.c' object='interface.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interface.o `test -f 'gpucfg/interface.c' || echo '$(srcdir)/'`gpucfg/interface.c + +interface.obj: gpucfg/interface.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interface.obj -MD -MP -MF $(DEPDIR)/interface.Tpo -c -o interface.obj `if test -f 'gpucfg/interface.c'; then $(CYGPATH_W) 'gpucfg/interface.c'; else $(CYGPATH_W) '$(srcdir)/gpucfg/interface.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/interface.Tpo $(DEPDIR)/interface.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpucfg/interface.c' object='interface.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interface.obj `if test -f 'gpucfg/interface.c'; then $(CYGPATH_W) 'gpucfg/interface.c'; else $(CYGPATH_W) '$(srcdir)/gpucfg/interface.c'; fi` + +support.o: gpucfg/support.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT support.o -MD -MP -MF $(DEPDIR)/support.Tpo -c -o support.o `test -f 'gpucfg/support.c' || echo '$(srcdir)/'`gpucfg/support.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/support.Tpo $(DEPDIR)/support.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpucfg/support.c' object='support.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o support.o `test -f 'gpucfg/support.c' || echo '$(srcdir)/'`gpucfg/support.c + +support.obj: gpucfg/support.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT support.obj -MD -MP -MF $(DEPDIR)/support.Tpo -c -o support.obj `if test -f 'gpucfg/support.c'; then $(CYGPATH_W) 'gpucfg/support.c'; else $(CYGPATH_W) '$(srcdir)/gpucfg/support.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/support.Tpo $(DEPDIR)/support.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gpucfg/support.c' object='support.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o support.obj `if test -f 'gpucfg/support.c'; then $(CYGPATH_W) 'gpucfg/support.c'; else $(CYGPATH_W) '$(srcdir)/gpucfg/support.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-libLTLIBRARIES + + +#glade_DATA = gpucfg-0.1df/peopsxgl.glade2 +#gladedir = $(datadir)/psemu/ +#EXTRA_DIST = $(glade_DATA) +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/plugins/peopsxgl/cfg.c b/plugins/peopsxgl/cfg.c new file mode 100644 index 00000000..3dcd0aba --- /dev/null +++ b/plugins/peopsxgl/cfg.c @@ -0,0 +1,249 @@ +/*************************************************************************** + cfg.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2009/03/08 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +#define _IN_CFG + +#include "stdafx.h" +#include "externals.h" +#include "cfg.h" + +char *pConfigFile = NULL; + +void ReadConfigFile() +{ + FILE *in = NULL; + int len; + char *pB, *p, t[256]; + + if (pConfigFile != NULL) + in = fopen(pConfigFile, "rb"); + else + in = fopen("gpuPeopsMesaGL.cfg", "rb"); + + if (in == NULL) return; + + pB=(char *)malloc(32767); // buffer for reading config (32k) + memset(pB, 0, 32767); + + len = fread(pB, 1, 32767, in); // read config in buffer + fclose(in); // close config file + + strcpy(t,"\nResX");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iResX=atoi(p+len); + if(iResX<10) iResX=10; + + strcpy(t,"\nResY");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iResY=atoi(p+len); + if(iResY<10) iResY=10; + + strcpy(t,"\nKeepRatio");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bKeepRatio=atoi(p+len); + if(bKeepRatio<0) bKeepRatio=0; + if(bKeepRatio>1) bKeepRatio=1; + + strcpy(t,"\nScreenSmoothing");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iBlurBuffer=atoi(p+len); + if(iBlurBuffer<0) iBlurBuffer=0; + if(iBlurBuffer>1) iBlurBuffer=1; + + strcpy(t,"\nHiResTextures");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iHiResTextures=atoi(p+len); + if(iHiResTextures<0) iHiResTextures=0; + if(iHiResTextures>2) iHiResTextures=2; + + iSortTexCnt =0; + strcpy(t,"\nVRamSize");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iVRamSize=atoi(p+len); + if(iVRamSize<0) iVRamSize=0; + if(iVRamSize>1024) iVRamSize=1024; + + strcpy(t,"\nFullScreen");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bFullScreen=atoi(p+len); + if(bFullScreen>1) bFullScreen=1; + + strcpy(t,"\nScanLines");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iUseScanLines=atoi(p+len); + if(iUseScanLines<0) iUseScanLines=0; + if(iUseScanLines>1) iUseScanLines=1; + + strcpy(t,"\nScanLinesBlend");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iScanBlend=atoi(p+len); + if(iScanBlend<-1) iScanBlend=-1; + if(iScanBlend>255) iScanBlend=255; + + strcpy(t,"\nFrameTextures");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iFrameTexType=atoi(p+len); + if(iFrameTexType<0) iFrameTexType=0; + if(iFrameTexType>3) iFrameTexType=3; + + strcpy(t,"\nFrameAccess");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iFrameReadType=atoi(p+len); + if(iFrameReadType<0) iFrameReadType=0; + if(iFrameReadType>4) iFrameReadType=4; + if(iFrameReadType==4) bFullVRam=TRUE; + else bFullVRam=FALSE; + + strcpy(t,"\nTexFilter");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iFilterType=atoi(p+len); + if(iFilterType<0) iFilterType=0; + if(iFilterType>6) iFilterType=6; + + strcpy(t,"\nAdvancedBlend");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bAdvancedBlend=atoi(p+len); + if(bAdvancedBlend<0) bAdvancedBlend=0; + if(bAdvancedBlend>1) bAdvancedBlend=1; + + strcpy(t,"\nDithering");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bDrawDither=atoi(p+len); + if(bDrawDither<0) bDrawDither=0; + if(bDrawDither>1) bDrawDither=1; + + strcpy(t,"\nLineMode");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bUseLines=atoi(p+len); + if(bUseLines<0) bUseLines=0; + if(bUseLines>1) bUseLines=1; + + strcpy(t,"\nShowFPS");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iShowFPS=atoi(p+len); + if(iShowFPS<0) iShowFPS=0; + if(iShowFPS>1) iShowFPS=1; + + strcpy(t,"\nUseFrameLimit");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bUseFrameLimit=atoi(p+len); + if(bUseFrameLimit<0) bUseFrameLimit=0; + if(bUseFrameLimit>1) bUseFrameLimit=1; + + strcpy(t,"\nUseFrameSkip");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bUseFrameSkip=atoi(p+len); + if(bUseFrameSkip<0) bUseFrameSkip=0; + if(bUseFrameSkip>1) bUseFrameSkip=1; + + strcpy(t,"\nFPSDetection");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iFrameLimit=atoi(p+len)+1; + if(iFrameLimit<1) iFrameLimit=1; + if(iFrameLimit>2) iFrameLimit=2; + + strcpy(t,"\nFrameRate");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) fFrameRate=(float)atof(p+len); + if(fFrameRate<0.0f) fFrameRate=0.0f; + if(fFrameRate>1000.0f) fFrameRate=1000.0f; + + strcpy(t,"\nOffscreenDrawing");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iOffscreenDrawing=atoi(p+len); + if(iOffscreenDrawing<0) iOffscreenDrawing=0; + if(iOffscreenDrawing>4) iOffscreenDrawing=4; + + strcpy(t,"\nOpaquePass");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bOpaquePass=atoi(p+len); + if(bOpaquePass<0) bOpaquePass=0; + if(bOpaquePass>1) bOpaquePass=1; + + strcpy(t,"\nAntiAlias");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bUseAntiAlias=atoi(p+len); + if(bUseAntiAlias<0) bUseAntiAlias=0; + if(bUseAntiAlias>1) bUseAntiAlias=1; + + strcpy(t,"\nTexQuality");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iTexQuality=atoi(p+len); + if(iTexQuality<0) iTexQuality=0; + if(iTexQuality>4) iTexQuality=4; + + strcpy(t,"\n15bitMdec");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bUse15bitMdec=atoi(p+len); + if(bUse15bitMdec<0) bUse15bitMdec=0; + if(bUse15bitMdec>1) bUse15bitMdec=1; + + strcpy(t,"\nMaskDetect");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iUseMask=atoi(p+len); + if(iUseMask<0) iUseMask=0; + if(iUseMask>1) iUseMask=1; + + strcpy(t,"\nFastMdec");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bUseFastMdec=atoi(p+len); + if(bUseFastMdec<0) bUseFastMdec=0; + if(bUseFastMdec>1) bUseFastMdec=1; + + strcpy(t,"\nCfgFixes");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) dwCfgFixes=atoi(p+len); + + strcpy(t,"\nUseFixes");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) bUseFixes=atoi(p+len); + if(bUseFixes<0) bUseFixes=0; + if(bUseFixes>1) bUseFixes=1; + + strcpy(t,"\nOGLExtensions");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) iUseExts=atoi(p+len); + if(iUseExts>1) iUseExts=1; + + free(pB); +} + +void ReadConfig(void) // read config (linux file) +{ + iResX=640; + iResY=480; + iColDepth=16; + bChangeRes=FALSE; + bWindowMode=TRUE; + iUseScanLines=0; + bFullScreen=FALSE; + bFullVRam=FALSE; + iFilterType=0; + bAdvancedBlend=FALSE; + bDrawDither=FALSE; + bUseLines=FALSE; + bUseFrameLimit=TRUE; + bUseFrameSkip=FALSE; + iFrameLimit=2; + fFrameRate=200.0f; + iOffscreenDrawing=2; + bOpaquePass=TRUE; + bUseAntiAlias=FALSE; + iTexQuality=0; + iUseMask=0; + iZBufferDepth=0; + bUseFastMdec=TRUE; + dwCfgFixes=0; + bUseFixes=FALSE; + iFrameTexType=1; + iFrameReadType=0; + bUse15bitMdec=FALSE; + iShowFPS=0; + bKeepRatio=FALSE; + iScanBlend=0; + iVRamSize=0; + iTexGarbageCollection=1; + iBlurBuffer=0; + iHiResTextures=0; + iForceVSync=-1; + + ReadConfigFile(); // read file + + if(!iColDepth) iColDepth=32; // adjust color info + if(iUseMask) iZBufferDepth=16; // set zbuffer depth + else iZBufferDepth=0; + if(bUseFixes) dwActFixes=dwCfgFixes; // init game fix global +} diff --git a/plugins/peopsxgl/cfg.h b/plugins/peopsxgl/cfg.h new file mode 100644 index 00000000..634513dc --- /dev/null +++ b/plugins/peopsxgl/cfg.h @@ -0,0 +1,20 @@ +/*************************************************************************** + cfg.h - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +void ReadConfig(void); +void ReadConfigFile(); diff --git a/plugins/peopsxgl/draw.c b/plugins/peopsxgl/draw.c new file mode 100644 index 00000000..33381e59 --- /dev/null +++ b/plugins/peopsxgl/draw.c @@ -0,0 +1,1517 @@ +/*************************************************************************** + draw.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_DRAW + +#include "externals.h" +#include "gpu.h" +#include "draw.h" +#include "prim.h" +#include "texture.h" +#include "menu.h" + +//////////////////////////////////////////////////////////////////////////////////// +// defines + +#define SIGNBIT 0x800 +#define S_MASK 0xf000 +#define L_MASK 0xfffff000 + +// ownscale: some ogl drivers have buggy texture matrix funcs, so it +// is safer to calc sow/tow ourselves + +#ifdef OWNSCALE + +#define ST_FACSPRITE 255.99f +#define ST_BFFACSPRITE 0.5f/256.0f +#define ST_BFFACSPRITESORT 0.333f/256.0f + +#define ST_OFFSET 0.5f/256.0f; + +#define ST_FAC 255.99f +#define ST_BFFAC 0.5f/256.0f +#define ST_BFFACSORT 0.333f/256.0f + +#define ST_FACTRI 255.99f +#define ST_BFFACTRI 0.5f/256.0f +#define ST_BFFACTRISORT 0.333f/256.0f + +#define ST_FACVRAMX 255.0f +#define ST_FACVRAM 256.0f + +/////////////////////////////////////////////////////////////// + +#else + +#define ST_BFFACSPRITE 0.5f +#define ST_BFFACSPRITESORT 0.333f + +#define ST_BFFAC 0.5f +#define ST_BFFACSORT 0.333f + +#define ST_BFFACTRI 0.5f +#define ST_BFFACTRISORT 0.333f + +#define ST_OFFSET 0.5f; + +#endif + +//////////////////////////////////////////////////////////////////////////////////// +// draw globals; most will be initialized again later (by config or checks) + +BOOL bIsFirstFrame=TRUE; + +// resolution/ratio vars + +int iResX; +int iResY; +BOOL bKeepRatio=FALSE; +RECT rRatioRect; + +// psx mask related vars + +BOOL bCheckMask=FALSE; +int iUseMask=0; +int iSetMask=0; +unsigned short sSetMask=0; +uint32_t lSetMask=0; + +// drawing/coord vars + +OGLVertex vertex[4]; +GLubyte gl_ux[8]; +GLubyte gl_vy[8]; +short sprtY,sprtX,sprtH,sprtW; + +// drawing options + +BOOL bOpaquePass; +BOOL bAdvancedBlend; +BOOL bUseLines; +BOOL bUseAntiAlias; +int iTexQuality; +int iUsePalTextures=1; +BOOL bSnapShot=FALSE; +BOOL bSmallAlpha=FALSE; +int iShowFPS=0; + +// OGL extension support + +int iForceVSync=-1; +int iUseExts=0; +BOOL bGLExt; +BOOL bGLFastMovie=FALSE; +BOOL bGLSoft; +BOOL bGLBlend; +PFNGLBLENDEQU glBlendEquationEXTEx=NULL; +PFNGLCOLORTABLEEXT glColorTableEXTEx=NULL; + +// gfx card buffer infos + +int iDepthFunc=0; +int iZBufferDepth=0; +GLbitfield uiBufferBits=GL_COLOR_BUFFER_BIT; + +//////////////////////////////////////////////////////////////////////// +// Get extension infos (f.e. pal textures / packed pixels) +//////////////////////////////////////////////////////////////////////// + +void GetExtInfos(void) +{ + BOOL bPacked=FALSE; // default: no packed pixel support + + bGLExt=FALSE; // default: no extensions + bGLFastMovie=FALSE; + + if(strstr((char *)glGetString(GL_EXTENSIONS), // packed pixels available? + "GL_EXT_packed_pixels")) + bPacked=TRUE; // -> ok + + if(bPacked && bUse15bitMdec) // packed available and 15bit mdec wanted? + bGLFastMovie=TRUE; // -> ok + + if(bPacked && (iTexQuality==1 || iTexQuality==2)) // packed available and 16 bit texture format? + { + bGLFastMovie=TRUE; // -> ok + bGLExt=TRUE; + } + + if(iUseExts && // extension support wanted? + (strstr((char *)glGetString(GL_EXTENSIONS), + "GL_EXT_texture_edge_clamp") || + strstr((char *)glGetString(GL_EXTENSIONS), // -> check clamp support, if yes: use it + "GL_SGIS_texture_edge_clamp"))) + iClampType=GL_TO_EDGE_CLAMP; + else iClampType=GL_CLAMP; + + glColorTableEXTEx=(PFNGLCOLORTABLEEXT)NULL; // init ogl palette func pointer + +#ifndef __sun + if(iGPUHeight!=1024 && // no pal textures in ZN mode (height=1024)! + strstr((char *)glGetString(GL_EXTENSIONS), // otherwise: check ogl support + "GL_EXT_paletted_texture")) + { + iUsePalTextures=1; // -> wow, supported, get func pointer + + glColorTableEXTEx=(PFNGLCOLORTABLEEXT)glXGetProcAddress("glColorTableEXT"); + + if(glColorTableEXTEx==NULL) iUsePalTextures=0; // -> ha, cheater... no func, no support + } + else iUsePalTextures=0; +#else + iUsePalTextures=0; +#endif +} + +//////////////////////////////////////////////////////////////////////// +// Setup some stuff depending on user settings or in-game toggle +//////////////////////////////////////////////////////////////////////// + +void SetExtGLFuncs(void) +{ + //----------------------------------------------------// + + SetFixes(); // update fix infos + + //----------------------------------------------------// + + if(iUseExts && !(dwActFixes&1024) && // extensions wanted? and not turned off by game fix? + strstr((char *)glGetString(GL_EXTENSIONS), // and blend_subtract available? + "GL_EXT_blend_subtract")) + { // -> get ogl blend function pointer + glBlendEquationEXTEx=(PFNGLBLENDEQU)glXGetProcAddress("glBlendEquationEXT"); + } + else // no subtract blending? + { + if(glBlendEquationEXTEx) // -> change to additive blending (if subract was active) + glBlendEquationEXTEx(FUNC_ADD_EXT); + glBlendEquationEXTEx=(PFNGLBLENDEQU)NULL; // -> no more blend function pointer + } + + //----------------------------------------------------// + + if(iUseExts && bAdvancedBlend && // advanced blending wanted ? + strstr((char *)glGetString(GL_EXTENSIONS), // and extension avail? + "GL_EXT_texture_env_combine")) + { + bUseMultiPass=FALSE;bGLBlend=TRUE; // -> no need for 2 passes, perfect + + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, COMBINE_EXT); + glTexEnvf(GL_TEXTURE_ENV, COMBINE_RGB_EXT, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, COMBINE_ALPHA_EXT, GL_MODULATE); + glTexEnvf(GL_TEXTURE_ENV, RGB_SCALE_EXT, 2.0f); + } + else // no advanced blending wanted/available: + { + if(bAdvancedBlend) bUseMultiPass=TRUE; // -> pseudo-advanced with 2 passes + else bUseMultiPass=FALSE; // -> or simple 'bright color' mode + bGLBlend=FALSE; // -> no ext blending! + + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + } + + //----------------------------------------------------// + // init standard tex quality 0-2, and big alpha mode 3 + + if(!(dwActFixes&0x4000) && iFilterType && iTexQuality>=3) + bSmallAlpha=TRUE; + else bSmallAlpha=FALSE; + + if(bOpaquePass) // opaque mode? + { + if(dwActFixes&32) + { + TCF[0]=CP8RGBA_0; + PalTexturedColourFn=CP8RGBA; // -> init col func + } + else + { + TCF[0]=XP8RGBA_0; + PalTexturedColourFn=XP8RGBA; // -> init col func + } + + TCF[1]=XP8RGBA_1; + glAlphaFunc(GL_GREATER,0.49f); + } + else // no opaque mode? + { + TCF[0]=TCF[1]=P8RGBA; + PalTexturedColourFn=P8RGBA; // -> init col func + glAlphaFunc(GL_NOTEQUAL,0); // --> set alpha func + } + + //----------------------------------------------------// + + LoadSubTexFn=LoadSubTexturePageSort; // init load tex ptr + + giWantedFMT=GL_RGBA; // init ogl tex format + + switch(iTexQuality) // -> quality: + { + //--------------------------------------------------// + case 0: // -> don't care + giWantedRGBA=4; + giWantedTYPE=GL_UNSIGNED_BYTE; + break; + //--------------------------------------------------// + case 1: // -> R4G4B4A4 + if(bGLExt) + { + giWantedRGBA=GL_RGBA4; + giWantedTYPE=GL_UNSIGNED_SHORT_4_4_4_4_EXT; + LoadSubTexFn=LoadPackedSubTexturePageSort; + if(bOpaquePass) + { + if(dwActFixes&32) PTCF[0]=CP4RGBA_0; + else PTCF[0]=XP4RGBA_0; + PTCF[1]=XP4RGBA_1; + } + else + { + PTCF[0]=PTCF[1]=P4RGBA; + } + } + else + { + giWantedRGBA=GL_RGBA4; + giWantedTYPE=GL_UNSIGNED_BYTE; + } + break; + //--------------------------------------------------// + case 2: // -> R5B5G5A1 + if(bGLExt) + { + giWantedRGBA=GL_RGB5_A1; + giWantedTYPE=GL_UNSIGNED_SHORT_5_5_5_1_EXT; + LoadSubTexFn=LoadPackedSubTexturePageSort; + if(bOpaquePass) + { + if(dwActFixes&32) PTCF[0]=CP5RGBA_0; + else PTCF[0]=XP5RGBA_0; + PTCF[1]=XP5RGBA_1; + } + else + { + PTCF[0]=PTCF[1]=P5RGBA; + } + } + else + { + giWantedRGBA=GL_RGB5_A1;giWantedTYPE=GL_UNSIGNED_BYTE; + } + break; + //--------------------------------------------------// + case 3: // -> R8G8B8A8 + giWantedRGBA=GL_RGBA8; + giWantedTYPE=GL_UNSIGNED_BYTE; + + if(bSmallAlpha) + { + if(bOpaquePass) // opaque mode? + { + if(dwActFixes&32) {TCF[0]=CP8RGBAEx_0;PalTexturedColourFn=CP8RGBAEx;} + else {TCF[0]=XP8RGBAEx_0;PalTexturedColourFn=XP8RGBAEx;} + TCF[1]=XP8RGBAEx_1; + } + } + + break; + //--------------------------------------------------// + case 4: // -> R8G8B8A8 + giWantedRGBA = GL_RGBA8; + giWantedTYPE = GL_UNSIGNED_BYTE; + + if(strstr((char *)glGetString(GL_EXTENSIONS), // and extension avail? + "GL_EXT_bgra")) + { + giWantedFMT = GL_BGRA_EXT; + + if(bOpaquePass) // opaque mode? + { + if(bSmallAlpha) + { + if(dwActFixes&32) {TCF[0]=CP8BGRAEx_0;PalTexturedColourFn=CP8RGBAEx;} + else {TCF[0]=XP8BGRAEx_0;PalTexturedColourFn=XP8RGBAEx;} + TCF[1]=XP8BGRAEx_1; + } + else + { + if(dwActFixes&32) {TCF[0]=CP8BGRA_0;PalTexturedColourFn=CP8RGBA;} + else {TCF[0]=XP8BGRA_0;PalTexturedColourFn=XP8RGBA;} + TCF[1]=XP8BGRA_1; + } + } + else // no opaque mode? + { + TCF[0]=TCF[1]=P8BGRA; // -> init col func + } + } + else + { + iTexQuality=3; + if(bSmallAlpha) + { + if(bOpaquePass) // opaque mode? + { + if(dwActFixes&32) {TCF[0]=CP8RGBAEx_0;PalTexturedColourFn=CP8RGBAEx;} + else {TCF[0]=XP8RGBAEx_0;PalTexturedColourFn=XP8RGBAEx;} + TCF[1]=XP8RGBAEx_1; + } + } + } + + break; + //--------------------------------------------------// + } + + bBlendEnable=FALSE; // init blending: off + glDisable(GL_BLEND); + + SetScanTrans(); // init scan lines (if wanted) +} + +//////////////////////////////////////////////////////////////////////// +// setup scan lines +//////////////////////////////////////////////////////////////////////// + +#define R_TSP 0x00,0x45,0x00,0xff +#define G_TSP 0x00,0x00,0x45,0xff +#define B_TSP 0x45,0x00,0x00,0xff +#define O_TSP 0x45,0x45,0x45,0xff +#define N_TSP 0x00,0x00,0x00,0xff + +GLuint gTexScanName=0; + +GLubyte texscan[4][16]= +{ +{R_TSP, G_TSP, B_TSP, N_TSP}, +{O_TSP, N_TSP, O_TSP, N_TSP}, +{B_TSP, N_TSP, R_TSP, G_TSP}, +{O_TSP, N_TSP, O_TSP, N_TSP} +}; + +void CreateScanLines(void) +{ + if(iUseScanLines) + { + int y; + if(iScanBlend<0) // special scan mask mode + { + glGenTextures(1, &gTexScanName); + glBindTexture(GL_TEXTURE_2D, gTexScanName); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, 4, 4, 4, 0,GL_RGBA, GL_UNSIGNED_BYTE, texscan); + } + else // otherwise simple lines in a display list + { + uiScanLine=glGenLists(1); + glNewList(uiScanLine,GL_COMPILE); + + for(y=0;y ok, turn display on + szDispBuf[0]=0; + BuildDispMenu(0); + } + + bIsFirstFrame = FALSE; // we have survived the first frame :) + + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// clean up OGL stuff +//////////////////////////////////////////////////////////////////////// + +void GLcleanup() +{ + KillDisplayLists(); // bye display lists + + if(iUseScanLines) // scanlines used? + { + if(iScanBlend<0) + { + if(gTexScanName!=0) // some scanline tex? + glDeleteTextures(1, &gTexScanName); // -> delete it + gTexScanName=0; + } + else glDeleteLists(uiScanLine,1); // otherwise del scanline display list + } + + CleanupTextureStore(); // bye textures +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////// +// Offset stuff +//////////////////////////////////////////////////////////////////////// + +// please note: it is hardly do-able in a hw/accel plugin to get the +// real psx polygon coord mapping right... the following +// works not to bad with many games, though + +__inline BOOL CheckCoord4() +{ + if(lx0<0) + { + if(((lx1-lx0)>CHKMAX_X) || + ((lx2-lx0)>CHKMAX_X)) + { + if(lx3<0) + { + if((lx1-lx3)>CHKMAX_X) return TRUE; + if((lx2-lx3)>CHKMAX_X) return TRUE; + } + } + } + if(lx1<0) + { + if((lx0-lx1)>CHKMAX_X) return TRUE; + if((lx2-lx1)>CHKMAX_X) return TRUE; + if((lx3-lx1)>CHKMAX_X) return TRUE; + } + if(lx2<0) + { + if((lx0-lx2)>CHKMAX_X) return TRUE; + if((lx1-lx2)>CHKMAX_X) return TRUE; + if((lx3-lx2)>CHKMAX_X) return TRUE; + } + if(lx3<0) + { + if(((lx1-lx3)>CHKMAX_X) || + ((lx2-lx3)>CHKMAX_X)) + { + if(lx0<0) + { + if((lx1-lx0)>CHKMAX_X) return TRUE; + if((lx2-lx0)>CHKMAX_X) return TRUE; + } + } + } + + + if(ly0<0) + { + if((ly1-ly0)>CHKMAX_Y) return TRUE; + if((ly2-ly0)>CHKMAX_Y) return TRUE; + } + if(ly1<0) + { + if((ly0-ly1)>CHKMAX_Y) return TRUE; + if((ly2-ly1)>CHKMAX_Y) return TRUE; + if((ly3-ly1)>CHKMAX_Y) return TRUE; + } + if(ly2<0) + { + if((ly0-ly2)>CHKMAX_Y) return TRUE; + if((ly1-ly2)>CHKMAX_Y) return TRUE; + if((ly3-ly2)>CHKMAX_Y) return TRUE; + } + if(ly3<0) + { + if((ly1-ly3)>CHKMAX_Y) return TRUE; + if((ly2-ly3)>CHKMAX_Y) return TRUE; + } + + return FALSE; +} + +__inline BOOL CheckCoord3() +{ + if(lx0<0) + { + if((lx1-lx0)>CHKMAX_X) return TRUE; + if((lx2-lx0)>CHKMAX_X) return TRUE; + } + if(lx1<0) + { + if((lx0-lx1)>CHKMAX_X) return TRUE; + if((lx2-lx1)>CHKMAX_X) return TRUE; + } + if(lx2<0) + { + if((lx0-lx2)>CHKMAX_X) return TRUE; + if((lx1-lx2)>CHKMAX_X) return TRUE; + } + if(ly0<0) + { + if((ly1-ly0)>CHKMAX_Y) return TRUE; + if((ly2-ly0)>CHKMAX_Y) return TRUE; + } + if(ly1<0) + { + if((ly0-ly1)>CHKMAX_Y) return TRUE; + if((ly2-ly1)>CHKMAX_Y) return TRUE; + } + if(ly2<0) + { + if((ly0-ly2)>CHKMAX_Y) return TRUE; + if((ly1-ly2)>CHKMAX_Y) return TRUE; + } + + return FALSE; +} + + +__inline BOOL CheckCoord2() +{ + if(lx0<0) + { + if((lx1-lx0)>CHKMAX_X) return TRUE; + } + if(lx1<0) + { + if((lx0-lx1)>CHKMAX_X) return TRUE; + } + if(ly0<0) + { + if((ly1-ly0)>CHKMAX_Y) return TRUE; + } + if(ly1<0) + { + if((ly0-ly1)>CHKMAX_Y) return TRUE; + } + + return FALSE; +} + +/* +//Lewpys "offsetline" func: + +void offsetline(void) +{ + float x0, x1, y0, y1, oolength, xl, yl; + + if(bDisplayNotSet) + SetOGLDisplaySettings(1); + + if(!(dwActFixes&16)) + { + if((lx0 & SIGNBIT)) lx0|=S_MASK; + else lx0&=~S_MASK; + if((lx1 & SIGNBIT)) lx1|=S_MASK; + else lx1&=~S_MASK; + if((ly0 & SIGNBIT)) ly0|=S_MASK; + else ly0&=~S_MASK; + if((ly1 & SIGNBIT)) ly1|=S_MASK; + else ly1&=~S_MASK; + } + + x0 = (float)(lx0 + PSXDisplay.CumulOffset.x); + x1 = (float)(lx1 + PSXDisplay.CumulOffset.x); + y0 = (float)(ly0 + PSXDisplay.CumulOffset.y); + y1 = (float)(ly1 + PSXDisplay.CumulOffset.y); + + oolength = (float)1/((float)sqrt((y1 - y0)*(y1 - y0) + (x1 - x0)*(x1 - x0)) * (float)2); +// oolength = (float)1/((float)sqrt(((y1 - y0)*(y1 - y0) + (x1 - x0)*(x1 - x0)) * (float)2)); + + xl = (x1 - x0) * oolength; + yl = (y1 - y0) * oolength; + + x0 += 0.5f; + x1 += 0.5f; + + x0 -= xl - yl; + x1 += xl + yl; + y0 -= yl + xl; + y1 += yl - xl; + + vertex[0].x=x0; + vertex[1].x=x1; + vertex[0].y=y0; + vertex[1].y=y1; + + x0 -= yl * 2; + x1 -= yl * 2; + y0 += xl * 2; + y1 += xl * 2; + + vertex[2].x=x1; + vertex[3].x=x0; + vertex[2].y=y1; + vertex[3].y=y0; +} +*/ + + +// Pete's way: a very easy (and hopefully fast) approach for lines +// without sqrt... using a small float -> short cast trick :) + +#define VERTEX_OFFX 0.2f +#define VERTEX_OFFY 0.2f + +BOOL offsetline(void) +{ + short x0,x1,y0,y1,dx,dy;float px,py; + + if(bDisplayNotSet) + SetOGLDisplaySettings(1); + + if(!(dwActFixes&16)) + { + lx0=(short)(((int)lx0<>SIGNSHIFT); + lx1=(short)(((int)lx1<>SIGNSHIFT); + ly0=(short)(((int)ly0<>SIGNSHIFT); + ly1=(short)(((int)ly1<>SIGNSHIFT); + + if(CheckCoord2()) return TRUE; + } + + x0 = (lx0 + PSXDisplay.CumulOffset.x)+1; + x1 = (lx1 + PSXDisplay.CumulOffset.x)+1; + y0 = (ly0 + PSXDisplay.CumulOffset.y)+1; + y1 = (ly1 + PSXDisplay.CumulOffset.y)+1; + + dx=x1-x0; + dy=y1-y0; + + if(dx>=0) + { + if(dy>=0) + { + px=0.5f; + if(dx>dy) py=-0.5f; + else if(dxdy) px= 0.5f; + else if(dx=0) + { + py=0.5f; + dx=-dx; + if(dx>dy) px=-0.5f; + else if(dxdy) py=-0.5f; + else if(dx>SIGNSHIFT); + lx1=(short)(((int)lx1<>SIGNSHIFT); + ly0=(short)(((int)ly0<>SIGNSHIFT); + ly1=(short)(((int)ly1<>SIGNSHIFT); + + if(CheckCoord2()) return TRUE; + } + + vertex[0].x=lx0+PSXDisplay.CumulOffset.x; + vertex[1].x=lx1+PSXDisplay.CumulOffset.x; + vertex[0].y=ly0+PSXDisplay.CumulOffset.y; + vertex[1].y=ly1+PSXDisplay.CumulOffset.y; + + return FALSE; +} + +///////////////////////////////////////////////////////// + +BOOL offset3(void) +{ + if(bDisplayNotSet) + SetOGLDisplaySettings(1); + + if(!(dwActFixes&16)) + { + lx0=(short)(((int)lx0<>SIGNSHIFT); + lx1=(short)(((int)lx1<>SIGNSHIFT); + lx2=(short)(((int)lx2<>SIGNSHIFT); + ly0=(short)(((int)ly0<>SIGNSHIFT); + ly1=(short)(((int)ly1<>SIGNSHIFT); + ly2=(short)(((int)ly2<>SIGNSHIFT); + + if(CheckCoord3()) return TRUE; + } + + vertex[0].x=lx0+PSXDisplay.CumulOffset.x; + vertex[1].x=lx1+PSXDisplay.CumulOffset.x; + vertex[2].x=lx2+PSXDisplay.CumulOffset.x; + vertex[0].y=ly0+PSXDisplay.CumulOffset.y; + vertex[1].y=ly1+PSXDisplay.CumulOffset.y; + vertex[2].y=ly2+PSXDisplay.CumulOffset.y; + + return FALSE; +} + +///////////////////////////////////////////////////////// + +BOOL offset4(void) +{ + if(bDisplayNotSet) + SetOGLDisplaySettings(1); + + if(!(dwActFixes&16)) + { + lx0=(short)(((int)lx0<>SIGNSHIFT); + lx1=(short)(((int)lx1<>SIGNSHIFT); + lx2=(short)(((int)lx2<>SIGNSHIFT); + lx3=(short)(((int)lx3<>SIGNSHIFT); + ly0=(short)(((int)ly0<>SIGNSHIFT); + ly1=(short)(((int)ly1<>SIGNSHIFT); + ly2=(short)(((int)ly2<>SIGNSHIFT); + ly3=(short)(((int)ly3<>SIGNSHIFT); + + if(CheckCoord4()) return TRUE; + } + + vertex[0].x=lx0+PSXDisplay.CumulOffset.x; + vertex[1].x=lx1+PSXDisplay.CumulOffset.x; + vertex[2].x=lx2+PSXDisplay.CumulOffset.x; + vertex[3].x=lx3+PSXDisplay.CumulOffset.x; + vertex[0].y=ly0+PSXDisplay.CumulOffset.y; + vertex[1].y=ly1+PSXDisplay.CumulOffset.y; + vertex[2].y=ly2+PSXDisplay.CumulOffset.y; + vertex[3].y=ly3+PSXDisplay.CumulOffset.y; + + return FALSE; +} + +///////////////////////////////////////////////////////// + +void offsetST(void) +{ + if(bDisplayNotSet) + SetOGLDisplaySettings(1); + + if(!(dwActFixes&16)) + { + lx0=(short)(((int)lx0<>SIGNSHIFT); + ly0=(short)(((int)ly0<>SIGNSHIFT); + + if(lx0<-512 && PSXDisplay.DrawOffset.x<=-512) + lx0+=2048; + + if(ly0<-512 && PSXDisplay.DrawOffset.y<=-512) + ly0+=2048; + } + + ly1 = ly0; + ly2 = ly3 = ly0+sprtH; + lx3 = lx0; + lx1 = lx2 = lx0+sprtW; + + vertex[0].x=lx0+PSXDisplay.CumulOffset.x; + vertex[1].x=lx1+PSXDisplay.CumulOffset.x; + vertex[2].x=lx2+PSXDisplay.CumulOffset.x; + vertex[3].x=lx3+PSXDisplay.CumulOffset.x; + vertex[0].y=ly0+PSXDisplay.CumulOffset.y; + vertex[1].y=ly1+PSXDisplay.CumulOffset.y; + vertex[2].y=ly2+PSXDisplay.CumulOffset.y; + vertex[3].y=ly3+PSXDisplay.CumulOffset.y; +} + +///////////////////////////////////////////////////////// + +void offsetScreenUpload(int Position) +{ + if(bDisplayNotSet) + SetOGLDisplaySettings(1); + + if(Position==-1) + { + int lmdx,lmdy; + + lmdx=xrUploadArea.x0; + lmdy=xrUploadArea.y0; + + lx0-=lmdx; + ly0-=lmdy; + lx1-=lmdx; + ly1-=lmdy; + lx2-=lmdx; + ly2-=lmdy; + lx3-=lmdx; + ly3-=lmdy; + } + else + if(Position) + { + lx0-=PSXDisplay.DisplayPosition.x; + ly0-=PSXDisplay.DisplayPosition.y; + lx1-=PSXDisplay.DisplayPosition.x; + ly1-=PSXDisplay.DisplayPosition.y; + lx2-=PSXDisplay.DisplayPosition.x; + ly2-=PSXDisplay.DisplayPosition.y; + lx3-=PSXDisplay.DisplayPosition.x; + ly3-=PSXDisplay.DisplayPosition.y; + } + else + { + lx0-=PreviousPSXDisplay.DisplayPosition.x; + ly0-=PreviousPSXDisplay.DisplayPosition.y; + lx1-=PreviousPSXDisplay.DisplayPosition.x; + ly1-=PreviousPSXDisplay.DisplayPosition.y; + lx2-=PreviousPSXDisplay.DisplayPosition.x; + ly2-=PreviousPSXDisplay.DisplayPosition.y; + lx3-=PreviousPSXDisplay.DisplayPosition.x; + ly3-=PreviousPSXDisplay.DisplayPosition.y; + } + + vertex[0].x=lx0 + PreviousPSXDisplay.Range.x0; + vertex[1].x=lx1 + PreviousPSXDisplay.Range.x0; + vertex[2].x=lx2 + PreviousPSXDisplay.Range.x0; + vertex[3].x=lx3 + PreviousPSXDisplay.Range.x0; + vertex[0].y=ly0 + PreviousPSXDisplay.Range.y0; + vertex[1].y=ly1 + PreviousPSXDisplay.Range.y0; + vertex[2].y=ly2 + PreviousPSXDisplay.Range.y0; + vertex[3].y=ly3 + PreviousPSXDisplay.Range.y0; + + if(iUseMask) + { + vertex[0].z=vertex[1].z=vertex[2].z=vertex[3].z=gl_z; + gl_z+=0.00004f; + } +} + +///////////////////////////////////////////////////////// + +void offsetBlk(void) +{ + if(bDisplayNotSet) + SetOGLDisplaySettings(1); + + vertex[0].x=lx0-PSXDisplay.GDrawOffset.x + PreviousPSXDisplay.Range.x0; + vertex[1].x=lx1-PSXDisplay.GDrawOffset.x + PreviousPSXDisplay.Range.x0; + vertex[2].x=lx2-PSXDisplay.GDrawOffset.x + PreviousPSXDisplay.Range.x0; + vertex[3].x=lx3-PSXDisplay.GDrawOffset.x + PreviousPSXDisplay.Range.x0; + vertex[0].y=ly0-PSXDisplay.GDrawOffset.y + PreviousPSXDisplay.Range.y0; + vertex[1].y=ly1-PSXDisplay.GDrawOffset.y + PreviousPSXDisplay.Range.y0; + vertex[2].y=ly2-PSXDisplay.GDrawOffset.y + PreviousPSXDisplay.Range.y0; + vertex[3].y=ly3-PSXDisplay.GDrawOffset.y + PreviousPSXDisplay.Range.y0; + + if(iUseMask) + { + vertex[0].z=vertex[1].z=vertex[2].z=vertex[3].z=gl_z; + gl_z+=0.00004f; + } +} + +//////////////////////////////////////////////////////////////////////// +// texture sow/tow calculations +//////////////////////////////////////////////////////////////////////// + +void assignTextureVRAMWrite(void) +{ +#ifdef OWNSCALE + + vertex[0].sow=0.5f/ ST_FACVRAMX; + vertex[0].tow=0.5f/ ST_FACVRAM; + + vertex[1].sow=(float)gl_ux[1]/ ST_FACVRAMX; + vertex[1].tow=0.5f/ ST_FACVRAM; + + vertex[2].sow=(float)gl_ux[2]/ ST_FACVRAMX; + vertex[2].tow=(float)gl_vy[2]/ ST_FACVRAM; + + vertex[3].sow=0.5f/ ST_FACVRAMX; + vertex[3].tow=(float)gl_vy[3]/ ST_FACVRAM; + +#else + + if(gl_ux[1]==255) + { + vertex[0].sow=(gl_ux[0]*255.99f)/255.0f; + vertex[1].sow=(gl_ux[1]*255.99f)/255.0f; + vertex[2].sow=(gl_ux[2]*255.99f)/255.0f; + vertex[3].sow=(gl_ux[3]*255.99f)/255.0f; + } + else + { + vertex[0].sow=gl_ux[0]; + vertex[1].sow=gl_ux[1]; + vertex[2].sow=gl_ux[2]; + vertex[3].sow=gl_ux[3]; + } + + vertex[0].tow=gl_vy[0]; + vertex[1].tow=gl_vy[1]; + vertex[2].tow=gl_vy[2]; + vertex[3].tow=gl_vy[3]; + +#endif +} + +GLuint gLastTex=0; +GLuint gLastFMode=(GLuint)-1; + +///////////////////////////////////////////////////////// + +void assignTextureSprite(void) +{ + if(bUsingTWin) + { + vertex[0].sow=vertex[3].sow=(float)gl_ux[0]/TWin.UScaleFactor; + vertex[1].sow=vertex[2].sow=(float)sSprite_ux2/TWin.UScaleFactor; + vertex[0].tow=vertex[1].tow=(float)gl_vy[0]/TWin.VScaleFactor; + vertex[2].tow=vertex[3].tow=(float)sSprite_vy2/TWin.VScaleFactor; + gLastTex=gTexName; + + if(iFilterType>0 && iFilterType<3 && iHiResTextures!=2) + { + float fxmin=65536.0f,fxmax=0.0f,fymin=65536.0f,fymax=0.0f;int i; + + for(i=0;i<4;i++) + { + if(vertex[i].sowfxmax) fxmax=vertex[i].sow; + if(vertex[i].tow>fymax) fymax=vertex[i].tow; + } + + for(i=0;i<4;i++) + { +#ifdef OWNSCALE + if(vertex[i].sow==fxmin) vertex[i].sow+=0.375f/(float)TWin.Position.x1; + if(vertex[i].sow==fxmax) vertex[i].sow-=0.375f/(float)TWin.Position.x1; + if(vertex[i].tow==fymin) vertex[i].tow+=0.375f/(float)TWin.Position.y1; + if(vertex[i].tow==fymax) vertex[i].tow-=0.375f/(float)TWin.Position.y1; +#else + if(vertex[i].sow==fxmin) vertex[i].sow+=96.0f/(float)TWin.Position.x1; + if(vertex[i].sow==fxmax) vertex[i].sow-=96.0f/(float)TWin.Position.x1; + if(vertex[i].tow==fymin) vertex[i].tow+=96.0f/(float)TWin.Position.y1; + if(vertex[i].tow==fymax) vertex[i].tow-=96.0f/(float)TWin.Position.y1; +#endif + } + } + + } + else + { +#ifdef OWNSCALE + + vertex[0].sow=vertex[3].sow=(float)gl_ux[0] / ST_FACSPRITE; + vertex[1].sow=vertex[2].sow=(float)sSprite_ux2 / ST_FACSPRITE; + vertex[0].tow=vertex[1].tow=(float)gl_vy[0] / ST_FACSPRITE; + vertex[2].tow=vertex[3].tow=(float)sSprite_vy2 / ST_FACSPRITE; + +#else + + vertex[0].sow=vertex[3].sow=gl_ux[0]; + vertex[1].sow=vertex[2].sow=sSprite_ux2; + vertex[0].tow=vertex[1].tow=gl_vy[0]; + vertex[2].tow=vertex[3].tow=sSprite_vy2; + +#endif + + if(iFilterType>2) + { + if(gLastTex!=gTexName || gLastFMode!=0) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + gLastTex=gTexName;gLastFMode=0; + } + } + } + + if(usMirror & 0x1000) + { + vertex[0].sow=vertex[1].sow; + vertex[1].sow=vertex[2].sow=vertex[3].sow; + vertex[3].sow=vertex[0].sow; + } + + if(usMirror & 0x2000) + { + vertex[0].tow=vertex[3].tow; + vertex[2].tow=vertex[3].tow=vertex[1].tow; + vertex[1].tow=vertex[0].tow; + } + +} + +///////////////////////////////////////////////////////// + +void assignTexture3(void) +{ + if(bUsingTWin) + { + vertex[0].sow=(float)gl_ux[0]/TWin.UScaleFactor; + vertex[0].tow=(float)gl_vy[0]/TWin.VScaleFactor; + vertex[1].sow=(float)gl_ux[1]/TWin.UScaleFactor; + vertex[1].tow=(float)gl_vy[1]/TWin.VScaleFactor; + vertex[2].sow=(float)gl_ux[2]/TWin.UScaleFactor; + vertex[2].tow=(float)gl_vy[2]/TWin.VScaleFactor; + gLastTex=gTexName; + } + else + { +#ifdef OWNSCALE + vertex[0].sow=(float)gl_ux[0] / ST_FACTRI; + vertex[0].tow=(float)gl_vy[0] / ST_FACTRI; + vertex[1].sow=(float)gl_ux[1] / ST_FACTRI; + + vertex[1].tow=(float)gl_vy[1] / ST_FACTRI; + vertex[2].sow=(float)gl_ux[2] / ST_FACTRI; + vertex[2].tow=(float)gl_vy[2] / ST_FACTRI; +#else + vertex[0].sow=gl_ux[0]; + vertex[0].tow=gl_vy[0]; + vertex[1].sow=gl_ux[1]; + vertex[1].tow=gl_vy[1]; + vertex[2].sow=gl_ux[2]; + vertex[2].tow=gl_vy[2]; +#endif + + if(iFilterType>2) + { + if(gLastTex!=gTexName || gLastFMode!=1) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + gLastTex=gTexName;gLastFMode=1; + } + } + + if(iFilterType) + { + float fxmin=256.0f,fxmax=0.0f,fymin=256.0f,fymax=0.0f;int i; + for(i=0;i<3;i++) + { + if(vertex[i].sowfxmax) fxmax=vertex[i].sow; + if(vertex[i].tow>fymax) fymax=vertex[i].tow; + } + + for(i=0;i<3;i++) + { + if(vertex[i].sow==fxmin) vertex[i].sow+=ST_BFFACSORT; + if(vertex[i].sow==fxmax) vertex[i].sow-=ST_BFFACSORT; + if(vertex[i].tow==fymin) vertex[i].tow+=ST_BFFACSORT; + if(vertex[i].tow==fymax) vertex[i].tow-=ST_BFFACSORT; + } + } + } +} + +///////////////////////////////////////////////////////// + +void assignTexture4(void) +{ + if(bUsingTWin) + { + vertex[0].sow=(float)gl_ux[0]/TWin.UScaleFactor; + vertex[0].tow=(float)gl_vy[0]/TWin.VScaleFactor; + vertex[1].sow=(float)gl_ux[1]/TWin.UScaleFactor; + vertex[1].tow=(float)gl_vy[1]/TWin.VScaleFactor; + vertex[2].sow=(float)gl_ux[2]/TWin.UScaleFactor; + vertex[2].tow=(float)gl_vy[2]/TWin.VScaleFactor; + vertex[3].sow=(float)gl_ux[3]/TWin.UScaleFactor; + vertex[3].tow=(float)gl_vy[3]/TWin.VScaleFactor; + gLastTex=gTexName; + } + else + { +#ifdef OWNSCALE + vertex[0].sow=(float)gl_ux[0] / ST_FAC; + vertex[0].tow=(float)gl_vy[0] / ST_FAC; + vertex[1].sow=(float)gl_ux[1] / ST_FAC; + vertex[1].tow=(float)gl_vy[1] / ST_FAC; + vertex[2].sow=(float)gl_ux[2] / ST_FAC; + vertex[2].tow=(float)gl_vy[2] / ST_FAC; + vertex[3].sow=(float)gl_ux[3] / ST_FAC; + vertex[3].tow=(float)gl_vy[3] / ST_FAC; +#else + vertex[0].sow=gl_ux[0]; + vertex[0].tow=gl_vy[0]; + vertex[1].sow=gl_ux[1]; + vertex[1].tow=gl_vy[1]; + vertex[2].sow=gl_ux[2]; + vertex[2].tow=gl_vy[2]; + vertex[3].sow=gl_ux[3]; + vertex[3].tow=gl_vy[3]; +#endif + + if(iFilterType>2) + { + if(gLastTex!=gTexName || gLastFMode!=1) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + gLastTex=gTexName;gLastFMode=1; + } + } + + if(iFilterType) + { + float fxmin=256.0f,fxmax=0.0f,fymin=256.0f,fymax=0.0f;int i; + for(i=0;i<4;i++) + { + if(vertex[i].sowfxmax) fxmax=vertex[i].sow; + if(vertex[i].tow>fymax) fymax=vertex[i].tow; + } + + for(i=0;i<4;i++) + { + if(vertex[i].sow==fxmin) vertex[i].sow+=ST_BFFACSORT; + if(vertex[i].sow==fxmax) vertex[i].sow-=ST_BFFACSORT; + if(vertex[i].tow==fymin) vertex[i].tow+=ST_BFFACSORT; + if(vertex[i].tow==fymax) vertex[i].tow-=ST_BFFACSORT; + } + } + } +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////// +// render pos / buffers +//////////////////////////////////////////////////////////////////////// + +#define EqualRect(pr1,pr2) ((pr1)->left==(pr2)->left && (pr1)->top==(pr2)->top && (pr1)->right==(pr2)->right && (pr1)->bottom==(pr2)->bottom) + +//////////////////////////////////////////////////////////////////////// +// SetDisplaySettings: "simply" calcs the new drawing area and updates +// the ogl clipping (scissor) + +BOOL bSetClip=FALSE; + +void SetOGLDisplaySettings(BOOL DisplaySet) +{ + static RECT rprev={0,0,0,0}; + static RECT rC ={0,0,0,0}; + static int iOldX=0; + static int iOldY=0; + RECT r;float XS,YS; + + bDisplayNotSet = FALSE; + + //----------------------------------------------------// that's a whole screen upload + if(!DisplaySet) + { + RECT rX; + PSXDisplay.GDrawOffset.x=0; + PSXDisplay.GDrawOffset.y=0; + + PSXDisplay.CumulOffset.x = PSXDisplay.DrawOffset.x+PreviousPSXDisplay.Range.x0; + PSXDisplay.CumulOffset.y = PSXDisplay.DrawOffset.y+PreviousPSXDisplay.Range.y0; + + rprev.left=rprev.left+1; + + rX=rRatioRect; + rX.top=iResY-(rRatioRect.top+rRatioRect.bottom); + + if(bSetClip || !EqualRect(&rC,&rX)) + { + rC=rX; + glScissor(rC.left,rC.top,rC.right,rC.bottom); + bSetClip=FALSE; + } + return; + } + //----------------------------------------------------// + + PSXDisplay.GDrawOffset.y = PreviousPSXDisplay.DisplayPosition.y; + PSXDisplay.GDrawOffset.x = PreviousPSXDisplay.DisplayPosition.x; + PSXDisplay.CumulOffset.x = PSXDisplay.DrawOffset.x - PSXDisplay.GDrawOffset.x+PreviousPSXDisplay.Range.x0; + PSXDisplay.CumulOffset.y = PSXDisplay.DrawOffset.y - PSXDisplay.GDrawOffset.y+PreviousPSXDisplay.Range.y0; + + r.top =PSXDisplay.DrawArea.y0 - PreviousPSXDisplay.DisplayPosition.y; + r.bottom=PSXDisplay.DrawArea.y1 - PreviousPSXDisplay.DisplayPosition.y; + + if(r.bottom<0 || r.top>=PSXDisplay.DisplayMode.y) + { + r.top =PSXDisplay.DrawArea.y0 - PSXDisplay.DisplayPosition.y; + r.bottom=PSXDisplay.DrawArea.y1 - PSXDisplay.DisplayPosition.y; + } + + r.left =PSXDisplay.DrawArea.x0 - PreviousPSXDisplay.DisplayPosition.x; + r.right =PSXDisplay.DrawArea.x1 - PreviousPSXDisplay.DisplayPosition.x; + + if(r.right<0 || r.left>=PSXDisplay.DisplayMode.x) + { + r.left =PSXDisplay.DrawArea.x0 - PSXDisplay.DisplayPosition.x; + r.right =PSXDisplay.DrawArea.x1 - PSXDisplay.DisplayPosition.x; + } + + if(!bSetClip && EqualRect(&r,&rprev) && + iOldX == PSXDisplay.DisplayMode.x && + iOldY == PSXDisplay.DisplayMode.y) + return; + + rprev = r; + iOldX = PSXDisplay.DisplayMode.x; + iOldY = PSXDisplay.DisplayMode.y; + + XS=(float)rRatioRect.right/(float)PSXDisplay.DisplayMode.x; + YS=(float)rRatioRect.bottom/(float)PSXDisplay.DisplayMode.y; + + if(PreviousPSXDisplay.Range.x0) + { + short s=PreviousPSXDisplay.Range.x0+PreviousPSXDisplay.Range.x1; + + r.left+=PreviousPSXDisplay.Range.x0+1; + + r.right+=PreviousPSXDisplay.Range.x0; + + if(r.left>s) r.left=s; + if(r.right>s) r.right=s; + } + + if(PreviousPSXDisplay.Range.y0) + { + short s=PreviousPSXDisplay.Range.y0+PreviousPSXDisplay.Range.y1; + + r.top+=PreviousPSXDisplay.Range.y0+1; + r.bottom+=PreviousPSXDisplay.Range.y0; + + if(r.top>s) r.top=s; + if(r.bottom>s) r.bottom=s; + } + + // Set the ClipArea variables to reflect the new screen, + // offset from zero (since it is a new display buffer) + r.left = (int)(((float)(r.left)) *XS); + r.top = (int)(((float)(r.top)) *YS); + r.right = (int)(((float)(r.right + 1))*XS); + r.bottom = (int)(((float)(r.bottom + 1))*YS); + + // Limit clip area to the screen size + if (r.left > iResX) r.left = iResX; + if (r.left < 0) r.left = 0; + if (r.top > iResY) r.top = iResY; + if (r.top < 0) r.top = 0; + if (r.right > iResX) r.right = iResX; + if (r.right < 0) r.right = 0; + if (r.bottom > iResY) r.bottom = iResY; + if (r.bottom < 0) r.bottom = 0; + + r.right -=r.left; + r.bottom-=r.top; + r.top=iResY-(r.top+r.bottom); + + r.left+=rRatioRect.left; + r.top -=rRatioRect.top; + + if(bSetClip || !EqualRect(&r,&rC)) + { + glScissor(r.left,r.top,r.right,r.bottom); + rC=r; + bSetClip=FALSE; + } +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + diff --git a/plugins/peopsxgl/draw.h b/plugins/peopsxgl/draw.h new file mode 100644 index 00000000..14d2373e --- /dev/null +++ b/plugins/peopsxgl/draw.h @@ -0,0 +1,51 @@ +/*************************************************************************** + draw.h - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _GL_DRAW_H_ +#define _GL_DRAW_H_ + +// internally used defines + +#define GPUCOMMAND(x) ((x>>24) & 0xff) +#define RED(x) (x & 0xff) +#define BLUE(x) ((x>>16) & 0xff) +#define GREEN(x) ((x>>8) & 0xff) +#define COLOR(x) (x & 0xffffff) + +// prototypes +int GLinitialize(); +void GLcleanup(); +BOOL offset2(void); +BOOL offset3(void); +BOOL offset4(void); +BOOL offsetline(void); +void offsetST(void); +void offsetBlk(void); +void offsetScreenUpload(int Position); +void assignTexture3(void); +void assignTexture4(void); +void assignTextureSprite(void); +void assignTextureVRAMWrite(void); +void SetOGLDisplaySettings (BOOL DisplaySet); +void ReadConfig(void); +void WriteConfig(void); +void SetExtGLFuncs(void); + +/////////////////////////////////////////////////////////////////////// + +#endif // _GL_DRAW_H_ diff --git a/plugins/peopsxgl/externals.h b/plugins/peopsxgl/externals.h new file mode 100644 index 00000000..8ce2b914 --- /dev/null +++ b/plugins/peopsxgl/externals.h @@ -0,0 +1,413 @@ +/*************************************************************************** + external.h - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define MIRROR_TEST 1 +#define SCISSOR_TEST 1 + +// for own sow/tow scaling +#define OWNSCALE 1 + +#define CLUTUSED 0x80000000 + +#define SETCOL(x) if(x.c.lcol!=ulOLDCOL) {ulOLDCOL=x.c.lcol;glColor4ubv(x.c.col);} +#define SETPCOL(x) if(x->c.lcol!=ulOLDCOL) {ulOLDCOL=x->c.lcol;glColor4ubv(x->c.col);} + +#define GL_TO_EDGE_CLAMP 0x812F + +#define INFO_TW 0 +#define INFO_DRAWSTART 1 +#define INFO_DRAWEND 2 +#define INFO_DRAWOFF 3 + +#define SIGNSHIFT 21 +#define CHKMAX_X 1024 +#define CHKMAX_Y 512 + +// GPU STATUS REGISTER bit values (c) Lewpy + +#define DR_NORMAL 0 +#define DR_VRAMTRANSFER 1 + +#define GPUSTATUS_ODDLINES 0x80000000 +#define GPUSTATUS_DMABITS 0x60000000 // Two bits +#define GPUSTATUS_READYFORCOMMANDS 0x10000000 +#define GPUSTATUS_READYFORVRAM 0x08000000 +#define GPUSTATUS_IDLE 0x04000000 +#define GPUSTATUS_DISPLAYDISABLED 0x00800000 +#define GPUSTATUS_INTERLACED 0x00400000 +#define GPUSTATUS_RGB24 0x00200000 +#define GPUSTATUS_PAL 0x00100000 +#define GPUSTATUS_DOUBLEHEIGHT 0x00080000 +#define GPUSTATUS_WIDTHBITS 0x00070000 // Three bits +#define GPUSTATUS_MASKENABLED 0x00001000 +#define GPUSTATUS_MASKDRAWN 0x00000800 +#define GPUSTATUS_DRAWINGALLOWED 0x00000400 +#define GPUSTATUS_DITHER 0x00000200 + +#define STATUSREG lGPUstatusRet + +#define GPUIsBusy (STATUSREG &= ~GPUSTATUS_IDLE) +#define GPUIsIdle (STATUSREG |= GPUSTATUS_IDLE) + +#define GPUIsNotReadyForCommands (STATUSREG &= ~GPUSTATUS_READYFORCOMMANDS) +#define GPUIsReadyForCommands (STATUSREG |= GPUSTATUS_READYFORCOMMANDS) + +#define KEY_RESETTEXSTORE 1 +#define KEY_SHOWFPS 2 +#define KEY_RESETOPAQUE 4 +#define KEY_RESETDITHER 8 +#define KEY_RESETFILTER 16 +#define KEY_RESETADVBLEND 32 +#define KEY_BLACKWHITE 64 +#define KEY_TOGGLEFBTEXTURE 128 +#define KEY_STEPDOWN 256 +#define KEY_TOGGLEFBREAD 512 + +#define FALSE 0 +#define TRUE 1 +#define BOOL unsigned short +#define bool unsigned short +#define LOWORD(l) ((unsigned short)(l)) +#define HIWORD(l) ((unsigned short)(((uint32_t)(l) >> 16) & 0xFFFF)) +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#define DWORD uint32_t + +typedef struct RECTTAG +{ + int left; + int top; + int right; + int bottom; +}RECT; + +typedef struct VRAMLOADTAG +{ + short x; + short y; + short Width; + short Height; + short RowsRemaining; + short ColsRemaining; + unsigned short *ImagePtr; +} VRAMLoad_t; + +typedef struct PSXPOINTTAG +{ + int x; + int y; +} PSXPoint_t; + +typedef struct PSXSPOINTTAG +{ + short x; + short y; +} PSXSPoint_t; + +typedef struct PSXRECTTAG +{ + short x0; + short x1; + short y0; + short y1; +} PSXRect_t; + +typedef struct TWINTAG +{ + PSXRect_t Position; + PSXRect_t OPosition; + PSXPoint_t TextureSize; + float UScaleFactor; + float VScaleFactor; +} TWin_t; + +typedef struct PSXDISPLAYTAG +{ + PSXPoint_t DisplayModeNew; + PSXPoint_t DisplayMode; + PSXPoint_t DisplayPosition; + PSXPoint_t DisplayEnd; + + int Double; + int Height; + int PAL; + int InterlacedNew; + int Interlaced; + int InterlacedTest; + int RGB24New; + int RGB24; + PSXSPoint_t DrawOffset; + PSXRect_t DrawArea; + PSXPoint_t GDrawOffset; + PSXPoint_t CumulOffset; + int Disabled; + PSXRect_t Range; +} PSXDisplay_t; + +typedef struct OGLVertexTag +{ + GLfloat x; + GLfloat y; + GLfloat z; + + GLfloat sow; + GLfloat tow; + + union COLTAG + { + unsigned char col[4]; + unsigned int lcol; + } c; +} OGLVertex; + +typedef union EXShortTag +{ + unsigned char c[2]; + unsigned short s; +} EXShort; + +typedef union EXLongTag +{ + unsigned char c[4]; + unsigned int l; + EXShort s[2]; +} EXLong; + +#ifndef _IN_CFG + +extern char *pConfigFile; + +#endif + +#ifndef _IN_DRAW + +extern int iResX; +extern int iResY; +extern BOOL bKeepRatio; +extern RECT rRatioRect; +extern BOOL bSnapShot; +extern BOOL bSmallAlpha; +extern BOOL bOpaquePass; +extern BOOL bAdvancedBlend; +extern BOOL bUseLines; +extern int iTexQuality; +extern BOOL bUseAntiAlias; +extern BOOL bGLExt; +extern BOOL bGLFastMovie; +extern BOOL bGLSoft; +extern BOOL bGLBlend; + +extern PFNGLBLENDEQU glBlendEquationEXTEx; +extern PFNGLCOLORTABLEEXT glColorTableEXTEx; + +extern unsigned char gl_ux[8]; +extern unsigned char gl_vy[8]; +extern OGLVertex vertex[4]; +extern short sprtY,sprtX,sprtH,sprtW; +extern BOOL bIsFirstFrame; +extern int iWinSize; +extern int iZBufferDepth; +extern GLbitfield uiBufferBits; +extern int iUseMask; +extern int iSetMask; +extern int iDepthFunc; +extern BOOL bCheckMask; +extern unsigned short sSetMask; +extern uint32_t lSetMask; +extern int iShowFPS; +extern BOOL bSetClip; +extern int iForceVSync; +extern int iUseExts; +extern int iUsePalTextures; +extern GLuint gTexScanName; + +#endif + +#ifndef _IN_SOFT + +extern int GlobalTextAddrX,GlobalTextAddrY,GlobalTextTP; +extern int GlobalTextREST,GlobalTextABR,GlobalTextPAGE; +extern short ly0,lx0,ly1,lx1,ly2,lx2,ly3,lx3; +extern short g_m1; +extern short g_m2; +extern short g_m3; +extern short DrawSemiTrans; + +#endif + +#ifndef _IN_PRIMDRAW + +extern BOOL bNeedUploadTest; +extern BOOL bNeedUploadAfter; +extern BOOL bTexEnabled; +extern BOOL bBlendEnable; +extern BOOL bDrawDither; +extern int iFilterType; +extern BOOL bFullVRam; +extern BOOL bUseMultiPass; +extern int iOffscreenDrawing; +extern BOOL bOldSmoothShaded; +extern BOOL bUsingTWin; +extern BOOL bUsingMovie; +extern PSXRect_t xrMovieArea; +extern PSXRect_t xrUploadArea; +extern PSXRect_t xrUploadAreaIL; +extern PSXRect_t xrUploadAreaRGB24; +extern GLuint gTexName; +extern BOOL bDrawNonShaded; +extern BOOL bDrawMultiPass; +extern GLubyte ubGloColAlpha; +extern GLubyte ubGloAlpha; +extern short sSprite_ux2; +extern short sSprite_vy2; +extern BOOL bRenderFrontBuffer; +extern uint32_t ulOLDCOL; +extern uint32_t ulClutID; +extern void (*primTableJ[256])(unsigned char *); +extern void (*primTableSkip[256])(unsigned char *); +extern unsigned short usMirror; +extern uint32_t dwCfgFixes; +extern uint32_t dwActFixes; +extern uint32_t dwEmuFixes; +extern BOOL bUseFixes; +extern int iSpriteTex; +extern int iDrawnSomething; + +extern int drawX; +extern int drawY; +extern int drawW; +extern int drawH; +extern short sxmin; +extern short sxmax; +extern short symin; +extern short symax; + +#endif + +#ifndef _IN_TEXTURE + +extern unsigned char ubOpaqueDraw; +extern GLint giWantedRGBA; +extern GLint giWantedFMT; +extern GLint giWantedTYPE; +extern void (*LoadSubTexFn) (int,int,short,short); +extern int GlobalTexturePage; +extern uint32_t (*TCF[]) (uint32_t); +extern unsigned short (*PTCF[]) (unsigned short); +extern uint32_t (*PalTexturedColourFn) (uint32_t); +extern BOOL bUseFastMdec; +extern BOOL bUse15bitMdec; +extern int iFrameTexType; +extern int iFrameReadType; +extern int iClampType; +extern int iSortTexCnt; +extern BOOL bFakeFrontBuffer; +extern GLuint gTexFrameName; +extern GLuint gTexBlurName; +extern int iVRamSize; +extern int iTexGarbageCollection; +extern int iFTexA; +extern int iFTexB; +extern int iHiResTextures; +extern BOOL bIgnoreNextTile; + +#endif + +#ifndef _IN_GPU + +extern VRAMLoad_t VRAMWrite; +extern VRAMLoad_t VRAMRead; +extern int iDataWriteMode; +extern int iDataReadMode; +extern int iColDepth; +extern BOOL bChangeRes; +extern BOOL bWindowMode; +extern char szDispBuf[]; +extern char szGPUKeys[]; +extern PSXDisplay_t PSXDisplay; +extern PSXDisplay_t PreviousPSXDisplay; +extern uint32_t ulKeybits; +extern TWin_t TWin; +extern BOOL bDisplayNotSet; +extern int lGPUstatusRet; +extern short imageX0,imageX1; +extern short imageY0,imageY1; +extern int lClearOnSwap,lClearOnSwapColor; +extern unsigned char *psxVub; +extern signed char *psxVsb; +extern unsigned short *psxVuw; +extern signed short *psxVsw; +extern uint32_t *psxVul; +extern signed int *psxVsl; +extern GLfloat gl_z; +extern BOOL bNeedRGB24Update; +extern BOOL bChangeWinMode; +extern GLuint uiScanLine; +extern int iUseScanLines; +extern int lSelectedSlot; +extern int iScanBlend; +extern BOOL bInitCap; +extern int iBlurBuffer; +extern int iLastRGB24; +extern int iRenderFVR; +extern int iNoScreenSaver; +extern uint32_t ulGPUInfoVals[]; +extern BOOL bNeedInterlaceUpdate; +extern BOOL bNeedWriteUpload; +extern BOOL bSkipNextFrame; + +extern int bFullScreen; + +#endif + +#ifndef _IN_MENU + +extern uint32_t dwCoreFlags; +extern GLuint gTexPicName; +extern PSXPoint_t ptCursorPoint[]; +extern unsigned short usCursorActive; + +#endif + +#ifndef _IN_FPS + +extern BOOL bUseFrameLimit; +extern BOOL bUseFrameSkip; +extern float fFrameRate; +extern float fFrameRateHz; +extern int iFrameLimit; +extern float fps_skip; +extern float fps_cur; + +#endif + +#ifndef _IN_KEY + +extern uint32_t ulKeybits; + +#endif + +#ifndef _IN_ZN + +extern uint32_t dwGPUVersion; +extern int iGPUHeight; +extern int iGPUHeightMask; +extern int GlobalTextIL; +extern int iTileCheat; + +#endif diff --git a/plugins/peopsxgl/fps.c b/plugins/peopsxgl/fps.c new file mode 100644 index 00000000..dc89600f --- /dev/null +++ b/plugins/peopsxgl/fps.c @@ -0,0 +1,396 @@ +/*************************************************************************** + fps.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2009/03/08 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +#include "stdafx.h" + +#define _IN_FPS + +#include "externals.h" + +//////////////////////////////////////////////////////////////////////// +// FPS stuff +//////////////////////////////////////////////////////////////////////// + +BOOL bIsPerformanceCounter=FALSE; +float fFrameRateHz=0; +DWORD dwFrameRateTicks=16; +float fFrameRate; +int iFrameLimit; +BOOL bUseFrameLimit=FALSE; +BOOL bUseFrameSkip=0; +DWORD dwLaceCnt=0; + +//////////////////////////////////////////////////////////////////////// +// FPS skipping / limit +//////////////////////////////////////////////////////////////////////// + +BOOL bInitCap = TRUE; +float fps_skip = 0; +float fps_cur = 0; + +#define TIMEBASE 100000 + +unsigned long timeGetTime() +{ + struct timeval tv; + gettimeofday(&tv, 0); // well, maybe there are better ways + return tv.tv_sec * 100000 + tv.tv_usec/10; // to do that in linux, but at least it works +} + +void FrameCap(void) +{ + static unsigned long curticks, lastticks, _ticks_since_last_update; + static unsigned long TicksToWait = 0; + bool Waiting = TRUE; + + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + + if((_ticks_since_last_update > TicksToWait) || + (curticks dwFrameRateTicks) + TicksToWait=0; + else TicksToWait=dwFrameRateTicks-(_ticks_since_last_update-TicksToWait); + } + else + { + while (Waiting) + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + if ((_ticks_since_last_update > TicksToWait) || + (curticks < lastticks)) + { + Waiting = FALSE; + lastticks = curticks; + TicksToWait = dwFrameRateTicks; + } + } + } + } +} + +#define MAXSKIP 120 +#define MAXLACE 16 + +void FrameSkip(void) +{ + static int iNumSkips=0,iAdditionalSkip=0; // number of additional frames to skip + static DWORD dwLastLace=0; // helper var for frame limitation + static DWORD curticks, lastticks, _ticks_since_last_update; + + if(!dwLaceCnt) return; // important: if no updatelace happened, we ignore it completely + + if(iNumSkips) // we are in skipping mode? + { + dwLastLace+=dwLaceCnt; // -> calc frame limit helper (number of laces) + bSkipNextFrame = TRUE; // -> we skip next frame + iNumSkips--; // -> ok, one done + } + else // ok, no additional skipping has to be done... + { // we check now, if some limitation is needed, or a new skipping has to get started + DWORD dwWaitTime; + + if(bInitCap || bSkipNextFrame) // first time or we skipped before? + { + if(bUseFrameLimit && !bInitCap) // frame limit wanted and not first time called? + { + DWORD dwT=_ticks_since_last_update; // -> that's the time of the last drawn frame + dwLastLace+=dwLaceCnt; // -> and that's the number of updatelace since the start of the last drawn frame + + curticks = timeGetTime(); + _ticks_since_last_update= dwT+curticks - lastticks; + + dwWaitTime=dwLastLace*dwFrameRateTicks; // -> and now we calc the time the real psx would have needed + + if(_ticks_since_last_update we were too fast? + { + if((dwWaitTime-_ticks_since_last_update)> // -> some more security, to prevent + (60*dwFrameRateTicks)) // wrong waiting times + _ticks_since_last_update=dwWaitTime; + + while(_ticks_since_last_update loop until we have reached the real psx time + { // (that's the additional limitation, yup) + curticks = timeGetTime(); + _ticks_since_last_update = dwT+curticks - lastticks; + } + } + else // we were still too slow ?!!? + { + if(iAdditionalSkip well, somewhen we really have to stop skipping on very slow systems + { + iAdditionalSkip++; // -> inc our watchdog var + dwLaceCnt=0; // -> reset lace count + lastticks = timeGetTime(); + return; // -> done, we will skip next frame to get more speed + } + } + } + + bInitCap=FALSE; // -> ok, we have inited the frameskip func + iAdditionalSkip=0; // -> init additional skip + bSkipNextFrame=FALSE; // -> we don't skip the next frame + lastticks = timeGetTime(); + dwLaceCnt=0; // -> and we start to count the laces + dwLastLace=0; + _ticks_since_last_update=0; + return; // -> done, the next frame will get drawn + } + + bSkipNextFrame=FALSE; // init the frame skip signal to 'no skipping' first + + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + + dwLastLace=dwLaceCnt; // store curr count (frame limitation helper) + dwWaitTime=dwLaceCnt*dwFrameRateTicks; // calc the 'real psx lace time' + + if(_ticks_since_last_update>dwWaitTime) // hey, we needed way too long for that frame... + { + if(bUseFrameLimit) // if limitation, we skip just next frame, + { // and decide after, if we need to do more + iNumSkips=0; + } + else + { + iNumSkips=_ticks_since_last_update/dwWaitTime; // -> calc number of frames to skip to catch up + iNumSkips--; // -> since we already skip next frame, one down + if(iNumSkips>MAXSKIP) iNumSkips=MAXSKIP; // -> well, somewhere we have to draw a line + } + bSkipNextFrame = TRUE; // -> signal for skipping the next frame + } + else // we were faster than real psx? fine :) + if(bUseFrameLimit) // frame limit used? so we wait til the 'real psx time' has been reached + { + if(dwLaceCnt>MAXLACE) // -> security check + _ticks_since_last_update=dwWaitTime; + + while(_ticks_since_last_updatefFrameRateHz) // optical adjust ;) avoids flickering fps display + fps_cur=fFrameRateHz; + } +} + +void PCFrameCap (void) +{ + static unsigned long curticks, lastticks, _ticks_since_last_update; + static unsigned long TicksToWait = 0; + bool Waiting = TRUE; + + while (Waiting) + { + curticks = timeGetTime(); + _ticks_since_last_update = curticks - lastticks; + if ((_ticks_since_last_update > TicksToWait) || + (curticks < lastticks)) + { + Waiting = FALSE; + lastticks = curticks; + TicksToWait = (TIMEBASE / (unsigned long)fFrameRateHz); + } + } +} + +void PCcalcfps(void) +{ + static unsigned long curticks,_ticks_since_last_update,lastticks; + static long fps_cnt = 0; + static float fps_acc = 0; + float CurrentFPS=0; + + curticks = timeGetTime(); + _ticks_since_last_update=curticks-lastticks; + if(_ticks_since_last_update) + CurrentFPS=(float)TIMEBASE/(float)_ticks_since_last_update; + else CurrentFPS = 0; + lastticks = curticks; + + fps_acc += CurrentFPS; + + if(++fps_cnt==10) + { + fps_cur = fps_acc / 10; + fps_acc = 0; + fps_cnt = 0; + } + + fps_skip=CurrentFPS+1.0f; +} + +void SetAutoFrameCap(void) +{ + if(iFrameLimit==1) + { + fFrameRateHz = fFrameRate; + dwFrameRateTicks=(TIMEBASE / (unsigned long)fFrameRateHz); + return; + } + + if(dwActFixes&128) + { + if (PSXDisplay.Interlaced) + fFrameRateHz = PSXDisplay.PAL?50.0f:60.0f; + else fFrameRateHz = PSXDisplay.PAL?25.0f:30.0f; + } + else + { + //fFrameRateHz = PSXDisplay.PAL?50.0f:59.94f; + + if(PSXDisplay.PAL) + { + if (STATUSREG&GPUSTATUS_INTERLACED) + fFrameRateHz=33868800.0f/677343.75f; // 50.00238 + else fFrameRateHz=33868800.0f/680595.00f; // 49.76351 + } + else + { + if (STATUSREG&GPUSTATUS_INTERLACED) + fFrameRateHz=33868800.0f/565031.25f; // 59.94146 + else fFrameRateHz=33868800.0f/566107.50f; // 59.82750 + } + + dwFrameRateTicks=(TIMEBASE / (unsigned long)fFrameRateHz); + } +} + +void SetFrameRateConfig(void) +{ + if(!fFrameRate) fFrameRate=200.0f; + + if(fFrameRateHz==0) + { + if(iFrameLimit==2) fFrameRateHz=59.94f; // auto framerate? set some init val (no pal/ntsc known yet) + else fFrameRateHz=fFrameRate; // else set user framerate + } + + dwFrameRateTicks=(TIMEBASE / (unsigned long)fFrameRateHz); + + if(iFrameLimit==2) SetAutoFrameCap(); +} + +void InitFrameCap(void) +{ +} + +void ReInitFrameCap(void) +{ +} + +void CheckFrameRate(void) // called in updatelace (on every emulated psx vsync) +{ + if(bUseFrameSkip) + { + if(!(dwActFixes&0x100)) + { + dwLaceCnt++; // -> and store cnt of vsync between frames + if(dwLaceCnt>=MAXLACE && bUseFrameLimit) + { + if(dwLaceCnt==MAXLACE) bInitCap=TRUE; + FrameCap(); + } + } + else if(bUseFrameLimit) FrameCap(); + calcfps(); // -> calc fps display in skipping mode + } + else // -> non-skipping mode: + { + if(bUseFrameLimit) FrameCap(); + if(ulKeybits&KEY_SHOWFPS) calcfps(); + } +} + +void CALLBACK GPUsetframelimit(unsigned long option) // new EPSXE interface func: main emu can enable/disable fps limitation this way +{ + bInitCap = TRUE; + + if(option==1) // emu says: limit + { + bUseFrameLimit=TRUE;bUseFrameSkip=FALSE;iFrameLimit=2; + SetAutoFrameCap(); + } + else // emu says: no limit + { + bUseFrameLimit=FALSE; + } +} diff --git a/plugins/peopsxgl/fps.h b/plugins/peopsxgl/fps.h new file mode 100644 index 00000000..3b1951b8 --- /dev/null +++ b/plugins/peopsxgl/fps.h @@ -0,0 +1,28 @@ +/*************************************************************************** + fps.h - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +void InitFrameCap(void); +void SetFrameRateConfig(void); +void PCFrameCap(void); +void PCcalcfps(void); +void FrameSkip(void); +void CheckFrameRate(void); +void ReInitFrameCap(void); +void SetAutoFrameCap(void); + +unsigned long timeGetTime(); diff --git a/plugins/peopsxgl/gl_ext.h b/plugins/peopsxgl/gl_ext.h new file mode 100644 index 00000000..be0db439 --- /dev/null +++ b/plugins/peopsxgl/gl_ext.h @@ -0,0 +1,37 @@ +#define COMBINE_EXT 0x8570 +#define COMBINE_RGB_EXT 0x8571 +#define COMBINE_ALPHA_EXT 0x8572 +#define SOURCE0_RGB_EXT 0x8580 +#define SOURCE1_RGB_EXT 0x8581 +#define SOURCE2_RGB_EXT 0x8582 +#define SOURCE0_ALPHA_EXT 0x8588 +#define SOURCE1_ALPHA_EXT 0x8589 +#define SOURCE2_ALPHA_EXT 0x858A +#define OPERAND0_RGB_EXT 0x8590 +#define OPERAND1_RGB_EXT 0x8591 +#define OPERAND2_RGB_EXT 0x8592 +#define OPERAND0_ALPHA_EXT 0x8598 +#define OPERAND1_ALPHA_EXT 0x8599 +#define OPERAND2_ALPHA_EXT 0x859A +#define RGB_SCALE_EXT 0x8573 +#define ADD_SIGNED_EXT 0x8574 +#define INTERPOLATE_EXT 0x8575 +#define CONSTANT_EXT 0x8576 +#define PRIMARY_COLOR_EXT 0x8577 +#define PREVIOUS_EXT 0x8578 + +#define FUNC_ADD_EXT 0x8006 +#define FUNC_REVERSESUBTRACT_EXT 0x800B + +typedef void (* PFNGLBLENDEQU) (GLenum mode); +typedef void (* PFNGLCOLORTABLEEXT) + (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, + GLenum type, const GLvoid *data); + +#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 + +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE + +//GL_ALPHA_SCALE diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c new file mode 100644 index 00000000..307a1ed9 --- /dev/null +++ b/plugins/peopsxgl/gpu.c @@ -0,0 +1,3196 @@ +/*************************************************************************** + gpu.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + email : BlackDove@addcom.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +// !!! enable this, if Linux XF86VidMode is not supported: +//#define NOVMODE + +#include "stdafx.h" +#include "config.h" + +#ifndef NOVMODE +#include +static XF86VidModeModeInfo **modes=0; +static int iOldMode=0; +#endif + +#define _IN_GPU + +#include "externals.h" +#include "gpu.h" +#include "draw.h" +#include "cfg.h" +#include "prim.h" +#include "psemu_plugin_defs.h" +#include "texture.h" +#include "menu.h" +#include "fps.h" +#include "key.h" +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif + +//////////////////////////////////////////////////////////////////////// +// PPDK developer must change libraryName field and can change revision and build +//////////////////////////////////////////////////////////////////////// + +const unsigned char version = 1; // do not touch - library for PSEmu 1.x +const unsigned char revision = 1; +const unsigned char build = 78; + +static char *libraryName = N_("OpenGL Driver"); + +static char *PluginAuthor = N_("Pete Bernert"); +static char *libraryInfo = N_("Based on P.E.Op.S. MesaGL Driver V1.78\nCoded by Pete Bernert\n"); + +//////////////////////////////////////////////////////////////////////// +// memory image of the PSX vram +//////////////////////////////////////////////////////////////////////// + +unsigned char *psxVSecure; +unsigned char *psxVub; +signed char *psxVsb; +unsigned short *psxVuw; +unsigned short *psxVuw_eom; +signed short *psxVsw; +uint32_t *psxVul; +signed int *psxVsl; + +// macro for easy access to packet information +#define GPUCOMMAND(x) ((x>>24) & 0xff) + +GLfloat gl_z=0.0f; +BOOL bNeedInterlaceUpdate=FALSE; +BOOL bNeedRGB24Update=FALSE; +BOOL bChangeWinMode=FALSE; + +uint32_t ulStatusControl[256]; + +//////////////////////////////////////////////////////////////////////// +// global GPU vars +//////////////////////////////////////////////////////////////////////// + +static int GPUdataRet; +int lGPUstatusRet; +char szDispBuf[64]; + +uint32_t dwGPUVersion = 0; +int iGPUHeight = 512; +int iGPUHeightMask = 511; +int GlobalTextIL = 0; +int iTileCheat = 0; + +static uint32_t gpuDataM[256]; +static unsigned char gpuCommand = 0; +static int gpuDataC = 0; +static int gpuDataP = 0; + +VRAMLoad_t VRAMWrite; +VRAMLoad_t VRAMRead; +int iDataWriteMode; +int iDataReadMode; + +int lClearOnSwap; +int lClearOnSwapColor; +BOOL bSkipNextFrame = FALSE; +int iColDepth; +BOOL bChangeRes; +BOOL bWindowMode; +int iWinSize; + +// possible psx display widths +short dispWidths[8] = {256,320,512,640,368,384,512,640}; + +PSXDisplay_t PSXDisplay; +PSXDisplay_t PreviousPSXDisplay; +TWin_t TWin; +short imageX0,imageX1; +short imageY0,imageY1; +BOOL bDisplayNotSet = TRUE; +GLuint uiScanLine=0; +int iUseScanLines=0; +int lSelectedSlot=0; +unsigned char * pGfxCardScreen=0; +int iBlurBuffer=0; +int iScanBlend=0; +int iRenderFVR=0; +int iNoScreenSaver=0; +uint32_t ulGPUInfoVals[16]; +int iFakePrimBusy = 0; +int iRumbleVal = 0; +int iRumbleTime = 0; + +//////////////////////////////////////////////////////////////////////// +// stuff to make this a true PDK module +//////////////////////////////////////////////////////////////////////// + +char * CALLBACK PSEgetLibName(void) +{ + return _(libraryName); +} + +unsigned long CALLBACK PSEgetLibType(void) +{ + return PSE_LT_GPU; +} + +unsigned long CALLBACK PSEgetLibVersion(void) +{ + return version<<16|revision<<8|build; +} + +char * GPUgetLibInfos(void) +{ + return _(libraryInfo); +} + +//////////////////////////////////////////////////////////////////////// +// snapshot funcs (saves screen to bitmap / text infos into file) +//////////////////////////////////////////////////////////////////////// + +char * GetConfigInfos(int hW) +{ + char szO[2][4]={"off","on "}; + char szTxt[256]; + char * pB=(char *)malloc(32767); + + if(!pB) return NULL; + *pB=0; + //----------------------------------------------------// + sprintf(szTxt,"Plugin: %s %d.%d.%d\r\n",libraryName,version,revision,build); + strcat(pB,szTxt); + sprintf(szTxt,"Author: %s\r\n",PluginAuthor); + strcat(pB,szTxt); + + sprintf(szTxt,"Card vendor: %s\r\n",(char *)glGetString(GL_VENDOR)); + strcat(pB,szTxt); + sprintf(szTxt,"GFX card: %s\r\n",(char *)glGetString(GL_RENDERER)); + strcat(pB,szTxt); + sprintf(szTxt,"OGL version: %s\r\n\r\n",(char *)glGetString(GL_VERSION)); + strcat(pB,szTxt); + //strcat(pB,(char *)glGetString(GL_EXTENSIONS)); + //strcat(pB,"\r\n\r\n"); + + if(hW && bWindowMode) + sprintf(szTxt,"Resolution/Color:\r\n- %dx%d ",LOWORD(iWinSize),HIWORD(iWinSize)); + else + sprintf(szTxt,"Resolution/Color:\r\n- %dx%d ",iResX,iResY); + strcat(pB,szTxt); + if(bWindowMode) sprintf(szTxt,"Window mode\r\n"); + else + { + sprintf(szTxt,"Fullscreen "); + strcat(pB,szTxt); + if(bChangeRes) sprintf(szTxt,"- Desktop changing [%d Bit]\r\n",iColDepth); + else sprintf(szTxt,"- NO desktop changing\r\n"); + } + strcat(pB,szTxt); + + if(iForceVSync>=0) sprintf(szTxt,"- V-Sync: %s\r\n",szO[iForceVSync]); + else strcpy(szTxt,"- V-Sync: Driver\r\n"); + strcat(pB,szTxt); + sprintf(szTxt,"- Keep psx aspect ratio: %s\r\n\r\n",szO[bKeepRatio]); + strcat(pB,szTxt); + //----------------------------------------------------// + strcpy(szTxt,"Textures:\r\n- "); + if(iTexQuality==0) strcat(szTxt,"Default"); + else if(iTexQuality==1) strcat(szTxt,"R4G4B4A4"); + else if(iTexQuality==2) strcat(szTxt,"R5G5B5A1"); + else if(iTexQuality==3) strcat(szTxt,"R8G8A8A8"); + else if(iTexQuality==4) strcat(szTxt,"B8G8R8A8"); + if(!hW && bGLExt) strcat(szTxt," (packed pixels)\r\n"); + else strcat(szTxt,"\r\n"); + strcat(pB,szTxt); + if(!hW) + { + sprintf(szTxt,"- Filtering: %d - edge clamping ",iFilterType); + if(iClampType==GL_TO_EDGE_CLAMP) strcat(szTxt,"supported\r\n"); + else strcat(szTxt,"NOT supported\r\n"); + } + else sprintf(szTxt,"- iFiltering: %d\r\n",iFilterType); + strcat(pB,szTxt); + sprintf(szTxt,"- Hi-Res textures: %d\r\n",iHiResTextures); + strcat(pB,szTxt); + if(!hW) + { + sprintf(szTxt,"- Palettized tex windows: %s\r\n",szO[iUsePalTextures]); + strcat(pB,szTxt); + } + sprintf(szTxt,"- VRam size: %d MBytes",iVRamSize); + if(!hW) + sprintf(szTxt+strlen(szTxt)," - %d textures usable\r\n\r\n",iSortTexCnt); + else strcat(szTxt,"\r\n\r\n"); + strcat(pB,szTxt); + //----------------------------------------------------// + sprintf(szTxt,"Framerate:\r\n- FPS limitation: %s\r\n",szO[bUseFrameLimit]); + strcat(pB,szTxt); + sprintf(szTxt,"- Frame skipping: %s\r\n",szO[bUseFrameSkip]); + strcat(pB,szTxt); + if(iFrameLimit==2) + strcpy(szTxt,"- FPS limit: Auto\r\n\r\n"); + else sprintf(szTxt,"- FPS limit: %.1f\r\n\r\n",fFrameRate); + strcat(pB,szTxt); + //----------------------------------------------------// + sprintf(szTxt,"Compatibility:\r\n- Offscreen drawing: %d\r\n",iOffscreenDrawing); + strcat(pB,szTxt); + sprintf(szTxt,"- Framebuffer texture: %d",iFrameTexType); + if(!hW && iFrameTexType==2) + { + if(gTexFrameName) strcat(szTxt," - texture created\r\n"); + else strcat(szTxt," - not used yet\r\n"); + } + else strcat(szTxt,"\r\n"); + strcat(pB,szTxt); + sprintf(szTxt,"- Framebuffer access: %d\r\n",iFrameReadType); + strcat(pB,szTxt); + sprintf(szTxt,"- Alpha multipass: %s\r\n",szO[bOpaquePass]); + strcat(pB,szTxt); + sprintf(szTxt,"- Mask bit: %s\r\n",szO[iUseMask]); + strcat(pB,szTxt); + sprintf(szTxt,"- Advanced blending: %s",szO[bAdvancedBlend]); + if(!hW && bAdvancedBlend) + { + if(bGLBlend) strcat(szTxt," (hardware)\r\n"); + else strcat(szTxt," (software)\r\n"); + } + else strcat(szTxt,"\r\n"); + strcat(pB,szTxt); + + if(!hW) + { + strcpy(szTxt,"- Subtractive blending: "); + if(glBlendEquationEXTEx) + { + if(bUseMultiPass) strcat(szTxt,"supported, but not used!"); + else strcat(szTxt,"activated"); + } + else strcat(szTxt," NOT supported!"); + strcat(szTxt,"\r\n\r\n"); + } + else strcpy(szTxt,"\r\n"); + + strcat(pB,szTxt); + //----------------------------------------------------// + sprintf(szTxt,"Misc:\r\n- Scanlines: %s",szO[iUseScanLines]); + strcat(pB,szTxt); + if(iUseScanLines) sprintf(szTxt," [%d]\r\n",iScanBlend); + else strcpy(szTxt,"\r\n"); + strcat(pB,szTxt); + sprintf(szTxt,"- Line mode: %s\r\n",szO[bUseLines]); + strcat(pB,szTxt); +// sprintf(szTxt,"- Line AA: %s\r\n",szO[bUseAntiAlias]); +// fwrite(szTxt,lstrlen(szTxt),1,txtfile); + sprintf(szTxt,"- Unfiltered FB: %s\r\n",szO[bUseFastMdec]); + strcat(pB,szTxt); + sprintf(szTxt,"- 15 bit FB: %s\r\n",szO[bUse15bitMdec]); + strcat(pB,szTxt); + sprintf(szTxt,"- Dithering: %s\r\n",szO[bDrawDither]); + strcat(pB,szTxt); + sprintf(szTxt,"- Screen smoothing: %s",szO[iBlurBuffer]); + strcat(pB,szTxt); + if(!hW && iBlurBuffer) + { + if(gTexBlurName) strcat(pB," - supported\r\n"); + else strcat(pB," - not supported\r\n"); + } + else strcat(pB,"\r\n"); + sprintf(szTxt,"- Game fixes: %s [%08x]\r\n",szO[bUseFixes],dwCfgFixes); + strcat(pB,szTxt); + //----------------------------------------------------// + return pB; +} + +//////////////////////////////////////////////////////////////////////// +// save text infos to file +//////////////////////////////////////////////////////////////////////// + +void DoTextSnapShot(int iNum) +{ + FILE *txtfile;char szTxt[256];char * pB; + + sprintf(szTxt,"%s/pcsx%04d.txt",getenv("HOME"),iNum); + + if((txtfile=fopen(szTxt,"wb"))==NULL) + return; + + pB=GetConfigInfos(0); + if(pB) + { + fwrite(pB,strlen(pB),1,txtfile); + free(pB); + } + fclose(txtfile); +} + +//////////////////////////////////////////////////////////////////////// +// saves screen bitmap to file +//////////////////////////////////////////////////////////////////////// + +void DoSnapShot(void) +{ + unsigned char * snapshotdumpmem=NULL,* p,c; + FILE *bmpfile;char filename[256]; + unsigned char header[0x36];int size; + unsigned char empty[2]={0,0};int i; + unsigned int snapshotnr = 0; + short SnapWidth; + short SnapHeigth; + + bSnapShot=FALSE; + + SnapWidth = iResX; + SnapHeigth = iResY; + + size=SnapWidth * SnapHeigth * 3 + 0x38; + + if((snapshotdumpmem=(unsigned char *) + malloc(SnapWidth*SnapHeigth*3))==NULL) + return; + + // fill in proper values for BMP + for(i=0;i<0x36;i++) header[i]=0; + header[0]='B'; + header[1]='M'; + header[2]=(unsigned char)(size&0xff); + header[3]=(unsigned char)((size>>8)&0xff); + header[4]=(unsigned char)((size>>16)&0xff); + header[5]=(unsigned char)((size>>24)&0xff); + header[0x0a]=0x36; + header[0x0e]=0x28; + header[0x12]=(unsigned char)(SnapWidth%256); + header[0x13]=(unsigned char)(SnapWidth/256); + header[0x16]=(unsigned char)(SnapHeigth%256); + header[0x17]=(unsigned char)(SnapHeigth/256); + header[0x1a]=0x01; + header[0x1c]=0x18; + header[0x26]=0x12; + header[0x27]=0x0B; + header[0x2A]=0x12; + header[0x2B]=0x0B; + + // increment snapshot value + // get filename + do + { + snapshotnr++; + sprintf(filename,"%s/pcsx%04d.bmp",getenv("HOME"),snapshotnr); + bmpfile=fopen(filename,"rb"); + if(bmpfile==NULL)break; + fclose(bmpfile); + if(snapshotnr==9999) break; + } + while(TRUE); + + // try opening new snapshot file + if((bmpfile=fopen(filename,"wb"))==NULL) + {free(snapshotdumpmem);return;} + + fwrite(header,0x36,1,bmpfile); + + glReadPixels(0,0,SnapWidth,SnapHeigth,GL_RGB, + GL_UNSIGNED_BYTE,snapshotdumpmem); + p=snapshotdumpmem; + size=SnapWidth * SnapHeigth; + + for(i=0;i kill context + XFreeColormap(display, colormap); // -> kill colormap + XSync(display,False); // -> sync events + +#ifndef NOVMODE + if(bModeChanged) // -> repair screen mode + { + int myscreen=DefaultScreen(display); + XF86VidModeSwitchToMode(display,myscreen, // --> switch mode back + modes[iOldMode]); + XF86VidModeSetViewPort(display,myscreen,0,0); // --> set viewport upperleft + free(modes); // --> finally kill mode infos + bModeChanged=0; // --> done + } +#endif + + XCloseDisplay(display); // -> close display + } +} + +//////////////////////////////////////////////////////////////////////// + +void sysdep_create_display(void) // create display +{ + XSetWindowAttributes winattr;float fxgamma=2; + int myscreen;char gammastr[14]; + Screen * screen;XEvent event; + XSizeHints hints;XWMHints wm_hints; + MotifWmHints mwmhints;Atom mwmatom;Atom delwindow; + char *glxfx; + + glxfx=getenv("MESA_GLX_FX"); // 3dfx mesa fullscreen flag + if(glxfx) + { + if(glxfx[0]=='f') // -> yup, fullscreen needed + { + fx=1; // -> raise flag + putenv("FX_GLIDE_NO_SPLASH="); + sprintf(gammastr,"SST_GAMMA=%2.1f",fxgamma); // -> set gamma + putenv(gammastr); + } + } + + display=XOpenDisplay(NULL); // open display + if(!display) // no display? + { + fprintf (stderr,"Failed to open display!!!\n"); + osd_close_display(); + return; // -> bye + } + + myscreen=DefaultScreen(display); // get screen id + +#ifdef NOVMODE + if(bFullScreen) {fx=1;bModeChanged=0;} +#else + if(bFullScreen) + { + XF86VidModeModeLine mode; + int nmodes,iC; + fx=1; // raise flag + XF86VidModeGetModeLine(display,myscreen,&iC,&mode); // get actual mode info + if(mode.privsize) XFree(mode.private); // no need for private stuff + bModeChanged=0; // init mode change flag + if(iResX!=mode.hdisplay || iResY!=mode.vdisplay) // wanted mode is different? + { + XF86VidModeGetAllModeLines(display,myscreen, // -> enum all mode infos + &nmodes,&modes); + if(modes) // -> infos got? + { + for(iC=0;iC loop modes + { + if(mode.hdisplay==modes[iC]->hdisplay && // -> act mode found? + mode.vdisplay==modes[iC]->vdisplay) // if yes: store mode id + iOldMode=iC; + + if(iResX==modes[iC]->hdisplay && // -> wanted mode found? + iResY==modes[iC]->vdisplay) + { + XF86VidModeSwitchToMode(display,myscreen, // --> switch to mode + modes[iC]); + XF86VidModeSetViewPort(display,myscreen,0,0); + bModeChanged=1; // --> raise flag for repairing mode on close + } + } + + if(bModeChanged==0) // -> no mode found? + { + free(modes); // --> free infos + printf("No proper fullscreen mode found!\n"); // --> some info output + } + } + } + } +#endif + + screen=DefaultScreenOfDisplay(display); + + if(iZBufferDepth) // visual (with or without zbuffer) + myvisual=glXChooseVisual(display,myscreen,dbdepat); + else myvisual=glXChooseVisual(display,myscreen,dbnodepat); + + if(!myvisual) // no visual? + { + fprintf(stderr,"Failed to obtain visual!!!\n"); // -> bye + osd_close_display(); + return; + } + + cx=glXCreateContext(display,myvisual,0,GL_TRUE); // create rendering context + + if(!cx) // no context? + { + fprintf(stderr,"Failed to create OpenGL context!!!\n"); + osd_close_display(); // -> bxe + return; + } + + // pffff... much work for a simple blank cursor... oh, well... + if(!bFullScreen) cursor=XCreateFontCursor(display,XC_trek); + else + { + Pixmap p1,p2;XImage * img; + XColor b,w;unsigned char * idata; + XGCValues GCv; + GC GCc; + + memset(&b,0,sizeof(XColor)); + memset(&w,0,sizeof(XColor)); + idata=(unsigned char *)malloc(8); + memset(idata,0,8); + + p1=XCreatePixmap(display,RootWindow(display,myvisual->screen),8,8,1); + p2=XCreatePixmap(display,RootWindow(display,myvisual->screen),8,8,1); + + img = XCreateImage(display,myvisual->visual, + 1,XYBitmap,0,idata,8,8,8,1); + + GCv.function = GXcopy; + GCv.foreground = ~0; + GCv.background = 0; + GCv.plane_mask = AllPlanes; + GCc = XCreateGC(display,p1, + (GCFunction|GCForeground|GCBackground|GCPlaneMask),&GCv); + + XPutImage(display, p1,GCc,img,0,0,0,0,8,8); + XPutImage(display, p2,GCc,img,0,0,0,0,8,8); + XFreeGC(display, GCc); + + cursor = XCreatePixmapCursor(display,p1,p2,&b,&w,0,0); + + XFreePixmap(display,p1); + XFreePixmap(display,p2); + XDestroyImage(img); // will free idata as well + } + + colormap=XCreateColormap(display, // create colormap + RootWindow(display,myvisual->screen), + myvisual->visual,AllocNone); + + winattr.background_pixel=0; + winattr.border_pixel=WhitePixelOfScreen(screen); + winattr.bit_gravity=ForgetGravity; + winattr.win_gravity=NorthWestGravity; + winattr.backing_store=NotUseful; + winattr.override_redirect=False; + winattr.save_under=False; + winattr.event_mask=0; + winattr.do_not_propagate_mask=0; + winattr.colormap=colormap; + winattr.cursor=None; + + window=XCreateWindow(display, // create own window + RootWindow(display,DefaultScreen(display)), + 0,0,iResX,iResY, + 0,myvisual->depth, + InputOutput,myvisual->visual, + CWBorderPixel | CWBackPixel | + CWEventMask | CWDontPropagate | + CWColormap | CWCursor, + &winattr); + + if(!window) // no window? + { + fprintf(stderr,"Failed in XCreateWindow()!!!\n"); + osd_close_display(); // -> bye + return; + } + + delwindow = XInternAtom(display,"WM_DELETE_WINDOW",0); + XSetWMProtocols(display, window, &delwindow, 1); + + hints.flags=PMinSize|PMaxSize; // hints + if(fx) hints.flags|=USPosition|USSize; + else hints.flags|=PSize; + + hints.min_width = hints.max_width = hints.base_width = iResX; + hints.min_height = hints.max_height = hints.base_height = iResY; + + wm_hints.input=1; + wm_hints.flags=InputHint; + + XSetWMHints(display,window,&wm_hints); + XSetWMNormalHints(display,window,&hints); + if(pCaptionText) // caption + XStoreName(display,window,pCaptionText); + else XStoreName(display,window,"Pete MesaGL PSX Gpu"); + + XDefineCursor(display,window,cursor); // cursor + + if(fx) // window title bar hack + { + mwmhints.flags=MWM_HINTS_DECORATIONS; + mwmhints.decorations=0; + mwmatom=XInternAtom(display,"_MOTIF_WM_HINTS",0); + XChangeProperty(display,window,mwmatom,mwmatom,32, + PropModeReplace,(unsigned char *)&mwmhints,4); + } + + XSelectInput(display,window, // input setup + FocusChangeMask | ExposureMask | + KeyPressMask | KeyReleaseMask); + + XMapRaised(display,window); + XClearWindow(display,window); + XWindowEvent(display,window,ExposureMask,&event); + glXMakeCurrent(display,window,cx); + +/* + printf(glGetString(GL_VENDOR)); + printf("\n"); + printf(glGetString(GL_RENDERER)); + printf("\n"); +*/ + + if (fx) // after make current: fullscreen resize + { + XResizeWindow(display,window,screen->width,screen->height); + hints.min_width = hints.max_width = hints.base_width = screen->width; + hints.min_height= hints.max_height = hints.base_height = screen->height; + XSetWMNormalHints(display,window,&hints); + + // set the window layer for GNOME + { + XEvent xev; + + memset(&xev, 0, sizeof(xev)); + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = 1; + xev.xclient.message_type = XInternAtom(display, "_NET_WM_STATE", 0); + xev.xclient.window = window; + xev.xclient.format = 32; + xev.xclient.data.l[0] = 1; + xev.xclient.data.l[1] = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", 0); + xev.xclient.data.l[2] = 0; + xev.xclient.data.l[3] = 0; + xev.xclient.data.l[4] = 0; + + XSendEvent(display, RootWindow(display, DefaultScreen(display)), 0, + SubstructureRedirectMask | SubstructureNotifyMask, &xev); + } + } +} + +//////////////////////////////////////////////////////////////////////// + +long GPUopen(unsigned long * disp,char * CapText,char * CfgFile) +{ + pCaptionText=CapText; + pConfigFile=CfgFile; + + ReadConfig(); // read text file for config + + SetFrameRateConfig(); // setup frame rate stuff + + bIsFirstFrame = TRUE; // we have to init later (well, no really... in Linux we do all in GPUopen) + + sysdep_create_display(); // create display + + InitializeTextureStore(); // init texture mem + + rRatioRect.left = rRatioRect.top=0; + rRatioRect.right = iResX; + rRatioRect.bottom = iResY; + + GLinitialize(); // init opengl + + if(disp) + { + *disp=(unsigned long *)display; // return display ID to main emu + } + + if(display) return 0; + return -1; +} + +//////////////////////////////////////////////////////////////////////// +// close +//////////////////////////////////////////////////////////////////////// + +long GPUclose() // LINUX CLOSE +{ + GLcleanup(); // close OGL + + if(pGfxCardScreen) free(pGfxCardScreen); // free helper memory + pGfxCardScreen=0; + + osd_close_display(); // destroy display + + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// I shot the sheriff... last function called from emu +//////////////////////////////////////////////////////////////////////// + +long CALLBACK GPUshutdown() +{ + if(psxVSecure) free(psxVSecure); // kill emulated vram memory + psxVSecure=0; + + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// paint it black: simple func to clean up optical border garbage +//////////////////////////////////////////////////////////////////////// + +void PaintBlackBorders(void) +{ + short s; + + glDisable(GL_SCISSOR_TEST); + if(bTexEnabled) {glDisable(GL_TEXTURE_2D);bTexEnabled=FALSE;} + if(bOldSmoothShaded) {glShadeModel(GL_FLAT);bOldSmoothShaded=FALSE;} + if(bBlendEnable) {glDisable(GL_BLEND);bBlendEnable=FALSE;} + glDisable(GL_ALPHA_TEST); + + glBegin(GL_QUADS); + + vertex[0].c.lcol=0xff000000; + SETCOL(vertex[0]); + + if(PreviousPSXDisplay.Range.x0) + { + s=PreviousPSXDisplay.Range.x0+1; + glVertex3f(0,0,0.99996f); + glVertex3f(0,PSXDisplay.DisplayMode.y,0.99996f); + glVertex3f(s,PSXDisplay.DisplayMode.y,0.99996f); + glVertex3f(s,0,0.99996f); + + s+=PreviousPSXDisplay.Range.x1-2; + + glVertex3f(s,0,0.99996f); + glVertex3f(s,PSXDisplay.DisplayMode.y,0.99996f); + glVertex3f(PSXDisplay.DisplayMode.x,PSXDisplay.DisplayMode.y,0.99996f); + glVertex3f(PSXDisplay.DisplayMode.x,0,0.99996f); + } + + if(PreviousPSXDisplay.Range.y0) + { + s=PreviousPSXDisplay.Range.y0+1; + glVertex3f(0,0,0.99996f); + glVertex3f(0,s,0.99996f); + glVertex3f(PSXDisplay.DisplayMode.x,s,0.99996f); + glVertex3f(PSXDisplay.DisplayMode.x,0,0.99996f); + } + + glEnd(); + + glEnable(GL_ALPHA_TEST); + glEnable(GL_SCISSOR_TEST); +} + +//////////////////////////////////////////////////////////////////////// +// helper to draw scanlines +//////////////////////////////////////////////////////////////////////// + +__inline void XPRIMdrawTexturedQuad(OGLVertex* vertex1, OGLVertex* vertex2, + OGLVertex* vertex3, OGLVertex* vertex4) +{ + + glBegin(GL_QUAD_STRIP); + glTexCoord2fv(&vertex1->sow); + glVertex3fv(&vertex1->x); + + glTexCoord2fv(&vertex2->sow); + glVertex3fv(&vertex2->x); + + glTexCoord2fv(&vertex4->sow); + glVertex3fv(&vertex4->x); + + glTexCoord2fv(&vertex3->sow); + glVertex3fv(&vertex3->x); + glEnd(); +} + +//////////////////////////////////////////////////////////////////////// +// scanlines +//////////////////////////////////////////////////////////////////////// + +void SetScanLines(void) +{ + glLoadIdentity(); + glOrtho(0,iResX,iResY, 0, -1, 1); + + if(bKeepRatio) + glViewport(0,0,iResX,iResY); + + glDisable(GL_SCISSOR_TEST); + glDisable(GL_ALPHA_TEST); + if(bOldSmoothShaded) {glShadeModel(GL_FLAT);bOldSmoothShaded=FALSE;} + + if(iScanBlend<0) // special texture mask scanline mode + { + if(!bTexEnabled) {glEnable(GL_TEXTURE_2D);bTexEnabled=TRUE;} + gTexName=gTexScanName; + glBindTexture(GL_TEXTURE_2D, gTexName); + if(bGLBlend) glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + if(!bBlendEnable) {glEnable(GL_BLEND);bBlendEnable=TRUE;} + SetScanTexTrans(); + + vertex[0].x=0; + vertex[0].y=iResY; + vertex[0].z=0.99996f; + + vertex[1].x=iResX; + vertex[1].y=iResY; + vertex[1].z=0.99996f; + + vertex[2].x=iResX; + vertex[2].y=0; + vertex[2].z=0.99996f; + + vertex[3].x=0; + vertex[3].y=0; + vertex[3].z=0.99996f; + + vertex[0].sow=0; + vertex[0].tow=0; + vertex[1].sow=(float)iResX/4.0f; + vertex[1].tow=0; + vertex[2].sow=vertex[1].sow; + vertex[2].tow=(float)iResY/4.0f; + vertex[3].sow=0; + vertex[3].tow=vertex[2].tow; + + vertex[0].c.lcol=0xffffffff; + SETCOL(vertex[0]); + + XPRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + + if(bGLBlend) glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, COMBINE_EXT); + } + else // typical line mode + { + if(bTexEnabled) {glDisable(GL_TEXTURE_2D);bTexEnabled=FALSE;} + + if(iScanBlend==0) + { + if(bBlendEnable) {glDisable(GL_BLEND);bBlendEnable=FALSE;} + vertex[0].c.lcol=0xff000000; + } + else + { + if(!bBlendEnable) {glEnable(GL_BLEND);bBlendEnable=TRUE;} + SetScanTrans(); + vertex[0].c.lcol=iScanBlend<<24; + } + + SETCOL(vertex[0]); + + glCallList(uiScanLine); + } + + glLoadIdentity(); + glOrtho(0,PSXDisplay.DisplayMode.x, + PSXDisplay.DisplayMode.y, 0, -1, 1); + + if(bKeepRatio) + glViewport(rRatioRect.left, + iResY-(rRatioRect.top+rRatioRect.bottom), + rRatioRect.right, + rRatioRect.bottom); // init viewport + + glEnable(GL_ALPHA_TEST); + glEnable(GL_SCISSOR_TEST); +} + +//////////////////////////////////////////////////////////////////////// +// blur, babe, blur (heavy performance hit for a so-so fullscreen effect) +//////////////////////////////////////////////////////////////////////// + +void BlurBackBuffer(void) +{ + if(!gTexBlurName) return; + + if(bKeepRatio) glViewport(0,0,iResX,iResY); + + glDisable(GL_SCISSOR_TEST); + glDisable(GL_ALPHA_TEST); + if(bOldSmoothShaded) {glShadeModel(GL_FLAT);bOldSmoothShaded=FALSE;} + if(bBlendEnable) {glDisable(GL_BLEND);bBlendEnable=FALSE;} + if(!bTexEnabled) {glEnable(GL_TEXTURE_2D);bTexEnabled=TRUE;} + if(iZBufferDepth) glDisable(GL_DEPTH_TEST); + if(bDrawDither) glDisable(GL_DITHER); + + gTexName=gTexBlurName; + glBindTexture(GL_TEXTURE_2D, gTexName); + + glCopyTexSubImage2D( GL_TEXTURE_2D, 0, // get back buffer in texture + 0, + 0, + 0, + 0, + iResX,iResY); + + vertex[0].x=0; + vertex[0].y=PSXDisplay.DisplayMode.y; + vertex[1].x=PSXDisplay.DisplayMode.x; + vertex[1].y=PSXDisplay.DisplayMode.y; + vertex[2].x=PSXDisplay.DisplayMode.x; + vertex[2].y=0; + vertex[3].x=0; + vertex[3].y=0; + vertex[0].sow=0; + vertex[0].tow=0; + +#ifdef OWNSCALE + vertex[1].sow=((GLfloat)iFTexA)/256.0f; + vertex[2].tow=((GLfloat)iFTexB)/256.0f; +#else + vertex[1].sow=iFTexA; + vertex[2].tow=iFTexB; +#endif + vertex[1].tow=0; + vertex[2].sow=vertex[1].sow; + vertex[3].sow=0; + vertex[3].tow=vertex[2].tow; + + if(bGLBlend) glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + vertex[0].c.lcol=0x7fffffff; + SETCOL(vertex[0]); + + DrawMultiBlur(); // draw the backbuffer texture to create blur effect + + glEnable(GL_ALPHA_TEST); + glEnable(GL_SCISSOR_TEST); + if(iZBufferDepth) glEnable(GL_DEPTH_TEST); + if(bDrawDither) glEnable(GL_DITHER); + if(bGLBlend) glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, COMBINE_EXT); + + if(bKeepRatio) + glViewport(rRatioRect.left, // re-init viewport + iResY-(rRatioRect.top+rRatioRect.bottom), + rRatioRect.right, + rRatioRect.bottom); +} + +//////////////////////////////////////////////////////////////////////// +// "unblur" repairs the backbuffer after a blur + +void UnBlurBackBuffer(void) +{ + if(!gTexBlurName) return; + + if(bKeepRatio) glViewport(0,0,iResX,iResY); + + glDisable(GL_SCISSOR_TEST); + glDisable(GL_ALPHA_TEST); + if(bBlendEnable) {glDisable(GL_BLEND);bBlendEnable=FALSE;} + if(!bTexEnabled) {glEnable(GL_TEXTURE_2D);bTexEnabled=TRUE;} + if(iZBufferDepth) glDisable(GL_DEPTH_TEST); + if(bDrawDither) glDisable(GL_DITHER); + + gTexName=gTexBlurName; + glBindTexture(GL_TEXTURE_2D, gTexName); + + vertex[0].x=0; + vertex[0].y=PSXDisplay.DisplayMode.y; + vertex[1].x=PSXDisplay.DisplayMode.x; + vertex[1].y=PSXDisplay.DisplayMode.y; + vertex[2].x=PSXDisplay.DisplayMode.x; + vertex[2].y=0; + vertex[3].x=0; + vertex[3].y=0; + vertex[0].sow=0; + vertex[0].tow=0; +#ifdef OWNSCALE + vertex[1].sow=((GLfloat)iFTexA)/256.0f; + vertex[2].tow=((GLfloat)iFTexB)/256.0f; +#else + vertex[1].sow=iFTexA; + vertex[2].tow=iFTexB; +#endif + vertex[1].tow=0; + vertex[2].sow=vertex[1].sow; + vertex[3].sow=0; + vertex[3].tow=vertex[2].tow; + if(bGLBlend) glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + vertex[0].c.lcol=0xffffffff; + SETCOL(vertex[0]); + + // simply draw the backbuffer texture (without blur) + XPRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + + glEnable(GL_ALPHA_TEST); + glEnable(GL_SCISSOR_TEST); + if(iZBufferDepth) glEnable(GL_DEPTH_TEST); + if(bDrawDither) glEnable(GL_DITHER); // dither mode + if(bGLBlend) glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, COMBINE_EXT); + + if(bKeepRatio) + glViewport(rRatioRect.left, + iResY-(rRatioRect.top+rRatioRect.bottom), + rRatioRect.right, + rRatioRect.bottom); // init viewport +} + +//////////////////////////////////////////////////////////////////////// +// Update display (swap buffers)... called in interlaced mode on +// every emulated vsync, otherwise whenever the displayed screen region +// has been changed +//////////////////////////////////////////////////////////////////////// + +int iLastRGB24=0; // special vars for checking when to skip two display updates +int iSkipTwo=0; + +void updateDisplay(void) // UPDATE DISPLAY +{ + BOOL bBlur=FALSE; + + bFakeFrontBuffer=FALSE; + bRenderFrontBuffer=FALSE; + + if(iRenderFVR) // frame buffer read fix mode still active? + { + iRenderFVR--; // -> if some frames in a row without read access: turn off mode + if(!iRenderFVR) bFullVRam=FALSE; + } + + if(iLastRGB24 && iLastRGB24!=PSXDisplay.RGB24+1) // (mdec) garbage check + { + iSkipTwo=2; // -> skip two frames to avoid garbage if color mode changes + } + iLastRGB24=0; + + if(PSXDisplay.RGB24)// && !bNeedUploadAfter) // (mdec) upload wanted? + { + PrepareFullScreenUpload(-1); + UploadScreen(PSXDisplay.Interlaced); // -> upload whole screen from psx vram + bNeedUploadTest=FALSE; + bNeedInterlaceUpdate=FALSE; + bNeedUploadAfter=FALSE; + bNeedRGB24Update=FALSE; + } + else + if(bNeedInterlaceUpdate) // smaller upload? + { + bNeedInterlaceUpdate=FALSE; + xrUploadArea=xrUploadAreaIL; // -> upload this rect + UploadScreen(TRUE); + } + + if(dwActFixes&512) bCheckFF9G4(NULL); // special game fix for FF9 + + if(PreviousPSXDisplay.Range.x0|| // paint black borders around display area, if needed + PreviousPSXDisplay.Range.y0) + PaintBlackBorders(); + + if(PSXDisplay.Disabled) // display disabled? + { + // moved here + glDisable(GL_SCISSOR_TEST); + glClearColor(0,0,0,128); // -> clear whole backbuffer + glClear(uiBufferBits); + glEnable(GL_SCISSOR_TEST); + gl_z=0.0f; + bDisplayNotSet = TRUE; + } + + if(iSkipTwo) // we are in skipping mood? + { + iSkipTwo--; + iDrawnSomething=0; // -> simply lie about something drawn + } + + if(iBlurBuffer && !bSkipNextFrame) // "blur display" activated? + {BlurBackBuffer();bBlur=TRUE;} // -> blur it + + if(iUseScanLines) SetScanLines(); // "scan lines" activated? do it + + if(usCursorActive) ShowGunCursor(); // "gun cursor" wanted? show 'em + + if(dwActFixes&128) // special FPS limitation mode? + { + if(bUseFrameLimit) PCFrameCap(); // -> ok, do it + if(bUseFrameSkip || ulKeybits&KEY_SHOWFPS) + PCcalcfps(); + } + + if(gTexPicName) DisplayPic(); // some gpu info picture active? display it + + if(bSnapShot) DoSnapShot(); // snapshot key pressed? cheeeese :) + + if(ulKeybits&KEY_SHOWFPS) // wanna see FPS? + { + sprintf(szDispBuf,"%06.1f",fps_cur); + DisplayText(); // -> show it + } + + //----------------------------------------------------// + // main buffer swapping (well, or skip it) + + if(bUseFrameSkip) // frame skipping active ? + { + if(!bSkipNextFrame) + { + if(iDrawnSomething) + glXSwapBuffers(display,window); + } + if(dwActFixes&0x180) // -> special old frame skipping: skip max one in a row + { + if((fps_skip < fFrameRateHz) && !(bSkipNextFrame)) + {bSkipNextFrame = TRUE; fps_skip=fFrameRateHz;} + else bSkipNextFrame = FALSE; + } + else FrameSkip(); + } + else // no skip ? + { + if(iDrawnSomething) + glXSwapBuffers(display,window); + } + + iDrawnSomething=0; + + //----------------------------------------------------// + + if(lClearOnSwap) // clear buffer after swap? + { + GLclampf g,b,r; + + if(bDisplayNotSet) // -> set new vals + SetOGLDisplaySettings(1); + + g=((GLclampf)GREEN(lClearOnSwapColor))/255.0f; // -> get col + b=((GLclampf)BLUE(lClearOnSwapColor))/255.0f; + r=((GLclampf)RED(lClearOnSwapColor))/255.0f; + + glDisable(GL_SCISSOR_TEST); + glClearColor(r,g,b,128); // -> clear + glClear(uiBufferBits); + glEnable(GL_SCISSOR_TEST); + lClearOnSwap=0; // -> done + } + else + { + if(bBlur) UnBlurBackBuffer(); // unblur buff, if blurred before + + if(iZBufferDepth) // clear zbuffer as well (if activated) + { + glDisable(GL_SCISSOR_TEST); + glClear(GL_DEPTH_BUFFER_BIT); + glEnable(GL_SCISSOR_TEST); + } + } + gl_z=0.0f; + + //----------------------------------------------------// + // additional uploads immediatly after swapping + + if(bNeedUploadAfter) // upload wanted? + { + bNeedUploadAfter=FALSE; + bNeedUploadTest=FALSE; + UploadScreen(-1); // -> upload + } + + if(bNeedUploadTest) + { + bNeedUploadTest=FALSE; + if(PSXDisplay.InterlacedTest && + //iOffscreenDrawing>2 && + PreviousPSXDisplay.DisplayPosition.x==PSXDisplay.DisplayPosition.x && + PreviousPSXDisplay.DisplayEnd.x==PSXDisplay.DisplayEnd.x && + PreviousPSXDisplay.DisplayPosition.y==PSXDisplay.DisplayPosition.y && + PreviousPSXDisplay.DisplayEnd.y==PSXDisplay.DisplayEnd.y) + { + PrepareFullScreenUpload(TRUE); + UploadScreen(TRUE); + } + } + + //----------------------------------------------------// + // rumbling (main emu pad effect) + + if(iRumbleTime) // shake screen by modifying view port + { + int i1=0,i2=0,i3=0,i4=0; + + iRumbleTime--; + if(iRumbleTime) + { + i1=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + i2=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + i3=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + i4=((rand()*iRumbleVal)/RAND_MAX)-(iRumbleVal/2); + } + + glViewport(rRatioRect.left+i1, + iResY-(rRatioRect.top+rRatioRect.bottom)+i2, + rRatioRect.right+i3, + rRatioRect.bottom+i4); + } + + if(ulKeybits&KEY_RESETTEXSTORE) ResetStuff(); // reset on gpu mode changes? do it before next frame is filled +} + +//////////////////////////////////////////////////////////////////////// +// update front display: smaller update func, if something has changed +// in the frontbuffer... dirty, but hey... real men know no pain +//////////////////////////////////////////////////////////////////////// + +void updateFrontDisplay(void) +{ + if(PreviousPSXDisplay.Range.x0|| + PreviousPSXDisplay.Range.y0) + PaintBlackBorders(); + + if(iBlurBuffer) BlurBackBuffer(); + + if(iUseScanLines) SetScanLines(); + + if(usCursorActive) ShowGunCursor(); + + bFakeFrontBuffer=FALSE; + bRenderFrontBuffer=FALSE; + + if(gTexPicName) DisplayPic(); + if(ulKeybits&KEY_SHOWFPS) DisplayText(); + + if(iDrawnSomething) // linux: + glXSwapBuffers(display,window); + + if(iBlurBuffer) UnBlurBackBuffer(); +} + +//////////////////////////////////////////////////////////////////////// +// check if update needed +//////////////////////////////////////////////////////////////////////// + +void ChangeDispOffsetsX(void) // CENTER X +{ + int lx,l;short sO; + + if(!PSXDisplay.Range.x1) return; // some range given? + + l=PSXDisplay.DisplayMode.x; + + l*=(int)PSXDisplay.Range.x1; // some funky calculation + l/=2560;lx=l;l&=0xfffffff8; + + if(l==PreviousPSXDisplay.Range.x1) return; // some change? + + sO=PreviousPSXDisplay.Range.x0; // store old + + if(lx>=PSXDisplay.DisplayMode.x) // range bigger? + { + PreviousPSXDisplay.Range.x1= // -> take display width + PSXDisplay.DisplayMode.x; + PreviousPSXDisplay.Range.x0=0; // -> start pos is 0 + } + else // range smaller? center it + { + PreviousPSXDisplay.Range.x1=l; // -> store width (8 pixel aligned) + PreviousPSXDisplay.Range.x0= // -> calc start pos + (PSXDisplay.Range.x0-500)/8; + if(PreviousPSXDisplay.Range.x0<0) // -> we don't support neg. values yet + PreviousPSXDisplay.Range.x0=0; + + if((PreviousPSXDisplay.Range.x0+lx)> // -> uhuu... that's too much + PSXDisplay.DisplayMode.x) + { + PreviousPSXDisplay.Range.x0= // -> adjust start + PSXDisplay.DisplayMode.x-lx; + PreviousPSXDisplay.Range.x1+=lx-l; // -> adjust width + } + } + + if(sO!=PreviousPSXDisplay.Range.x0) // something changed? + { + bDisplayNotSet=TRUE; // -> recalc display stuff + } +} + +//////////////////////////////////////////////////////////////////////// + +void ChangeDispOffsetsY(void) // CENTER Y +{ + int iT;short sO; // store previous y size + + if(PSXDisplay.PAL) iT=48; else iT=28; // different offsets on PAL/NTSC + + if(PSXDisplay.Range.y0>=iT) // crossed the security line? :) + { + PreviousPSXDisplay.Range.y1= // -> store width + PSXDisplay.DisplayModeNew.y; + + sO=(PSXDisplay.Range.y0-iT-4)*PSXDisplay.Double; // -> calc offset + if(sO<0) sO=0; + + PSXDisplay.DisplayModeNew.y+=sO; // -> add offset to y size, too + } + else sO=0; // else no offset + + if(sO!=PreviousPSXDisplay.Range.y0) // something changed? + { + PreviousPSXDisplay.Range.y0=sO; + bDisplayNotSet=TRUE; // -> recalc display stuff + } +} + +//////////////////////////////////////////////////////////////////////// +// Aspect ratio of ogl screen: simply adjusting ogl view port +//////////////////////////////////////////////////////////////////////// + +void SetAspectRatio(void) +{ + float xs,ys,s;RECT r; + + if(!PSXDisplay.DisplayModeNew.x) return; + if(!PSXDisplay.DisplayModeNew.y) return; + + xs=(float)iResX/(float)PSXDisplay.DisplayModeNew.x; + ys=(float)iResY/(float)PSXDisplay.DisplayModeNew.y; + + s=min(xs,ys); + r.right =(int)((float)PSXDisplay.DisplayModeNew.x*s); + r.bottom=(int)((float)PSXDisplay.DisplayModeNew.y*s); + if(r.right > iResX) r.right = iResX; + if(r.bottom > iResY) r.bottom = iResY; + if(r.right < 1) r.right = 1; + if(r.bottom < 1) r.bottom = 1; + + r.left = (iResX-r.right)/2; + r.top = (iResY-r.bottom)/2; + + if(r.bottom new psx resolution + PSXDisplay.DisplayModeNew.y, 0, -1, 1); + if(bKeepRatio) SetAspectRatio(); + } + + bDisplayNotSet = TRUE; // re-calc offsets/display area + + bUp=FALSE; + if(PSXDisplay.RGB24!=PSXDisplay.RGB24New) // clean up textures, if rgb mode change (usually mdec on/off) + { + PreviousPSXDisplay.RGB24=0; // no full 24 frame uploaded yet + ResetTextureArea(FALSE); + bUp=TRUE; + } + + PSXDisplay.RGB24 = PSXDisplay.RGB24New; // get new infos + PSXDisplay.DisplayMode.y = PSXDisplay.DisplayModeNew.y; + PSXDisplay.DisplayMode.x = PSXDisplay.DisplayModeNew.x; + PSXDisplay.Interlaced = PSXDisplay.InterlacedNew; + + PSXDisplay.DisplayEnd.x= // calc new ends + PSXDisplay.DisplayPosition.x+ PSXDisplay.DisplayMode.x; + PSXDisplay.DisplayEnd.y= + PSXDisplay.DisplayPosition.y+ PSXDisplay.DisplayMode.y+PreviousPSXDisplay.DisplayModeNew.y; + PreviousPSXDisplay.DisplayEnd.x= + PreviousPSXDisplay.DisplayPosition.x+ PSXDisplay.DisplayMode.x; + PreviousPSXDisplay.DisplayEnd.y= + PreviousPSXDisplay.DisplayPosition.y+ PSXDisplay.DisplayMode.y+PreviousPSXDisplay.DisplayModeNew.y; + + ChangeDispOffsetsX(); + + if(iFrameLimit==2) SetAutoFrameCap(); // set new fps limit vals (depends on interlace) + + if(bUp) updateDisplay(); // yeah, real update (swap buffer) +} + +//////////////////////////////////////////////////////////////////////// +// swap update check (called by psx vsync function) +//////////////////////////////////////////////////////////////////////// + +BOOL bSwapCheck(void) +{ + static int iPosCheck=0; + static PSXPoint_t pO; + static PSXPoint_t pD; + static int iDoAgain=0; + + if(PSXDisplay.DisplayPosition.x==pO.x && + PSXDisplay.DisplayPosition.y==pO.y && + PSXDisplay.DisplayEnd.x==pD.x && + PSXDisplay.DisplayEnd.y==pD.y) + iPosCheck++; + else iPosCheck=0; + + pO=PSXDisplay.DisplayPosition; + pD=PSXDisplay.DisplayEnd; + + if(iPosCheck<=4) return FALSE; + + iPosCheck=4; + + if(PSXDisplay.Interlaced) return FALSE; + + if (bNeedInterlaceUpdate|| + bNeedRGB24Update || + bNeedUploadAfter|| + bNeedUploadTest || + iDoAgain + ) + { + iDoAgain=0; + if(bNeedUploadAfter) + iDoAgain=1; + if(bNeedUploadTest && PSXDisplay.InterlacedTest) + iDoAgain=1; + + bDisplayNotSet = TRUE; + updateDisplay(); + + PreviousPSXDisplay.DisplayPosition.x=PSXDisplay.DisplayPosition.x; + PreviousPSXDisplay.DisplayPosition.y=PSXDisplay.DisplayPosition.y; + PreviousPSXDisplay.DisplayEnd.x=PSXDisplay.DisplayEnd.x; + PreviousPSXDisplay.DisplayEnd.y=PSXDisplay.DisplayEnd.y; + pO=PSXDisplay.DisplayPosition; + pD=PSXDisplay.DisplayEnd; + + return TRUE; + } + + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// +// gun cursor func: player=0-7, x=0-511, y=0-255 +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUcursor(int iPlayer,int x,int y) +{ + if(iPlayer<0) return; + if(iPlayer>7) return; + + usCursorActive|=(1<iGPUHeightMask) x=iGPUHeightMask; + if(y<0) y=0; + if(y>255) y=255; + + ptCursorPoint[iPlayer].x=x; + ptCursorPoint[iPlayer].y=y; +} + +//////////////////////////////////////////////////////////////////////// +// update lace is called every VSync. Basically we limit frame rate +// here, and in interlaced mode we swap ogl display buffers. +//////////////////////////////////////////////////////////////////////// + +static unsigned short usFirstPos=2; + +void CALLBACK GPUupdateLace(void) +{ + if(!(dwActFixes&0x1000)) + STATUSREG^=0x80000000; // interlaced bit toggle, if the CC game fix is not active (see gpuReadStatus) + + if(!(dwActFixes&128)) // normal frame limit func + CheckFrameRate(); + + if(iOffscreenDrawing==4) // special check if high offscreen drawing is on + { + if(bSwapCheck()) return; + } + + if(PSXDisplay.Interlaced) // interlaced mode? + { + if(PSXDisplay.DisplayMode.x>0 && PSXDisplay.DisplayMode.y>0) + { + updateDisplay(); // -> swap buffers (new frame) + } + } + else if(bRenderFrontBuffer) // no interlace mode? and some stuff in front has changed? + { + updateFrontDisplay(); // -> update front buffer + } + else if(usFirstPos==1) // initial updates (after startup) + { + updateDisplay(); + } +} + +//////////////////////////////////////////////////////////////////////// +// process read request from GPU status register +//////////////////////////////////////////////////////////////////////// + +uint32_t CALLBACK GPUreadStatus(void) +{ + if(dwActFixes&0x1000) // CC game fix + { + static int iNumRead=0; + if((iNumRead++)==2) + { + iNumRead=0; + STATUSREG^=0x80000000; // interlaced bit toggle... we do it on every second read status... needed by some games (like ChronoCross) + } + } + + if(iFakePrimBusy) // 27.10.2007 - emulating some 'busy' while drawing... pfff... not perfect, but since our emulated dma is not done in an extra thread... + { + iFakePrimBusy--; + + if(iFakePrimBusy&1) // we do a busy-idle-busy-idle sequence after/while drawing prims + { + GPUIsBusy; + GPUIsNotReadyForCommands; + } + else + { + GPUIsIdle; + GPUIsReadyForCommands; + } + } + + return STATUSREG; +} + +//////////////////////////////////////////////////////////////////////// +// processes data send to GPU status register +// these are always single packet commands. +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUwriteStatus(uint32_t gdata) +{ + uint32_t lCommand=(gdata>>24)&0xff; + + ulStatusControl[lCommand]=gdata; + + switch(lCommand) + { + //--------------------------------------------------// + // reset gpu + case 0x00: + memset(ulGPUInfoVals, 0x00, 16 * sizeof(uint32_t)); + lGPUstatusRet = 0x14802000; + PSXDisplay.Disabled=1; + iDataWriteMode=iDataReadMode=DR_NORMAL; + PSXDisplay.DrawOffset.x=PSXDisplay.DrawOffset.y=0; + drawX=drawY=0;drawW=drawH=0; + sSetMask=0;lSetMask=0;bCheckMask=FALSE;iSetMask=0; + usMirror=0; + GlobalTextAddrX=0;GlobalTextAddrY=0; + GlobalTextTP=0;GlobalTextABR=0; + PSXDisplay.RGB24=FALSE; + PSXDisplay.Interlaced=FALSE; + bUsingTWin = FALSE; + return; + + // dis/enable display + case 0x03: + PreviousPSXDisplay.Disabled = PSXDisplay.Disabled; + PSXDisplay.Disabled = (gdata & 1); + + if(PSXDisplay.Disabled) + STATUSREG|=GPUSTATUS_DISPLAYDISABLED; + else STATUSREG&=~GPUSTATUS_DISPLAYDISABLED; + + if (iOffscreenDrawing==4 && + PreviousPSXDisplay.Disabled && + !(PSXDisplay.Disabled)) + { + + if(!PSXDisplay.RGB24) + { + PrepareFullScreenUpload(TRUE); + UploadScreen(TRUE); + updateDisplay(); + } + } + + return; + + // setting transfer mode + case 0x04: + gdata &= 0x03; // only want the lower two bits + + iDataWriteMode=iDataReadMode=DR_NORMAL; + if(gdata==0x02) iDataWriteMode=DR_VRAMTRANSFER; + if(gdata==0x03) iDataReadMode =DR_VRAMTRANSFER; + + STATUSREG&=~GPUSTATUS_DMABITS; // clear the current settings of the DMA bits + STATUSREG|=(gdata << 29); // set the DMA bits according to the received data + + return; + + // setting display position + case 0x05: + { + short sx=(short)(gdata & 0x3ff); + short sy; + + if(iGPUHeight==1024) + { + if(dwGPUVersion==2) + sy = (short)((gdata>>12)&0x3ff); + else sy = (short)((gdata>>10)&0x3ff); + } + else sy = (short)((gdata>>10)&0x3ff); // really: 0x1ff, but we adjust it later + + if (sy & 0x200) + { + sy|=0xfc00; + PreviousPSXDisplay.DisplayModeNew.y=sy/PSXDisplay.Double; + sy=0; + } + else PreviousPSXDisplay.DisplayModeNew.y=0; + + if(sx>1000) sx=0; + + if(usFirstPos) + { + usFirstPos--; + if(usFirstPos) + { + PreviousPSXDisplay.DisplayPosition.x = sx; + PreviousPSXDisplay.DisplayPosition.y = sy; + PSXDisplay.DisplayPosition.x = sx; + PSXDisplay.DisplayPosition.y = sy; + } + } + + if(dwActFixes&8) + { + if((!PSXDisplay.Interlaced) && + PreviousPSXDisplay.DisplayPosition.x == sx && + PreviousPSXDisplay.DisplayPosition.y == sy) + return; + + PSXDisplay.DisplayPosition.x = PreviousPSXDisplay.DisplayPosition.x; + PSXDisplay.DisplayPosition.y = PreviousPSXDisplay.DisplayPosition.y; + PreviousPSXDisplay.DisplayPosition.x = sx; + PreviousPSXDisplay.DisplayPosition.y = sy; + } + else + { + if((!PSXDisplay.Interlaced) && + PSXDisplay.DisplayPosition.x == sx && + PSXDisplay.DisplayPosition.y == sy) + return; + PreviousPSXDisplay.DisplayPosition.x = PSXDisplay.DisplayPosition.x; + PreviousPSXDisplay.DisplayPosition.y = PSXDisplay.DisplayPosition.y; + PSXDisplay.DisplayPosition.x = sx; + PSXDisplay.DisplayPosition.y = sy; + } + + PSXDisplay.DisplayEnd.x= + PSXDisplay.DisplayPosition.x+ PSXDisplay.DisplayMode.x; + PSXDisplay.DisplayEnd.y= + PSXDisplay.DisplayPosition.y+ PSXDisplay.DisplayMode.y+PreviousPSXDisplay.DisplayModeNew.y; + + PreviousPSXDisplay.DisplayEnd.x= + PreviousPSXDisplay.DisplayPosition.x+ PSXDisplay.DisplayMode.x; + PreviousPSXDisplay.DisplayEnd.y= + PreviousPSXDisplay.DisplayPosition.y+ PSXDisplay.DisplayMode.y+PreviousPSXDisplay.DisplayModeNew.y; + + bDisplayNotSet = TRUE; + + if (!(PSXDisplay.Interlaced)) + { + updateDisplay(); + } + else + if(PSXDisplay.InterlacedTest && + ((PreviousPSXDisplay.DisplayPosition.x != PSXDisplay.DisplayPosition.x)|| + (PreviousPSXDisplay.DisplayPosition.y != PSXDisplay.DisplayPosition.y))) + PSXDisplay.InterlacedTest--; + + return; + } + + // setting width + case 0x06: + + PSXDisplay.Range.x0=gdata & 0x7ff; //0x3ff; + PSXDisplay.Range.x1=(gdata>>12) & 0xfff;//0x7ff; + + PSXDisplay.Range.x1-=PSXDisplay.Range.x0; + + ChangeDispOffsetsX(); + + return; + + // setting height + case 0x07: + + PreviousPSXDisplay.Height = PSXDisplay.Height; + + PSXDisplay.Range.y0=gdata & 0x3ff; + PSXDisplay.Range.y1=(gdata>>10) & 0x3ff; + + PSXDisplay.Height = PSXDisplay.Range.y1 - + PSXDisplay.Range.y0 + + PreviousPSXDisplay.DisplayModeNew.y; + + if (PreviousPSXDisplay.Height != PSXDisplay.Height) + { + PSXDisplay.DisplayModeNew.y=PSXDisplay.Height*PSXDisplay.Double; + ChangeDispOffsetsY(); + updateDisplayIfChanged(); + } + return; + + // setting display infos + case 0x08: + + PSXDisplay.DisplayModeNew.x = dispWidths[(gdata & 0x03) | ((gdata & 0x40) >> 4)]; + + if (gdata&0x04) PSXDisplay.Double=2; + else PSXDisplay.Double=1; + PSXDisplay.DisplayModeNew.y = PSXDisplay.Height*PSXDisplay.Double; + + ChangeDispOffsetsY(); + + PSXDisplay.PAL = (gdata & 0x08)?TRUE:FALSE; // if 1 - PAL mode, else NTSC + PSXDisplay.RGB24New = (gdata & 0x10)?TRUE:FALSE; // if 1 - TrueColor + PSXDisplay.InterlacedNew = (gdata & 0x20)?TRUE:FALSE; // if 1 - Interlace + + STATUSREG&=~GPUSTATUS_WIDTHBITS; // clear the width bits + + STATUSREG|= + (((gdata & 0x03) << 17) | + ((gdata & 0x40) << 10)); // set the width bits + + PreviousPSXDisplay.InterlacedNew=FALSE; + if (PSXDisplay.InterlacedNew) + { + if(!PSXDisplay.Interlaced) + { + PSXDisplay.InterlacedTest=2; + PreviousPSXDisplay.DisplayPosition.x = PSXDisplay.DisplayPosition.x; + PreviousPSXDisplay.DisplayPosition.y = PSXDisplay.DisplayPosition.y; + PreviousPSXDisplay.InterlacedNew=TRUE; + } + + STATUSREG|=GPUSTATUS_INTERLACED; + } + else + { + PSXDisplay.InterlacedTest=0; + STATUSREG&=~GPUSTATUS_INTERLACED; + } + + if (PSXDisplay.PAL) + STATUSREG|=GPUSTATUS_PAL; + else STATUSREG&=~GPUSTATUS_PAL; + + if (PSXDisplay.Double==2) + STATUSREG|=GPUSTATUS_DOUBLEHEIGHT; + else STATUSREG&=~GPUSTATUS_DOUBLEHEIGHT; + + if (PSXDisplay.RGB24New) + STATUSREG|=GPUSTATUS_RGB24; + else STATUSREG&=~GPUSTATUS_RGB24; + + updateDisplayIfChanged(); + + return; + + //--------------------------------------------------// + // ask about GPU version and other stuff + case 0x10: + + gdata&=0xff; + + switch(gdata) + { + case 0x02: + GPUdataRet=ulGPUInfoVals[INFO_TW]; // tw infos + return; + case 0x03: + GPUdataRet=ulGPUInfoVals[INFO_DRAWSTART]; // draw start + return; + case 0x04: + GPUdataRet=ulGPUInfoVals[INFO_DRAWEND]; // draw end + return; + case 0x05: + case 0x06: + GPUdataRet=ulGPUInfoVals[INFO_DRAWOFF]; // draw offset + return; + case 0x07: + if(dwGPUVersion==2) + GPUdataRet=0x01; + else GPUdataRet=0x02; // gpu type + return; + case 0x08: + case 0x0F: // some bios addr? + GPUdataRet=0xBFC03720; + return; + } + return; + //--------------------------------------------------// + } +} + +//////////////////////////////////////////////////////////////////////// +// vram read/write helpers +//////////////////////////////////////////////////////////////////////// + +BOOL bNeedWriteUpload=FALSE; + +__inline void FinishedVRAMWrite(void) +{ + if(bNeedWriteUpload) + { + bNeedWriteUpload=FALSE; + CheckWriteUpdate(); + } + + // set register to NORMAL operation + iDataWriteMode = DR_NORMAL; + + // reset transfer values, to prevent mis-transfer of data + VRAMWrite.ColsRemaining = 0; + VRAMWrite.RowsRemaining = 0; +} + +__inline void FinishedVRAMRead(void) +{ + // set register to NORMAL operation + iDataReadMode = DR_NORMAL; + // reset transfer values, to prevent mis-transfer of data + VRAMRead.x = 0; + VRAMRead.y = 0; + VRAMRead.Width = 0; + VRAMRead.Height = 0; + VRAMRead.ColsRemaining = 0; + VRAMRead.RowsRemaining = 0; + + // indicate GPU is no longer ready for VRAM data in the STATUS REGISTER + STATUSREG&=~GPUSTATUS_READYFORVRAM; +} + +//////////////////////////////////////////////////////////////////////// +// vram read check ex (reading from card's back/frontbuffer if needed... +// slow!) +//////////////////////////////////////////////////////////////////////// + +void CheckVRamReadEx(int x, int y, int dx, int dy) +{ + unsigned short sArea; + int ux,uy,udx,udy,wx,wy; + unsigned short * p1, *p2; + float XS,YS; + unsigned char * ps; + unsigned char * px; + unsigned short s,sx; + + if(STATUSREG&GPUSTATUS_RGB24) return; + + if(((dx > PSXDisplay.DisplayPosition.x) && + (x < PSXDisplay.DisplayEnd.x) && + (dy > PSXDisplay.DisplayPosition.y) && + (y < PSXDisplay.DisplayEnd.y))) + sArea=0; + else + if((!(PSXDisplay.InterlacedTest) && + (dx > PreviousPSXDisplay.DisplayPosition.x) && + (x < PreviousPSXDisplay.DisplayEnd.x) && + (dy > PreviousPSXDisplay.DisplayPosition.y) && + (y < PreviousPSXDisplay.DisplayEnd.y))) + sArea=1; + else + { + return; + } + + ////////////// + + if(iRenderFVR) + { + bFullVRam=TRUE;iRenderFVR=2;return; + } + bFullVRam=TRUE;iRenderFVR=2; + + ////////////// + + p2=0; + + if(sArea==0) + { + ux=PSXDisplay.DisplayPosition.x; + uy=PSXDisplay.DisplayPosition.y; + udx=PSXDisplay.DisplayEnd.x-ux; + udy=PSXDisplay.DisplayEnd.y-uy; + if((PreviousPSXDisplay.DisplayEnd.x- + PreviousPSXDisplay.DisplayPosition.x)==udx && + (PreviousPSXDisplay.DisplayEnd.y- + PreviousPSXDisplay.DisplayPosition.y)==udy) + p2=(psxVuw + (1024*PreviousPSXDisplay.DisplayPosition.y) + + PreviousPSXDisplay.DisplayPosition.x); + } + else + { + ux=PreviousPSXDisplay.DisplayPosition.x; + uy=PreviousPSXDisplay.DisplayPosition.y; + udx=PreviousPSXDisplay.DisplayEnd.x-ux; + udy=PreviousPSXDisplay.DisplayEnd.y-uy; + if((PSXDisplay.DisplayEnd.x- + PSXDisplay.DisplayPosition.x)==udx && + (PSXDisplay.DisplayEnd.y- + PSXDisplay.DisplayPosition.y)==udy) + p2=(psxVuw + (1024*PSXDisplay.DisplayPosition.y) + + PSXDisplay.DisplayPosition.x); + } + + p1=(psxVuw + (1024*uy) + ux); + if(p1==p2) p2=0; + + x=0;y=0; + wx=dx=udx;wy=dy=udy; + + if(udx<=0) return; + if(udy<=0) return; + if(dx<=0) return; + if(dy<=0) return; + if(wx<=0) return; + if(wy<=0) return; + + XS=(float)rRatioRect.right/(float)wx; + YS=(float)rRatioRect.bottom/(float)wy; + + dx=(int)((float)(dx)*XS); + dy=(int)((float)(dy)*YS); + + if(dx>iResX) dx=iResX; + if(dy>iResY) dy=iResY; + + if(dx<=0) return; + if(dy<=0) return; + + // ogl y adjust + y=iResY-y-dy; + + x+=rRatioRect.left; + y-=rRatioRect.top; + + if(y<0) y=0; if((y+dy)>iResY) dy=iResY-y; + + if(!pGfxCardScreen) + { + glPixelStorei(GL_PACK_ALIGNMENT,1); + pGfxCardScreen=(unsigned char *)malloc(iResX*iResY*4); + } + + ps=pGfxCardScreen; + + if(!sArea) glReadBuffer(GL_FRONT); + + glReadPixels(x,y,dx,dy,GL_RGB,GL_UNSIGNED_BYTE,ps); + + if(!sArea) glReadBuffer(GL_BACK); + + s=0; + + XS=(float)dx/(float)(udx); + YS=(float)dy/(float)(udy+1); + + for(y=udy;y>0;y--) + { + for(x=0;x=psxVuw && p1>3;px++; + s=sx; + sx=(*px)>>3;px++; + s|=sx<<5; + sx=(*px)>>3; + s|=sx<<10; + s&=~0x8000; + *p1=s; + } + if(p2>=psxVuw && p2 PSXDisplay.DisplayPosition.x) && + (x < PSXDisplay.DisplayEnd.x) && + (dy > PSXDisplay.DisplayPosition.y) && + (y < PSXDisplay.DisplayEnd.y))) + sArea=0; + else + if((!(PSXDisplay.InterlacedTest) && + (dx > PreviousPSXDisplay.DisplayPosition.x) && + (x < PreviousPSXDisplay.DisplayEnd.x) && + (dy > PreviousPSXDisplay.DisplayPosition.y) && + (y < PreviousPSXDisplay.DisplayEnd.y))) + sArea=1; + else + { + return; + } + + if(dwActFixes&0x40) + { + if(iRenderFVR) + { + bFullVRam=TRUE;iRenderFVR=2;return; + } + bFullVRam=TRUE;iRenderFVR=2; + } + + ux=x;uy=y;udx=dx;udy=dy; + + if(sArea==0) + { + x -=PSXDisplay.DisplayPosition.x; + dx-=PSXDisplay.DisplayPosition.x; + y -=PSXDisplay.DisplayPosition.y; + dy-=PSXDisplay.DisplayPosition.y; + wx=PSXDisplay.DisplayEnd.x-PSXDisplay.DisplayPosition.x; + wy=PSXDisplay.DisplayEnd.y-PSXDisplay.DisplayPosition.y; + } + else + { + x -=PreviousPSXDisplay.DisplayPosition.x; + dx-=PreviousPSXDisplay.DisplayPosition.x; + y -=PreviousPSXDisplay.DisplayPosition.y; + dy-=PreviousPSXDisplay.DisplayPosition.y; + wx=PreviousPSXDisplay.DisplayEnd.x-PreviousPSXDisplay.DisplayPosition.x; + wy=PreviousPSXDisplay.DisplayEnd.y-PreviousPSXDisplay.DisplayPosition.y; + } + if(x<0) {ux-=x;x=0;} + if(y<0) {uy-=y;y=0;} + if(dx>wx) {udx-=(dx-wx);dx=wx;} + if(dy>wy) {udy-=(dy-wy);dy=wy;} + udx-=ux; + udy-=uy; + + p=(psxVuw + (1024*uy) + ux); + + if(udx<=0) return; + if(udy<=0) return; + if(dx<=0) return; + if(dy<=0) return; + if(wx<=0) return; + if(wy<=0) return; + + XS=(float)rRatioRect.right/(float)wx; + YS=(float)rRatioRect.bottom/(float)wy; + + dx=(int)((float)(dx)*XS); + dy=(int)((float)(dy)*YS); + x=(int)((float)x*XS); + y=(int)((float)y*YS); + + dx-=x; + dy-=y; + + if(dx>iResX) dx=iResX; + if(dy>iResY) dy=iResY; + + if(dx<=0) return; + if(dy<=0) return; + + // ogl y adjust + y=iResY-y-dy; + + x+=rRatioRect.left; + y-=rRatioRect.top; + + if(y<0) y=0; if((y+dy)>iResY) dy=iResY-y; + + if(!pGfxCardScreen) + { + glPixelStorei(GL_PACK_ALIGNMENT,1); + pGfxCardScreen=(unsigned char *)malloc(iResX*iResY*4); + } + + ps=pGfxCardScreen; + + if(bFront) glReadBuffer(GL_FRONT); + + glReadPixels(x,y,dx,dy,GL_RGB,GL_UNSIGNED_BYTE,ps); + + if(bFront) glReadBuffer(GL_BACK); + + XS=(float)dx/(float)(udx); + YS=(float)dy/(float)(udy+1); + + for(y=udy;y>0;y--) + { + for(x=0;x=psxVuw && p>3;px++; + s=sx; + sx=(*px)>>3;px++; + s|=sx<<5; + sx=(*px)>>3; + s|=sx<<10; + s&=~0x8000; + *p=s; + } + p++; + } + p += 1024 - udx; + } +} + +//////////////////////////////////////////////////////////////////////// +// core read from vram +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUreadDataMem(uint32_t *pMem, int iSize) +{ + int i; + + if(iDataReadMode!=DR_VRAMTRANSFER) return; + + GPUIsBusy; + + // adjust read ptr, if necessary + while(VRAMRead.ImagePtr>=psxVuw_eom) + VRAMRead.ImagePtr-=iGPUHeight*1024; + while(VRAMRead.ImagePtr1) && + !(iDrawnSomething==2 && + VRAMRead.x == VRAMWrite.x && + VRAMRead.y == VRAMWrite.y && + VRAMRead.Width == VRAMWrite.Width && + VRAMRead.Height == VRAMWrite.Height)) + CheckVRamRead(VRAMRead.x,VRAMRead.y, + VRAMRead.x+VRAMRead.RowsRemaining, + VRAMRead.y+VRAMRead.ColsRemaining, + TRUE); + + for(i=0;i 0) && (VRAMRead.RowsRemaining > 0)) + { + // lower 16 bit + GPUdataRet=(uint32_t)*VRAMRead.ImagePtr; + + VRAMRead.ImagePtr++; + if(VRAMRead.ImagePtr>=psxVuw_eom) VRAMRead.ImagePtr-=iGPUHeight*1024; + VRAMRead.RowsRemaining --; + + if(VRAMRead.RowsRemaining<=0) + { + VRAMRead.RowsRemaining = VRAMRead.Width; + VRAMRead.ColsRemaining--; + VRAMRead.ImagePtr += 1024 - VRAMRead.Width; + if(VRAMRead.ImagePtr>=psxVuw_eom) VRAMRead.ImagePtr-=iGPUHeight*1024; + } + + // higher 16 bit (always, even if it's an odd width) + GPUdataRet|=(uint32_t)(*VRAMRead.ImagePtr)<<16; + *pMem++=GPUdataRet; + + if(VRAMRead.ColsRemaining <= 0) + {FinishedVRAMRead();goto ENDREAD;} + + VRAMRead.ImagePtr++; + if(VRAMRead.ImagePtr>=psxVuw_eom) VRAMRead.ImagePtr-=iGPUHeight*1024; + VRAMRead.RowsRemaining--; + if(VRAMRead.RowsRemaining<=0) + { + VRAMRead.RowsRemaining = VRAMRead.Width; + VRAMRead.ColsRemaining--; + VRAMRead.ImagePtr += 1024 - VRAMRead.Width; + if(VRAMRead.ImagePtr>=psxVuw_eom) VRAMRead.ImagePtr-=iGPUHeight*1024; + } + if(VRAMRead.ColsRemaining <= 0) + {FinishedVRAMRead();goto ENDREAD;} + } + else {FinishedVRAMRead();goto ENDREAD;} + } + +ENDREAD: + GPUIsIdle; +} + +uint32_t CALLBACK GPUreadData(void) +{ + uint32_t l; + GPUreadDataMem(&l,1); + return GPUdataRet; +} + +//////////////////////////////////////////////////////////////////////// +// helper table to know how much data is used by drawing commands +//////////////////////////////////////////////////////////////////////// + +const unsigned char primTableCX[256] = +{ + // 00 + 0,0,3,0,0,0,0,0, + // 08 + 0,0,0,0,0,0,0,0, + // 10 + 0,0,0,0,0,0,0,0, + // 18 + 0,0,0,0,0,0,0,0, + // 20 + 4,4,4,4,7,7,7,7, + // 28 + 5,5,5,5,9,9,9,9, + // 30 + 6,6,6,6,9,9,9,9, + // 38 + 8,8,8,8,12,12,12,12, + // 40 + 3,3,3,3,0,0,0,0, + // 48 +// 5,5,5,5,6,6,6,6, //FLINE + 254,254,254,254,254,254,254,254, + // 50 + 4,4,4,4,0,0,0,0, + // 58 +// 7,7,7,7,9,9,9,9, // LINEG3 LINEG4 + 255,255,255,255,255,255,255,255, + // 60 + 3,3,3,3,4,4,4,4, // TILE SPRT + // 68 + 2,2,2,2,3,3,3,3, // TILE1 + // 70 + 2,2,2,2,3,3,3,3, + // 78 + 2,2,2,2,3,3,3,3, + // 80 + 4,0,0,0,0,0,0,0, + // 88 + 0,0,0,0,0,0,0,0, + // 90 + 0,0,0,0,0,0,0,0, + // 98 + 0,0,0,0,0,0,0,0, + // a0 + 3,0,0,0,0,0,0,0, + // a8 + 0,0,0,0,0,0,0,0, + // b0 + 0,0,0,0,0,0,0,0, + // b8 + 0,0,0,0,0,0,0,0, + // c0 + 3,0,0,0,0,0,0,0, + // c8 + 0,0,0,0,0,0,0,0, + // d0 + 0,0,0,0,0,0,0,0, + // d8 + 0,0,0,0,0,0,0,0, + // e0 + 0,1,1,1,1,1,1,0, + // e8 + 0,0,0,0,0,0,0,0, + // f0 + 0,0,0,0,0,0,0,0, + // f8 + 0,0,0,0,0,0,0,0 +}; + +//////////////////////////////////////////////////////////////////////// +// processes data send to GPU data register +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUwriteDataMem(uint32_t *pMem, int iSize) +{ + unsigned char command; + uint32_t gdata=0; + int i=0; + GPUIsBusy; + GPUIsNotReadyForCommands; + +STARTVRAM: + + if(iDataWriteMode==DR_VRAMTRANSFER) + { + // make sure we are in vram + while(VRAMWrite.ImagePtr>=psxVuw_eom) + VRAMWrite.ImagePtr-=iGPUHeight*1024; + while(VRAMWrite.ImagePtr0) + { + while(VRAMWrite.RowsRemaining>0) + { + if(i>=iSize) {goto ENDVRAM;} + i++; + + gdata=*pMem++; + + *VRAMWrite.ImagePtr++ = (unsigned short)gdata; + if(VRAMWrite.ImagePtr>=psxVuw_eom) VRAMWrite.ImagePtr-=iGPUHeight*1024; + VRAMWrite.RowsRemaining --; + + if(VRAMWrite.RowsRemaining <= 0) + { + VRAMWrite.ColsRemaining--; + if (VRAMWrite.ColsRemaining <= 0) // last pixel is odd width + { + gdata=(gdata&0xFFFF)|(((uint32_t)(*VRAMWrite.ImagePtr))<<16); + FinishedVRAMWrite(); + goto ENDVRAM; + } + VRAMWrite.RowsRemaining = VRAMWrite.Width; + VRAMWrite.ImagePtr += 1024 - VRAMWrite.Width; + } + + *VRAMWrite.ImagePtr++ = (unsigned short)(gdata>>16); + if(VRAMWrite.ImagePtr>=psxVuw_eom) VRAMWrite.ImagePtr-=iGPUHeight*1024; + VRAMWrite.RowsRemaining --; + } + + VRAMWrite.RowsRemaining = VRAMWrite.Width; + VRAMWrite.ColsRemaining--; + VRAMWrite.ImagePtr += 1024 - VRAMWrite.Width; + } + + FinishedVRAMWrite(); + } + +ENDVRAM: + + if(iDataWriteMode==DR_NORMAL) + { + void (* *primFunc)(unsigned char *); + if(bSkipNextFrame) primFunc=primTableSkip; + else primFunc=primTableJ; + + for(;i>24) & 0xff); + + if(primTableCX[command]) + { + gpuDataC = primTableCX[command]; + gpuCommand = command; + gpuDataM[0] = gdata; + gpuDataP = 1; + } + else continue; + } + else + { + gpuDataM[gpuDataP] = gdata; + if(gpuDataC>128) + { + if((gpuDataC==254 && gpuDataP>=3) || + (gpuDataC==255 && gpuDataP>=4 && !(gpuDataP&1))) + { + if((gpuDataM[gpuDataP] & 0xF000F000) == 0x50005000) + gpuDataP=gpuDataC-1; + } + } + gpuDataP++; + } + + if(gpuDataP == gpuDataC) + { + gpuDataC=gpuDataP=0; + primFunc[gpuCommand]((unsigned char *)gpuDataM); + + if(dwEmuFixes&0x0001 || dwActFixes&0x20000) // hack for emulating "gpu busy" in some games + iFakePrimBusy=4; + } + } + } + + GPUdataRet=gdata; + + GPUIsReadyForCommands; + GPUIsIdle; +} + +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUwriteData(uint32_t gdata) +{ + GPUwriteDataMem(&gdata,1); +} + +//////////////////////////////////////////////////////////////////////// +// call config dlg +//////////////////////////////////////////////////////////////////////// + +void StartCfgTool(char *arg) // linux: start external cfg tool +{ + char cfg[256]; + struct stat buf; + + strcpy(cfg, "./cfgpeopsxgl"); + if (stat(cfg, &buf) != -1) { + if (fork() == 0) { + execl(cfg, "cfgpeopsxgl", arg, NULL); + exit(0); + } + return; + } + + strcpy(cfg, "./cfg/cfgpeopsxgl"); + if (stat(cfg, &buf) != -1) { + if (fork() == 0) { + execl(cfg, "cfgpeopsxgl", arg, NULL); + exit(0); + } + return; + } + + sprintf(cfg, "%s/.pcsx/plugins/cfg/cfgpeopsxgl", getenv("HOME")); + if (stat(cfg, &buf) != -1) { + if (fork() == 0) { + execl(cfg, "cfgpeopsxgl", arg, NULL); + exit(0); + } + return; + } + + printf("ERROR: cfgpeopsxgl file not found!\n"); +} + +long CALLBACK GPUconfigure(void) +{ + StartCfgTool("CFG"); + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// sets all kind of act fixes +//////////////////////////////////////////////////////////////////////// + +void SetFixes(void) +{ + ReInitFrameCap(); + + if(dwActFixes & 0x2000) + dispWidths[4]=384; + else dispWidths[4]=368; +} + +//////////////////////////////////////////////////////////////////////// +// Pete Special: make an 'intelligent' dma chain check (<-Tekken3) +//////////////////////////////////////////////////////////////////////// + +uint32_t lUsedAddr[3]; + +__inline BOOL CheckForEndlessLoop(uint32_t laddr) +{ + if(laddr==lUsedAddr[1]) return TRUE; + if(laddr==lUsedAddr[2]) return TRUE; + + if(laddr 2000000) break; + if(CheckForEndlessLoop(addr)) break; + + count = baseAddrB[addr+3]; + + dmaMem=addr+4; + + if(count>0) GPUwriteDataMem(&baseAddrL[dmaMem>>2],count); + + addr = baseAddrL[addr>>2]&0xffffff; + } + while (addr != 0xffffff); + + GPUIsIdle; + + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// show about dlg +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUabout(void) +{ + StartCfgTool("ABOUT"); +} + +//////////////////////////////////////////////////////////////////////// +// We are ever fine ;) +//////////////////////////////////////////////////////////////////////// + +long CALLBACK GPUtest(void) +{ + // if test fails this function should return negative value for error (unable to continue) + // and positive value for warning (can continue but output might be crappy) + + return 0; +} + +//////////////////////////////////////////////////////////////////////// +// save state funcs +//////////////////////////////////////////////////////////////////////// + +typedef struct GPUFREEZETAG +{ + uint32_t ulFreezeVersion; // should be always 1 for now (set by main emu) + uint32_t ulStatus; // current gpu status + uint32_t ulControl[256]; // latest control register values + unsigned char psxVRam[1024*1024*2]; // current VRam image (full 2 MB for ZN) +} GPUFreeze_t; + +//////////////////////////////////////////////////////////////////////// + +long CALLBACK GPUfreeze(uint32_t ulGetFreezeData,GPUFreeze_t * pF) +{ + if(ulGetFreezeData==2) + { + int lSlotNum=*((int *)pF); + if(lSlotNum<0) return 0; + if(lSlotNum>8) return 0; + lSelectedSlot=lSlotNum+1; + return 1; + } + + if(!pF) return 0; + if(pF->ulFreezeVersion!=1) return 0; + + if(ulGetFreezeData==1) + { + pF->ulStatus=STATUSREG; + memcpy(pF->ulControl,ulStatusControl,256*sizeof(uint32_t)); + memcpy(pF->psxVRam, psxVub, 1024*iGPUHeight*2); + + return 1; + } + + if(ulGetFreezeData!=0) return 0; + + STATUSREG=pF->ulStatus; + memcpy(ulStatusControl,pF->ulControl,256*sizeof(uint32_t)); + memcpy(psxVub, pF->psxVRam, 1024*iGPUHeight*2); + + ResetTextureArea(TRUE); + + GPUwriteStatus(ulStatusControl[0]); + GPUwriteStatus(ulStatusControl[1]); + GPUwriteStatus(ulStatusControl[2]); + GPUwriteStatus(ulStatusControl[3]); + GPUwriteStatus(ulStatusControl[8]); + GPUwriteStatus(ulStatusControl[6]); + GPUwriteStatus(ulStatusControl[7]); + GPUwriteStatus(ulStatusControl[5]); + GPUwriteStatus(ulStatusControl[4]); + + return 1; +} + +//////////////////////////////////////////////////////////////////////// +// special "emu infos" / "emu effects" functions +//////////////////////////////////////////////////////////////////////// + +//00 = black +//01 = white +//10 = red +//11 = transparent + +unsigned char cFont[10][120]= +{ +// 0 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 1 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 2 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 3 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 4 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x14,0x00,0x00, + 0x80,0x00,0x14,0x14,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 5 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 6 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x15,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 7 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 8 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 9 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x15,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +} +}; + +//////////////////////////////////////////////////////////////////////// + +void PaintPicDot(unsigned char * p,unsigned char c) +{ + if(c==0) {*p++=0x00;*p++=0x00;*p=0x00;return;} + if(c==1) {*p++=0xff;*p++=0xff;*p=0xff;return;} + if(c==2) {*p++=0x00;*p++=0x00;*p=0xff;return;} +} + +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUgetScreenPic(unsigned char * pMem) +{ + float XS,YS;int x,y,v; + unsigned char * ps, * px, * pf; + unsigned char c; + + if(!pGfxCardScreen) + { + glPixelStorei(GL_PACK_ALIGNMENT,1); + pGfxCardScreen=(unsigned char *)malloc(iResX*iResY*4); + } + + ps=pGfxCardScreen; + + glReadBuffer(GL_FRONT); + + glReadPixels(0,0,iResX,iResY,GL_RGB,GL_UNSIGNED_BYTE,ps); + + glReadBuffer(GL_BACK); + + XS=(float)iResX/128; + YS=(float)iResY/96; + pf=pMem; + + for(y=96;y>0;y--) + { + for(x=0;x<128;x++) + { + px=ps+(3*((int)((float)x * XS))+ + (3*iResX)*((int)((float)y*YS))); + *(pf+0)=*(px+2); + *(pf+1)=*(px+1); + *(pf+2)=*(px+0); + pf+=3; + } + } + + ///////////////////////////////////////////////////////////////////// + // generic number/border painter + + pf=pMem+(103*3); + + for(y=0;y<20;y++) + { + for(x=0;x<6;x++) + { + c=cFont[lSelectedSlot][x+y*6]; + v=(c&0xc0)>>6; + PaintPicDot(pf,(unsigned char)v);pf+=3; // paint the dots into the rect + v=(c&0x30)>>4; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=(c&0x0c)>>2; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=c&0x03; + PaintPicDot(pf,(unsigned char)v);pf+=3; + } + pf+=104*3; + } + + pf=pMem; + for(x=0;x<128;x++) + { + *(pf+(95*128*3))=0x00;*pf++=0x00; + *(pf+(95*128*3))=0x00;*pf++=0x00; + *(pf+(95*128*3))=0xff;*pf++=0xff; + } + pf=pMem; + for(y=0;y<96;y++) + { + *(pf+(127*3))=0x00;*pf++=0x00; + *(pf+(127*3))=0x00;*pf++=0x00; + *(pf+(127*3))=0xff;*pf++=0xff; + pf+=127*3; + } + +} + +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUshowScreenPic(unsigned char * pMem) +{ + DestroyPic(); + if(pMem==0) return; + CreatePic(pMem); +} + +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUsetfix(uint32_t dwFixBits) +{ + dwEmuFixes=dwFixBits; +} + +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUvisualVibration(uint32_t iSmall, uint32_t iBig) +{ + int iVibVal; + + if(PSXDisplay.DisplayModeNew.x) // calc min "shake pixel" from screen width + iVibVal=max(1,iResX/PSXDisplay.DisplayModeNew.x); + else iVibVal=1; + // big rumble: 4...15 sp ; small rumble 1...3 sp + if(iBig) iRumbleVal=max(4*iVibVal,min(15*iVibVal,((int)iBig *iVibVal)/10)); + else iRumbleVal=max(1*iVibVal,min( 3*iVibVal,((int)iSmall*iVibVal)/10)); + + srand(timeGetTime()); // init rand (will be used in BufferSwap) + + iRumbleTime=15; // let the rumble last 16 buffer swaps +} + +//////////////////////////////////////////////////////////////////////// +// main emu can set display infos (A/M/G/D) +//////////////////////////////////////////////////////////////////////// + +void CALLBACK GPUdisplayFlags(uint32_t dwFlags) +{ + dwCoreFlags=dwFlags; +} diff --git a/plugins/peopsxgl/gpu.h b/plugins/peopsxgl/gpu.h new file mode 100644 index 00000000..f21433d9 --- /dev/null +++ b/plugins/peopsxgl/gpu.h @@ -0,0 +1,40 @@ +/*************************************************************************** + gpu.h - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _GPU_INTERNALS_H +#define _GPU_INTERNALS_H + +#define PRED(x) ((x << 3) & 0xF8) +#define PBLUE(x) ((x >> 2) & 0xF8) +#define PGREEN(x) ((x >> 7) & 0xF8) + +#define RED(x) (x & 0xff) +#define BLUE(x) ((x>>16) & 0xff) +#define GREEN(x) ((x>>8) & 0xff) +#define COLOR(x) (x & 0xffffff) + +void DoSnapShot(void); +void updateDisplay(void); +void updateFrontDisplay(void); +void SetAutoFrameCap(void); +void SetAspectRatio(void); +void CheckVRamRead(int x, int y, int dx, int dy,BOOL bFront); +void CheckVRamReadEx(int x, int y, int dx, int dy); +void SetFixes(void); + +#endif // _GPU_INTERNALS_H diff --git a/plugins/peopsxgl/gpucfg/callbacks.c b/plugins/peopsxgl/gpucfg/callbacks.c new file mode 100644 index 00000000..59bb6d62 --- /dev/null +++ b/plugins/peopsxgl/gpucfg/callbacks.c @@ -0,0 +1,51 @@ +#include "config.h" + +#include + +#include "callbacks.h" +#include "interface.h" +#include "support.h" +#include +#include + +void SaveConfig(void); + +void +on_btnSave_clicked (GtkButton *button, + gpointer user_data) +{ + SaveConfig(); + exit(0); +} + + +void +on_CfgWnd_destroy (GtkObject *object, + gpointer user_data) +{ + exit(0); +} + + +void +on_btnCancel_clicked (GtkButton *button, + gpointer user_data) +{ + exit(0); +} + + +void +on_AboutWnd_destroy (GtkObject *object, + gpointer user_data) +{ + exit(0); +} + + +void +on_bntAClose_clicked (GtkButton *button, + gpointer user_data) +{ + exit(0); +} diff --git a/plugins/peopsxgl/gpucfg/callbacks.h b/plugins/peopsxgl/gpucfg/callbacks.h new file mode 100644 index 00000000..f607b910 --- /dev/null +++ b/plugins/peopsxgl/gpucfg/callbacks.h @@ -0,0 +1,24 @@ +#include + + +void +on_btnSave_clicked (GtkButton *button, + gpointer user_data); + + + +void +on_CfgWnd_destroy (GtkObject *object, + gpointer user_data); + +void +on_btnCancel_clicked (GtkButton *button, + gpointer user_data); + +void +on_AboutWnd_destroy (GtkObject *object, + gpointer user_data); + +void +on_bntAClose_clicked (GtkButton *button, + gpointer user_data); diff --git a/plugins/peopsxgl/gpucfg/interface.c b/plugins/peopsxgl/gpucfg/interface.c new file mode 100644 index 00000000..c70b4932 --- /dev/null +++ b/plugins/peopsxgl/gpucfg/interface.c @@ -0,0 +1,896 @@ +#include "config.h" + +#include +#include +#include +#include + +#include +#include + +#include "callbacks.h" +#include "interface.h" +#include "support.h" + +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#else +#define _(x) (x) +#endif + +GtkWidget* +create_CfgWnd (void) +{ + GtkWidget *CfgWnd; + GtkWidget *fixed1; + GtkWidget *btnSave; + GtkWidget *frmTextures; + GtkWidget *fixed3; + GtkWidget *edtMaxTex; + GtkWidget *label5; + GtkWidget *cmbQuality; + GList *cmbQuality_items = NULL; + GtkWidget *combo_entry2; + GtkWidget *label7; + GtkWidget *cmbFilter; + GList *cmbFilter_items = NULL; + GtkWidget *combo_entry3; + GtkWidget *label6; + GtkWidget *label23; + GtkWidget *cmbHiresTex; + GList *cmbHiresTex_items = NULL; + GtkWidget *combo_entry7; + GtkWidget *frmWindow; + GtkWidget *fixed2; + GtkWidget *edtXSize; + GtkWidget *edtYSize; + GtkWidget *label2; + GtkWidget *label3; + GtkWidget *chkKeepRatio; + GtkWidget *chkFullScreen; + GtkWidget *chkDither; + GtkWidget *btnCancel; + GtkWidget *frmFPS; + GtkWidget *fixed4; + GtkWidget *edtFPSlim; + GtkWidget *label8; + GSList *fixed4_group = NULL; + GtkWidget *rdbLimMan; + GtkWidget *chkShowFPS; + GtkWidget *chkFPSLimit; + GtkWidget *rdbLimAuto; + GtkWidget *chkFPSSkip; + GtkWidget *frmCompat; + GtkWidget *fixed5; + GtkWidget *chkABlend; + GtkWidget *label10; + GtkWidget *label9; + GtkWidget *label22; + GtkWidget *chkOpaque; + GtkWidget *chkMaskBit; + GtkWidget *cmbOffscreen; + GList *cmbOffscreen_items = NULL; + GtkWidget *combo_entry4; + GtkWidget *cmbFrameTex; + GList *cmbFrameTex_items = NULL; + GtkWidget *combo_entry5; + GtkWidget *cmbFrameAcc; + GList *cmbFrameAcc_items = NULL; + GtkWidget *combo_entry6; + GtkWidget *frmFixes; + GtkWidget *fixed7; + GtkWidget *chkFix3; + GtkWidget *chkFix4; + GtkWidget *chkFix5; + GtkWidget *chkGameFixes; + GtkWidget *chkFix2; + GtkWidget *chkFix1; + GtkWidget *chkFix7; + GtkWidget *chkFix0; + GtkWidget *chkFix6; + GtkWidget *chkFix8; + GtkWidget *chkFix9; + GtkWidget *chkFix10; + GtkWidget *chkFix11; + GtkWidget *chkFix12; + GtkWidget *chkFix13; + GtkWidget *chkFix14; + GtkWidget *chkFix15; + GtkWidget *chkFix17; + GtkWidget *chkFix16; + GtkWidget *frmMisc; + GtkWidget *fixed6; + GtkWidget *edtScanBlend; + GtkWidget *chkScanlines; + GtkWidget *label11; + GtkWidget *chkBlur; + GtkWidget *chkExtensions; + GtkWidget *chkAntiA; + GtkWidget *chkLinemode; + GtkWidget *chkFastMdec; + GtkWidget *chk15bitMdec; + + CfgWnd = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_object_set_data (GTK_OBJECT (CfgWnd), "CfgWnd", CfgWnd); + gtk_container_set_border_width (GTK_CONTAINER (CfgWnd), 8); + gtk_window_set_title (GTK_WINDOW (CfgWnd), _("OpenGL Driver configuration")); + gtk_window_set_position (GTK_WINDOW (CfgWnd), GTK_WIN_POS_CENTER); + gtk_window_set_modal (GTK_WINDOW (CfgWnd), TRUE); + gtk_window_set_policy (GTK_WINDOW (CfgWnd), FALSE, FALSE, FALSE); + + fixed1 = gtk_fixed_new (); + gtk_widget_ref (fixed1); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "fixed1", fixed1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fixed1); + gtk_container_add (GTK_CONTAINER (CfgWnd), fixed1); + + btnSave = gtk_button_new_with_label (_("OK")); + gtk_widget_ref (btnSave); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "btnSave", btnSave, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (btnSave); + gtk_fixed_put (GTK_FIXED (fixed1), btnSave, 134, 552); + gtk_widget_set_usize (btnSave, 160, 24); + + frmTextures = gtk_frame_new (_("Textures")); + gtk_widget_ref (frmTextures); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "frmTextures", frmTextures, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frmTextures); + gtk_fixed_put (GTK_FIXED (fixed1), frmTextures, 372, 0); + gtk_widget_set_usize (frmTextures, 364, 136); + + fixed3 = gtk_fixed_new (); + gtk_widget_ref (fixed3); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "fixed3", fixed3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fixed3); + gtk_container_add (GTK_CONTAINER (frmTextures), fixed3); + + edtMaxTex = gtk_entry_new (); + gtk_widget_ref (edtMaxTex); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "edtMaxTex", edtMaxTex, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (edtMaxTex); + gtk_fixed_put (GTK_FIXED (fixed3), edtMaxTex, 278, 80); + gtk_widget_set_usize (edtMaxTex, 66, 24); + + label5 = gtk_label_new (_("Quality:")); + gtk_widget_ref (label5); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "label5", label5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label5); + gtk_fixed_put (GTK_FIXED (fixed3), label5, 8, 0); + gtk_widget_set_usize (label5, 64, 24); + + cmbQuality = gtk_combo_new (); + gtk_widget_ref (cmbQuality); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "cmbQuality", cmbQuality, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (cmbQuality); + gtk_fixed_put (GTK_FIXED (fixed3), cmbQuality, 80, 0); + gtk_widget_set_usize (cmbQuality, 264, 24); + gtk_combo_set_value_in_list (GTK_COMBO (cmbQuality), TRUE, FALSE); + gtk_combo_set_use_arrows_always (GTK_COMBO (cmbQuality), TRUE); + cmbQuality_items = g_list_append (cmbQuality_items, (gpointer) _("0: don't care - Use driver's default textures")); + cmbQuality_items = g_list_append (cmbQuality_items, (gpointer) _("1: 4444 - Fast, but less colorful")); + cmbQuality_items = g_list_append (cmbQuality_items, (gpointer) _("2: 5551 - Nice colors, bad transparency")); + cmbQuality_items = g_list_append (cmbQuality_items, (gpointer) _("3: 8888 - Best colors, more ram needed")); + cmbQuality_items = g_list_append (cmbQuality_items, (gpointer) _("4: BGR8888 - Faster on some cards")); + gtk_combo_set_popdown_strings (GTK_COMBO (cmbQuality), cmbQuality_items); + g_list_free (cmbQuality_items); + + combo_entry2 = GTK_COMBO (cmbQuality)->entry; + gtk_widget_ref (combo_entry2); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "combo_entry2", combo_entry2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry2); + gtk_entry_set_text (GTK_ENTRY (combo_entry2), _("0: don't care - Use driver's default textures")); + + label7 = gtk_label_new (_("VRam size in MBytes (0..1024, 0=auto):")); + gtk_widget_ref (label7); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "label7", label7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label7); + gtk_fixed_put (GTK_FIXED (fixed3), label7, 8, 80); + gtk_widget_set_usize (label7, 260, 24); + + cmbFilter = gtk_combo_new (); + gtk_widget_ref (cmbFilter); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "cmbFilter", cmbFilter, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (cmbFilter); + gtk_fixed_put (GTK_FIXED (fixed3), cmbFilter, 80, 24); + gtk_widget_set_usize (cmbFilter, 264, 24); + gtk_combo_set_value_in_list (GTK_COMBO (cmbFilter), TRUE, FALSE); + gtk_combo_set_use_arrows_always (GTK_COMBO (cmbFilter), TRUE); + cmbFilter_items = g_list_append (cmbFilter_items, (gpointer) _("0: None")); + cmbFilter_items = g_list_append (cmbFilter_items, (gpointer) _("1: Standard - Glitches will happen")); + cmbFilter_items = g_list_append (cmbFilter_items, (gpointer) _("2: Extended - No black borders")); + cmbFilter_items = g_list_append (cmbFilter_items, (gpointer) _("3: Standard without sprites - unfiltered 2D")); + cmbFilter_items = g_list_append (cmbFilter_items, (gpointer) _("4: Extended without sprites - unfiltered 2D")); + cmbFilter_items = g_list_append (cmbFilter_items, (gpointer) _("5: Standard + smoothed sprites")); + cmbFilter_items = g_list_append (cmbFilter_items, (gpointer) _("6: Extended + smoothed sprites")); + gtk_combo_set_popdown_strings (GTK_COMBO (cmbFilter), cmbFilter_items); + g_list_free (cmbFilter_items); + + combo_entry3 = GTK_COMBO (cmbFilter)->entry; + gtk_widget_ref (combo_entry3); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "combo_entry3", combo_entry3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry3); + gtk_entry_set_text (GTK_ENTRY (combo_entry3), _("0: None")); + + label6 = gtk_label_new (_("Filtering:")); + gtk_widget_ref (label6); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "label6", label6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label6); + gtk_fixed_put (GTK_FIXED (fixed3), label6, 8, 24); + gtk_widget_set_usize (label6, 64, 24); + + label23 = gtk_label_new (_("HiRes Tex:")); + gtk_widget_ref (label23); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "label23", label23, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label23); + gtk_fixed_put (GTK_FIXED (fixed3), label23, 8, 48); + gtk_widget_set_usize (label23, 64, 24); + + cmbHiresTex = gtk_combo_new (); + gtk_widget_ref (cmbHiresTex); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "cmbHiresTex", cmbHiresTex, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (cmbHiresTex); + gtk_fixed_put (GTK_FIXED (fixed3), cmbHiresTex, 80, 48); + gtk_widget_set_usize (cmbHiresTex, 264, 22); + gtk_combo_set_value_in_list (GTK_COMBO (cmbHiresTex), TRUE, FALSE); + gtk_combo_set_use_arrows_always (GTK_COMBO (cmbHiresTex), TRUE); + cmbHiresTex_items = g_list_append (cmbHiresTex_items, (gpointer) _("0: None (standard)")); + cmbHiresTex_items = g_list_append (cmbHiresTex_items, (gpointer) _("1: 2xSaI (much vram needed)")); + cmbHiresTex_items = g_list_append (cmbHiresTex_items, (gpointer) _("2: Scaled (needs tex filtering)")); + gtk_combo_set_popdown_strings (GTK_COMBO (cmbHiresTex), cmbHiresTex_items); + g_list_free (cmbHiresTex_items); + + combo_entry7 = GTK_COMBO (cmbHiresTex)->entry; + gtk_widget_ref (combo_entry7); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "combo_entry7", combo_entry7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry7); + gtk_entry_set_text (GTK_ENTRY (combo_entry7), _("0: None (standard)")); + + frmWindow = gtk_frame_new (_("Window options")); + gtk_widget_ref (frmWindow); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "frmWindow", frmWindow, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frmWindow); + gtk_fixed_put (GTK_FIXED (fixed1), frmWindow, 0, 0); + gtk_widget_set_usize (frmWindow, 364, 136); + + fixed2 = gtk_fixed_new (); + gtk_widget_ref (fixed2); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "fixed2", fixed2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fixed2); + gtk_container_add (GTK_CONTAINER (frmWindow), fixed2); + + edtXSize = gtk_entry_new_with_max_length (5); + gtk_widget_ref (edtXSize); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "edtXSize", edtXSize, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (edtXSize); + gtk_fixed_put (GTK_FIXED (fixed2), edtXSize, 56, 0); + gtk_widget_set_usize (edtXSize, 72, 24); + + edtYSize = gtk_entry_new (); + gtk_widget_ref (edtYSize); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "edtYSize", edtYSize, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (edtYSize); + gtk_fixed_put (GTK_FIXED (fixed2), edtYSize, 56, 32); + gtk_widget_set_usize (edtYSize, 72, 24); + + label2 = gtk_label_new (_("Width:")); + gtk_widget_ref (label2); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "label2", label2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label2); + gtk_fixed_put (GTK_FIXED (fixed2), label2, 8, 0); + gtk_widget_set_usize (label2, 48, 24); + gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_RIGHT); + + label3 = gtk_label_new (_("Height:")); + gtk_widget_ref (label3); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "label3", label3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label3); + gtk_fixed_put (GTK_FIXED (fixed2), label3, 8, 32); + gtk_widget_set_usize (label3, 48, 24); + gtk_label_set_justify (GTK_LABEL (label3), GTK_JUSTIFY_RIGHT); + + chkKeepRatio = gtk_check_button_new_with_label (_("Keep psx aspect ratio")); + gtk_widget_ref (chkKeepRatio); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkKeepRatio", chkKeepRatio, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkKeepRatio); + gtk_fixed_put (GTK_FIXED (fixed2), chkKeepRatio, 8, 88); + gtk_widget_set_usize (chkKeepRatio, 280, 24); + + chkFullScreen = gtk_check_button_new_with_label (_("Fullscreen")); + gtk_widget_ref (chkFullScreen); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFullScreen", chkFullScreen, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFullScreen); + gtk_fixed_put (GTK_FIXED (fixed2), chkFullScreen, 196, 0); + gtk_widget_set_usize (chkFullScreen, 125, 24); + + chkDither = gtk_check_button_new_with_label (_("Dithering")); + gtk_widget_ref (chkDither); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkDither", chkDither, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkDither); + gtk_fixed_put (GTK_FIXED (fixed2), chkDither, 8, 64); + gtk_widget_set_usize (chkDither, 280, 24); + + btnCancel = gtk_button_new_with_label (_("Cancel")); + gtk_widget_ref (btnCancel); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "btnCancel", btnCancel, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (btnCancel); + gtk_fixed_put (GTK_FIXED (fixed1), btnCancel, 430, 552); + gtk_widget_set_usize (btnCancel, 160, 24); + + frmFPS = gtk_frame_new (_("Framerate")); + gtk_widget_ref (frmFPS); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "frmFPS", frmFPS, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frmFPS); + gtk_fixed_put (GTK_FIXED (fixed1), frmFPS, 0, 136); + gtk_widget_set_usize (frmFPS, 364, 176); + + fixed4 = gtk_fixed_new (); + gtk_widget_ref (fixed4); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "fixed4", fixed4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fixed4); + gtk_container_add (GTK_CONTAINER (frmFPS), fixed4); + + edtFPSlim = gtk_entry_new (); + gtk_widget_ref (edtFPSlim); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "edtFPSlim", edtFPSlim, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (edtFPSlim); + gtk_fixed_put (GTK_FIXED (fixed4), edtFPSlim, 175, 104); + gtk_widget_set_usize (edtFPSlim, 72, 24); + + label8 = gtk_label_new (_("FPS")); + gtk_widget_ref (label8); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "label8", label8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label8); + gtk_fixed_put (GTK_FIXED (fixed4), label8, 250, 104); + gtk_widget_set_usize (label8, 40, 24); + + rdbLimMan = gtk_radio_button_new_with_label (fixed4_group, _("FPS limit manual")); + fixed4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rdbLimMan)); + gtk_widget_ref (rdbLimMan); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "rdbLimMan", rdbLimMan, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (rdbLimMan); + gtk_fixed_put (GTK_FIXED (fixed4), rdbLimMan, 32, 104); + gtk_widget_set_usize (rdbLimMan, 140, 24); + + chkShowFPS = gtk_check_button_new_with_label (_("Show FPS display on startup")); + gtk_widget_ref (chkShowFPS); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkShowFPS", chkShowFPS, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkShowFPS); + gtk_fixed_put (GTK_FIXED (fixed4), chkShowFPS, 8, 0); + gtk_widget_set_usize (chkShowFPS, 280, 24); + + chkFPSLimit = gtk_check_button_new_with_label (_("Use FPS limit")); + gtk_widget_ref (chkFPSLimit); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFPSLimit", chkFPSLimit, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFPSLimit); + gtk_fixed_put (GTK_FIXED (fixed4), chkFPSLimit, 8, 24); + gtk_widget_set_usize (chkFPSLimit, 280, 24); + + rdbLimAuto = gtk_radio_button_new_with_label (fixed4_group, _("FPS limit auto-detection")); + fixed4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (rdbLimAuto)); + gtk_widget_ref (rdbLimAuto); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "rdbLimAuto", rdbLimAuto, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (rdbLimAuto); + gtk_fixed_put (GTK_FIXED (fixed4), rdbLimAuto, 32, 80); + gtk_widget_set_usize (rdbLimAuto, 200, 24); + + chkFPSSkip = gtk_check_button_new_with_label (_("Use Frame skipping")); + gtk_widget_ref (chkFPSSkip); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFPSSkip", chkFPSSkip, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFPSSkip); + gtk_fixed_put (GTK_FIXED (fixed4), chkFPSSkip, 8, 48); + gtk_widget_set_usize (chkFPSSkip, 280, 24); + + frmCompat = gtk_frame_new (_("Compatibility")); + gtk_widget_ref (frmCompat); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "frmCompat", frmCompat, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frmCompat); + gtk_fixed_put (GTK_FIXED (fixed1), frmCompat, 372, 136); + gtk_widget_set_usize (frmCompat, 364, 176); + + fixed5 = gtk_fixed_new (); + gtk_widget_ref (fixed5); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "fixed5", fixed5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fixed5); + gtk_container_add (GTK_CONTAINER (frmCompat), fixed5); + + chkABlend = gtk_check_button_new_with_label (_("Advanced blending (Accurate psx color emulation)")); + gtk_widget_ref (chkABlend); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkABlend", chkABlend, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkABlend); + gtk_fixed_put (GTK_FIXED (fixed5), chkABlend, 8, 128); + gtk_widget_set_usize (chkABlend, 366, 24); + + label10 = gtk_label_new (_("Framebuffer textures:")); + gtk_widget_ref (label10); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "label10", label10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label10); + gtk_fixed_put (GTK_FIXED (fixed5), label10, 0, 24); + gtk_widget_set_usize (label10, 136, 24); + + label9 = gtk_label_new (_("Offscreen Drawing:")); + gtk_widget_ref (label9); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "label9", label9, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label9); + gtk_fixed_put (GTK_FIXED (fixed5), label9, 0, 0); + gtk_widget_set_usize (label9, 136, 24); + + label22 = gtk_label_new (_("Framebuffer access:")); + gtk_widget_ref (label22); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "label22", label22, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label22); + gtk_fixed_put (GTK_FIXED (fixed5), label22, 0, 48); + gtk_widget_set_usize (label22, 136, 24); + + chkOpaque = gtk_check_button_new_with_label (_("Alpha Multipass (correct opaque texture areas)")); + gtk_widget_ref (chkOpaque); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkOpaque", chkOpaque, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkOpaque); + gtk_fixed_put (GTK_FIXED (fixed5), chkOpaque, 8, 104); + gtk_widget_set_usize (chkOpaque, 366, 24); + + chkMaskBit = gtk_check_button_new_with_label (_("Mask bit detection (needed by a few games, zbuffer)")); + gtk_widget_ref (chkMaskBit); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkMaskBit", chkMaskBit, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkMaskBit); + gtk_fixed_put (GTK_FIXED (fixed5), chkMaskBit, 8, 80); + gtk_widget_set_usize (chkMaskBit, 366, 24); + + cmbOffscreen = gtk_combo_new (); + gtk_widget_ref (cmbOffscreen); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "cmbOffscreen", cmbOffscreen, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (cmbOffscreen); + gtk_fixed_put (GTK_FIXED (fixed5), cmbOffscreen, 136, 0); + gtk_widget_set_usize (cmbOffscreen, 208, 24); + gtk_combo_set_value_in_list (GTK_COMBO (cmbOffscreen), TRUE, FALSE); + gtk_combo_set_use_arrows_always (GTK_COMBO (cmbOffscreen), TRUE); + cmbOffscreen_items = g_list_append (cmbOffscreen_items, (gpointer) _("0: None - Fastest, most glitches")); + cmbOffscreen_items = g_list_append (cmbOffscreen_items, (gpointer) _("1: Minimum - Missing screens")); + cmbOffscreen_items = g_list_append (cmbOffscreen_items, (gpointer) _("2: Standard - OK for most games")); + cmbOffscreen_items = g_list_append (cmbOffscreen_items, (gpointer) _("3: Enhanced - Shows more stuff")); + cmbOffscreen_items = g_list_append (cmbOffscreen_items, (gpointer) _("4: Extended - Causing garbage")); + gtk_combo_set_popdown_strings (GTK_COMBO (cmbOffscreen), cmbOffscreen_items); + g_list_free (cmbOffscreen_items); + + combo_entry4 = GTK_COMBO (cmbOffscreen)->entry; + gtk_widget_ref (combo_entry4); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "combo_entry4", combo_entry4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry4); + gtk_entry_set_text (GTK_ENTRY (combo_entry4), _("0: None - Fastest, most glitches")); + + cmbFrameTex = gtk_combo_new (); + gtk_widget_ref (cmbFrameTex); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "cmbFrameTex", cmbFrameTex, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (cmbFrameTex); + gtk_fixed_put (GTK_FIXED (fixed5), cmbFrameTex, 136, 24); + gtk_widget_set_usize (cmbFrameTex, 208, 24); + gtk_combo_set_value_in_list (GTK_COMBO (cmbFrameTex), TRUE, FALSE); + gtk_combo_set_use_arrows_always (GTK_COMBO (cmbFrameTex), TRUE); + cmbFrameTex_items = g_list_append (cmbFrameTex_items, (gpointer) _("0: Emulated vram - Needs FVP")); + cmbFrameTex_items = g_list_append (cmbFrameTex_items, (gpointer) _("1: Black - Fast, no effects")); + cmbFrameTex_items = g_list_append (cmbFrameTex_items, (gpointer) _("2: Gfx card buffer - Can be slow")); + cmbFrameTex_items = g_list_append (cmbFrameTex_items, (gpointer) _("3: Gfx card & soft - slow")); + gtk_combo_set_popdown_strings (GTK_COMBO (cmbFrameTex), cmbFrameTex_items); + g_list_free (cmbFrameTex_items); + + combo_entry5 = GTK_COMBO (cmbFrameTex)->entry; + gtk_widget_ref (combo_entry5); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "combo_entry5", combo_entry5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry5); + gtk_entry_set_text (GTK_ENTRY (combo_entry5), _("0: Emulated vram - Needs FVP")); + + cmbFrameAcc = gtk_combo_new (); + gtk_widget_ref (cmbFrameAcc); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "cmbFrameAcc", cmbFrameAcc, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (cmbFrameAcc); + gtk_fixed_put (GTK_FIXED (fixed5), cmbFrameAcc, 136, 48); + gtk_widget_set_usize (cmbFrameAcc, 208, 22); + gtk_combo_set_value_in_list (GTK_COMBO (cmbFrameAcc), TRUE, FALSE); + gtk_combo_set_use_arrows_always (GTK_COMBO (cmbFrameAcc), TRUE); + cmbFrameAcc_items = g_list_append (cmbFrameAcc_items, (gpointer) _("0: Emulated vram - ok most times")); + cmbFrameAcc_items = g_list_append (cmbFrameAcc_items, (gpointer) _("1: Gfx card buffer reads")); + cmbFrameAcc_items = g_list_append (cmbFrameAcc_items, (gpointer) _("2: Gfx card buffer moves")); + cmbFrameAcc_items = g_list_append (cmbFrameAcc_items, (gpointer) _("3: Gfx buffer reads & moves")); + cmbFrameAcc_items = g_list_append (cmbFrameAcc_items, (gpointer) _("4: Full Software (FVP)")); + gtk_combo_set_popdown_strings (GTK_COMBO (cmbFrameAcc), cmbFrameAcc_items); + g_list_free (cmbFrameAcc_items); + + combo_entry6 = GTK_COMBO (cmbFrameAcc)->entry; + gtk_widget_ref (combo_entry6); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "combo_entry6", combo_entry6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry6); + gtk_entry_set_text (GTK_ENTRY (combo_entry6), _("0: Emulated vram - ok most times")); + + frmFixes = gtk_frame_new (_("Special game fixes")); + gtk_widget_ref (frmFixes); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "frmFixes", frmFixes, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frmFixes); + gtk_fixed_put (GTK_FIXED (fixed1), frmFixes, 372, 312); + gtk_widget_set_usize (frmFixes, 364, 232); + + fixed7 = gtk_fixed_new (); + gtk_widget_ref (fixed7); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "fixed7", fixed7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fixed7); + gtk_container_add (GTK_CONTAINER (frmFixes), fixed7); + + chkGameFixes = gtk_check_button_new_with_label (_("Use game fixes")); + gtk_widget_ref (chkGameFixes); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkGameFixes", chkGameFixes, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkGameFixes); + gtk_fixed_put (GTK_FIXED (fixed7), chkGameFixes, 8, 0); + gtk_widget_set_usize (chkGameFixes, 336, 24); + + chkFix0 = gtk_check_button_new_with_label (_("Battle cursor (FF7)")); + gtk_widget_ref (chkFix0); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix0", chkFix0, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix0); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix0, 8, 24); + gtk_widget_set_usize (chkFix0, 196, 20); + + chkFix1 = gtk_check_button_new_with_label (_("Direct FB updates")); + gtk_widget_ref (chkFix1); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix1", chkFix1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix1); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix1, 8, 44); + gtk_widget_set_usize (chkFix1, 196, 20); + + chkFix2 = gtk_check_button_new_with_label (_("Black brightness (Lunar)")); + gtk_widget_ref (chkFix2); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix2", chkFix2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix2); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix2, 8, 64); + gtk_widget_set_usize (chkFix2, 196, 20); + + chkFix3 = gtk_check_button_new_with_label (_("Swap front detection")); + gtk_widget_ref (chkFix3); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix3", chkFix3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix3); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix3, 8, 84); + gtk_widget_set_usize (chkFix3, 196, 20); + + chkFix4 = gtk_check_button_new_with_label (_("Disable coord check")); + gtk_widget_ref (chkFix4); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix4", chkFix4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix4); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix4, 8, 104); + gtk_widget_set_usize (chkFix4, 196, 20); + + chkFix5 = gtk_check_button_new_with_label (_("No blue glitches (LoD)")); + gtk_widget_ref (chkFix5); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix5", chkFix5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix5); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix5, 8, 124); + gtk_widget_set_usize (chkFix5, 196, 20); + + chkFix6 = gtk_check_button_new_with_label (_("Soft FB access")); + gtk_widget_ref (chkFix6); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix6", chkFix6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix6); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix6, 8, 144); + gtk_widget_set_usize (chkFix6, 196, 20); + + chkFix7 = gtk_check_button_new_with_label (_("PC fps calculation")); + gtk_widget_ref (chkFix7); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix7", chkFix7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix7); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix7, 8, 164); + gtk_widget_set_usize (chkFix7, 196, 20); + + chkFix8 = gtk_check_button_new_with_label (_("Old frame skipping")); + gtk_widget_ref (chkFix8); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix8", chkFix8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix8); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix8, 8, 184); + gtk_widget_set_usize (chkFix8, 196, 20); + + chkFix9 = gtk_check_button_new_with_label (_("Yellow rect (FF9)")); + gtk_widget_ref (chkFix9); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix9", chkFix9, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix9); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix9, 194, 24); + gtk_widget_set_usize (chkFix9, 196, 20); + + chkFix10 = gtk_check_button_new_with_label (_("No subtr. blending")); + gtk_widget_ref (chkFix10); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix10", chkFix10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix10); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix10, 194, 44); + gtk_widget_set_usize (chkFix10, 196, 20); + + chkFix11 = gtk_check_button_new_with_label (_("Lazy upload (DW7)")); + gtk_widget_ref (chkFix11); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix11", chkFix11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix11); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix11, 194, 64); + gtk_widget_set_usize (chkFix11, 196, 20); + + chkFix12 = gtk_check_button_new_with_label (_("Odd/even hack")); + gtk_widget_ref (chkFix12); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix12", chkFix12, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix12); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix12, 194, 84); + gtk_widget_set_usize (chkFix12, 196, 20); + + chkFix13 = gtk_check_button_new_with_label (_("Adjust screen width")); + gtk_widget_ref (chkFix13); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix13", chkFix13, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix13); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix13, 194, 104); + gtk_widget_set_usize (chkFix13, 196, 20); + + chkFix14 = gtk_check_button_new_with_label (_("Old texture filtering")); + gtk_widget_ref (chkFix14); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix14", chkFix14, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix14); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix14, 194, 124); + gtk_widget_set_usize (chkFix14, 196, 20); + + chkFix15 = gtk_check_button_new_with_label (_("Additional uploads")); + gtk_widget_ref (chkFix15); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix15", chkFix15, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix15); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix15, 194, 144); + gtk_widget_set_usize (chkFix15, 196, 20); + + chkFix16 = gtk_check_button_new_with_label (_("unused")); + gtk_widget_ref (chkFix16); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix16", chkFix16, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix16); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix16, 194, 164); + gtk_widget_set_usize (chkFix16, 196, 20); + + chkFix17 = gtk_check_button_new_with_label (_("Fake 'gpu busy'")); + gtk_widget_ref (chkFix17); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFix17", chkFix17, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFix17); + gtk_fixed_put (GTK_FIXED (fixed7), chkFix17, 194, 184); + gtk_widget_set_usize (chkFix17, 196, 20); + + frmMisc = gtk_frame_new (_("Misc")); + gtk_widget_ref (frmMisc); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "frmMisc", frmMisc, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frmMisc); + gtk_fixed_put (GTK_FIXED (fixed1), frmMisc, 0, 312); + gtk_widget_set_usize (frmMisc, 364, 232); + + fixed6 = gtk_fixed_new (); + gtk_widget_ref (fixed6); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "fixed6", fixed6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fixed6); + gtk_container_add (GTK_CONTAINER (frmMisc), fixed6); + + edtScanBlend = gtk_entry_new (); + gtk_widget_ref (edtScanBlend); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "edtScanBlend", edtScanBlend, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (edtScanBlend); + gtk_fixed_put (GTK_FIXED (fixed6), edtScanBlend, 285, 0); + gtk_widget_set_usize (edtScanBlend, 54, 22); + + chkScanlines = gtk_check_button_new_with_label (_("Scanlines")); + gtk_widget_ref (chkScanlines); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkScanlines", chkScanlines, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkScanlines); + gtk_fixed_put (GTK_FIXED (fixed6), chkScanlines, 8, 0); + gtk_widget_set_usize (chkScanlines, 100, 24); + + label11 = gtk_label_new (_("Blending (0..255, -1=dot):")); + gtk_widget_ref (label11); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "label11", label11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label11); + gtk_fixed_put (GTK_FIXED (fixed6), label11, 108, 0); + gtk_widget_set_usize (label11, 164, 24); + + chkBlur = gtk_check_button_new_with_label (_("Screen smoothing (can be slow or unsupported)")); + gtk_widget_ref (chkBlur); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkBlur", chkBlur, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkBlur); + gtk_fixed_put (GTK_FIXED (fixed6), chkBlur, 8, 132); + gtk_widget_set_usize (chkBlur, 350, 20); + + chkExtensions = gtk_check_button_new_with_label (_("Use OpenGL extensions (recommended)")); + gtk_widget_ref (chkExtensions); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkExtensions", chkExtensions, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkExtensions); + gtk_fixed_put (GTK_FIXED (fixed6), chkExtensions, 8, 112); + gtk_widget_set_usize (chkExtensions, 350, 20); + + chkAntiA = gtk_check_button_new_with_label (_("Polygon anti-aliasing (slow with most cards)")); + gtk_widget_ref (chkAntiA); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkAntiA", chkAntiA, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkAntiA); + gtk_fixed_put (GTK_FIXED (fixed6), chkAntiA, 8, 92); + gtk_widget_set_usize (chkAntiA, 350, 20); + + chkLinemode = gtk_check_button_new_with_label (_("Line mode (polygons will not get filled)")); + gtk_widget_ref (chkLinemode); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkLinemode", chkLinemode, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkLinemode); + gtk_fixed_put (GTK_FIXED (fixed6), chkLinemode, 8, 72); + gtk_widget_set_usize (chkLinemode, 350, 20); + + chk15bitMdec = gtk_check_button_new_with_label (_("Force 15 bit framebuffer updates (faster movies)")); + gtk_widget_ref (chk15bitMdec); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chk15bitMdec", chk15bitMdec, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chk15bitMdec); + gtk_fixed_put (GTK_FIXED (fixed6), chk15bitMdec, 8, 52); + gtk_widget_set_usize (chk15bitMdec, 350, 20); + + chkFastMdec = gtk_check_button_new_with_label (_("Unfiltered MDECs (small movie speedup)")); + gtk_widget_ref (chkFastMdec); + gtk_object_set_data_full (GTK_OBJECT (CfgWnd), "chkFastMdec", chkFastMdec, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (chkFastMdec); + gtk_fixed_put (GTK_FIXED (fixed6), chkFastMdec, 8, 32); + gtk_widget_set_usize (chkFastMdec, 350, 20); + + gtk_signal_connect (GTK_OBJECT (CfgWnd), "destroy", + GTK_SIGNAL_FUNC (on_CfgWnd_destroy), NULL); + gtk_signal_connect (GTK_OBJECT (btnSave), "clicked", + GTK_SIGNAL_FUNC (on_btnSave_clicked), NULL); + gtk_signal_connect (GTK_OBJECT (btnCancel), "clicked", + GTK_SIGNAL_FUNC (on_btnCancel_clicked), NULL); + + return CfgWnd; +} + +GtkWidget* +create_AboutWnd (void) +{ + GtkWidget *AboutWnd; + GtkWidget *fixed8; + GtkWidget *bntAClose; + GtkWidget *label13; + GtkWidget *label15; + GtkWidget *label21; + GtkWidget *label19; + + AboutWnd = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_object_set_data (GTK_OBJECT (AboutWnd), "AboutWnd", AboutWnd); + gtk_container_set_border_width (GTK_CONTAINER (AboutWnd), 12); + gtk_window_set_title (GTK_WINDOW (AboutWnd), _("About")); + gtk_window_set_position (GTK_WINDOW (AboutWnd), GTK_WIN_POS_CENTER); + gtk_window_set_modal (GTK_WINDOW (AboutWnd), TRUE); + gtk_window_set_policy (GTK_WINDOW (AboutWnd), FALSE, FALSE, FALSE); + + fixed8 = gtk_fixed_new (); + gtk_widget_ref (fixed8); + gtk_object_set_data_full (GTK_OBJECT (AboutWnd), "fixed8", fixed8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fixed8); + gtk_container_add (GTK_CONTAINER (AboutWnd), fixed8); + + bntAClose = gtk_button_new_with_label (_("OK")); + gtk_widget_ref (bntAClose); + gtk_object_set_data_full (GTK_OBJECT (AboutWnd), "bntAClose", bntAClose, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (bntAClose); + gtk_fixed_put (GTK_FIXED (fixed8), bntAClose, 136, 184); + gtk_widget_set_uposition (bntAClose, 136, 184); + gtk_widget_set_usize (bntAClose, 88, 24); + + label13 = gtk_label_new (_("Adapted from P.E.Op.S OpenGL GPU by Pete Bernert")); + gtk_widget_ref (label13); + gtk_object_set_data_full (GTK_OBJECT (AboutWnd), "label13", label13, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label13); + gtk_fixed_put (GTK_FIXED (fixed8), label13, 0, 8); + gtk_widget_set_uposition (label13, 0, 8); + gtk_widget_set_usize (label13, 360, 16); + + label15 = gtk_label_new (_("Homepage: http://www.pbernert.com")); + gtk_widget_ref (label15); + gtk_object_set_data_full (GTK_OBJECT (AboutWnd), "label15", label15, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label15); + gtk_fixed_put (GTK_FIXED (fixed8), label15, 0, 40); + gtk_widget_set_uposition (label15, 0, 40); + gtk_widget_set_usize (label15, 360, 16); + + label21 = gtk_label_new ("Compile date: " __DATE__); + gtk_widget_ref (label21); + gtk_object_set_data_full (GTK_OBJECT (AboutWnd), "label21", label21, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label21); + gtk_fixed_put (GTK_FIXED (fixed8), label21, 0, 136); + gtk_widget_set_uposition (label21, 0, 136); + gtk_widget_set_usize (label21, 360, 16); + + label19 = gtk_label_new (_("Version: 1.78")); + gtk_widget_ref (label19); + gtk_object_set_data_full (GTK_OBJECT (AboutWnd), "label19", label19, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label19); + gtk_fixed_put (GTK_FIXED (fixed8), label19, 0, 104); + gtk_widget_set_uposition (label19, 0, 104); + gtk_widget_set_usize (label19, 360, 16); + + gtk_signal_connect (GTK_OBJECT (AboutWnd), "destroy", + GTK_SIGNAL_FUNC (on_AboutWnd_destroy), + NULL); + gtk_signal_connect (GTK_OBJECT (bntAClose), "clicked", + GTK_SIGNAL_FUNC (on_bntAClose_clicked), + NULL); + + return AboutWnd; +} diff --git a/plugins/peopsxgl/gpucfg/interface.h b/plugins/peopsxgl/gpucfg/interface.h new file mode 100644 index 00000000..4f507ae6 --- /dev/null +++ b/plugins/peopsxgl/gpucfg/interface.h @@ -0,0 +1,6 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +GtkWidget* create_CfgWnd (void); +GtkWidget* create_AboutWnd (void); diff --git a/plugins/peopsxgl/gpucfg/main.c b/plugins/peopsxgl/gpucfg/main.c new file mode 100644 index 00000000..5c38737f --- /dev/null +++ b/plugins/peopsxgl/gpucfg/main.c @@ -0,0 +1,548 @@ +#include "config.h" + +#include + +#include "interface.h" +#include "support.h" +#include +#include +#include +#include + +#ifdef ENABLE_NLS +#include +#include +#endif + +#define SETCHECK(winame) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON ((GtkWidget*) gtk_object_get_data (GTK_OBJECT (CfgWnd),winame)), TRUE) +#define SETEDIT(winame,sz) gtk_entry_set_text(GTK_ENTRY((GtkWidget*) gtk_object_get_data (GTK_OBJECT (CfgWnd),winame)), sz) +#define SETEDITVAL(winame,v) sprintf(t,"%d",v);gtk_entry_set_text(GTK_ENTRY((GtkWidget*) gtk_object_get_data (GTK_OBJECT (CfgWnd),winame)), t) +#define SETLIST(winame,v) gtk_list_select_item(GTK_LIST(GTK_COMBO((GtkWidget*) gtk_object_get_data (GTK_OBJECT (CfgWnd),winame))->list),v) + +static GtkWidget * wndMain=0; + +int main (int argc, char *argv[]) +{ + GtkWidget *CfgWnd; + FILE *in;char t[256];int len,val; + char * pB, * p; + + if(argc!=2) return 0; + if(strcmp(argv[1],"CFG")!=0 && strcmp(argv[1],"ABOUT")!=0) + return 0; + +#ifdef ENABLE_NLS + setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + + gtk_set_locale (); + gtk_init (&argc, &argv); + + if (strcmp(argv[1],"ABOUT") == 0) + { + CfgWnd = create_AboutWnd (); + gtk_widget_show (CfgWnd); + gtk_main (); + return 0; + } + + CfgWnd = create_CfgWnd (); + wndMain = CfgWnd; + + in = fopen("gpuPeopsMesaGL.cfg","rb"); + if(in) + { + pB=(char *)malloc(32767); + memset(pB,0,32767); + len = fread(pB, 1, 32767, in); + fclose(in); + } + else pB=0; + + val=640; + if(pB) + { + strcpy(t,"\nResX");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<10) val=10; + } + SETEDITVAL("edtXSize",val); + + val=480; + if(pB) + { + strcpy(t,"\nResY");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<10) val=10; + } + SETEDITVAL("edtYSize",val); + + val=0; + if(pB) + { + strcpy(t,"\nKeepRatio");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkKeepRatio"); + + val=0; + if(pB) + { + strcpy(t,"\nVRamSize");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1024) val=1024; + } + SETEDITVAL("edtMaxTex",val); + + val=0; + if(pB) + { + strcpy(t,"\n15bitMdec");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chk15bitMdec"); + + val=0; + if(pB) + { + strcpy(t,"\nHiResTextures");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>2) val=2; + } + SETLIST("cmbHiresTex",val); + + val=0; + if(pB) + { + strcpy(t,"\nFullScreen");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkFullScreen"); + + val=0; + if(pB) + { + strcpy(t,"\nScanLines");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkScanlines"); + + val=0; + if(pB) + { + strcpy(t,"\nScanLinesBlend");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<-1) val=-1; + if(val>255) val=255; + } + SETEDITVAL("edtScanBlend",val); + + val=1; + if(pB) + { + strcpy(t,"\nFrameTextures");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>3) val=3; + } + SETLIST("cmbFrameTex",val); + + val=0; + if(pB) + { + strcpy(t,"\nFrameAccess");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>4) val=4; + } + SETLIST("cmbFrameAcc",val); + + val=0; + if(pB) + { + strcpy(t,"\nTexFilter");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>6) val=6; + } + SETLIST("cmbFilter",val); + + val=0; + if(pB) + { + strcpy(t,"\nAdvancedBlend");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkABlend"); + + val=0; + if(pB) + { + strcpy(t,"\nDithering");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkDither"); + + val=0; + if(pB) + { + strcpy(t,"\nLineMode");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkLinemode"); + + val=0; + if(pB) + { + strcpy(t,"\nShowFPS");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkShowFPS"); + + val=1; + if(pB) + { + strcpy(t,"\nUseFrameLimit");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkFPSLimit"); + + val=0; + if(pB) + { + strcpy(t,"\nUseFrameSkip");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkFPSSkip"); + + val=2; + if(pB) + { + strcpy(t,"\nFPSDetection");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len)+1; + if(val<1) val=1; + if(val>2) val=2; + } + if(val==2) SETCHECK("rdbLimAuto"); + if(val==1) SETCHECK("rdbLimMan"); + + val=200; + if(pB) + { + strcpy(t,"\nFrameRate");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1000) val=1000; + } + SETEDITVAL("edtFPSlim",val); + + val=2; + if(pB) + { + strcpy(t,"\nOffscreenDrawing");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>4) val=4; + } + SETLIST("cmbOffscreen",val); + + val=1; + if(pB) + { + strcpy(t,"\nOpaquePass");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkOpaque"); + + val=0; + if(pB) + { + strcpy(t,"\nAntiAlias");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkAntiA"); + + val=0; + if(pB) + { + strcpy(t,"\nTexQuality");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>4) val=4; + } + SETLIST("cmbQuality",val); + + val=0; + if(pB) + { + strcpy(t,"\nMaskDetect");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkMaskBit"); + + val=1; + if(pB) + { + strcpy(t,"\nFastMdec");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkFastMdec"); + + val=0; + if(pB) + { + strcpy(t,"\nOGLExtensions");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkExtensions"); + + val=0; + if(pB) + { + strcpy(t,"\nScreenSmoothing");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkBlur"); + + val=0; + if(pB) + { + strcpy(t,"\nUseFixes");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + if(val<0) val=0; + if(val>1) val=1; + } + if(val) SETCHECK("chkGameFixes"); + + val=0; + if(pB) + { + strcpy(t,"\nCfgFixes");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;} + if(p) val=atoi(p+len); + } + + for(len=0;len<18;len++) + { + if(val & (1<'9')) p++; + if(*p==0 || *p=='\n') return; + ps=p; + while((*p>='0' && *p<='9') || *p=='-') p++; + pC=(char *)malloc(32767); + strcpy(pC,p); + strcpy(ps,t); + strcat(pB,pC); + free(pC); + } + else + { + strcat(pB,pE); + strcat(pB," = "); + strcat(pB,t); + strcat(pB,"\n"); + } +} + +//////////////////////////////////////////////////////////////////////////////////////////////// + +#define GETEDITVAL(winame) atoi(gtk_entry_get_text(GTK_ENTRY((GtkWidget*) gtk_object_get_data (GTK_OBJECT (wndMain),winame)))) +#define GETCHECK(winame) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON ((GtkWidget*) gtk_object_get_data (GTK_OBJECT (wndMain),winame)))?1:0 +#define GETLIST(winame) atoi(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO((GtkWidget*) gtk_object_get_data (GTK_OBJECT (wndMain),winame))->entry))) + +void SaveConfig(void) +{ + FILE *in;int len,val;char * pB;char t[16]; + + pB=(char *)malloc(32767); + memset(pB,0,32767); + + in = fopen("gpuPeopsMesaGL.cfg","rb"); + if(in) + { + len = fread(pB, 1, 32767, in); + fclose(in); + } + + /////////////////////////////////////////////////////////////////////////////// + + val=GETEDITVAL("edtXSize"); + if(val<10) val=10; + SetCfgVal(pB,"\nResX",val); + + val=GETEDITVAL("edtYSize"); + if(val<10) val=10; + SetCfgVal(pB,"\nResY",val); + + val=GETCHECK("chkKeepRatio"); + SetCfgVal(pB,"\nKeepRatio",val); + + val=GETEDITVAL("edtMaxTex"); + if(val<0) val=0; + if(val>1024) val=1024; + SetCfgVal(pB,"\nVRamSize",val); + + val=GETCHECK("chk15bitMdec"); + SetCfgVal(pB,"\n15bitMdec",val); + + val=GETLIST("cmbHiresTex"); + SetCfgVal(pB,"\nHiResTextures",val); + + val=GETCHECK("chkFullScreen"); + SetCfgVal(pB,"\nFullScreen",val); + + val=GETCHECK("chkScanlines"); + SetCfgVal(pB,"\nScanLines",val); + + val=GETEDITVAL("edtScanBlend"); + if(val<-1) val=-1; + if(val>255) val=255; + SetCfgVal(pB,"\nScanLinesBlend",val); + + val=GETLIST("cmbFrameTex"); + SetCfgVal(pB,"\nFrameTextures",val); + + val=GETLIST("cmbFrameAcc"); + SetCfgVal(pB,"\nFrameAccess",val); + + val=GETLIST("cmbFilter"); + SetCfgVal(pB,"\nTexFilter",val); + + val=GETCHECK("chkABlend"); + SetCfgVal(pB,"\nAdvancedBlend",val); + + val=GETCHECK("chkDither"); + SetCfgVal(pB,"\nDithering",val); + + val=GETCHECK("chkLinemode"); + SetCfgVal(pB,"\nLineMode",val); + + val=GETCHECK("chkShowFPS"); + SetCfgVal(pB,"\nShowFPS",val); + + val=GETCHECK("chkFPSLimit"); + SetCfgVal(pB,"\nUseFrameLimit",val); + + val=GETCHECK("chkFPSSkip"); + SetCfgVal(pB,"\nUseFrameSkip",val); + + val=GETCHECK("rdbLimAuto"); + if(val) val=1; else val=0; + SetCfgVal(pB,"\nFPSDetection",val); + + val=GETEDITVAL("edtFPSlim"); + if(val<0) val=0; + if(val>1000) val=1000; + SetCfgVal(pB,"\nFrameRate",val); + + val=GETLIST("cmbOffscreen"); + SetCfgVal(pB,"\nOffscreenDrawing",val); + + val=GETCHECK("chkOpaque"); + SetCfgVal(pB,"\nOpaquePass",val); + + val=GETCHECK("chkAntiA"); + SetCfgVal(pB,"\nAntiAlias",val); + + val=GETLIST("cmbQuality"); + SetCfgVal(pB,"\nTexQuality",val); + + val=GETCHECK("chkMaskBit"); + SetCfgVal(pB,"\nMaskDetect",val); + + val=GETCHECK("chkFastMdec"); + SetCfgVal(pB,"\nFastMdec",val); + + val=GETCHECK("chkExtensions"); + SetCfgVal(pB,"\nOGLExtensions",val); + + val=GETCHECK("chkBlur"); + SetCfgVal(pB,"\nScreenSmoothing",val); + + val=GETCHECK("chkGameFixes"); + SetCfgVal(pB,"\nUseFixes",val); + + val=0; + for(len=0;len<18;len++) + { + sprintf(t,"chkFix%d",len); + if(GETCHECK(t)) val|=(1< +#include +#include +#include + +#include + +#include "support.h" + +/* This is an internally used function to check if a pixmap file exists. */ +static gchar* check_file_exists (const gchar *directory, + const gchar *filename); + +/* This is an internally used function to create pixmaps. */ +static GtkWidget* create_dummy_pixmap (GtkWidget *widget); + +GtkWidget* +lookup_widget (GtkWidget *widget, + const gchar *widget_name) +{ + GtkWidget *parent, *found_widget; + + for (;;) + { + if (GTK_IS_MENU (widget)) + parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); + else + parent = widget->parent; + if (parent == NULL) + break; + widget = parent; + } + + found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget), + widget_name); + if (!found_widget) + g_warning ("Widget not found: %s", widget_name); + return found_widget; +} + +/* This is a dummy pixmap we use when a pixmap can't be found. */ +static char *dummy_pixmap_xpm[] = { +/* columns rows colors chars-per-pixel */ +"1 1 1 1", +" c None", +/* pixels */ +" " +}; + +/* This is an internally used function to create pixmaps. */ +static GtkWidget* +create_dummy_pixmap (GtkWidget *widget) +{ + GdkColormap *colormap; + GdkPixmap *gdkpixmap; + GdkBitmap *mask; + GtkWidget *pixmap; + + colormap = gtk_widget_get_colormap (widget); + gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask, + NULL, dummy_pixmap_xpm); + if (gdkpixmap == NULL) + g_error ("Couldn't create replacement pixmap."); + pixmap = gtk_pixmap_new (gdkpixmap, mask); + gdk_pixmap_unref (gdkpixmap); + gdk_bitmap_unref (mask); + return pixmap; +} + +static GList *pixmaps_directories = NULL; + +/* Use this function to set the directory containing installed pixmaps. */ +void +add_pixmap_directory (const gchar *directory) +{ + pixmaps_directories = g_list_prepend (pixmaps_directories, + g_strdup (directory)); +} + +/* This is an internally used function to create pixmaps. */ +GtkWidget* +create_pixmap (GtkWidget *widget, + const gchar *filename) +{ + gchar *found_filename = NULL; + GdkColormap *colormap; + GdkPixmap *gdkpixmap; + GdkBitmap *mask; + GtkWidget *pixmap; + GList *elem; + + if (!filename || !filename[0]) + return create_dummy_pixmap (widget); + + /* We first try any pixmaps directories set by the application. */ + elem = pixmaps_directories; + while (elem) + { + found_filename = check_file_exists ((gchar*)elem->data, filename); + if (found_filename) + break; + elem = elem->next; + } + + /* If we haven't found the pixmap, try the source directory. */ + if (!found_filename) + { + found_filename = check_file_exists ("../pixmaps", filename); + } + + if (!found_filename) + { + g_warning ("Couldn't find pixmap file: %s", filename); + return create_dummy_pixmap (widget); + } + + colormap = gtk_widget_get_colormap (widget); + gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask, + NULL, found_filename); + if (gdkpixmap == NULL) + { + g_warning ("Error loading pixmap file: %s", found_filename); + g_free (found_filename); + return create_dummy_pixmap (widget); + } + g_free (found_filename); + pixmap = gtk_pixmap_new (gdkpixmap, mask); + gdk_pixmap_unref (gdkpixmap); + gdk_bitmap_unref (mask); + return pixmap; +} + +/* This is an internally used function to check if a pixmap file exists. */ +gchar* +check_file_exists (const gchar *directory, + const gchar *filename) +{ + gchar *full_filename; + struct stat s; + gint status; + + full_filename = (gchar*) g_malloc (strlen (directory) + 1 + + strlen (filename) + 1); + strcpy (full_filename, directory); + strcat (full_filename, G_DIR_SEPARATOR_S); + strcat (full_filename, filename); + + status = stat (full_filename, &s); + if (status == 0 && S_ISREG (s.st_mode)) + return full_filename; + g_free (full_filename); + return NULL; +} diff --git a/plugins/peopsxgl/gpucfg/support.h b/plugins/peopsxgl/gpucfg/support.h new file mode 100644 index 00000000..aee31f93 --- /dev/null +++ b/plugins/peopsxgl/gpucfg/support.h @@ -0,0 +1,38 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +/* + * Public Functions. + */ + +/* + * This function returns a widget in a component created by Glade. + * Call it with the toplevel widget in the component (i.e. a window/dialog), + * or alternatively any widget in the component, and the name of the widget + * you want returned. + */ +GtkWidget* lookup_widget (GtkWidget *widget, + const gchar *widget_name); + +/* get_widget() is deprecated. Use lookup_widget instead. */ +#define get_widget lookup_widget + +/* Use this function to set the directory containing installed pixmaps. */ +void add_pixmap_directory (const gchar *directory); + + +/* + * Private Functions. + */ + +/* This is used to create the pixmaps in the interface. */ +GtkWidget* create_pixmap (GtkWidget *widget, + const gchar *filename); + diff --git a/plugins/peopsxgl/key.c b/plugins/peopsxgl/key.c new file mode 100644 index 00000000..25afa172 --- /dev/null +++ b/plugins/peopsxgl/key.c @@ -0,0 +1,173 @@ +/*************************************************************************** + key.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_KEY + +#include "externals.h" +#include "menu.h" +#include "texture.h" +#include "draw.h" +#include "fps.h" + +//////////////////////////////////////////////////////////////////////// +// KeyBoard handler stuff +//////////////////////////////////////////////////////////////////////// + +uint32_t ulKeybits = 0; + +//////////////////////////////////////////////////////////////////////// +// keyboard handler (LINUX) +//////////////////////////////////////////////////////////////////////// + +#define VK_INSERT 65379 +#define VK_HOME 65360 +#define VK_PRIOR 65365 +#define VK_NEXT 65366 +#define VK_END 65367 +#define VK_DEL 65535 +#define VK_F5 65474 + +void GPUkeypressed(int keycode) +{ + switch(keycode) + { + case VK_F5: + bSnapShot=1; + break; + + case VK_INSERT: + ulKeybits|=KEY_RESETTEXSTORE; + if(iBlurBuffer) iBlurBuffer=0; + else iBlurBuffer=1; + break; + + case VK_DEL: + if(ulKeybits&KEY_SHOWFPS) + { + ulKeybits&=~KEY_SHOWFPS; + HideText(); + DestroyPic(); + } + else + { + ulKeybits|=KEY_SHOWFPS; + szDispBuf[0]=0; + BuildDispMenu(0); + + } + break; + + case VK_PRIOR: BuildDispMenu(-1); break; + case VK_NEXT: BuildDispMenu( 1); break; + case VK_END: SwitchDispMenu( 1); break; + case VK_HOME: SwitchDispMenu(-1); break; + } + +} + +void InitKeyHandler(void) +{ +} + +void ExitKeyHandler(void) +{ +} + +//////////////////////////////////////////////////////////////////////// +// reset stuff on special keyboard commands +//////////////////////////////////////////////////////////////////////// + +void ResetStuff(void) +{ + ResetTextureArea(TRUE); + ulKeybits&=~KEY_RESETTEXSTORE; + + if(ulKeybits&KEY_BLACKWHITE) + { + if(bUseFixes) {bUseFixes=FALSE;dwActFixes=0;} + else {bUseFixes=TRUE; dwActFixes=dwCfgFixes;} + SetExtGLFuncs(); + if(iFrameLimit==2) SetAutoFrameCap(); + ulKeybits&=~KEY_BLACKWHITE; + } + + if(ulKeybits&KEY_RESETFILTER) + { + if(ulKeybits&KEY_STEPDOWN) + iFilterType--; + else iFilterType++; + if(iFilterType>6) iFilterType=0; + if(iFilterType<0) iFilterType=6; + SetExtGLFuncs(); + ulKeybits&=~(KEY_RESETFILTER|KEY_STEPDOWN); + BuildDispMenu(0); + } + + if(ulKeybits&KEY_RESETOPAQUE) + { + bOpaquePass=!bOpaquePass; + SetExtGLFuncs(); + ulKeybits&=~KEY_RESETOPAQUE; + BuildDispMenu(0); + } + + if(ulKeybits&KEY_RESETADVBLEND) + { + bAdvancedBlend=!bAdvancedBlend; + SetExtGLFuncs(); + ulKeybits&=~KEY_RESETADVBLEND; + BuildDispMenu(0); + } + + if(ulKeybits&KEY_RESETDITHER) + { + bDrawDither=!bDrawDither; + if(bDrawDither) glEnable(GL_DITHER); + else glDisable(GL_DITHER); + ulKeybits&=~KEY_RESETDITHER; + BuildDispMenu(0); + } + + if(ulKeybits & KEY_TOGGLEFBTEXTURE) + { + if(ulKeybits&KEY_STEPDOWN) + iFrameTexType--; + else iFrameTexType++; + if(iFrameTexType>3) iFrameTexType=0; + if(iFrameTexType<0) iFrameTexType=3; + if(gTexFrameName!=0) + glDeleteTextures(1, &gTexFrameName); + gTexFrameName=0; + ulKeybits&=~(KEY_TOGGLEFBTEXTURE|KEY_STEPDOWN); + } + + if(ulKeybits & KEY_TOGGLEFBREAD) + { + if(ulKeybits&KEY_STEPDOWN) + iFrameReadType--; + else iFrameReadType++; + if(iFrameReadType>4) iFrameReadType=0; + if(iFrameReadType<0) iFrameReadType=4; + if(iFrameReadType==4) bFullVRam=TRUE; + else bFullVRam=FALSE; + iRenderFVR=0; + ulKeybits&=~(KEY_TOGGLEFBREAD|KEY_STEPDOWN); + } +} diff --git a/plugins/peopsxgl/key.h b/plugins/peopsxgl/key.h new file mode 100644 index 00000000..3a523cff --- /dev/null +++ b/plugins/peopsxgl/key.h @@ -0,0 +1,21 @@ +/*************************************************************************** + key.h - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +void InitKeyHandler(void); +void ExitKeyHandler(void); +void ResetStuff(void); \ No newline at end of file diff --git a/plugins/peopsxgl/menu.c b/plugins/peopsxgl/menu.c new file mode 100644 index 00000000..f26d5ce2 --- /dev/null +++ b/plugins/peopsxgl/menu.c @@ -0,0 +1,1443 @@ +/*************************************************************************** + menu.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_MENU + +#include "externals.h" +#include "draw.h" +#include "menu.h" +#include "gpu.h" + +uint32_t dwCoreFlags=0; +PSXPoint_t ptCursorPoint[8]; +unsigned short usCursorActive=0; + +//////////////////////////////////////////////////////////////////////// +// field with menu chars... like good old C64 time :) +//////////////////////////////////////////////////////////////////////// + +GLubyte texrasters[40][12]= { + +// 0,0 FPS +{0x00,0x60,0x60,0x60,0x60,0x60,0x7e,0x60,0x60,0x60,0x60,0x7f}, +{0x00,0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18,0x18,0x1f}, +{0x00,0x03,0x06,0x00,0x00,0x00,0xc3,0x66,0x66,0x66,0x66,0xc3}, +{0x00,0xf0,0x18,0x18,0x18,0x18,0xf0,0x00,0x00,0x00,0x18,0xf0}, +// 4,0 0 +{0x00,0x3c,0x66,0xc3,0xe3,0xf3,0xdb,0xcf,0xc7,0xc3,0x66,0x3c}, +// 5,0 1 +{0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x38,0x18}, +// 6,0 2 +{0x00,0xff,0xc0,0xc0,0x60,0x30,0x18,0x0c,0x06,0x03,0xe7,0x7e}, +// 7,0 3 + +{0x00,0x7e,0xe7,0x03,0x03,0x07,0x7e,0x07,0x03,0x03,0xe7,0x7e}, +// 0,1 4 +{0x00,0x0c,0x0c,0x0c,0x0c,0x0c,0xff,0xcc,0x6c,0x3c,0x1c,0x0c}, +// 1,1 5 +{0x00,0x7e,0xe7,0x03,0x03,0x07,0xfe,0xc0,0xc0,0xc0,0xc0,0xff}, +// 2,1 6 +{0x00,0x7e,0xe7,0xc3,0xc3,0xc7,0xfe,0xc0,0xc0,0xc0,0xe7,0x7e}, +// 3,1 7 +{0x00,0x30,0x30,0x30,0x30,0x18,0x0c,0x06,0x03,0x03,0x03,0xff}, +// 4,1 8 +{0x00,0x7e,0xe7,0xc3,0xc3,0xe7,0x7e,0xe7,0xc3,0xc3,0xe7,0x7e}, +// 5,1 9 +{0x00,0x7e,0xe7,0x03,0x03,0x03,0x7f,0xe7,0xc3,0xc3,0xe7,0x7e}, +// 6,1 smiley +{0x00,0x3c,0x42,0x99,0xa5,0x81,0xa5,0x81,0x42,0x3c,0x00,0x00}, +// 7,1 sun +{0x00,0x08,0x49,0x2a,0x1c,0x7f,0x1c,0x2a,0x49,0x08,0x00,0x00}, + +// 0,2 fl + empty box +{0xff,0x81,0x81,0x81,0xff,0x00,0x87,0x84,0x84,0xf4,0x84,0xf8}, +// 1,2 fs + grey box +{0xff,0xab,0xd5,0xab,0xff,0x00,0x87,0x81,0x87,0xf4,0x87,0xf8}, +// 2,2 od + filled box +{0xff,0xff,0xff,0xff,0xff,0x00,0x66,0x95,0x95,0x95,0x96,0x60}, +// 3,2 fi + half grey box +{0xff,0xa1,0xd1,0xa1,0xff,0x00,0x82,0x82,0x82,0xe2,0x82,0xf8}, +// 4,2 di + half filled box +{0xff,0xf1,0xf1,0xf1,0xff,0x00,0xe2,0x92,0x92,0x92,0x92,0xe0}, +// 5,2 am + grey box +{0xff,0xab,0xd5,0xab,0xff,0x00,0x95,0x95,0x95,0xf7,0x95,0x60}, +// 6,2 ab + filled box +{0xff,0xff,0xff,0xff,0xff,0x00,0x97,0x95,0x96,0xf5,0x96,0x60}, +// 7,2 fa +{0x00,0x00,0x00,0x00,0x00,0x00,0x85,0x85,0x87,0xf5,0x82,0xf8}, + +// 0,3 fb +{0xff,0x8b,0x85,0x8b,0xff,0x00,0x82,0x82,0x82,0xe2,0x87,0xf8}, +// 1,3 gf +{0xff,0x8f,0x8f,0x8f,0xff,0x00,0x74,0x94,0x96,0xb4,0x87,0x70}, +// 2,3 D +{0xff,0x00,0xfc,0xc6,0xc3,0xc3,0xc3,0xc3,0xc6,0xfc,0x00,0xff}, +// 3,3 G +{0xff,0x00,0x3e,0x63,0xc3,0xc7,0xc0,0xc0,0x63,0x3e,0x00,0xff}, +// 4,3 +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, +// 5,3 +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, +// 6,3 tex pal smiley +{0x00,0x3c,0x7e,0xe7,0xdb,0xff,0xdb,0xff,0x7e,0x3c,0x00,0x00}, +// 7,3 +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + +// 0,4 subtract blending (moon) +{0x00,0x06,0x1c,0x38,0x78,0x78,0x78,0x38,0x1c,0x06,0x00,0x00}, +// 1,4 blurring +{0x00,0x7e,0x93,0xa5,0x93,0xc9,0x93,0xa5,0x93,0x7e,0x00,0x00}, +// 2,4 (M) +{0xff,0x00,0xc3,0xc3,0xc3,0xdb,0xff,0xe7,0xc3,0x81,0x00,0xff}, +// 3,4 (A) +{0xff,0x00,0xc3,0xc3,0xff,0xc3,0xc3,0x66,0x3c,0x18,0x00,0xff}, +// 4,4 blank +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, +// 5,4 +{0x00,0xfe,0xc5,0x62,0x35,0x18,0x0c,0xc6,0xc6,0x7c,0x00,0x00}, +// 6,4 <- +{0x00,0x00,0x00,0x00,0x00,0x10,0x30,0x7f,0xff,0x7f,0x30,0x10}, +// 7,4 . +{0x00,0x38,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} +}; + +//////////////////////////////////////////////////////////////////////// +// create lists/stuff for fonts +// (as a matter of fact: no more display list used, just a texture) +//////////////////////////////////////////////////////////////////////// + +GLuint gTexFontName=0; +GLuint gTexPicName=0; +GLuint gTexCursorName=0; + +void MakeDisplayLists(void) // MAKE FONT +{ + GLubyte TexBytes[64][64][3]; // we use a 64x64 texture + int x,y,i,j,n=0; GLubyte col,IB; + + glPixelStorei(GL_UNPACK_ALIGNMENT,1); + + memset(TexBytes,0,64*64*3); + + for(y=0;y<5;y++) // create texture out of raster infos + { + for(x=0;x<8;x++,n++) + { + for(i=0;i<12;i++) + { + IB=texrasters[n][i]; + for(j=0;j<8;j++) + { + if(IB&(1<<(7-j))) col=255; else col=0; + TexBytes[y*12+i][x*8+j][0]=col; + TexBytes[y*12+i][x*8+j][1]=col; + TexBytes[y*12+i][x*8+j][2]=col; + } + } + } + } + + glGenTextures(1, &gTexFontName); // set tex params for font texture + glBindTexture(GL_TEXTURE_2D, gTexFontName); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, 3, 64, 64, 0, GL_RGB, + GL_UNSIGNED_BYTE,TexBytes); +} + +//////////////////////////////////////////////////////////////////////// +// kill existing font stuff +//////////////////////////////////////////////////////////////////////// + +void KillDisplayLists(void) +{ + if(gTexFontName) // del font/info textures + {glDeleteTextures(1,&gTexFontName);gTexFontName=0;} + if(gTexPicName) + {glDeleteTextures(1,&gTexPicName);gTexPicName=0;} + if(gTexCursorName) + {glDeleteTextures(1,&gTexCursorName);gTexCursorName=0;} +} + +//////////////////////////////////////////////////////////////////////// +// display text/infos in gpu menu +//////////////////////////////////////////////////////////////////////// + +#ifdef OWNSCALE +#define DRAWTEXCHAR glTexCoord2f(fX1/256.0f,fY2/256.0f);glVertex3f(fXS1,fYS2,1.0f);glTexCoord2f(fX1/256.0f,fY1/256.0f);glVertex3f(fXS1,fYS1,1.0f);glTexCoord2f(fX2/256.0f,fY1/256.0f);glVertex3f(fXS2,fYS1,1.0f);glTexCoord2f(fX2/256.0f,fY2/256.0f);glVertex3f(fXS2,fYS2,1.0f); +#else +#define DRAWTEXCHAR glTexCoord2f(fX1,fY2);glVertex3f(fXS1,fYS2,1.0f);glTexCoord2f(fX1,fY1);glVertex3f(fXS1,fYS1,1.0f);glTexCoord2f(fX2,fY1);glVertex3f(fXS2,fYS1,1.0f);glTexCoord2f(fX2,fY2);glVertex3f(fXS2,fYS2,1.0f); +#endif + +int iMPos=0; + +void DisplayText(void) +{ + int iX,iY,i; + GLfloat fX1,fY1,fX2,fY2,fYS1,fYS2,fXS1,fXS2,fXS,fXSC,fYSC,fYD; + + glDisable(GL_SCISSOR_TEST); // disable unwanted ogl states + glDisable(GL_ALPHA_TEST); + if(bOldSmoothShaded) {glShadeModel(GL_FLAT);bOldSmoothShaded=FALSE;} + if(bBlendEnable) {glDisable(GL_BLEND);bBlendEnable=FALSE;} + if(!bTexEnabled) {glEnable(GL_TEXTURE_2D);bTexEnabled=TRUE;} + + gTexName=gTexFontName; + glBindTexture(GL_TEXTURE_2D,gTexFontName); // now set font texture + + fYD=fYSC=(GLfloat)PSXDisplay.DisplayMode.y/(GLfloat)iResY; // some pre-calculations + fYS1=12.0f*fYSC;fYSC*=13.0f; + fYS2=0.0f; + fXS= (GLfloat)PSXDisplay.DisplayMode.x/(GLfloat)iResX; + fXSC= 8.0f*fXS;fXS*=10.0f; + fXS1=0.0f; + fXS2=50.0f*fXS; // 3 is one option + +#ifdef OWNSCALE + vertex[0].c.lcol=0xff00ff00; // set menu text color +#else + vertex[0].c.lcol=0xff00ffff; // set menu text color +#endif + + SETCOL(vertex[0]); + + glBegin(GL_QUADS); + +#ifdef OWNSCALE + glTexCoord2f(128.0f/256.0f,240.0f/256.0f); // make blank (ownscale) + glVertex3f(fXS1,fYS2,0.99996f); + glTexCoord2f(128.0f/256.0f,192.0f/256.0f); + glVertex3f(fXS1,fYSC,0.99996f); + glTexCoord2f(160.0f/256.0f,192.0f/256.0f); + glVertex3f(fXS2,fYSC,0.99996f); + glTexCoord2f(160.0f/256.0f,240.0f/256.0f); + glVertex3f(fXS2,fYS2,0.99996f); +#else + glTexCoord2f(128.0f,240.0f); // make blank + glVertex3f(fXS1,fYS2,0.99996f); + glTexCoord2f(128.0f,192.0f); + glVertex3f(fXS1,fYSC,0.99996f); + glTexCoord2f(160.0f,192.0f); + glVertex3f(fXS2,fYSC,0.99996f); + glTexCoord2f(160.0f,240.0f); + glVertex3f(fXS2,fYS2,0.99996f); +#endif + + fXS1=0.0f;fXS2=4.0f*fXSC; // draw fps + fX1=0.0f; fX2=128.0f; + fY1=0.0f; fY2=48.0f; + DRAWTEXCHAR; + + fYSC=fXS1=3.0f*fXS; // start pos of numbers + + i=0;do // paint fps numbers + { + iX=4;iY=4; + if(szDispBuf[i]>='0' && szDispBuf[i]<='3') + {iX=4+szDispBuf[i]-'0';iY=0;} + else + if(szDispBuf[i]>='4' && szDispBuf[i]<='9') + {iX=szDispBuf[i]-'4';iY=1;} + else + if(szDispBuf[i]=='.') + {iX=7;iY=4;} + else + if(szDispBuf[i]==0) break; + + fX1=(GLfloat)iX*32.0f; fX2=fX1+32.0f; + fY1=(GLfloat)iY*48.0f; fY2=fY1+48.0f; + fXS1+=fXS; + fXS2=fXS1+fXSC; + + DRAWTEXCHAR; + + i++; + } + while(i); + + //----------------------------------------------------// + // draw small chars + //----------------------------------------------------// + + fXS1=12.0f*fXS;fYS1=6.0f*fYD; + fY1=120.0f;fY2=144.0f; + fX1=0.0f;fX2=32.0f; + + for(i=0;i<8;i++) + { + fXS2=fXS1+fXSC; + DRAWTEXCHAR; + fX1+=32.0f;fX2+=32.0f;fXS1+=fYSC; + } + + fY1=168.0f;fY2=192.0f; + fX1=0.0f;fX2=32.0f; + + for(i=0;i<2;i++) + { + fXS2=fXS1+fXSC; + DRAWTEXCHAR; + fX1+=32.0f;fX2+=32.0f;fXS1+=fYSC; + } + + //----------------------------------------------------// + + fYSC=fXS+fXS; + + fYS1=12.0f*fYD; + + if(iBlurBuffer && gTexBlurName) // blur + { + fXS1-=fXS;fY1=192.0f;fY2=240.0f; + fXS2=fXS1+fXSC;fX1=32.0f;fX2=64.0f; + DRAWTEXCHAR; + fXS1+=fXS; + } + + fY1=48.0f;fY2=96.0f; + + if(bGLExt) // packed pixel + { + fXS2=fXS1+fXSC;fX1=192.0f;fX2=224.0f; + DRAWTEXCHAR; + } + + if(glColorTableEXTEx) // tex wnd pal + { + fY1=144.0f;fY2=192.0f; + fXS2=fXS1+fXSC;fX1=192.0f; + if(bGLExt) {fX2=208.0f;fXS2-=fXSC/2.0f;} + else fX2=224.0f; + DRAWTEXCHAR; + fY1=48.0f;fY2=96.0f; + } + + if(!bUseMultiPass && glBlendEquationEXTEx) // multipass blend + { + fY1=192.0f;fY2=240.0f; + fXS1+=fYSC-fXSC;fXS2=fXS1+fXSC;fX1=0.0f;fX2=32.0f; + DRAWTEXCHAR; + fXS1+=fXSC; + fY1=48.0f;fY2=96.0f; + } + else fXS1+=fYSC; + + if(bGLBlend) // modulate2x + { + fXS2=fXS1+fXSC;fX1=224.0f;fX2=256.0f; + DRAWTEXCHAR; + } + + fY1=192.0f;fY2=240.0f; + + if(iHiResTextures) // 2x textures + { + fXS1+=fYSC-fXS;fXS2=fXS1+fXSC; + fX1=160.0f;fX2=192.0f; + DRAWTEXCHAR; + fXS1+=fXS; + } + else fXS1+=fYSC; + + if(dwCoreFlags&1) //A + { + fXS2=fXS1+fXSC;fX1=96.0f;fX2=128.0f; + DRAWTEXCHAR; + } + + if(dwCoreFlags&2) //M + { + fXS2=fXS1+fXSC;fX1=64.0f;fX2=96.0f; + DRAWTEXCHAR; + } + + // 00 -> digital, 01 -> analog, 02 -> mouse, 03 -> gun + if(dwCoreFlags&0xff00) //A/M/G/D + { + int k; + + fXS2=fXS1+fXSC; + + if((dwCoreFlags&0x0f00)==0x0000) // D + { + fY1=144.0f;fY2=192.0f; + fX1=64.0f;fX2=96.0f; + } + else + if((dwCoreFlags&0x0f00)==0x0100) // A + { + fX1=96.0f;fX2=128.0f; + } + else + if((dwCoreFlags&0x0f00)==0x0200) // M + { + fX1=64.0f;fX2=96.0f; + } + else + if((dwCoreFlags&0x0f00)==0x0300) // G + { + fY1=144.0f;fY2=192.0f; + fX1=96.0f;fX2=128.0f; + } + DRAWTEXCHAR; + + k=(dwCoreFlags&0xf000)>>12; // number + fXS1+=fXS; + fXS2=fXS1+fXSC; + iX=4;iY=4; + if(k>=0 && k<=3) + {iX=4+k;iY=0;} + else + if(k>=4 && k<=9) + {iX=k-4;iY=1;} + fX1=(GLfloat)iX*32.0f; fX2=fX1+32.0f; + fY1=(GLfloat)iY*48.0f; fY2=fY1+48.0f; + DRAWTEXCHAR; + } + + fXS1+=fYSC; + + if(lSelectedSlot) // save state num + { + fXS2=fXS1+fXSC; + iX=4;iY=4; + if(lSelectedSlot>=0 && lSelectedSlot<=3) + {iX=4+lSelectedSlot;iY=0;} + else + if(lSelectedSlot>=4 && lSelectedSlot<=9) + {iX=lSelectedSlot-4;iY=1;} + fX1=(GLfloat)iX*32.0f; fX2=fX1+32.0f; + fY1=(GLfloat)iY*48.0f; fY2=fY1+48.0f; + DRAWTEXCHAR; + } + + fXS1=(GLfloat)(13+iMPos*3)*fXS;fXS2=fXS1+fXSC; // arrow + fX1=192.0f; fX2=224.0f; + fY1=192.0f; fY2=240.0f; + DRAWTEXCHAR; + + ///////////////// + + fXS1=12.0f*fXS;fXS2=fXS1+fXSC; + fYS2=6.0f*fYD;fYSC=3.0f*fXS; + fY1=96.0f;fY2=120.0f; + + if(bUseFrameLimit) // frame limit + { + if(iFrameLimit==2) {fX1=64.0f;fX2=96.0f;} + else {fX1=32.0f;fX2=64.0f;} + } + else {fX1=0.0f ;fX2=32.0f;} + DRAWTEXCHAR; + fXS1+=fYSC;fXS2=fXS1+fXSC; + + if(bUseFrameSkip) {fX1=64.0f;fX2=96.0f;} // frame skip + else {fX1=0.0f ;fX2=32.0f;} + DRAWTEXCHAR; + fXS1+=fYSC;fXS2=fXS1+fXSC; + + if(iOffscreenDrawing) fX1=(iOffscreenDrawing+2)*32.0f;// offscreen drawing + else fX1=0.0f; + fX2=fX1+32.0f; + DRAWTEXCHAR; + fXS1+=fYSC;fXS2=fXS1+fXSC; + + if(iFilterType<5) fX1=iFilterType*32.0f; // texture filter + else {fX1=(iFilterType-5)*32.0f;fY1=144.0f;fY2=168.0f;} + fX2=fX1+32.0f; + DRAWTEXCHAR; + if(iFilterType>=5) {fY1=96.0f;fY2=120.0f;} + fXS1+=fYSC;fXS2=fXS1+fXSC; + + if(bDrawDither) {fX1=64.0f;fX2=96.0f;} // dithering + else {fX1=0.0f ;fX2=32.0f;} + DRAWTEXCHAR; + fXS1+=fYSC;fXS2=fXS1+fXSC; + + if(bOpaquePass) {fX1=64.0f;fX2=96.0f;} // opaque pass + else {fX1=0.0f ;fX2=32.0f;} + DRAWTEXCHAR; + fXS1+=fYSC;fXS2=fXS1+fXSC; + + if(bAdvancedBlend) {fX1=64.0f;fX2=96.0f;} // advanced blend + else {fX1=0.0f ;fX2=32.0f;} + DRAWTEXCHAR; + fXS1+=fYSC;fXS2=fXS1+fXSC; + + if(!iFrameReadType) fX1=0.0f; // framebuffer reading + else if(iFrameReadType==2) {fX1=0.0f;fY1=144.0f;fY2=168.0f;} + else fX1=(iFrameReadType+2)*32.0f; + fX2=fX1+32.0f; + DRAWTEXCHAR; + if(iFrameReadType==2) {fY1=96.0f;fY2=120.0f;} + fXS1+=fYSC;fXS2=fXS1+fXSC; + + if(iFrameTexType<2) fX1=iFrameTexType*32.0f; // frame texture + else fX1=iFrameTexType*64.0f; + fX2=fX1+32.0f; + DRAWTEXCHAR; + fXS1+=fYSC;fXS2=fXS1+fXSC; + + if(dwActFixes) {fX1=64.0f;fX2=96.0f;} // game fixes + else {fX1=0.0f ;fX2=32.0f;} + DRAWTEXCHAR; + fXS1+=fYSC;fXS2=fXS1+fXSC; + + ///////////////// + + glEnd(); + + glEnable(GL_ALPHA_TEST); // repair needed states + glEnable(GL_SCISSOR_TEST); +} + +//////////////////////////////////////////////////////////////////////// + +void HideText(void) +{ + GLfloat fYS1,fYS2,fXS1,fXS2,fXS,fXSC,fYSC; + + glDisable(GL_SCISSOR_TEST); // turn off unneeded ogl states + glDisable(GL_ALPHA_TEST); + if(bOldSmoothShaded) {glShadeModel(GL_FLAT);bOldSmoothShaded=FALSE;} + if(bBlendEnable) {glDisable(GL_BLEND);bBlendEnable=FALSE;} + if(bTexEnabled) {glDisable(GL_TEXTURE_2D);bTexEnabled=FALSE;} + + fYSC=(GLfloat)PSXDisplay.DisplayMode.y/(GLfloat)iResY; + fYS1=12.0f*fYSC;fYSC*=13.0f; + fYS2=0.0f; + fXS= (GLfloat)PSXDisplay.DisplayMode.x/(GLfloat)iResX; + fXSC= 8.0f*fXS;fXS*=10.0f; + fXS1=0.0f; + fXS2=50.0f*fXS; + + vertex[0].c.lcol=0xff000000; // black color + SETCOL(vertex[0]); + + glBegin(GL_QUADS); // make one quad + + glVertex3f(fXS1,fYS2,0.99996f); + glVertex3f(fXS1,fYSC,0.99996f); + glVertex3f(fXS2,fYSC,0.99996f); + glVertex3f(fXS2,fYS2,0.99996f); + + glEnd(); + glEnable(GL_ALPHA_TEST); // enable needed ogl states + glEnable(GL_SCISSOR_TEST); +} + +//////////////////////////////////////////////////////////////////////// +// Build Menu buffer (== Dispbuffer without FPS) +//////////////////////////////////////////////////////////////////////// + +void BuildDispMenu(int iInc) +{ + if(!(ulKeybits&KEY_SHOWFPS)) return; // mmm, cheater ;) + + iMPos+=iInc; // up or down + if(iMPos<0) iMPos=9; // wrap around + if(iMPos>9) iMPos=0; +} + +//////////////////////////////////////////////////////////////////////// +// gpu menu actions... +//////////////////////////////////////////////////////////////////////// + +void SwitchDispMenu(int iStep) +{ + if(!(ulKeybits&KEY_SHOWFPS)) return; // tststs + + switch(iMPos) + {////////////////////////////////////////////////////// + case 0: // frame limit + { + int iType=0; + bInitCap = TRUE; + + if(bUseFrameLimit) iType=iFrameLimit; + iType+=iStep; + if(iType<0) iType=2; + if(iType>2) iType=0; + if(iType==0) bUseFrameLimit=FALSE; + else + { + bUseFrameLimit=TRUE; + iFrameLimit=iType; + SetAutoFrameCap(); + } + } + break; + ////////////////////////////////////////////////////// + case 1: // frame skip + bInitCap = TRUE; + bUseFrameSkip=!bUseFrameSkip; + bSkipNextFrame=FALSE; + break; + ////////////////////////////////////////////////////// + case 2: // offscreen drawing + iOffscreenDrawing+=iStep; + if(iOffscreenDrawing>4) iOffscreenDrawing=0; + if(iOffscreenDrawing<0) iOffscreenDrawing=4; + break; + ////////////////////////////////////////////////////// + case 3: // filtering + ulKeybits|=KEY_RESETTEXSTORE; + ulKeybits|=KEY_RESETFILTER; + if(iStep==-1) ulKeybits|=KEY_STEPDOWN; + break; + ////////////////////////////////////////////////////// + case 4: // dithering + ulKeybits|=KEY_RESETTEXSTORE; + ulKeybits|=KEY_RESETDITHER; + break; + ////////////////////////////////////////////////////// + case 5: // alpha multipass + ulKeybits|=KEY_RESETTEXSTORE; + ulKeybits|=KEY_RESETOPAQUE; + break; + ////////////////////////////////////////////////////// + case 6: // advanced blending + ulKeybits|=KEY_RESETTEXSTORE; + ulKeybits|=KEY_RESETADVBLEND; + break; + ////////////////////////////////////////////////////// + case 7: // full vram + ulKeybits|=KEY_RESETTEXSTORE; + ulKeybits|=KEY_TOGGLEFBREAD; + if(iStep==-1) ulKeybits|=KEY_STEPDOWN; + break; + ////////////////////////////////////////////////////// + case 8: // frame buffer texture + ulKeybits|=KEY_RESETTEXSTORE; + ulKeybits|=KEY_TOGGLEFBTEXTURE; + if(iStep==-1) ulKeybits|=KEY_STEPDOWN; + break; + ////////////////////////////////////////////////////// + case 9: // game fixes + ulKeybits|=KEY_RESETTEXSTORE; + ulKeybits|=KEY_BLACKWHITE; + break; + ////////////////////////////////////////////////////// + } + + BuildDispMenu(0); // update info +} + +/////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////// +// Here comes my painting zone... just to paint stuff... like 3DStudio ;) +//////////////////////////////////////////////////////////////////////// + + +/* + 12345678 +1 +2 +3 +4 +5 +6 +7 +8 +9 +0 +1 +2 +3 + + +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} + + + 12345678 +3 +2 +1 +0 +9 +8 +7 +6 +5 111 +4 111 +3 +2 +1 + +{0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} + + + 12345678 +3 1111 +2 11 11 +111 11 +011 111 +911 1111 +811 11 11 +71111 11 +6111 11 +511 11 +4 11 11 +3 1111 +2 +1 + +// 0 +{0x00,0x00,0x3c,0x66,0xc3,0xe3,0xf3,0xdb,0xcf,0xc7,0xc3,0x66,0x3c} +// 1 +{0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x38,0x18} +// 2 +{0x00,0x00,0xff,0xc0,0xc0,0x60,0x30,0x18,0x0c,0x06,0x03,0xe7,0x7e} +// 3 +{0x00,0x00,0x7e,0xe7,0x03,0x03,0x07,0x7e,0x07,0x03,0x03,0xe7,0x7e} +// 4 +{0x00,0x00,0x0c,0x0c,0x0c,0x0c,0x0c,0xff,0xcc,0x6c,0x3c,0x1c,0x0c} +// 5 +{0x00,0x00,0x7e,0xe7,0x03,0x03,0x07,0xfe,0xc0,0xc0,0xc0,0xc0,0xff} +// 6 +{0x00,0x00,0x7e,0xe7,0xc3,0xc3,0xc7,0xfe,0xc0,0xc0,0xc0,0xe7,0x7e} +// 7 +{0x00,0x00,0x30,0x30,0x30,0x30,0x18,0x0c,0x06,0x03,0x03,0x03,0xff} +// 8 +{0x00,0x00,0x7e,0xe7,0xc3,0xc3,0xe7,0x7e,0xe7,0xc3,0xc3,0xe7,0x7e} +// 9 +{0x00,0x00,0x7e,0xe7,0x03,0x03,0x03,0x7f,0xe7,0xc3,0xc3,0xe7,0x7e} + + 12345678123456781234567812345678 +3 11111111 1111111 111111 +2 11 11 11 11 11 +1 11 11 11 11 +0 11 11 11 11 +9 11 11 11 11 +8 111111 1111111 111111 +7 11 11 11 +6 11 11 11 +5 11 11 11 +4 11 11 11 11 +3 11 11 111111 +2 + +{0x00,0x60,0x60,0x60,0x60,0x60,0x7e,0x60,0x60,0x60,0x60,0x7f}, +{0x00,0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18,0x18,0x1f}, +{0x00,0x03,0x06,0x00,0x00,0x00,0xc3,0x66,0x66,0x66,0x66,0xc3}, +{0x00,0xf0,0x18,0x18,0x18,0x18,0xf0,0x00,0x00,0x00,0x18,0xf0}, + + 12345678 +311111111 0xff +211 0xc0 +111 0xc0 +011 0xc0 +911 0xc0 +8111111 0xfc +711 0xc0 +611 0xc0 +511 0xc0 +411 0xc0 +311 0xc0 +2 0x00 +1 0x00 + +{0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0x3f,0xc0,0xc0,0xc0,0xc0,0xff} + + + 12345678 +31111111 0xfe +211 11 0xc3 +111 11 0xc3 +011 11 0xc3 +911 11 0xc3 +81111111 0xfe +711 0xc0 +611 0xc0 +511 0xc0 +411 0xc0 +311 0xc0 +2 0x00 +1 0x00 + + +{0x00,0x00,0xc0,0xc0,0xc0,0xc0,0xc0,0x7f,0xc3,0xc3,0xc3,0xc3,0x7f} + + 12345678 +3 111111 0x7e +211 11 0xc3 +111 0xc0 +011 0xc0 +911 0xc0 +8 111111 0x7e +7 11 0x03 +6 11 0x03 +5 11 0x03 +411 11 0xc3 +3 111111 0x7e +2 0x00 +1 0x00 + +{0x00,0x00,0x7e,0xc3,0x03,0x03,0x03,0x7e,0xc0,0xc0,0xc0,0xc3,0x7e} + + 12345678 +3 0x00 +2 1111111 0x7f +1 11 0x60 +0 11 0x60 +9 11111 0x7c +8 11 0x60 +7 11 0x60 +6 11 0x60 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x7c,0x60,0x60,0x7f,0x00} + + 12345678 +3 0x00 +2 1111111 0x7f +1 11 0x60 +0 11 0x60 +9 11111 0x7c +8 11 0x60 +7 11 0x60 +6 11 0x60 +5 0x00 +4 1 0x08 +3 111 0x1c +2 11111 0x3e +1 1111111 0x7f + +{0x7f,0x3e,0x1c,0x08,0x00,0x60,0x60,0x60,0x7c,0x60,0x60,0x7f,0x00} + + 12345678 +3 0x00 +2 11 11 0x63 +1 11 11 0x63 +0 11 11 0x63 +9 11 11 0x63 +8 11 1 11 0x6b +7 1111111 0x7f +6 11 11 0x36 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x36,0x7f,0x6b,0x63,0x63,0x63,0x63,0x00} + + 12345678 +3 0x00 +2 11 11 0x63 +1 11 11 0x63 +0 11 11 0x63 +9 11 11 0x63 +8 11 1 11 0x6b +7 1111111 0x7f +6 11 11 0x36 +5 0x00 +4 1 0x08 +3 111 0x1c +2 11111 0x3e +1 1111111 0x7f + +{0x7f,0x3e,0x1c,0x08,0x00,0x36,0x7f,0x6b,0x63,0x63,0x63,0x63,0x00} + + + 12345678 +3 0x00 +2 1 0x08 +1 111 0x1c +0 11 11 0x36 +9 11 11 0x63 +8 1111111 0x7f +7 11 11 0x63 +6 11 11 0x63 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x63,0x63,0x7f,0x63,0x36,0x1c,0x08,0x00} + + 12345678 +3 0x00 +2 1 0x08 +1 111 0x1c +0 11 11 0x36 +9 11 11 0x63 +8 1111111 0x7f +7 11 11 0x63 +6 11 11 0x63 +5 0x00 +4 1 0x08 +3 111 0x1c +2 11111 0x3e +1 1111111 0x7f + +{0x7f,0x3e,0x1c,0x08,0x00,0x63,0x63,0x7f,0x63,0x36,0x1c,0x08,0x00} + + 12345678 +3 0x00 +2 11111 0x3e +1 11 11 0x63 +0 11 11 0x63 +9 11 11 0x63 +8 11 11 0x63 +7 11 11 0x63 +6 11111 0x3e +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x3e,0x63,0x63,0x63,0x63,0x63,0x3e,0x00} + + 12345678 +3 0x00 +2 11111 0x3e +1 11 11 0x63 +0 11 11 0x63 +9 11 11 0x63 +8 11 11 0x63 +7 11 11 0x63 +6 11111 0x3e +5 0x00 +4 1 0x08 +3 111 0x1c +2 11111 0x3e +1 1111111 0x7f + +{0x7f,0x3e,0x1c,0x08,0x00,0x3e,0x63,0x63,0x63,0x63,0x63,0x3e,0x00} + + 12345678 +3 1 0x10 +2 11 0x30 +1 111 0x70 +011111111 0xff +9 111 0x70 +8 11 0x30 +7 1 0x10 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x30,0x70,0xff,0x70,0x30,0x10} + + 12345678 +3 1 0x10 +2 11 0x30 +1 1111111 0x7f +011111111 0xff +9 1111111 0x7f +8 11 0x30 +7 1 0x10 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x30,0x7f,0xff,0x7f,0x30,0x10} + +/////////////////////////////////////////////////////////////////////////////////////// + + 12345678 +3 0x00 +211111 0xf8 +11 1 1 0x85 +01111 1 1 0xf5 +91 1 1 0x85 +81 1 1 0x85 +71 1 0x82 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x85,0x85,0xf5,0x85,0xf8,0x00}, + +/////////////////////////////////////////////////////////////////////////////////////// + + 12345678 +3 0x00 +211111 0xf8 +11 111 0x87 +01111 1 0xf4 +91 111 0x87 +81 1 0x81 +71 111 0x87 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x00,0x87,0x81,0x87,0xf4,0x87,0xf8,0x00}, + + 12345678 +3 0x00 +211111 0xf8 +11 1 0x84 +01111 1 0xf4 +91 1 0x84 +81 1 0x84 +71 111 0x87 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x00,0x87,0x84,0x84,0xf4,0x84,0xf8,0x00}, + + 12345678 +3 0x00 +2 11 0x60 +11 1 11 0x96 +01 1 1 1 0x95 +91 1 1 1 0x95 +81 1 1 1 0x95 +7 11 11 0x66 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x00,0xf6,0x95,0x95,0x95,0x96,0xf0,0x00}, + + 12345678 +3 0x00 +211111 0xf8 +1 1 1 0x22 +0 1 1 1 0x25 +9 1 111 0x27 +8 1 1 1 0x25 +7 1 1 1 0x25 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x27,0x25,0x22,0xf8,0x00}, + + 12345678 +3 0x00 +211111 0xf8 +11 1 0x82 +0111 1 0xe2 +91 1 0x82 +81 1 0x82 +71 1 0x82 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x82,0x82,0xe2,0x82,0xf8,0x00}, + + 12345678 +3 0x00 +2111 0xe0 +11 1 1 0x92 +01 1 1 0x92 +91 1 1 0x92 +81 1 1 0x92 +7111 1 0xe2 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0x92,0x92,0x92,0x92,0xe0,0x00}, + + 12345678 +3 0x00 +211111 0xf8 +1 1 1 0x41 +0 1 1 1 0x51 +9 1 1 1 1 0x55 +8 1 11 11 0x5b +7 1 1 1 0x51 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +{0x00,0x00,0x00,0x00,0x00,0x00,0x51,0x5b,0x55,0x51,0x41,0xf8,0x00}, + + 12345678 +6 0x00 +511111111 0xff +4111 111 0xe7 +31 11 1 0x99 +2111 111 0xe7 +111111111 0xff + +0xff,0xe7,0x99,0xe7,0xff + + 12345678 +6 0x00 +511111111 0xff +41 1 0x81 +31 1 0x81 +21 1 0x81 +111111111 0xff + +0xff,0x81,0x81,0x81,0xff + + + 12345678 +3 0x00 +2 11 0x60 +11 1 1 1 0x95 +01111 111 0xf7 +91 1 1 1 0x95 +81 1 1 1 0x95 +71 1 1 1 0x95 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +0x95,0x95,0x95,0xf7,0x95,0x60,0x00 + + 12345678 +3 0x00 +2 0x00 +1 1111 0x3c +0 1 1 0x42 +91 1 0x81 +81 1 1 1 0xa5 +71 1 0x81 +61 1 1 1 0xa5 +51 11 1 0x99 +4 1 1 0x42 +3 1111 0x3c +2 0x00 +1 0x00 + +0x00,0x00,0x3c,0x42,0x99,0xa5,0x81,0xa5,0x81,0x42,0x3c,0x00,0x00 + + 12345678 +3 0x00 +2 0x00 +1 1 0x08 +0 1 1 1 0x49 +9 1 1 1 0x2a +8 111 0x1c +7 1111111 0x7f +6 111 0x1c +5 1 1 1 0x2a +4 1 1 1 0x49 +3 1 0x08 +2 0x00 +1 0x00 + +0x00,0x00,0x08,0x49,0x2a,0x1c,0x7f,0x1c,0x2a,0x49,0x08,0x00,0x00 + + + 12345678 +3 0x00 +2 0x00 +1 11111 0x3e +0 1 1 1 0x2a +9 11 11 0x36 +8 1 1 1 0x2a +7 11 11 0x36 +6 1 1 1 0x2a +5 11 11 0x36 +4 1 1 1 0x2a +3 11111 0x3e +2 0x00 +1 0x00 + +{0x00,0x00,0x3e,0x2a,0x36,0x2a,0x36,0x2a,0x36,0x2a,0x3e,0x00,0x00}, + + 12345678 +3 0x00 +2 0x00 +1 11 0x06 +0 111 0x1c +9 111 0x38 +8 1111 0x78 +7 1111 0x78 +6 1111 0x78 +5 111 0x38 +4 111 0x1c +3 11 0x06 +2 0x00 +1 0x00 + +{0x00,0x00,0x06,0x1c,0x38,0x78,0x78,0x78,0x38,0x1c,0x06,0x00,0x00}, + + + 12345678 +3 0x00 +2 11 0x60 +11 1 11 0x96 +01111 1 1 0xf5 +91 1 11 0x96 +81 1 1 1 0x95 +71 1 111 0x97 +6 0x00 +5 0x00 +4 0x00 +3 0x00 +2 0x00 +1 0x00 + +0x00,0x00,0x00,0x00,0x00,0x00,0x97,x95,0x96,0xf5,0x96,0x60,0x00 + +*/ + +//////////////////////////////////////////////////////////////////////// +// texture for gpu picture +//////////////////////////////////////////////////////////////////////// + +void CreatePic(unsigned char * pMem) +{ + int x,y; + GLubyte TexBytes[128][128][3]; + memset(TexBytes,0,128*128*3); + + for(y=0;y<96;y++) + { + for(x=0;x<128;x++) + { + TexBytes[y][x][0]=*(pMem+2); + TexBytes[y][x][1]=*(pMem+1); + TexBytes[y][x][2]=*(pMem+0); + pMem+=3; + } + } + + glGenTextures(1, &gTexPicName); + glBindTexture(GL_TEXTURE_2D, gTexPicName); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, 3, 128, 128, 0, GL_RGB, + GL_UNSIGNED_BYTE,TexBytes); +} + +//////////////////////////////////////////////////////////////////////// +// destroy gpu picture texture +//////////////////////////////////////////////////////////////////////// + +void DestroyPic(void) +{ + if(gTexPicName) + { + GLfloat fYS1,fYS2,fXS1,fXS2,fXS,fYS; + + glDisable(GL_SCISSOR_TEST); + glDisable(GL_ALPHA_TEST); + if(bOldSmoothShaded) {glShadeModel(GL_FLAT);bOldSmoothShaded=FALSE;} + if(bBlendEnable) {glDisable(GL_BLEND);bBlendEnable=FALSE;} + if(!bTexEnabled) {glEnable(GL_TEXTURE_2D);bTexEnabled=TRUE;} + gTexName=0; + glBindTexture(GL_TEXTURE_2D,0); + vertex[0].c.lcol=0xff000000; + + fYS=(GLfloat)PSXDisplay.DisplayMode.y/(GLfloat)iResY; + fXS=(GLfloat)PSXDisplay.DisplayMode.x/(GLfloat)iResX; + fYS2=96.0f*fYS; + fYS1=0.0f; + fXS2=(GLfloat)PSXDisplay.DisplayMode.x; + fXS1=fXS2-128.0f*fXS; + + SETCOL(vertex[0]); + glBegin(GL_QUADS); // paint a black rect to hide texture + + glVertex3f(fXS1,fYS1,0.99996f); + glVertex3f(fXS1,fYS2,0.99996f); + glVertex3f(fXS2,fYS2,0.99996f); + glVertex3f(fXS2,fYS1,0.99996f); + + glEnd(); + glEnable(GL_ALPHA_TEST); + glEnable(GL_SCISSOR_TEST); + + glDeleteTextures(1,&gTexPicName);gTexPicName=0; + } +} + +//////////////////////////////////////////////////////////////////////// +// display info picture +//////////////////////////////////////////////////////////////////////// + +void DisplayPic(void) +{ + GLfloat fYS1,fYS2,fXS1,fXS2,fXS,fYS; + + glDisable(GL_SCISSOR_TEST); + glDisable(GL_ALPHA_TEST); + if(bOldSmoothShaded) {glShadeModel(GL_FLAT);bOldSmoothShaded=FALSE;} + if(bBlendEnable) {glDisable(GL_BLEND);bBlendEnable=FALSE;} + if(!bTexEnabled) {glEnable(GL_TEXTURE_2D);bTexEnabled=TRUE;} + gTexName=gTexPicName; + glBindTexture(GL_TEXTURE_2D,gTexPicName); // now set font texture + + if(bGLBlend) vertex[0].c.lcol=0xff7f7f7f; + else vertex[0].c.lcol=0xffffffff; + + fYS=(GLfloat)PSXDisplay.DisplayMode.y/(GLfloat)iResY; + fXS=(GLfloat)PSXDisplay.DisplayMode.x/(GLfloat)iResX; + fYS2=96.0f*fYS; + fYS1=0.0f; + fXS2=(GLfloat)PSXDisplay.DisplayMode.x; + fXS1=fXS2-128.0f*fXS; + + SETCOL(vertex[0]); + glBegin(GL_QUADS); + +#ifdef OWNSCALE + glTexCoord2f(0.0f,0.0f); + glVertex3f(fXS1,fYS1,0.99996f); + glTexCoord2f(0.0f,192.0f/256.0f); + glVertex3f(fXS1,fYS2,0.99996f); + glTexCoord2f(256.0f/256.0f,192.0f/256.0f); + glVertex3f(fXS2,fYS2,0.99996f); + glTexCoord2f(256.0f/256.0f,0.0f); + glVertex3f(fXS2,fYS1,0.99996f); +#else + glTexCoord2f(0.0f,0.0f); + glVertex3f(fXS1,fYS1,0.99996f); + glTexCoord2f(0.0f,192.0f); + glVertex3f(fXS1,fYS2,0.99996f); + glTexCoord2f(256.0f,192.0f); + glVertex3f(fXS2,fYS2,0.99996f); + glTexCoord2f(256.0f,0.0f); + glVertex3f(fXS2,fYS1,0.99996f); +#endif + + glEnd(); + glEnable(GL_ALPHA_TEST); + glEnable(GL_SCISSOR_TEST); +} + +//////////////////////////////////////////////////////////////////////// +// show gun cursor +//////////////////////////////////////////////////////////////////////// + +#define TRA 0x00,0x00,0x00,0x00 +#define PNT 0xff,0xff,0xff,0xff + +GLubyte texcursor[8][32]= +{ +{TRA,TRA,PNT,PNT,PNT,TRA,TRA,TRA}, +{TRA,PNT,TRA,TRA,TRA,PNT,TRA,TRA}, +{PNT,TRA,TRA,PNT,TRA,TRA,PNT,TRA}, +{PNT,TRA,PNT,TRA,PNT,TRA,PNT,TRA}, +{PNT,TRA,TRA,PNT,TRA,TRA,PNT,TRA}, +{TRA,PNT,TRA,TRA,TRA,PNT,TRA,TRA}, +{TRA,TRA,PNT,PNT,PNT,TRA,TRA,TRA}, +{TRA,TRA,TRA,TRA,TRA,TRA,TRA,TRA} +}; + +void ShowGunCursor(void) +{ + int iPlayer; + GLfloat fX,fY,fDX,fDY,fYS,fXS; + const uint32_t crCursorColor32[8]={0xff00ff00,0xffff0000,0xff0000ff,0xffff00ff,0xffffff00,0xff00ffff,0xffffffff,0xff7f7f7f}; + + if(!gTexCursorName) // create gun cursor texture the first time + { + glGenTextures(1, &gTexCursorName); + glBindTexture(GL_TEXTURE_2D, gTexCursorName); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, 4, 8, 8, 0, GL_RGBA, + GL_UNSIGNED_BYTE,texcursor); + } + + fYS=(GLfloat)PSXDisplay.DisplayMode.y/(GLfloat)iResY; // some pre-calculations + fXS=(GLfloat)PSXDisplay.DisplayMode.x/(GLfloat)iResX; + + fDX=fXS*7; + fDY=fYS*7; + + glDisable(GL_SCISSOR_TEST); + if(bOldSmoothShaded) {glShadeModel(GL_FLAT);bOldSmoothShaded=FALSE;} + if(bBlendEnable) {glDisable(GL_BLEND);bBlendEnable=FALSE;} + if(!bTexEnabled) {glEnable(GL_TEXTURE_2D);bTexEnabled=TRUE;} + + gTexName=gTexCursorName; + glBindTexture(GL_TEXTURE_2D,gTexCursorName); // now set font texture + + for(iPlayer=0;iPlayer<8;iPlayer++) // loop all possible players + { + if(usCursorActive&(1< set player color + + SETCOL(vertex[0]); + + glBegin(GL_QUADS); + + glTexCoord2f(000.0f,224.0f/255.99f); // -> paint gun cursor + glVertex3f(fX-fDX,fY+fDY,0.99996f); + glTexCoord2f(000.0f,000.0f); + glVertex3f(fX-fDX,fY-fDY,0.99996f); + glTexCoord2f(224.0f/255.99f,000.0f); + glVertex3f(fX+fDX,fY-fDY,0.99996f); + glTexCoord2f(224.0f/255.99f,224.0f/255.99f); + glVertex3f(fX+fDX,fY+fDY,0.99996f); + + glEnd(); + } + } + + glEnable(GL_SCISSOR_TEST); +} diff --git a/plugins/peopsxgl/menu.h b/plugins/peopsxgl/menu.h new file mode 100644 index 00000000..426eaccd --- /dev/null +++ b/plugins/peopsxgl/menu.h @@ -0,0 +1,41 @@ +/*************************************************************************** + menu.h - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2009/03/08 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +#ifndef _GL_MENU_H_ +#define _GL_MENU_H_ + +void DisplayText(void); +void HideText(void); +void KillDisplayLists(void); +void MakeDisplayLists(void); +void BuildDispMenu(int iInc); +void SwitchDispMenu(int iStep); +void CreatePic(unsigned char * pMem); +void DisplayPic(void); +void DestroyPic(void); +void ShowGunCursor(void); + +#endif // _GL_MENU_H_ diff --git a/plugins/peopsxgl/prim.c b/plugins/peopsxgl/prim.c new file mode 100644 index 00000000..323b1d81 --- /dev/null +++ b/plugins/peopsxgl/prim.c @@ -0,0 +1,4661 @@ +/*************************************************************************** + prim.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_PRIMDRAW + +#include "externals.h" +#include "gpu.h" +#include "draw.h" +#include "soft.h" +#include "texture.h" + +//////////////////////////////////////////////////////////////////////// +// defines +//////////////////////////////////////////////////////////////////////// + +#define DEFOPAQUEON glAlphaFunc(GL_EQUAL,0.0f);bBlendEnable=FALSE;glDisable(GL_BLEND); +#define DEFOPAQUEOFF glAlphaFunc(GL_GREATER,0.49f); + +//////////////////////////////////////////////////////////////////////// +// globals +//////////////////////////////////////////////////////////////////////// + +BOOL bDrawTextured; // current active drawing states +BOOL bDrawSmoothShaded; +BOOL bOldSmoothShaded; +BOOL bDrawNonShaded; +BOOL bDrawMultiPass; +int iOffscreenDrawing; +int iDrawnSomething=0; + +BOOL bRenderFrontBuffer=FALSE; // flag for front buffer rendering + +GLubyte ubGloAlpha; // texture alpha +GLubyte ubGloColAlpha; // color alpha +int iFilterType; // type of filter +BOOL bFullVRam=FALSE; // sign for tex win +BOOL bDrawDither; // sign for dither +BOOL bUseMultiPass; // sign for multi pass +GLuint gTexName; // binded texture +BOOL bTexEnabled; // texture enable flag +BOOL bBlendEnable; // blend enable flag +PSXRect_t xrUploadArea; // rect to upload +PSXRect_t xrUploadAreaIL; // rect to upload +PSXRect_t xrUploadAreaRGB24; // rect to upload rgb24 +int iSpriteTex=0; // flag for "hey, it's a sprite" +unsigned short usMirror; // mirror, mirror on the wall + +BOOL bNeedUploadAfter=FALSE; // sign for uploading in next frame +BOOL bNeedUploadTest=FALSE; // sign for upload test +BOOL bUsingTWin=FALSE; // tex win active flag +BOOL bUsingMovie=FALSE; // movie active flag +PSXRect_t xrMovieArea; // rect for movie upload +short sSprite_ux2; // needed for sprire adjust +short sSprite_vy2; // +uint32_t ulOLDCOL=0; // active color +uint32_t ulClutID; // clut + +uint32_t dwCfgFixes; // game fixes +uint32_t dwActFixes=0; +uint32_t dwEmuFixes=0; +BOOL bUseFixes; + +int drawX,drawY,drawW,drawH; // offscreen drawing checkers +short sxmin,sxmax,symin,symax; + +//////////////////////////////////////////////////////////////////////// +// Update global TP infos +//////////////////////////////////////////////////////////////////////// + +void UpdateGlobalTP(unsigned short gdata) +{ + GlobalTextAddrX = (gdata << 6) & 0x3c0; + + if(iGPUHeight==1024) // ZN mode + { + if(dwGPUVersion==2) // very special zn gpu + { + GlobalTextAddrY =((gdata & 0x60 ) << 3); + GlobalTextIL =(gdata & 0x2000) >> 13; + GlobalTextABR = (unsigned short)((gdata >> 7) & 0x3); + GlobalTextTP = (gdata >> 9) & 0x3; + if(GlobalTextTP==3) GlobalTextTP=2; + GlobalTexturePage = (GlobalTextAddrX>>6)+(GlobalTextAddrY>>4); + usMirror =0; + STATUSREG = (STATUSREG & 0xffffe000 ) | (gdata & 0x1fff ); + return; + } + else // "enhanced" psx gpu + { + GlobalTextAddrY = (unsigned short)(((gdata << 4) & 0x100) | ((gdata >> 2) & 0x200)); + } + } + else GlobalTextAddrY = (gdata << 4) & 0x100; // "normal" psx gpu + + usMirror=gdata&0x3000; + + GlobalTextTP = (gdata >> 7) & 0x3; // tex mode (4,8,15) + if(GlobalTextTP==3) GlobalTextTP=2; // seen in Wild9 :( + GlobalTextABR = (gdata >> 5) & 0x3; // blend mode + + GlobalTexturePage = (GlobalTextAddrX>>6)+(GlobalTextAddrY>>4); + + STATUSREG&=~0x07ff; // Clear the necessary bits + STATUSREG|=(gdata & 0x07ff); // set the necessary bits +} + +unsigned int DoubleBGR2RGB (unsigned int BGR) +{ + unsigned int ebx,eax,edx; + + ebx=(BGR&0x000000ff)<<1; + if(ebx&0x00000100) ebx=0x000000ff; + + eax=(BGR&0x0000ff00)<<1; + if(eax&0x00010000) eax=0x0000ff00; + + edx=(BGR&0x00ff0000)<<1; + if(edx&0x01000000) edx=0x00ff0000; + + return (ebx|eax|edx); +} + +unsigned short BGR24to16 (uint32_t BGR) +{ + return ((BGR>>3)&0x1f)|((BGR&0xf80000)>>9)|((BGR&0xf800)>>6); +} + +//////////////////////////////////////////////////////////////////////// +// OpenGL primitive drawing commands +//////////////////////////////////////////////////////////////////////// + +__inline void PRIMdrawTexturedQuad(OGLVertex* vertex1, OGLVertex* vertex2, + OGLVertex* vertex3, OGLVertex* vertex4) +{ + glBegin(GL_TRIANGLE_STRIP); + glTexCoord2fv(&vertex1->sow); + glVertex3fv(&vertex1->x); + + glTexCoord2fv(&vertex2->sow); + glVertex3fv(&vertex2->x); + + glTexCoord2fv(&vertex4->sow); + glVertex3fv(&vertex4->x); + + glTexCoord2fv(&vertex3->sow); + glVertex3fv(&vertex3->x); + glEnd(); +} + +///////////////////////////////////////////////////////// + +__inline void PRIMdrawTexturedTri(OGLVertex* vertex1, OGLVertex* vertex2, + OGLVertex* vertex3) +{ + glBegin(GL_TRIANGLES); + glTexCoord2fv(&vertex1->sow); + glVertex3fv(&vertex1->x); + + glTexCoord2fv(&vertex2->sow); + glVertex3fv(&vertex2->x); + + glTexCoord2fv(&vertex3->sow); + glVertex3fv(&vertex3->x); + glEnd(); +} + +///////////////////////////////////////////////////////// + +__inline void PRIMdrawTexGouraudTriColor(OGLVertex* vertex1, OGLVertex* vertex2, + OGLVertex* vertex3) +{ + glBegin(GL_TRIANGLES); + + SETPCOL(vertex1); + glTexCoord2fv(&vertex1->sow); + glVertex3fv(&vertex1->x); + + SETPCOL(vertex2); + glTexCoord2fv(&vertex2->sow); + glVertex3fv(&vertex2->x); + + SETPCOL(vertex3); + glTexCoord2fv(&vertex3->sow); + glVertex3fv(&vertex3->x); + glEnd(); +} + +///////////////////////////////////////////////////////// + +__inline void PRIMdrawTexGouraudTriColorQuad(OGLVertex* vertex1, OGLVertex* vertex2, + OGLVertex* vertex3, OGLVertex* vertex4) +{ + glBegin(GL_TRIANGLE_STRIP); + SETPCOL(vertex1); + glTexCoord2fv(&vertex1->sow); + glVertex3fv(&vertex1->x); + + SETPCOL(vertex2); + glTexCoord2fv(&vertex2->sow); + glVertex3fv(&vertex2->x); + + SETPCOL(vertex4); + glTexCoord2fv(&vertex4->sow); + glVertex3fv(&vertex4->x); + + SETPCOL(vertex3); + glTexCoord2fv(&vertex3->sow); + glVertex3fv(&vertex3->x); + glEnd(); +} + +///////////////////////////////////////////////////////// + +__inline void PRIMdrawTri(OGLVertex* vertex1, OGLVertex* vertex2, OGLVertex* vertex3) +{ + glBegin(GL_TRIANGLES); + glVertex3fv(&vertex1->x); + glVertex3fv(&vertex2->x); + glVertex3fv(&vertex3->x); + glEnd(); +} + +///////////////////////////////////////////////////////// + +__inline void PRIMdrawTri2(OGLVertex* vertex1, OGLVertex* vertex2, + OGLVertex* vertex3, OGLVertex* vertex4) +{ + glBegin(GL_TRIANGLE_STRIP); + glVertex3fv(&vertex1->x); + glVertex3fv(&vertex3->x); + glVertex3fv(&vertex2->x); + glVertex3fv(&vertex4->x); + glEnd(); +} + +///////////////////////////////////////////////////////// + +__inline void PRIMdrawGouraudTriColor(OGLVertex* vertex1, OGLVertex* vertex2, + OGLVertex* vertex3) +{ + glBegin(GL_TRIANGLES); + SETPCOL(vertex1); + glVertex3fv(&vertex1->x); + + SETPCOL(vertex2); + glVertex3fv(&vertex2->x); + + SETPCOL(vertex3); + glVertex3fv(&vertex3->x); + glEnd(); +} + +///////////////////////////////////////////////////////// + +__inline void PRIMdrawGouraudTri2Color(OGLVertex* vertex1, OGLVertex* vertex2, + OGLVertex* vertex3, OGLVertex* vertex4) +{ + glBegin(GL_TRIANGLE_STRIP); + SETPCOL(vertex1); + glVertex3fv(&vertex1->x); + + SETPCOL(vertex3); + glVertex3fv(&vertex3->x); + + SETPCOL(vertex2); + glVertex3fv(&vertex2->x); + + SETPCOL(vertex4); + glVertex3fv(&vertex4->x); + glEnd(); +} + +///////////////////////////////////////////////////////// + +__inline void PRIMdrawFlatLine(OGLVertex* vertex1, OGLVertex* vertex2,OGLVertex* vertex3, OGLVertex* vertex4) +{ + glBegin(GL_QUADS); + + SETPCOL(vertex1); + + glVertex3fv(&vertex1->x); + glVertex3fv(&vertex2->x); + glVertex3fv(&vertex3->x); + glVertex3fv(&vertex4->x); + glEnd(); +} + +///////////////////////////////////////////////////////// + +__inline void PRIMdrawGouraudLine(OGLVertex* vertex1, OGLVertex* vertex2,OGLVertex* vertex3, OGLVertex* vertex4) +{ + glBegin(GL_QUADS); + + SETPCOL(vertex1); + glVertex3fv(&vertex1->x); + + SETPCOL(vertex2); + glVertex3fv(&vertex2->x); + + SETPCOL(vertex3); + glVertex3fv(&vertex3->x); + + SETPCOL(vertex4); + glVertex3fv(&vertex4->x); + glEnd(); +} + +///////////////////////////////////////////////////////// + +__inline void PRIMdrawQuad(OGLVertex* vertex1, OGLVertex* vertex2, + OGLVertex* vertex3, OGLVertex* vertex4) +{ + glBegin(GL_QUADS); + glVertex3fv(&vertex1->x); + glVertex3fv(&vertex2->x); + glVertex3fv(&vertex3->x); + glVertex3fv(&vertex4->x); + glEnd(); +} + +//////////////////////////////////////////////////////////////////////// +// Transparent blending settings +//////////////////////////////////////////////////////////////////////// + +static GLenum obm1=GL_ZERO; +static GLenum obm2=GL_ZERO; + +typedef struct SEMITRANSTAG +{ + GLenum srcFac; + GLenum dstFac; + GLubyte alpha; +} SemiTransParams; + +SemiTransParams TransSets[4]= +{ + {GL_SRC_ALPHA,GL_SRC_ALPHA, 127}, + {GL_ONE, GL_ONE, 255}, + {GL_ZERO, GL_ONE_MINUS_SRC_COLOR,255}, + {GL_ONE_MINUS_SRC_ALPHA,GL_ONE, 192} +}; + +//////////////////////////////////////////////////////////////////////// + +void SetSemiTrans(void) +{ +/* +* 0.5 x B + 0.5 x F +* 1.0 x B + 1.0 x F +* 1.0 x B - 1.0 x F +* 1.0 x B +0.25 x F +*/ + + if(!DrawSemiTrans) // no semi trans at all? + { + if(bBlendEnable) + {glDisable(GL_BLEND);bBlendEnable=FALSE;} // -> don't wanna blend + ubGloAlpha=ubGloColAlpha=255; // -> full alpha + return; // -> and bye + } + + ubGloAlpha=ubGloColAlpha=TransSets[GlobalTextABR].alpha; + + if(!bBlendEnable) + {glEnable(GL_BLEND);bBlendEnable=TRUE;} // wanna blend + + if(TransSets[GlobalTextABR].srcFac!=obm1 || + TransSets[GlobalTextABR].dstFac!=obm2) + { + if(glBlendEquationEXTEx==NULL) + { + obm1=TransSets[GlobalTextABR].srcFac; + obm2=TransSets[GlobalTextABR].dstFac; + glBlendFunc(obm1,obm2); // set blend func + } + else + if(TransSets[GlobalTextABR].dstFac !=GL_ONE_MINUS_SRC_COLOR) + { + if(obm2==GL_ONE_MINUS_SRC_COLOR) + glBlendEquationEXTEx(FUNC_ADD_EXT); + obm1=TransSets[GlobalTextABR].srcFac; + obm2=TransSets[GlobalTextABR].dstFac; + glBlendFunc(obm1,obm2); // set blend func + } + else + { + glBlendEquationEXTEx(FUNC_REVERSESUBTRACT_EXT); + obm1=TransSets[GlobalTextABR].srcFac; + obm2=TransSets[GlobalTextABR].dstFac; + glBlendFunc(GL_ONE,GL_ONE); // set blend func + } + } +} + +void SetScanTrans(void) // blending for scan lines +{ + if(glBlendEquationEXTEx!=NULL) + { + if(obm2==GL_ONE_MINUS_SRC_COLOR) + glBlendEquationEXTEx(FUNC_ADD_EXT); + } + + obm1=TransSets[0].srcFac; + obm2=TransSets[0].dstFac; + glBlendFunc(obm1,obm2); // set blend func +} + +void SetScanTexTrans(void) // blending for scan mask texture +{ + if(glBlendEquationEXTEx!=NULL) + { + if(obm2==GL_ONE_MINUS_SRC_COLOR) + glBlendEquationEXTEx(FUNC_ADD_EXT); + } + + obm1=TransSets[2].srcFac; + obm2=TransSets[2].dstFac; + glBlendFunc(obm1,obm2); // set blend func +} + +//////////////////////////////////////////////////////////////////////// +// multi pass in old 'Advanced blending' mode... got it from Lewpy :) +//////////////////////////////////////////////////////////////////////// + +SemiTransParams MultiTexTransSets[4][2]= +{ + { + {GL_ONE ,GL_SRC_ALPHA, 127}, + {GL_SRC_ALPHA,GL_ONE, 127} + }, + { + {GL_ONE, GL_SRC_ALPHA, 255}, + {GL_SRC_ALPHA,GL_ONE, 255} + }, + { + {GL_ZERO, GL_ONE_MINUS_SRC_COLOR,255}, + {GL_ZERO, GL_ONE_MINUS_SRC_COLOR,255} + }, + { + {GL_SRC_ALPHA,GL_ONE, 127}, + {GL_ONE_MINUS_SRC_ALPHA,GL_ONE, 255} + } +}; + +//////////////////////////////////////////////////////////////////////// + +SemiTransParams MultiColTransSets[4]= +{ + {GL_ONE_MINUS_SRC_ALPHA,GL_SRC_ALPHA,127}, + {GL_ONE, GL_ONE, 255}, + {GL_ZERO, GL_ONE_MINUS_SRC_COLOR,255}, + {GL_SRC_ALPHA,GL_ONE, 127} +}; + +//////////////////////////////////////////////////////////////////////// + +void SetSemiTransMulti(int Pass) +{ + static GLenum bm1=GL_ZERO; + static GLenum bm2=GL_ONE; + + ubGloAlpha=255; + ubGloColAlpha=255; + + // are we enabling SemiTransparent mode? + if(DrawSemiTrans) + { + if(bDrawTextured) + { + bm1=MultiTexTransSets[GlobalTextABR][Pass].srcFac; + bm2=MultiTexTransSets[GlobalTextABR][Pass].dstFac; + ubGloAlpha=MultiTexTransSets[GlobalTextABR][Pass].alpha; + } + // no texture + else + { + bm1=MultiColTransSets[GlobalTextABR].srcFac; + bm2=MultiColTransSets[GlobalTextABR].dstFac; + ubGloColAlpha=MultiColTransSets[GlobalTextABR].alpha; + } + } + // no shading + else + { + if(Pass==0) + { + // disable blending + bm1=GL_ONE;bm2=GL_ZERO; + } + else + { + // disable blending, but add src col a second time + bm1=GL_ONE;bm2=GL_ONE; + } + } + + if(!bBlendEnable) + {glEnable(GL_BLEND);bBlendEnable=TRUE;} // wanna blend + + if(bm1!=obm1 || bm2!=obm2) + { + glBlendFunc(bm1,bm2); // set blend func + obm1=bm1;obm2=bm2; + } +} + +//////////////////////////////////////////////////////////////////////// +// Set several rendering stuff including blending +//////////////////////////////////////////////////////////////////////// + +__inline void SetZMask3O(void) +{ + if(iUseMask && DrawSemiTrans && !iSetMask) + { + vertex[0].z=vertex[1].z=vertex[2].z=gl_z; + gl_z+=0.00004f; + } +} + +__inline void SetZMask3(void) +{ + if(iUseMask) + { + if(iSetMask || DrawSemiTrans) + {vertex[0].z=vertex[1].z=vertex[2].z=0.95f;} + else + { + vertex[0].z=vertex[1].z=vertex[2].z=gl_z; + gl_z+=0.00004f; + } + } +} + +__inline void SetZMask3NT(void) +{ + if(iUseMask) + { + if(iSetMask) + {vertex[0].z=vertex[1].z=vertex[2].z=0.95f;} + else + { + vertex[0].z=vertex[1].z=vertex[2].z=gl_z; + gl_z+=0.00004f; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +__inline void SetZMask4O(void) +{ + if(iUseMask && DrawSemiTrans && !iSetMask) + { + vertex[0].z=vertex[1].z=vertex[2].z=vertex[3].z=gl_z; + gl_z+=0.00004f; + } +} + +__inline void SetZMask4(void) +{ + if(iUseMask) + { + if(iSetMask || DrawSemiTrans) + {vertex[0].z=vertex[1].z=vertex[2].z=vertex[3].z=0.95f;} + else + { + vertex[0].z=vertex[1].z=vertex[2].z=vertex[3].z=gl_z; + gl_z+=0.00004f; + } + } +} + +__inline void SetZMask4NT(void) +{ + if(iUseMask) + { + if(iSetMask==1) + {vertex[0].z=vertex[1].z=vertex[2].z=vertex[3].z=0.95f;} + else + { + vertex[0].z=vertex[1].z=vertex[2].z=vertex[3].z=gl_z; + gl_z+=0.00004f; + } + } +} + +__inline void SetZMask4SP(void) +{ + if(iUseMask) + { + if(iSetMask==1) + {vertex[0].z=vertex[1].z=vertex[2].z=vertex[3].z=0.95f;} + else + { + if(bCheckMask) + { + vertex[0].z=vertex[1].z=vertex[2].z=vertex[3].z=gl_z; + gl_z+=0.00004f; + } + else + {vertex[0].z=vertex[1].z=vertex[2].z=vertex[3].z=0.95f;} + } + } +} + +//////////////////////////////////////////////////////////////////////// + +__inline void SetRenderState(uint32_t DrawAttributes) +{ + bDrawNonShaded = (SHADETEXBIT(DrawAttributes)) ? TRUE : FALSE; + DrawSemiTrans = (SEMITRANSBIT(DrawAttributes)) ? TRUE : FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +__inline void SetRenderColor(uint32_t DrawAttributes) +{ + if(bDrawNonShaded) {g_m1=g_m2=g_m3=128;} + else + { + g_m1=DrawAttributes&0xff; + g_m2=(DrawAttributes>>8)&0xff; + g_m3=(DrawAttributes>>16)&0xff; + } +} + +//////////////////////////////////////////////////////////////////////// + +void SetRenderMode(uint32_t DrawAttributes, BOOL bSCol) +{ + if((bUseMultiPass) && (bDrawTextured) && !(bDrawNonShaded)) + {bDrawMultiPass = TRUE; SetSemiTransMulti(0);} + else {bDrawMultiPass = FALSE;SetSemiTrans();} + + if(bDrawTextured) // texture ? build it/get it from cache + { + GLuint currTex; + if(bUsingTWin) currTex=LoadTextureWnd(GlobalTexturePage,GlobalTextTP, ulClutID); + else if(bUsingMovie) currTex=LoadTextureMovie(); + else currTex=SelectSubTextureS(GlobalTextTP,ulClutID); + + if(gTexName!=currTex) + {gTexName=currTex;glBindTexture(GL_TEXTURE_2D,currTex);} + + if(!bTexEnabled) // -> turn texturing on + {bTexEnabled=TRUE;glEnable(GL_TEXTURE_2D);} + } + else // no texture ? + if(bTexEnabled) + {bTexEnabled=FALSE;glDisable(GL_TEXTURE_2D);} // -> turn texturing off + + if(bSCol) // also set color ? + { + if((dwActFixes&4) && ((DrawAttributes&0x00ffffff)==0)) + DrawAttributes|=0x007f7f7f; + + if(bDrawNonShaded) // -> non shaded? + { + if(bGLBlend) vertex[0].c.lcol=0x7f7f7f; // --> solid color... + else vertex[0].c.lcol=0xffffff; + } + else // -> shaded? + { + if(!bUseMultiPass && !bGLBlend) // --> given color... + vertex[0].c.lcol=DoubleBGR2RGB(DrawAttributes); + else vertex[0].c.lcol=DrawAttributes; + } + vertex[0].c.col[3]=ubGloAlpha; // -> set color with + SETCOL(vertex[0]); // texture alpha + } + + if(bDrawSmoothShaded!=bOldSmoothShaded) // shading changed? + { + if(bDrawSmoothShaded) glShadeModel(GL_SMOOTH); // -> set actual shading + else glShadeModel(GL_FLAT); + bOldSmoothShaded=bDrawSmoothShaded; + } +} + +//////////////////////////////////////////////////////////////////////// +// Set Opaque multipass color +//////////////////////////////////////////////////////////////////////// + +void SetOpaqueColor(uint32_t DrawAttributes) +{ + if(bDrawNonShaded) return; // no shading? bye + + DrawAttributes=DoubleBGR2RGB(DrawAttributes); // multipass is just half color, so double it on opaque pass + vertex[0].c.lcol=DrawAttributes|0xff000000; + SETCOL(vertex[0]); // set color +} + +//////////////////////////////////////////////////////////////////////// +// Fucking stupid screen coord checking +//////////////////////////////////////////////////////////////////////// + +BOOL ClipVertexListScreen(void) +{ + if (lx0 >= PSXDisplay.DisplayEnd.x) goto NEXTSCRTEST; + if (ly0 >= PSXDisplay.DisplayEnd.y) goto NEXTSCRTEST; + if (lx2 < PSXDisplay.DisplayPosition.x) goto NEXTSCRTEST; + if (ly2 < PSXDisplay.DisplayPosition.y) goto NEXTSCRTEST; + + return TRUE; + +NEXTSCRTEST: + if(PSXDisplay.InterlacedTest) return FALSE; + + if (lx0 >= PreviousPSXDisplay.DisplayEnd.x) return FALSE; + if (ly0 >= PreviousPSXDisplay.DisplayEnd.y) return FALSE; + if (lx2 < PreviousPSXDisplay.DisplayPosition.x) return FALSE; + if (ly2 < PreviousPSXDisplay.DisplayPosition.y) return FALSE; + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// + +BOOL bDrawOffscreenFront(void) +{ + if(sxmin < PSXDisplay.DisplayPosition.x) return FALSE; // must be complete in front + if(symin < PSXDisplay.DisplayPosition.y) return FALSE; + if(sxmax > PSXDisplay.DisplayEnd.x) return FALSE; + if(symax > PSXDisplay.DisplayEnd.y) return FALSE; + return TRUE; +} + +BOOL bOnePointInFront(void) +{ + if(sxmax< PSXDisplay.DisplayPosition.x) + return FALSE; + + if(symax< PSXDisplay.DisplayPosition.y) + return FALSE; + + if(sxmin>=PSXDisplay.DisplayEnd.x) + return FALSE; + + if(symin>=PSXDisplay.DisplayEnd.y) + return FALSE; + + return TRUE; +} + + +BOOL bOnePointInBack(void) +{ + if(sxmax< PreviousPSXDisplay.DisplayPosition.x) + return FALSE; + + if(symax< PreviousPSXDisplay.DisplayPosition.y) + return FALSE; + + if(sxmin>=PreviousPSXDisplay.DisplayEnd.x) + return FALSE; + + if(symin>=PreviousPSXDisplay.DisplayEnd.y) + return FALSE; + + return TRUE; +} + +BOOL bDrawOffscreen4(void) +{ + BOOL bFront;short sW,sH; + + sxmax=max(lx0,max(lx1,max(lx2,lx3))); + if(sxmaxdrawW) return FALSE; + symax=max(ly0,max(ly1,max(ly2,ly3))); + if(symaxdrawH) return FALSE; + + if(PSXDisplay.Disabled) return TRUE; // disabled? ever + + if(iOffscreenDrawing==1) return bFullVRam; + + if(dwActFixes&1 && iOffscreenDrawing==4) + { + if(PreviousPSXDisplay.DisplayPosition.x==PSXDisplay.DisplayPosition.x && + PreviousPSXDisplay.DisplayPosition.y==PSXDisplay.DisplayPosition.y && + PreviousPSXDisplay.DisplayEnd.x==PSXDisplay.DisplayEnd.x && + PreviousPSXDisplay.DisplayEnd.y==PSXDisplay.DisplayEnd.y) + { + bRenderFrontBuffer=TRUE; + return FALSE; + } + } + + sW=drawW-1;sH=drawH-1; + + sxmin=min(sW,max(sxmin,drawX)); + sxmax=max(drawX,min(sxmax,sW)); + symin=min(sH,max(symin,drawY)); + symax=max(drawY,min(symax,sH)); + + if(bOnePointInBack()) return bFullVRam; + + if(iOffscreenDrawing==2) + bFront=bDrawOffscreenFront(); + else bFront=bOnePointInFront(); + + if(bFront) + { + if(PSXDisplay.InterlacedTest) return bFullVRam; // -> ok, no need for adjust + + vertex[0].x=lx0 - PSXDisplay.DisplayPosition.x+PreviousPSXDisplay.Range.x0; + vertex[1].x=lx1 - PSXDisplay.DisplayPosition.x+PreviousPSXDisplay.Range.x0; + vertex[2].x=lx2 - PSXDisplay.DisplayPosition.x+PreviousPSXDisplay.Range.x0; + vertex[3].x=lx3 - PSXDisplay.DisplayPosition.x+PreviousPSXDisplay.Range.x0; + vertex[0].y=ly0 - PSXDisplay.DisplayPosition.y+PreviousPSXDisplay.Range.y0; + vertex[1].y=ly1 - PSXDisplay.DisplayPosition.y+PreviousPSXDisplay.Range.y0; + vertex[2].y=ly2 - PSXDisplay.DisplayPosition.y+PreviousPSXDisplay.Range.y0; + vertex[3].y=ly3 - PSXDisplay.DisplayPosition.y+PreviousPSXDisplay.Range.y0; + + if(iOffscreenDrawing==4 && !(dwActFixes&1)) // -> frontbuffer wanted + { + bRenderFrontBuffer=TRUE; + //return TRUE; + } + return bFullVRam; // -> but no od + } + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// + +BOOL bDrawOffscreen3(void) +{ + BOOL bFront;short sW,sH; + + sxmax=max(lx0,max(lx1,lx2)); + if(sxmaxdrawW) return FALSE; + symax=max(ly0,max(ly1,ly2)); + if(symaxdrawH) return FALSE; + + if(PSXDisplay.Disabled) return TRUE; // disabled? ever + + if(iOffscreenDrawing==1) return bFullVRam; + + sW=drawW-1;sH=drawH-1; + sxmin=min(sW,max(sxmin,drawX)); + sxmax=max(drawX,min(sxmax,sW)); + symin=min(sH,max(symin,drawY)); + symax=max(drawY,min(symax,sH)); + + if(bOnePointInBack()) return bFullVRam; + + if(iOffscreenDrawing==2) + bFront=bDrawOffscreenFront(); + else bFront=bOnePointInFront(); + + if(bFront) + { + if(PSXDisplay.InterlacedTest) return bFullVRam; // -> ok, no need for adjust + + vertex[0].x=lx0 - PSXDisplay.DisplayPosition.x+PreviousPSXDisplay.Range.x0; + vertex[1].x=lx1 - PSXDisplay.DisplayPosition.x+PreviousPSXDisplay.Range.x0; + vertex[2].x=lx2 - PSXDisplay.DisplayPosition.x+PreviousPSXDisplay.Range.x0; + vertex[0].y=ly0 - PSXDisplay.DisplayPosition.y+PreviousPSXDisplay.Range.y0; + vertex[1].y=ly1 - PSXDisplay.DisplayPosition.y+PreviousPSXDisplay.Range.y0; + vertex[2].y=ly2 - PSXDisplay.DisplayPosition.y+PreviousPSXDisplay.Range.y0; + + if(iOffscreenDrawing==4) // -> frontbuffer wanted + { + bRenderFrontBuffer=TRUE; + // return TRUE; + } + + return bFullVRam; // -> but no od + } + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// + +BOOL FastCheckAgainstScreen(short imageX0,short imageY0,short imageX1,short imageY1) +{ + PSXRect_t xUploadArea; + + imageX1 += imageX0; + imageY1 += imageY0; + + if (imageX0 < PreviousPSXDisplay.DisplayPosition.x) + xUploadArea.x0 = PreviousPSXDisplay.DisplayPosition.x; + else + if (imageX0 > PreviousPSXDisplay.DisplayEnd.x) + xUploadArea.x0 = PreviousPSXDisplay.DisplayEnd.x; + else + xUploadArea.x0 = imageX0; + + if(imageX1 < PreviousPSXDisplay.DisplayPosition.x) + xUploadArea.x1 = PreviousPSXDisplay.DisplayPosition.x; + else + if (imageX1 > PreviousPSXDisplay.DisplayEnd.x) + xUploadArea.x1 = PreviousPSXDisplay.DisplayEnd.x; + else + xUploadArea.x1 = imageX1; + + if (imageY0 < PreviousPSXDisplay.DisplayPosition.y) + xUploadArea.y0 = PreviousPSXDisplay.DisplayPosition.y; + else + if (imageY0 > PreviousPSXDisplay.DisplayEnd.y) + xUploadArea.y0 = PreviousPSXDisplay.DisplayEnd.y; + else + xUploadArea.y0 = imageY0; + + if (imageY1 < PreviousPSXDisplay.DisplayPosition.y) + xUploadArea.y1 = PreviousPSXDisplay.DisplayPosition.y; + else + if (imageY1 > PreviousPSXDisplay.DisplayEnd.y) + xUploadArea.y1 = PreviousPSXDisplay.DisplayEnd.y; + else + xUploadArea.y1 = imageY1; + + if ((xUploadArea.x0 != xUploadArea.x1) && (xUploadArea.y0 != xUploadArea.y1)) + return TRUE; + else return FALSE; +} + +BOOL CheckAgainstScreen(short imageX0,short imageY0,short imageX1,short imageY1) +{ + imageX1 += imageX0; + imageY1 += imageY0; + + if (imageX0 < PreviousPSXDisplay.DisplayPosition.x) + xrUploadArea.x0 = PreviousPSXDisplay.DisplayPosition.x; + else + if (imageX0 > PreviousPSXDisplay.DisplayEnd.x) + xrUploadArea.x0 = PreviousPSXDisplay.DisplayEnd.x; + else + xrUploadArea.x0 = imageX0; + + if(imageX1 < PreviousPSXDisplay.DisplayPosition.x) + xrUploadArea.x1 = PreviousPSXDisplay.DisplayPosition.x; + else + if (imageX1 > PreviousPSXDisplay.DisplayEnd.x) + xrUploadArea.x1 = PreviousPSXDisplay.DisplayEnd.x; + else + xrUploadArea.x1 = imageX1; + + if (imageY0 < PreviousPSXDisplay.DisplayPosition.y) + xrUploadArea.y0 = PreviousPSXDisplay.DisplayPosition.y; + else + if (imageY0 > PreviousPSXDisplay.DisplayEnd.y) + xrUploadArea.y0 = PreviousPSXDisplay.DisplayEnd.y; + else + xrUploadArea.y0 = imageY0; + + if (imageY1 < PreviousPSXDisplay.DisplayPosition.y) + xrUploadArea.y1 = PreviousPSXDisplay.DisplayPosition.y; + else + if (imageY1 > PreviousPSXDisplay.DisplayEnd.y) + xrUploadArea.y1 = PreviousPSXDisplay.DisplayEnd.y; + else + xrUploadArea.y1 = imageY1; + + if ((xrUploadArea.x0 != xrUploadArea.x1) && (xrUploadArea.y0 != xrUploadArea.y1)) + return TRUE; + else return FALSE; +} + +BOOL FastCheckAgainstFrontScreen(short imageX0,short imageY0,short imageX1,short imageY1) +{ + PSXRect_t xUploadArea; + + imageX1 += imageX0; + imageY1 += imageY0; + + if (imageX0 < PSXDisplay.DisplayPosition.x) + xUploadArea.x0 = PSXDisplay.DisplayPosition.x; + else + if (imageX0 > PSXDisplay.DisplayEnd.x) + xUploadArea.x0 = PSXDisplay.DisplayEnd.x; + else + xUploadArea.x0 = imageX0; + + if(imageX1 < PSXDisplay.DisplayPosition.x) + xUploadArea.x1 = PSXDisplay.DisplayPosition.x; + else + if (imageX1 > PSXDisplay.DisplayEnd.x) + xUploadArea.x1 = PSXDisplay.DisplayEnd.x; + else + xUploadArea.x1 = imageX1; + + if (imageY0 < PSXDisplay.DisplayPosition.y) + xUploadArea.y0 = PSXDisplay.DisplayPosition.y; + else + if (imageY0 > PSXDisplay.DisplayEnd.y) + xUploadArea.y0 = PSXDisplay.DisplayEnd.y; + else + xUploadArea.y0 = imageY0; + + if (imageY1 < PSXDisplay.DisplayPosition.y) + xUploadArea.y1 = PSXDisplay.DisplayPosition.y; + else + if (imageY1 > PSXDisplay.DisplayEnd.y) + xUploadArea.y1 = PSXDisplay.DisplayEnd.y; + else + xUploadArea.y1 = imageY1; + + if ((xUploadArea.x0 != xUploadArea.x1) && (xUploadArea.y0 != xUploadArea.y1)) + return TRUE; + else return FALSE; +} + +BOOL CheckAgainstFrontScreen(short imageX0,short imageY0,short imageX1,short imageY1) +{ + imageX1 += imageX0; + imageY1 += imageY0; + + if (imageX0 < PSXDisplay.DisplayPosition.x) + xrUploadArea.x0 = PSXDisplay.DisplayPosition.x; + else + if (imageX0 > PSXDisplay.DisplayEnd.x) + xrUploadArea.x0 = PSXDisplay.DisplayEnd.x; + else + xrUploadArea.x0 = imageX0; + + if(imageX1 < PSXDisplay.DisplayPosition.x) + xrUploadArea.x1 = PSXDisplay.DisplayPosition.x; + else + if (imageX1 > PSXDisplay.DisplayEnd.x) + xrUploadArea.x1 = PSXDisplay.DisplayEnd.x; + else + xrUploadArea.x1 = imageX1; + + if (imageY0 < PSXDisplay.DisplayPosition.y) + xrUploadArea.y0 = PSXDisplay.DisplayPosition.y; + else + if (imageY0 > PSXDisplay.DisplayEnd.y) + xrUploadArea.y0 = PSXDisplay.DisplayEnd.y; + else + xrUploadArea.y0 = imageY0; + + if (imageY1 < PSXDisplay.DisplayPosition.y) + xrUploadArea.y1 = PSXDisplay.DisplayPosition.y; + else + if (imageY1 > PSXDisplay.DisplayEnd.y) + xrUploadArea.y1 = PSXDisplay.DisplayEnd.y; + else + xrUploadArea.y1 = imageY1; + + if ((xrUploadArea.x0 != xrUploadArea.x1) && (xrUploadArea.y0 != xrUploadArea.y1)) + return TRUE; + else return FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +void PrepareFullScreenUpload (int Position) +{ + if (Position==-1) // rgb24 + { + if(PSXDisplay.Interlaced) + { + xrUploadArea.x0 = PSXDisplay.DisplayPosition.x; + xrUploadArea.x1 = PSXDisplay.DisplayEnd.x; + xrUploadArea.y0 = PSXDisplay.DisplayPosition.y; + xrUploadArea.y1 = PSXDisplay.DisplayEnd.y; + } + else + { + xrUploadArea.x0 = PreviousPSXDisplay.DisplayPosition.x; + xrUploadArea.x1 = PreviousPSXDisplay.DisplayEnd.x; + xrUploadArea.y0 = PreviousPSXDisplay.DisplayPosition.y; + xrUploadArea.y1 = PreviousPSXDisplay.DisplayEnd.y; + } + + if(bNeedRGB24Update) + { + if(lClearOnSwap) + { +// lClearOnSwap=0; + } + else + if(PSXDisplay.Interlaced && PreviousPSXDisplay.RGB24<2) // in interlaced mode we upload at least two full frames (GT1 menu) + { + PreviousPSXDisplay.RGB24++; + } + else + { + xrUploadArea.y1 = min(xrUploadArea.y0+xrUploadAreaRGB24.y1,xrUploadArea.y1); + xrUploadArea.y0+=xrUploadAreaRGB24.y0; + } + } + } + else + if (Position) + { + xrUploadArea.x0 = PSXDisplay.DisplayPosition.x; + xrUploadArea.x1 = PSXDisplay.DisplayEnd.x; + xrUploadArea.y0 = PSXDisplay.DisplayPosition.y; + xrUploadArea.y1 = PSXDisplay.DisplayEnd.y; + } + else + { + xrUploadArea.x0 = PreviousPSXDisplay.DisplayPosition.x; + xrUploadArea.x1 = PreviousPSXDisplay.DisplayEnd.x; + xrUploadArea.y0 = PreviousPSXDisplay.DisplayPosition.y; + xrUploadArea.y1 = PreviousPSXDisplay.DisplayEnd.y; + } + + if (xrUploadArea.x0 < 0) xrUploadArea.x0 = 0; + else + if (xrUploadArea.x0 > 1023) xrUploadArea.x0 = 1023; + + if (xrUploadArea.x1 < 0) xrUploadArea.x1 = 0; + else + if (xrUploadArea.x1 > 1024) xrUploadArea.x1 = 1024; + + if (xrUploadArea.y0 < 0) xrUploadArea.y0 = 0; + else + if (xrUploadArea.y0 > iGPUHeightMask) xrUploadArea.y0 = iGPUHeightMask; + + if (xrUploadArea.y1 < 0) xrUploadArea.y1 = 0; + else + if (xrUploadArea.y1 > iGPUHeight) xrUploadArea.y1 = iGPUHeight; + + if (PSXDisplay.RGB24) + { + InvalidateTextureArea(xrUploadArea.x0,xrUploadArea.y0,xrUploadArea.x1-xrUploadArea.x0,xrUploadArea.y1-xrUploadArea.y0); + } +} + +//////////////////////////////////////////////////////////////////////// +// Upload screen (MDEC and such) +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +unsigned char * LoadDirectMovieFast(void); + +void UploadScreenEx(int Position) +{ + short ya,yb,xa,xb,x, y, YStep, XStep, U, UStep,ux[4],vy[4]; + + if(!PSXDisplay.DisplayMode.x) return; + if(!PSXDisplay.DisplayMode.y) return; + + glDisable(GL_SCISSOR_TEST); + glShadeModel(GL_FLAT); + bOldSmoothShaded=FALSE; + glDisable(GL_BLEND); + bBlendEnable=FALSE; + glDisable(GL_TEXTURE_2D); + bTexEnabled=FALSE; + glDisable(GL_ALPHA_TEST); + + glPixelZoom(((float)rRatioRect.right)/((float)PSXDisplay.DisplayMode.x), + -1.0f*(((float)rRatioRect.bottom)/((float)PSXDisplay.DisplayMode.y))); + + //----------------------------------------------------// + + YStep = 256; // max texture size + XStep = 256; + UStep = (PSXDisplay.RGB24 ? 128 : 0); + ya = xrUploadArea.y0; + yb = xrUploadArea.y1; + xa = xrUploadArea.x0; + xb = xrUploadArea.x1; + + for(y=ya;y<=yb;y+=YStep) // loop y + { + U = 0; + for(x=xa;x<=xb;x+=XStep) // loop x + { + ly0 = ly1 = y; // -> get y coords + ly2 = y + YStep; + if (ly2 > yb) ly2 = yb; + ly3 = ly2; + + lx0 = lx3 = x; // -> get x coords + lx1 = x + XStep; + if (lx1 > xb) lx1 = xb; + + lx2 = lx1; + + ux[0]=ux[3]=(xa - x); // -> set tex x coords + if (ux[0] < 0) ux[0]=ux[3]=0; + ux[2]=ux[1]=(xb - x); + if (ux[2] > 256) ux[2]=ux[1]=256; + + vy[0]=vy[1]=(ya - y); // -> set tex y coords + if (vy[0] < 0) vy[0]=vy[1]=0; + vy[2]=vy[3]=(yb - y); + if (vy[2] > 256) vy[2]=vy[3]=256; + + if ((ux[0] >= ux[2]) || // -> cheaters never win... + (vy[0] >= vy[2])) continue; // (but winners always cheat...) + + xrMovieArea.x0=lx0+U; xrMovieArea.y0=ly0; + xrMovieArea.x1=lx2+U; xrMovieArea.y1=ly2; + + offsetScreenUpload(Position); + + glRasterPos2f(vertex[0].x,vertex[0].y); + + glDrawPixels(xrMovieArea.x1-xrMovieArea.x0, + xrMovieArea.y1-xrMovieArea.y0, + GL_RGBA,GL_UNSIGNED_BYTE, + LoadDirectMovieFast()); + + U+=UStep; + } + } + + //----------------------------------------------------// + + glPixelZoom(1.0F,1.0F); + + glEnable(GL_ALPHA_TEST); + glEnable(GL_SCISSOR_TEST); +} + +//////////////////////////////////////////////////////////////////////// + +void UploadScreen(int Position) +{ + short x, y, YStep, XStep, U, s, UStep,ux[4],vy[4]; + short xa,xb,ya,yb; + + if(xrUploadArea.x0>1023) xrUploadArea.x0=1023; + if(xrUploadArea.x1>1024) xrUploadArea.x1=1024; + if(xrUploadArea.y0>iGPUHeightMask) xrUploadArea.y0=iGPUHeightMask; + if(xrUploadArea.y1>iGPUHeight) xrUploadArea.y1=iGPUHeight; + + if(xrUploadArea.x0==xrUploadArea.x1) return; + if(xrUploadArea.y0==xrUploadArea.y1) return; + + if(PSXDisplay.Disabled && iOffscreenDrawing<4) return; + + iDrawnSomething = 2; + iLastRGB24=PSXDisplay.RGB24+1; + + if(bSkipNextFrame) return; + + if(dwActFixes & 2) {UploadScreenEx(Position);return;} + + bUsingMovie = TRUE; + bDrawTextured = TRUE; // just doing textures + bDrawSmoothShaded = FALSE; + + if(bGLBlend) vertex[0].c.lcol=0xff7f7f7f; // set solid col + else vertex[0].c.lcol=0xffffffff; + SETCOL(vertex[0]); + + SetOGLDisplaySettings(0); + + YStep = 256; // max texture size + XStep = 256; + + UStep = (PSXDisplay.RGB24 ? 128 : 0); + + ya=xrUploadArea.y0; + yb=xrUploadArea.y1; + xa=xrUploadArea.x0; + xb=xrUploadArea.x1; + + for(y=ya;y<=yb;y+=YStep) // loop y + { + U = 0; + for(x=xa;x<=xb;x+=XStep) // loop x + { + ly0 = ly1 = y; // -> get y coords + ly2 = y + YStep; + if (ly2 > yb) ly2 = yb; + ly3 = ly2; + + lx0 = lx3 = x; // -> get x coords + lx1 = x + XStep; + if (lx1 > xb) lx1 = xb; + + lx2 = lx1; + + ux[0]=ux[3]=(xa - x); // -> set tex x coords + if (ux[0] < 0) ux[0]=ux[3]=0; + ux[2]=ux[1]=(xb - x); + if (ux[2] > 256) ux[2]=ux[1]=256; + + vy[0]=vy[1]=(ya - y); // -> set tex y coords + if (vy[0] < 0) vy[0]=vy[1]=0; + vy[2]=vy[3]=(yb - y); + if (vy[2] > 256) vy[2]=vy[3]=256; + + if ((ux[0] >= ux[2]) || // -> cheaters never win... + (vy[0] >= vy[2])) continue; // (but winners always cheat...) + + xrMovieArea.x0=lx0+U; xrMovieArea.y0=ly0; + xrMovieArea.x1=lx2+U; xrMovieArea.y1=ly2; + + s=ux[2] - ux[0]; if(s>255) s=255; + + gl_ux[2] = gl_ux[1] = s; + s=vy[2] - vy[0]; if(s>255) s=255; + gl_vy[2] = gl_vy[3] = s; + gl_ux[0] = gl_ux[3] = gl_vy[0] = gl_vy[1] = 0; + + SetRenderState((uint32_t)0x01000000); + SetRenderMode((uint32_t)0x01000000, FALSE); // upload texture data + offsetScreenUpload(Position); + assignTextureVRAMWrite(); + + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + + U+=UStep; + } + } + + bUsingMovie=FALSE; // done... + bDisplayNotSet = TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// Detect next screen +//////////////////////////////////////////////////////////////////////// + +BOOL IsCompleteInsideNextScreen(short x, short y, short xoff, short yoff) +{ + if (x > PSXDisplay.DisplayPosition.x+1) return FALSE; + if ((x + xoff) < PSXDisplay.DisplayEnd.x-1) return FALSE; + yoff+=y; + if (y >= PSXDisplay.DisplayPosition.y && + y <= PSXDisplay.DisplayEnd.y ) + { + if ((yoff) >= PSXDisplay.DisplayPosition.y && + (yoff) <= PSXDisplay.DisplayEnd.y ) return TRUE; + } + if (y > PSXDisplay.DisplayPosition.y+1) return FALSE; + if (yoff < PSXDisplay.DisplayEnd.y-1) return FALSE; + return TRUE; +} + +BOOL IsPrimCompleteInsideNextScreen(short x, short y, short xoff, short yoff) +{ + x+=PSXDisplay.DrawOffset.x; + if (x > PSXDisplay.DisplayPosition.x+1) return FALSE; + y+=PSXDisplay.DrawOffset.y; + if (y > PSXDisplay.DisplayPosition.y+1) return FALSE; + xoff+=PSXDisplay.DrawOffset.x; + if (xoff < PSXDisplay.DisplayEnd.x-1) return FALSE; + yoff+=PSXDisplay.DrawOffset.y; + if (yoff < PSXDisplay.DisplayEnd.y-1) return FALSE; + return TRUE; +} + +BOOL IsInsideNextScreen(short x, short y, short xoff, short yoff) +{ + if (x > PSXDisplay.DisplayEnd.x) return FALSE; + if (y > PSXDisplay.DisplayEnd.y) return FALSE; + if ((x + xoff) < PSXDisplay.DisplayPosition.x) return FALSE; + if ((y + yoff) < PSXDisplay.DisplayPosition.y) return FALSE; + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// mask stuff... +//////////////////////////////////////////////////////////////////////// + +//Mask1 Set mask bit while drawing. 1 = on +//Mask2 Do not draw to mask areas. 1= on + +void cmdSTP(unsigned char * baseAddr) +{ + uint32_t gdata = ((uint32_t*)baseAddr)[0]; + + STATUSREG&=~0x1800; // clear the necessary bits + STATUSREG|=((gdata & 0x03) << 11); // set the current bits + + if(!iUseMask) return; + + if(gdata&1) {sSetMask=0x8000;lSetMask=0x80008000;iSetMask=1;} + else {sSetMask=0; lSetMask=0; iSetMask=0;} + + if(gdata&2) + { + if(!(gdata&1)) iSetMask=2; + bCheckMask=TRUE; + if(iDepthFunc==0) return; + iDepthFunc=0; + glDepthFunc(GL_LESS); + } + else + { + bCheckMask=FALSE; + if(iDepthFunc==1) return; + glDepthFunc(GL_ALWAYS); + iDepthFunc=1; + } +} + +//////////////////////////////////////////////////////////////////////// +// cmd: Set texture page infos +//////////////////////////////////////////////////////////////////////// + +void cmdTexturePage(unsigned char * baseAddr) +{ + uint32_t gdata = ((uint32_t *)baseAddr)[0]; + UpdateGlobalTP((unsigned short)gdata); + GlobalTextREST = (gdata&0x00ffffff)>>9; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: turn on/off texture window +//////////////////////////////////////////////////////////////////////// + +void cmdTextureWindow(unsigned char *baseAddr) +{ + uint32_t gdata = ((uint32_t *)baseAddr)[0]; + uint32_t YAlign,XAlign; + + ulGPUInfoVals[INFO_TW]=gdata&0xFFFFF; + + if(gdata & 0x020) + TWin.Position.y1 = 8; // xxxx1 + else if (gdata & 0x040) + TWin.Position.y1 = 16; // xxx10 + else if (gdata & 0x080) + TWin.Position.y1 = 32; // xx100 + else if (gdata & 0x100) + TWin.Position.y1 = 64; // x1000 + else if (gdata & 0x200) + TWin.Position.y1 = 128; // 10000 + else + TWin.Position.y1 = 256; // 00000 + + // Texture window size is determined by the least bit set of the relevant 5 bits + + if (gdata & 0x001) + TWin.Position.x1 = 8; // xxxx1 + else if (gdata & 0x002) + TWin.Position.x1 = 16; // xxx10 + else if (gdata & 0x004) + TWin.Position.x1 = 32; // xx100 + else if (gdata & 0x008) + TWin.Position.x1 = 64; // x1000 + else if (gdata & 0x010) + TWin.Position.x1 = 128; // 10000 + else + TWin.Position.x1 = 256; // 00000 + + // Re-calculate the bit field, because we can't trust what is passed in the data + + YAlign = (uint32_t)(32 - (TWin.Position.y1 >> 3)); + XAlign = (uint32_t)(32 - (TWin.Position.x1 >> 3)); + + // Absolute position of the start of the texture window + + TWin.Position.y0 = (short)(((gdata >> 15) & YAlign) << 3); + TWin.Position.x0 = (short)(((gdata >> 10) & XAlign) << 3); + + if((TWin.Position.x0 == 0 && // tw turned off + TWin.Position.y0 == 0 && + TWin.Position.x1 == 0 && + TWin.Position.y1 == 0) || + (TWin.Position.x1 == 256 && + TWin.Position.y1 == 256)) + { + bUsingTWin = FALSE; // -> just do it + +#ifdef OWNSCALE + TWin.UScaleFactor = 1.0f; + TWin.VScaleFactor = 1.0f; +#else + TWin.UScaleFactor = + TWin.VScaleFactor = 1.0f/256.0f; +#endif + } + else // tw turned on + { + bUsingTWin = TRUE; + + TWin.OPosition.y1 = TWin.Position.y1; // -> get psx sizes + TWin.OPosition.x1 = TWin.Position.x1; + + if(TWin.Position.x1<=2) TWin.Position.x1=2; // -> set OGL sizes + else + if(TWin.Position.x1<=4) TWin.Position.x1=4; + else + if(TWin.Position.x1<=8) TWin.Position.x1=8; + else + if(TWin.Position.x1<=16) TWin.Position.x1=16; + else + if(TWin.Position.x1<=32) TWin.Position.x1=32; + else + if(TWin.Position.x1<=64) TWin.Position.x1=64; + else + if(TWin.Position.x1<=128) TWin.Position.x1=128; + else + if(TWin.Position.x1<=256) TWin.Position.x1=256; + + if(TWin.Position.y1<=2) TWin.Position.y1=2; + else + if(TWin.Position.y1<=4) TWin.Position.y1=4; + else + if(TWin.Position.y1<=8) TWin.Position.y1=8; + else + if(TWin.Position.y1<=16) TWin.Position.y1=16; + else + if(TWin.Position.y1<=32) TWin.Position.y1=32; + else + if(TWin.Position.y1<=64) TWin.Position.y1=64; + else + if(TWin.Position.y1<=128) TWin.Position.y1=128; + else + if(TWin.Position.y1<=256) TWin.Position.y1=256; + +#ifdef OWNSCALE + TWin.UScaleFactor = (float)TWin.Position.x1; + TWin.VScaleFactor = (float)TWin.Position.y1; +#else + TWin.UScaleFactor = ((float)TWin.Position.x1)/256.0f; // -> set scale factor + TWin.VScaleFactor = ((float)TWin.Position.y1)/256.0f; +#endif + } +} + +//////////////////////////////////////////////////////////////////////// +// mmm, Lewpy uses that in TileS ... I don't ;) +//////////////////////////////////////////////////////////////////////// + +/* +void ClampToPSXDrawAreaOffset(short *x0, short *y0, short *x1, short *y1) +{ + if (*x0 < PSXDisplay.DrawArea.x0) + { + *x1 -= (PSXDisplay.DrawArea.x0 - *x0); + *x0 = PSXDisplay.DrawArea.x0; + } + else + if (*x0 > PSXDisplay.DrawArea.x1) + { + *x0 = PSXDisplay.DrawArea.x1; + *x1 = 0; + } + + if (*y0 < PSXDisplay.DrawArea.y0) + { + *y1 -= (PSXDisplay.DrawArea.y0 - *y0); + *y0 = PSXDisplay.DrawArea.y0; + } + else + if (*y0 > PSXDisplay.DrawArea.y1) + { + *y0 = PSXDisplay.DrawArea.y1; + *y1 = 0; + } + + if (*x1 < 0) *x1 = 0; + + if ((*x1 + *x0) > PSXDisplay.DrawArea.x1) + *x1 = (PSXDisplay.DrawArea.x1 - *x0 + 1); + + if (*y1 < 0) *y1 = 0; + + if ((*y1 + *y0) > PSXDisplay.DrawArea.y1) + *y1 = (PSXDisplay.DrawArea.y1 - *y0 + 1); +} +*/ + +//////////////////////////////////////////////////////////////////////// +// Check draw area dimensions +//////////////////////////////////////////////////////////////////////// + +void ClampToPSXScreen(short *x0, short *y0, short *x1, short *y1) +{ + if (*x0 < 0) *x0 = 0; + else + if (*x0 > 1023) *x0 = 1023; + + if (*x1 < 0) *x1 = 0; + else + if (*x1 > 1023) *x1 = 1023; + + if (*y0 < 0) *y0 = 0; + else + if (*y0 > iGPUHeightMask) *y0 = iGPUHeightMask; + + if (*y1 < 0) *y1 = 0; + else + if (*y1 > iGPUHeightMask) *y1 = iGPUHeightMask; +} + +//////////////////////////////////////////////////////////////////////// +// Used in Load Image and Blk Fill +//////////////////////////////////////////////////////////////////////// + +void ClampToPSXScreenOffset(short *x0, short *y0, short *x1, short *y1) +{ + if (*x0 < 0) + { *x1 += *x0; *x0 = 0; } + else + if (*x0 > 1023) + { *x0 = 1023; *x1 = 0; } + + if (*y0 < 0) + { *y1 += *y0; *y0 = 0; } + else + if (*y0 > iGPUHeightMask) + { *y0 = iGPUHeightMask; *y1 = 0; } + + if (*x1 < 0) *x1 = 0; + + if ((*x1 + *x0) > 1024) *x1 = (1024 - *x0); + + if (*y1 < 0) *y1 = 0; + + if ((*y1 + *y0) > iGPUHeight) *y1 = (iGPUHeight - *y0); +} + +//////////////////////////////////////////////////////////////////////// +// cmd: start of drawing area... primitives will be clipped inside +//////////////////////////////////////////////////////////////////////// + +void cmdDrawAreaStart(unsigned char * baseAddr) +{ + uint32_t gdata = ((uint32_t *)baseAddr)[0]; + + drawX = gdata & 0x3ff; // for soft drawing + if(drawX>=1024) drawX=1023; + + if(dwGPUVersion==2) + { + ulGPUInfoVals[INFO_DRAWSTART]=gdata&0x3FFFFF; + drawY = (gdata>>12)&0x3ff; + } + else + { + ulGPUInfoVals[INFO_DRAWSTART]=gdata&0xFFFFF; + drawY = (gdata>>10)&0x3ff; + } + + if(drawY>=iGPUHeight) drawY=iGPUHeightMask; + + PreviousPSXDisplay.DrawArea.y0=PSXDisplay.DrawArea.y0; + PreviousPSXDisplay.DrawArea.x0=PSXDisplay.DrawArea.x0; + + PSXDisplay.DrawArea.y0 = (short)drawY; // for OGL drawing + PSXDisplay.DrawArea.x0 = (short)drawX; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: end of drawing area... primitives will be clipped inside +//////////////////////////////////////////////////////////////////////// + +void cmdDrawAreaEnd(unsigned char * baseAddr) +{ + uint32_t gdata = ((uint32_t *)baseAddr)[0]; + + drawW = gdata & 0x3ff; // for soft drawing + if(drawW>=1024) drawW=1023; + + if(dwGPUVersion==2) + { + ulGPUInfoVals[INFO_DRAWEND]=gdata&0x3FFFFF; + drawH = (gdata>>12)&0x3ff; + } + else + { + ulGPUInfoVals[INFO_DRAWEND]=gdata&0xFFFFF; + drawH = (gdata>>10)&0x3ff; + } + + if(drawH>=iGPUHeight) drawH=iGPUHeightMask; + + PSXDisplay.DrawArea.y1 = (short)drawH; // for OGL drawing + PSXDisplay.DrawArea.x1 = (short)drawW; + + ClampToPSXScreen(&PSXDisplay.DrawArea.x0, // clamp + &PSXDisplay.DrawArea.y0, + &PSXDisplay.DrawArea.x1, + &PSXDisplay.DrawArea.y1); + + bDisplayNotSet = TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: draw offset... will be added to prim coords +//////////////////////////////////////////////////////////////////////// + +void cmdDrawOffset(unsigned char * baseAddr) +{ + uint32_t gdata = ((uint32_t *)baseAddr)[0]; + + PreviousPSXDisplay.DrawOffset.x = + PSXDisplay.DrawOffset.x = (short)(gdata & 0x7ff); + + if (dwGPUVersion == 2) + { + ulGPUInfoVals[INFO_DRAWOFF] = gdata&0x7FFFFF; + PSXDisplay.DrawOffset.y = (short)((gdata>>12) & 0x7ff); + } + else + { + ulGPUInfoVals[INFO_DRAWOFF]=gdata&0x3FFFFF; + PSXDisplay.DrawOffset.y = (short)((gdata>>11) & 0x7ff); + } + + PSXDisplay.DrawOffset.x=(short)(((int)PSXDisplay.DrawOffset.x<<21)>>21); + PSXDisplay.DrawOffset.y=(short)(((int)PSXDisplay.DrawOffset.y<<21)>>21); + + PSXDisplay.CumulOffset.x = // new OGL prim offsets + PSXDisplay.DrawOffset.x - PSXDisplay.GDrawOffset.x + PreviousPSXDisplay.Range.x0; + PSXDisplay.CumulOffset.y = + PSXDisplay.DrawOffset.y - PSXDisplay.GDrawOffset.y + PreviousPSXDisplay.Range.y0; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: load image to vram +//////////////////////////////////////////////////////////////////////// + +void primLoadImage(unsigned char * baseAddr) +{ + unsigned short *sgpuData = ((unsigned short *) baseAddr); + + VRAMWrite.x = sgpuData[2]&0x03ff; + VRAMWrite.y = sgpuData[3]&iGPUHeightMask; + VRAMWrite.Width = sgpuData[4]; + VRAMWrite.Height = sgpuData[5]; + + iDataWriteMode = DR_VRAMTRANSFER; + VRAMWrite.ImagePtr = psxVuw + (VRAMWrite.y<<10) + VRAMWrite.x; + VRAMWrite.RowsRemaining = VRAMWrite.Width; + VRAMWrite.ColsRemaining = VRAMWrite.Height; + + bNeedWriteUpload=TRUE; +} + +//////////////////////////////////////////////////////////////////////// + +void PrepareRGB24Upload(void) +{ + VRAMWrite.x=(VRAMWrite.x*2)/3; + VRAMWrite.Width=(VRAMWrite.Width*2)/3; + + if(!PSXDisplay.InterlacedTest && // NEW + CheckAgainstScreen(VRAMWrite.x, VRAMWrite.y, VRAMWrite.Width, VRAMWrite.Height)) + { + xrUploadArea.x0-=PreviousPSXDisplay.DisplayPosition.x; + xrUploadArea.x1-=PreviousPSXDisplay.DisplayPosition.x; + xrUploadArea.y0-=PreviousPSXDisplay.DisplayPosition.y; + xrUploadArea.y1-=PreviousPSXDisplay.DisplayPosition.y; + } + else + if(CheckAgainstFrontScreen(VRAMWrite.x, VRAMWrite.y, VRAMWrite.Width, VRAMWrite.Height)) + { + xrUploadArea.x0-=PSXDisplay.DisplayPosition.x; + xrUploadArea.x1-=PSXDisplay.DisplayPosition.x; + xrUploadArea.y0-=PSXDisplay.DisplayPosition.y; + xrUploadArea.y1-=PSXDisplay.DisplayPosition.y; + } + else return; + + if(bRenderFrontBuffer) + { + updateFrontDisplay(); + } + + if(bNeedRGB24Update==FALSE) + { + xrUploadAreaRGB24=xrUploadArea; + bNeedRGB24Update=TRUE; + } + else + { + xrUploadAreaRGB24.x0=min(xrUploadAreaRGB24.x0,xrUploadArea.x0); + xrUploadAreaRGB24.x1=max(xrUploadAreaRGB24.x1,xrUploadArea.x1); + xrUploadAreaRGB24.y0=min(xrUploadAreaRGB24.y0,xrUploadArea.y0); + xrUploadAreaRGB24.y1=max(xrUploadAreaRGB24.y1,xrUploadArea.y1); + } +} + +//////////////////////////////////////////////////////////////////////// + +void CheckWriteUpdate() +{ + int iX=0,iY=0; + + if(VRAMWrite.Width) iX=1; + if(VRAMWrite.Height) iY=1; + + InvalidateTextureArea(VRAMWrite.x, VRAMWrite.y, VRAMWrite.Width-iX, VRAMWrite.Height-iY); + + if(PSXDisplay.Interlaced && !iOffscreenDrawing) return; + + if(PSXDisplay.RGB24) {PrepareRGB24Upload();return;} + + if(!PSXDisplay.InterlacedTest && + CheckAgainstScreen(VRAMWrite.x, VRAMWrite.y, VRAMWrite.Width, VRAMWrite.Height)) + { + if(dwActFixes&0x800) return; + + if(bRenderFrontBuffer) + { + updateFrontDisplay(); + } + + UploadScreen(FALSE); + + bNeedUploadTest=TRUE; + } + else + if(iOffscreenDrawing) + { + if (CheckAgainstFrontScreen(VRAMWrite.x, VRAMWrite.y, VRAMWrite.Width, VRAMWrite.Height)) + { + if(PSXDisplay.InterlacedTest) + { + if(PreviousPSXDisplay.InterlacedNew) + { + PreviousPSXDisplay.InterlacedNew=FALSE; + bNeedInterlaceUpdate=TRUE; + xrUploadAreaIL.x0=PSXDisplay.DisplayPosition.x; + xrUploadAreaIL.y0=PSXDisplay.DisplayPosition.y; + xrUploadAreaIL.x1=PSXDisplay.DisplayPosition.x+PSXDisplay.DisplayModeNew.x; + xrUploadAreaIL.y1=PSXDisplay.DisplayPosition.y+PSXDisplay.DisplayModeNew.y; + if(xrUploadAreaIL.x1>1023) xrUploadAreaIL.x1=1023; + if(xrUploadAreaIL.y1>511) xrUploadAreaIL.y1=511; + } + + if(bNeedInterlaceUpdate==FALSE) + { + xrUploadAreaIL=xrUploadArea; + bNeedInterlaceUpdate=TRUE; + } + else + { + xrUploadAreaIL.x0=min(xrUploadAreaIL.x0,xrUploadArea.x0); + xrUploadAreaIL.x1=max(xrUploadAreaIL.x1,xrUploadArea.x1); + xrUploadAreaIL.y0=min(xrUploadAreaIL.y0,xrUploadArea.y0); + xrUploadAreaIL.y1=max(xrUploadAreaIL.y1,xrUploadArea.y1); + } + return; + } + + if(!bNeedUploadAfter) + { + bNeedUploadAfter = TRUE; + xrUploadArea.x0=VRAMWrite.x; + xrUploadArea.x1=VRAMWrite.x+VRAMWrite.Width; + xrUploadArea.y0=VRAMWrite.y; + xrUploadArea.y1=VRAMWrite.y+VRAMWrite.Height; + } + else + { + xrUploadArea.x0=min(xrUploadArea.x0,VRAMWrite.x); + xrUploadArea.x1=max(xrUploadArea.x1,VRAMWrite.x+VRAMWrite.Width); + xrUploadArea.y0=min(xrUploadArea.y0,VRAMWrite.y); + xrUploadArea.y1=max(xrUploadArea.y1,VRAMWrite.y+VRAMWrite.Height); + } + + if(dwActFixes&0x8000) + { + if((xrUploadArea.x1-xrUploadArea.x0)>=(PSXDisplay.DisplayMode.x-32) && + (xrUploadArea.y1-xrUploadArea.y0)>=(PSXDisplay.DisplayMode.y-32)) + { + UploadScreen(-1); + updateFrontDisplay(); + } + } + } + } +} + +//////////////////////////////////////////////////////////////////////// +// cmd: vram -> psx mem +//////////////////////////////////////////////////////////////////////// + +void primStoreImage(unsigned char * baseAddr) +{ + unsigned short *sgpuData = ((unsigned short *) baseAddr); + + VRAMRead.x = sgpuData[2]&0x03ff; + VRAMRead.y = sgpuData[3]&iGPUHeightMask; + VRAMRead.Width = sgpuData[4]; + VRAMRead.Height = sgpuData[5]; + + VRAMRead.ImagePtr = psxVuw + (VRAMRead.y<<10) + VRAMRead.x; + VRAMRead.RowsRemaining = VRAMRead.Width; + VRAMRead.ColsRemaining = VRAMRead.Height; + + iDataReadMode = DR_VRAMTRANSFER; + + STATUSREG |= GPUSTATUS_READYFORVRAM; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: blkfill - NO primitive! Doesn't care about draw areas... +//////////////////////////////////////////////////////////////////////// + +void primBlkFill(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + iDrawnSomething = 1; + + sprtX = sgpuData[2]; + sprtY = sgpuData[3]; + sprtW = sgpuData[4] & 0x3ff; + sprtH = sgpuData[5] & iGPUHeightMask; + + sprtW = (sprtW + 15) & ~15; + + // Increase H & W if they are one short of full values, because they never can be full values + if (sprtH == iGPUHeightMask) sprtH=iGPUHeight; + if (sprtW == 1023) sprtW=1024; + + // x and y of start + ly0 = ly1 = sprtY; + ly2 = ly3 = (sprtY+sprtH); + lx0 = lx3 = sprtX; + lx1 = lx2 = (sprtX+sprtW); + + offsetBlk(); + + if(ClipVertexListScreen()) + { + PSXDisplay_t * pd; + if(PSXDisplay.InterlacedTest) pd=&PSXDisplay; + else pd=&PreviousPSXDisplay; + + if ((lx0 <= pd->DisplayPosition.x+16) && + (ly0 <= pd->DisplayPosition.y+16) && + (lx2 >= pd->DisplayEnd.x-16) && + (ly2 >= pd->DisplayEnd.y-16)) + { + GLclampf g,b,r; + g=((GLclampf)GREEN(gpuData[0]))/255.0f; + b=((GLclampf)BLUE(gpuData[0]))/255.0f; + r=((GLclampf)RED(gpuData[0]))/255.0f; + + glDisable(GL_SCISSOR_TEST); + glClearColor(r,g,b,1.0f); + glClear(uiBufferBits); + gl_z=0.0f; + + if(gpuData[0]!=0x02000000 && + (ly0>pd->DisplayPosition.y || + ly2DisplayEnd.y)) + { + bDrawTextured = FALSE; + bDrawSmoothShaded = FALSE; + SetRenderState((uint32_t)0x01000000); + SetRenderMode((uint32_t)0x01000000, FALSE); + vertex[0].c.lcol=0xff000000; + SETCOL(vertex[0]); + if(ly0>pd->DisplayPosition.y) + { + vertex[0].x=0;vertex[0].y=0; + vertex[1].x=pd->DisplayEnd.x-pd->DisplayPosition.x;vertex[1].y=0; + vertex[2].x=vertex[1].x;vertex[2].y=ly0-pd->DisplayPosition.y; + vertex[3].x=0;vertex[3].y=vertex[2].y; + PRIMdrawQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + } + if(ly2DisplayEnd.y) + { + vertex[0].x=0;vertex[0].y=(pd->DisplayEnd.y-pd->DisplayPosition.y)-(pd->DisplayEnd.y-ly2); + vertex[1].x=pd->DisplayEnd.x-pd->DisplayPosition.x;vertex[1].y=vertex[0].y; + vertex[2].x=vertex[1].x;vertex[2].y=pd->DisplayEnd.y; + vertex[3].x=0;vertex[3].y=vertex[2].y; + PRIMdrawQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + } + } + + glEnable(GL_SCISSOR_TEST); + } + else + { + bDrawTextured = FALSE; + bDrawSmoothShaded = FALSE; + SetRenderState((uint32_t)0x01000000); + SetRenderMode((uint32_t)0x01000000, FALSE); + vertex[0].c.lcol=gpuData[0]|0xff000000; + SETCOL(vertex[0]); + glDisable(GL_SCISSOR_TEST); + PRIMdrawQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + glEnable(GL_SCISSOR_TEST); + } + } + + //mmm... will clean all stuff, also if not all _should_ be cleaned... + //if (IsInsideNextScreen(sprtX, sprtY, sprtW, sprtH)) + // try this: + if (IsCompleteInsideNextScreen(sprtX, sprtY, sprtW, sprtH)) + { + lClearOnSwapColor = COLOR(gpuData[0]); + lClearOnSwap = 1; + } + + if(iOffscreenDrawing) + { + ClampToPSXScreenOffset( &sprtX, &sprtY, &sprtW, &sprtH); + if ((sprtW == 0) || (sprtH == 0)) return; + InvalidateTextureArea(sprtX, sprtY, sprtW-1, sprtH-1); + + sprtW+=sprtX; + sprtH+=sprtY; + + FillSoftwareArea(sprtX, sprtY, sprtW, sprtH, BGR24to16(gpuData[0])); + } +} + +//////////////////////////////////////////////////////////////////////// +// cmd: move image vram -> vram +//////////////////////////////////////////////////////////////////////// + +void MoveImageWrapped(short imageX0,short imageY0, + short imageX1,short imageY1, + short imageSX,short imageSY) +{ + int i,j,imageXE,imageYE; + + if(iFrameReadType&2) + { + imageXE=imageX0+imageSX; + imageYE=imageY0+imageSY; + + if(imageYE>iGPUHeight && imageXE>1024) + { + CheckVRamRead(0,0, + (imageXE&0x3ff), + (imageY0&iGPUHeightMask), + FALSE); + } + + if(imageXE>1024) + { + CheckVRamRead(0,imageY0, + (imageXE&0x3ff), + (imageYE>iGPUHeight)?iGPUHeight:imageYE, + FALSE); + } + + if(imageYE>iGPUHeight) + { + CheckVRamRead(imageX0,0, + (imageXE>1024)?1024:imageXE, + imageYE&iGPUHeightMask, + FALSE); + } + + CheckVRamRead(imageX0,imageY0, + (imageXE>1024)?1024:imageXE, + (imageYE>iGPUHeight)?iGPUHeight:imageYE, + FALSE); + } + + for(j=0;jiGPUHeight && imageXE>1024) + { + InvalidateTextureArea(0,0, + (imageXE&0x3ff)-1, + (imageYE&iGPUHeightMask)-1); + } + + if(imageXE>1024) + { + InvalidateTextureArea(0,imageY1, + (imageXE&0x3ff)-1, + ((imageYE>iGPUHeight)?iGPUHeight:imageYE)-imageY1-1); + } + + if(imageYE>iGPUHeight) + { + InvalidateTextureArea(imageX1,0, + ((imageXE>1024)?1024:imageXE)-imageX1-1, + (imageYE&iGPUHeightMask)-1); + } + + InvalidateTextureArea(imageX1,imageY1, + ((imageXE>1024)?1024:imageXE)-imageX1-1, + ((imageYE>iGPUHeight)?iGPUHeight:imageYE)-imageY1-1); + } +} + +//////////////////////////////////////////////////////////////////////// + +void primMoveImage(unsigned char * baseAddr) +{ + short *sgpuData = ((short *) baseAddr); + short imageY0,imageX0,imageY1,imageX1,imageSX,imageSY,i,j; + + imageX0 = sgpuData[2]&0x03ff; + imageY0 = sgpuData[3]&iGPUHeightMask; + imageX1 = sgpuData[4]&0x03ff; + imageY1 = sgpuData[5]&iGPUHeightMask; + imageSX = sgpuData[6]; + imageSY = sgpuData[7]; + + if((imageX0 == imageX1) && (imageY0 == imageY1)) return; + if(imageSX<=0) return; + if(imageSY<=0) return; + + if(iGPUHeight==1024 && sgpuData[7]>1024) return; + + if((imageY0+imageSY)>iGPUHeight || + (imageX0+imageSX)>1024 || + (imageY1+imageSY)>iGPUHeight || + (imageX1+imageSX)>1024) + { + MoveImageWrapped(imageX0,imageY0,imageX1,imageY1,imageSX,imageSY); + if((imageY0+imageSY)>iGPUHeight) imageSY=iGPUHeight-imageY0; + if((imageX0+imageSX)>1024) imageSX=1024-imageX0; + if((imageY1+imageSY)>iGPUHeight) imageSY=iGPUHeight-imageY1; + if((imageX1+imageSX)>1024) imageSX=1024-imageX1; + } + + if(iFrameReadType&2) + CheckVRamRead(imageX0,imageY0, + imageX0+imageSX, + imageY0+imageSY, + FALSE); + + if(imageSX&1) + { + unsigned short *SRCPtr, *DSTPtr; + unsigned short LineOffset; + + SRCPtr = psxVuw + (1024*imageY0) + imageX0; + DSTPtr = psxVuw + (1024*imageY1) + imageX1; + + LineOffset = 1024 - imageSX; + + for(j=0;j>1; + + SRCPtr = (uint32_t *)(psxVuw + (1024*imageY0) + imageX0); + DSTPtr = (uint32_t *)(psxVuw + (1024*imageY1) + imageX1); + + LineOffset = 512 - dx; + + for(j=0;j=PreviousPSXDisplay.DisplayPosition.x && + imageX1=PreviousPSXDisplay.DisplayPosition.y && + imageY1=PreviousPSXDisplay.DisplayPosition.x && + imageX1<=PreviousPSXDisplay.DisplayEnd.x && + imageY1>=PreviousPSXDisplay.DisplayPosition.y && + imageY1<=PreviousPSXDisplay.DisplayEnd.y) + { + if(!( + imageX0>=PSXDisplay.DisplayPosition.x && + imageX0=PSXDisplay.DisplayPosition.y && + imageY0=PreviousPSXDisplay.DisplayPosition.x && + imageX0=PreviousPSXDisplay.DisplayPosition.y && + imageY0=PSXDisplay.DisplayPosition.x && + imageX0=PSXDisplay.DisplayPosition.y && + imageY0 set color with + SETCOL(vertex[0]); // texture alpha + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + vertex[0].x+=POFF;vertex[1].x+=POFF; + vertex[2].x+=POFF;vertex[3].x+=POFF; + vertex[0].y+=POFF;vertex[1].y+=POFF; + vertex[2].y+=POFF;vertex[3].y+=POFF; + GlobalTextABR=0; + DrawSemiTrans=1; + SetSemiTrans(); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + GlobalTextABR=lABR; + DrawSemiTrans=lDST; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: small sprite (textured rect) +//////////////////////////////////////////////////////////////////////// + +void primSprt8(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + short s; + + iSpriteTex=1; + + sprtX = sgpuData[2]; + sprtY = sgpuData[3]; + sprtW = 8; + sprtH = 8; + + lx0 = sprtX; + ly0 = sprtY; + + offsetST(); + + // do texture stuff + gl_ux[0]=gl_ux[3]=baseAddr[8];//gpuData[2]&0xff; + + if(usMirror & 0x1000) + { + s=gl_ux[0]; + s-=sprtW-1; + if(s<0) {s=0;} + gl_ux[0]=gl_ux[3]=s; + } + + sSprite_ux2=s=gl_ux[0]+sprtW; + if(s) s--; + if(s>255) s=255; + gl_ux[1]=gl_ux[2]=s; + // Y coords + gl_vy[0]=gl_vy[1]=baseAddr[9];//(gpuData[2]>>8)&0xff; + + if(usMirror & 0x2000) + { + s=gl_vy[0]; + s-=sprtH-1; + if(s<0) {s=0;} + gl_vy[0]=gl_vy[1]=s; + } + + sSprite_vy2=s=gl_vy[0]+sprtH; + if(s) s--; + if(s>255) s=255; + gl_vy[2]=gl_vy[3]=s; + + ulClutID=(gpuData[2]>>16); + + bDrawTextured = TRUE; + bDrawSmoothShaded = FALSE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX4(); + + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + SetRenderColor(gpuData[0]); + lx0-=PSXDisplay.DrawOffset.x; + ly0-=PSXDisplay.DrawOffset.y; + + if(bUsingTWin) DrawSoftwareSpriteTWin(baseAddr,8,8); + else + if(usMirror) DrawSoftwareSpriteMirror(baseAddr,8,8); + else + DrawSoftwareSprite(baseAddr,8,8,baseAddr[8],baseAddr[9]); + } + } + + SetRenderMode(gpuData[0], TRUE); + SetZMask4SP(); + + sSprite_ux2=gl_ux[0]+sprtW; + sSprite_vy2=gl_vy[0]+sprtH; + + assignTextureSprite(); + + if(iFilterType>4) + DrawMultiFilterSprite(); + else + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + + if(bDrawMultiPass) + { + SetSemiTransMulti(1); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + } + + if(ubOpaqueDraw) + { + SetZMask4O(); + if(bUseMultiPass) SetOpaqueColor(gpuData[0]); + DEFOPAQUEON + + if(bSmallAlpha && iFilterType<=2) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + SetZMask4O(); + } + + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + DEFOPAQUEOFF + } + + iSpriteTex=0; + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: medium sprite (textured rect) +//////////////////////////////////////////////////////////////////////// + +void primSprt16(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + short s; + + iSpriteTex=1; + + sprtX = sgpuData[2]; + sprtY = sgpuData[3]; + sprtW = 16; + sprtH = 16; + + lx0 = sprtX; + ly0 = sprtY; + + offsetST(); + + // do texture stuff + gl_ux[0]=gl_ux[3]=baseAddr[8];//gpuData[2]&0xff; + + if(usMirror & 0x1000) + { + s=gl_ux[0]; + s-=sprtW-1; + if(s<0) {s=0;} + gl_ux[0]=gl_ux[3]=s; + } + + sSprite_ux2=s=gl_ux[0]+sprtW; + if(s) s--; + if(s>255) s=255; + gl_ux[1]=gl_ux[2]=s; + // Y coords + gl_vy[0]=gl_vy[1]=baseAddr[9];//(gpuData[2]>>8)&0xff; + + if(usMirror & 0x2000) + { + s=gl_vy[0]; + s-=sprtH-1; + if(s<0) {s=0;} + gl_vy[0]=gl_vy[1]=s; + } + + sSprite_vy2=s=gl_vy[0]+sprtH; + if(s) s--; + if(s>255) s=255; + gl_vy[2]=gl_vy[3]=s; + + ulClutID=(gpuData[2]>>16); + + bDrawTextured = TRUE; + bDrawSmoothShaded = FALSE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX4(); + + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + SetRenderColor(gpuData[0]); + lx0-=PSXDisplay.DrawOffset.x; + ly0-=PSXDisplay.DrawOffset.y; + if(bUsingTWin) DrawSoftwareSpriteTWin(baseAddr,16,16); + else + if(usMirror) DrawSoftwareSpriteMirror(baseAddr,16,16); + else + DrawSoftwareSprite(baseAddr,16,16,baseAddr[8],baseAddr[9]); + } + } + + SetRenderMode(gpuData[0], TRUE); + SetZMask4SP(); + + sSprite_ux2=gl_ux[0]+sprtW; + sSprite_vy2=gl_vy[0]+sprtH; + + assignTextureSprite(); + + if(iFilterType>4) + DrawMultiFilterSprite(); + else + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + + if(bDrawMultiPass) + { + SetSemiTransMulti(1); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + } + + if(ubOpaqueDraw) + { + SetZMask4O(); + if(bUseMultiPass) SetOpaqueColor(gpuData[0]); + DEFOPAQUEON + + if(bSmallAlpha && iFilterType<=2) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + SetZMask4O(); + } + + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + DEFOPAQUEOFF + } + + iSpriteTex=0; + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: free-size sprite (textured rect) +//////////////////////////////////////////////////////////////////////// + +void primSprtSRest(unsigned char * baseAddr,unsigned short type) +{ + uint32_t *gpuData = ((uint32_t *)baseAddr); + short *sgpuData = ((short *) baseAddr); + short s; + unsigned short sTypeRest=0; + + sprtX = sgpuData[2]; + sprtY = sgpuData[3]; + sprtW = sgpuData[6] & 0x3ff; + sprtH = sgpuData[7] & 0x1ff; + + // do texture stuff + switch(type) + { + case 1: + gl_vy[0]=gl_vy[1]=baseAddr[9]; + s=256-baseAddr[8]; + sprtW-=s; + sprtX+=s; + gl_ux[0]=gl_ux[3]=0; + break; + case 2: + gl_ux[0]=gl_ux[3]=baseAddr[8]; + s=256-baseAddr[9]; + sprtH-=s; + sprtY+=s; + gl_vy[0]=gl_vy[1]=0; + break; + case 3: + s=256-baseAddr[8]; + sprtW-=s; + sprtX+=s; + gl_ux[0]=gl_ux[3]=0; + s=256-baseAddr[9]; + sprtH-=s; + sprtY+=s; + gl_vy[0]=gl_vy[1]=0; + break; + + case 4: + gl_vy[0]=gl_vy[1]=baseAddr[9]; + s=512-baseAddr[8]; + sprtW-=s; + sprtX+=s; + gl_ux[0]=gl_ux[3]=0; + break; + case 5: + gl_ux[0]=gl_ux[3]=baseAddr[8]; + s=512-baseAddr[9]; + sprtH-=s; + sprtY+=s; + gl_vy[0]=gl_vy[1]=0; + break; + case 6: + s=512-baseAddr[8]; + sprtW-=s; + sprtX+=s; + gl_ux[0]=gl_ux[3]=0; + s=512-baseAddr[9]; + sprtH-=s; + sprtY+=s; + gl_vy[0]=gl_vy[1]=0; + break; + + } + + if(usMirror & 0x1000) + { + s=gl_ux[0]; + s-=sprtW-1;if(s<0) s=0; + gl_ux[0]=gl_ux[3]=s; + } + if(usMirror & 0x2000) + { + s=gl_vy[0]; + s-=sprtH-1;if(s<0) {s=0;} + gl_vy[0]=gl_vy[1]=s; + } + + sSprite_ux2=s=gl_ux[0]+sprtW; + if(s>255) s=255; + gl_ux[1]=gl_ux[2]=s; + sSprite_vy2=s=gl_vy[0]+sprtH; + if(s>255) s=255; + gl_vy[2]=gl_vy[3]=s; + + if(!bUsingTWin) + { + if(sSprite_ux2>256) + {sprtW=256-gl_ux[0];sSprite_ux2=256;sTypeRest+=1;} + if(sSprite_vy2>256) + {sprtH=256-gl_vy[0];sSprite_vy2=256;sTypeRest+=2;} + } + + lx0 = sprtX; + ly0 = sprtY; + + offsetST(); + + ulClutID=(gpuData[2]>>16); + + bDrawTextured = TRUE; + bDrawSmoothShaded = FALSE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX4(); + + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + SetRenderColor(gpuData[0]); + lx0-=PSXDisplay.DrawOffset.x; + ly0-=PSXDisplay.DrawOffset.y; + if(bUsingTWin) DrawSoftwareSpriteTWin(baseAddr,sprtW,sprtH); + else + if(usMirror) DrawSoftwareSpriteMirror(baseAddr,sprtW,sprtH); + else + DrawSoftwareSprite(baseAddr,sprtW,sprtH,baseAddr[8],baseAddr[9]); + } + } + + SetRenderMode(gpuData[0], TRUE); + SetZMask4SP(); + + sSprite_ux2=gl_ux[0]+sprtW; + sSprite_vy2=gl_vy[0]+sprtH; + + assignTextureSprite(); + + if(iFilterType>4) + DrawMultiFilterSprite(); + else + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + + if(bDrawMultiPass) + { + SetSemiTransMulti(1); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + } + + if(ubOpaqueDraw) + { + SetZMask4O(); + if(bUseMultiPass) SetOpaqueColor(gpuData[0]); + DEFOPAQUEON + + if(bSmallAlpha && iFilterType<=2) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + SetZMask4O(); + } + + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + DEFOPAQUEOFF + } + + if(sTypeRest && type<4) + { + if(sTypeRest&1 && type==1) primSprtSRest(baseAddr,4); + if(sTypeRest&2 && type==2) primSprtSRest(baseAddr,5); + if(sTypeRest==3 && type==3) primSprtSRest(baseAddr,6); + } +} + +void primSprtS(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + short s; + unsigned short sTypeRest=0; + + sprtX = sgpuData[2]; + sprtY = sgpuData[3]; + sprtW = sgpuData[6] & 0x3ff; + sprtH = sgpuData[7] & 0x1ff; + + if(!sprtH) return; + if(!sprtW) return; + + iSpriteTex=1; + + // do texture stuff + gl_ux[0]=gl_ux[3]=baseAddr[8];//gpuData[2]&0xff; + gl_vy[0]=gl_vy[1]=baseAddr[9];//(gpuData[2]>>8)&0xff; + + if(usMirror & 0x1000) + { + s=gl_ux[0]; + s-=sprtW-1; + if(s<0) {s=0;} + gl_ux[0]=gl_ux[3]=s; + } + if(usMirror & 0x2000) + { + s=gl_vy[0]; + s-=sprtH-1; + if(s<0) {s=0;} + gl_vy[0]=gl_vy[1]=s; + } + + sSprite_ux2=s=gl_ux[0]+sprtW; + if(s) s--; + if(s>255) s=255; + gl_ux[1]=gl_ux[2]=s; + sSprite_vy2=s=gl_vy[0]+sprtH; + if(s) s--; + if(s>255) s=255; + gl_vy[2]=gl_vy[3]=s; + + if(!bUsingTWin) + { + if(sSprite_ux2>256) + {sprtW=256-gl_ux[0];sSprite_ux2=256;sTypeRest+=1;} + if(sSprite_vy2>256) + {sprtH=256-gl_vy[0];sSprite_vy2=256;sTypeRest+=2;} + } + + lx0 = sprtX; + ly0 = sprtY; + + offsetST(); + + ulClutID=(gpuData[2]>>16); + + bDrawTextured = TRUE; + bDrawSmoothShaded = FALSE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX4(); + + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + SetRenderColor(gpuData[0]); + lx0-=PSXDisplay.DrawOffset.x; + ly0-=PSXDisplay.DrawOffset.y; + if(bUsingTWin) DrawSoftwareSpriteTWin(baseAddr,sprtW,sprtH); + else + if(usMirror) DrawSoftwareSpriteMirror(baseAddr,sprtW,sprtH); + else + DrawSoftwareSprite(baseAddr,sprtW,sprtH,baseAddr[8],baseAddr[9]); + } + } + + SetRenderMode(gpuData[0], TRUE); + SetZMask4SP(); + + if((dwActFixes&1) && gTexFrameName && gTexName==gTexFrameName) + {iSpriteTex=0;return;} + + sSprite_ux2=gl_ux[0]+sprtW; + sSprite_vy2=gl_vy[0]+sprtH; + + assignTextureSprite(); + + if(iFilterType>4) + DrawMultiFilterSprite(); + else + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + + if(bDrawMultiPass) + { + SetSemiTransMulti(1); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + } + + if(ubOpaqueDraw) + { + SetZMask4O(); + if(bUseMultiPass) SetOpaqueColor(gpuData[0]); + DEFOPAQUEON + + if(bSmallAlpha && iFilterType<=2) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + SetZMask4O(); + } + + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + DEFOPAQUEOFF + } + + if(sTypeRest) + { + if(sTypeRest&1) primSprtSRest(baseAddr,1); + if(sTypeRest&2) primSprtSRest(baseAddr,2); + if(sTypeRest==3) primSprtSRest(baseAddr,3); + } + + iSpriteTex=0; + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: flat shaded Poly4 +//////////////////////////////////////////////////////////////////////// + +void primPolyF4(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = sgpuData[2]; + ly0 = sgpuData[3]; + lx1 = sgpuData[4]; + ly1 = sgpuData[5]; + lx2 = sgpuData[6]; + ly2 = sgpuData[7]; + lx3 = sgpuData[8]; + ly3 = sgpuData[9]; + + if(offset4()) return; + + bDrawTextured = FALSE; + bDrawSmoothShaded = FALSE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX4(); + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + drawPoly4F(gpuData[0]); + } + } + + SetRenderMode(gpuData[0], FALSE); + SetZMask4NT(); + + vertex[0].c.lcol=gpuData[0];vertex[0].c.col[3]=ubGloColAlpha; + SETCOL(vertex[0]); + + PRIMdrawTri2(&vertex[0], &vertex[1], &vertex[2],&vertex[3]); + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: smooth shaded Poly4 +//////////////////////////////////////////////////////////////////////// + +void primPolyG4(unsigned char * baseAddr); + +BOOL bDrawOffscreenFrontFF9G4(void) +{ + if(lx0< PSXDisplay.DisplayPosition.x) return FALSE; // must be complete in front + if(lx0> PSXDisplay.DisplayEnd.x) return FALSE; + if(ly0< PSXDisplay.DisplayPosition.y) return FALSE; + if(ly0> PSXDisplay.DisplayEnd.y) return FALSE; + if(lx1< PSXDisplay.DisplayPosition.x) return FALSE; + if(lx1> PSXDisplay.DisplayEnd.x) return FALSE; + if(ly1< PSXDisplay.DisplayPosition.y) return FALSE; + if(ly1> PSXDisplay.DisplayEnd.y) return FALSE; + if(lx2< PSXDisplay.DisplayPosition.x) return FALSE; + if(lx2> PSXDisplay.DisplayEnd.x) return FALSE; + if(ly2< PSXDisplay.DisplayPosition.y) return FALSE; + if(ly2> PSXDisplay.DisplayEnd.y) return FALSE; + if(lx3< PSXDisplay.DisplayPosition.x) return FALSE; + if(lx3> PSXDisplay.DisplayEnd.x) return FALSE; + if(ly3< PSXDisplay.DisplayPosition.y) return FALSE; + if(ly3> PSXDisplay.DisplayEnd.y) return FALSE; + return TRUE; +} + +BOOL bCheckFF9G4(unsigned char * baseAddr) +{ + static unsigned char pFF9G4Cache[32]; + static int iFF9Fix=0; + + if(baseAddr) + { + if(iFF9Fix==0) + { + if(bDrawOffscreenFrontFF9G4()) + { + short *sgpuData = ((short *) pFF9G4Cache); + iFF9Fix=2; + memcpy(pFF9G4Cache,baseAddr,32); + + if(sgpuData[2]==142) + { + sgpuData[2] +=65; + sgpuData[10]+=65; + } + return TRUE; + } + else iFF9Fix=1; + } + return FALSE; + } + + if(iFF9Fix==2) + { + int labr=GlobalTextABR; + GlobalTextABR = 1; + primPolyG4(pFF9G4Cache); + GlobalTextABR = labr; + } + iFF9Fix = 0; + + return FALSE; +} + +//////////////////////////////////////////////////////////////////////// + +void primPolyG4(unsigned char * baseAddr) +{ + uint32_t *gpuData = (uint32_t *)baseAddr; + short *sgpuData = ((short *)baseAddr); + + lx0 = sgpuData[2]; + ly0 = sgpuData[3]; + lx1 = sgpuData[6]; + ly1 = sgpuData[7]; + lx2 = sgpuData[10]; + ly2 = sgpuData[11]; + lx3 = sgpuData[14]; + ly3 = sgpuData[15]; + + if(offset4()) return; + + bDrawTextured = FALSE; + bDrawSmoothShaded = TRUE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX4(); + + if((dwActFixes&512) && bCheckFF9G4(baseAddr)) return; + + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + drawPoly4G(gpuData[0], gpuData[2], gpuData[4], gpuData[6]); + } + } + + SetRenderMode(gpuData[0], FALSE); + SetZMask4NT(); + + vertex[0].c.lcol=gpuData[0]; + vertex[1].c.lcol=gpuData[2]; + vertex[2].c.lcol=gpuData[4]; + vertex[3].c.lcol=gpuData[6]; + + vertex[0].c.col[3]=vertex[1].c.col[3]=vertex[2].c.col[3]=vertex[3].c.col[3]=ubGloAlpha; + + + PRIMdrawGouraudTri2Color(&vertex[0],&vertex[1], &vertex[2], &vertex[3]); + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: flat shaded Texture3 +//////////////////////////////////////////////////////////////////////// + +BOOL DoLineCheck(uint32_t *gpuData) +{ + BOOL bQuad=FALSE;short dx,dy; + + if(lx0==lx1) + { + dx=lx0-lx2;if(dx<0) dx=-dx; + + if(ly1==ly2) + { + dy=ly1-ly0;if(dy<0) dy=-dy; + if(dx<=1) + { + vertex[3]=vertex[2]; + vertex[2]=vertex[0]; + vertex[2].x=vertex[3].x; + } + else + if(dy<=1) + { + vertex[3]=vertex[2]; + vertex[2].y=vertex[0].y; + } + else return FALSE; + + bQuad=TRUE; + } + else + if(ly0==ly2) + { + dy=ly0-ly1;if(dy<0) dy=-dy; + if(dx<=1) + { + vertex[3]=vertex[1]; + vertex[3].x=vertex[2].x; + } + else + if(dy<=1) + { + vertex[3]=vertex[2]; + vertex[3].y=vertex[1].y; + } + else return FALSE; + + bQuad=TRUE; + } + } + + if(lx0==lx2) + { + dx=lx0-lx1;if(dx<0) dx=-dx; + + if(ly2==ly1) + { + dy=ly2-ly0;if(dy<0) dy=-dy; + if(dx<=1) + { + vertex[3]=vertex[1]; + vertex[1]=vertex[0]; + vertex[1].x=vertex[3].x; + } + else + if(dy<=1) + { + vertex[3]=vertex[1]; + vertex[1].y=vertex[0].y; + } + else return FALSE; + + bQuad=TRUE; + } + else + if(ly0==ly1) + { + dy=ly2-ly0;if(dy<0) dy=-dy; + if(dx<=1) + { + vertex[3]=vertex[2]; + vertex[3].x=vertex[1].x; + } + else + if(dy<=1) + { + vertex[3]=vertex[1]; + vertex[3].y=vertex[2].y; + } + else return FALSE; + + bQuad=TRUE; + } + } + + if(lx1==lx2) + { + dx=lx1-lx0;if(dx<0) dx=-dx; + + if(ly1==ly0) + { + dy=ly1-ly2;if(dy<0) dy=-dy; + + if(dx<=1) + { + vertex[3]=vertex[2]; + vertex[2].x=vertex[0].x; + } + else + if(dy<=1) + { + vertex[3]=vertex[2]; + vertex[2]=vertex[0]; + vertex[2].y=vertex[3].y; + } + else return FALSE; + + bQuad=TRUE; + } + else + if(ly2==ly0) + { + dy=ly2-ly1;if(dy<0) dy=-dy; + + if(dx<=1) + { + vertex[3]=vertex[1]; + vertex[1].x=vertex[0].x; + } + else + if(dy<=1) + { + vertex[3]=vertex[1]; + vertex[1]=vertex[0]; + vertex[1].y=vertex[3].y; + } + else return FALSE; + + bQuad=TRUE; + } + } + + if(!bQuad) return FALSE; + + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[3], &vertex[2]); + + if(bDrawMultiPass) + { + SetSemiTransMulti(1); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[3], &vertex[2]); + } + + if(ubOpaqueDraw) + { + SetZMask4O(); + if(bUseMultiPass) SetOpaqueColor(gpuData[0]); + DEFOPAQUEON + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[3], &vertex[2]); + DEFOPAQUEOFF + } + + iDrawnSomething=1; + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// + +void primPolyFT3(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = sgpuData[2]; + ly0 = sgpuData[3]; + lx1 = sgpuData[6]; + ly1 = sgpuData[7]; + lx2 = sgpuData[10]; + ly2 = sgpuData[11]; + + if(offset3()) return; + + // do texture UV coordinates stuff + gl_ux[0]=gl_ux[3]=baseAddr[8];//gpuData[2]&0xff; + gl_vy[0]=gl_vy[3]=baseAddr[9];//(gpuData[2]>>8)&0xff; + gl_ux[1]=baseAddr[16];//gpuData[4]&0xff; + gl_vy[1]=baseAddr[17];//(gpuData[4]>>8)&0xff; + gl_ux[2]=baseAddr[24];//gpuData[6]&0xff; + gl_vy[2]=baseAddr[25];//(gpuData[6]>>8)&0xff; + + UpdateGlobalTP((unsigned short)(gpuData[4]>>16)); + ulClutID=gpuData[2]>>16; + + bDrawTextured = TRUE; + bDrawSmoothShaded = FALSE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX3(); + if(bDrawOffscreen3()) + { + InvalidateTextureAreaEx(); + SetRenderColor(gpuData[0]); + drawPoly3FT(baseAddr); + } + } + + SetRenderMode(gpuData[0], TRUE); + SetZMask3(); + + assignTexture3(); + + if(!(dwActFixes&0x10)) + { + if(DoLineCheck(gpuData)) return; + } + + PRIMdrawTexturedTri(&vertex[0], &vertex[1], &vertex[2]); + + if(bDrawMultiPass) + { + SetSemiTransMulti(1); + PRIMdrawTexturedTri(&vertex[0], &vertex[1], &vertex[2]); + } + + if(ubOpaqueDraw) + { + SetZMask3O(); + if(bUseMultiPass) SetOpaqueColor(gpuData[0]); + DEFOPAQUEON + PRIMdrawTexturedTri(&vertex[0], &vertex[1], &vertex[2]); + DEFOPAQUEOFF + } + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: flat shaded Texture4 +//////////////////////////////////////////////////////////////////////// + +#define ST_FAC 255.99f + +void RectTexAlign(void) +{ + int UFlipped = FALSE; + int VFlipped = FALSE; + + if(gTexName==gTexFrameName) return; + + if(ly0==ly1) + { + if(!((lx1==lx3 && ly3==ly2 && lx2==lx0) || + (lx1==lx2 && ly2==ly3 && lx3==lx0))) + return; + + if(ly0 vertex[2].tow) + VFlipped = 1; + } + else + { + if (vertex[0].tow < vertex[2].tow) + VFlipped = 2; + } + } + else + if(ly0==ly2) + { + if(!((lx2==lx3 && ly3==ly1 && lx1==lx0) || + (lx2==lx1 && ly1==ly3 && lx3==lx0))) + return; + + if(ly0 vertex[1].tow) + VFlipped = 3; + } + else + { + if (vertex[0].tow < vertex[1].tow) + VFlipped = 4; + } + } + else + if(ly0==ly3) + { + if(!((lx3==lx2 && ly2==ly1 && lx1==lx0) || + (lx3==lx1 && ly1==ly2 && lx2==lx0))) + return; + + if(ly0 vertex[1].tow) + VFlipped = 5; + } + else + { + if (vertex[0].tow < vertex[1].tow) + VFlipped = 6; + } + } + else return; + + if(lx0==lx1) + { + if(lx0 vertex[2].sow) + UFlipped = 1; + } + else + { + if (vertex[0].sow < vertex[2].sow) + UFlipped = 2; + } + } + else + if(lx0==lx2) + { + if(lx0 vertex[1].sow) + UFlipped = 3; + } + else + { + if (vertex[0].sow < vertex[1].sow) + UFlipped = 4; + } + } + else + if(lx0==lx3) + { + if(lx0 vertex[1].sow) + UFlipped = 5; + } + else + { + if (vertex[0].sow < vertex[1].sow) + UFlipped = 6; + } + } + + if (UFlipped) + { +#ifdef OWNSCALE + if(bUsingTWin) + { + switch(UFlipped) + { + case 1: + vertex[2].sow+=0.95f/TWin.UScaleFactor; + vertex[3].sow+=0.95f/TWin.UScaleFactor; + break; + case 2: + vertex[0].sow+=0.95f/TWin.UScaleFactor; + vertex[1].sow+=0.95f/TWin.UScaleFactor; + break; + case 3: + vertex[1].sow+=0.95f/TWin.UScaleFactor; + vertex[3].sow+=0.95f/TWin.UScaleFactor; + break; + case 4: + vertex[0].sow+=0.95f/TWin.UScaleFactor; + vertex[2].sow+=0.95f/TWin.UScaleFactor; + break; + case 5: + vertex[1].sow+=0.95f/TWin.UScaleFactor; + vertex[2].sow+=0.95f/TWin.UScaleFactor; + break; + case 6: + vertex[0].sow+=0.95f/TWin.UScaleFactor; + vertex[3].sow+=0.95f/TWin.UScaleFactor; + break; + } + } + else + { + switch(UFlipped) + { + case 1: + vertex[2].sow+=1.0f/ST_FAC; + vertex[3].sow+=1.0f/ST_FAC; + break; + case 2: + vertex[0].sow+=1.0f/ST_FAC; + vertex[1].sow+=1.0f/ST_FAC; + break; + case 3: + vertex[1].sow+=1.0f/ST_FAC; + vertex[3].sow+=1.0f/ST_FAC; + break; + case 4: + vertex[0].sow+=1.0f/ST_FAC; + vertex[2].sow+=1.0f/ST_FAC; + break; + case 5: + vertex[1].sow+=1.0f/ST_FAC; + vertex[2].sow+=1.0f/ST_FAC; + break; + case 6: + vertex[0].sow+=1.0f/ST_FAC; + vertex[3].sow+=1.0f/ST_FAC; + break; + } + } +#else + if(bUsingTWin) + { + switch(UFlipped) + { + case 1: + vertex[2].sow+=1.0f/TWin.UScaleFactor; + vertex[3].sow+=1.0f/TWin.UScaleFactor; + break; + case 2: + vertex[0].sow+=1.0f/TWin.UScaleFactor; + vertex[1].sow+=1.0f/TWin.UScaleFactor; + break; + case 3: + vertex[1].sow+=1.0f/TWin.UScaleFactor; + vertex[3].sow+=1.0f/TWin.UScaleFactor; + break; + case 4: + vertex[0].sow+=1.0f/TWin.UScaleFactor; + vertex[2].sow+=1.0f/TWin.UScaleFactor; + break; + case 5: + vertex[1].sow+=1.0f/TWin.UScaleFactor; + vertex[2].sow+=1.0f/TWin.UScaleFactor; + break; + case 6: + vertex[0].sow+=1.0f/TWin.UScaleFactor; + vertex[3].sow+=1.0f/TWin.UScaleFactor; + break; + } + } + else + { + switch(UFlipped) + { + case 1: + vertex[2].sow+=1.0f; + vertex[3].sow+=1.0f; + break; + case 2: + vertex[0].sow+=1.0f; + vertex[1].sow+=1.0f; + break; + case 3: + vertex[1].sow+=1.0f; + vertex[3].sow+=1.0f; + break; + case 4: + vertex[0].sow+=1.0f; + vertex[2].sow+=1.0f; + break; + case 5: + vertex[1].sow+=1.0f; + vertex[2].sow+=1.0f; + break; + case 6: + vertex[0].sow+=1.0f; + vertex[3].sow+=1.0f; + break; + } + } +#endif + } + + if (VFlipped) + { +#ifdef OWNSCALE + if(bUsingTWin) + { + switch(VFlipped) + { + case 1: + vertex[2].tow+=0.95f/TWin.VScaleFactor; + vertex[3].tow+=0.95f/TWin.VScaleFactor; + break; + case 2: + vertex[0].tow+=0.95f/TWin.VScaleFactor; + vertex[1].tow+=0.95f/TWin.VScaleFactor; + break; + case 3: + vertex[1].tow+=0.95f/TWin.VScaleFactor; + vertex[3].tow+=0.95f/TWin.VScaleFactor; + break; + case 4: + vertex[0].tow+=0.95f/TWin.VScaleFactor; + vertex[2].tow+=0.95f/TWin.VScaleFactor; + break; + case 5: + vertex[1].tow+=0.95f/TWin.VScaleFactor; + vertex[2].tow+=0.95f/TWin.VScaleFactor; + break; + case 6: + vertex[0].tow+=0.95f/TWin.VScaleFactor; + vertex[3].tow+=0.95f/TWin.VScaleFactor; + break; + } + } + else + { + switch(VFlipped) + { + case 1: + vertex[2].tow+=1.0f/ST_FAC; + vertex[3].tow+=1.0f/ST_FAC; + break; + case 2: + vertex[0].tow+=1.0f/ST_FAC; + vertex[1].tow+=1.0f/ST_FAC; + break; + case 3: + vertex[1].tow+=1.0f/ST_FAC; + vertex[3].tow+=1.0f/ST_FAC; + break; + case 4: + vertex[0].tow+=1.0f/ST_FAC; + vertex[2].tow+=1.0f/ST_FAC; + break; + case 5: + vertex[1].tow+=1.0f/ST_FAC; + vertex[2].tow+=1.0f/ST_FAC; + break; + case 6: + vertex[0].tow+=1.0f/ST_FAC; + vertex[3].tow+=1.0f/ST_FAC; + break; + } + } +#else + if(bUsingTWin) + { + switch(VFlipped) + { + case 1: + vertex[2].tow+=1.0f/TWin.VScaleFactor; + vertex[3].tow+=1.0f/TWin.VScaleFactor; + break; + case 2: + vertex[0].tow+=1.0f/TWin.VScaleFactor; + vertex[1].tow+=1.0f/TWin.VScaleFactor; + break; + case 3: + vertex[1].tow+=1.0f/TWin.VScaleFactor; + vertex[3].tow+=1.0f/TWin.VScaleFactor; + break; + case 4: + vertex[0].tow+=1.0f/TWin.VScaleFactor; + vertex[2].tow+=1.0f/TWin.VScaleFactor; + break; + case 5: + vertex[1].tow+=1.0f/TWin.VScaleFactor; + vertex[2].tow+=1.0f/TWin.VScaleFactor; + break; + case 6: + vertex[0].tow+=1.0f/TWin.VScaleFactor; + vertex[3].tow+=1.0f/TWin.VScaleFactor; + break; + } + } + else + { + switch(VFlipped) + { + case 1: + vertex[2].tow+=1.0f; + vertex[3].tow+=1.0f; + break; + case 2: + vertex[0].tow+=1.0f; + vertex[1].tow+=1.0f; + break; + case 3: + vertex[1].tow+=1.0f; + vertex[3].tow+=1.0f; + break; + case 4: + vertex[0].tow+=1.0f; + vertex[2].tow+=1.0f; + break; + case 5: + vertex[1].tow+=1.0f; + vertex[2].tow+=1.0f; + break; + case 6: + vertex[0].tow+=1.0f; + vertex[3].tow+=1.0f; + break; + } + } +#endif + } + +} + +void primPolyFT4(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *)baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = sgpuData[2]; + ly0 = sgpuData[3]; + lx1 = sgpuData[6]; + ly1 = sgpuData[7]; + lx2 = sgpuData[10]; + ly2 = sgpuData[11]; + lx3 = sgpuData[14]; + ly3 = sgpuData[15]; + + if(offset4()) return; + + gl_vy[0]=baseAddr[9];//((gpuData[2]>>8)&0xff); + gl_vy[1]=baseAddr[17];//((gpuData[4]>>8)&0xff); + gl_vy[2]=baseAddr[25];//((gpuData[6]>>8)&0xff); + gl_vy[3]=baseAddr[33];//((gpuData[8]>>8)&0xff); + + gl_ux[0]=baseAddr[8];//(gpuData[2]&0xff); + gl_ux[1]=baseAddr[16];//(gpuData[4]&0xff); + gl_ux[2]=baseAddr[24];//(gpuData[6]&0xff); + gl_ux[3]=baseAddr[32];//(gpuData[8]&0xff); + + UpdateGlobalTP((unsigned short)(gpuData[4]>>16)); + ulClutID=(gpuData[2]>>16); + + bDrawTextured = TRUE; + bDrawSmoothShaded = FALSE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX4(); + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + SetRenderColor(gpuData[0]); + drawPoly4FT(baseAddr); + } + } + + SetRenderMode(gpuData[0], TRUE); + + SetZMask4(); + + assignTexture4(); + + RectTexAlign(); + + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[3], &vertex[2]); + + if(bDrawMultiPass) + { + SetSemiTransMulti(1); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[3], &vertex[2]); + } + + if(ubOpaqueDraw) + { + SetZMask4O(); + if(bUseMultiPass) SetOpaqueColor(gpuData[0]); + DEFOPAQUEON + + if(bSmallAlpha && iFilterType<=2) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[3], &vertex[2]); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + SetZMask4O(); + } + + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[3], &vertex[2]); + DEFOPAQUEOFF + } + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: smooth shaded Texture3 +//////////////////////////////////////////////////////////////////////// + +void primPolyGT3(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = sgpuData[2]; + ly0 = sgpuData[3]; + lx1 = sgpuData[8]; + ly1 = sgpuData[9]; + lx2 = sgpuData[14]; + ly2 = sgpuData[15]; + + if(offset3()) return; + + // do texture stuff + gl_ux[0]=gl_ux[3]=baseAddr[8];//gpuData[2]&0xff; + gl_vy[0]=gl_vy[3]=baseAddr[9];//(gpuData[2]>>8)&0xff; + gl_ux[1]=baseAddr[20];//gpuData[5]&0xff; + gl_vy[1]=baseAddr[21];//(gpuData[5]>>8)&0xff; + gl_ux[2]=baseAddr[32];//gpuData[8]&0xff; + gl_vy[2]=baseAddr[33];//(gpuData[8]>>8)&0xff; + + UpdateGlobalTP((unsigned short)(gpuData[5]>>16)); + ulClutID=(gpuData[2]>>16); + + bDrawTextured = TRUE; + bDrawSmoothShaded = TRUE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX3(); + if(bDrawOffscreen3()) + { + InvalidateTextureAreaEx(); + drawPoly3GT(baseAddr); + } + } + + SetRenderMode(gpuData[0], FALSE); + SetZMask3(); + + assignTexture3(); + + if(bDrawNonShaded) + { + //if(!bUseMultiPass) vertex[0].lcol=DoubleBGR2RGB(gpuData[0]); else vertex[0].lcol=gpuData[0]; + // eat this... + if(bGLBlend) vertex[0].c.lcol=0x7f7f7f; + else vertex[0].c.lcol=0xffffff; + vertex[0].c.col[3]=ubGloAlpha; + SETCOL(vertex[0]); + + PRIMdrawTexturedTri(&vertex[0], &vertex[1], &vertex[2]); + + if(ubOpaqueDraw) + { + SetZMask3O(); + DEFOPAQUEON + PRIMdrawTexturedTri(&vertex[0], &vertex[1], &vertex[2]); + DEFOPAQUEOFF + } + return; + } + + if(!bUseMultiPass && !bGLBlend) + { + vertex[0].c.lcol=DoubleBGR2RGB(gpuData[0]); + vertex[1].c.lcol=DoubleBGR2RGB(gpuData[3]); + vertex[2].c.lcol=DoubleBGR2RGB(gpuData[6]); + } + else + { + vertex[0].c.lcol=gpuData[0]; + vertex[1].c.lcol=gpuData[3]; + vertex[2].c.lcol=gpuData[6]; + } + vertex[0].c.col[3]=vertex[1].c.col[3]=vertex[2].c.col[3]=ubGloAlpha; + + PRIMdrawTexGouraudTriColor(&vertex[0], &vertex[1], &vertex[2]); + + if(bDrawMultiPass) + { + SetSemiTransMulti(1); + PRIMdrawTexGouraudTriColor(&vertex[0], &vertex[1], &vertex[2]); + } + + if(ubOpaqueDraw) + { + SetZMask3O(); + if(bUseMultiPass) + { + vertex[0].c.lcol=DoubleBGR2RGB(gpuData[0]); + vertex[1].c.lcol=DoubleBGR2RGB(gpuData[3]); + vertex[2].c.lcol=DoubleBGR2RGB(gpuData[6]); + vertex[0].c.col[3]=vertex[1].c.col[3]=vertex[2].c.col[3]=ubGloAlpha; + } + DEFOPAQUEON + PRIMdrawTexGouraudTriColor(&vertex[0], &vertex[1], &vertex[2]); + DEFOPAQUEOFF + } + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: smooth shaded Poly3 +//////////////////////////////////////////////////////////////////////// + +void primPolyG3(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *)baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = sgpuData[2]; + ly0 = sgpuData[3]; + lx1 = sgpuData[6]; + ly1 = sgpuData[7]; + lx2 = sgpuData[10]; + ly2 = sgpuData[11]; + + if(offset3()) return; + + bDrawTextured = FALSE; + bDrawSmoothShaded = TRUE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX3(); + if(bDrawOffscreen3()) + { + InvalidateTextureAreaEx(); + drawPoly3G(gpuData[0], gpuData[2], gpuData[4]); + } + } + + SetRenderMode(gpuData[0], FALSE); + SetZMask3NT(); + + vertex[0].c.lcol=gpuData[0]; + vertex[1].c.lcol=gpuData[2]; + vertex[2].c.lcol=gpuData[4]; + vertex[0].c.col[3]=vertex[1].c.col[3]=vertex[2].c.col[3]=ubGloColAlpha; + + PRIMdrawGouraudTriColor(&vertex[0], &vertex[1], &vertex[2]); + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: smooth shaded Texture4 +//////////////////////////////////////////////////////////////////////// + +void primPolyGT4(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *)baseAddr); + short *sgpuData = ((short *)baseAddr); + + lx0 = sgpuData[2]; + ly0 = sgpuData[3]; + lx1 = sgpuData[8]; + ly1 = sgpuData[9]; + lx2 = sgpuData[14]; + ly2 = sgpuData[15]; + lx3 = sgpuData[20]; + ly3 = sgpuData[21]; + + if(offset4()) return; + + // do texture stuff + gl_ux[0]=baseAddr[8];//gpuData[2]&0xff; + gl_vy[0]=baseAddr[9];//(gpuData[2]>>8)&0xff; + gl_ux[1]=baseAddr[20];//gpuData[5]&0xff; + gl_vy[1]=baseAddr[21];//(gpuData[5]>>8)&0xff; + gl_ux[2]=baseAddr[32];//gpuData[8]&0xff; + gl_vy[2]=baseAddr[33];//(gpuData[8]>>8)&0xff; + gl_ux[3]=baseAddr[44];//gpuData[11]&0xff; + gl_vy[3]=baseAddr[45];//(gpuData[11]>>8)&0xff; + + UpdateGlobalTP((unsigned short)(gpuData[5]>>16)); + ulClutID=(gpuData[2]>>16); + + bDrawTextured = TRUE; + bDrawSmoothShaded = TRUE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX4(); + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + drawPoly4GT(baseAddr); + } + } + + SetRenderMode(gpuData[0], FALSE); + SetZMask4(); + + assignTexture4(); + + RectTexAlign(); + + if(bDrawNonShaded) + { + //if(!bUseMultiPass) vertex[0].lcol=DoubleBGR2RGB(gpuData[0]); else vertex[0].lcol=gpuData[0]; + if(bGLBlend) vertex[0].c.lcol=0x7f7f7f; + else vertex[0].c.lcol=0xffffff; + vertex[0].c.col[3]=ubGloAlpha; + SETCOL(vertex[0]); + + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[3], &vertex[2]); + + if(ubOpaqueDraw) + { + SetZMask4O(); + ubGloAlpha=ubGloColAlpha=0xff; + DEFOPAQUEON + PRIMdrawTexturedQuad(&vertex[0], &vertex[1], &vertex[3], &vertex[2]); + DEFOPAQUEOFF + } + return; + } + + if(!bUseMultiPass && !bGLBlend) + { + vertex[0].c.lcol=DoubleBGR2RGB(gpuData[0]); + vertex[1].c.lcol=DoubleBGR2RGB(gpuData[3]); + vertex[2].c.lcol=DoubleBGR2RGB(gpuData[6]); + vertex[3].c.lcol=DoubleBGR2RGB(gpuData[9]); + } + else + { + vertex[0].c.lcol=gpuData[0]; + vertex[1].c.lcol=gpuData[3]; + vertex[2].c.lcol=gpuData[6]; + vertex[3].c.lcol=gpuData[9]; + } + + vertex[0].c.col[3]=vertex[1].c.col[3]=vertex[2].c.col[3]=vertex[3].c.col[3]=ubGloAlpha; + + PRIMdrawTexGouraudTriColorQuad(&vertex[0], &vertex[1], &vertex[3],&vertex[2]); + + if(bDrawMultiPass) + { + SetSemiTransMulti(1); + PRIMdrawTexGouraudTriColorQuad(&vertex[0], &vertex[1], &vertex[3],&vertex[2]); + } + + if(ubOpaqueDraw) + { + SetZMask4O(); + if(bUseMultiPass) + { + vertex[0].c.lcol=DoubleBGR2RGB(gpuData[0]); + vertex[1].c.lcol=DoubleBGR2RGB(gpuData[3]); + vertex[2].c.lcol=DoubleBGR2RGB(gpuData[6]); + vertex[3].c.lcol=DoubleBGR2RGB(gpuData[9]); + vertex[0].c.col[3]=vertex[1].c.col[3]=vertex[2].c.col[3]=vertex[3].c.col[3]=ubGloAlpha; + } + ubGloAlpha=ubGloColAlpha=0xff; + DEFOPAQUEON + PRIMdrawTexGouraudTriColorQuad(&vertex[0], &vertex[1], &vertex[3],&vertex[2]); + DEFOPAQUEOFF + } + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: smooth shaded Poly3 +//////////////////////////////////////////////////////////////////////// + +void primPolyF3(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = sgpuData[2]; + ly0 = sgpuData[3]; + lx1 = sgpuData[4]; + ly1 = sgpuData[5]; + lx2 = sgpuData[6]; + ly2 = sgpuData[7]; + + if(offset3()) return; + + bDrawTextured = FALSE; + bDrawSmoothShaded = FALSE; + SetRenderState(gpuData[0]); + + if(iOffscreenDrawing) + { + offsetPSX3(); + if(bDrawOffscreen3()) + { + InvalidateTextureAreaEx(); + drawPoly3F(gpuData[0]); + } + } + + SetRenderMode(gpuData[0], FALSE); + SetZMask3NT(); + + vertex[0].c.lcol=gpuData[0]; + vertex[0].c.col[3]=ubGloColAlpha; + SETCOL(vertex[0]); + + PRIMdrawTri(&vertex[0], &vertex[1], &vertex[2]); + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: skipping shaded polylines +//////////////////////////////////////////////////////////////////////// + +void primLineGSkip(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + int iMax=255; + int i=2; + + lx1 = sgpuData[2]; + ly1 = sgpuData[3]; + + while(!(((gpuData[i] & 0xF000F000) == 0x50005000) && i>=4)) + { + i++; + + ly1 = (short)((gpuData[i]>>16) & 0xffff); + lx1 = (short)(gpuData[i] & 0xffff); + + i++;if(i>iMax) break; + } +} + +//////////////////////////////////////////////////////////////////////// +// cmd: shaded polylines +//////////////////////////////////////////////////////////////////////// + +void primLineGEx(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + int iMax=255; + short cx0,cx1,cy0,cy1;int i;BOOL bDraw=TRUE; + + bDrawTextured = FALSE; + bDrawSmoothShaded = TRUE; + SetRenderState(gpuData[0]); + SetRenderMode(gpuData[0], FALSE); + SetZMask4NT(); + + vertex[0].c.lcol=vertex[3].c.lcol=gpuData[0]; + vertex[0].c.col[3]=vertex[3].c.col[3]=ubGloColAlpha; + ly1 = (short)((gpuData[1]>>16) & 0xffff); + lx1 = (short)(gpuData[1] & 0xffff); + + i=2; + + //while((gpuData[i]>>24)!=0x55) + //while((gpuData[i]&0x50000000)!=0x50000000) + // currently best way to check for poly line end: + while(!(((gpuData[i] & 0xF000F000) == 0x50005000) && i>=4)) + { + ly0 = ly1;lx0=lx1; + vertex[1].c.lcol=vertex[2].c.lcol=vertex[0].c.lcol; + vertex[0].c.lcol=vertex[3].c.lcol=gpuData[i]; + vertex[0].c.col[3]=vertex[3].c.col[3]=ubGloColAlpha; + + i++; + + ly1 = (short)((gpuData[i]>>16) & 0xffff); + lx1 = (short)(gpuData[i] & 0xffff); + + if(offsetline()) bDraw=FALSE; else bDraw=TRUE; + + if (bDraw && ((lx0 != lx1) || (ly0 != ly1))) + { + if(iOffscreenDrawing) + { + cx0=lx0;cx1=lx1;cy0=ly0;cy1=ly1; + offsetPSXLine(); + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + drawPoly4G(gpuData[i-3],gpuData[i-1],gpuData[i-3],gpuData[i-1]); + } + lx0=cx0;lx1=cx1;ly0=cy0;ly1=cy1; + } + + PRIMdrawGouraudLine(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + } + i++; + + if(i>iMax) break; + } + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: shaded polyline2 +//////////////////////////////////////////////////////////////////////// + +void primLineG2(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = sgpuData[2]; + ly0 = sgpuData[3]; + lx1 = sgpuData[6]; + ly1 = sgpuData[7]; + + vertex[0].c.lcol=vertex[3].c.lcol=gpuData[0]; + vertex[1].c.lcol=vertex[2].c.lcol=gpuData[2]; + vertex[0].c.col[3]=vertex[1].c.col[3]=vertex[2].c.col[3]=vertex[3].c.col[3]=ubGloColAlpha; + + bDrawTextured = FALSE; + bDrawSmoothShaded = TRUE; + + if((lx0 == lx1) && (ly0 == ly1)) return; + + if(offsetline()) return; + + SetRenderState(gpuData[0]); + SetRenderMode(gpuData[0], FALSE); + SetZMask4NT(); + + if(iOffscreenDrawing) + { + offsetPSXLine(); + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + drawPoly4G(gpuData[0],gpuData[2],gpuData[0],gpuData[2]); + } + } + + //if(ClipVertexList4()) + PRIMdrawGouraudLine(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: skipping flat polylines +//////////////////////////////////////////////////////////////////////// + +void primLineFSkip(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + int i=2,iMax=255; + + ly1 = (short)((gpuData[1]>>16) & 0xffff); + lx1 = (short)(gpuData[1] & 0xffff); + + while(!(((gpuData[i] & 0xF000F000) == 0x50005000) && i>=3)) + { + ly1 = (short)((gpuData[i]>>16) & 0xffff); + lx1 = (short)(gpuData[i] & 0xffff); + i++;if(i>iMax) break; + } +} + +//////////////////////////////////////////////////////////////////////// +// cmd: drawing flat polylines +//////////////////////////////////////////////////////////////////////// + +void primLineFEx(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + int iMax; + short cx0,cx1,cy0,cy1;int i; + + iMax=255; + + bDrawTextured = FALSE; + bDrawSmoothShaded = FALSE; + SetRenderState(gpuData[0]); + SetRenderMode(gpuData[0], FALSE); + SetZMask4NT(); + + vertex[0].c.lcol=gpuData[0]; + vertex[0].c.col[3]=ubGloColAlpha; + + ly1 = (short)((gpuData[1]>>16) & 0xffff); + lx1 = (short)(gpuData[1] & 0xffff); + + i=2; + +// while(!(gpuData[i]&0x40000000)) +// while((gpuData[i]>>24)!=0x55) +// while((gpuData[i]&0x50000000)!=0x50000000) +// currently best way to check for poly line end: + while(!(((gpuData[i] & 0xF000F000) == 0x50005000) && i>=3)) + { + ly0 = ly1;lx0=lx1; + ly1 = (short)((gpuData[i]>>16) & 0xffff); + lx1 = (short)(gpuData[i] & 0xffff); + + if(!offsetline()) + { + if(iOffscreenDrawing) + { + cx0=lx0;cx1=lx1;cy0=ly0;cy1=ly1; + offsetPSXLine(); + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + drawPoly4F(gpuData[0]); + } + lx0=cx0;lx1=cx1;ly0=cy0;ly1=cy1; + } + PRIMdrawFlatLine(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + } + + i++;if(i>iMax) break; + } + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: drawing flat polyline2 +//////////////////////////////////////////////////////////////////////// + +void primLineF2(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + short *sgpuData = ((short *) baseAddr); + + lx0 = sgpuData[2]; + ly0 = sgpuData[3]; + lx1 = sgpuData[4]; + ly1 = sgpuData[5]; + + if(offsetline()) return; + + bDrawTextured = FALSE; + bDrawSmoothShaded = FALSE; + SetRenderState(gpuData[0]); + SetRenderMode(gpuData[0], FALSE); + SetZMask4NT(); + + vertex[0].c.lcol=gpuData[0]; + vertex[0].c.col[3]=ubGloColAlpha; + + if(iOffscreenDrawing) + { + offsetPSXLine(); + if(bDrawOffscreen4()) + { + InvalidateTextureAreaEx(); + drawPoly4F(gpuData[0]); + } + } + + //if(ClipVertexList4()) + PRIMdrawFlatLine(&vertex[0], &vertex[1], &vertex[2], &vertex[3]); + + iDrawnSomething=1; +} + +//////////////////////////////////////////////////////////////////////// +// cmd: well, easiest command... not implemented +//////////////////////////////////////////////////////////////////////// + +void primNI(unsigned char *bA) +{ +} + +//////////////////////////////////////////////////////////////////////// +// cmd func ptr table +//////////////////////////////////////////////////////////////////////// + +void (*primTableJ[256])(unsigned char *) = +{ + // 00 + primNI,primNI,primBlkFill,primNI,primNI,primNI,primNI,primNI, + // 08 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 10 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 18 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 20 + primPolyF3,primPolyF3,primPolyF3,primPolyF3,primPolyFT3,primPolyFT3,primPolyFT3,primPolyFT3, + // 28 + primPolyF4,primPolyF4,primPolyF4,primPolyF4,primPolyFT4,primPolyFT4,primPolyFT4,primPolyFT4, + // 30 + primPolyG3,primPolyG3,primPolyG3,primPolyG3,primPolyGT3,primPolyGT3,primPolyGT3,primPolyGT3, + // 38 + primPolyG4,primPolyG4,primPolyG4,primPolyG4,primPolyGT4,primPolyGT4,primPolyGT4,primPolyGT4, + // 40 + primLineF2,primLineF2,primLineF2,primLineF2,primNI,primNI,primNI,primNI, + // 48 + primLineFEx,primLineFEx,primLineFEx,primLineFEx,primLineFEx,primLineFEx,primLineFEx,primLineFEx, + // 50 + primLineG2,primLineG2,primLineG2,primLineG2,primNI,primNI,primNI,primNI, + // 58 + primLineGEx,primLineGEx,primLineGEx,primLineGEx,primLineGEx,primLineGEx,primLineGEx,primLineGEx, + // 60 + primTileS,primTileS,primTileS,primTileS,primSprtS,primSprtS,primSprtS,primSprtS, + // 68 + primTile1,primTile1,primTile1,primTile1,primNI,primNI,primNI,primNI, + // 70 + primTile8,primTile8,primTile8,primTile8,primSprt8,primSprt8,primSprt8,primSprt8, + // 78 + primTile16,primTile16,primTile16,primTile16,primSprt16,primSprt16,primSprt16,primSprt16, + // 80 + primMoveImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 88 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 90 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 98 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // a0 + primLoadImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // a8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // b0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // b8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // c0 + primStoreImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // c8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // d0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // d8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // e0 + primNI,cmdTexturePage,cmdTextureWindow,cmdDrawAreaStart,cmdDrawAreaEnd,cmdDrawOffset,cmdSTP,primNI, + // e8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // f0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // f8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI +}; + +//////////////////////////////////////////////////////////////////////// +// cmd func ptr table for skipping +//////////////////////////////////////////////////////////////////////// + +void (*primTableSkip[256])(unsigned char *) = +{ + // 00 + primNI,primNI,primBlkFill,primNI,primNI,primNI,primNI,primNI, + // 08 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 10 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 18 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 20 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 28 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 30 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 38 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 40 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 48 + primLineFSkip,primLineFSkip,primLineFSkip,primLineFSkip,primLineFSkip,primLineFSkip,primLineFSkip,primLineFSkip, + // 50 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 58 + primLineGSkip,primLineGSkip,primLineGSkip,primLineGSkip,primLineGSkip,primLineGSkip,primLineGSkip,primLineGSkip, + // 60 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 68 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 70 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 78 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 80 + primMoveImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 88 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 90 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // 98 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // a0 + primLoadImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // a8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // b0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // b8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // c0 + primStoreImage,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // c8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // d0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // d8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // e0 + primNI,cmdTexturePage,cmdTextureWindow,cmdDrawAreaStart,cmdDrawAreaEnd,cmdDrawOffset,cmdSTP,primNI, + // e8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // f0 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI, + // f8 + primNI,primNI,primNI,primNI,primNI,primNI,primNI,primNI +}; diff --git a/plugins/peopsxgl/prim.h b/plugins/peopsxgl/prim.h new file mode 100644 index 00000000..e10f1ade --- /dev/null +++ b/plugins/peopsxgl/prim.h @@ -0,0 +1,34 @@ +/*************************************************************************** + prim.h - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#ifndef _PRIMDRAW_H_ +#define _PRIMDRAW_H_ + +void UploadScreen (int Position); +void PrepareFullScreenUpload (int Position); +BOOL CheckAgainstScreen(short imageX0,short imageY0,short imageX1,short imageY1); +BOOL CheckAgainstFrontScreen(short imageX0,short imageY0,short imageX1,short imageY1); +BOOL FastCheckAgainstScreen(short imageX0,short imageY0,short imageX1,short imageY1); +BOOL FastCheckAgainstFrontScreen(short imageX0,short imageY0,short imageX1,short imageY1); +BOOL bCheckFF9G4(unsigned char * baseAddr); +void SetScanTrans(void); +void SetScanTexTrans(void); +void DrawMultiBlur(void); +void CheckWriteUpdate(); + +#endif // _PRIMDRAW_H_ diff --git a/plugins/peopsxgl/soft.c b/plugins/peopsxgl/soft.c new file mode 100644 index 00000000..bae51708 --- /dev/null +++ b/plugins/peopsxgl/soft.c @@ -0,0 +1,8385 @@ +/*************************************************************************** + soft.c - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +#define _IN_SOFT + +#include "externals.h" +#include "soft.h" + +int iDither = 0; + +//////////////////////////////////////////////////////////////////////////////////// +// "NO EDGE BUFFER" POLY VERSION... FUNCS BASED ON FATMAP.TXT FROM MRI / Doomsday +//////////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////////// +// defines +//////////////////////////////////////////////////////////////////////////////////// + +// switches for painting textured quads as 2 triangles (small glitches, but better shading!) +// can be toggled by game fix 0x200 in version 1.17 anyway, so let the defines enabled! + +#define POLYQUAD3 +#define POLYQUAD3GT + +// fast solid loops... a bit more additional code, of course + +#define FASTSOLID + +// psx blending mode 3 with 25% incoming color (instead 50% without the define) + +#define HALFBRIGHTMODE3 + +// color decode defines + +#define XCOL1(x) (x & 0x1f) +#define XCOL2(x) (x & 0x3e0) +#define XCOL3(x) (x & 0x7c00) + +#define XCOL1D(x) (x & 0x1f) +#define XCOL2D(x) ((x>>5) & 0x1f) +#define XCOL3D(x) ((x>>10) & 0x1f) + +#define X32TCOL1(x) ((x & 0x001f001f)<<7) +#define X32TCOL2(x) ((x & 0x03e003e0)<<2) +#define X32TCOL3(x) ((x & 0x7c007c00)>>3) + +#define X32COL1(x) (x & 0x001f001f) +#define X32COL2(x) ((x>>5) & 0x001f001f) +#define X32COL3(x) ((x>>10) & 0x001f001f) + +#define X32ACOL1(x) (x & 0x001e001e) +#define X32ACOL2(x) ((x>>5) & 0x001e001e) +#define X32ACOL3(x) ((x>>10) & 0x001e001e) + +#define X32BCOL1(x) (x & 0x001c001c) +#define X32BCOL2(x) ((x>>5) & 0x001c001c) +#define X32BCOL3(x) ((x>>10) & 0x001c001c) + +#define X32PSXCOL(r,g,b) ((g<<10)|(b<<5)|r) + +#define XPSXCOL(r,g,b) ((g&0x7c00)|(b&0x3e0)|(r&0x1f)) + +//////////////////////////////////////////////////////////////////////////////////// +// soft globals +//////////////////////////////////////////////////////////////////////////////////// + +short g_m1 = 255, g_m2 = 255, g_m3 = 255; +short DrawSemiTrans = FALSE; +short Ymin; +short Ymax; + +short ly0, lx0, ly1, lx1, ly2, lx2, ly3, lx3; // global psx vertex coords +int GlobalTextAddrX, GlobalTextAddrY, GlobalTextTP; +int GlobalTextREST, GlobalTextABR, GlobalTextPAGE; + +//////////////////////////////////////////////////////////////////////// +// POLYGON OFFSET FUNCS +//////////////////////////////////////////////////////////////////////// + +void offsetPSXLine(void) +{ + short x0,x1,y0,y1,dx,dy;float px,py; + + x0 = lx0+1+PSXDisplay.DrawOffset.x; + x1 = lx1+1+PSXDisplay.DrawOffset.x; + y0 = ly0+1+PSXDisplay.DrawOffset.y; + y1 = ly1+1+PSXDisplay.DrawOffset.y; + + dx=x1-x0; + dy=y1-y0; + + // tricky line width without sqrt + + if(dx>=0) + { + if(dy>=0) + { + px=0.5f; + if(dx>dy) py=-0.5f; + else if(dxdy) px= 0.5f; + else if(dx=0) + { + py=0.5f; + dx=-dx; + if(dx>dy) px=-0.5f; + else if(dxdy) py=-0.5f; + else if(dx> 10; + x -= (y << 10); + + coeff = dithertable[(y&3)*4+(x&3)]; + + rlow = r&7; glow = g&7; blow = b&7; + + r>>=3; g>>=3; b>>=3; + + if ((r < 0x1F) && rlow > coeff) r++; + if ((g < 0x1F) && glow > coeff) g++; + if ((b < 0x1F) && blow > coeff) b++; + + *pdest=((unsigned short)b<<10) | + ((unsigned short)g<<5) | + (unsigned short)r | sM; +} + +///////////////////////////////////////////////////////////////// + +__inline void GetShadeTransCol_Dither(unsigned short *pdest, int m1, int m2, int m3) +{ + int r,g,b; + + if (bCheckMask && *pdest & 0x8000) return; + + if (DrawSemiTrans) + { + r=((XCOL1D(*pdest))<<3); + b=((XCOL2D(*pdest))<<3); + g=((XCOL3D(*pdest))<<3); + + if(GlobalTextABR==0) + { + r=(r>>1)+(m1>>1); + b=(b>>1)+(m2>>1); + g=(g>>1)+(m3>>1); + } + else + if(GlobalTextABR==1) + { + r+=m1; + b+=m2; + g+=m3; + } + else + if(GlobalTextABR==2) + { + r-=m1; + b-=m2; + g-=m3; + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r+=(m1>>2); + b+=(m2>>2); + g+=(m3>>2); +#else + r+=(m1>>1); + b+=(m2>>1); + g+=(m3>>1); +#endif + } + } + else + { + r=m1; + b=m2; + g=m3; + } + + if(r&0x7FFFFF00) r=0xff; + if(b&0x7FFFFF00) b=0xff; + if(g&0x7FFFFF00) g=0xff; + + Dither16(pdest,r,b,g,sSetMask); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetShadeTransCol(unsigned short * pdest,unsigned short color) +{ + if(bCheckMask && *pdest&0x8000) return; + + if(DrawSemiTrans) + { + int r,g,b; + + if(GlobalTextABR==0) + { + *pdest=((((*pdest)&0x7bde)>>1)+(((color)&0x7bde)>>1))|sSetMask;//0x8000; + return; +/* + r=(XCOL1(*pdest)>>1)+((XCOL1(color))>>1); + b=(XCOL2(*pdest)>>1)+((XCOL2(color))>>1); + g=(XCOL3(*pdest)>>1)+((XCOL3(color))>>1); +*/ + } + else + if(GlobalTextABR==1) + { + r=(XCOL1(*pdest))+((XCOL1(color))); + b=(XCOL2(*pdest))+((XCOL2(color))); + g=(XCOL3(*pdest))+((XCOL3(color))); + } + else + if(GlobalTextABR==2) + { + r=(XCOL1(*pdest))-((XCOL1(color))); + b=(XCOL2(*pdest))-((XCOL2(color))); + g=(XCOL3(*pdest))-((XCOL3(color))); + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(XCOL1(*pdest))+((XCOL1(color))>>2); + b=(XCOL2(*pdest))+((XCOL2(color))>>2); + g=(XCOL3(*pdest))+((XCOL3(color))>>2); +#else + r=(XCOL1(*pdest))+((XCOL1(color))>>1); + b=(XCOL2(*pdest))+((XCOL2(color))>>1); + g=(XCOL3(*pdest))+((XCOL3(color))>>1); +#endif + } + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + *pdest=(XPSXCOL(r,g,b))|sSetMask;//0x8000; + } + else *pdest=color|sSetMask; +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetShadeTransCol32(uint32_t *pdest, uint32_t color) +{ + if (DrawSemiTrans) + { + int r,g,b; + + if(GlobalTextABR==0) + { + if(!bCheckMask) + { + *pdest=((((*pdest)&0x7bde7bde)>>1)+(((color)&0x7bde7bde)>>1))|lSetMask;//0x80008000; + return; + } + r=(X32ACOL1(*pdest)>>1)+((X32ACOL1(color))>>1); + b=(X32ACOL2(*pdest)>>1)+((X32ACOL2(color))>>1); + g=(X32ACOL3(*pdest)>>1)+((X32ACOL3(color))>>1); + } + else + if(GlobalTextABR==1) + { + r=(X32COL1(*pdest))+((X32COL1(color))); + b=(X32COL2(*pdest))+((X32COL2(color))); + g=(X32COL3(*pdest))+((X32COL3(color))); + } + else + if(GlobalTextABR==2) + { + int sr,sb,sg,src,sbc,sgc,c; + src=XCOL1(color);sbc=XCOL2(color);sgc=XCOL3(color); + c=(*pdest)>>16; + sr=(XCOL1(c))-src; if(sr&0x8000) sr=0; + sb=(XCOL2(c))-sbc; if(sb&0x8000) sb=0; + sg=(XCOL3(c))-sgc; if(sg&0x8000) sg=0; + r=((int)sr)<<16;b=((int)sb)<<11;g=((int)sg)<<6; + c=LOWORD(*pdest); + sr=(XCOL1(c))-src; if(sr&0x8000) sr=0; + sb=(XCOL2(c))-sbc; if(sb&0x8000) sb=0; + sg=(XCOL3(c))-sgc; if(sg&0x8000) sg=0; + r|=sr;b|=sb>>5;g|=sg>>10; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(X32COL1(*pdest))+((X32BCOL1(color))>>2); + b=(X32COL2(*pdest))+((X32BCOL2(color))>>2); + g=(X32COL3(*pdest))+((X32BCOL3(color))>>2); +#else + r=(X32COL1(*pdest))+((X32ACOL1(color))>>1); + b=(X32COL2(*pdest))+((X32ACOL2(color))>>1); + g=(X32COL3(*pdest))+((X32ACOL3(color))>>1); +#endif + } + + if(r&0x7FE00000) r=0x1f0000|(r&0xFFFF); + if(r&0x7FE0) r=0x1f |(r&0xFFFF0000); + if(b&0x7FE00000) b=0x1f0000|(b&0xFFFF); + if(b&0x7FE0) b=0x1f |(b&0xFFFF0000); + if(g&0x7FE00000) g=0x1f0000|(g&0xFFFF); + if(g&0x7FE0) g=0x1f |(g&0xFFFF0000); + + if(bCheckMask) + { + uint32_t ma=*pdest; + *pdest=(X32PSXCOL(r,g,b))|lSetMask;//0x80008000; + if(ma&0x80000000) *pdest=(ma&0xFFFF0000)|(*pdest&0xFFFF); + if(ma&0x00008000) *pdest=(ma&0xFFFF) |(*pdest&0xFFFF0000); + return; + } + *pdest=(X32PSXCOL(r,g,b))|lSetMask;//0x80008000; + } + else + { + if(bCheckMask) + { + uint32_t ma=*pdest; + *pdest=color|lSetMask;//0x80008000; + if(ma&0x80000000) *pdest=(ma&0xFFFF0000)|(*pdest&0xFFFF); + if(ma&0x00008000) *pdest=(ma&0xFFFF) |(*pdest&0xFFFF0000); + return; + } + + *pdest=color|lSetMask;//0x80008000; + } +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG(unsigned short * pdest,unsigned short color) +{ + int r,g,b;unsigned short l; + + if(color==0) return; + + if(bCheckMask && *pdest&0x8000) return; + + l=sSetMask|(color&0x8000); + + if(DrawSemiTrans && (color&0x8000)) + { + if(GlobalTextABR==0) + { + unsigned short d; + d =((*pdest)&0x7bde)>>1; + color =((color) &0x7bde)>>1; + r=(XCOL1(d))+((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(d))+((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(d))+((((XCOL3(color)))* g_m3)>>7); + +/* + r=(XCOL1(*pdest)>>1)+((((XCOL1(color))>>1)* g_m1)>>7); + b=(XCOL2(*pdest)>>1)+((((XCOL2(color))>>1)* g_m2)>>7); + g=(XCOL3(*pdest)>>1)+((((XCOL3(color))>>1)* g_m3)>>7); +*/ + } + else + if(GlobalTextABR==1) + { + r=(XCOL1(*pdest))+((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(*pdest))+((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(*pdest))+((((XCOL3(color)))* g_m3)>>7); + } + else + if(GlobalTextABR==2) + { + r=(XCOL1(*pdest))-((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(*pdest))-((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(*pdest))-((((XCOL3(color)))* g_m3)>>7); + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(XCOL1(*pdest))+((((XCOL1(color))>>2)* g_m1)>>7); + b=(XCOL2(*pdest))+((((XCOL2(color))>>2)* g_m2)>>7); + g=(XCOL3(*pdest))+((((XCOL3(color))>>2)* g_m3)>>7); +#else + r=(XCOL1(*pdest))+((((XCOL1(color))>>1)* g_m1)>>7); + b=(XCOL2(*pdest))+((((XCOL2(color))>>1)* g_m2)>>7); + g=(XCOL3(*pdest))+((((XCOL3(color))>>1)* g_m3)>>7); +#endif + } + } + else + { + r=((XCOL1(color))* g_m1)>>7; + b=((XCOL2(color))* g_m2)>>7; + g=((XCOL3(color))* g_m3)>>7; + } + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + *pdest=(XPSXCOL(r,g,b))|l; +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG_S(unsigned short * pdest,unsigned short color) +{ + int r,g,b;unsigned short l; + + if(color==0) return; + + l=sSetMask|(color&0x8000); + + r=((XCOL1(color))* g_m1)>>7; + b=((XCOL2(color))* g_m2)>>7; + g=((XCOL3(color))* g_m3)>>7; + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + *pdest=(XPSXCOL(r,g,b))|l; +} + + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG_SPR(unsigned short * pdest,unsigned short color) +{ + int r,g,b;unsigned short l; + + if(color==0) return; + + if(bCheckMask && *pdest&0x8000) return; + + l=sSetMask|(color&0x8000); + + if(DrawSemiTrans && (color&0x8000)) + { + if(GlobalTextABR==0) + { + unsigned short d; + d =((*pdest)&0x7bde)>>1; + color =((color) &0x7bde)>>1; + r=(XCOL1(d))+((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(d))+((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(d))+((((XCOL3(color)))* g_m3)>>7); + +/* + r=(XCOL1(*pdest)>>1)+((((XCOL1(color))>>1)* g_m1)>>7); + b=(XCOL2(*pdest)>>1)+((((XCOL2(color))>>1)* g_m2)>>7); + g=(XCOL3(*pdest)>>1)+((((XCOL3(color))>>1)* g_m3)>>7); +*/ + } + else + if(GlobalTextABR==1) + { + r=(XCOL1(*pdest))+((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(*pdest))+((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(*pdest))+((((XCOL3(color)))* g_m3)>>7); + } + else + if(GlobalTextABR==2) + { + r=(XCOL1(*pdest))-((((XCOL1(color)))* g_m1)>>7); + b=(XCOL2(*pdest))-((((XCOL2(color)))* g_m2)>>7); + g=(XCOL3(*pdest))-((((XCOL3(color)))* g_m3)>>7); + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(XCOL1(*pdest))+((((XCOL1(color))>>2)* g_m1)>>7); + b=(XCOL2(*pdest))+((((XCOL2(color))>>2)* g_m2)>>7); + g=(XCOL3(*pdest))+((((XCOL3(color))>>2)* g_m3)>>7); +#else + r=(XCOL1(*pdest))+((((XCOL1(color))>>1)* g_m1)>>7); + b=(XCOL2(*pdest))+((((XCOL2(color))>>1)* g_m2)>>7); + g=(XCOL3(*pdest))+((((XCOL3(color))>>1)* g_m3)>>7); +#endif + } + } + else + { + r=((XCOL1(color))* g_m1)>>7; + b=((XCOL2(color))* g_m2)>>7; + g=((XCOL3(color))* g_m3)>>7; + } + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + *pdest=(XPSXCOL(r,g,b))|l; +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG32(uint32_t *pdest, uint32_t color) +{ + int r,g,b,l; + + if(color==0) return; + + l=lSetMask|(color&0x80008000); + + if(DrawSemiTrans && (color&0x80008000)) + { + if(GlobalTextABR==0) + { + r=((((X32TCOL1(*pdest))+((X32COL1(color)) * g_m1))&0xFF00FF00)>>8); + b=((((X32TCOL2(*pdest))+((X32COL2(color)) * g_m2))&0xFF00FF00)>>8); + g=((((X32TCOL3(*pdest))+((X32COL3(color)) * g_m3))&0xFF00FF00)>>8); + } + else + if(GlobalTextABR==1) + { + r=(X32COL1(*pdest))+(((((X32COL1(color)))* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(*pdest))+(((((X32COL2(color)))* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(*pdest))+(((((X32COL3(color)))* g_m3)&0xFF80FF80)>>7); + } + else + if(GlobalTextABR==2) + { + int t; + r=(((((X32COL1(color)))* g_m1)&0xFF80FF80)>>7); + t=(*pdest&0x001f0000)-(r&0x003f0000); if(t&0x80000000) t=0; + r=(*pdest&0x0000001f)-(r&0x0000003f); if(r&0x80000000) r=0; + r|=t; + + b=(((((X32COL2(color)))* g_m2)&0xFF80FF80)>>7); + t=((*pdest>>5)&0x001f0000)-(b&0x003f0000); if(t&0x80000000) t=0; + b=((*pdest>>5)&0x0000001f)-(b&0x0000003f); if(b&0x80000000) b=0; + b|=t; + + g=(((((X32COL3(color)))* g_m3)&0xFF80FF80)>>7); + t=((*pdest>>10)&0x001f0000)-(g&0x003f0000); if(t&0x80000000) t=0; + g=((*pdest>>10)&0x0000001f)-(g&0x0000003f); if(g&0x80000000) g=0; + g|=t; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(X32COL1(*pdest))+(((((X32BCOL1(color))>>2)* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(*pdest))+(((((X32BCOL2(color))>>2)* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(*pdest))+(((((X32BCOL3(color))>>2)* g_m3)&0xFF80FF80)>>7); +#else + r=(X32COL1(*pdest))+(((((X32ACOL1(color))>>1)* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(*pdest))+(((((X32ACOL2(color))>>1)* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(*pdest))+(((((X32ACOL3(color))>>1)* g_m3)&0xFF80FF80)>>7); +#endif + } + + if(!(color&0x8000)) + { + r=(r&0xffff0000)|((((X32COL1(color))* g_m1)&0x0000FF80)>>7); + b=(b&0xffff0000)|((((X32COL2(color))* g_m2)&0x0000FF80)>>7); + g=(g&0xffff0000)|((((X32COL3(color))* g_m3)&0x0000FF80)>>7); + } + if(!(color&0x80000000)) + { + r=(r&0xffff)|((((X32COL1(color))* g_m1)&0xFF800000)>>7); + b=(b&0xffff)|((((X32COL2(color))* g_m2)&0xFF800000)>>7); + g=(g&0xffff)|((((X32COL3(color))* g_m3)&0xFF800000)>>7); + } + + } + else + { + r=(((X32COL1(color))* g_m1)&0xFF80FF80)>>7; + b=(((X32COL2(color))* g_m2)&0xFF80FF80)>>7; + g=(((X32COL3(color))* g_m3)&0xFF80FF80)>>7; + } + + if(r&0x7FE00000) r=0x1f0000|(r&0xFFFF); + if(r&0x7FE0) r=0x1f |(r&0xFFFF0000); + if(b&0x7FE00000) b=0x1f0000|(b&0xFFFF); + if(b&0x7FE0) b=0x1f |(b&0xFFFF0000); + if(g&0x7FE00000) g=0x1f0000|(g&0xFFFF); + if(g&0x7FE0) g=0x1f |(g&0xFFFF0000); + + if(bCheckMask) + { + uint32_t ma=*pdest; + + *pdest=(X32PSXCOL(r,g,b))|l; + + if((color&0xffff)==0 ) *pdest=(ma&0xffff)|(*pdest&0xffff0000); + if((color&0xffff0000)==0) *pdest=(ma&0xffff0000)|(*pdest&0xffff); + if(ma&0x80000000) *pdest=(ma&0xFFFF0000)|(*pdest&0xFFFF); + if(ma&0x00008000) *pdest=(ma&0xFFFF) |(*pdest&0xFFFF0000); + + return; + } + if((color&0xffff)==0 ) {*pdest=(*pdest&0xffff)|(((X32PSXCOL(r,g,b))|l)&0xffff0000);return;} + if((color&0xffff0000)==0) {*pdest=(*pdest&0xffff0000)|(((X32PSXCOL(r,g,b))|l)&0xffff);return;} + + *pdest=(X32PSXCOL(r,g,b))|l; +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG32_S(uint32_t *pdest, uint32_t color) +{ + int r,g,b; + + if(color==0) return; + + r=(((X32COL1(color))* g_m1)&0xFF80FF80)>>7; + b=(((X32COL2(color))* g_m2)&0xFF80FF80)>>7; + g=(((X32COL3(color))* g_m3)&0xFF80FF80)>>7; + + if(r&0x7FE00000) r=0x1f0000|(r&0xFFFF); + if(r&0x7FE0) r=0x1f |(r&0xFFFF0000); + if(b&0x7FE00000) b=0x1f0000|(b&0xFFFF); + if(b&0x7FE0) b=0x1f |(b&0xFFFF0000); + if(g&0x7FE00000) g=0x1f0000|(g&0xFFFF); + if(g&0x7FE0) g=0x1f |(g&0xFFFF0000); + + if((color&0xffff)==0) {*pdest=(*pdest&0xffff)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff0000);return;} + if((color&0xffff0000)==0) {*pdest=(*pdest&0xffff0000)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff);return;} + + *pdest=(X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColG32_SPR(uint32_t *pdest, uint32_t color) +{ + int r,g,b; + + if(color==0) return; + + if(DrawSemiTrans && (color&0x80008000)) + { + if(GlobalTextABR==0) + { + r=((((X32TCOL1(*pdest))+((X32COL1(color)) * g_m1))&0xFF00FF00)>>8); + b=((((X32TCOL2(*pdest))+((X32COL2(color)) * g_m2))&0xFF00FF00)>>8); + g=((((X32TCOL3(*pdest))+((X32COL3(color)) * g_m3))&0xFF00FF00)>>8); + } + else + if(GlobalTextABR==1) + { + r=(X32COL1(*pdest))+(((((X32COL1(color)))* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(*pdest))+(((((X32COL2(color)))* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(*pdest))+(((((X32COL3(color)))* g_m3)&0xFF80FF80)>>7); + } + else + if(GlobalTextABR==2) + { + int t; + r=(((((X32COL1(color)))* g_m1)&0xFF80FF80)>>7); + t=(*pdest&0x001f0000)-(r&0x003f0000); if(t&0x80000000) t=0; + r=(*pdest&0x0000001f)-(r&0x0000003f); if(r&0x80000000) r=0; + r|=t; + + b=(((((X32COL2(color)))* g_m2)&0xFF80FF80)>>7); + t=((*pdest>>5)&0x001f0000)-(b&0x003f0000); if(t&0x80000000) t=0; + b=((*pdest>>5)&0x0000001f)-(b&0x0000003f); if(b&0x80000000) b=0; + b|=t; + + g=(((((X32COL3(color)))* g_m3)&0xFF80FF80)>>7); + t=((*pdest>>10)&0x001f0000)-(g&0x003f0000); if(t&0x80000000) t=0; + g=((*pdest>>10)&0x0000001f)-(g&0x0000003f); if(g&0x80000000) g=0; + g|=t; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(X32COL1(*pdest))+(((((X32BCOL1(color))>>2)* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(*pdest))+(((((X32BCOL2(color))>>2)* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(*pdest))+(((((X32BCOL3(color))>>2)* g_m3)&0xFF80FF80)>>7); +#else + r=(X32COL1(*pdest))+(((((X32ACOL1(color))>>1)* g_m1)&0xFF80FF80)>>7); + b=(X32COL2(*pdest))+(((((X32ACOL2(color))>>1)* g_m2)&0xFF80FF80)>>7); + g=(X32COL3(*pdest))+(((((X32ACOL3(color))>>1)* g_m3)&0xFF80FF80)>>7); +#endif + } + + if(!(color&0x8000)) + { + r=(r&0xffff0000)|((((X32COL1(color))* g_m1)&0x0000FF80)>>7); + b=(b&0xffff0000)|((((X32COL2(color))* g_m2)&0x0000FF80)>>7); + g=(g&0xffff0000)|((((X32COL3(color))* g_m3)&0x0000FF80)>>7); + } + if(!(color&0x80000000)) + { + r=(r&0xffff)|((((X32COL1(color))* g_m1)&0xFF800000)>>7); + b=(b&0xffff)|((((X32COL2(color))* g_m2)&0xFF800000)>>7); + g=(g&0xffff)|((((X32COL3(color))* g_m3)&0xFF800000)>>7); + } + + } + else + { + r=(((X32COL1(color))* g_m1)&0xFF80FF80)>>7; + b=(((X32COL2(color))* g_m2)&0xFF80FF80)>>7; + g=(((X32COL3(color))* g_m3)&0xFF80FF80)>>7; + } + + if(r&0x7FE00000) r=0x1f0000|(r&0xFFFF); + if(r&0x7FE0) r=0x1f |(r&0xFFFF0000); + if(b&0x7FE00000) b=0x1f0000|(b&0xFFFF); + if(b&0x7FE0) b=0x1f |(b&0xFFFF0000); + if(g&0x7FE00000) g=0x1f0000|(g&0xFFFF); + if(g&0x7FE0) g=0x1f |(g&0xFFFF0000); + + if(bCheckMask) + { + uint32_t ma=*pdest; + + *pdest=(X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000); + + if((color&0xffff)==0 ) *pdest=(ma&0xffff)|(*pdest&0xffff0000); + if((color&0xffff0000)==0) *pdest=(ma&0xffff0000)|(*pdest&0xffff); + if(ma&0x80000000) *pdest=(ma&0xFFFF0000)|(*pdest&0xFFFF); + if(ma&0x00008000) *pdest=(ma&0xFFFF) |(*pdest&0xFFFF0000); + + return; + } + if((color&0xffff)==0 ) {*pdest=(*pdest&0xffff)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff0000);return;} + if((color&0xffff0000)==0) {*pdest=(*pdest&0xffff0000)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff);return;} + + *pdest=(X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColGX_Dither(unsigned short * pdest, unsigned short color, int m1, int m2, int m3) +{ + int r,g,b; + + if(color==0) return; + + if(bCheckMask && *pdest&0x8000) return; + + m1=(((XCOL1D(color)))*m1)>>4; + m2=(((XCOL2D(color)))*m2)>>4; + m3=(((XCOL3D(color)))*m3)>>4; + + if(DrawSemiTrans && (color&0x8000)) + { + r=((XCOL1D(*pdest))<<3); + b=((XCOL2D(*pdest))<<3); + g=((XCOL3D(*pdest))<<3); + + if(GlobalTextABR==0) + { + r=(r>>1)+(m1>>1); + b=(b>>1)+(m2>>1); + g=(g>>1)+(m3>>1); + } + else + if(GlobalTextABR==1) + { + r+=m1; + b+=m2; + g+=m3; + } + else + if(GlobalTextABR==2) + { + r-=m1; + b-=m2; + g-=m3; + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r+=(m1>>2); + b+=(m2>>2); + g+=(m3>>2); +#else + r+=(m1>>1); + b+=(m2>>1); + g+=(m3>>1); +#endif + } + } + else + { + r=m1; + b=m2; + g=m3; + } + + if(r&0x7FFFFF00) r=0xff; + if(b&0x7FFFFF00) b=0xff; + if(g&0x7FFFFF00) g=0xff; + + Dither16(pdest,r,b,g,sSetMask|(color&0x8000)); + +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColGX(unsigned short * pdest,unsigned short color,short m1,short m2,short m3) +{ + int r,g,b;unsigned short l; + + if(color==0) return; + + if(bCheckMask && *pdest&0x8000) return; + + l=sSetMask|(color&0x8000); + + if(DrawSemiTrans && (color&0x8000)) + { + if(GlobalTextABR==0) + { + unsigned short d; + d =((*pdest)&0x7bde)>>1; + color =((color) &0x7bde)>>1; + r=(XCOL1(d))+((((XCOL1(color)))* m1)>>7); + b=(XCOL2(d))+((((XCOL2(color)))* m2)>>7); + g=(XCOL3(d))+((((XCOL3(color)))* m3)>>7); +/* + r=(XCOL1(*pdest)>>1)+((((XCOL1(color))>>1)* m1)>>7); + b=(XCOL2(*pdest)>>1)+((((XCOL2(color))>>1)* m2)>>7); + g=(XCOL3(*pdest)>>1)+((((XCOL3(color))>>1)* m3)>>7); +*/ + } + else + if(GlobalTextABR==1) + { + r=(XCOL1(*pdest))+((((XCOL1(color)))* m1)>>7); + b=(XCOL2(*pdest))+((((XCOL2(color)))* m2)>>7); + g=(XCOL3(*pdest))+((((XCOL3(color)))* m3)>>7); + } + else + if(GlobalTextABR==2) + { + r=(XCOL1(*pdest))-((((XCOL1(color)))* m1)>>7); + b=(XCOL2(*pdest))-((((XCOL2(color)))* m2)>>7); + g=(XCOL3(*pdest))-((((XCOL3(color)))* m3)>>7); + if(r&0x80000000) r=0; + if(b&0x80000000) b=0; + if(g&0x80000000) g=0; + } + else + { +#ifdef HALFBRIGHTMODE3 + r=(XCOL1(*pdest))+((((XCOL1(color))>>2)* m1)>>7); + b=(XCOL2(*pdest))+((((XCOL2(color))>>2)* m2)>>7); + g=(XCOL3(*pdest))+((((XCOL3(color))>>2)* m3)>>7); +#else + r=(XCOL1(*pdest))+((((XCOL1(color))>>1)* m1)>>7); + b=(XCOL2(*pdest))+((((XCOL2(color))>>1)* m2)>>7); + g=(XCOL3(*pdest))+((((XCOL3(color))>>1)* m3)>>7); +#endif + } + } + else + { + r=((XCOL1(color))* m1)>>7; + b=((XCOL2(color))* m2)>>7; + g=((XCOL3(color))* m3)>>7; + } + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + *pdest=(XPSXCOL(r,g,b))|l; +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColGX_S(unsigned short * pdest,unsigned short color,short m1,short m2,short m3) +{ + int r,g,b; + + if(color==0) return; + + r=((XCOL1(color))* m1)>>7; + b=((XCOL2(color))* m2)>>7; + g=((XCOL3(color))* m3)>>7; + + if(r&0x7FFFFFE0) r=0x1f; + if(b&0x7FFFFC00) b=0x3e0; + if(g&0x7FFF8000) g=0x7c00; + + *pdest=(XPSXCOL(r,g,b))|sSetMask|(color&0x8000); +} + +//////////////////////////////////////////////////////////////////////// + +__inline void GetTextureTransColGX32_S(uint32_t *pdest, uint32_t color, short m1, short m2, short m3) +{ + int r,g,b; + + if(color==0) return; + + r=(((X32COL1(color))* m1)&0xFF80FF80)>>7; + b=(((X32COL2(color))* m2)&0xFF80FF80)>>7; + g=(((X32COL3(color))* m3)&0xFF80FF80)>>7; + + if(r&0x7FE00000) r=0x1f0000|(r&0xFFFF); + if(r&0x7FE0) r=0x1f |(r&0xFFFF0000); + if(b&0x7FE00000) b=0x1f0000|(b&0xFFFF); + if(b&0x7FE0) b=0x1f |(b&0xFFFF0000); + if(g&0x7FE00000) g=0x1f0000|(g&0xFFFF); + if(g&0x7FE0) g=0x1f |(g&0xFFFF0000); + + if((color&0xffff)==0) {*pdest=(*pdest&0xffff)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff0000);return;} + if((color&0xffff0000)==0) {*pdest=(*pdest&0xffff0000)|(((X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000))&0xffff);return;} + + *pdest=(X32PSXCOL(r,g,b))|lSetMask|(color&0x80008000); +} + +//////////////////////////////////////////////////////////////////////// +// FILL FUNCS +//////////////////////////////////////////////////////////////////////// + +void FillSoftwareAreaTrans(short x0,short y0,short x1, // FILL AREA TRANS + short y1,unsigned short col) +{ + short j,i,dx,dy; + + if(y0>y1) return; + if(x0>x1) return; + + if(x1drawW) return; + if(y0>drawH) return; + + x1=min(x1,drawW+1); + y1=min(y1,drawH+1); + x0=max(x0,drawX); + y0=max(y0,drawY); + + if(y0>=iGPUHeight) return; + if(x0>1023) return; + + if(y1>iGPUHeight) y1=iGPUHeight; + if(x1>1024) x1=1024; + + dx=x1-x0;dy=y1-y0; + + if(dx==1 && dy==1 && x0==1020 && y0==511) // special fix for pinball game... emu protection??? + { +/* +m->v 1020 511 1 1 +writedatamem 0x00000000 1 +tile1 newcol 7fff (orgcol 0xffffff), oldvram 0 +v->m 1020 511 1 1 +readdatamem 0x00007fff 1 +m->v 1020 511 1 1 +writedatamem 0x00000000 1 +tile1 newcol 8000 (orgcol 0xffffff), oldvram 0 +v->m 1020 511 1 1 +readdatamem 0x00008000 1 +*/ + + static int iCheat=0; + col+=iCheat; + if(iCheat==1) iCheat=0; else iCheat=1; + } + + if(dx&1) // slow fill + { + unsigned short *DSTPtr; + unsigned short LineOffset; + DSTPtr = psxVuw + (1024*y0) + x0; + LineOffset = 1024 - dx; + for(i=0;i>=1; + DSTPtr = (uint32_t *)(psxVuw + (1024*y0) + x0); + LineOffset = 512 - dx; + + if(!bCheckMask && !DrawSemiTrans) + { + for(i=0;iy1) return; + if(x0>x1) return; + + if(y0>=iGPUHeight) return; + if(x0>1023) return; + + if(y1>iGPUHeight) y1=iGPUHeight; + if(x1>1024) x1=1024; + + dx=x1-x0;dy=y1-y0; + if(dx&1) + { + unsigned short *DSTPtr; + unsigned short LineOffset; + + DSTPtr = psxVuw + (1024*y0) + x0; + LineOffset = 1024 - dx; + + for(i=0;i>=1; + DSTPtr = (uint32_t *)(psxVuw + (1024*y0) + x0); + LineOffset = 512 - dx; + + for(i=0;iy - v1->y; + if(height == 0) return 0; + delta_right_x = (v2->x - v1->x) / height; + right_x = v1->x; + + right_section_height = height; + return height; +} + +__inline int LeftSection_F(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_left_x = (v2->x - v1->x) / height; + left_x = v1->x; + + left_section_height = height; + return height; +} + +__inline BOOL NextRow_F(void) +{ + if(--left_section_height<=0) + { + if(--left_section <= 0) {return TRUE;} + if(LeftSection_F() <= 0) {return TRUE;} + } + else + { + left_x += delta_left_x; + } + + if(--right_section_height<=0) + { + if(--right_section<=0) {return TRUE;} + if(RightSection_F() <=0) {return TRUE;} + } + else + { + right_x += delta_right_x; + } + return FALSE; +} + +__inline BOOL SetupSections_F(short x1, short y1, short x2, short y2, short x3, short y3) +{ + soft_vertex * v1, * v2, * v3; + int height,longest; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + + height = v3->y - v1->y; + if(height == 0) {return FALSE;} + longest = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest == 0) {return FALSE;} + + if(longest < 0) + { + right_array[0] = v3; + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + left_array[0] = v3; + left_array[1] = v1; + left_section = 1; + + if(LeftSection_F() <= 0) return FALSE; + if(RightSection_F() <= 0) + { + right_section--; + if(RightSection_F() <= 0) return FALSE; + } + } + else + { + left_array[0] = v3; + left_array[1] = v2; + left_array[2] = v1; + left_section = 2; + right_array[0] = v3; + right_array[1] = v1; + right_section = 1; + + if(RightSection_F() <= 0) return FALSE; + if(LeftSection_F() <= 0) + { + left_section--; + if(LeftSection_F() <= 0) return FALSE; + } + } + + Ymin=v1->y; + Ymax=min(v3->y-1,drawH); + + return TRUE; +} + +__inline int RightSection_G(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_right_x = (v2->x - v1->x) / height; + right_x = v1->x; + + right_section_height = height; + return height; +} + +__inline int LeftSection_G(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_left_x = (v2->x - v1->x) / height; + left_x = v1->x; + + delta_left_R = ((v2->R - v1->R)) / height; + left_R = v1->R; + delta_left_G = ((v2->G - v1->G)) / height; + left_G = v1->G; + delta_left_B = ((v2->B - v1->B)) / height; + left_B = v1->B; + + left_section_height = height; + return height; +} + +__inline BOOL NextRow_G(void) +{ + if(--left_section_height<=0) + { + if(--left_section <= 0) {return TRUE;} + if(LeftSection_G() <= 0) {return TRUE;} + } + else + { + left_x += delta_left_x; + left_R += delta_left_R; + left_G += delta_left_G; + left_B += delta_left_B; + } + + if(--right_section_height<=0) + { + if(--right_section<=0) {return TRUE;} + if(RightSection_G() <=0) {return TRUE;} + } + else + { + right_x += delta_right_x; + } + return FALSE; +} + +__inline BOOL SetupSections_G(short x1,short y1,short x2,short y2,short x3,short y3, int rgb1, int rgb2, int rgb3){ + soft_vertex *v1, *v2, *v3; + int height, longest, temp; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v1->R=(rgb1) & 0x00ff0000; + v1->G=(rgb1<<8) & 0x00ff0000; + v1->B=(rgb1<<16) & 0x00ff0000; + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v2->R=(rgb2) & 0x00ff0000; + v2->G=(rgb2<<8) & 0x00ff0000; + v2->B=(rgb2<<16) & 0x00ff0000; + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v3->R=(rgb3) & 0x00ff0000; + v3->G=(rgb3<<8) & 0x00ff0000; + v3->B=(rgb3<<16) & 0x00ff0000; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + + height = v3->y - v1->y; + if(height == 0) {return FALSE;} + temp=(((v2->y - v1->y) << 16) / height); + longest = temp * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest == 0) {return FALSE;} + + if(longest < 0) + { + right_array[0] = v3; + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + left_array[0] = v3; + left_array[1] = v1; + left_section = 1; + + if(LeftSection_G() <= 0) return FALSE; + if(RightSection_G() <= 0) + { + right_section--; + if(RightSection_G() <= 0) return FALSE; + } + if(longest > -0x1000) longest = -0x1000; + } + else + { + left_array[0] = v3; + left_array[1] = v2; + left_array[2] = v1; + left_section = 2; + right_array[0] = v3; + right_array[1] = v1; + right_section = 1; + + if(RightSection_G() <= 0) return FALSE; + if(LeftSection_G() <= 0) + { + left_section--; + if(LeftSection_G() <= 0) return FALSE; + } + if(longest < 0x1000) longest = 0x1000; + } + + Ymin=v1->y; + Ymax=min(v3->y-1,drawH); + + delta_right_R=shl10idiv(temp*((v3->R - v1->R)>>10)+((v1->R - v2->R)<<6),longest); + delta_right_G=shl10idiv(temp*((v3->G - v1->G)>>10)+((v1->G - v2->G)<<6),longest); + delta_right_B=shl10idiv(temp*((v3->B - v1->B)>>10)+((v1->B - v2->B)<<6),longest); + + return TRUE; +} + +__inline int RightSection_FT(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_right_x = (v2->x - v1->x) / height; + right_x = v1->x; + + right_section_height = height; + return height; +} + +__inline int LeftSection_FT(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_left_x = (v2->x - v1->x) / height; + left_x = v1->x; + + delta_left_u = ((v2->u - v1->u)) / height; + left_u = v1->u; + delta_left_v = ((v2->v - v1->v)) / height; + left_v = v1->v; + + left_section_height = height; + return height; +} + +__inline BOOL NextRow_FT(void) +{ + if(--left_section_height<=0) + { + if(--left_section <= 0) {return TRUE;} + if(LeftSection_FT() <= 0) {return TRUE;} + } + else + { + left_x += delta_left_x; + left_u += delta_left_u; + left_v += delta_left_v; + } + + if(--right_section_height<=0) + { + if(--right_section<=0) {return TRUE;} + if(RightSection_FT() <=0) {return TRUE;} + } + else + { + right_x += delta_right_x; + } + return FALSE; +} + +__inline BOOL SetupSections_FT(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3) +{ + soft_vertex * v1, * v2, * v3; + int height,longest,temp; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v1->u=tx1<<16;v1->v=ty1<<16; + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v2->u=tx2<<16;v2->v=ty2<<16; + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v3->u=tx3<<16;v3->v=ty3<<16; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + + height = v3->y - v1->y; + if(height == 0) {return FALSE;} + + temp=(((v2->y - v1->y) << 16) / height); + longest = temp * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + + if(longest == 0) {return FALSE;} + + if(longest < 0) + { + right_array[0] = v3; + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + left_array[0] = v3; + left_array[1] = v1; + left_section = 1; + + if(LeftSection_FT() <= 0) return FALSE; + if(RightSection_FT() <= 0) + { + right_section--; + if(RightSection_FT() <= 0) return FALSE; + } + if(longest > -0x1000) longest = -0x1000; + } + else + { + left_array[0] = v3; + left_array[1] = v2; + left_array[2] = v1; + left_section = 2; + right_array[0] = v3; + right_array[1] = v1; + right_section = 1; + + if(RightSection_FT() <= 0) return FALSE; + if(LeftSection_FT() <= 0) + { + left_section--; + if(LeftSection_FT() <= 0) return FALSE; + } + if(longest < 0x1000) longest = 0x1000; + } + + Ymin=v1->y; + Ymax=min(v3->y-1,drawH); + + delta_right_u=shl10idiv(temp*((v3->u - v1->u)>>10)+((v1->u - v2->u)<<6),longest); + delta_right_v=shl10idiv(temp*((v3->v - v1->v)>>10)+((v1->v - v2->v)<<6),longest); + +/* +Mmm... adjust neg tex deltas... will sometimes cause slight +texture distortions + + longest>>=16; + if(longest) + { + if(longest<0) longest=-longest; + if(delta_right_u<0) + delta_right_u-=delta_right_u/longest; + if(delta_right_v<0) + delta_right_v-=delta_right_v/longest; + } +*/ + + return TRUE; +} + +__inline int RightSection_GT(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_right_x = (v2->x - v1->x) / height; + right_x = v1->x; + + right_section_height = height; + return height; +} + +__inline int LeftSection_GT(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + if(height == 0) return 0; + delta_left_x = (v2->x - v1->x) / height; + left_x = v1->x; + + delta_left_u = ((v2->u - v1->u)) / height; + left_u = v1->u; + delta_left_v = ((v2->v - v1->v)) / height; + left_v = v1->v; + + delta_left_R = ((v2->R - v1->R)) / height; + left_R = v1->R; + delta_left_G = ((v2->G - v1->G)) / height; + left_G = v1->G; + delta_left_B = ((v2->B - v1->B)) / height; + left_B = v1->B; + + left_section_height = height; + return height; +} + +__inline BOOL NextRow_GT(void) +{ + if(--left_section_height<=0) + { + if(--left_section <= 0) {return TRUE;} + if(LeftSection_GT() <= 0) {return TRUE;} + } + else + { + left_x += delta_left_x; + left_u += delta_left_u; + left_v += delta_left_v; + left_R += delta_left_R; + left_G += delta_left_G; + left_B += delta_left_B; + } + + if(--right_section_height<=0) + { + if(--right_section<=0) {return TRUE;} + if(RightSection_GT() <=0) {return TRUE;} + } + else + { + right_x += delta_right_x; + } + return FALSE; +} + +__inline BOOL SetupSections_GT(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, int rgb1, int rgb2, int rgb3) +{ + soft_vertex * v1, * v2, * v3; + int height,longest,temp; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v1->u=tx1<<16;v1->v=ty1<<16; + v1->R=(rgb1) & 0x00ff0000; + v1->G=(rgb1<<8) & 0x00ff0000; + v1->B=(rgb1<<16) & 0x00ff0000; + + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v2->u=tx2<<16;v2->v=ty2<<16; + v2->R=(rgb2) & 0x00ff0000; + v2->G=(rgb2<<8) & 0x00ff0000; + v2->B=(rgb2<<16) & 0x00ff0000; + + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v3->u=tx3<<16;v3->v=ty3<<16; + v3->R=(rgb3) & 0x00ff0000; + v3->G=(rgb3<<8) & 0x00ff0000; + v3->B=(rgb3<<16) & 0x00ff0000; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + + height = v3->y - v1->y; + if(height == 0) {return FALSE;} + + temp=(((v2->y - v1->y) << 16) / height); + longest = temp * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + + if(longest == 0) {return FALSE;} + + if(longest < 0) + { + right_array[0] = v3; + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + left_array[0] = v3; + left_array[1] = v1; + left_section = 1; + + if(LeftSection_GT() <= 0) return FALSE; + if(RightSection_GT() <= 0) + { + right_section--; + if(RightSection_GT() <= 0) return FALSE; + } + + if(longest > -0x1000) longest = -0x1000; + } + else + { + left_array[0] = v3; + left_array[1] = v2; + left_array[2] = v1; + left_section = 2; + right_array[0] = v3; + right_array[1] = v1; + right_section = 1; + + if(RightSection_GT() <= 0) return FALSE; + if(LeftSection_GT() <= 0) + { + left_section--; + if(LeftSection_GT() <= 0) return FALSE; + } + if(longest < 0x1000) longest = 0x1000; + } + + Ymin=v1->y; + Ymax=min(v3->y-1,drawH); + + delta_right_R=shl10idiv(temp*((v3->R - v1->R)>>10)+((v1->R - v2->R)<<6),longest); + delta_right_G=shl10idiv(temp*((v3->G - v1->G)>>10)+((v1->G - v2->G)<<6),longest); + delta_right_B=shl10idiv(temp*((v3->B - v1->B)>>10)+((v1->B - v2->B)<<6),longest); + + delta_right_u=shl10idiv(temp*((v3->u - v1->u)>>10)+((v1->u - v2->u)<<6),longest); + delta_right_v=shl10idiv(temp*((v3->v - v1->v)>>10)+((v1->v - v2->v)<<6),longest); + + +/* +Mmm... adjust neg tex deltas... will sometimes cause slight +texture distortions + longest>>=16; + if(longest) + { + if(longest<0) longest=-longest; + if(delta_right_u<0) + delta_right_u-=delta_right_u/longest; + if(delta_right_v<0) + delta_right_v-=delta_right_v/longest; + } +*/ + + + return TRUE; +} + +__inline int RightSection_F4(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + right_section_height = height; + right_x = v1->x; + if(height == 0) + { + return 0; + } + delta_right_x = (v2->x - v1->x) / height; + + return height; +} + +__inline int LeftSection_F4(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + left_section_height = height; + left_x = v1->x; + if(height == 0) + { + return 0; + } + delta_left_x = (v2->x - v1->x) / height; + + return height; +} + +__inline BOOL NextRow_F4(void) +{ + if(--left_section_height<=0) + { + if(--left_section > 0) + while(LeftSection_F4()<=0) + { + if(--left_section <= 0) break; + } + } + else + { + left_x += delta_left_x; + } + + if(--right_section_height<=0) + { + if(--right_section > 0) + while(RightSection_F4()<=0) + { + if(--right_section<=0) break; + } + } + else + { + right_x += delta_right_x; + } + return FALSE; +} + +__inline BOOL SetupSections_F4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4) +{ + soft_vertex * v1, * v2, * v3, * v4; + int height,width,longest1,longest2; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v4 = vtx+3; v4->x=x4<<16;v4->y=y4; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v1->y > v4->y) { soft_vertex * v = v1; v1 = v4; v4 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + if(v2->y > v4->y) { soft_vertex * v = v2; v2 = v4; v4 = v; } + if(v3->y > v4->y) { soft_vertex * v = v3; v3 = v4; v4 = v; } + + height = v4->y - v1->y; if(height == 0) height =1; + width = (v4->x - v1->x)>>16; + longest1 = (((v2->y - v1->y) << 16) / height) * width + (v1->x - v2->x); + longest2 = (((v3->y - v1->y) << 16) / height) * width + (v1->x - v3->x); + + if(longest1 < 0) // 2 is right + { + if(longest2 < 0) // 3 is right + { + left_array[0] = v4; + left_array[1] = v1; + left_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 3 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v2; // 2 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 2 + right_array[2] = v2; // 3 + right_array[3] = v1; // 4 + right_section = 3; + } + } + } + else + { + left_array[0] = v4; + left_array[1] = v3; // 1 + left_array[2] = v1; // 2 + left_section = 2; // 3 + right_array[0] = v4; // 4 + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + } + } + else + { + if(longest2 < 0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 3 + left_section = 2; // 4 + right_array[0] = v4; + right_array[1] = v3; + right_array[2] = v1; + right_section = 2; + } + else + { + right_array[0] = v4; + right_array[1] = v1; + right_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 3 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 2 + left_array[2] = v2; // 3 + left_array[3] = v1; // 4 + left_section = 3; + } + } + } + } + + while(LeftSection_F4()<=0) + { + if(--left_section <= 0) break; + } + + while(RightSection_F4()<=0) + { + if(--right_section <= 0) break; + } + + Ymin=v1->y; + Ymax=min(v4->y-1,drawH); + + return TRUE; +} + +__inline int RightSection_FT4(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + right_section_height = height; + right_x = v1->x; + right_u = v1->u; + right_v = v1->v; + if(height == 0) + { + return 0; + } + delta_right_x = (v2->x - v1->x) / height; + delta_right_u = (v2->u - v1->u) / height; + delta_right_v = (v2->v - v1->v) / height; + + return height; +} + +__inline int LeftSection_FT4(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + left_section_height = height; + left_x = v1->x; + left_u = v1->u; + left_v = v1->v; + if(height == 0) + { + return 0; + } + delta_left_x = (v2->x - v1->x) / height; + delta_left_u = (v2->u - v1->u) / height; + delta_left_v = (v2->v - v1->v) / height; + + return height; +} + +__inline BOOL NextRow_FT4(void) +{ + if(--left_section_height<=0) + { + if(--left_section > 0) + while(LeftSection_FT4()<=0) + { + if(--left_section <= 0) break; + } + } + else + { + left_x += delta_left_x; + left_u += delta_left_u; + left_v += delta_left_v; + } + + if(--right_section_height<=0) + { + if(--right_section > 0) + while(RightSection_FT4()<=0) + { + if(--right_section<=0) break; + } + } + else + { + right_x += delta_right_x; + right_u += delta_right_u; + right_v += delta_right_v; + } + return FALSE; +} + +__inline BOOL SetupSections_FT4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +{ + soft_vertex * v1, * v2, * v3, * v4; + int height,width,longest1,longest2; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v1->u=tx1<<16;v1->v=ty1<<16; + + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v2->u=tx2<<16;v2->v=ty2<<16; + + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v3->u=tx3<<16;v3->v=ty3<<16; + + v4 = vtx+3; v4->x=x4<<16;v4->y=y4; + v4->u=tx4<<16;v4->v=ty4<<16; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v1->y > v4->y) { soft_vertex * v = v1; v1 = v4; v4 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + if(v2->y > v4->y) { soft_vertex * v = v2; v2 = v4; v4 = v; } + if(v3->y > v4->y) { soft_vertex * v = v3; v3 = v4; v4 = v; } + + height = v4->y - v1->y; if(height == 0) height =1; + width = (v4->x - v1->x)>>16; + longest1 = (((v2->y - v1->y) << 16) / height) * width + (v1->x - v2->x); + longest2 = (((v3->y - v1->y) << 16) / height) * width + (v1->x - v3->x); + + if(longest1 < 0) // 2 is right + { + if(longest2 < 0) // 3 is right + { + left_array[0] = v4; + left_array[1] = v1; + left_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 3 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v2; // 2 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 2 + right_array[2] = v2; // 3 + right_array[3] = v1; // 4 + right_section = 3; + } + } + } + else + { + left_array[0] = v4; + left_array[1] = v3; // 1 + left_array[2] = v1; // 2 + left_section = 2; // 3 + right_array[0] = v4; // 4 + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + } + } + else + { + if(longest2 < 0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 3 + left_section = 2; // 4 + right_array[0] = v4; + right_array[1] = v3; + right_array[2] = v1; + right_section = 2; + } + else + { + right_array[0] = v4; + right_array[1] = v1; + right_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 3 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 2 + left_array[2] = v2; // 3 + left_array[3] = v1; // 4 + left_section = 3; + } + } + } + } + + while(LeftSection_FT4()<=0) + { + if(--left_section <= 0) break; + } + + while(RightSection_FT4()<=0) + { + if(--right_section <= 0) break; + } + + Ymin=v1->y; + Ymax=min(v4->y-1,drawH); + + return TRUE; +} + +__inline int RightSection_GT4(void) +{ + soft_vertex * v1 = right_array[ right_section ]; + soft_vertex * v2 = right_array[ right_section-1 ]; + + int height = v2->y - v1->y; + right_section_height = height; + right_x = v1->x; + right_u = v1->u; + right_v = v1->v; + right_R = v1->R; + right_G = v1->G; + right_B = v1->B; + + if(height == 0) + { + return 0; + } + delta_right_x = (v2->x - v1->x) / height; + delta_right_u = (v2->u - v1->u) / height; + delta_right_v = (v2->v - v1->v) / height; + delta_right_R = (v2->R - v1->R) / height; + delta_right_G = (v2->G - v1->G) / height; + delta_right_B = (v2->B - v1->B) / height; + + return height; +} + +__inline int LeftSection_GT4(void) +{ + soft_vertex * v1 = left_array[ left_section ]; + soft_vertex * v2 = left_array[ left_section-1 ]; + + int height = v2->y - v1->y; + left_section_height = height; + left_x = v1->x; + left_u = v1->u; + left_v = v1->v; + left_R = v1->R; + left_G = v1->G; + left_B = v1->B; + + if(height == 0) + { + return 0; + } + delta_left_x = (v2->x - v1->x) / height; + delta_left_u = (v2->u - v1->u) / height; + delta_left_v = (v2->v - v1->v) / height; + delta_left_R = (v2->R - v1->R) / height; + delta_left_G = (v2->G - v1->G) / height; + delta_left_B = (v2->B - v1->B) / height; + + return height; +} + +__inline BOOL NextRow_GT4(void) +{ + if(--left_section_height<=0) + { + if(--left_section > 0) + while(LeftSection_GT4()<=0) + { + if(--left_section <= 0) break; + } + } + else + { + left_x += delta_left_x; + left_u += delta_left_u; + left_v += delta_left_v; + left_R += delta_left_R; + left_G += delta_left_G; + left_B += delta_left_B; + } + + if(--right_section_height<=0) + { + if(--right_section > 0) + while(RightSection_GT4()<=0) + { + if(--right_section<=0) break; + } + } + else + { + right_x += delta_right_x; + right_u += delta_right_u; + right_v += delta_right_v; + right_R += delta_right_R; + right_G += delta_right_G; + right_B += delta_right_B; + } + return FALSE; +} + +__inline BOOL SetupSections_GT4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, int rgb1, int rgb2, int rgb3, int rgb4) +{ + soft_vertex * v1, * v2, * v3, * v4; + int height,width,longest1,longest2; + + v1 = vtx; v1->x=x1<<16;v1->y=y1; + v1->u=tx1<<16;v1->v=ty1<<16; + v1->R=(rgb1) & 0x00ff0000; + v1->G=(rgb1<<8) & 0x00ff0000; + v1->B=(rgb1<<16) & 0x00ff0000; + + v2 = vtx+1; v2->x=x2<<16;v2->y=y2; + v2->u=tx2<<16;v2->v=ty2<<16; + v2->R=(rgb2) & 0x00ff0000; + v2->G=(rgb2<<8) & 0x00ff0000; + v2->B=(rgb2<<16) & 0x00ff0000; + + v3 = vtx+2; v3->x=x3<<16;v3->y=y3; + v3->u=tx3<<16;v3->v=ty3<<16; + v3->R=(rgb3) & 0x00ff0000; + v3->G=(rgb3<<8) & 0x00ff0000; + v3->B=(rgb3<<16) & 0x00ff0000; + + v4 = vtx+3; v4->x=x4<<16;v4->y=y4; + v4->u=tx4<<16;v4->v=ty4<<16; + v4->R=(rgb4) & 0x00ff0000; + v4->G=(rgb4<<8) & 0x00ff0000; + v4->B=(rgb4<<16) & 0x00ff0000; + + if(v1->y > v2->y) { soft_vertex * v = v1; v1 = v2; v2 = v; } + if(v1->y > v3->y) { soft_vertex * v = v1; v1 = v3; v3 = v; } + if(v1->y > v4->y) { soft_vertex * v = v1; v1 = v4; v4 = v; } + if(v2->y > v3->y) { soft_vertex * v = v2; v2 = v3; v3 = v; } + if(v2->y > v4->y) { soft_vertex * v = v2; v2 = v4; v4 = v; } + if(v3->y > v4->y) { soft_vertex * v = v3; v3 = v4; v4 = v; } + + height = v4->y - v1->y; if(height == 0) height =1; + width = (v4->x - v1->x)>>16; + longest1 = (((v2->y - v1->y) << 16) / height) * width + (v1->x - v2->x); + longest2 = (((v3->y - v1->y) << 16) / height) * width + (v1->x - v3->x); + + if(longest1 < 0) // 2 is right + { + if(longest2 < 0) // 3 is right + { + left_array[0] = v4; + left_array[1] = v1; + left_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 3 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1 >= 0) + { + right_array[0] = v4; // 1 + right_array[1] = v2; // 2 + right_array[2] = v1; // 4 + right_section = 2; + } + else + { + right_array[0] = v4; // 1 + right_array[1] = v3; // 2 + right_array[2] = v2; // 3 + right_array[3] = v1; // 4 + right_section = 3; + } + } + } + else + { + left_array[0] = v4; + left_array[1] = v3; // 1 + left_array[2] = v1; // 2 + left_section = 2; // 3 + right_array[0] = v4; // 4 + right_array[1] = v2; + right_array[2] = v1; + right_section = 2; + } + } + else + { + if(longest2 < 0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 3 + left_section = 2; // 4 + right_array[0] = v4; + right_array[1] = v3; + right_array[2] = v1; + right_section = 2; + } + else + { + right_array[0] = v4; + right_array[1] = v1; + right_section = 1; + + height = v3->y - v1->y; if(height == 0) height=1; + longest1 = (((v2->y - v1->y) << 16) / height) * ((v3->x - v1->x)>>16) + (v1->x - v2->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 3 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + height = v4->y - v2->y; if(height == 0) height=1; + longest1 = (((v3->y - v2->y) << 16) / height) * ((v4->x - v2->x)>>16) + (v2->x - v3->x); + if(longest1<0) + { + left_array[0] = v4; // 1 + left_array[1] = v2; // 2 + left_array[2] = v1; // 4 + left_section = 2; + } + else + { + left_array[0] = v4; // 1 + left_array[1] = v3; // 2 + left_array[2] = v2; // 3 + left_array[3] = v1; // 4 + left_section = 3; + } + } + } + } + + while(LeftSection_GT4()<=0) + { + if(--left_section <= 0) break; + } + + while(RightSection_GT4()<=0) + { + if(--right_section <= 0) break; + } + + Ymin=v1->y; + Ymax=min(v4->y-1,drawH); + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// +// POLY FUNCS +//////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////// +// POLY 3/4 FLAT SHADED +//////////////////////////////////////////////////////////////////////// + +__inline void drawPoly3Fi(short x1, short y1, short x2, short y2, short x3, short y3, int rgb) +{ + int i,j,xmin,xmax,ymin,ymax; + unsigned short color; + uint32_t lcolor; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_F(x1,y1,x2,y2,x3,y3)) return; + + ymax=Ymax; + + color = ((rgb & 0x00f80000)>>9) | ((rgb & 0x0000f800)>>6) | ((rgb & 0x000000f8)>>3); + lcolor=lSetMask|(((uint32_t)(color))<<16)|color; + + for(ymin=Ymin;ymin> 16; if(drawX>xmin) xmin=drawX; + xmax=(right_x >> 16)-1; if(drawW> 16; if(drawX>xmin) xmin=drawX; + xmax=(right_x >> 16)-1; if(drawWdrawW && lx1>drawW && lx2>drawW && lx3>drawW) return; + if(ly0>drawH && ly1>drawH && ly2>drawH && ly3>drawH) return; + if(lx0=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_F4(lx0,ly0,lx1,ly1,lx2,ly2,lx3,ly3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin>9) | ((rgb & 0x0000f800)>>6) | ((rgb & 0x000000f8)>>3); + lcolor= lSetMask|(((uint32_t)(color))<<16)|color; + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + color |=sSetMask; + for (i=ymin;i<=ymax;i++) + { + xmin=left_x >> 16; if(drawX>xmin) xmin=drawX; + xmax=(right_x >> 16)-1; if(drawW> 16; if(drawX > xmin) xmin = drawX; + xmax = (right_x >> 16) - 1; if(drawW < xmax) xmax = drawW; + + for(j = xmin; j < xmax; j += 2) + { + GetShadeTransCol32((uint32_t *)&psxVuw[(i<<10) + j],lcolor); + } + if(j == xmax) GetShadeTransCol(&psxVuw[(i<<10) + j],color); + + if(NextRow_F4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// +// POLY 3/4 F-SHADED TEX PAL 4 +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TEx4(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +{ + int i,j,xmin,xmax,ymin,ymax; + int difX, difY,difX2, difY2; + int posX,posY,YAdjust,XAdjust; + int clutP; + short tC1,tC2; + + if (x1 > drawW && x2 > drawW && x3 > drawW) return; + if (y1 > drawH && y2 > drawH && y3 > drawH) return; + if (x1 < drawX && x2 < drawX && x3 < drawX) return; + if (y1 < drawY && y2 < drawY && y3 < drawY) return; + if (drawY >= drawH) return; + if (drawX >= drawW) return; + + if (!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax = Ymax; + + for (ymin = Ymin; ymin < drawY; ymin++) + if (NextRow_FT()) return; + + clutP = (clY << 10) + clX; + + YAdjust = ((GlobalTextAddrY) << 11) + (GlobalTextAddrX << 1); + + difX = delta_right_u; difX2 = difX << 1; + difY = delta_right_v; difY2 = difY << 1; + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TEx4_IL(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +{ + int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV; + int difX, difY,difX2, difY2; + int posX,posY,YAdjust,XAdjust; + int clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + XAdjust=((posX+difX)>>16); + + TXV=(posY+difY)>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC2= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + XAdjust=((posX+difX)>>16); + + TXV=(posY+difY)>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC2= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TEx4_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +{ + int i,j,xmin,xmax,ymin,ymax; + int difX, difY,difX2, difY2; + int posX,posY,YAdjust,XAdjust; + int clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin>1); + + difX=delta_right_u;difX2=difX<<1; + difY=delta_right_v;difY2=difY<<1; + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16);//-1; //!!!!!!!!!!!!!!!! + if(xmax>xmin) xmax--; + + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i << 10) + j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +#ifdef POLYQUAD3 + +void drawPoly4TEx4_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + drawPoly3TEx4(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY); + drawPoly3TEx4(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY); +} + +#endif + +// more exact: + +void drawPoly4TEx4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int num; + int i,j,xmin,xmax,ymin,ymax; + int difX, difY, difX2, difY2; + int posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx4_IL(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int num; + int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV; + int difX, difY, difX2, difY2; + int posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + XAdjust=((posX+difX)>>16); + + TXV=(posY+difY)>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC2= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + XAdjust=(posX>>16); + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + XAdjust=((posX+difX)>>16); + + TXV=(posY+difY)>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC2= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx4_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int num; + int i,j,xmin,xmax,ymin,ymax; + int difX, difY, difX2, difY2; + int posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin>1); + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx4_TW_S(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int num; + int i,j,xmin,xmax,ymin,ymax; + int difX, difY, difX2, difY2; + int posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin>1); + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColG32_SPR((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColG_SPR(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } +} +//////////////////////////////////////////////////////////////////////// +// POLY 3 F-SHADED TEX PAL 8 +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TEx8(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +{ + int i,j,xmin,xmax,ymin,ymax; + int difX, difY,difX2, difY2; + int posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>5)&(int)0xFFFFF800)+YAdjust+(posX>>16)]; + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + ((posX+difX)>>16)]; + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(posX>>16)]; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>5)&(int)0xFFFFF800)+YAdjust+(posX>>16)]; + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + ((posX+difX)>>16)]; + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(posX>>16)]; + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TEx8_IL(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +{ + int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV,TXU; + int difX, difY,difX2, difY2; + int posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + TXU=(posX+difX)>>16; + TXV=(posY+difY)>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC2= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + TXU=posX>>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + TXU=(posX+difX)>>16; + TXV=(posY+difY)>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC2= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + TXU=posX>>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TEx8_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +{ + int i,j,xmin,xmax,ymin,ymax; + int difX, difY,difX2, difY2; + int posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16);//-1; //!!!!!!!!!!!!!!!! + if(xmax>xmin) xmax--; + + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + + if(j==xmax) + { + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +#ifdef POLYQUAD3 + +void drawPoly4TEx8_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + drawPoly3TEx8(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY); + + drawPoly3TEx8(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY); +} + +#endif + +// more exact: + +void drawPoly4TEx8(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int num; + int i,j,xmin,xmax,ymin,ymax; + int difX, difY, difX2, difY2; + int posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>5)&(int)0xFFFFF800)+YAdjust+(posX>>16)]; + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + ((posX+difX)>>16)]; + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(posX>>16)]; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>5)&(int)0xFFFFF800)+YAdjust+(posX>>16)]; + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + ((posX+difX)>>16)]; + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(posX>>16)]; + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx8_IL(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int num; + int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV,TXU; + int difX, difY, difX2, difY2; + int posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + TXU=(posX+difX)>>16; + TXV=(posY+difY)>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC2= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + TXU=posX>>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + TXU=(posX+difX)>>16; + TXV=(posY+difY)>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC2= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + TXU=posX>>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx8_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int num; + int i, j, xmin, xmax, ymin, ymax; + int difX, difY, difX2, difY2; + int posX, posY, YAdjust, clutP; + short tC1, tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX += difX2; + posY += difY2; + } + if(j==xmax) + { + tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TEx8_TW_S(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4,short clX, short clY) +{ + int num; + int i,j,xmin,xmax,ymin,ymax; + int difX, difY, difX2, difY2; + int posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG_S(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + GetTextureTransColG32_SPR((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16); + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + { + tC1 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColG_SPR(&psxVuw[(i<<10)+j],psxVuw[clutP+tC1]); + } + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// +// POLY 3 F-SHADED TEX 15 BIT +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TD(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3) +{ + int i,j,xmin,xmax,ymin,ymax; + int difX, difY,difX2, difY2; + int posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX])<<16)| + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX]); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_S(&psxVuw[(i<<10)+j], + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX]); + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX])<<16)| + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX]); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG(&psxVuw[(i<<10)+j], + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX]); + } + if(NextRow_FT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TD_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3) +{ + int i,j,xmin,xmax,ymin,ymax; + int difX, difY,difX2, difY2; + int posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])<<16)| + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_S(&psxVuw[(i<<10)+j], + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + } + if(NextRow_FT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])<<16)| + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG(&psxVuw[(i<<10)+j], + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + } + if(NextRow_FT()) + { + return; + } + } +} + + +//////////////////////////////////////////////////////////////////////// + +#ifdef POLYQUAD3 + +void drawPoly4TD_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +{ + drawPoly3TD(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4); + drawPoly3TD(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4); +} + +#endif + +// more exact: + +void drawPoly4TD(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +{ + int num; + int i,j,xmin,xmax,ymin,ymax; + int difX, difY, difX2, difY2; + int posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX])<<16)| + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX]); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_S(&psxVuw[(i<<10)+j], + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX]); + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX])<<16)| + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX]); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG(&psxVuw[(i<<10)+j], + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX]); + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TD_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +{ + int num; + int i,j,xmin,xmax,ymin,ymax; + int difX, difY, difX2, difY2; + int posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])<<16)| + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY)<<10)+TWin.Position.y0+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_S(&psxVuw[(i<<10)+j], + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])<<16)| + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG(&psxVuw[(i<<10)+j], + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TD_TW_S(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +{ + int num; + int i,j,xmin,xmax,ymin,ymax; + int difX, difY, difX2, difY2; + int posX, posY; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_FT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])<<16)| + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY)<<10)+TWin.Position.y0+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_S(&psxVuw[(i<<10)+j], + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + } + if(NextRow_FT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])<<16)| + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + + posX+=difX2; + posY+=difY2; + } + if(j==xmax) + GetTextureTransColG_SPR(&psxVuw[(i<<10)+j], + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0]); + } + if(NextRow_FT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// +// POLY 3/4 G-SHADED +//////////////////////////////////////////////////////////////////////// + +__inline void drawPoly3Gi(short x1,short y1,short x2,short y2,short x3,short y3, int rgb1, int rgb2, int rgb3) +{ + int i,j,xmin,xmax,ymin,ymax; + int cR1,cG1,cB1; + int difR,difB,difG,difR2,difB2,difG2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_G(x1,y1,x2,y2,x3,y3,rgb1,rgb2,rgb3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1;if(drawW=xmin) + { + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>3)&0x001f0000)| + (((cR1) >> 9)&0x7c00)|(((cG1) >> 14)&0x03e0)|(((cB1) >> 19)&0x001f))|lSetMask; + + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + psxVuw[(i<<10)+j]=(((cR1 >> 9)&0x7c00)|((cG1 >> 14)&0x03e0)|((cB1 >> 19)&0x001f))|sSetMask; + } + if(NextRow_G()) return; + } + return; + } + +#endif + + if(iDither==2) + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1;if(drawW=xmin) + { + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16),(cG1>>16),(cR1>>16)); + + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_G()) return; + } + else + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1;if(drawW=xmin) + { + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin> 9)&0x7c00)|((cG1 >> 14)&0x03e0)|((cB1 >> 19)&0x001f)); + + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_G()) return; + } + +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3G(int rgb1, int rgb2, int rgb3) +{ + drawPoly3Gi(lx0,ly0,lx1,ly1,lx2,ly2,rgb1,rgb2,rgb3); +} + +// draw two g-shaded tris for right psx shading emulation + +void drawPoly4G(int rgb1, int rgb2, int rgb3, int rgb4) +{ + drawPoly3Gi(lx1,ly1,lx3,ly3,lx2,ly2, + rgb2,rgb4,rgb3); + drawPoly3Gi(lx0,ly0,lx1,ly1,lx2,ly2, + rgb1,rgb2,rgb3); +} + +//////////////////////////////////////////////////////////////////////// +// POLY 3/4 G-SHADED TEX PAL4 +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx4(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY,int col1, int col2, int col3) +{ + int i,j,xmin,xmax,ymin,ymax; + int cR1,cG1,cB1; + int difR,difB,difG,difR2,difB2,difG2; + int difX, difY,difX2, difY2; + int posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=((right_x) >> 16)-1; //!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx4_IL(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY,int col1, int col2, int col3) +{ + int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV; + int cR1,cG1,cB1; + int difR,difB,difG,difR2,difB2,difG2; + int difX, difY,difX2, difY2; + int posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=((right_x) >> 16)-1; //!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + XAdjust=((posX+difX)>>16); + + TXV=(posY+difY)>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC2= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16); + + TXV=posY>>16; + n_xi = ( ( XAdjust >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( XAdjust >> 4 ) & 0xf ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((XAdjust & 0x03)<<2)) & 0x0f ; + + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx4_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY, int col1, int col2, int col3) +{ + int i, j, xmin, xmax, ymin, ymax; + int cR1, cG1, cB1; + int difR, difB, difG, difR2, difB2, difG2; + int difX, difY,difX2, difY2; + int posX, posY, YAdjust, clutP, XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin>1); + + difR=delta_right_R; + difG=delta_right_G; + difB=delta_right_B; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + difX=delta_right_u;difX2=difX<<1; + difY=delta_right_v;difY2=difY<<1; + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans && !iDither) + { + for (i=ymin;i<=ymax;i++) + { + xmin=((left_x) >> 16); + xmax=((right_x) >> 16)-1; //!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16)%TWin.Position.x1; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + XAdjust=(posX>>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.x1; + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +// note: the psx is doing g-shaded quads as two g-shaded tris, +// like the following func... sadly texturing is not 100% +// correct that way, so small texture distortions can +// happen... + +void drawPoly4TGEx4_TRI_IL(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int col1, int col2, int col3, int col4) +{ + drawPoly3TGEx4_IL(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + drawPoly3TGEx4_IL(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +#ifdef POLYQUAD3GT + +void drawPoly4TGEx4_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int col1, int col2, int col3, int col4) +{ + drawPoly3TGEx4(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + drawPoly3TGEx4(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +#endif + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TGEx4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int col1, int col2, int col4, int col3) +{ + int num; + int i,j,xmin,xmax,ymin,ymax; + int cR1,cG1,cB1; + int difR,difB,difG,difR2,difB2,difG2; + int difX, difY, difX2, difY2; + int posX,posY,YAdjust,clutP,XAdjust; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4,col1,col2,col3,col4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + XAdjust=((posX+difX)>>16); + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC2=(tC2>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + XAdjust=(posX>>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>16); + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+ + (XAdjust>>1)]; + tC1=(tC1>>((XAdjust&1)<<2))&0xf; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TGEx4_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int col1, int col2, int col3, int col4) +{ + drawPoly3TGEx4_TW(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + + drawPoly3TGEx4_TW(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +//////////////////////////////////////////////////////////////////////// +// POLY 3/4 G-SHADED TEX PAL8 +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx8(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY, int col1, int col2, int col3) +{ + int i,j,xmin,xmax,ymin,ymax; + int cR1,cG1,cB1; + int difR,difB,difG,difR2,difB2,difG2; + int difX, difY,difX2, difY2; + int posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; // !!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>5)&(int)0xFFFFF800)+YAdjust+((posX>>16))]; + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + (((posX+difX)>>16))]; + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+((posX>>16))]; + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>5)&(int)0xFFFFF800)+YAdjust+((posX>>16))]; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx8_IL(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY, int col1, int col2, int col3) +{ + int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV,TXU; + int cR1,cG1,cB1; + int difR,difB,difG,difR2,difB2,difG2; + int difX, difY,difX2, difY2; + int posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; // !!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + TXU=(posX+difX)>>16; + TXV=(posY+difY)>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC2= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + TXU=posX>>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16; + TXV=posY>>16; + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + tC1= (psxVuw[(n_yi<<10)+YAdjust+n_xi] >> ((TXU & 0x01)<<3)) & 0xff; + + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGEx8_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short clX, short clY, int col1, int col2, int col3) +{ + int i,j,xmin,xmax,ymin,ymax; + int cR1,cG1,cB1; + int difR,difB,difG,difR2,difB2,difG2; + int difX, difY,difX2, difY2; + int posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; // !!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + tC2 = psxVub[((((posY+difY)>>16)%TWin.Position.y1)<<11)+ + YAdjust+(((posX+difX)>>16)%TWin.Position.x1)]; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + tC1 = psxVub[(((posY>>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.y1)<<11)+ + YAdjust+((posX>>16)%TWin.Position.x1)]; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +// note: two g-shaded tris: small texture distortions can happen + +void drawPoly4TGEx8_TRI_IL(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int col1, int col2, int col3, int col4) +{ + drawPoly3TGEx8_IL(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + drawPoly3TGEx8_IL(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +#ifdef POLYQUAD3GT + +void drawPoly4TGEx8_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int col1, int col2, int col3, int col4) +{ + drawPoly3TGEx8(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + drawPoly3TGEx8(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +#endif + +void drawPoly4TGEx8(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int col1, int col2, int col4, int col3) +{ + int num; + int i,j,xmin,xmax,ymin,ymax; + int cR1,cG1,cB1; + int difR,difB,difG,difR2,difB2,difG2; + int difX, difY, difX2, difY2; + int posX,posY,YAdjust,clutP; + short tC1,tC2; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4,col1,col2,col3,col4)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>5)&(int)0xFFFFF800)+YAdjust+(posX>>16)]; + tC2 = psxVub[(((posY+difY)>>5)&(int)0xFFFFF800)+YAdjust+ + ((posX+difX)>>16)]; + + GetTextureTransColGX32_S((uint32_t *)&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1]| + ((int)psxVuw[clutP+tC2])<<16, + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + { + tC1 = psxVub[((posY>>5)&(int)0xFFFFF800)+YAdjust+(posX>>16)]; + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + } + } + if(NextRow_GT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>5)&(int)0xFFFFF800)+YAdjust+(posX>>16)]; + if(iDither) + GetTextureTransColGX_Dither(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + psxVuw[clutP+tC1], + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TGEx8_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, + short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, + short clX, short clY, + int col1, int col2, int col3, int col4) +{ + drawPoly3TGEx8_TW(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + clX,clY, + col2,col4,col3); + drawPoly3TGEx8_TW(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + clX,clY, + col1,col2,col3); +} + +//////////////////////////////////////////////////////////////////////// +// POLY 3 G-SHADED TEX 15 BIT +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGD(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, int col1, int col2, int col3) +{ + int i,j,xmin,xmax,ymin,ymax; + int cR1,cG1,cB1; + int difR,difB,difG,difR2,difB2,difG2; + int difX, difY,difX2, difY2; + int posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax=Ymax; + + for(ymin=Ymin;ymin> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX])<<16)| + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX], + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX], + (cB1>>16),(cG1>>16),(cR1>>16)); + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX], + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX], + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3TGD_TW(short x1, short y1, short x2, short y2, short x3, short y3, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, int col1, int col2, int col3) +{ + int i,j,xmin,xmax,ymin,ymax; + int cR1,cG1,cB1; + int difR,difB,difG,difR2,difB2,difG2; + int difX, difY,difX2, difY2; + int posX,posY; + + if (x1>drawW && x2>drawW && x3>drawW) return; + if (y1>drawH && y2>drawH && y3>drawH) return; + if (x1= drawH) return; + if (drawX >= drawW) return; + + if (!SetupSections_GT(x1,y1,x2,y2,x3,y3,tx1,ty1,tx2,ty2,tx3,ty3,col1,col2,col3)) return; + + ymax = Ymax; + + for(ymin = Ymin; ymin < drawY; ymin++) + if(NextRow_GT()) return; + + difR = delta_right_R; + difG = delta_right_G; + difB = delta_right_B; + difR2 = difR<<1; + difG2 = difG<<1; + difB2 = difB<<1; + difX = delta_right_u; difX2 = difX<<1; + difY = delta_right_v; difY2 = difY<<1; + +#ifdef FASTSOLID + + if (!bCheckMask && !DrawSemiTrans && !iDither) + { + for (i = ymin; i <= ymax; i++) + { + xmin = (left_x >> 16); + xmax = (right_x >> 16) - 1; //!!!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX+difX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0])<<16)| + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + (((posX)>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0], + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0], + (cB1>>16),(cG1>>16),(cR1>>16)); + } + if(NextRow_GT()) + { + return; + } + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16)-1; //!!!!!!!!!!!!!!!!!! + if(drawW=xmin) + { + posX=left_u; + posY=left_v; + cR1=left_R; + cG1=left_G; + cB1=left_B; + + if(xmin>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0], + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + psxVuw[((((posY>>16)%TWin.Position.y1)+GlobalTextAddrY+TWin.Position.y0)<<10)+ + ((posX>>16)%TWin.Position.x1)+GlobalTextAddrX+TWin.Position.x0], + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT()) + { + return; + } + } +} + +//////////////////////////////////////////////////////////////////////// + +// note: two g-shaded tris: small texture distortions can happen + +#ifdef POLYQUAD3GT + +void drawPoly4TGD_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, int col1, int col2, int col3, int col4) +{ + drawPoly3TGD(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + col2,col4,col3); + drawPoly3TGD(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + col1,col2,col3); +} + +#endif + +void drawPoly4TGD(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, int col1, int col2, int col4, int col3) +{ + int num; + int i,j,xmin,xmax,ymin,ymax; + int cR1,cG1,cB1; + int difR,difB,difG,difR2,difB2,difG2; + int difX, difY, difX2, difY2; + int posX,posY; + + if(x1>drawW && x2>drawW && x3>drawW && x4>drawW) return; + if(y1>drawH && y2>drawH && y3>drawH && y4>drawH) return; + if(x1=drawH) return; + if(drawX>=drawW) return; + + if(!SetupSections_GT4(x1,y1,x2,y2,x3,y3,x4,y4,tx1,ty1,tx2,ty2,tx3,ty3,tx4,ty4,col1,col2,col3,col4)) return; + + ymax = Ymax; + + for (ymin = Ymin; ymin < drawY; ymin++) + if (NextRow_GT4()) return; + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans && !iDither) + { + for (i = ymin; i <= ymax; i++) + { + xmin = (left_x >> 16); + xmax = (right_x >> 16); + + if(xmax >= xmin) + { + posX = left_u; + posY = left_v; + + num = (xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>16)+GlobalTextAddrY)<<10)+((posX+difX)>>16)+GlobalTextAddrX])<<16)| + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+((posX)>>16)+GlobalTextAddrX], + (cB1>>16)|((cB1+difB)&0xff0000), + (cG1>>16)|((cG1+difG)&0xff0000), + (cR1>>16)|((cR1+difR)&0xff0000)); + posX+=difX2; + posY+=difY2; + cR1+=difR2; + cG1+=difG2; + cB1+=difB2; + } + if(j==xmax) + GetTextureTransColGX_S(&psxVuw[(i<<10)+j], + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX], + (cB1>>16),(cG1>>16),(cR1>>16)); + } + if(NextRow_GT4()) return; + } + return; + } + +#endif + + for (i=ymin;i<=ymax;i++) + { + xmin=(left_x >> 16); + xmax=(right_x >> 16); + + if(xmax>=xmin) + { + posX=left_u; + posY=left_v; + + num=(xmax-xmin); + if(num==0) num=1; + difX=(right_u-posX)/num; + difY=(right_v-posY)/num; + difX2=difX<<1; + difY2=difY<<1; + + cR1=left_R; + cG1=left_G; + cB1=left_B; + difR=(right_R-cR1)/num; + difG=(right_G-cG1)/num; + difB=(right_B-cB1)/num; + difR2=difR<<1; + difG2=difG<<1; + difB2=difB<<1; + + if(xmin>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX], + (cB1>>16),(cG1>>16),(cR1>>16)); + else + GetTextureTransColGX(&psxVuw[(i<<10)+j], + psxVuw[(((posY>>16)+GlobalTextAddrY)<<10)+(posX>>16)+GlobalTextAddrX], + (cB1>>16),(cG1>>16),(cR1>>16)); + posX+=difX; + posY+=difY; + cR1+=difR; + cG1+=difG; + cB1+=difB; + } + } + if(NextRow_GT4()) return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4TGD_TW(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4, int col1, int col2, int col3, int col4) +{ + drawPoly3TGD_TW(x2,y2,x3,y3,x4,y4, + tx2,ty2,tx3,ty3,tx4,ty4, + col2,col4,col3); + drawPoly3TGD_TW(x1,y1,x2,y2,x4,y4, + tx1,ty1,tx2,ty2,tx4,ty4, + col1,col2,col3); +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + + +/* +// no real rect test, but it does its job the way I need it +__inline BOOL IsNoRect(void) +{ + if(lx0==lx1 && lx2==lx3) return FALSE; + if(lx0==lx2 && lx1==lx3) return FALSE; + if(lx0==lx3 && lx1==lx2) return FALSE; + return TRUE; +} +*/ + +// real rect test +__inline BOOL IsNoRect(void) +{ + //if(!(dwActFixes&0x200)) return FALSE; + + if(ly0==ly1) + { + if(lx1==lx3 && ly3==ly2 && lx2==lx0) return FALSE; + if(lx1==lx2 && ly2==ly3 && lx3==lx0) return FALSE; + return TRUE; + } + + if(ly0==ly2) + { + if(lx2==lx3 && ly3==ly1 && lx1==lx0) return FALSE; + if(lx2==lx1 && ly1==ly3 && lx3==lx0) return FALSE; + return TRUE; + } + + if(ly0==ly3) + { + if(lx3==lx2 && ly2==ly1 && lx1==lx0) return FALSE; + if(lx3==lx1 && ly1==ly2 && lx2==lx0) return FALSE; + return TRUE; + } + return TRUE; +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3FT(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + + if(GlobalTextIL && GlobalTextTP<2) + { + if(GlobalTextTP==0) + drawPoly3TEx4_IL(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + else + drawPoly3TEx8_IL(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + } + + if(!bUsingTWin)// && !(dwActFixes&0x100)) + { + switch(GlobalTextTP) // depending on texture mode + { + case 0: + drawPoly3TEx4(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly3TEx8(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly3TD(lx0,ly0,lx1,ly1,lx2,ly2,(gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff)); + return; + } + return; + } + + switch(GlobalTextTP) // depending on texture mode + { + case 0: + drawPoly3TEx4_TW(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly3TEx8_TW(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly3TD_TW(lx0,ly0,lx1,ly1,lx2,ly2,(gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff)); + return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4FT(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + + if(GlobalTextIL && GlobalTextTP<2) + { + if(GlobalTextTP==0) + drawPoly4TEx4_IL(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + else + drawPoly4TEx8_IL(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + } + + if(!bUsingTWin) + { +#ifdef POLYQUAD3GT + if(IsNoRect()) + { + switch (GlobalTextTP) + { + case 0: + drawPoly4TEx4_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly4TEx8_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly4TD_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff)); + return; + } + return; + } +#endif + + switch (GlobalTextTP) + { + case 0: // grandia investigations needed + drawPoly4TEx4(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly4TEx8(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly4TD(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff)); + return; + } + return; + } + + switch (GlobalTextTP) + { + case 0: + drawPoly4TEx4_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly4TEx8_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff), ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly4TD_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[4] & 0x000000ff), ((gpuData[4]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),(gpuData[6] & 0x000000ff), ((gpuData[6]>>8) & 0x000000ff)); + return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly3GT(unsigned char * baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + + if(GlobalTextIL && GlobalTextTP<2) + { + if(GlobalTextTP==0) + drawPoly3TGEx4_IL(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6]); + else + drawPoly3TGEx8_IL(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6]); + return; + } + + if(!bUsingTWin) + { + switch (GlobalTextTP) + { + case 0: + drawPoly3TGEx4(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6]); + return; + case 1: + drawPoly3TGEx8(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6]); + return; + case 2: + drawPoly3TGD(lx0,ly0,lx1,ly1,lx2,ly2,(gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),gpuData[0],gpuData[3],gpuData[6]); + return; + } + return; + } + + switch(GlobalTextTP) + { + case 0: + drawPoly3TGEx4_TW(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6]); + return; + case 1: + drawPoly3TGEx8_TW(lx0,ly0,lx1,ly1,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6]); + return; + case 2: + drawPoly3TGD_TW(lx0,ly0,lx1,ly1,lx2,ly2,(gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),gpuData[0],gpuData[3],gpuData[6]); + return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void drawPoly4GT(unsigned char *baseAddr) +{ + uint32_t *gpuData = ((uint32_t *) baseAddr); + + if(GlobalTextIL && GlobalTextTP<2) + { + if(GlobalTextTP==0) + drawPoly4TGEx4_TRI_IL(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[11] & 0x000000ff), ((gpuData[11]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0),((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6],gpuData[9]); + else + drawPoly4TGEx8_TRI_IL(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[11] & 0x000000ff), ((gpuData[11]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0),((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6],gpuData[9]); + return; + } + + if(!bUsingTWin) + { +#ifdef POLYQUAD3GT + if(IsNoRect()) + { + switch (GlobalTextTP) + { + case 0: + drawPoly4TGEx4_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[11] & 0x000000ff), ((gpuData[11]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0),((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6],gpuData[9]); + + return; + case 1: + drawPoly4TGEx8_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[11] & 0x000000ff), ((gpuData[11]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0),((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6],gpuData[9]); + return; + case 2: + drawPoly4TGD_TRI(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(gpuData[2] & 0x000000ff),((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[11] & 0x000000ff), ((gpuData[11]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),gpuData[0],gpuData[3],gpuData[6],gpuData[9]); + return; + } + return; + } +#endif + + switch (GlobalTextTP) + { + case 0: + drawPoly4TGEx4(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[11] & 0x000000ff), ((gpuData[11]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0),((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6],gpuData[9]); + + return; + case 1: + drawPoly4TGEx8(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[11] & 0x000000ff), ((gpuData[11]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0),((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6],gpuData[9]); + return; + case 2: + drawPoly4TGD(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(gpuData[2] & 0x000000ff),((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[11] & 0x000000ff), ((gpuData[11]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),gpuData[0],gpuData[3],gpuData[6],gpuData[9]); + return; + } + return; + } + + switch (GlobalTextTP) + { + case 0: + drawPoly4TGEx4_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[11] & 0x000000ff), ((gpuData[11]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0),((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6],gpuData[9]); + return; + case 1: + drawPoly4TGEx8_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2, + (gpuData[2] & 0x000000ff), ((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[11] & 0x000000ff), ((gpuData[11]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff), + ((gpuData[2]>>12) & 0x3f0),((gpuData[2]>>22) & iGPUHeightMask), + gpuData[0],gpuData[3],gpuData[6],gpuData[9]); + return; + case 2: + drawPoly4TGD_TW(lx0,ly0,lx1,ly1,lx3,ly3,lx2,ly2,(gpuData[2] & 0x000000ff),((gpuData[2]>>8) & 0x000000ff), (gpuData[5] & 0x000000ff), ((gpuData[5]>>8) & 0x000000ff),(gpuData[11] & 0x000000ff), ((gpuData[11]>>8) & 0x000000ff),(gpuData[8] & 0x000000ff), ((gpuData[8]>>8) & 0x000000ff),gpuData[0],gpuData[3],gpuData[6],gpuData[9]); + return; + } +} + +//////////////////////////////////////////////////////////////////////// +// SPRITE FUNCS +//////////////////////////////////////////////////////////////////////// + +void DrawSoftwareSpriteTWin(unsigned char * baseAddr, int w, int h) +{ + uint32_t *gpuData = (uint32_t *)baseAddr; + short sx0,sy0,sx1,sy1,sx2,sy2,sx3,sy3; + short tx0,ty0,tx1,ty1,tx2,ty2,tx3,ty3; + + sx0=lx0; + sy0=ly0; + + sx0=sx3=sx0+PSXDisplay.DrawOffset.x; + sx1=sx2=sx0+w; + sy0=sy1=sy0+PSXDisplay.DrawOffset.y; + sy2=sy3=sy0+h; + + tx0=tx3=gpuData[2]&0xff; + tx1=tx2=tx0+w; + ty0=ty1=(gpuData[2]>>8)&0xff; + ty2=ty3=ty0+h; + + switch (GlobalTextTP) + { + case 0: + drawPoly4TEx4_TW_S(sx0,sy0,sx1,sy1,sx2,sy2,sx3,sy3, + tx0,ty0,tx1,ty1,tx2,ty2,tx3,ty3, + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 1: + drawPoly4TEx8_TW_S(sx0,sy0,sx1,sy1,sx2,sy2,sx3,sy3, + tx0,ty0,tx1,ty1,tx2,ty2,tx3,ty3, + ((gpuData[2]>>12) & 0x3f0), ((gpuData[2]>>22) & iGPUHeightMask)); + return; + case 2: + drawPoly4TD_TW_S(sx0,sy0,sx1,sy1,sx2,sy2,sx3,sy3, + tx0,ty0,tx1,ty1,tx2,ty2,tx3,ty3); + return; + } +} + +//////////////////////////////////////////////////////////////////////// + +void DrawSoftwareSpriteMirror(unsigned char * baseAddr, int w, int h) +{ + int sprtY,sprtX,sprtW,sprtH,lXDir,lYDir; + int clutY0,clutX0,clutP,textX0,textY0,sprtYa,sprCY,sprCX,sprA; + short tC; + uint32_t *gpuData = (uint32_t *)baseAddr; + sprtY = ly0; + sprtX = lx0; + sprtH = h; + sprtW = w; + clutY0 = (gpuData[2]>>22) & iGPUHeightMask; + clutX0 = (gpuData[2]>>12) & 0x3f0; + clutP = (clutY0<<11) + (clutX0<<1); + textY0 = ((gpuData[2]>>8) & 0x000000ff) + GlobalTextAddrY; + textX0 = (gpuData[2] & 0x000000ff); + + sprtX+=PSXDisplay.DrawOffset.x; + sprtY+=PSXDisplay.DrawOffset.y; + +// while (sprtX>1023) sprtX-=1024; +// while (sprtY>MAXYLINESMIN1) sprtY-=MAXYLINES; + + if(sprtX>drawW) + { +// if((sprtX+sprtW)>1023) sprtX-=1024; +// else return; + return; + } + + if(sprtY>drawH) + { +// if ((sprtY+sprtH)>MAXYLINESMIN1) sprtY-=MAXYLINES; +// else return; + return; + } + + if(sprtYdrawH) sprtH=drawH-sprtY+1; + if((sprtX+sprtW)>drawW) sprtW=drawW-sprtX+1; + + if(usMirror&0x1000) lXDir=-1; else lXDir=1; + if(usMirror&0x2000) lYDir=-1; else lYDir=1; + + switch (GlobalTextTP) + { + case 0: // texture is 4-bit + + sprtW=sprtW/2; + textX0=(GlobalTextAddrX<<1)+(textX0>>1); + sprtYa=(sprtY<<10); + clutP=(clutY0<<10)+clutX0; + for (sprCY=0;sprCY>4)&0xf)]); + GetTextureTransColG_SPR(&psxVuw[sprA+1],psxVuw[clutP+(tC&0xf)]); + } + return; + + case 1: + + clutP>>=1; + for(sprCY=0;sprCYdrawW) return; + if(sprtY>drawH) return; + + tdx=tx+sprtW; + tdy=ty+sprtH; + + sprtW+=sprtX; + sprtH+=sprtY; + + // Pete is too lazy to make a faster version ;) + + if(GlobalTextTP==0) + drawPoly4TEx4_IL(sprtX,sprtY,sprtX,sprtH,sprtW,sprtH,sprtW,sprtY, + tx,ty, tx,tdy, tdx,tdy, tdx,ty, + (gpuData[2]>>12) & 0x3f0, ((gpuData[2]>>22) & iGPUHeightMask)); + + + else + drawPoly4TEx8_IL(sprtX,sprtY,sprtX,sprtH,sprtW,sprtH,sprtW,sprtY, + tx,ty, tx,tdy, tdx,tdy, tdx,ty, + (gpuData[2]>>12) & 0x3f0, ((gpuData[2]>>22) & iGPUHeightMask)); +} + +//////////////////////////////////////////////////////////////////////// + +void DrawSoftwareSprite(unsigned char *baseAddr, short w, short h, int tx, int ty) +{ + int sprtY, sprtX, sprtW, sprtH; + int clutY0, clutX0, clutP, textX0, textY0, sprtYa, sprCY, sprCX, sprA; + short tC, tC2; + uint32_t *gpuData = (uint32_t *)baseAddr; + unsigned char *pV; + BOOL bWT,bWS; + + if(GlobalTextIL && GlobalTextTP<2) + {DrawSoftwareSprite_IL(baseAddr,w,h,tx,ty);return;} + + sprtY = ly0; + sprtX = lx0; + sprtH = h; + sprtW = w; + clutY0 = (gpuData[2]>>22) & iGPUHeightMask; + clutX0 = (gpuData[2]>>12) & 0x3f0; + + clutP = (clutY0<<11) + (clutX0<<1); + + textY0 =ty+ GlobalTextAddrY; + textX0 =tx; + + sprtX+=PSXDisplay.DrawOffset.x; + sprtY+=PSXDisplay.DrawOffset.y; + + //while (sprtX>1023) sprtX-=1024; + //while (sprtY>MAXYLINESMIN1) sprtY-=MAXYLINES; + + if(sprtX>drawW) + { +// if((sprtX+sprtW)>1023) sprtX-=1024; +// else return; + return; + } + + if(sprtY>drawH) + { +// if ((sprtY+sprtH)>MAXYLINESMIN1) sprtY-=MAXYLINES; +// else return; + return; + } + + if(sprtYdrawH) sprtH=drawH-sprtY+1; + if((sprtX+sprtW)>drawW) sprtW=drawW-sprtX+1; + + + bWT=FALSE; + bWS=FALSE; + + switch (GlobalTextTP) + { + case 0: + + if(textX0&1) {bWS=TRUE;sprtW--;} + if(sprtW&1) bWT=TRUE; + + sprtW=sprtW>>1; + textX0=(GlobalTextAddrX<<1)+(textX0>>1)+(textY0<<11); + sprtYa=(sprtY<<10)+sprtX; + clutP=(clutY0<<10)+clutX0; + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + for (sprCY=0;sprCY>4)&0xf)]); + } + + for (sprCX=0;sprCX>4)&0xf)])<<16)| + psxVuw[clutP+(tC&0x0f)]); + } + + if(bWT) + { + tC=*pV; + GetTextureTransColG_S(&psxVuw[sprA],psxVuw[clutP+(tC&0x0f)]); + } + } + return; + } + +#endif + + for (sprCY=0;sprCY>4)&0xf)]); + } + + for (sprCX=0;sprCX>4)&0xf)])<<16)| + psxVuw[clutP+(tC&0x0f)]); + } + + if(bWT) + { + tC=*pV; + GetTextureTransColG_SPR(&psxVuw[sprA],psxVuw[clutP+(tC&0x0f)]); + } + } + return; + + case 1: + clutP>>=1;sprtW--; + textX0+=(GlobalTextAddrX<<1) + (textY0<<11); + +#ifdef FASTSOLID + + if(!bCheckMask && !DrawSemiTrans) + { + for(sprCY=0;sprCY 0) + { + dr = ((int)r1 - (int)r0) / dx; + dg = ((int)g1 - (int)g0) / dx; + db = ((int)b1 - (int)b0) / dx; + } + else + { + dr = ((int)r1 - (int)r0); + dg = ((int)g1 - (int)g0); + db = ((int)b1 - (int)b0); + } + + d = 2*dy - dx; /* Initial value of d */ + incrE = 2*dy; /* incr. used for move to E */ + incrSE = 2*(dy - dx); /* incr. used for move to SE */ + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + while(x0 < x1) + { + if (d <= 0) + { + d = d + incrE; /* Choose E */ + } + else + { + d = d + incrSE; /* Choose SE */ + y0++; + } + x0++; + + r0+=dr; + g0+=dg; + b0+=db; + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + } +} + +/////////////////////////////////////////////////////////////////////// + +void Line_S_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb1) +{ + int dx, dy, incrS, incrSE, d; + uint32_t r0, g0, b0, r1, g1, b1; + int dr, dg, db; + + r0 = (rgb0 & 0x00ff0000); + g0 = (rgb0 & 0x0000ff00) << 8; + b0 = (rgb0 & 0x000000ff) << 16; + r1 = (rgb1 & 0x00ff0000); + g1 = (rgb1 & 0x0000ff00) << 8; + b1 = (rgb1 & 0x000000ff) << 16; + + dx = x1 - x0; + dy = y1 - y0; + + if (dy > 0) + { + dr = ((int)r1 - (int)r0) / dy; + dg = ((int)g1 - (int)g0) / dy; + db = ((int)b1 - (int)b0) / dy; + } + else + { + dr = ((int)r1 - (int)r0); + dg = ((int)g1 - (int)g0); + db = ((int)b1 - (int)b0); + } + + d = 2*dx - dy; /* Initial value of d */ + incrS = 2*dx; /* incr. used for move to S */ + incrSE = 2*(dx - dy); /* incr. used for move to SE */ + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + while(y0 < y1) + { + if (d <= 0) + { + d = d + incrS; /* Choose S */ + } + else + { + d = d + incrSE; /* Choose SE */ + x0++; + } + y0++; + + r0+=dr; + g0+=dg; + b0+=db; + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + } +} + +/////////////////////////////////////////////////////////////////////// + +void Line_N_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb1) +{ + int dx, dy, incrN, incrNE, d; + uint32_t r0, g0, b0, r1, g1, b1; + int dr, dg, db; + + r0 = (rgb0 & 0x00ff0000); + g0 = (rgb0 & 0x0000ff00) << 8; + b0 = (rgb0 & 0x000000ff) << 16; + r1 = (rgb1 & 0x00ff0000); + g1 = (rgb1 & 0x0000ff00) << 8; + b1 = (rgb1 & 0x000000ff) << 16; + + dx = x1 - x0; + dy = -(y1 - y0); + + if (dy > 0) + { + dr = ((uint32_t)r1 - (uint32_t)r0) / dy; + dg = ((uint32_t)g1 - (uint32_t)g0) / dy; + db = ((uint32_t)b1 - (uint32_t)b0) / dy; + } + else + { + dr = ((uint32_t)r1 - (uint32_t)r0); + dg = ((uint32_t)g1 - (uint32_t)g0); + db = ((uint32_t)b1 - (uint32_t)b0); + } + + d = 2*dx - dy; /* Initial value of d */ + incrN = 2*dx; /* incr. used for move to N */ + incrNE = 2*(dx - dy); /* incr. used for move to NE */ + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + while(y0 > y1) + { + if (d <= 0) + { + d = d + incrN; /* Choose N */ + } + else + { + d = d + incrNE; /* Choose NE */ + x0++; + } + y0--; + + r0+=dr; + g0+=dg; + b0+=db; + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + } +} + +/////////////////////////////////////////////////////////////////////// + +void Line_E_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb1) +{ + int dx, dy, incrE, incrNE, d; + uint32_t r0, g0, b0, r1, g1, b1; + int dr, dg, db; + + r0 = (rgb0 & 0x00ff0000); + g0 = (rgb0 & 0x0000ff00) << 8; + b0 = (rgb0 & 0x000000ff) << 16; + r1 = (rgb1 & 0x00ff0000); + g1 = (rgb1 & 0x0000ff00) << 8; + b1 = (rgb1 & 0x000000ff) << 16; + + dx = x1 - x0; + dy = -(y1 - y0); + + if (dx > 0) + { + dr = ((int)r1 - (int)r0) / dx; + dg = ((int)g1 - (int)g0) / dx; + db = ((int)b1 - (int)b0) / dx; + } + else + { + dr = ((int)r1 - (int)r0); + dg = ((int)g1 - (int)g0); + db = ((int)b1 - (int)b0); + } + + d = 2*dy - dx; /* Initial value of d */ + incrE = 2*dy; /* incr. used for move to E */ + incrNE = 2*(dy - dx); /* incr. used for move to NE */ + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + while(x0 < x1) + { + if (d <= 0) + { + d = d + incrE; /* Choose E */ + } + else + { + d = d + incrNE; /* Choose NE */ + y0--; + } + x0++; + + r0+=dr; + g0+=dg; + b0+=db; + + if ((x0>=drawX)&&(x0=drawY)&&(y0> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + } +} + +/////////////////////////////////////////////////////////////////////// + +void VertLineShade(int x, int y0, int y1, uint32_t rgb0, uint32_t rgb1) +{ + int y, dy; + uint32_t r0, g0, b0, r1, g1, b1; + int dr, dg, db; + + r0 = (rgb0 & 0x00ff0000); + g0 = (rgb0 & 0x0000ff00) << 8; + b0 = (rgb0 & 0x000000ff) << 16; + r1 = (rgb1 & 0x00ff0000); + g1 = (rgb1 & 0x0000ff00) << 8; + b1 = (rgb1 & 0x000000ff) << 16; + + dy = (y1 - y0); + + if (dy > 0) + { + dr = ((int)r1 - (int)r0) / dy; + dg = ((int)g1 - (int)g0) / dy; + db = ((int)b1 - (int)b0) / dy; + } + else + { + dr = ((int)r1 - (int)r0); + dg = ((int)g1 - (int)g0); + db = ((int)b1 - (int)b0); + } + + if (y0 < drawY) + { + r0+=dr*(drawY - y0); + g0+=dg*(drawY - y0); + b0+=db*(drawY - y0); + y0 = drawY; + } + + if (y1 > drawH) + y1 = drawH; + + for (y = y0; y <= y1; y++) + { + GetShadeTransCol(&psxVuw[(y<<10)+x],(unsigned short)(((r0 >> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + r0+=dr; + g0+=dg; + b0+=db; + } +} + +/////////////////////////////////////////////////////////////////////// + +void HorzLineShade(int y, int x0, int x1, uint32_t rgb0, uint32_t rgb1) +{ + int x, dx; + uint32_t r0, g0, b0, r1, g1, b1; + int dr, dg, db; + + r0 = (rgb0 & 0x00ff0000); + g0 = (rgb0 & 0x0000ff00) << 8; + b0 = (rgb0 & 0x000000ff) << 16; + r1 = (rgb1 & 0x00ff0000); + g1 = (rgb1 & 0x0000ff00) << 8; + b1 = (rgb1 & 0x000000ff) << 16; + + dx = (x1 - x0); + + if (dx > 0) + { + dr = ((int)r1 - (int)r0) / dx; + dg = ((int)g1 - (int)g0) / dx; + db = ((int)b1 - (int)b0) / dx; + } + else + { + dr = ((int)r1 - (int)r0); + dg = ((int)g1 - (int)g0); + db = ((int)b1 - (int)b0); + } + + if (x0 < drawX) + { + r0+=dr*(drawX - x0); + g0+=dg*(drawX - x0); + b0+=db*(drawX - x0); + x0 = drawX; + } + + if (x1 > drawW) + x1 = drawW; + + for (x = x0; x <= x1; x++) + { + GetShadeTransCol(&psxVuw[(y<<10)+x],(unsigned short)(((r0 >> 9)&0x7c00)|((g0 >> 14)&0x03e0)|((b0 >> 19)&0x001f))); + r0+=dr; + g0+=dg; + b0+=db; + } +} + +/////////////////////////////////////////////////////////////////////// + +void Line_E_SE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) +{ + int dx, dy, incrE, incrSE, d, x, y; + + dx = x1 - x0; + dy = y1 - y0; + d = 2*dy - dx; /* Initial value of d */ + incrE = 2*dy; /* incr. used for move to E */ + incrSE = 2*(dy - dx); /* incr. used for move to SE */ + x = x0; + y = y0; + if ((x>=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y y1) + { + if (d <= 0) + { + d = d + incrN; /* Choose N */ + y--; + } + else + { + d = d + incrNE; /* Choose NE */ + x++; + y--; + } + if ((x>=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y=drawX)&&(x=drawY)&&(y drawH) + y1 = drawH; + + for (y = y0; y <= y1; y++) + GetShadeTransCol(&psxVuw[(y<<10)+x], colour); +} + +/////////////////////////////////////////////////////////////////////// + +void HorzLineFlat(int y, int x0, int x1, unsigned short colour) +{ + int x; + + if (x0 < drawX) + x0 = drawX; + + if (x1 > drawW) + x1 = drawW; + + for (x = x0; x <= x1; x++) + GetShadeTransCol(&psxVuw[(y<<10)+x], colour); +} + +/////////////////////////////////////////////////////////////////////// + +/* Bresenham Line drawing function */ +void DrawSoftwareLineShade(int rgb0, int rgb1) +{ + short x0, y0, x1, y1, xt, yt; + int rgbt; + double m, dy, dx; + + if(lx0>drawW && lx1>drawW) return; + if(ly0>drawH && ly1>drawH) return; + if(lx0=drawH) return; + if(drawX>=drawW) return; + + x0 = lx0; + y0 = ly0; + x1 = lx1; + y1 = ly1; + + dx = x1 - x0; + dy = y1 - y0; + + if (dx == 0) + { + if (dy > 0) + VertLineShade(x0, y0, y1, rgb0, rgb1); + else + VertLineShade(x0, y1, y0, rgb1, rgb0); + } + else + if (dy == 0) + { + if (dx > 0) + HorzLineShade(y0, x0, x1, rgb0, rgb1); + else + HorzLineShade(y0, x1, x0, rgb1, rgb0); + } + else + { + if (dx < 0) + { + xt = x0; + yt = y0; + rgbt = rgb0; + x0 = x1; + y0 = y1; + rgb0 = rgb1; + x1 = xt; + y1 = yt; + rgb1 = rgbt; + + dx = x1 - x0; + dy = y1 - y0; + } + + m = dy/dx; + + if (m >= 0) + { + if (m > 1) + Line_S_SE_Shade(x0, y0, x1, y1, rgb0, rgb1); + else + Line_E_SE_Shade(x0, y0, x1, y1, rgb0, rgb1); + } + else + if (m < -1) + Line_N_NE_Shade(x0, y0, x1, y1, rgb0, rgb1); + else + Line_E_NE_Shade(x0, y0, x1, y1, rgb0, rgb1); + } +} + +/////////////////////////////////////////////////////////////////////// + +void DrawSoftwareLineFlat(int rgb) +{ + short x0, y0, x1, y1, xt, yt; + double m, dy, dx; + unsigned short colour = 0; + + if(lx0>drawW && lx1>drawW) return; + if(ly0>drawH && ly1>drawH) return; + if(lx0=drawH) return; + if(drawX>=drawW) return; + + colour = ((rgb & 0x00f80000)>>9) | ((rgb & 0x0000f800)>>6) | ((rgb & 0x000000f8)>>3); + + x0 = lx0; + y0 = ly0; + x1 = lx1; + y1 = ly1; + + dx = x1 - x0; + dy = y1 - y0; + + if (dx == 0) + { + if (dy == 0) + return; // Nothing to draw + else if (dy > 0) + VertLineFlat(x0, y0, y1, colour); + else + VertLineFlat(x0, y1, y0, colour); + } + else + if (dy == 0) + { + if (dx > 0) + HorzLineFlat(y0, x0, x1, colour); + else + HorzLineFlat(y0, x1, x0, colour); + } + else + { + if (dx < 0) + { + xt = x0; + yt = y0; + x0 = x1; + y0 = y1; + x1 = xt; + y1 = yt; + + dx = x1 - x0; + dy = y1 - y0; + } + + m = dy/dx; + + if (m >= 0) + { + if (m > 1) + Line_S_SE_Flat(x0, y0, x1, y1, colour); + else + Line_E_SE_Flat(x0, y0, x1, y1, colour); + } + else + if (m < -1) + Line_N_NE_Flat(x0, y0, x1, y1, colour); + else + Line_E_NE_Flat(x0, y0, x1, y1, colour); + } +} + +/////////////////////////////////////////////////////////////////////// diff --git a/plugins/peopsxgl/soft.h b/plugins/peopsxgl/soft.h new file mode 100644 index 00000000..d4a7e3d4 --- /dev/null +++ b/plugins/peopsxgl/soft.h @@ -0,0 +1,58 @@ +/*************************************************************************** + soft.h - description + ------------------- + begin : Sun Oct 28 2001 + copyright : (C) 2001 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +//*************************************************************************// +// History of changes: +// +// 2001/10/28 - Pete +// - generic cleanup for the Peops release +// +//*************************************************************************// + +#ifndef _GPU_SOFT_H_ +#define _GPU_SOFT_H_ + +// internally used defines + +#define RED(x) (x & 0xff) +#define BLUE(x) ((x>>16) & 0xff) +#define GREEN(x) ((x>>8) & 0xff) +#define COLOR(x) (x & 0xffffff) + +/////////////////////////////////////////////////////////////////////// + +void offsetPSXLine(void); +void offsetPSX2(void); +void offsetPSX3(void); +void offsetPSX4(void); + +void FillSoftwareAreaTrans(short x0, short y0, short x1, short y1, unsigned short col); +void FillSoftwareArea(short x0, short y0, short x1, short y1, unsigned short col); +void drawPoly3G(int rgb1, int rgb2, int rgb3); +void drawPoly4G(int rgb1, int rgb2, int rgb3, int rgb4); +void drawPoly3F(int rgb); +void drawPoly4F(int rgb); +void drawPoly4FT(unsigned char *baseAddr); +void drawPoly4GT(unsigned char *baseAddr); +void drawPoly3FT(unsigned char *baseAddr); +void drawPoly3GT(unsigned char *baseAddr); +void DrawSoftwareSprite(unsigned char *baseAddr, short w, short h, int tx, int ty); +void DrawSoftwareSpriteTWin(unsigned char *baseAddr, int w, int h); +void DrawSoftwareSpriteMirror(unsigned char *baseAddr, int w, int h); + +#endif // _GPU_SOFT_H_ diff --git a/plugins/peopsxgl/stdafx.h b/plugins/peopsxgl/stdafx.h new file mode 100644 index 00000000..1d845ff2 --- /dev/null +++ b/plugins/peopsxgl/stdafx.h @@ -0,0 +1,45 @@ +/*************************************************************************** + stdafx.h - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#define __X11_C_ +#define __inline inline + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define CALLBACK /* */ +#define __inline inline + +#include "gl_ext.h" + +#define SHADETEXBIT(x) ((x>>24) & 0x1) +#define SEMITRANSBIT(x) ((x>>25) & 0x1) + +#ifndef GL_BGRA_EXT +#define GL_BGRA_EXT GL_BGRA +#endif +#define GL_COLOR_INDEX8_EXT 0x80E5 diff --git a/plugins/peopsxgl/texture.c b/plugins/peopsxgl/texture.c new file mode 100644 index 00000000..01630dad --- /dev/null +++ b/plugins/peopsxgl/texture.c @@ -0,0 +1,4909 @@ +/*************************************************************************** + texture.c - description + ------------------- + begin : Sun Mar 08 2009 + copyright : (C) 1999-2009 by Pete Bernert + web : www.pbernert.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. See also the license.txt file for * + * additional informations. * + * * + ***************************************************************************/ + +#include "stdafx.h" + +//////////////////////////////////////////////////////////////////////////////////// +// Texture related functions are here ! +// +// The texture handling is heart and soul of this gpu. The plugin was developed +// 1999, by this time no shaders were available. Since the psx gpu is making +// heavy use of CLUT (="color lookup tables", aka palettized textures), it was +// an interesting task to get those emulated at good speed on NV TNT cards +// (which was my major goal when I created the first "gpuPeteTNT"). Later cards +// (Geforce256) supported texture palettes by an OGL extension, but at some point +// this support was dropped again by gfx card vendors. +// Well, at least there is a certain advatage, if no texture palettes extension can +// be used: it is possible to modify the textures in any way, allowing "hi-res" +// textures and other tweaks. +// +// My main texture caching is kinda complex: the plugin is allocating "n" 256x256 textures, +// and it places small psx texture parts inside them. The plugin keeps track what +// part (with what palette) it had placed in which texture, so it can re-use this +// part again. The more ogl textures it can use, the better (of course the managing/ +// searching will be slower, but everything is faster than uploading textures again +// and again to a gfx card). My first card (TNT1) had 16 MB Vram, and it worked +// well with many games, but I recommend nowadays 64 MB Vram to get a good speed. +// +// Sadly, there is also a second kind of texture cache needed, for "psx texture windows". +// Those are "repeated" textures, so a psx "texture window" needs to be put in +// a whole texture to use the GL_TEXTURE_WRAP_ features. This cache can get full very +// fast in games which are having an heavy "texture window" usage, like RRT4. As an +// alternative, this plugin can use the OGL "palette" extension on texture windows, +// if available. Nowadays also a fragment shader can easily be used to emulate +// texture wrapping in a texture atlas, so the main cache could hold the texture +// windows as well (that's what I am doing in the OGL2 plugin). But currently the +// OGL1 plugin is a "shader-free" zone, so heavy "texture window" games will cause +// much texture uploads. +// +// Some final advice: take care if you change things in here. I've removed my ASM +// handlers (they didn't cause much speed gain anyway) for readability/portability, +// but still the functions/data structures used here are easy to mess up. I guess it +// can be a pain in the ass to port the plugin to another byte order :) +// +//////////////////////////////////////////////////////////////////////////////////// + +#define _IN_TEXTURE + +#include "externals.h" +#include "texture.h" +#include "gpu.h" +#include "prim.h" + +#define CLUTCHK 0x00060000 +#define CLUTSHIFT 17 + +//////////////////////////////////////////////////////////////////////// +// texture conversion buffer .. +//////////////////////////////////////////////////////////////////////// + +int iHiResTextures=0; +GLubyte ubPaletteBuffer[256][4]; +GLuint gTexMovieName=0; +GLuint gTexBlurName=0; +GLuint gTexFrameName=0; +int iTexGarbageCollection=1; +uint32_t dwTexPageComp=0; +int iVRamSize=0; +int iClampType=GL_CLAMP; + +void (*LoadSubTexFn) (int,int,short,short); +uint32_t (*PalTexturedColourFn) (uint32_t); + +//////////////////////////////////////////////////////////////////////// +// defines +//////////////////////////////////////////////////////////////////////// + +#define PALCOL(x) PalTexturedColourFn (x) + +#define CSUBSIZE 2048 +#define CSUBSIZEA 8192 +#define CSUBSIZES 4096 + +#define OFFA 0 +#define OFFB 2048 +#define OFFC 4096 +#define OFFD 6144 + +#define XOFFA 0 +#define XOFFB 512 +#define XOFFC 1024 +#define XOFFD 1536 + +#define SOFFA 0 +#define SOFFB 1024 +#define SOFFC 2048 +#define SOFFD 3072 + +#define MAXWNDTEXCACHE 128 + +#define XCHECK(pos1,pos2) ((pos1.c[0]>=pos2.c[1])&&(pos1.c[1]<=pos2.c[0])&&(pos1.c[2]>=pos2.c[3])&&(pos1.c[3]<=pos2.c[2])) +#define INCHECK(pos2,pos1) ((pos1.c[0]<=pos2.c[0]) && (pos1.c[1]>=pos2.c[1]) && (pos1.c[2]<=pos2.c[2]) && (pos1.c[3]>=pos2.c[3])) + +//////////////////////////////////////////////////////////////////////// + +unsigned char * CheckTextureInSubSCache(int TextureMode, uint32_t GivenClutId, unsigned short *pCache); +void LoadSubTexturePageSort(int pageid, int mode, short cx, short cy); +void LoadPackedSubTexturePageSort(int pageid, int mode, short cx, short cy); +void DefineSubTextureSort(void); + +//////////////////////////////////////////////////////////////////////// +// some globals +//////////////////////////////////////////////////////////////////////// + +GLint giWantedRGBA=4; +GLint giWantedFMT=GL_RGBA; +GLint giWantedTYPE=GL_UNSIGNED_BYTE; +int GlobalTexturePage; +GLint XTexS; +GLint YTexS; +GLint DXTexS; +GLint DYTexS; +int iSortTexCnt=32; +BOOL bUseFastMdec=FALSE; +BOOL bUse15bitMdec=FALSE; +int iFrameTexType=0; +int iFrameReadType=0; + +uint32_t (*TCF[2]) (uint32_t); +unsigned short (*PTCF[2]) (unsigned short); + +//////////////////////////////////////////////////////////////////////// +// texture cache implementation +//////////////////////////////////////////////////////////////////////// + +// "texture window" cache entry + +typedef struct textureWndCacheEntryTag +{ + uint32_t ClutID; + short pageid; + short textureMode; + short Opaque; + short used; + EXLong pos; + GLuint texname; +} textureWndCacheEntry; + +// "standard texture" cache entry (12 byte per entry, as small as possible... we need lots of them) + +typedef struct textureSubCacheEntryTagS +{ + uint32_t ClutID; + EXLong pos; + unsigned char posTX; + unsigned char posTY; + unsigned char cTexID; + unsigned char Opaque; +} textureSubCacheEntryS; + +//--------------------------------------------- + +#define MAXTPAGES_MAX 64 +#define MAXSORTTEX_MAX 196 + +//--------------------------------------------- + +textureWndCacheEntry wcWndtexStore[MAXWNDTEXCACHE]; +textureSubCacheEntryS * pscSubtexStore[3][MAXTPAGES_MAX]; +EXLong * pxSsubtexLeft [MAXSORTTEX_MAX]; +GLuint uiStexturePage[MAXSORTTEX_MAX]; + +unsigned short usLRUTexPage = 0; + +int iMaxTexWnds = 0; +int iTexWndTurn = 0; +int iTexWndLimit = MAXWNDTEXCACHE/2; + +GLubyte * texturepart = NULL; +GLubyte * texturebuffer = NULL; +uint32_t g_x1,g_y1,g_x2,g_y2; +unsigned char ubOpaqueDraw = 0; + +unsigned short MAXTPAGES = 32; +unsigned short CLUTMASK = 0x7fff; +unsigned short CLUTYMASK = 0x1ff; +unsigned short MAXSORTTEX = 196; + +//////////////////////////////////////////////////////////////////////// +// Texture color conversions... all my ASM funcs are removed for easier +// porting... and honestly: nowadays the speed gain would be pointless +//////////////////////////////////////////////////////////////////////// + +uint32_t XP8RGBA(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0x50000000; + if(DrawSemiTrans && !(BGR&0x8000)) + {ubOpaqueDraw=1;return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff);} + return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; +} + +uint32_t XP8RGBAEx(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0x03000000; + if(DrawSemiTrans && !(BGR&0x8000)) + {ubOpaqueDraw=1;return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff);} + return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; +} + +uint32_t CP8RGBA(uint32_t BGR) +{ + uint32_t l; + if(!(BGR&0xffff)) return 0x50000000; + if(DrawSemiTrans && !(BGR&0x8000)) + {ubOpaqueDraw=1;return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff);} + l=((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; + if(l==0xffffff00) l=0xff000000; + return l; +} + +uint32_t CP8RGBAEx(uint32_t BGR) +{ + uint32_t l; + if(!(BGR&0xffff)) return 0x03000000; + if(DrawSemiTrans && !(BGR&0x8000)) + {ubOpaqueDraw=1;return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff);} + l=((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; + if(l==0xffffff00) l=0xff000000; + return l; +} + +uint32_t XP8RGBA_0(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0x50000000; + return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; +} + +uint32_t XP8RGBAEx_0(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0x03000000; + return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; +} + +uint32_t XP8BGRA_0(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0x50000000; + return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; +} + +uint32_t XP8BGRAEx_0(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0x03000000; + return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; +} + +uint32_t CP8RGBA_0(uint32_t BGR) +{ + uint32_t l; + + if(!(BGR&0xffff)) return 0x50000000; + l=((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; + if(l==0xfff8f800) l=0xff000000; + return l; +} + +uint32_t CP8RGBAEx_0(uint32_t BGR) +{ + uint32_t l; + + if(!(BGR&0xffff)) return 0x03000000; + l=((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; + if(l==0xfff8f800) l=0xff000000; + return l; +} + +uint32_t CP8BGRA_0(uint32_t BGR) +{ + uint32_t l; + + if(!(BGR&0xffff)) return 0x50000000; + l=((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; + if(l==0xff00f8f8) l=0xff000000; + return l; +} + +uint32_t CP8BGRAEx_0(uint32_t BGR) +{ + uint32_t l; + + if(!(BGR&0xffff)) return 0x03000000; + l=((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; + if(l==0xff00f8f8) l=0xff000000; + return l; +} + +uint32_t XP8RGBA_1(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0x50000000; + if(!(BGR&0x8000)) {ubOpaqueDraw=1;return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff);} + return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; +} + +uint32_t XP8RGBAEx_1(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0x03000000; + if(!(BGR&0x8000)) {ubOpaqueDraw=1;return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff);} + return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; +} + +uint32_t XP8BGRA_1(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0x50000000; + if(!(BGR&0x8000)) {ubOpaqueDraw=1;return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff);} + return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; +} + +uint32_t XP8BGRAEx_1(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0x03000000; + if(!(BGR&0x8000)) {ubOpaqueDraw=1;return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff);} + return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; +} + +uint32_t P8RGBA(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0; + return ((((BGR<<3)&0xf8)|((BGR<<6)&0xf800)|((BGR<<9)&0xf80000))&0xffffff)|0xff000000; +} + +uint32_t P8BGRA(uint32_t BGR) +{ + if(!(BGR&0xffff)) return 0; + return ((((BGR>>7)&0xf8)|((BGR<<6)&0xf800)|((BGR<<19)&0xf80000))&0xffffff)|0xff000000; +} + +unsigned short XP5RGBA(unsigned short BGR) +{ + if(!BGR) return 0; + if(DrawSemiTrans && !(BGR&0x8000)) + {ubOpaqueDraw=1;return ((((BGR<<11))|((BGR>>9)&0x3e)|((BGR<<1)&0x7c0)));} + return ((((BGR<<11))|((BGR>>9)&0x3e)|((BGR<<1)&0x7c0)))|1; +} + +unsigned short XP5RGBA_0 (unsigned short BGR) +{ + if(!BGR) return 0; + + return ((((BGR<<11))|((BGR>>9)&0x3e)|((BGR<<1)&0x7c0)))|1; +} + +unsigned short CP5RGBA_0 (unsigned short BGR) +{ + unsigned short s; + + if(!BGR) return 0; + + s=((((BGR<<11))|((BGR>>9)&0x3e)|((BGR<<1)&0x7c0)))|1; + if(s==0x07ff) s=1; + return s; +} + +unsigned short XP5RGBA_1(unsigned short BGR) +{ + if(!BGR) return 0; + if(!(BGR&0x8000)) + {ubOpaqueDraw=1;return ((((BGR<<11))|((BGR>>9)&0x3e)|((BGR<<1)&0x7c0)));} + return ((((BGR<<11))|((BGR>>9)&0x3e)|((BGR<<1)&0x7c0)))|1; +} + +unsigned short P5RGBA(unsigned short BGR) +{ + if(!BGR) return 0; + return ((((BGR<<11))|((BGR>>9)&0x3e)|((BGR<<1)&0x7c0)))|1; +} + +unsigned short XP4RGBA(unsigned short BGR) +{ + if(!BGR) return 6; + if(DrawSemiTrans && !(BGR&0x8000)) + {ubOpaqueDraw=1;return ((((BGR<<11))|((BGR>>9)&0x3e)|((BGR<<1)&0x7c0)));} + return (((((BGR&0x1e)<<11))|((BGR&0x7800)>>7)|((BGR&0x3c0)<<2)))|0xf; +} + +unsigned short XP4RGBA_0 (unsigned short BGR) +{ + if(!BGR) return 6; + return (((((BGR&0x1e)<<11))|((BGR&0x7800)>>7)|((BGR&0x3c0)<<2)))|0xf; +} + +unsigned short CP4RGBA_0 (unsigned short BGR) +{ + unsigned short s; + if(!BGR) return 6; + s=(((((BGR&0x1e)<<11))|((BGR&0x7800)>>7)|((BGR&0x3c0)<<2)))|0xf; + if(s==0x0fff) s=0x000f; + return s; +} + +unsigned short XP4RGBA_1(unsigned short BGR) +{ + if(!BGR) return 6; + if(!(BGR&0x8000)) + {ubOpaqueDraw=1;return ((((BGR<<11))|((BGR>>9)&0x3e)|((BGR<<1)&0x7c0)));} + return (((((BGR&0x1e)<<11))|((BGR&0x7800)>>7)|((BGR&0x3c0)<<2)))|0xf; +} + +unsigned short P4RGBA(unsigned short BGR) +{ + if(!BGR) return 0; + return (((((BGR&0x1e)<<11))|((BGR&0x7800)>>7)|((BGR&0x3c0)<<2)))|0xf; +} + +//////////////////////////////////////////////////////////////////////// +// CHECK TEXTURE MEM (on plugin startup) +//////////////////////////////////////////////////////////////////////// + +int iFTexA=512; +int iFTexB=512; + +void CheckTextureMemory(void) +{ + GLboolean b;GLboolean * bDetail; + int i,iCnt,iRam=iVRamSize*1024*1024; + int iTSize;char * p; + + if(iBlurBuffer) + { + char * p; + + if(iResX>1024) iFTexA=2048; + else + if(iResX>512) iFTexA=1024; + else iFTexA=512; + if(iResY>1024) iFTexB=2048; + else + if(iResY>512) iFTexB=1024; + else iFTexB=512; + + glGenTextures(1, &gTexBlurName); + gTexName=gTexBlurName; + glBindTexture(GL_TEXTURE_2D, gTexName); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + + p=(char *)malloc(iFTexA*iFTexB*4); + memset(p,0,iFTexA*iFTexB*4); + glTexImage2D(GL_TEXTURE_2D, 0, 3, iFTexA, iFTexB, 0, GL_RGB, GL_UNSIGNED_BYTE, p); + free(p); + glGetError(); + iRam-=iFTexA*iFTexB*3; + iFTexA=(iResX*256)/iFTexA; + iFTexB=(iResY*256)/iFTexB; + } + + if(iVRamSize) + { + int ts; + + iRam-=(iResX*iResY*8); + iRam-=(iResX*iResY*(iZBufferDepth/8)); + + if(iTexQuality==0 || iTexQuality==3) ts=4; + else ts=2; + + if(iHiResTextures) + iSortTexCnt=iRam/(512*512*ts); + else iSortTexCnt=iRam/(256*256*ts); + + if(iSortTexCnt>MAXSORTTEX) + { + iSortTexCnt=MAXSORTTEX-min(1,iHiResTextures); + } + else + { + iSortTexCnt-=3+min(1,iHiResTextures); + if(iSortTexCnt<8) iSortTexCnt=8; + } + + for(i=0;i info for 32*3 + for(j=0;j info 0..511 + { + pxSsubtexLeft[i]=(EXLong *)malloc(CSUBSIZE*sizeof(EXLong)); + memset(pxSsubtexLeft[i],0,CSUBSIZE*sizeof(EXLong)); + uiStexturePage[i]=0; + } +} + +//////////////////////////////////////////////////////////////////////// +// Clean up on exit +//////////////////////////////////////////////////////////////////////// + +void CleanupTextureStore() +{ + int i,j;textureWndCacheEntry * tsx; + //----------------------------------------------------// + glBindTexture(GL_TEXTURE_2D,0); + //----------------------------------------------------// + free(texturepart); // free tex part + texturepart=0; + if(texturebuffer) + { + free(texturebuffer); + texturebuffer=0; + } + //----------------------------------------------------// + tsx=wcWndtexStore; // loop tex window cache + for(i=0;itexname) // -> some tex? + glDeleteTextures(1,&tsx->texname); // --> delete it + } + iMaxTexWnds=0; // no more tex wnds + //----------------------------------------------------// + if(gTexMovieName!=0) // some movie tex? + glDeleteTextures(1, &gTexMovieName); // -> delete it + gTexMovieName=0; // no more movie tex + //----------------------------------------------------// + if(gTexFrameName!=0) // some 15bit framebuffer tex? + glDeleteTextures(1, &gTexFrameName); // -> delete it + gTexFrameName=0; // no more movie tex + //----------------------------------------------------// + if(gTexBlurName!=0) // some 15bit framebuffer tex? + glDeleteTextures(1, &gTexBlurName); // -> delete it + gTexBlurName=0; // no more movie tex + //----------------------------------------------------// + for(i=0;i<3;i++) // -> loop + for(j=0;j clean mem + } + for(i=0;i tex used ? + { + glDeleteTextures(1,&uiStexturePage[i]); + uiStexturePage[i]=0; // --> delete it + } + free(pxSsubtexLeft[i]); // -> clean mem + } + //----------------------------------------------------// +} + +//////////////////////////////////////////////////////////////////////// +// Reset textures in game... +//////////////////////////////////////////////////////////////////////// + +void ResetTextureArea(BOOL bDelTex) +{ + int i,j;textureSubCacheEntryS * tss;EXLong * lu; + textureWndCacheEntry * tsx; + //----------------------------------------------------// + + dwTexPageComp=0; + + //----------------------------------------------------// + if(bDelTex) {glBindTexture(GL_TEXTURE_2D,0);gTexName=0;} + //----------------------------------------------------// + tsx=wcWndtexStore; + for(i=0;iused=0; + if(bDelTex && tsx->texname) + { + glDeleteTextures(1,&tsx->texname); + tsx->texname=0; + } + } + iMaxTexWnds=0; + //----------------------------------------------------// + + for(i=0;i<3;i++) + for(j=0;jpos.l=0; + (tss+SOFFB)->pos.l=0; + (tss+SOFFC)->pos.l=0; + (tss+SOFFD)->pos.l=0; + } + + for(i=0;il=0; + if(bDelTex && uiStexturePage[i]) + {glDeleteTextures(1,&uiStexturePage[i]);uiStexturePage[i]=0;} + } +} + + +//////////////////////////////////////////////////////////////////////// +// Invalidate tex windows +//////////////////////////////////////////////////////////////////////// + +void InvalidateWndTextureArea(int X, int Y, int W, int H) +{ + int i,px1,px2,py1,py2,iYM=1; + textureWndCacheEntry * tsw=wcWndtexStore; + + W+=X-1; + H+=Y-1; + if(X<0) X=0;if(X>1023) X=1023; + if(W<0) W=0;if(W>1023) W=1023; + if(Y<0) Y=0;if(Y>iGPUHeightMask) Y=iGPUHeightMask; + if(H<0) H=0;if(H>iGPUHeightMask) H=iGPUHeightMask; + W++;H++; + + if(iGPUHeight==1024) iYM=3; + + py1=min(iYM,Y>>8); + py2=min(iYM,H>>8); // y: 0 or 1 + + px1=max(0,(X>>6)); + px2=min(15,(W>>6)); + + if(py1==py2) + { + py1=py1<<4;px1+=py1;px2+=py1; // change to 0-31 + for(i=0;iused) + { + if(tsw->pageid>=px1 && tsw->pageid<=px2) + { + tsw->used=0; + } + } + } + } + else + { + py1=px1+16;py2=px2+16; + for(i=0;iused) + { + if((tsw->pageid>=px1 && tsw->pageid<=px2) || + (tsw->pageid>=py1 && tsw->pageid<=py2)) + { + tsw->used=0; + } + } + } + } + + // adjust tex window count + tsw=wcWndtexStore+iMaxTexWnds-1; + while(iMaxTexWnds && !tsw->used) {iMaxTexWnds--;tsw--;} +} + + + +//////////////////////////////////////////////////////////////////////// +// same for sort textures +//////////////////////////////////////////////////////////////////////// + +void MarkFree(textureSubCacheEntryS * tsx) +{ + EXLong * ul, * uls; + int j,iMax;unsigned char x1,y1,dx,dy; + + uls=pxSsubtexLeft[tsx->cTexID]; + iMax=uls->l;ul=uls+1; + + if(!iMax) return; + + for(j=0;jl==0xffffffff) break; + + if(jl=uls->l+1; + + x1=tsx->posTX;dx=tsx->pos.c[2]-tsx->pos.c[3]; + if(tsx->posTX) {x1--;dx+=3;} + y1=tsx->posTY;dy=tsx->pos.c[0]-tsx->pos.c[1]; + if(tsx->posTY) {y1--;dy+=3;} + + ul->c[3]=x1; + ul->c[2]=dx; + ul->c[1]=y1; + ul->c[0]=dy; + } +} + +void InvalidateSubSTextureArea(int X, int Y, int W, int H) +{ + int i,j,k,iMax,px,py,px1,px2,py1,py2,iYM = 1; + EXLong npos; + textureSubCacheEntryS *tsb; + int x1,x2,y1,y2,xa,sw; + + W+=X-1; + H+=Y-1; + if(X<0) X=0;if(X>1023) X=1023; + if(W<0) W=0;if(W>1023) W=1023; + if(Y<0) Y=0;if(Y>iGPUHeightMask) Y=iGPUHeightMask; + if(H<0) H=0;if(H>iGPUHeightMask) H=iGPUHeightMask; + W++;H++; + + if(iGPUHeight==1024) iYM=3; + + py1=min(iYM,Y>>8); + py2=min(iYM,H>>8); // y: 0 or 1 + px1=max(0,(X>>6)-3); + px2=min(15,(W>>6)+3); // x: 0-15 + + for(py=py1;py<=py2;py++) + { + j=(py<<4)+px1; // get page + + y1=py*256;y2=y1+255; + + if(Hy2) continue; + + if(Y>y1) y1=Y; + if(Hx2) continue; + + if(X>x1) x1=X; + if(Wpos.l;tsb++; + for(i=0;iClutID && XCHECK(tsb->pos,npos)) {tsb->ClutID=0;MarkFree(tsb);} + +// if(npos.l & 0x00800000) + { + tsb=pscSubtexStore[k][j]+SOFFB;iMax=tsb->pos.l;tsb++; + for(i=0;iClutID && XCHECK(tsb->pos,npos)) {tsb->ClutID=0;MarkFree(tsb);} + } + +// if(npos.l & 0x00000080) + { + tsb=pscSubtexStore[k][j]+SOFFC;iMax=tsb->pos.l;tsb++; + for(i=0;iClutID && XCHECK(tsb->pos,npos)) {tsb->ClutID=0;MarkFree(tsb);} + } + +// if(npos.l & 0x00800080) + { + tsb=pscSubtexStore[k][j]+SOFFD;iMax=tsb->pos.l;tsb++; + for(i=0;iClutID && XCHECK(tsb->pos,npos)) {tsb->ClutID=0;MarkFree(tsb);} + } + } + } + } + } +} + +//////////////////////////////////////////////////////////////////////// +// Invalidate some parts of cache: main routine +//////////////////////////////////////////////////////////////////////// + +void InvalidateTextureAreaEx(void) +{ + short W=sxmax-sxmin; + short H=symax-symin; + + if (W == 0 && H == 0) return; + + if (iMaxTexWnds) + InvalidateWndTextureArea(sxmin,symin,W,H); + + InvalidateSubSTextureArea(sxmin,symin,W,H); +} + +//////////////////////////////////////////////////////////////////////// + +void InvalidateTextureArea(int X, int Y, int W, int H) +{ + if (W == 0 && H == 0) return; + + if (iMaxTexWnds) InvalidateWndTextureArea(X, Y, W, H); + + InvalidateSubSTextureArea(X, Y, W, H); +} + + +//////////////////////////////////////////////////////////////////////// +// tex window: define +//////////////////////////////////////////////////////////////////////// + +void DefineTextureWnd(void) +{ + if (gTexName == 0) + glGenTextures(1, &gTexName); + + glBindTexture(GL_TEXTURE_2D, gTexName); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + + if(iFilterType && iFilterType<3 && iHiResTextures!=2) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + } + else + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + } + + glTexImage2D(GL_TEXTURE_2D, 0,giWantedRGBA, + TWin.Position.x1, + TWin.Position.y1, + 0, giWantedFMT, giWantedTYPE, texturepart); +} + +//////////////////////////////////////////////////////////////////////// +// tex window: load packed stretch +//////////////////////////////////////////////////////////////////////// + +void LoadStretchPackedWndTexturePage(int pageid, int mode, short cx, short cy) +{ + uint32_t start, row, column, j, sxh, sxm, ldx, ldy, ldxo; + unsigned int palstart; + unsigned short *px, *pa, *ta; + unsigned char *cSRCPtr,*cOSRCPtr; + unsigned short *wSRCPtr,*wOSRCPtr; + uint32_t LineOffset; + unsigned short s; + int pmult = pageid / 16; + unsigned short (*LPTCOL)(unsigned short); + + LPTCOL = PTCF[DrawSemiTrans]; + + ldxo = TWin.Position.x1-TWin.OPosition.x1; + ldy = TWin.Position.y1-TWin.OPosition.y1; + + pa = px = (unsigned short *)ubPaletteBuffer; + ta = (unsigned short *)texturepart; + palstart = cx + (cy * 1024); + + ubOpaqueDraw = 0; + + switch (mode) + { + //--------------------------------------------------// + // 4bit texture load .. + case 0: + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + for(row=0;row<16;row++) + *px++=LPTCOL(*wSRCPtr++); + + column=g_y2-ldy; + for(TXV=g_y1;TXV<=column;TXV++) + { + ldx=ldxo; + for(TXU=g_x1;TXU<=g_x2-ldxo;TXU++) + { + n_xi = ( ( TXU >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( TXU >> 4 ) & 0xf ); + + s=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x03 ) << 2 ) ) & 0x0f )); + *ta++=s; + + if(ldx) {*ta++=s;ldx--;} + } + + if(ldy) + {ldy--; + for(TXU=g_x1;TXU<=g_x2;TXU++) + *ta++=*(ta-(g_x2-g_x1)); + } + } + + DefineTextureWnd(); + + break; + } + + + start=((pageid-16*pmult)*128)+256*2048*pmult; + + // convert CLUT to 32bits .. and then use THAT as a lookup table + + wSRCPtr=psxVuw+palstart; + for(row=0;row<16;row++) + *px++=LPTCOL(*wSRCPtr++); + + sxm=g_x1&1;sxh=g_x1>>1; + if(sxm) j=g_x1+1; else j=g_x1; + cSRCPtr = psxVub + start + (2048*g_y1) + sxh; + for(column=g_y1;column<=g_y2;column++) + { + cOSRCPtr=cSRCPtr;ldx=ldxo; + if(sxm) *ta++=*(pa+((*cSRCPtr++ >> 4) & 0xF)); + + for(row=j;row<=g_x2-ldxo;row++) + { + s=*(pa+(*cSRCPtr & 0xF)); + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + row++; + if(row<=g_x2-ldxo) + { + s=*(pa+((*cSRCPtr >> 4) & 0xF)); + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + } + cSRCPtr++; + } + + if(ldy && column&1) + {ldy--;cSRCPtr = cOSRCPtr;} + else cSRCPtr = psxVub + start + (2048*(column+1)) + sxh; + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // 8bit texture load .. + case 1: + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + for(row=0;row<256;row++) + *px++=LPTCOL(*wSRCPtr++); + + column=g_y2-ldy; + for(TXV=g_y1;TXV<=column;TXV++) + { + ldx=ldxo; + for(TXU=g_x1;TXU<=g_x2-ldxo;TXU++) + { + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + s=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x01 ) << 3 ) ) & 0xff)); + + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + } + + if(ldy) + {ldy--; + for(TXU=g_x1;TXU<=g_x2;TXU++) + *ta++=*(ta-(g_x2-g_x1)); + } + + } + + DefineTextureWnd(); + + break; + } + + start=((pageid-16*pmult)*128)+256*2048*pmult; + + // not using a lookup table here... speeds up smaller texture areas + cSRCPtr = psxVub + start + (2048*g_y1) + g_x1; + LineOffset = 2048 - (g_x2-g_x1+1) +ldxo; + + for(column=g_y1;column<=g_y2;column++) + { + cOSRCPtr=cSRCPtr;ldx=ldxo; + for(row=g_x1;row<=g_x2-ldxo;row++) + { + s=LPTCOL(psxVuw[palstart+ *cSRCPtr++]); + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + } + if(ldy && column&1) {ldy--;cSRCPtr=cOSRCPtr;} + else cSRCPtr+=LineOffset; + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // 16bit texture load .. + case 2: + start=((pageid-16*pmult)*64)+256*1024*pmult; + wSRCPtr = psxVuw + start + (1024*g_y1) + g_x1; + LineOffset = 1024 - (g_x2-g_x1+1) +ldxo; + + for(column=g_y1;column<=g_y2;column++) + { + wOSRCPtr=wSRCPtr;ldx=ldxo; + for(row=g_x1;row<=g_x2-ldxo;row++) + { + s=LPTCOL(*wSRCPtr++); + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + } + if(ldy && column&1) {ldy--;wSRCPtr=wOSRCPtr;} + else wSRCPtr+=LineOffset; + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // others are not possible ! + } +} + +//////////////////////////////////////////////////////////////////////// +// tex window: load stretched +//////////////////////////////////////////////////////////////////////// + +void LoadStretchWndTexturePage(int pageid, int mode, short cx, short cy) +{ + uint32_t start,row,column,j,sxh,sxm,ldx,ldy,ldxo,s; + unsigned int palstart; + uint32_t *px,*pa,*ta; + unsigned char *cSRCPtr,*cOSRCPtr; + unsigned short *wSRCPtr,*wOSRCPtr; + uint32_t LineOffset; + int pmult = pageid / 16; + uint32_t (*LTCOL)(uint32_t); + + LTCOL = TCF[DrawSemiTrans]; + + ldxo=TWin.Position.x1-TWin.OPosition.x1; + ldy =TWin.Position.y1-TWin.OPosition.y1; + + pa = px = (uint32_t *)ubPaletteBuffer; + ta = (uint32_t *)texturepart; + palstart = cx + (cy * 1024); + + ubOpaqueDraw = 0; + + switch (mode) + { + //--------------------------------------------------// + // 4bit texture load .. + case 0: + //------------------- ZN STUFF + + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + + row=4;do + { + *px =LTCOL(*wSRCPtr); + *(px+1)=LTCOL(*(wSRCPtr+1)); + *(px+2)=LTCOL(*(wSRCPtr+2)); + *(px+3)=LTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + column=g_y2-ldy; + for(TXV=g_y1;TXV<=column;TXV++) + { + ldx=ldxo; + for(TXU=g_x1;TXU<=g_x2-ldxo;TXU++) + { + n_xi = ( ( TXU >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( TXU >> 4 ) & 0xf ); + + s=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x03 ) << 2 ) ) & 0x0f )); + *ta++=s; + + if(ldx) {*ta++=s;ldx--;} + } + + if(ldy) + {ldy--; + for(TXU=g_x1;TXU<=g_x2;TXU++) + *ta++=*(ta-(g_x2-g_x1)); + } + } + + DefineTextureWnd(); + + break; + } + + //------------------- + + start=((pageid-16*pmult)*128)+256*2048*pmult; + // convert CLUT to 32bits .. and then use THAT as a lookup table + + wSRCPtr=psxVuw+palstart; + for(row=0;row<16;row++) + *px++=LTCOL(*wSRCPtr++); + + sxm=g_x1&1;sxh=g_x1>>1; + if(sxm) j=g_x1+1; else j=g_x1; + cSRCPtr = psxVub + start + (2048*g_y1) + sxh; + for(column=g_y1;column<=g_y2;column++) + { + cOSRCPtr=cSRCPtr;ldx=ldxo; + if(sxm) *ta++=*(pa+((*cSRCPtr++ >> 4) & 0xF)); + + for(row=j;row<=g_x2-ldxo;row++) + { + s=*(pa+(*cSRCPtr & 0xF)); + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + row++; + if(row<=g_x2-ldxo) + { + s=*(pa+((*cSRCPtr >> 4) & 0xF)); + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + } + cSRCPtr++; + } + if(ldy && column&1) + {ldy--;cSRCPtr = cOSRCPtr;} + else cSRCPtr = psxVub + start + (2048*(column+1)) + sxh; + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // 8bit texture load .. + case 1: + //------------ ZN STUFF + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + + row=64;do + { + *px =LTCOL(*wSRCPtr); + *(px+1)=LTCOL(*(wSRCPtr+1)); + *(px+2)=LTCOL(*(wSRCPtr+2)); + *(px+3)=LTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + column=g_y2-ldy; + for(TXV=g_y1;TXV<=column;TXV++) + { + ldx=ldxo; + for(TXU=g_x1;TXU<=g_x2-ldxo;TXU++) + { + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + s=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x01 ) << 3 ) ) & 0xff)); + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + } + + if(ldy) + {ldy--; + for(TXU=g_x1;TXU<=g_x2;TXU++) + *ta++=*(ta-(g_x2-g_x1)); + } + + } + + DefineTextureWnd(); + + break; + } + //------------ + + start=((pageid-16*pmult)*128)+256*2048*pmult; + + // not using a lookup table here... speeds up smaller texture areas + cSRCPtr = psxVub + start + (2048*g_y1) + g_x1; + LineOffset = 2048 - (g_x2-g_x1+1) +ldxo; + + for(column=g_y1;column<=g_y2;column++) + { + cOSRCPtr=cSRCPtr;ldx=ldxo; + for(row=g_x1;row<=g_x2-ldxo;row++) + { + s=LTCOL(psxVuw[palstart+ *cSRCPtr++]); + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + } + if(ldy && column&1) {ldy--;cSRCPtr=cOSRCPtr;} + else cSRCPtr+=LineOffset; + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // 16bit texture load .. + case 2: + start=((pageid-16*pmult)*64)+256*1024*pmult; + + wSRCPtr = psxVuw + start + (1024*g_y1) + g_x1; + LineOffset = 1024 - (g_x2-g_x1+1) +ldxo; + + for(column=g_y1;column<=g_y2;column++) + { + wOSRCPtr=wSRCPtr;ldx=ldxo; + for(row=g_x1;row<=g_x2-ldxo;row++) + { + s=LTCOL(*wSRCPtr++); + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + } + if(ldy && column&1) {ldy--;wSRCPtr=wOSRCPtr;} + else wSRCPtr+=LineOffset; + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // others are not possible ! + } +} + +//////////////////////////////////////////////////////////////////////// +// tex window: load packed simple +//////////////////////////////////////////////////////////////////////// + +void LoadPackedWndTexturePage(int pageid, int mode, short cx, short cy) +{ + uint32_t start,row,column,j,sxh,sxm; + unsigned int palstart; + unsigned short *px,*pa,*ta; + unsigned char *cSRCPtr; + unsigned short *wSRCPtr; + uint32_t LineOffset; + int pmult=pageid/16; + unsigned short (*LPTCOL)(unsigned short); + + LPTCOL=PTCF[DrawSemiTrans]; + + pa=px=(unsigned short *)ubPaletteBuffer; + ta=(unsigned short *)texturepart; + palstart=cx+(cy*1024); + + ubOpaqueDraw=0; + + switch(mode) + { + //--------------------------------------------------// + // 4bit texture load .. + case 0: + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + for(row=0;row<16;row++) + *px++=LPTCOL(*wSRCPtr++); + + for(TXV=g_y1;TXV<=g_y2;TXV++) + { + for(TXU=g_x1;TXU<=g_x2;TXU++) + { + n_xi = ( ( TXU >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( TXU >> 4 ) & 0xf ); + + *ta++=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x03 ) << 2 ) ) & 0x0f )); + } + } + + DefineTextureWnd(); + + break; + } + + start=((pageid-16*pmult)*128)+256*2048*pmult; + + // convert CLUT to 32bits .. and then use THAT as a lookup table + + wSRCPtr=psxVuw+palstart; + for(row=0;row<16;row++) + *px++=LPTCOL(*wSRCPtr++); + + sxm=g_x1&1;sxh=g_x1>>1; + if(sxm) j=g_x1+1; else j=g_x1; + cSRCPtr = psxVub + start + (2048*g_y1) + sxh; + for(column=g_y1;column<=g_y2;column++) + { + cSRCPtr = psxVub + start + (2048*column) + sxh; + + if(sxm) *ta++=*(pa+((*cSRCPtr++ >> 4) & 0xF)); + + for(row=j;row<=g_x2;row++) + { + *ta++=*(pa+(*cSRCPtr & 0xF)); row++; + if(row<=g_x2) *ta++=*(pa+((*cSRCPtr >> 4) & 0xF)); + cSRCPtr++; + } + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // 8bit texture load .. + case 1: + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + for(row=0;row<256;row++) + *px++=LPTCOL(*wSRCPtr++); + + for(TXV=g_y1;TXV<=g_y2;TXV++) + { + for(TXU=g_x1;TXU<=g_x2;TXU++) + { + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + *ta++=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x01 ) << 3 ) ) & 0xff)); + } + } + + DefineTextureWnd(); + + break; + } + + start=((pageid-16*pmult)*128)+256*2048*pmult; + + // not using a lookup table here... speeds up smaller texture areas + cSRCPtr = psxVub + start + (2048*g_y1) + g_x1; + LineOffset = 2048 - (g_x2-g_x1+1); + + for(column=g_y1;column<=g_y2;column++) + { + for(row=g_x1;row<=g_x2;row++) + *ta++=LPTCOL(psxVuw[palstart+ *cSRCPtr++]); + cSRCPtr+=LineOffset; + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // 16bit texture load .. + case 2: + start=((pageid-16*pmult)*64)+256*1024*pmult; + wSRCPtr = psxVuw + start + (1024*g_y1) + g_x1; + LineOffset = 1024 - (g_x2-g_x1+1); + + for(column=g_y1;column<=g_y2;column++) + { + for(row=g_x1;row<=g_x2;row++) + *ta++=LPTCOL(*wSRCPtr++); + wSRCPtr+=LineOffset; + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // others are not possible ! + } +} + +//////////////////////////////////////////////////////////////////////// +// tex window: load simple +//////////////////////////////////////////////////////////////////////// + +void LoadWndTexturePage(int pageid, int mode, short cx, short cy) +{ + uint32_t start,row,column,j,sxh,sxm; + unsigned int palstart; + uint32_t *px,*pa,*ta; + unsigned char *cSRCPtr; + unsigned short *wSRCPtr; + uint32_t LineOffset; + int pmult = pageid / 16; + uint32_t (*LTCOL)(uint32_t); + + LTCOL=TCF[DrawSemiTrans]; + + pa = px = (uint32_t *)ubPaletteBuffer; + ta = (uint32_t *)texturepart; + palstart = cx + (cy * 1024); + + ubOpaqueDraw = 0; + + switch (mode) + { + //--------------------------------------------------// + // 4bit texture load .. + case 0: + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + + row=4;do + { + *px =LTCOL(*wSRCPtr); + *(px+1)=LTCOL(*(wSRCPtr+1)); + *(px+2)=LTCOL(*(wSRCPtr+2)); + *(px+3)=LTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + for(TXV=g_y1;TXV<=g_y2;TXV++) + { + for(TXU=g_x1;TXU<=g_x2;TXU++) + { + n_xi = ( ( TXU >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( TXU >> 4 ) & 0xf ); + + *ta++=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x03 ) << 2 ) ) & 0x0f )); + } + } + + DefineTextureWnd(); + + break; + } + + start=((pageid-16*pmult)*128)+256*2048*pmult; + + // convert CLUT to 32bits .. and then use THAT as a lookup table + + wSRCPtr=psxVuw+palstart; + for(row=0;row<16;row++) + *px++=LTCOL(*wSRCPtr++); + + sxm=g_x1&1;sxh=g_x1>>1; + if(sxm) j=g_x1+1; else j=g_x1; + cSRCPtr = psxVub + start + (2048*g_y1) + sxh; + for(column=g_y1;column<=g_y2;column++) + { + cSRCPtr = psxVub + start + (2048*column) + sxh; + + if(sxm) *ta++=*(pa+((*cSRCPtr++ >> 4) & 0xF)); + + for(row=j;row<=g_x2;row++) + { + *ta++=*(pa+(*cSRCPtr & 0xF)); row++; + if(row<=g_x2) *ta++=*(pa+((*cSRCPtr >> 4) & 0xF)); + cSRCPtr++; + } + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // 8bit texture load .. + case 1: + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + + row=64;do + { + *px =LTCOL(*wSRCPtr); + *(px+1)=LTCOL(*(wSRCPtr+1)); + *(px+2)=LTCOL(*(wSRCPtr+2)); + *(px+3)=LTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + for(TXV=g_y1;TXV<=g_y2;TXV++) + { + for(TXU=g_x1;TXU<=g_x2;TXU++) + { + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + *ta++=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x01 ) << 3 ) ) & 0xff)); + } + } + + DefineTextureWnd(); + + break; + } + + start=((pageid-16*pmult)*128)+256*2048*pmult; + + // not using a lookup table here... speeds up smaller texture areas + cSRCPtr = psxVub + start + (2048*g_y1) + g_x1; + LineOffset = 2048 - (g_x2-g_x1+1); + + for(column=g_y1;column<=g_y2;column++) + { + for(row=g_x1;row<=g_x2;row++) + *ta++=LTCOL(psxVuw[palstart+ *cSRCPtr++]); + cSRCPtr+=LineOffset; + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // 16bit texture load .. + case 2: + start=((pageid-16*pmult)*64)+256*1024*pmult; + + wSRCPtr = psxVuw + start + (1024*g_y1) + g_x1; + LineOffset = 1024 - (g_x2-g_x1+1); + + for(column=g_y1;column<=g_y2;column++) + { + for(row=g_x1;row<=g_x2;row++) + *ta++=LTCOL(*wSRCPtr++); + wSRCPtr+=LineOffset; + } + + DefineTextureWnd(); + break; + //--------------------------------------------------// + // others are not possible ! + } +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +void UploadTexWndPal(int mode,short cx,short cy) +{ + unsigned int i,iSize; + unsigned short *wSrcPtr; + uint32_t *ta = (uint32_t *)texturepart; + + wSrcPtr = psxVuw + cx + (cy * 1024); + if (mode == 0) i = 4; else i = 64; + iSize = i << 2; + ubOpaqueDraw = 0; + + do + { + *ta =PALCOL(*wSrcPtr); + *(ta+1)=PALCOL(*(wSrcPtr+1)); + *(ta+2)=PALCOL(*(wSrcPtr+2)); + *(ta+3)=PALCOL(*(wSrcPtr+3)); + ta+=4;wSrcPtr+=4;i--; + } + while(i); + + (*glColorTableEXTEx)(GL_TEXTURE_2D,GL_RGBA8,iSize, + GL_RGBA,GL_UNSIGNED_BYTE,texturepart); +} + +//////////////////////////////////////////////////////////////////////// + +void DefinePalTextureWnd(void) +{ + if(gTexName==0) + glGenTextures(1, &gTexName); + + glBindTexture(GL_TEXTURE_2D, gTexName); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + + if(iFilterType && iFilterType<3 && iHiResTextures!=2) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + } + else + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + } + + glTexImage2D(GL_TEXTURE_2D, 0,GL_COLOR_INDEX8_EXT, + TWin.Position.x1, + TWin.Position.y1, + 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE,texturepart); +} + +/////////////////////////////////////////////////////// + +void LoadPalWndTexturePage(int pageid, int mode, short cx, short cy) +{ + uint32_t start,row,column,j,sxh,sxm; + unsigned char *ta; + unsigned char *cSRCPtr; + uint32_t LineOffset; + int pmult = pageid / 16; + + ta = (unsigned char *)texturepart; + + switch (mode) + { + //--------------------------------------------------// + // 4bit texture load .. + case 0: + start=((pageid-16*pmult)*128)+256*2048*pmult; + + sxm=g_x1&1;sxh=g_x1>>1; + if(sxm) j=g_x1+1; else j=g_x1; + cSRCPtr = psxVub + start + (2048*g_y1) + sxh; + for(column=g_y1;column<=g_y2;column++) + { + cSRCPtr = psxVub + start + (2048*column) + sxh; + + if(sxm) *ta++=((*cSRCPtr++ >> 4) & 0xF); + + for(row=j;row<=g_x2;row++) + { + *ta++=(*cSRCPtr & 0xF); row++; + if(row<=g_x2) *ta++=((*cSRCPtr >> 4) & 0xF); + cSRCPtr++; + } + } + + DefinePalTextureWnd(); + break; + //--------------------------------------------------// + // 8bit texture load .. + case 1: + start=((pageid-16*pmult)*128)+256*2048*pmult; + + // not using a lookup table here... speeds up smaller texture areas + cSRCPtr = psxVub + start + (2048*g_y1) + g_x1; + LineOffset = 2048 - (g_x2-g_x1+1); + + for(column=g_y1;column<=g_y2;column++) + { + for(row=g_x1;row<=g_x2;row++) + *ta++=*cSRCPtr++; + cSRCPtr+=LineOffset; + } + + DefinePalTextureWnd(); + break; + } + UploadTexWndPal(mode,cx,cy); +} + +//////////////////////////////////////////////////////////////////////// + +void LoadStretchPalWndTexturePage(int pageid, int mode, short cx, short cy) +{ + uint32_t start,row,column,j,sxh,sxm,ldx,ldy,ldxo; + unsigned char *ta,s; + unsigned char *cSRCPtr,*cOSRCPtr; + uint32_t LineOffset; + int pmult = pageid / 16; + + ldxo = TWin.Position.x1-TWin.OPosition.x1; + ldy = TWin.Position.y1-TWin.OPosition.y1; + + ta = (unsigned char *)texturepart; + + switch (mode) + { + //--------------------------------------------------// + // 4bit texture load .. + case 0: + start=((pageid-16*pmult)*128)+256*2048*pmult; + + sxm=g_x1&1;sxh=g_x1>>1; + if(sxm) j=g_x1+1; else j=g_x1; + cSRCPtr = psxVub + start + (2048*g_y1) + sxh; + for(column=g_y1;column<=g_y2;column++) + { + cOSRCPtr=cSRCPtr;ldx=ldxo; + if(sxm) *ta++=((*cSRCPtr++ >> 4) & 0xF); + + for(row=j;row<=g_x2-ldxo;row++) + { + s=(*cSRCPtr & 0xF); + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + row++; + if(row<=g_x2-ldxo) + { + s=((*cSRCPtr >> 4) & 0xF); + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + } + cSRCPtr++; + } + if(ldy && column&1) + {ldy--;cSRCPtr = cOSRCPtr;} + else cSRCPtr = psxVub + start + (2048*(column+1)) + sxh; + } + + DefinePalTextureWnd(); + break; + //--------------------------------------------------// + // 8bit texture load .. + case 1: + start=((pageid-16*pmult)*128)+256*2048*pmult; + + cSRCPtr = psxVub + start + (2048*g_y1) + g_x1; + LineOffset = 2048 - (g_x2-g_x1+1) +ldxo; + + for(column=g_y1;column<=g_y2;column++) + { + cOSRCPtr=cSRCPtr;ldx=ldxo; + for(row=g_x1;row<=g_x2-ldxo;row++) + { + s=*cSRCPtr++; + *ta++=s; + if(ldx) {*ta++=s;ldx--;} + } + if(ldy && column&1) {ldy--;cSRCPtr=cOSRCPtr;} + else cSRCPtr+=LineOffset; + } + + DefinePalTextureWnd(); + break; + } + UploadTexWndPal(mode,cx,cy); +} + +//////////////////////////////////////////////////////////////////////// +// tex window: main selecting, cache handler included +//////////////////////////////////////////////////////////////////////// + +GLuint LoadTextureWnd(int pageid, int TextureMode, uint32_t GivenClutId) +{ + textureWndCacheEntry *ts, *tsx = NULL; + int i; + short cx,cy; + EXLong npos; + + npos.c[3] = TWin.Position.x0; + npos.c[2] = TWin.OPosition.x1; + npos.c[1] = TWin.Position.y0; + npos.c[0] = TWin.OPosition.y1; + + g_x1 = TWin.Position.x0; g_x2 = g_x1 + TWin.Position.x1 - 1; + g_y1 = TWin.Position.y0; g_y2 = g_y1 + TWin.Position.y1 - 1; + + if (TextureMode == 2) { GivenClutId = 0; cx = cy = 0; } + else + { + cx = ((GivenClutId << 4) & 0x3F0); + cy = ((GivenClutId >> 6) & CLUTYMASK); + GivenClutId = (GivenClutId & CLUTMASK) | (DrawSemiTrans << 30); + + // palette check sum + { + uint32_t l = 0,row; + uint32_t *lSRCPtr = (uint32_t *)(psxVuw + cx + (cy * 1024)); + if(TextureMode==1) for(row=1;row<129;row++) l+=((*lSRCPtr++)-1)*row; + else for(row=1;row<9;row++) l+=((*lSRCPtr++)-1)<used) + { + if(ts->pos.l==npos.l && + ts->pageid==pageid && + ts->textureMode==TextureMode) + { + if(ts->ClutID==GivenClutId) + { + ubOpaqueDraw=ts->Opaque; + return ts->texname; + } + else if(glColorTableEXTEx && TextureMode!=2) + { + ts->ClutID=GivenClutId; + if(ts->texname!=gTexName) + { + gTexName=ts->texname; + glBindTexture(GL_TEXTURE_2D, gTexName); + } + UploadTexWndPal(TextureMode,cx,cy); + ts->Opaque=ubOpaqueDraw; + return gTexName; + } + } + } + else tsx=ts; + } + + if(!tsx) + { + if(iMaxTexWnds==iTexWndLimit) + { + tsx=wcWndtexStore+iTexWndTurn; + iTexWndTurn++; + if(iTexWndTurn==iTexWndLimit) iTexWndTurn=0; + } + else + { + tsx=wcWndtexStore+iMaxTexWnds; + iMaxTexWnds++; + } + } + + gTexName=tsx->texname; + + if(TWin.OPosition.y1==TWin.Position.y1 && + TWin.OPosition.x1==TWin.Position.x1) + { + if(glColorTableEXTEx && TextureMode!=2) + LoadPalWndTexturePage(pageid,TextureMode,cx,cy); + else + if(bGLExt) + LoadPackedWndTexturePage(pageid,TextureMode,cx,cy); + else + LoadWndTexturePage(pageid,TextureMode,cx,cy); + } + else + { + if(glColorTableEXTEx && TextureMode!=2) + LoadStretchPalWndTexturePage(pageid,TextureMode,cx,cy); + else + if(bGLExt) + LoadStretchPackedWndTexturePage(pageid,TextureMode,cx,cy); + else + LoadStretchWndTexturePage(pageid,TextureMode,cx,cy); + } + + tsx->Opaque=ubOpaqueDraw; + tsx->pos.l=npos.l; + tsx->ClutID=GivenClutId; + tsx->pageid=pageid; + tsx->textureMode=TextureMode; + tsx->texname=gTexName; + tsx->used=1; + + return gTexName; +} + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////// +// movie texture: define +//////////////////////////////////////////////////////////////////////// + +void DefinePackedTextureMovie(void) +{ + if(gTexMovieName==0) + { + glGenTextures(1, &gTexMovieName); + gTexName=gTexMovieName; + glBindTexture(GL_TEXTURE_2D, gTexName); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, iClampType); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, iClampType); + + if(!bUseFastMdec) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + } + else + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + } + + glTexImage2D(GL_TEXTURE_2D, 0, //giWantedRGBA, + GL_RGB5_A1, + 256, 256, 0, GL_RGBA, giWantedTYPE, texturepart); + } + else + { + gTexName=gTexMovieName;glBindTexture(GL_TEXTURE_2D, gTexName); + } + + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, + (xrMovieArea.x1-xrMovieArea.x0), + (xrMovieArea.y1-xrMovieArea.y0), + GL_RGBA, + GL_UNSIGNED_SHORT_5_5_5_1_EXT, + texturepart); +} + +//////////////////////////////////////////////////////////////////////// + +void DefineTextureMovie(void) +{ + if(gTexMovieName==0) + { + glGenTextures(1, &gTexMovieName); + gTexName=gTexMovieName; + glBindTexture(GL_TEXTURE_2D, gTexName); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, iClampType); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, iClampType); + + if(!bUseFastMdec) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + } + else + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + } + + glTexImage2D(GL_TEXTURE_2D, 0, giWantedRGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, texturepart); + } + else + { + gTexName=gTexMovieName;glBindTexture(GL_TEXTURE_2D, gTexName); + } + + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, + (xrMovieArea.x1-xrMovieArea.x0), + (xrMovieArea.y1-xrMovieArea.y0), + GL_RGBA, GL_UNSIGNED_BYTE, texturepart); +} + +//////////////////////////////////////////////////////////////////////// +// movie texture: load +//////////////////////////////////////////////////////////////////////// + +#define MRED(x) ((x>>3) & 0x1f) +#define MGREEN(x) ((x>>6) & 0x3e0) +#define MBLUE(x) ((x>>9) & 0x7c00) + +#define XMGREEN(x) ((x>>5) & 0x07c0) +#define XMRED(x) ((x<<8) & 0xf800) +#define XMBLUE(x) ((x>>18) & 0x003e) + +//////////////////////////////////////////////////////////////////////// +// movie texture: load +//////////////////////////////////////////////////////////////////////// + +unsigned char * LoadDirectMovieFast(void) +{ + int row,column; + unsigned int startxy; + + uint32_t *ta=(uint32_t *)texturepart; + + if(PSXDisplay.RGB24) + { + unsigned char * pD; + + startxy=((1024)*xrMovieArea.y0)+xrMovieArea.x0; + + for(column=xrMovieArea.y0;column>9)|0x00010001; + ta+=2;startxy+=2; + } + if(row==sx0) *ta++=(psxVuw[startxy]<<1)|1; + } + } + DefinePackedTextureMovie(); + } + else + { + if(PSXDisplay.RGB24) + { + unsigned char *pD; + uint32_t *ta = (uint32_t *)texturepart; + + startxy=((1024)*xrMovieArea.y0)+xrMovieArea.x0; + + for(column=xrMovieArea.y0;column>9)|1; + } + + *ta++=*(ta-1); + } + if(b_Y) + { + dx=xrMovieArea.x1-xrMovieArea.x0+1; + for(row=xrMovieArea.x0;row>9)|1; + } + } + if(b_Y) + { + dx=xrMovieArea.x1-xrMovieArea.x0; + for(row=xrMovieArea.x0;row1280 || iResY>1024) iFTex=2048; + else + if(iResX>640 || iResY>480) iFTex=1024; + else iFTex=512; + + glGenTextures(1, &gTexFrameName); + gTexName=gTexFrameName; + glBindTexture(GL_TEXTURE_2D, gTexName); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, iClampType); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, iClampType); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + + p=(char *)malloc(iFTex*iFTex*4); + memset(p,0,iFTex*iFTex*4); + glTexImage2D(GL_TEXTURE_2D, 0, 3, iFTex, iFTex, 0, GL_RGB, GL_UNSIGNED_BYTE, p); + free(p); + + glGetError(); + } + else + { + gTexName=gTexFrameName; + glBindTexture(GL_TEXTURE_2D, gTexName); + } + + x1+=PreviousPSXDisplay.Range.x0; + y1+=PreviousPSXDisplay.Range.y0; + + if(PSXDisplay.DisplayMode.x) + ScaleX=(float)rRatioRect.right/(float)PSXDisplay.DisplayMode.x; + else ScaleX=1.0f; + if(PSXDisplay.DisplayMode.y) + ScaleY=(float)rRatioRect.bottom/(float)PSXDisplay.DisplayMode.y; + else ScaleY=1.0f; + + rSrc.left =max(x1*ScaleX,0); + rSrc.right =min((x1+x2)*ScaleX+0.99f,iResX-1); + rSrc.top =max(y1*ScaleY,0); + rSrc.bottom=min((y1+y2)*ScaleY+0.99f,iResY-1); + + iYAdjust=(y1+y2)-PSXDisplay.DisplayMode.y; + if(iYAdjust>0) + iYAdjust=(int)((float)iYAdjust*ScaleY)+1; + else iYAdjust=0; + + gl_vy[0]=255-gl_vy[0]; + gl_vy[1]=255-gl_vy[1]; + gl_vy[2]=255-gl_vy[2]; + gl_vy[3]=255-gl_vy[3]; + + y1=min(gl_vy[0],min(gl_vy[1],min(gl_vy[2],gl_vy[3]))); + + gl_vy[0]-=y1; + gl_vy[1]-=y1; + gl_vy[2]-=y1; + gl_vy[3]-=y1; + gl_ux[0]-=gl_ux[7]; + gl_ux[1]-=gl_ux[7]; + gl_ux[2]-=gl_ux[7]; + gl_ux[3]-=gl_ux[7]; + + ScaleX*=256.0f/((float)(iFTex)); + ScaleY*=256.0f/((float)(iFTex)); + + y1=((float)gl_vy[0]*ScaleY); if(y1>255) y1=255; + gl_vy[0]=y1; + y1=((float)gl_vy[1]*ScaleY); if(y1>255) y1=255; + gl_vy[1]=y1; + y1=((float)gl_vy[2]*ScaleY); if(y1>255) y1=255; + gl_vy[2]=y1; + y1=((float)gl_vy[3]*ScaleY); if(y1>255) y1=255; + gl_vy[3]=y1; + + x1=((float)gl_ux[0]*ScaleX); if(x1>255) x1=255; + gl_ux[0]=x1; + x1=((float)gl_ux[1]*ScaleX); if(x1>255) x1=255; + gl_ux[1]=x1; + x1=((float)gl_ux[2]*ScaleX); if(x1>255) x1=255; + gl_ux[2]=x1; + x1=((float)gl_ux[3]*ScaleX); if(x1>255) x1=255; + gl_ux[3]=x1; + + x1=rSrc.right-rSrc.left; + if(x1<=0) x1=1; + if(x1>iFTex) x1=iFTex; + + y1=rSrc.bottom-rSrc.top; + if(y1<=0) y1=1; + if(y1+iYAdjust>iFTex) y1=iFTex-iYAdjust; + + if(bFakeFrontBuffer) glReadBuffer(GL_FRONT); + + glCopyTexSubImage2D( GL_TEXTURE_2D, 0, + 0, + iYAdjust, + rSrc.left+rRatioRect.left, + iResY-rSrc.bottom-rRatioRect.top, + x1,y1); + + if(glGetError()) + { + char * p=(char *)malloc(iFTex*iFTex*4); + memset(p,0,iFTex*iFTex*4); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, iFTex, iFTex, + GL_RGB, GL_UNSIGNED_BYTE, p); + free(p); + } + + if(bFakeFrontBuffer) + {glReadBuffer(GL_BACK);bIgnoreNextTile=TRUE;} + + ubOpaqueDraw=0; + + if(iSpriteTex) + { + sprtW=gl_ux[1]-gl_ux[0]; + sprtH=-(gl_vy[0]-gl_vy[2]); + } + + return (GLuint)gTexName; +} + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// +// load texture part (unpacked) +// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// + +void LoadSubTexturePageSort(int pageid, int mode, short cx, short cy) +{ + uint32_t start,row,column,j,sxh,sxm; + unsigned int palstart; + uint32_t *px,*pa,*ta; + unsigned char *cSRCPtr; + unsigned short *wSRCPtr; + uint32_t LineOffset; + uint32_t x2a,xalign=0; + uint32_t x1=gl_ux[7]; + uint32_t x2=gl_ux[6]; + uint32_t y1=gl_ux[5]; + uint32_t y2=gl_ux[4]; + uint32_t dx=x2-x1+1; + uint32_t dy=y2-y1+1; + int pmult=pageid/16; + uint32_t (*LTCOL)(uint32_t); + unsigned int a,r,g,b,cnt,h; + uint32_t scol[8]; + + LTCOL=TCF[DrawSemiTrans]; + + pa=px=(uint32_t *)ubPaletteBuffer; + ta=(uint32_t *)texturepart; + palstart=cx+(cy<<10); + + ubOpaqueDraw=0; + + if(YTexS) {ta+=dx;if(XTexS) ta+=2;} + if(XTexS) {ta+=1;xalign=2;} + + switch(mode) + { + //--------------------------------------------------// + // 4bit texture load .. + case 0: + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + + row=4;do + { + *px =LTCOL(*wSRCPtr); + *(px+1)=LTCOL(*(wSRCPtr+1)); + *(px+2)=LTCOL(*(wSRCPtr+2)); + *(px+3)=LTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + for(TXV=y1;TXV<=y2;TXV++) + { + for(TXU=x1;TXU<=x2;TXU++) + { + n_xi = ( ( TXU >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( TXU >> 4 ) & 0xf ); + + *ta++=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x03 ) << 2 ) ) & 0x0f )); + } + ta+=xalign; + } + break; + } + + start=((pageid-16*pmult)<<7)+524288*pmult; + // convert CLUT to 32bits .. and then use THAT as a lookup table + + wSRCPtr=psxVuw+palstart; + + row=4;do + { + *px =LTCOL(*wSRCPtr); + *(px+1)=LTCOL(*(wSRCPtr+1)); + *(px+2)=LTCOL(*(wSRCPtr+2)); + *(px+3)=LTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + x2a=x2?(x2-1):0;//if(x2) x2a=x2-1; else x2a=0; + sxm=x1&1;sxh=x1>>1; + j=sxm?(x1+1):x1;//if(sxm) j=x1+1; else j=x1; + for(column=y1;column<=y2;column++) + { + cSRCPtr = psxVub + start + (column<<11) + sxh; + + if(sxm) *ta++=*(pa+((*cSRCPtr++ >> 4) & 0xF)); + + for(row=j;row> 4) & 0xF)); + cSRCPtr++;ta+=2; + } + + if(row<=x2) + { + *ta++=*(pa+(*cSRCPtr & 0xF)); row++; + if(row<=x2) *ta++=*(pa+((*cSRCPtr >> 4) & 0xF)); + } + + ta+=xalign; + } + + break; + //--------------------------------------------------// + // 8bit texture load .. + case 1: + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + + row=64;do + { + *px =LTCOL(*wSRCPtr); + *(px+1)=LTCOL(*(wSRCPtr+1)); + *(px+2)=LTCOL(*(wSRCPtr+2)); + *(px+3)=LTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + for(TXV=y1;TXV<=y2;TXV++) + { + for(TXU=x1;TXU<=x2;TXU++) + { + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + *ta++=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x01 ) << 3 ) ) & 0xff)); + } + ta+=xalign; + } + + break; + } + + start=((pageid-16*pmult)<<7)+524288*pmult; + + cSRCPtr = psxVub + start + (y1<<11) + x1; + LineOffset = 2048 - dx; + + if(dy*dx>384) + { + wSRCPtr=psxVuw+palstart; + + row=64;do + { + *px =LTCOL(*wSRCPtr); + *(px+1)=LTCOL(*(wSRCPtr+1)); + *(px+2)=LTCOL(*(wSRCPtr+2)); + *(px+3)=LTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + column=dy;do + { + row=dx; + do {*ta++=*(pa+(*cSRCPtr++));row--;} while(row); + ta+=xalign; + cSRCPtr+=LineOffset;column--; + } + while(column); + } + else + { + wSRCPtr=psxVuw+palstart; + + column=dy;do + { + row=dx; + do {*ta++=LTCOL(*(wSRCPtr+*cSRCPtr++));row--;} while(row); + ta+=xalign; + cSRCPtr+=LineOffset;column--; + } + while(column); + } + + break; + //--------------------------------------------------// + // 16bit texture load .. + case 2: + start=((pageid-16*pmult)<<6)+262144*pmult; + + wSRCPtr = psxVuw + start + (y1<<10) + x1; + LineOffset = 1024 - dx; + + column=dy;do + { + row=dx; + do {*ta++=LTCOL(*wSRCPtr++);row--;} while(row); + ta+=xalign; + wSRCPtr+=LineOffset;column--; + } + while(column); + + break; + //--------------------------------------------------// + // others are not possible ! + } + + x2a=dx+xalign; + + if(YTexS) + { + ta=(uint32_t *)texturepart; + pa=(uint32_t *)texturepart+x2a; + row=x2a;do {*ta++=*pa++;row--;} while(row); + pa=(uint32_t *)texturepart+dy*x2a; + ta=pa+x2a; + row=x2a;do {*ta++=*pa++;row--;} while(row); + YTexS--; + dy+=2; + } + + if(XTexS) + { + ta=(uint32_t *)texturepart; + pa=ta+1; + row=dy;do {*ta=*pa;ta+=x2a;pa+=x2a;row--;} while(row); + pa=(uint32_t *)texturepart+dx; + ta=pa+1; + row=dy;do {*ta=*pa;ta+=x2a;pa+=x2a;row--;} while(row); + XTexS--; + dx+=2; + } + + DXTexS=dx;DYTexS=dy; + + if(!iFilterType) {DefineSubTextureSort();return;} + if(iFilterType!=2 && iFilterType!=4 && iFilterType!=6) {DefineSubTextureSort();return;} + if((iFilterType==4 || iFilterType==6) && ly0==ly1 && ly2==ly3 && lx0==lx3 && lx1==lx2) + {DefineSubTextureSort();return;} + + ta=(uint32_t *)texturepart; + x1=dx-1; + y1=dy-1; + + if(bOpaquePass) + { + if(bSmallAlpha) + { + for(column=0;column>24 !=0x03) scol[cnt++]=*(ta-dx); + if(row && *(ta-1) >>24 !=0x03) scol[cnt++]=*(ta-1); + if(row!=x1 && *(ta+1) >>24 !=0x03) scol[cnt++]=*(ta+1); + if( column!=y1 && *(ta+dx) >>24 !=0x03) scol[cnt++]=*(ta+dx); + + if(row && column && *(ta-dx-1)>>24 !=0x03) scol[cnt++]=*(ta-dx-1); + if(row!=x1 && column && *(ta-dx+1)>>24 !=0x03) scol[cnt++]=*(ta-dx+1); + if(row && column!=y1 && *(ta+dx-1)>>24 !=0x03) scol[cnt++]=*(ta+dx-1); + if(row!=x1 && column!=y1 && *(ta+dx+1)>>24 !=0x03) scol[cnt++]=*(ta+dx+1); + + if(cnt) + { + r=g=b=a=0; + for(h=0;h>16)&0xff; + g+=(scol[h]>>8)&0xff; + b+=scol[h]&0xff; + } + r/=cnt;b/=cnt;g/=cnt; + + *ta=(r<<16)|(g<<8)|b; + *ta|=0x03000000; + } + } + ta++; + } + } + } + else + { + for(column=0;column>24!=1) scol[cnt++]=*(ta-dx); + if(row && *(ta-1) !=0x50000000 && *(ta-1)>>24!=1) scol[cnt++]=*(ta-1); + if(row!=x1 && *(ta+1) !=0x50000000 && *(ta+1)>>24!=1) scol[cnt++]=*(ta+1); + if( column!=y1 && *(ta+dx) !=0x50000000 && *(ta+dx)>>24!=1) scol[cnt++]=*(ta+dx); + + if(row && column && *(ta-dx-1)!=0x50000000 && *(ta-dx-1)>>24!=1) scol[cnt++]=*(ta-dx-1); + if(row!=x1 && column && *(ta-dx+1)!=0x50000000 && *(ta-dx+1)>>24!=1) scol[cnt++]=*(ta-dx+1); + if(row && column!=y1 && *(ta+dx-1)!=0x50000000 && *(ta+dx-1)>>24!=1) scol[cnt++]=*(ta+dx-1); + if(row!=x1 && column!=y1 && *(ta+dx+1)!=0x50000000 && *(ta+dx+1)>>24!=1) scol[cnt++]=*(ta+dx+1); + + if(cnt) + { + r=g=b=a=0; + for(h=0;h>24); + r+=(scol[h]>>16)&0xff; + g+=(scol[h]>>8)&0xff; + b+=scol[h]&0xff; + } + r/=cnt;b/=cnt;g/=cnt; + + *ta=(r<<16)|(g<<8)|b; + if(a) *ta|=0x50000000; + else *ta|=0x01000000; + } + } + ta++; + } + } + } + } + else + for(column=0;column>16)&0xff; + g+=(scol[h]>>8)&0xff; + b+=scol[h]&0xff; + } + r/=cnt;b/=cnt;g/=cnt; + *ta=(r<<16)|(g<<8)|b; + } + } + ta++; + } + } + + DefineSubTextureSort(); +} + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// +// load texture part (packed) +// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// + +void LoadPackedSubTexturePageSort(int pageid, int mode, short cx, short cy) +{ + uint32_t start,row,column,j,sxh,sxm; + unsigned int palstart; + unsigned short *px,*pa,*ta; + unsigned char *cSRCPtr; + unsigned short *wSRCPtr; + uint32_t LineOffset; + uint32_t x2a,xalign=0; + uint32_t x1=gl_ux[7]; + uint32_t x2=gl_ux[6]; + uint32_t y1=gl_ux[5]; + uint32_t y2=gl_ux[4]; + uint32_t dx=x2-x1+1; + uint32_t dy=y2-y1+1; + int pmult=pageid/16; + unsigned short (*LPTCOL)(unsigned short); + unsigned int a,r,g,b,cnt,h; + unsigned short scol[8]; + + LPTCOL=PTCF[DrawSemiTrans]; + + pa=px=(unsigned short *)ubPaletteBuffer; + ta=(unsigned short *)texturepart; + palstart=cx+(cy<<10); + + ubOpaqueDraw=0; + + if(YTexS) {ta+=dx;if(XTexS) ta+=2;} + if(XTexS) {ta+=1;xalign=2;} + + switch(mode) + { + //--------------------------------------------------// + // 4bit texture load .. + case 0: + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + row=4;do + { + *px =LPTCOL(*wSRCPtr); + *(px+1)=LPTCOL(*(wSRCPtr+1)); + *(px+2)=LPTCOL(*(wSRCPtr+2)); + *(px+3)=LPTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + for(TXV=y1;TXV<=y2;TXV++) + { + for(TXU=x1;TXU<=x2;TXU++) + { + n_xi = ( ( TXU >> 2 ) & ~0x3c ) + ( ( TXV << 2 ) & 0x3c ); + n_yi = ( TXV & ~0xf ) + ( ( TXU >> 4 ) & 0xf ); + + *ta++=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x03 ) << 2 ) ) & 0x0f )); + } + ta+=xalign; + } + break; + } + + start=((pageid-16*pmult)<<7)+524288*pmult; + + wSRCPtr=psxVuw+palstart; + row=4;do + { + *px =LPTCOL(*wSRCPtr); + *(px+1)=LPTCOL(*(wSRCPtr+1)); + *(px+2)=LPTCOL(*(wSRCPtr+2)); + *(px+3)=LPTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + x2a=x2?(x2-1):0;//if(x2) x2a=x2-1; else x2a=0; + sxm=x1&1;sxh=x1>>1; + j=sxm?(x1+1):x1;//if(sxm) j=x1+1; else j=x1; + + for(column=y1;column<=y2;column++) + { + cSRCPtr = psxVub + start + (column<<11) + sxh; + + if(sxm) *ta++=*(pa+((*cSRCPtr++ >> 4) & 0xF)); + + for(row=j;row> 4) & 0xF)); + cSRCPtr++;ta+=2; + } + + if(row<=x2) + { + *ta++=*(pa+(*cSRCPtr & 0xF));row++; + if(row<=x2) *ta++=*(pa+((*cSRCPtr >> 4) & 0xF)); + } + + ta+=xalign; + } + break; + //--------------------------------------------------// + // 8bit texture load .. + case 1: + if(GlobalTextIL) + { + unsigned int TXV,TXU,n_xi,n_yi; + + wSRCPtr=psxVuw+palstart; + + row=64;do + { + *px =LPTCOL(*wSRCPtr); + *(px+1)=LPTCOL(*(wSRCPtr+1)); + *(px+2)=LPTCOL(*(wSRCPtr+2)); + *(px+3)=LPTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + for(TXV=y1;TXV<=y2;TXV++) + { + for(TXU=x1;TXU<=x2;TXU++) + { + n_xi = ( ( TXU >> 1 ) & ~0x78 ) + ( ( TXU << 2 ) & 0x40 ) + ( ( TXV << 3 ) & 0x38 ); + n_yi = ( TXV & ~0x7 ) + ( ( TXU >> 5 ) & 0x7 ); + + *ta++=*(pa+((*( psxVuw + ((GlobalTextAddrY + n_yi)*1024) + GlobalTextAddrX + n_xi ) >> ( ( TXU & 0x01 ) << 3 ) ) & 0xff)); + } + ta+=xalign; + } + + break; + } + + start=((pageid-16*pmult)<<7)+524288*pmult; + + cSRCPtr = psxVub + start + (y1<<11) + x1; + LineOffset = 2048 - dx; + + if(dy*dx>384) // more pix? use lut + { + wSRCPtr=psxVuw+palstart; + + row=64;do + { + *px =LPTCOL(*wSRCPtr); + *(px+1)=LPTCOL(*(wSRCPtr+1)); + *(px+2)=LPTCOL(*(wSRCPtr+2)); + *(px+3)=LPTCOL(*(wSRCPtr+3)); + row--;px+=4;wSRCPtr+=4; + } + while (row); + + column=dy;do + { + row=dx; + do {*ta++=*(pa+(*cSRCPtr++));row--;} while(row); + + ta+=xalign; + + cSRCPtr+=LineOffset;column--; + } + while(column); + } + else // small area? no lut + { + wSRCPtr=psxVuw+palstart; + + column=dy;do + { + row=dx; + do {*ta++=LPTCOL(*(wSRCPtr+*cSRCPtr++));row--;} while(row); + + ta+=xalign; + + cSRCPtr+=LineOffset;column--; + } + while(column); + } + break; + //--------------------------------------------------// + // 16bit texture load .. + case 2: + start=((pageid-16*pmult)<<6)+262144*pmult; + + wSRCPtr = psxVuw + start + (y1<<10) + x1; + LineOffset = 1024 - dx; + + column=dy;do + { + row=dx; + do {*ta++=LPTCOL(*wSRCPtr++);row--;} while(row); + + ta+=xalign; + + wSRCPtr+=LineOffset;column--; + } + while(column); + break; + //--------------------------------------------------// + // others are not possible ! + } + + //////////////////////////////////////////////////////// + + x2a=dx+xalign; + + if(YTexS) + { + ta=(unsigned short *)texturepart; + pa=(unsigned short *)texturepart+x2a; + row=x2a;do {*ta++=*pa++;row--;} while(row); + + pa=(unsigned short *)texturepart+dy*x2a; + ta=pa+x2a; + row=x2a;do {*ta++=*pa++;row--;} while(row); + + YTexS--; + dy+=2; + } + + if(XTexS) + { + ta=(unsigned short *)texturepart; + pa=ta+1; + row=dy;do {*ta=*pa;ta+=x2a;pa+=x2a;row--;} while(row); + + pa=(unsigned short *)texturepart+dx; + ta=pa+1; + row=dy;do {*ta=*pa;ta+=x2a;pa+=x2a;row--;} while(row); + + XTexS--; + dx+=2; + } + + DXTexS=dx;DYTexS=dy; + + if(!iFilterType) {DefineSubTextureSort();return;} + if(iFilterType!=2 && iFilterType!=4 && iFilterType!=6) {DefineSubTextureSort();return;} + if((iFilterType==4 || iFilterType==6) && ly0==ly1 && ly2==ly3 && lx0==lx3 && lx1==lx2) + {DefineSubTextureSort();return;} + + ta=(unsigned short *)texturepart; + x1=dx-1; + y1=dy-1; + + if(iTexQuality==1) + + { + if(bOpaquePass) + for(column=0;column>12; + g+=(scol[h]>>8)&0xf; + b+=(scol[h]>>4)&0xf; + } + r/=cnt;b/=cnt;g/=cnt; + *ta=(r<<12)|(g<<8)|(b<<4); + if(a) *ta|=6; + else *ta=0; + } + } + ta++; + } + } + else + for(column=0;column>12; + g+=(scol[h]>>8)&0xf; + b+=(scol[h]>>4)&0xf; + } + r/=cnt;b/=cnt;g/=cnt; + *ta=(r<<12)|(g<<8)|(b<<4); + } + } + ta++; + } + } + } + else + { + for(column=0;column>11; + g+=(scol[h]>>6)&0x1f; + b+=(scol[h]>>1)&0x1f; + } + r/=cnt;b/=cnt;g/=cnt; + *ta=(r<<11)|(g<<6)|(b<<1); + } + } + ta++; + } + } + } + + DefineSubTextureSort(); +} + +///////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// +// hires texture funcs +// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// + + +#define GET_RESULT(A, B, C, D) ((A != C || A != D) - (B != C || B != D)) + +//////////////////////////////////////////////////////////////////////// + +#define colorMask8 0x00FEFEFE +#define lowPixelMask8 0x00010101 +#define qcolorMask8 0x00FCFCFC +#define qlowpixelMask8 0x00030303 + + +#define INTERPOLATE8_02(A, B) (((((A & colorMask8) >> 1) + ((B & colorMask8) >> 1) + (A & B & lowPixelMask8))|((((A&0xFF000000)==0x03000000)?0x03000000:(((B&0xFF000000)==0x03000000)?0x03000000:(((A&0xFF000000)==0x00000000)?0x00000000:(((B&0xFF000000)==0x00000000)?0x00000000:0xFF000000))))))) + +#define Q_INTERPOLATE8_02(A, B, C, D) (((((A & qcolorMask8) >> 2) + ((B & qcolorMask8) >> 2) + ((C & qcolorMask8) >> 2) + ((D & qcolorMask8) >> 2) + ((((A & qlowpixelMask8) + (B & qlowpixelMask8) + (C & qlowpixelMask8) + (D & qlowpixelMask8)) >> 2) & qlowpixelMask8))|((((A&0xFF000000)==0x03000000)?0x03000000:(((B&0xFF000000)==0x03000000)?0x03000000:(((C&0xFF000000)==0x03000000)?0x03000000:(((D&0xFF000000)==0x03000000)?0x03000000:(((A&0xFF000000)==0x00000000)?0x00000000:(((B&0xFF000000)==0x00000000)?0x00000000:(((C&0xFF000000)==0x00000000)?0x00000000:(((D&0xFF000000)==0x00000000)?0x00000000:0xFF000000))))))))))) + +#define INTERPOLATE8(A, B) (((((A & colorMask8) >> 1) + ((B & colorMask8) >> 1) + (A & B & lowPixelMask8))|((((A&0xFF000000)==0x50000000)?0x50000000:(((B&0xFF000000)==0x50000000)?0x50000000:(((A&0xFF000000)==0x00000000)?0x00000000:(((B&0xFF000000)==0x00000000)?0x00000000:0xFF000000))))))) + +#define Q_INTERPOLATE8(A, B, C, D) (((((A & qcolorMask8) >> 2) + ((B & qcolorMask8) >> 2) + ((C & qcolorMask8) >> 2) + ((D & qcolorMask8) >> 2) + ((((A & qlowpixelMask8) + (B & qlowpixelMask8) + (C & qlowpixelMask8) + (D & qlowpixelMask8)) >> 2) & qlowpixelMask8))|((((A&0xFF000000)==0x50000000)?0x50000000:(((B&0xFF000000)==0x50000000)?0x50000000:(((C&0xFF000000)==0x50000000)?0x50000000:(((D&0xFF000000)==0x50000000)?0x50000000:(((A&0xFF000000)==0x00000000)?0x00000000:(((B&0xFF000000)==0x00000000)?0x00000000:(((C&0xFF000000)==0x00000000)?0x00000000:(((D&0xFF000000)==0x00000000)?0x00000000:0xFF000000))))))))))) + +void Super2xSaI_ex8_Ex(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch * 2; + DWORD line; + DWORD *dP; + DWORD *bP; + int width2 = width*2; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA0, colorA1, colorA2, colorA3, + colorB0, colorB1, colorB2, colorB3, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + line = 0; + + { + for (; height; height-=1) + { + bP = (DWORD *)srcPtr; + dP = (DWORD *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- B1 B2 +// 4 5 6 S2 +// 1 2 3 S1 +// A1 A2 + if(finish==width) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) iYA=0; + else iYA=width; + if(height>4) {iYB=width;iYC=width2;} + else + if(height>3) {iYB=width;iYC=width;} + else {iYB=0;iYC=0;} + + + colorB0 = *(bP- iYA - iXA); + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + colorB3 = *(bP- iYA + iXC); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA0 = *(bP + iYC - iXA); + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + colorA3 = *(bP + iYC + iXC); + +//-------------------------------------- + if (color2 == color6 && color5 != color3) + { + product2b = product1b = color2; + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1b = color5; + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color1&0x00ffffff), (colorA1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color4&0x00ffffff), (colorB1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorA2&0x00ffffff), (colorS1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorB2&0x00ffffff), (colorS2&0x00ffffff)); + + if (r > 0) + product2b = product1b = color6; + else + if (r < 0) + product2b = product1b = color5; + else + { + product2b = product1b = INTERPOLATE8_02(color5, color6); + } + } + else + { + if (color6 == color3 && color3 == colorA1 && color2 != colorA2 && color3 != colorA0) + product2b = Q_INTERPOLATE8_02 (color3, color3, color3, color2); + else + if (color5 == color2 && color2 == colorA2 && colorA1 != color3 && color2 != colorA3) + product2b = Q_INTERPOLATE8_02 (color2, color2, color2, color3); + else + product2b = INTERPOLATE8_02 (color2, color3); + + if (color6 == color3 && color6 == colorB1 && color5 != colorB2 && color6 != colorB0) + product1b = Q_INTERPOLATE8_02 (color6, color6, color6, color5); + else + if (color5 == color2 && color5 == colorB2 && colorB1 != color6 && color5 != colorB3) + product1b = Q_INTERPOLATE8_02 (color6, color5, color5, color5); + else + product1b = INTERPOLATE8_02 (color5, color6); + } + + if (color5 == color3 && color2 != color6 && color4 == color5 && color5 != colorA2) + product2a = INTERPOLATE8_02(color2, color5); + else + if (color5 == color1 && color6 == color5 && color4 != color2 && color5 != colorA0) + product2a = INTERPOLATE8_02(color2, color5); + else + product2a = color2; + + if (color2 == color6 && color5 != color3 && color1 == color2 && color2 != colorB2) + product1a = INTERPOLATE8_02(color2, color5); + else + if (color4 == color2 && color3 == color2 && color1 != color5 && color2 != colorB0) + product1a = INTERPOLATE8_02(color2, color5); + else + product1a = color5; + + *dP=product1a; + *(dP+1)=product1b; + *(dP+(width2))=product2a; + *(dP+1+(width2))=product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + + +void Super2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch * 2; + DWORD line; + DWORD *dP; + DWORD *bP; + int width2 = width*2; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA0, colorA1, colorA2, colorA3, + colorB0, colorB1, colorB2, colorB3, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + line = 0; + + { + for (; height; height-=1) + { + bP = (DWORD *)srcPtr; + dP = (DWORD *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- B1 B2 +// 4 5 6 S2 +// 1 2 3 S1 +// A1 A2 + if(finish==width) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) iYA=0; + else iYA=width; + if(height>4) {iYB=width;iYC=width2;} + else + if(height>3) {iYB=width;iYC=width;} + else {iYB=0;iYC=0;} + + + colorB0 = *(bP- iYA - iXA); + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + colorB3 = *(bP- iYA + iXC); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA0 = *(bP + iYC - iXA); + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + colorA3 = *(bP + iYC + iXC); + +//-------------------------------------- + if (color2 == color6 && color5 != color3) + { + product2b = product1b = color2; + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1b = color5; + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color1&0x00ffffff), (colorA1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (color4&0x00ffffff), (colorB1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorA2&0x00ffffff), (colorS1&0x00ffffff)); + r += GET_RESULT ((color6&0x00ffffff), (color5&0x00ffffff), (colorB2&0x00ffffff), (colorS2&0x00ffffff)); + + if (r > 0) + product2b = product1b = color6; + else + if (r < 0) + product2b = product1b = color5; + else + { + product2b = product1b = INTERPOLATE8(color5, color6); + } + } + else + { + if (color6 == color3 && color3 == colorA1 && color2 != colorA2 && color3 != colorA0) + product2b = Q_INTERPOLATE8 (color3, color3, color3, color2); + else + if (color5 == color2 && color2 == colorA2 && colorA1 != color3 && color2 != colorA3) + product2b = Q_INTERPOLATE8 (color2, color2, color2, color3); + else + product2b = INTERPOLATE8 (color2, color3); + + if (color6 == color3 && color6 == colorB1 && color5 != colorB2 && color6 != colorB0) + product1b = Q_INTERPOLATE8 (color6, color6, color6, color5); + else + if (color5 == color2 && color5 == colorB2 && colorB1 != color6 && color5 != colorB3) + product1b = Q_INTERPOLATE8 (color6, color5, color5, color5); + else + product1b = INTERPOLATE8 (color5, color6); + } + + if (color5 == color3 && color2 != color6 && color4 == color5 && color5 != colorA2) + product2a = INTERPOLATE8(color2, color5); + else + if (color5 == color1 && color6 == color5 && color4 != color2 && color5 != colorA0) + product2a = INTERPOLATE8(color2, color5); + else + product2a = color2; + + if (color2 == color6 && color5 != color3 && color1 == color2 && color2 != colorB2) + product1a = INTERPOLATE8(color2, color5); + else + if (color4 == color2 && color3 == color2 && color1 != color5 && color2 != colorB0) + product1a = INTERPOLATE8(color2, color5); + else + product1a = color5; + + *dP=product1a; + *(dP+1)=product1b; + *(dP+(width2))=product2a; + *(dP+1+(width2))=product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} +///////////////////////////////////////////////////////////////////////////// + +#define colorMask4 0x0000EEE0 +#define lowPixelMask4 0x00001110 +#define qcolorMask4 0x0000CCC0 +#define qlowpixelMask4 0x00003330 + +#define INTERPOLATE4(A, B) ((((A & colorMask4) >> 1) + ((B & colorMask4) >> 1) + (A & B & lowPixelMask4))|((((A&0x0000000F)==0x00000006)?0x00000006:(((B&0x0000000F)==0x00000006)?0x00000006:(((A&0x0000000F)==0x00000000)?0x00000000:(((B&0x0000000F)==0x00000000)?0x00000000:0x0000000F)))))) + +#define Q_INTERPOLATE4(A, B, C, D) ((((A & qcolorMask4) >> 2) + ((B & qcolorMask4) >> 2) + ((C & qcolorMask4) >> 2) + ((D & qcolorMask4) >> 2) + ((((A & qlowpixelMask4) + (B & qlowpixelMask4) + (C & qlowpixelMask4) + (D & qlowpixelMask4)) >> 2) & qlowpixelMask4))| ((((A&0x0000000F)==0x00000006)?0x00000006:(((B&0x0000000F)==0x00000006)?0x00000006:(((C&0x0000000F)==0x00000006)?0x00000006:(((D&0x0000000F)==0x00000006)?0x00000006:(((A&0x0000000F)==0x00000000)?0x00000000:(((B&0x0000000F)==0x00000000)?0x00000000:(((C&0x0000000F)==0x00000000)?0x00000000:(((D&0x0000000F)==0x00000000)?0x00000000:0x0000000F)))))))))) + +void Super2xSaI_ex4(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch * 2; + DWORD line; + unsigned short *dP; + unsigned short *bP; + int width2 = width*2; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA0, colorA1, colorA2, colorA3, + colorB0, colorB1, colorB2, colorB3, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + line = 0; + + { + for (; height; height-=1) + { + bP = (unsigned short *)srcPtr; + dP = (unsigned short *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- B1 B2 +// 4 5 6 S2 +// 1 2 3 S1 +// A1 A2 + if(finish==width) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) iYA=0; + else iYA=width; + if(height>4) {iYB=width;iYC=width2;} + else + if(height>3) {iYB=width;iYC=width;} + else {iYB=0;iYC=0;} + + + colorB0 = *(bP- iYA - iXA); + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + colorB3 = *(bP- iYA + iXC); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA0 = *(bP + iYC - iXA); + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + colorA3 = *(bP + iYC + iXC); + +//-------------------------------------- + if (color2 == color6 && color5 != color3) + { + product2b = product1b = color2; + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1b = color5; + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6&0xfffffff0), (color5&0xfffffff0), (color1&0xfffffff0), (colorA1&0xfffffff0)); + r += GET_RESULT ((color6&0xfffffff0), (color5&0xfffffff0), (color4&0xfffffff0), (colorB1&0xfffffff0)); + r += GET_RESULT ((color6&0xfffffff0), (color5&0xfffffff0), (colorA2&0xfffffff0), (colorS1&0xfffffff0)); + r += GET_RESULT ((color6&0xfffffff0), (color5&0xfffffff0), (colorB2&0xfffffff0), (colorS2&0xfffffff0)); + + if (r > 0) + product2b = product1b = color6; + else + if (r < 0) + product2b = product1b = color5; + else + { + product2b = product1b = INTERPOLATE4 (color5, color6); + } + } + else + { + if (color6 == color3 && color3 == colorA1 && color2 != colorA2 && color3 != colorA0) + product2b = Q_INTERPOLATE4 (color3, color3, color3, color2); + else + if (color5 == color2 && color2 == colorA2 && colorA1 != color3 && color2 != colorA3) + product2b = Q_INTERPOLATE4 (color2, color2, color2, color3); + else + product2b = INTERPOLATE4 (color2, color3); + + if (color6 == color3 && color6 == colorB1 && color5 != colorB2 && color6 != colorB0) + product1b = Q_INTERPOLATE4 (color6, color6, color6, color5); + else + if (color5 == color2 && color5 == colorB2 && colorB1 != color6 && color5 != colorB3) + product1b = Q_INTERPOLATE4 (color6, color5, color5, color5); + else + product1b = INTERPOLATE4 (color5, color6); + } + + if (color5 == color3 && color2 != color6 && color4 == color5 && color5 != colorA2) + product2a = INTERPOLATE4 (color2, color5); + else + if (color5 == color1 && color6 == color5 && color4 != color2 && color5 != colorA0) + product2a = INTERPOLATE4(color2, color5); + else + product2a = color2; + + if (color2 == color6 && color5 != color3 && color1 == color2 && color2 != colorB2) + product1a = INTERPOLATE4 (color2, color5); + else + if (color4 == color2 && color3 == color2 && color1 != color5 && color2 != colorB0) + product1a = INTERPOLATE4(color2, color5); + else + product1a = color5; + + *dP=product1a; + *(dP+1)=product1b; + *(dP+(width2))=product2a; + *(dP+1+(width2))=product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +///////////////////////////////////////////////////////////////////////////// + +#define colorMask5 0x0000F7BC +#define lowPixelMask5 0x00000842 +#define qcolorMask5 0x0000E738 +#define qlowpixelMask5 0x000018C6 + +#define INTERPOLATE5(A, B) ((((A & colorMask5) >> 1) + ((B & colorMask5) >> 1) + (A & B & lowPixelMask5))|((((A&0x00000001)==0x00000000)?0x00000000:(((B&0x00000001)==0x00000000)?0x00000000:0x00000001)))) + +#define Q_INTERPOLATE5(A, B, C, D) ((((A & qcolorMask5) >> 2) + ((B & qcolorMask5) >> 2) + ((C & qcolorMask5) >> 2) + ((D & qcolorMask5) >> 2) + ((((A & qlowpixelMask5) + (B & qlowpixelMask5) + (C & qlowpixelMask5) + (D & qlowpixelMask5)) >> 2) & qlowpixelMask5))| ((((A&0x00000001)==0x00000000)?0x00000000:(((B&0x00000001)==0x00000000)?0x00000000:(((C&0x00000001)==0x00000000)?0x00000000:(((D&0x00000001)==0x00000000)?0x00000000:0x00000001)))))) + +void Super2xSaI_ex5(unsigned char *srcPtr, DWORD srcPitch, + unsigned char *dstBitmap, int width, int height) +{ + DWORD dstPitch = srcPitch * 2; + DWORD line; + unsigned short *dP; + unsigned short *bP; + int width2 = width*2; + int iXA,iXB,iXC,iYA,iYB,iYC,finish; + DWORD color4, color5, color6; + DWORD color1, color2, color3; + DWORD colorA0, colorA1, colorA2, colorA3, + colorB0, colorB1, colorB2, colorB3, + colorS1, colorS2; + DWORD product1a, product1b, + product2a, product2b; + + line = 0; + + { + for (; height; height-=1) + { + bP = (unsigned short *)srcPtr; + dP = (unsigned short *)(dstBitmap + line*dstPitch); + for (finish = width; finish; finish -= 1 ) + { +//--------------------------------------- B1 B2 +// 4 5 6 S2 +// 1 2 3 S1 +// A1 A2 + if(finish==width) iXA=0; + else iXA=1; + if(finish>4) {iXB=1;iXC=2;} + else + if(finish>3) {iXB=1;iXC=1;} + else {iXB=0;iXC=0;} + if(line==0) iYA=0; + else iYA=width; + if(height>4) {iYB=width;iYC=width2;} + else + if(height>3) {iYB=width;iYC=width;} + else {iYB=0;iYC=0;} + + + colorB0 = *(bP- iYA - iXA); + colorB1 = *(bP- iYA); + colorB2 = *(bP- iYA + iXB); + colorB3 = *(bP- iYA + iXC); + + color4 = *(bP - iXA); + color5 = *(bP); + color6 = *(bP + iXB); + colorS2 = *(bP + iXC); + + color1 = *(bP + iYB - iXA); + color2 = *(bP + iYB); + color3 = *(bP + iYB + iXB); + colorS1= *(bP + iYB + iXC); + + colorA0 = *(bP + iYC - iXA); + colorA1 = *(bP + iYC); + colorA2 = *(bP + iYC + iXB); + colorA3 = *(bP + iYC + iXC); + +//-------------------------------------- + if (color2 == color6 && color5 != color3) + { + product2b = product1b = color2; + } + else + if (color5 == color3 && color2 != color6) + { + product2b = product1b = color5; + } + else + if (color5 == color3 && color2 == color6) + { + register int r = 0; + + r += GET_RESULT ((color6&0xfffffffe), (color5&0xfffffffe), (color1&0xfffffffe), (colorA1&0xfffffffe)); + r += GET_RESULT ((color6&0xfffffffe), (color5&0xfffffffe), (color4&0xfffffffe), (colorB1&0xfffffffe)); + r += GET_RESULT ((color6&0xfffffffe), (color5&0xfffffffe), (colorA2&0xfffffffe), (colorS1&0xfffffffe)); + r += GET_RESULT ((color6&0xfffffffe), (color5&0xfffffffe), (colorB2&0xfffffffe), (colorS2&0xfffffffe)); + + if (r > 0) + product2b = product1b = color6; + else + if (r < 0) + product2b = product1b = color5; + else + { + product2b = product1b = INTERPOLATE5 (color5, color6); + } + } + else + { + if (color6 == color3 && color3 == colorA1 && color2 != colorA2 && color3 != colorA0) + product2b = Q_INTERPOLATE5 (color3, color3, color3, color2); + else + if (color5 == color2 && color2 == colorA2 && colorA1 != color3 && color2 != colorA3) + product2b = Q_INTERPOLATE5 (color2, color2, color2, color3); + else + product2b = INTERPOLATE5 (color2, color3); + + if (color6 == color3 && color6 == colorB1 && color5 != colorB2 && color6 != colorB0) + product1b = Q_INTERPOLATE5 (color6, color6, color6, color5); + else + if (color5 == color2 && color5 == colorB2 && colorB1 != color6 && color5 != colorB3) + product1b = Q_INTERPOLATE5 (color6, color5, color5, color5); + else + product1b = INTERPOLATE5 (color5, color6); + } + + if (color5 == color3 && color2 != color6 && color4 == color5 && color5 != colorA2) + product2a = INTERPOLATE5 (color2, color5); + else + if (color5 == color1 && color6 == color5 && color4 != color2 && color5 != colorA0) + product2a = INTERPOLATE5(color2, color5); + else + product2a = color2; + + if (color2 == color6 && color5 != color3 && color1 == color2 && color2 != colorB2) + product1a = INTERPOLATE5(color2, color5); + else + if (color4 == color2 && color3 == color2 && color1 != color5 && color2 != colorB0) + product1a = INTERPOLATE5(color2, color5); + else + product1a = color5; + + *dP=product1a; + *(dP+1)=product1b; + *(dP+(width2))=product2a; + *(dP+1+(width2))=product2b; + + bP += 1; + dP += 2; + }//end of for ( finish= width etc..) + + line += 2; + srcPtr += srcPitch; + }; //endof: for (; height; height--) + } +} + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// +// ogl texture defines +// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// + +void DefineSubTextureSortHiRes(void) +{ + int x,y,dx2; + + if(!gTexName) + { + glGenTextures(1, &gTexName); + glBindTexture(GL_TEXTURE_2D, gTexName); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, iClampType); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, iClampType); + + if(iFilterType) + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + } + else + { + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + } + glTexImage2D(GL_TEXTURE_2D, 0, giWantedRGBA, 512, 512, 0, giWantedFMT, giWantedTYPE, texturebuffer); + } + else glBindTexture(GL_TEXTURE_2D, gTexName); + + if(bGLExt && (iTexQuality==1 || iTexQuality==2)) + { + if(DXTexS < 4 || DYTexS < 4 || iHiResTextures==2) + { + unsigned short * pS,*pD1,*pD2; + dx2=(DXTexS<<1); + pS=(unsigned short *)texturepart; + pD1=(unsigned short *)texturebuffer; + pD2=(unsigned short *)texturebuffer; + pD2+=dx2; + for(y=0;y=iSortTexCnt) LRUCleaned=0; // wrap? wrap! + iC1=LRUCleaned; // range of textures to clean + iC2=LRUCleaned+iC; + + for(iC=iC1;iCl=0; + } + + for(i=0;i<3;i++) // remove all references to that textures + for(j=0;jpos.l; + if(iMax) + do + { + tsb++; + if(tsb->cTexID>=iC1 && tsb->cTexIDClutID=0; + } + while(--iMax); + } + + usLRUTexPage=LRUCleaned; +} + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// +// search cache for existing (already used) parts +// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// + +unsigned char * CheckTextureInSubSCache(int TextureMode, uint32_t GivenClutId, unsigned short * pCache) +{ + textureSubCacheEntryS * tsx, * tsb, *tsg;//, *tse=NULL; + int i,iMax;EXLong npos; + unsigned char cx,cy; + int iC,j,k;uint32_t rx,ry,mx,my; + EXLong * ul=0, * uls; + EXLong rfree; + unsigned char cXAdj,cYAdj; + + npos.l=*((uint32_t *)&gl_ux[4]); + + //--------------------------------------------------------------// + // find matching texturepart first... speed up... + //--------------------------------------------------------------// + + tsg=pscSubtexStore[TextureMode][GlobalTexturePage]; + tsg+=((GivenClutId&CLUTCHK)>>CLUTSHIFT)*SOFFB; + + iMax=tsg->pos.l; + if(iMax) + { + i=iMax; + tsb=tsg+1; + do + { + if(GivenClutId==tsb->ClutID && + (INCHECK(tsb->pos,npos))) + { + { + cx=tsb->pos.c[3]-tsb->posTX; + cy=tsb->pos.c[1]-tsb->posTY; + + gl_ux[0]-=cx; + gl_ux[1]-=cx; + gl_ux[2]-=cx; + gl_ux[3]-=cx; + gl_vy[0]-=cy; + gl_vy[1]-=cy; + gl_vy[2]-=cy; + gl_vy[3]-=cy; + + ubOpaqueDraw=tsb->Opaque; + *pCache=tsb->cTexID; + return NULL; + } + } + tsb++; + } + while(--i); + } + + //----------------------------------------------------// + + cXAdj=1;cYAdj=1; + + rx=(int)gl_ux[6]-(int)gl_ux[7]; + ry=(int)gl_ux[4]-(int)gl_ux[5]; + + tsx=NULL;tsb=tsg+1; + for(i=0;iClutID) {tsx=tsb;break;} + } + + if(!tsx) + { + iMax++; + if(iMax>=SOFFB-2) + { + if(iTexGarbageCollection) // gc mode? + { + if(*pCache==0) + { + dwTexPageComp|=(1<ClutID) + { + if(!tsx) {tsx=tsb;rfree.l=npos.l;} // + else tsb->ClutID=0; + rfree.c[3]=min(rfree.c[3],tsb->pos.c[3]); + rfree.c[2]=max(rfree.c[2],tsb->pos.c[2]); + rfree.c[1]=min(rfree.c[1],tsb->pos.c[1]); + rfree.c[0]=max(rfree.c[0],tsb->pos.c[0]); + MarkFree(tsb); + } + + if(tsx) // 3. if one or more found, create a new rect with bigger size + { + *((uint32_t *)&gl_ux[4])=npos.l=rfree.l; + rx=(int)rfree.c[2]-(int)rfree.c[3]; + ry=(int)rfree.c[0]-(int)rfree.c[1]; + DoTexGarbageCollection(); + + goto ENDLOOP3; + } + } + + iMax=1; + } + tsx=tsg+iMax; + tsg->pos.l=iMax; + } + + //----------------------------------------------------// + // now get a free texture space + //----------------------------------------------------// + + if(iTexGarbageCollection) usLRUTexPage=0; + +ENDLOOP3: + + rx+=3;if(rx>255) {cXAdj=0;rx=255;} + ry+=3;if(ry>255) {cYAdj=0;ry=255;} + + iC=usLRUTexPage; + + for(k=0;kl;ul=uls+1; + + //--------------------------------------------------// + // first time + + if(!iMax) + { + rfree.l=0; + + if(rx>252 && ry>252) + {uls->l=1;ul->l=0xffffffff;ul=0;goto ENDLOOP;} + + if(rx<253) + { + uls->l=uls->l+1; + ul->c[3]=rx; + ul->c[2]=255-rx; + ul->c[1]=0; + ul->c[0]=ry; + ul++; + } + + if(ry<253) + { + uls->l=uls->l+1; + ul->c[3]=0; + ul->c[2]=255; + ul->c[1]=ry; + ul->c[0]=255-ry; + } + ul=0; + goto ENDLOOP; + } + + //--------------------------------------------------// + for(i=0;il!=0xffffffff && + ry<=ul->c[0] && + rx<=ul->c[2]) + { + rfree=*ul; + mx=ul->c[2]-2; + my=ul->c[0]-2; + if(rxc[3]+=rx; + ul->c[2]-=rx; + ul->c[0]=ry; + + for(ul=uls+1,j=0;jl==0xffffffff) break; + + if(jl=uls->l+1; + + ul->c[3]=rfree.c[3]; + ul->c[2]=rfree.c[2]; + ul->c[1]=rfree.c[1]+ry; + ul->c[0]=rfree.c[0]-ry; + } + } + else if(rxc[3]+=rx; + ul->c[2]-=rx; + } + else if(ryc[1]+=ry; + ul->c[0]-=ry; + } + else + { + ul->l=0xffffffff; + } + ul=0; + goto ENDLOOP; + } + } + + //--------------------------------------------------// + + iC++; if(iC>=iSortTexCnt) iC=0; + } + + //----------------------------------------------------// + // check, if free space got + //----------------------------------------------------// + +ENDLOOP: + if(ul) + { + ////////////////////////////////////////////////////// + + { + dwTexPageComp=0; + + for(i=0;i<3;i++) // cleaning up + for(j=0;jpos.l=0; + (tsb+SOFFB)->pos.l=0; + (tsb+SOFFC)->pos.l=0; + (tsb+SOFFD)->pos.l=0; + } + for(i=0;il=0;} + usLRUTexPage=0; + } + + ////////////////////////////////////////////////////// + iC=usLRUTexPage; + uls=pxSsubtexLeft[usLRUTexPage]; + uls->l=0;ul=uls+1; + rfree.l=0; + + if(rx>252 && ry>252) + {uls->l=1;ul->l=0xffffffff;} + else + { + if(rx<253) + { + uls->l=uls->l+1; + ul->c[3]=rx; + ul->c[2]=255-rx; + ul->c[1]=0; + ul->c[0]=ry; + ul++; + } + if(ry<253) + { + uls->l=uls->l+1; + ul->c[3]=0; + ul->c[2]=255; + ul->c[1]=ry; + ul->c[0]=255-ry; + } + } + tsg->pos.l=1;tsx=tsg+1; + } + + rfree.c[3]+=cXAdj; + rfree.c[1]+=cYAdj; + + tsx->cTexID =*pCache=iC; + tsx->pos = npos; + tsx->ClutID = GivenClutId; + tsx->posTX = rfree.c[3]; + tsx->posTY = rfree.c[1]; + + cx=gl_ux[7]-rfree.c[3]; + cy=gl_ux[5]-rfree.c[1]; + + gl_ux[0]-=cx; + gl_ux[1]-=cx; + gl_ux[2]-=cx; + gl_ux[3]-=cx; + gl_vy[0]-=cy; + gl_vy[1]-=cy; + gl_vy[2]-=cy; + gl_vy[3]-=cy; + + XTexS=rfree.c[3]; + YTexS=rfree.c[1]; + + return &tsx->Opaque; +} + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// +// search cache for free place (on compress) +// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// + +BOOL GetCompressTexturePlace(textureSubCacheEntryS * tsx) +{ + int i,j,k,iMax,iC;uint32_t rx,ry,mx,my; + EXLong * ul=0, * uls, rfree; + unsigned char cXAdj=1,cYAdj=1; + + rx=(int)tsx->pos.c[2]-(int)tsx->pos.c[3]; + ry=(int)tsx->pos.c[0]-(int)tsx->pos.c[1]; + + rx+=3;if(rx>255) {cXAdj=0;rx=255;} + ry+=3;if(ry>255) {cYAdj=0;ry=255;} + + iC=usLRUTexPage; + + for(k=0;kl;ul=uls+1; + + //--------------------------------------------------// + // first time + + if(!iMax) + { + rfree.l=0; + + if(rx>252 && ry>252) + {uls->l=1;ul->l=0xffffffff;ul=0;goto TENDLOOP;} + + if(rx<253) + { + uls->l=uls->l+1; + ul->c[3]=rx; + ul->c[2]=255-rx; + ul->c[1]=0; + ul->c[0]=ry; + ul++; + } + + if(ry<253) + { + uls->l=uls->l+1; + ul->c[3]=0; + ul->c[2]=255; + ul->c[1]=ry; + ul->c[0]=255-ry; + } + ul=0; + goto TENDLOOP; + } + + //--------------------------------------------------// + for(i=0;il!=0xffffffff && + ry<=ul->c[0] && + rx<=ul->c[2]) + { + rfree=*ul; + mx=ul->c[2]-2; + my=ul->c[0]-2; + + if(rxc[3]+=rx; + ul->c[2]-=rx; + ul->c[0]=ry; + + for(ul=uls+1,j=0;jl==0xffffffff) break; + + if(jl=uls->l+1; + + ul->c[3]=rfree.c[3]; + ul->c[2]=rfree.c[2]; + ul->c[1]=rfree.c[1]+ry; + ul->c[0]=rfree.c[0]-ry; + } + } + else if(rxc[3]+=rx; + ul->c[2]-=rx; + } + else if(ryc[1]+=ry; + ul->c[0]-=ry; + } + else + { + ul->l=0xffffffff; + } + ul=0; + goto TENDLOOP; + } + } + + //--------------------------------------------------// + + iC++; if(iC>=iSortTexCnt) iC=0; + } + + //----------------------------------------------------// + // check, if free space got + //----------------------------------------------------// + +TENDLOOP: + if(ul) return FALSE; + + rfree.c[3]+=cXAdj; + rfree.c[1]+=cYAdj; + + tsx->cTexID = iC; + tsx->posTX = rfree.c[3]; + tsx->posTY = rfree.c[1]; + + XTexS=rfree.c[3]; + YTexS=rfree.c[1]; + + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// +// compress texture cache (to make place for new texture part, if needed) +// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// + +void CompressTextureSpace(void) +{ + textureSubCacheEntryS * tsx, * tsg, * tsb; + int i,j,k,m,n,iMax;EXLong * ul, r,opos; + short sOldDST=DrawSemiTrans,cx,cy; + int lOGTP=GlobalTexturePage; + uint32_t l,row; + uint32_t *lSRCPtr; + + opos.l=*((uint32_t *)&gl_ux[4]); + + // 1. mark all textures as free + for(i=0;il=0;} + usLRUTexPage=0; + + // 2. compress + for(j=0;j<3;j++) + { + for(k=0;kpos.l=0; + (tsg+SOFFB)->pos.l=0; + (tsg+SOFFC)->pos.l=0; + (tsg+SOFFD)->pos.l=0; + continue; + } + + for(m=0;m<4;m++,tsg+=SOFFB) + { + iMax=tsg->pos.l; + + tsx=tsg+1; + for(i=0;iClutID) + { + r.l=tsx->pos.l; + for(n=i+1,tsb=tsx+1;nClutID==tsb->ClutID) + { + r.c[3]=min(r.c[3],tsb->pos.c[3]); + r.c[2]=max(r.c[2],tsb->pos.c[2]); + r.c[1]=min(r.c[1],tsb->pos.c[1]); + r.c[0]=max(r.c[0],tsb->pos.c[0]); + tsb->ClutID=0; + } + } + +// if(r.l!=tsx->pos.l) + { + cx=((tsx->ClutID << 4) & 0x3F0); + cy=((tsx->ClutID >> 6) & CLUTYMASK); + + if(j!=2) + { + // palette check sum + l=0;lSRCPtr=(uint32_t *)(psxVuw+cx+(cy*1024)); + if(j==1) for(row=1;row<129;row++) l+=((*lSRCPtr++)-1)*row; + else for(row=1;row<9;row++) l+=((*lSRCPtr++)-1)<ClutID&(0x00003fff<<16))) + { + tsx->ClutID=0;continue; + } + } + + tsx->pos.l=r.l; + if(!GetCompressTexturePlace(tsx)) // no place? + { + for(i=0;i<3;i++) // -> clean up everything + for(j=0;jpos.l=0; + (tsb+SOFFB)->pos.l=0; + (tsb+SOFFC)->pos.l=0; + (tsb+SOFFD)->pos.l=0; + } + for(i=0;il=0;} + usLRUTexPage=0; + DrawSemiTrans=sOldDST; + GlobalTexturePage=lOGTP; + *((uint32_t *)&gl_ux[4])=opos.l; + dwTexPageComp=0; + + return; + } + + if(tsx->ClutID&(1<<30)) DrawSemiTrans=1; + else DrawSemiTrans=0; + *((uint32_t *)&gl_ux[4])=r.l; + + gTexName=uiStexturePage[tsx->cTexID]; + LoadSubTexFn(k,j,cx,cy); + uiStexturePage[tsx->cTexID]=gTexName; + tsx->Opaque=ubOpaqueDraw; + } + } + } + + if(iMax) + { + tsx=tsg+iMax; + while(!tsx->ClutID && iMax) {tsx--;iMax--;} + tsg->pos.l=iMax; + } + + } + } + } + + if(dwTexPageComp==0xffffffff) dwTexPageComp=0; + + *((uint32_t *)&gl_ux[4])=opos.l; + GlobalTexturePage=lOGTP; + DrawSemiTrans=sOldDST; +} + +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// +// main entry for searching/creating textures, called from prim.c +// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// + +GLuint SelectSubTextureS(int TextureMode, uint32_t GivenClutId) +{ + unsigned char * OPtr;unsigned short iCache;short cx,cy; + + // sort sow/tow infos for fast access + + unsigned char ma1,ma2,mi1,mi2; + if(gl_ux[0]>gl_ux[1]) {mi1=gl_ux[1];ma1=gl_ux[0];} + else {mi1=gl_ux[0];ma1=gl_ux[1];} + if(gl_ux[2]>gl_ux[3]) {mi2=gl_ux[3];ma2=gl_ux[2];} + else {mi2=gl_ux[2];ma2=gl_ux[3];} + if(mi1>mi2) gl_ux[7]=mi2; + else gl_ux[7]=mi1; + if(ma1>ma2) gl_ux[6]=ma1; + else gl_ux[6]=ma2; + + if(gl_vy[0]>gl_vy[1]) {mi1=gl_vy[1];ma1=gl_vy[0];} + else {mi1=gl_vy[0];ma1=gl_vy[1];} + if(gl_vy[2]>gl_vy[3]) {mi2=gl_vy[3];ma2=gl_vy[2];} + else {mi2=gl_vy[2];ma2=gl_vy[3];} + if(mi1>mi2) gl_ux[5]=mi2; + else gl_ux[5]=mi1; + if(ma1>ma2) gl_ux[4]=ma1; + else gl_ux[4]=ma2; + + // get clut infos in one 32 bit val + + if(TextureMode==2) // no clut here + { + GivenClutId=CLUTUSED|(DrawSemiTrans<<30);cx=cy=0; + + if(iFrameTexType && Fake15BitTexture()) + return (GLuint)gTexName; + } + else + { + cx=((GivenClutId << 4) & 0x3F0); // but here + cy=((GivenClutId >> 6) & CLUTYMASK); + GivenClutId=(GivenClutId&CLUTMASK)|(DrawSemiTrans<<30)|CLUTUSED; + + // palette check sum.. removed MMX asm, this easy func works as well + { + uint32_t l=0,row; + + uint32_t *lSRCPtr = (uint32_t *)(psxVuw+cx+(cy*1024)); + if(TextureMode==1) for(row=1;row<129;row++) l+=((*lSRCPtr++)-1)*row; + else for(row=1;row<9;row++) l+=((*lSRCPtr++)-1)< +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. +# +# - Modified by Owen Taylor to use GETTEXT_PACKAGE +# instead of PACKAGE and to look for po2tbl in ./ not in intl/ +# +# - Modified by jacob berkman to install +# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize + +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = @datadir@ +datarootdir = @datarootdir@ +libdir = @libdir@ +localedir = $(libdir)/locale +gnulocaledir = $(datadir)/locale +gettextsrcdir = $(datadir)/glib-2.0/gettext/po +subdir = po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ + +CC = @CC@ +GENCAT = @GENCAT@ +GMSGFMT = @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = @XGETTEXT@ +MSGMERGE = msgmerge + +DEFS = @DEFS@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ + +INCLUDES = -I.. -I$(top_srcdir)/intl + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +SOURCES = +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ +$(POFILES) $(GMOFILES) $(SOURCES) + +POTFILES = \ + +CATALOGS = @CATALOGS@ +#CATOBJEXT = @CATOBJEXT@ +#INSTOBJEXT = @INSTOBJEXT@ +CATOBJEXT = .gmo +INSTOBJEXT = .mo + +.SUFFIXES: +.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat + +.c.o: + $(COMPILE) $< + +.po.pox: + $(MAKE) $(GETTEXT_PACKAGE).pot + $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -c -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && $(GENCAT) $@ $*.msg + + +all: all-@USE_NLS@ + +all-yes: $(CATALOGS) +all-no: + +$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \ + --add-comments --keyword=_ --keyword=N_ \ + --flag=g_strdup_printf:1:c-format \ + --flag=g_string_printf:2:c-format \ + --flag=g_string_append_printf:2:c-format \ + --flag=g_error_new:3:c-format \ + --flag=g_set_error:4:c-format \ + --flag=g_markup_printf_escaped:1:c-format \ + --flag=g_log:3:c-format \ + --flag=g_print:1:c-format \ + --flag=g_printerr:1:c-format \ + --flag=g_printf:1:c-format \ + --flag=g_fprintf:2:c-format \ + --flag=g_sprintf:2:c-format \ + --flag=g_snprintf:3:c-format \ + --flag=g_scanner_error:2:c-format \ + --flag=g_scanner_warn:2:c-format \ + --files-from=$(srcdir)/POTFILES.in \ + && test ! -f $(GETTEXT_PACKAGE).po \ + || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ + && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ +install-data-no: all +install-data-yes: all + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + case "$$cat" in \ + *.gmo) destdir=$(gnulocaledir);; \ + *) destdir=$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $$dir; \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ + fi; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ + fi; \ + if test -r $$cat.m; then \ + $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ + else \ + if test -r $(srcdir)/$$cat.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$cat.m \ + $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ + else \ + true; \ + fi; \ + fi; \ + done + if test "$(PACKAGE)" = "glib"; then \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ + $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ + rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ + rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ + rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ + done + if test "$(PACKAGE)" = "glib"; then \ + rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ + fi + +check: all + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f $(GMOFILES) + +distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(GETTEXT_PACKAGE).pot + tmpdir=`pwd`; \ + cd $(srcdir); \ + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi; \ + done + +# POTFILES is created from POTFILES.in by stripping comments, empty lines +# and Intltool tags (enclosed in square brackets), and appending a full +# relative path to them +POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ + posrcprefix="../"; \ + fi; \ + rm -f $@-t $@ \ + && (sed -e '/^#/d' \ + -e "s/^\[.*\] +//" \ + -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) + +Makefile: Makefile.in.in ../config.status POTFILES + cd .. \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 00000000..cae3b093 --- /dev/null +++ b/po/Makevars @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = PCSX-df + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = schultz.ryan@gmail.com + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 00000000..d978ccce --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,107 @@ +data/pcsx.glade2 +gui/AboutDlg.c +gui/AboutDlg.h +gui/Cheat.c +gui/Cheat.h +gui/ConfDlg.c +gui/ConfDlg.h +gui/Config.c +gui/DebugMemory.c +gui/DebugMemory.h +gui/Gtk2Gui.c +gui/Linux.h +gui/LnxMain.c +gui/MemcardDlg.c +gui/MemcardDlg.h +gui/nopic.h +gui/Plugin.c +libpcsxcore/cdriso.c +libpcsxcore/cdrom.c +libpcsxcore/cheat.c +libpcsxcore/debug.c +libpcsxcore/decode_xa.c +libpcsxcore/disr3000a.c +libpcsxcore/gte.c +libpcsxcore/mdec.c +libpcsxcore/misc.c +libpcsxcore/plugins.c +libpcsxcore/ppf.c +libpcsxcore/psxbios.c +libpcsxcore/psxcommon.c +libpcsxcore/psxcounters.c +libpcsxcore/psxdma.c +libpcsxcore/psxhle.c +libpcsxcore/psxhw.c +libpcsxcore/psxinterpreter.c +libpcsxcore/psxmem.c +libpcsxcore/r3000a.c +libpcsxcore/sio.c +libpcsxcore/socket.c +libpcsxcore/spu.c +plugins/dfcdrom/cdr.c +plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2 +plugins/dfcdrom/cdrcfg-0.1df/main.c +plugins/dfcdrom/cdr-linux.c +plugins/dfcdrom/cdr-null.c +plugins/dfcdrom/cfg.c +plugins/dfinput/analog.c +plugins/dfinput/cfg.c +plugins/dfinput/cfg-gtk2.c +plugins/dfinput/dfinput.glade2 +plugins/dfinput/pad.c +plugins/dfinput/sdljoy.c +plugins/dfinput/xkb.c +plugins/dfnet/cfg.c +plugins/dfnet/dfnet.c +plugins/dfnet/dfnet.glade2 +plugins/dfnet/dfnet.h +plugins/dfnet/gui.c +plugins/dfnet/unix.c +plugins/dfsound/adsr.c +plugins/dfsound/alsa.c +plugins/dfsound/cfg.c +plugins/dfsound/dma.c +plugins/dfsound/freeze.c +plugins/dfsound/nullsnd.c +plugins/dfsound/oss.c +plugins/dfsound/psemu.c +plugins/dfsound/pulseaudio.c +plugins/dfsound/registers.c +plugins/dfsound/reverb.c +plugins/dfsound/spu.c +plugins/dfsound/spucfg-0.1df/dfsound.glade2 +plugins/dfsound/xa.c +plugins/dfxvideo/cfg.c +plugins/dfxvideo/draw.c +plugins/dfxvideo/fps.c +plugins/dfxvideo/gpu.c +plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 +plugins/dfxvideo/key.c +plugins/dfxvideo/menu.c +plugins/dfxvideo/prim.c +plugins/dfxvideo/soft.c +plugins/dfxvideo/zn.c +plugins/peopsxgl/cfg.c +plugins/peopsxgl/draw.c +plugins/peopsxgl/fps.c +plugins/peopsxgl/gpu.c +plugins/peopsxgl/gpucfg/callbacks.c +plugins/peopsxgl/gpucfg/interface.c +plugins/peopsxgl/gpucfg/main.c +plugins/peopsxgl/gpucfg/support.c +plugins/peopsxgl/key.c +plugins/peopsxgl/menu.c +plugins/peopsxgl/prim.c +plugins/peopsxgl/soft.c +plugins/peopsxgl/texture.c +plugins/bladesio1/gui.c +plugins/bladesio1/settings.c +plugins/bladesio1/settings.h +plugins/bladesio1/sio1.c +plugins/bladesio1/sio1.glade2 +plugins/bladesio1/sio1.h +win32/gui/AboutDlg.c +win32/gui/CheatDlg.c +win32/gui/ConfigurePlugins.c +win32/gui/plugin.c +win32/gui/WndMain.c diff --git a/po/Rules-quot b/po/Rules-quot new file mode 100644 index 00000000..9c2a995e --- /dev/null +++ b/po/Rules-quot @@ -0,0 +1,47 @@ +# Special Makefile rules for English message catalogs with quotation marks. + +DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot + +.SUFFIXES: .insert-header .po-update-en + +en@quot.po-create: + $(MAKE) en@quot.po-update +en@boldquot.po-create: + $(MAKE) en@boldquot.po-update + +en@quot.po-update: en@quot.po-update-en +en@boldquot.po-update: en@boldquot.po-update-en + +.insert-header.po-update-en: + @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ + if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + ll=`echo $$lang | sed -e 's/@.*//'`; \ + LC_ALL=C; export LC_ALL; \ + cd $(srcdir); \ + if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "creation of $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +en@quot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header + +en@boldquot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header + +mostlyclean: mostlyclean-quot +mostlyclean-quot: + rm -f *.insert-header diff --git a/po/boldquot.sed b/po/boldquot.sed new file mode 100644 index 00000000..4b937aa5 --- /dev/null +++ b/po/boldquot.sed @@ -0,0 +1,10 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g +s/“/“/g +s/”/”/g +s/‘/‘/g +s/’/’/g diff --git a/po/en@boldquot.header b/po/en@boldquot.header new file mode 100644 index 00000000..fedb6a06 --- /dev/null +++ b/po/en@boldquot.header @@ -0,0 +1,25 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# +# This catalog furthermore displays the text between the quotation marks in +# bold face, assuming the VT100/XTerm escape sequences. +# diff --git a/po/en@quot.header b/po/en@quot.header new file mode 100644 index 00000000..a9647fc3 --- /dev/null +++ b/po/en@quot.header @@ -0,0 +1,22 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# diff --git a/po/insert-header.sin b/po/insert-header.sin new file mode 100644 index 00000000..b26de01f --- /dev/null +++ b/po/insert-header.sin @@ -0,0 +1,23 @@ +# Sed script that inserts the file called HEADER before the header entry. +# +# At each occurrence of a line starting with "msgid ", we execute the following +# commands. At the first occurrence, insert the file. At the following +# occurrences, do nothing. The distinction between the first and the following +# occurrences is achieved by looking at the hold space. +/^msgid /{ +x +# Test if the hold space is empty. +s/m/m/ +ta +# Yes it was empty. First occurrence. Read the file. +r HEADER +# Output the file's contents by reading the next line. But don't lose the +# current line while doing this. +g +N +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/po/it.gmo b/po/it.gmo new file mode 100644 index 0000000000000000000000000000000000000000..c2413bc9bce129787d0a2fb92ff6290457fcd0f0 GIT binary patch literal 43913 zcmcJY34C5vng6dWg}xxN@5^nWY0@@nk}i}K3Tc)$khCFbOJxf;@B1dX^v(N*cWIKM zprEL@42U4&hA4^)ia2h#Q*lNe2f-a@#2wTTbX3$4$N%?t&bjx!Z<;_I{J)>xeD7KA zxo1DmdCobvKRA59n>~J4?BjVS!gn3vc^mfiyk(1J>vxci^(dHcb`q2hH6)N?06h0_4_T#GZW zb>M@GSTpsQf$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up`g%!Vnpmh+_!rq^u9PwU{b`&@^lbd54ro_AmD*cQnQ`h=<88VfGyMeSER zkP)|PchxKhBAh*gG;h(g%=VA6rsYrp?e6q2`l5%FELD}8^Tt7Ix@h)b>qHAVVfrQW z%GyP>fPOoTP-^x~krpHjeb+s8X&6hq9kjzIu=J>`36XEzH9|$KkU-@t|7`0OK zoeu)j5x?<}~EMZc8J=n5zb-ez2baL0(4s zwgc2CdlGo#jKd*(4P~n)6n}g|$YKuPVKtcaM##Usg literal 0 HcmV?d00001 diff --git a/po/it.po b/po/it.po new file mode 100644 index 00000000..889a7b80 --- /dev/null +++ b/po/it.po @@ -0,0 +1,3143 @@ +# Italian translation of pcsxr +# Copyright (C) 2010 Giovanni Scafora +# This file is distributed under the same license as the pcsxr package. +# Giovanni Scafora , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: pcsxr 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-07-10 14:04+0800\n" +"PO-Revision-Date: 2010-03-15 16:00+0200\n" +"Last-Translator: Giovanni Scafora \n" +"Language-Team: Arch Linux Italian Team \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../win32/gui/AboutDlg.c:26 +msgid "" +"PCSX - A PlayStation Emulator\n" +"\n" +"Original Authors:\n" +"main coder: linuzappz\n" +"co-coders: shadow\n" +"ex-coders: Nocomp, Pete Bernett, nik3d\n" +"Webmaster: AkumaX" +msgstr "" +"PCSX, un emulatore della PlayStation\n" +"\n" +"Autori originari:\n" +"programmatore principale: linuzappz\n" +"co-programmatori: shadow\n" +"ex-programmatori: Nocomp, Pete Bernett, nik3d\n" +"Webmaster: AkumaX" + +#: ../win32/gui/AboutDlg.c:35 +#, fuzzy +msgid "" +"PCSX-df Authors:\n" +"Ryan Schultz, Andrew Burton, Stephen Chao,\n" +"Marcus Comstedt, Stefan Sikora\n" +"\n" +"PCSX-Reloaded By:\n" +"Blade_Arma, Wei Mingzhi, et al.\n" +"\n" +"http://pcsxr.codeplex.com/" +msgstr "" +"Autori di PCSX-df:\n" +"Ryan Schultz, Andrew Burton, Stephen Chao,\n" +"Marcus Comstedt, Stefan Sikora\n" +"\n" +"PCSX-Reloaded di:\n" +"Wei Mingzhi\n" +"\n" +"http://www.codeplex.com/pcsxr" + +#: ../win32/gui/AboutDlg.c:46 ../plugins/peopsxgl/gpucfg/interface.c:831 +msgid "About" +msgstr "Informazioni" + +#: ../win32/gui/AboutDlg.c:48 ../win32/gui/AboutDlg.c:52 +#: ../win32/gui/CheatDlg.c:69 ../win32/gui/CheatDlg.c:119 +#: ../win32/gui/ConfigurePlugins.c:483 ../win32/gui/ConfigurePlugins.c:614 +#: ../win32/gui/WndMain.c:974 ../win32/gui/WndMain.c:1210 +#: ../plugins/peopsxgl/gpucfg/interface.c:130 +#: ../plugins/peopsxgl/gpucfg/interface.c:843 +msgid "OK" +msgstr "OK" + +#: ../win32/gui/AboutDlg.c:49 +msgid "PCSX EMU\n" +msgstr "PCSX EMU\n" + +#: ../win32/gui/CheatDlg.c:51 ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "Yes" +msgstr "Sì" + +#: ../win32/gui/CheatDlg.c:51 ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "No" +msgstr "No" + +#: ../win32/gui/CheatDlg.c:66 ../gui/Cheat.c:194 +msgid "Edit Cheat" +msgstr "Modifica cheat" + +#: ../win32/gui/CheatDlg.c:67 ../win32/gui/CheatDlg.c:117 ../gui/Cheat.c:636 +msgid "Description:" +msgstr "Descrizione:" + +#: ../win32/gui/CheatDlg.c:68 ../win32/gui/CheatDlg.c:118 ../gui/Cheat.c:125 +#: ../gui/Cheat.c:211 +msgid "Cheat Code:" +msgstr "Codice cheat:" + +#: ../win32/gui/CheatDlg.c:70 ../win32/gui/CheatDlg.c:120 +#: ../win32/gui/ConfigurePlugins.c:484 ../win32/gui/ConfigurePlugins.c:615 +#: ../win32/gui/WndMain.c:975 ../win32/gui/WndMain.c:1211 +#: ../plugins/peopsxgl/gpucfg/interface.c:338 +msgid "Cancel" +msgstr "Annulla" + +#: ../win32/gui/CheatDlg.c:91 ../win32/gui/CheatDlg.c:132 ../gui/Cheat.c:155 +#: ../gui/Cheat.c:251 +msgid "Invalid cheat code!" +msgstr "Codice del cheat non valido!" + +#: ../win32/gui/CheatDlg.c:116 ../gui/Cheat.c:109 +msgid "Add New Cheat" +msgstr "Aggiungi un nuovo cheat" + +#: ../win32/gui/CheatDlg.c:166 ../data/pcsx.glade2:2534 +msgid "Edit Cheat Codes" +msgstr "Modifica i codici dei cheat" + +#: ../win32/gui/CheatDlg.c:168 +msgid "&Add Code" +msgstr "&Aggiungi un codice" + +#: ../win32/gui/CheatDlg.c:169 +msgid "&Edit Code" +msgstr "&Modifica un codice" + +#: ../win32/gui/CheatDlg.c:170 +msgid "&Remove Code" +msgstr "&Rimuovi un codice" + +#: ../win32/gui/CheatDlg.c:171 +msgid "&Enable/Disable" +msgstr "&Abilita/Disabilita" + +#: ../win32/gui/CheatDlg.c:172 +msgid "&Load..." +msgstr "&Carica..." + +#: ../win32/gui/CheatDlg.c:173 +msgid "&Save As..." +msgstr "&Salva come..." + +#: ../win32/gui/CheatDlg.c:174 +msgid "&Close" +msgstr "&Chiudi" + +#: ../win32/gui/CheatDlg.c:185 ../gui/Cheat.c:413 +msgid "Description" +msgstr "Descrizione" + +#: ../win32/gui/CheatDlg.c:190 +msgid "Enabled" +msgstr "Abilitato" + +#: ../win32/gui/CheatDlg.c:282 ../win32/gui/CheatDlg.c:311 +msgid "PCSX Cheat Code Files" +msgstr "File del codice dei cheat di PCSX" + +#: ../win32/gui/CheatDlg.c:402 +msgid "Equal Value" +msgstr "Stesso valore" + +#: ../win32/gui/CheatDlg.c:403 +msgid "Not Equal Value" +msgstr "Valore diverso" + +#: ../win32/gui/CheatDlg.c:404 +msgid "Range" +msgstr "Scala" + +#: ../win32/gui/CheatDlg.c:407 +msgid "Increased By" +msgstr "Incrementato da" + +#: ../win32/gui/CheatDlg.c:408 +msgid "Decreased By" +msgstr "Decrementato da" + +#: ../win32/gui/CheatDlg.c:409 +msgid "Increased" +msgstr "Incrementato" + +#: ../win32/gui/CheatDlg.c:410 +msgid "Decreased" +msgstr "Decrementato" + +#: ../win32/gui/CheatDlg.c:411 +msgid "Different" +msgstr "Differente" + +#: ../win32/gui/CheatDlg.c:412 +msgid "No Change" +msgstr "Nessun cambio" + +#: ../win32/gui/CheatDlg.c:448 ../gui/Cheat.c:585 +msgid "Enter the values and start your search." +msgstr "Digita i valori ed inizia la tua ricerca." + +#: ../win32/gui/CheatDlg.c:453 +msgid "No addresses found." +msgstr "Non è stato trovato nessun indirizzo." + +#: ../win32/gui/CheatDlg.c:457 ../gui/Cheat.c:543 +msgid "Too many addresses found." +msgstr "Sono stati trovati troppi indirizzi." + +#: ../win32/gui/CheatDlg.c:466 ../gui/Cheat.c:552 +#, c-format +msgid "%.8X Current: %u (%.2X), Previous: %u (%.2X)" +msgstr "%.8X Attuale: %u (%.2X), Precedente: %u (%.2X)" + +#: ../win32/gui/CheatDlg.c:471 ../gui/Cheat.c:557 +#, c-format +msgid "%.8X Current: %u (%.4X), Previous: %u (%.4X)" +msgstr "%.8X Attuale: %u (%.4X), Precedente: %u (%.4X)" + +#: ../win32/gui/CheatDlg.c:476 ../gui/Cheat.c:562 +#, c-format +msgid "%.8X Current: %u (%.8X), Previous: %u (%.8X)" +msgstr "%.8X Attuale: %u (%.8X), Precedente: %u (%.8X)" + +#: ../win32/gui/CheatDlg.c:492 ../gui/Cheat.c:577 +#, c-format +msgid "Founded Addresses: %d" +msgstr "Indirizzi trovati: %d" + +#: ../win32/gui/CheatDlg.c:504 ../data/pcsx.glade2:2930 +msgid "Freeze" +msgstr "Blocca" + +#: ../win32/gui/CheatDlg.c:505 ../win32/gui/CheatDlg.c:596 +msgid "Address:" +msgstr "Indirizzo:" + +#: ../win32/gui/CheatDlg.c:506 ../win32/gui/CheatDlg.c:597 +#: ../win32/gui/CheatDlg.c:682 ../gui/Cheat.c:647 ../data/pcsx.glade2:2773 +msgid "Value:" +msgstr "Valore:" + +#: ../win32/gui/CheatDlg.c:566 +#, c-format +msgid "Freeze %.8X" +msgstr "Blocca %.8x" + +#: ../win32/gui/CheatDlg.c:595 ../data/pcsx.glade2:2966 +msgid "Modify" +msgstr "Modifica" + +#: ../win32/gui/CheatDlg.c:678 ../gui/Cheat.c:1129 ../data/pcsx.glade2:2703 +msgid "Cheat Search" +msgstr "Cerca cheat" + +#: ../win32/gui/CheatDlg.c:680 ../data/pcsx.glade2:2751 +msgid "Search For:" +msgstr "Cerca per:" + +#: ../win32/gui/CheatDlg.c:681 ../data/pcsx.glade2:2761 +msgid "Data Type:" +msgstr "Tipo di dato:" + +#: ../win32/gui/CheatDlg.c:683 ../data/pcsx.glade2:2785 +msgid "Data Base:" +msgstr "Base di dato:" + +#: ../win32/gui/CheatDlg.c:684 ../data/pcsx.glade2:2845 +msgid "To:" +msgstr "A:" + +#: ../win32/gui/CheatDlg.c:685 +msgid "&Freeze" +msgstr "&Blocca" + +#: ../win32/gui/CheatDlg.c:686 +msgid "&Modify" +msgstr "&Modifica" + +#: ../win32/gui/CheatDlg.c:687 +msgid "&Copy" +msgstr "&Copia" + +#: ../win32/gui/CheatDlg.c:688 +msgid "&Search" +msgstr "&Cerca" + +#: ../win32/gui/CheatDlg.c:689 +msgid "&New Search" +msgstr "&Nuova ricerca" + +#: ../win32/gui/CheatDlg.c:690 +msgid "C&lose" +msgstr "C&hiudi" + +#: ../win32/gui/CheatDlg.c:692 +msgid "8-bit" +msgstr "8-bit" + +#: ../win32/gui/CheatDlg.c:693 +msgid "16-bit" +msgstr "16-bit" + +#: ../win32/gui/CheatDlg.c:694 +msgid "32-bit" +msgstr "32-bit" + +#: ../win32/gui/CheatDlg.c:695 +msgid "Decimal" +msgstr "Decimale" + +#: ../win32/gui/CheatDlg.c:696 +msgid "Hexadecimal" +msgstr "Esadecimale" + +#: ../win32/gui/ConfigurePlugins.c:219 +msgid "Simulate Psx Bios" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:305 +msgid "Configuration not OK!" +msgstr "La configurazione non è corretta!" + +#: ../win32/gui/ConfigurePlugins.c:305 ../gui/Cheat.c:155 ../gui/Cheat.c:251 +#: ../gui/LnxMain.c:418 +msgid "Error" +msgstr "Errore" + +#: ../win32/gui/ConfigurePlugins.c:406 +msgid "This plugin reports that should work correctly" +msgstr "Questo plugin dovrebbe funzionare correttamente" + +#: ../win32/gui/ConfigurePlugins.c:407 +msgid "This plugin reports that should not work correctly" +msgstr "Questo plugin potrebbe non funzionare correttamente" + +#: ../win32/gui/ConfigurePlugins.c:463 +msgid "Select Plugins Directory" +msgstr "Seleziona la cartella dei plugin" + +#: ../win32/gui/ConfigurePlugins.c:472 +msgid "Select Bios Directory" +msgstr "Seleziona la cartella del bios" + +#: ../win32/gui/ConfigurePlugins.c:481 +msgid "Configuration" +msgstr "Configurazione" + +#: ../win32/gui/ConfigurePlugins.c:485 +msgid "Graphics" +msgstr "Video" + +#: ../win32/gui/ConfigurePlugins.c:486 +msgid "First Controller" +msgstr "Primo controller" + +#: ../win32/gui/ConfigurePlugins.c:487 +msgid "Second Controller" +msgstr "Secondo controller" + +#: ../win32/gui/ConfigurePlugins.c:488 +msgid "Sound" +msgstr "Audio" + +#: ../win32/gui/ConfigurePlugins.c:489 +msgid "Cdrom" +msgstr "Cdrom" + +#: ../win32/gui/ConfigurePlugins.c:490 +msgid "Bios" +msgstr "Bios" + +#: ../win32/gui/ConfigurePlugins.c:491 +msgid "Set Bios Directory" +msgstr "Imposta la cartella del bios" + +#: ../win32/gui/ConfigurePlugins.c:492 +msgid "Set Plugins Directory" +msgstr "Imposta la cartella dei plugin" + +#: ../win32/gui/ConfigurePlugins.c:493 ../win32/gui/ConfigurePlugins.c:496 +#: ../win32/gui/ConfigurePlugins.c:499 ../win32/gui/ConfigurePlugins.c:502 +#: ../win32/gui/ConfigurePlugins.c:505 ../win32/gui/ConfigurePlugins.c:617 +msgid "Configure..." +msgstr "Configura..." + +#: ../win32/gui/ConfigurePlugins.c:494 ../win32/gui/ConfigurePlugins.c:497 +#: ../win32/gui/ConfigurePlugins.c:500 ../win32/gui/ConfigurePlugins.c:503 +#: ../win32/gui/ConfigurePlugins.c:506 ../win32/gui/ConfigurePlugins.c:618 +msgid "Test..." +msgstr "Prova..." + +#: ../win32/gui/ConfigurePlugins.c:495 ../win32/gui/ConfigurePlugins.c:498 +#: ../win32/gui/ConfigurePlugins.c:501 ../win32/gui/ConfigurePlugins.c:504 +#: ../win32/gui/ConfigurePlugins.c:507 ../win32/gui/ConfigurePlugins.c:619 +msgid "About..." +msgstr "Informazioni..." + +#: ../win32/gui/ConfigurePlugins.c:612 +msgid "NetPlay Configuration" +msgstr "Configurazione del NetPlay" + +#: ../win32/gui/ConfigurePlugins.c:616 ../plugins/dfnet/gui.c:31 +#: ../plugins/dfnet/gui.c:112 +msgid "NetPlay" +msgstr "NetPlay" + +#: ../win32/gui/ConfigurePlugins.c:620 +msgid "" +"Note: The NetPlay Plugin Directory should be the same as the other Plugins." +msgstr "" +"Nota: la cartella del plugin NetPlay dovrebbe essere la stessa degli altri " +"plugin." + +#: ../win32/gui/plugin.c:90 ../win32/gui/WndMain.c:281 +#, c-format +msgid "*PCSX*: Saved State %d" +msgstr "*PCSX*: è stato salvato lo stato %d" + +#: ../win32/gui/plugin.c:91 ../win32/gui/WndMain.c:282 +#, c-format +msgid "*PCSX*: Error Saving State %d" +msgstr "" +"*PCSX*: si è verificato un errore durante il salvataggio dello stato %d" + +#: ../win32/gui/plugin.c:107 ../win32/gui/WndMain.c:259 +#, c-format +msgid "*PCSX*: Loaded State %d" +msgstr "*PCSX*: è stato caricato lo stato %d" + +#: ../win32/gui/plugin.c:108 ../win32/gui/WndMain.c:260 +#, c-format +msgid "*PCSX*: Error Loading State %d" +msgstr "" +"*PCSX*: si è verificato un errore durante il caricamento dello stato %d" + +#: ../win32/gui/plugin.c:119 +#, c-format +msgid "*PCSX*: Sio Irq Always Enabled" +msgstr "*PCSX*: sio irq è sempre abilitato" + +#: ../win32/gui/plugin.c:120 +#, c-format +msgid "*PCSX*: Sio Irq Not Always Enabled" +msgstr "*PCSX*: sio irq non è sempre abilitato" + +#: ../win32/gui/plugin.c:127 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Enabled" +msgstr "*PCSX*: abilita solo i filmati in bianco e nero" + +#: ../win32/gui/plugin.c:128 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Disabled" +msgstr "*PCSX*: disabilita solo i filmati in bianco e nero" + +#: ../win32/gui/plugin.c:135 +#, c-format +msgid "*PCSX*: Xa Enabled" +msgstr "*PCSX*: abilita Xa" + +#: ../win32/gui/plugin.c:136 +#, c-format +msgid "*PCSX*: Xa Disabled" +msgstr "*PCSX*: disabilita Xa" + +#: ../win32/gui/plugin.c:145 +msgid "*PCSX*: CdRom Case Opened" +msgstr "*PCSX*: il vano del CdRom è aperto" + +#: ../win32/gui/plugin.c:150 +msgid "*PCSX*: CdRom Case Closed" +msgstr "*PCSX*: il vano del CdRom è chiuso" + +#: ../win32/gui/plugin.c:177 +msgid "Connecting..." +msgstr "Connessione in corso..." + +#: ../win32/gui/plugin.c:179 ../win32/gui/plugin.c:186 +#, c-format +msgid "Please wait while connecting... %c\n" +msgstr "Attendere prego, connessione in corso... %c\n" + +#: ../win32/gui/plugin.c:214 +msgid "Error Opening CDR Plugin" +msgstr "Si è verificato un errore durante l'apertura del plugin del CD-ROM" + +#: ../win32/gui/plugin.c:277 +#, c-format +msgid "Error Opening GPU Plugin (%d)" +msgstr "Si è verificato un errore durante l'apertura del plugin della GPU (%d)" + +#: ../win32/gui/plugin.c:279 +#, c-format +msgid "Error Opening SPU Plugin (%d)" +msgstr "Si è verificato un errore durante l'apertura del plugin della SPU (%d)" + +#: ../win32/gui/plugin.c:282 +#, c-format +msgid "Error Opening PAD1 Plugin (%d)" +msgstr "Si è verificato un errore durante l'apertura del plugin del PAD1 (%d)" + +#: ../win32/gui/plugin.c:284 +#, c-format +msgid "Error Opening PAD2 Plugin (%d)" +msgstr "Si è verificato un errore durante l'apertura del plugin del PAD2 (%d)" + +#: ../win32/gui/plugin.c:314 +msgid "Error Closing CDR Plugin" +msgstr "Si è verificato un errore durante la chiusura del plugin del CD-ROM" + +#: ../win32/gui/plugin.c:316 +msgid "Error Closing GPU Plugin" +msgstr "Si è verificato un errore durante la chiusura del plugin della GPU" + +#: ../win32/gui/plugin.c:318 +msgid "Error Closing SPU Plugin" +msgstr "Si è verificato un errore durante la chiusura del plugin della SPU" + +#: ../win32/gui/plugin.c:336 +#, c-format +msgid "CDRinit error: %d" +msgstr "CDRinit errore: %d" + +#: ../win32/gui/plugin.c:338 +#, c-format +msgid "GPUinit error: %d" +msgstr "GPUinit errore: %d" + +#: ../win32/gui/plugin.c:340 +#, c-format +msgid "SPUinit error: %d" +msgstr "SPUinit errore: %d" + +#: ../win32/gui/plugin.c:342 +#, c-format +msgid "PAD1init error: %d" +msgstr "PAD1init errore: %d" + +#: ../win32/gui/plugin.c:344 +#, c-format +msgid "PAD2init error: %d" +msgstr "PAD2init errore: %d" + +#: ../win32/gui/plugin.c:347 +#, c-format +msgid "NETinit error: %d" +msgstr "NETinit errore: %d" + +#: ../win32/gui/WndMain.c:76 +msgid "Arabic" +msgstr "Arabo" + +#: ../win32/gui/WndMain.c:77 +msgid "Catalan" +msgstr "Catalano" + +#: ../win32/gui/WndMain.c:78 +msgid "German" +msgstr "Tedesco" + +#: ../win32/gui/WndMain.c:79 +msgid "Greek" +msgstr "Greco" + +#: ../win32/gui/WndMain.c:80 ../win32/gui/WndMain.c:1566 +#: ../win32/gui/WndMain.c:1568 +msgid "English" +msgstr "Inglese" + +#: ../win32/gui/WndMain.c:81 +msgid "Spanish" +msgstr "Spagnolo" + +#: ../win32/gui/WndMain.c:82 +msgid "French" +msgstr "Francese" + +#: ../win32/gui/WndMain.c:83 +msgid "Italian" +msgstr "Italiano" + +#: ../win32/gui/WndMain.c:84 +msgid "Portuguese" +msgstr "Portoghese" + +#: ../win32/gui/WndMain.c:85 +msgid "Portuguese (Brazilian)" +msgstr "Portoghese (Brasiliano)" + +#: ../win32/gui/WndMain.c:86 +msgid "Romanian" +msgstr "Rumeno" + +#: ../win32/gui/WndMain.c:87 +msgid "Russian" +msgstr "Russo" + +#: ../win32/gui/WndMain.c:88 +msgid "Simplified Chinese" +msgstr "Cinese semplificato" + +#: ../win32/gui/WndMain.c:89 +msgid "Traditional Chinese" +msgstr "Cinese tradizionale" + +#: ../win32/gui/WndMain.c:90 +msgid "Japanese" +msgstr "Giapponese" + +#: ../win32/gui/WndMain.c:91 +msgid "Korean" +msgstr "Coreano" + +#: ../win32/gui/WndMain.c:300 ../win32/gui/WndMain.c:352 +msgid "PCSX State Format" +msgstr "Formato dei salvataggi di PCSX" + +#: ../win32/gui/WndMain.c:327 +#, c-format +msgid "*PCSX*: Loaded State %s" +msgstr "*PCSX*: è stato caricato lo stato %s" + +#: ../win32/gui/WndMain.c:328 +#, c-format +msgid "*PCSX*: Error Loading State %s" +msgstr "" +"*PCSX*: si è verificato un errore durante il caricamento dello stato %s" + +#: ../win32/gui/WndMain.c:379 +#, c-format +msgid "*PCSX*: Saved State %s" +msgstr "*PCSX*: è stato salvato lo stato %s" + +#: ../win32/gui/WndMain.c:380 +#, c-format +msgid "*PCSX*: Error Saving State %s" +msgstr "" +"*PCSX*: si è verificato un errore durante il salvataggio dello stato %s" + +#: ../win32/gui/WndMain.c:429 ../win32/gui/WndMain.c:478 ../gui/Gtk2Gui.c:485 +#: ../gui/Gtk2Gui.c:610 +msgid "The CD does not appear to be a valid Playstation CD" +msgstr "Il CD inserito non sembra essere un valido CD della Playstation" + +#: ../win32/gui/WndMain.c:435 ../win32/gui/WndMain.c:484 ../gui/Gtk2Gui.c:493 +#: ../gui/Gtk2Gui.c:618 +msgid "Could not load CD-ROM!" +msgstr "Impossibile caricare il CD-ROM!" + +#: ../win32/gui/WndMain.c:445 +msgid "Running BIOS is not supported with Internal HLE Bios." +msgstr "L'avvio del BIOS non è supportato dal bios interno HLE." + +#: ../win32/gui/WndMain.c:664 ../gui/MemcardDlg.c:62 +msgid "Title" +msgstr "Titolo" + +#: ../win32/gui/WndMain.c:670 ../gui/MemcardDlg.c:68 +msgid "Status" +msgstr "Stato" + +#: ../win32/gui/WndMain.c:676 +msgid "Game ID" +msgstr "ID del gioco" + +#: ../win32/gui/WndMain.c:682 +msgid "Game" +msgstr "Gioco" + +#: ../win32/gui/WndMain.c:864 +msgid "mid link block" +msgstr "mid link block" + +#: ../win32/gui/WndMain.c:867 +msgid "terminiting link block" +msgstr "terminiting link block" + +#: ../win32/gui/WndMain.c:875 ../gui/MemcardDlg.c:155 ../gui/MemcardDlg.c:260 +msgid "Deleted" +msgstr "Eliminato" + +#: ../win32/gui/WndMain.c:876 ../win32/gui/WndMain.c:879 +#: ../gui/MemcardDlg.c:157 ../gui/MemcardDlg.c:161 ../gui/MemcardDlg.c:262 +#: ../gui/MemcardDlg.c:266 +msgid "Free" +msgstr "Libero" + +#: ../win32/gui/WndMain.c:878 ../gui/MemcardDlg.c:159 ../gui/MemcardDlg.c:264 +msgid "Used" +msgstr "Usato" + +#: ../win32/gui/WndMain.c:972 +msgid "Memcard Manager" +msgstr "Gestore della memory card" + +#: ../win32/gui/WndMain.c:976 ../win32/gui/WndMain.c:979 +msgid "Select Mcd" +msgstr "Seleziona la memory card" + +#: ../win32/gui/WndMain.c:977 ../win32/gui/WndMain.c:980 +msgid "Format Mcd" +msgstr "Formatta la memory card" + +#: ../win32/gui/WndMain.c:978 ../win32/gui/WndMain.c:981 +msgid "Reload Mcd" +msgstr "Ricarica la memory card" + +#: ../win32/gui/WndMain.c:982 +msgid "-> Copy ->" +msgstr "-> Copia ->" + +#: ../win32/gui/WndMain.c:983 +msgid "<- Copy <-" +msgstr "<- Copia <-" + +#: ../win32/gui/WndMain.c:984 +msgid "Paste" +msgstr "Incolla" + +#: ../win32/gui/WndMain.c:985 +msgid "<- Un/Delete" +msgstr "<- Non/Elimina" + +#: ../win32/gui/WndMain.c:986 +msgid "Un/Delete ->" +msgstr "Non/Elimina ->" + +#: ../win32/gui/WndMain.c:988 +msgid "Memory Card 1" +msgstr "Memory card 1" + +#: ../win32/gui/WndMain.c:989 +msgid "Memory Card 2" +msgstr "Memory card 2" + +#: ../win32/gui/WndMain.c:1044 +msgid "Are you sure you want to paste this selection?" +msgstr "Sei sicuro di voler incollare questa selezione?" + +#: ../win32/gui/WndMain.c:1044 ../win32/gui/WndMain.c:1155 +#: ../win32/gui/WndMain.c:1162 +msgid "Confirmation" +msgstr "Conferma" + +#: ../win32/gui/WndMain.c:1155 ../win32/gui/WndMain.c:1162 +msgid "Are you sure you want to format this Memory Card?" +msgstr "Sei sicuro di voler formattare questa memory card?" + +#: ../win32/gui/WndMain.c:1208 +msgid "Cpu Config" +msgstr "Configurazione della Cpu" + +#: ../win32/gui/WndMain.c:1213 +msgid "Disable Xa Decoding" +msgstr "Disabilita il decoding Xa" + +#: ../win32/gui/WndMain.c:1214 +msgid "Sio Irq Always Enabled" +msgstr "Sio irq sempre abilitato" + +#: ../win32/gui/WndMain.c:1215 +msgid "Black && White Movies" +msgstr "Filmati in bianco e nero" + +#: ../win32/gui/WndMain.c:1216 +msgid "Disable Cd audio" +msgstr "Disabilita cd audio" + +#: ../win32/gui/WndMain.c:1217 ../data/pcsx.glade2:1595 +msgid "Autodetect" +msgstr "Rileva automaticamente" + +#: ../win32/gui/WndMain.c:1218 +msgid "Enable Interpreter Cpu" +msgstr "Abilita l'interprete della cpu" + +#: ../win32/gui/WndMain.c:1219 ../data/pcsx.glade2:1451 +msgid "Enable Console Output" +msgstr "Abilita l'output sulla console" + +#: ../win32/gui/WndMain.c:1220 ../data/pcsx.glade2:1401 +msgid "Enable Debugger" +msgstr "Abilita il debugger" + +#: ../win32/gui/WndMain.c:1221 +msgid "Spu Irq Always Enabled" +msgstr "Spu irq sempre abilitato" + +#: ../win32/gui/WndMain.c:1222 ../data/pcsx.glade2:1538 +msgid "Parasite Eve 2, Vandal Hearts 1/2 Fix" +msgstr "Parasite Eve 2, Vandal Hearts 1/2 Fix" + +#: ../win32/gui/WndMain.c:1223 ../data/pcsx.glade2:1553 +msgid "InuYasha Sengoku Battle Fix" +msgstr "InuYasha Sengoku Battle Fix" + +#: ../win32/gui/WndMain.c:1225 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:277 +#: ../plugins/dfinput/dfinput.glade2:448 +msgid "Options" +msgstr "Opzioni" + +#: ../win32/gui/WndMain.c:1226 +msgid "Psx System Type" +msgstr "Regione del sistema" + +#: ../win32/gui/WndMain.c:1330 +msgid "Psx Mcd Format (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)" +msgstr "" +"Formato memory card della psx (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)" + +#: ../win32/gui/WndMain.c:1335 +msgid "Psx Memory Card (*.mcr;*.mc)" +msgstr "Memory card psx (*.mcr;*.mc)" + +#: ../win32/gui/WndMain.c:1340 +msgid "CVGS Memory Card (*.mem;*.vgs)" +msgstr "Memory card CVSG (*.mem;*.vgs)" + +#: ../win32/gui/WndMain.c:1345 +msgid "Bleem Memory Card (*.mcd)" +msgstr "Memory card bleem (*.mcd)" + +#: ../win32/gui/WndMain.c:1350 +msgid "DexDrive Memory Card (*.gme)" +msgstr "Memory card DexDrive (*.gme)" + +#: ../win32/gui/WndMain.c:1355 +msgid "DataDeck Memory Card (*.ddf)" +msgstr "Memory card DataDeck (*.ddf)" + +#: ../win32/gui/WndMain.c:1360 ../win32/gui/WndMain.c:1441 ../gui/Cheat.c:321 +#: ../gui/Gtk2Gui.c:422 ../gui/Gtk2Gui.c:561 +msgid "All Files" +msgstr "Tutti i file" + +#: ../win32/gui/WndMain.c:1399 +msgid "Psx Exe Format" +msgstr "Formato exe della Psx" + +#: ../win32/gui/WndMain.c:1436 +msgid "Psx Isos (*.iso;*.mdf;*.img;*.bin)" +msgstr "ISO della psx (*.iso;*.mdf;*.img;*.bin)" + +#: ../win32/gui/WndMain.c:1512 +msgid "&File" +msgstr "&File" + +#: ../win32/gui/WndMain.c:1513 +msgid "E&xit" +msgstr "E&sci" + +#: ../win32/gui/WndMain.c:1515 +msgid "Run &EXE..." +msgstr "Avvia &EXE..." + +#: ../win32/gui/WndMain.c:1516 +msgid "Run &BIOS" +msgstr "Avvia &BIOS" + +#: ../win32/gui/WndMain.c:1517 +msgid "Run &ISO..." +msgstr "Avvia &ISO..." + +#: ../win32/gui/WndMain.c:1518 +msgid "Run &CD" +msgstr "Avvia &CD" + +#: ../win32/gui/WndMain.c:1520 +msgid "&Emulator" +msgstr "&Emulatore" + +#: ../win32/gui/WndMain.c:1521 +msgid "&States" +msgstr "&Stati" + +#: ../win32/gui/WndMain.c:1523 +msgid "S&witch ISO..." +msgstr "C&ambia ISO..." + +#: ../win32/gui/WndMain.c:1525 +msgid "Re&set" +msgstr "Re&setta" + +#: ../win32/gui/WndMain.c:1526 +msgid "&Run" +msgstr "&Avvia" + +#: ../win32/gui/WndMain.c:1527 +msgid "&Save" +msgstr "&Salva" + +#: ../win32/gui/WndMain.c:1528 +msgid "&Load" +msgstr "&Carica" + +#: ../win32/gui/WndMain.c:1529 ../win32/gui/WndMain.c:1535 +msgid "&Other..." +msgstr "&Altro..." + +#: ../win32/gui/WndMain.c:1530 ../win32/gui/WndMain.c:1536 +msgid "Slot &5" +msgstr "Slot &5" + +#: ../win32/gui/WndMain.c:1531 ../win32/gui/WndMain.c:1537 +msgid "Slot &4" +msgstr "Slot &4" + +#: ../win32/gui/WndMain.c:1532 ../win32/gui/WndMain.c:1538 +msgid "Slot &3" +msgstr "Slot &3" + +#: ../win32/gui/WndMain.c:1533 ../win32/gui/WndMain.c:1539 +msgid "Slot &2" +msgstr "Slot &2" + +#: ../win32/gui/WndMain.c:1534 ../win32/gui/WndMain.c:1540 +msgid "Slot &1" +msgstr "Slot &1" + +#: ../win32/gui/WndMain.c:1542 +msgid "&Configuration" +msgstr "&Configurazione" + +#: ../win32/gui/WndMain.c:1543 +msgid "Cheat &Search..." +msgstr "Cerca &cheat..." + +#: ../win32/gui/WndMain.c:1544 +msgid "Ch&eat Code..." +msgstr "Codice ch&eat..." + +#: ../win32/gui/WndMain.c:1547 +msgid "&Language" +msgstr "&Lingua" + +#: ../win32/gui/WndMain.c:1572 +msgid "&Memory cards..." +msgstr "&Memory card..." + +#: ../win32/gui/WndMain.c:1573 +msgid "C&PU..." +msgstr "C&PU..." + +#: ../win32/gui/WndMain.c:1575 +msgid "&NetPlay..." +msgstr "&NetPlay..." + +#: ../win32/gui/WndMain.c:1577 +msgid "&Controllers..." +msgstr "&Controller..." + +#: ../win32/gui/WndMain.c:1578 +msgid "CD-&ROM..." +msgstr "CD-&ROM..." + +#: ../win32/gui/WndMain.c:1579 +msgid "&Sound..." +msgstr "&Audio..." + +#: ../win32/gui/WndMain.c:1580 +msgid "&Graphics..." +msgstr "&Video..." + +#: ../win32/gui/WndMain.c:1582 +msgid "&Plugins && Bios..." +msgstr "&Plugin e Bios..." + +#: ../win32/gui/WndMain.c:1584 +msgid "&Help" +msgstr "&Aiuto" + +#: ../win32/gui/WndMain.c:1585 +msgid "&About..." +msgstr "&Informazioni..." + +#: ../win32/gui/WndMain.c:1764 +msgid "Pcsx Msg" +msgstr "Messaggio di pcsx" + +#: ../win32/gui/WndMain.c:1767 +msgid "Error Loading Symbol" +msgstr "Si è verificato un errore durante il caricamento del simbolo" + +#: ../gui/AboutDlg.c:74 +msgid "" +"(C) 1999-2003 PCSX Team\n" +"(C) 2005-2009 PCSX-df Team\n" +"(C) 2009-2010 PCSX-Reloaded Team" +msgstr "" + +#: ../gui/AboutDlg.c:79 +#, fuzzy +msgid "" +"This program is free software; you can redistribute it and/or modify it " +"under the terms of the GNU General Public License as published by the Free " +"Software Foundation; either version 2 of the License, or (at your option) " +"any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but WITHOUT " +"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or " +"FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for " +"more details.\n" +"\n" +"You should have received a copy of the GNU General Public License along with " +"this program; if not, write to the Free Software Foundation, Inc., 51 " +"Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA." +msgstr "" +"This program is free software; you can redistribute it\n" +"and/or modify it under the terms of the GNU General\n" +"Public License as published by the Free Software\n" +"Foundation; either version 2 of the License, or (at your\n" +"option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be\n" +"useful, but WITHOUT ANY WARRANTY; without even\n" +"the implied warranty of MERCHANTABILITY or\n" +"FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General\n" +"Public License along with this program; if not, write to\n" +"the Free Software Foundation, Inc." + +#: ../gui/AboutDlg.c:102 +msgid "translator-credits" +msgstr "" +"Traduzione italiana a cura di Giovanni Scafora " + +#: ../gui/AboutDlg.c:103 +msgid "A PlayStation emulator." +msgstr "Un emulatore della PlayStation." + +#: ../gui/Cheat.c:117 ../gui/Cheat.c:202 +msgid "Cheat Description:" +msgstr "Descrizione del cheat:" + +#: ../gui/Cheat.c:306 +msgid "Open Cheat File" +msgstr "Apri il file del cheat" + +#: ../gui/Cheat.c:316 ../gui/Cheat.c:356 +msgid "PCSX Cheat Code Files (*.cht)" +msgstr "File cheat di PCSX (*.cht)" + +#: ../gui/Cheat.c:346 +msgid "Save Cheat File" +msgstr "Salva il file del cheat" + +#: ../gui/Cheat.c:361 +msgid "All Files (*.*)" +msgstr "Tutti i file (*.*)" + +#: ../gui/Cheat.c:394 ../gui/Cheat.c:1124 ../gui/ConfDlg.c:104 +#: ../gui/ConfDlg.c:200 ../gui/DebugMemory.c:259 +msgid "Error: Glade interface could not be loaded!" +msgstr "Errore: impossibile caricare l'interfaccia di glade!" + +#: ../gui/Cheat.c:399 +msgid "Cheat Codes" +msgstr "Codici cheat" + +#: ../gui/Cheat.c:405 +msgid "Enable" +msgstr "Abilita" + +#: ../gui/Cheat.c:630 +msgid "Freeze value" +msgstr "Blocca valore" + +#: ../gui/Cheat.c:729 +msgid "Modify value" +msgstr "Modifica il valore" + +#: ../gui/Cheat.c:737 +msgid "New value:" +msgstr "Nuovo valore:" + +#: ../gui/Cheat.c:1134 +msgid "Search Results" +msgstr "Risultati della ricerca" + +#: ../gui/ConfDlg.c:112 ../data/pcsx.glade2:778 +msgid "Configure PCSX" +msgstr "Configura PCSX" + +#: ../gui/ConfDlg.c:237 ../gui/ConfDlg.c:258 ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 ../gui/ConfDlg.c:355 +msgid "No configuration required" +msgstr "Non necessita di essere configurato" + +#: ../gui/ConfDlg.c:237 ../gui/ConfDlg.c:258 ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 ../gui/ConfDlg.c:355 +msgid "This plugin doesn't need to be configured." +msgstr "Questo plugin non necessita di essere configurato." + +#: ../gui/ConfDlg.c:581 +#, c-format +msgid "Could not open BIOS directory: '%s'\n" +msgstr "Impossibile aprire la cartella del BIOS: '%s'\n" + +#: ../gui/ConfDlg.c:611 ../gui/ConfDlg.c:704 ../gui/LnxMain.c:168 +#, c-format +msgid "Could not open directory: '%s'\n" +msgstr "Impossibile aprire la cartella: '%s'\n" + +#: ../gui/ConfDlg.c:675 +msgid "Simulate PSX BIOS" +msgstr "" + +#: ../gui/DebugMemory.c:103 ../data/pcsx.glade2:3178 +msgid "Memory Dump" +msgstr "" + +#: ../gui/DebugMemory.c:111 +#, fuzzy +msgid "Start Address (Hexadecimal):" +msgstr "Esadecimale" + +#: ../gui/DebugMemory.c:121 +msgid "Length (Decimal):" +msgstr "" + +#: ../gui/DebugMemory.c:147 +msgid "Dump to File" +msgstr "" + +#: ../gui/DebugMemory.c:162 +#, fuzzy, c-format +msgid "Error writing to %s!" +msgstr "Si è verificato un errore durante il salvataggio dello stato %s!" + +#: ../gui/DebugMemory.c:180 +#, fuzzy +msgid "Memory Patch" +msgstr "Memory card 1" + +#: ../gui/DebugMemory.c:188 ../data/pcsx.glade2:3199 +#, fuzzy +msgid "Address (Hexadecimal):" +msgstr "Esadecimale" + +#: ../gui/DebugMemory.c:198 +#, fuzzy +msgid "Value (Hexa string):" +msgstr "Esadecimale" + +#: ../gui/DebugMemory.c:264 +#, fuzzy +msgid "Memory Viewer" +msgstr "Memory card 1" + +#: ../gui/DebugMemory.c:269 +#, fuzzy +msgid "Address" +msgstr "Indirizzo:" + +#: ../gui/DebugMemory.c:287 +#, fuzzy +msgid "Text" +msgstr "Strutture" + +#: ../gui/Gtk2Gui.c:113 +msgid "Ready" +msgstr "Pronto" + +#: ../gui/Gtk2Gui.c:154 +msgid "Emulation Paused." +msgstr "L'emulazione è stata messa in pausa." + +#: ../gui/Gtk2Gui.c:405 +msgid "Select PSX EXE File" +msgstr "Seleziona un file EXE della PSX" + +#: ../gui/Gtk2Gui.c:418 +msgid "PlayStation Executable Files" +msgstr "File eseguibili della PlayStation" + +#: ../gui/Gtk2Gui.c:454 +msgid "Not a valid PSX file" +msgstr "Non è un file valido della PSX" + +#: ../gui/Gtk2Gui.c:454 +msgid "The file does not appear to be a valid Playstation executable" +msgstr "Il file non sembra essere un eseguibile valido della Playstation" + +#: ../gui/Gtk2Gui.c:485 ../gui/Gtk2Gui.c:610 +msgid "CD ROM failed" +msgstr "Si è verificato un problema con il CD ROM" + +#: ../gui/Gtk2Gui.c:493 ../gui/Gtk2Gui.c:618 +msgid "The CD-ROM could not be loaded" +msgstr "Impossibile caricare il CD-ROM" + +#: ../gui/Gtk2Gui.c:507 +msgid "Could not run BIOS" +msgstr "Impossibile avviare il BIOS" + +#: ../gui/Gtk2Gui.c:507 +msgid "Running BIOS is not supported with Internal HLE BIOS." +msgstr "L'avvio del BIOS non è supportato con il BIOS HLE interno." + +#: ../gui/Gtk2Gui.c:536 +msgid "Open PSX Disc Image File" +msgstr "Apri il file immagine del disco PSX" + +#: ../gui/Gtk2Gui.c:556 +msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" +msgstr "File immagine PSX (*.bin, *.img, *.mdf, *.iso)" + +#: ../gui/Gtk2Gui.c:771 +#, c-format +msgid "Loaded state %s." +msgstr "È stato caricato lo stato %s." + +#: ../gui/Gtk2Gui.c:774 +#, c-format +msgid "Error loading state %s!" +msgstr "Si è verificato un errore durante il caricamento dello stato %s!" + +#: ../gui/Gtk2Gui.c:785 +#, c-format +msgid "Saved state %s." +msgstr "È stato salvato lo stato %s." + +#: ../gui/Gtk2Gui.c:787 +#, c-format +msgid "Error saving state %s!" +msgstr "Si è verificato un errore durante il salvataggio dello stato %s!" + +#: ../gui/Gtk2Gui.c:822 ../gui/Gtk2Gui.c:850 +msgid "Select State File" +msgstr "Seleziona il file dello stato" + +#: ../gui/Gtk2Gui.c:893 +msgid "Notice" +msgstr "Avviso" + +#: ../gui/LnxMain.c:62 +#, c-format +msgid "Creating memory card: %s\n" +msgstr "Creazione in corso della memory card: %s\n" + +#: ../gui/LnxMain.c:325 +msgid "" +" pcsx [options] [file]\n" +"\toptions:\n" +"\t-runcd\t\tRuns CD-ROM\n" +"\t-cdfile FILE\tRuns a CD image file\n" +"\t-nogui\t\tDon't open the GTK GUI\n" +"\t-cfg FILE\tLoads desired configuration file (default: ~/.pcsx/pcsx.cfg)\n" +"\t-psxout\t\tEnable PSX output\n" +"\t-load STATENUM\tLoads savestate STATENUM (1-5)\n" +"\t-h -help\tDisplay this message\n" +"\tfile\t\tLoads file\n" +msgstr "" +" pcsx [opzioni] [file]\n" +"\topzioni:\n" +"\t-runcd\t\tAvvia il CD-ROM\n" +"\t-cdfile FILE\tAvvia un immagine del CD\n" +"\t-nogui\t\tNon apre la GUI GTK\n" +"\t-cfg FILE\tCarica il file della configurazione desiderata (default: ~/." +"pcsx/pcsx.cfg)\n" +"\t-psxout\t\tAbilita l'output della PSX\n" +"\t-load STATENUM\tCarica salvataggio (1-5)\n" +"\t-h -help\tVisualizza questo messaggio\n" +"\tfile\t\tCarica un file\n" + +#: ../gui/LnxMain.c:362 +#, c-format +msgid "" +"PCSX cannot be configured without using the GUI -- you should restart " +"without -nogui.\n" +msgstr "" +"PCSX non può essere configurato senza una GUI, dovresti riavviare senza " +"l'opzione -nogui.\n" + +#: ../gui/LnxMain.c:418 +msgid "Failed loading plugins!" +msgstr "Il caricamento dei plugin non è andato a buon fine!" + +#: ../gui/LnxMain.c:435 +#, c-format +msgid "Could not load CD-ROM!\n" +msgstr "Impossibile caricare il CD-ROM!\n" + +#: ../gui/LnxMain.c:466 +#, c-format +msgid "PSX emulator couldn't be initialized.\n" +msgstr "Impossibile inizializzare l'emulatore PSX.\n" + +#: ../gui/MemcardDlg.c:56 +msgid "Icon" +msgstr "Icona" + +#: ../gui/MemcardDlg.c:74 +msgid "ID" +msgstr "ID" + +#: ../gui/MemcardDlg.c:80 +msgid "Name" +msgstr "Nome" + +#: ../gui/MemcardDlg.c:323 +msgid "Select A File" +msgstr "Seleziona un file" + +#: ../gui/MemcardDlg.c:364 +msgid "Format this Memory Card?" +msgstr "Formatto questa memory card?" + +#: ../gui/MemcardDlg.c:366 +msgid "" +"If you format the memory card, the card will be empty, and any existing data " +"overwritten." +msgstr "" +"Se formatti la memory card, questa sarà svuotata e tutti i dati esistenti " +"saranno sovrascritti." + +#: ../gui/MemcardDlg.c:369 +msgid "Format card" +msgstr "Formatta la memory card" + +#: ../gui/MemcardDlg.c:393 +msgid "Create a new Memory Card" +msgstr "Crea una nuova memory card" + +#: ../gui/MemcardDlg.c:402 +msgid "New Memory Card.mcd" +msgstr "Nuova memory card.mcd" + +#: ../gui/MemcardDlg.c:503 +msgid "No free space on memory card" +msgstr "Non c'è spazio libero sulla memory card" + +#: ../gui/MemcardDlg.c:504 +msgid "" +"There are no free slots available on the target memory card. Please delete a " +"slot first." +msgstr "" +"Non vi sono slot liberi disponibili nella memory card. Elimina almeno uno " +"slot." + +#: ../gui/MemcardDlg.c:667 +msgid "Memory Card Manager" +msgstr "Gestore della memory card" + +#: ../gui/Plugin.c:211 ../data/pcsx.glade2:1487 +#, c-format +msgid "SIO IRQ Always Enabled" +msgstr "SIO IRQ sempre abilitato" + +#: ../gui/Plugin.c:212 +#, c-format +msgid "SIO IRQ Not Always Enabled" +msgstr "SIO IRQ non sempre abilitato" + +#: ../gui/Plugin.c:218 +#, c-format +msgid "Black & White Mdecs Only Enabled" +msgstr "Abilita solo i filmati in bianco e nero" + +#: ../gui/Plugin.c:219 +#, c-format +msgid "Black & White Mdecs Only Disabled" +msgstr "Disabilita solo i filmati in bianco e nero" + +#: ../gui/Plugin.c:225 +#, c-format +msgid "XA Enabled" +msgstr "XA abilitato" + +#: ../gui/Plugin.c:226 +#, c-format +msgid "XA Disabled" +msgstr "XA disabilitato" + +#: ../gui/Plugin.c:288 +msgid "Error opening CD-ROM plugin!" +msgstr "Si è verificato un errore durante l'apertura del plugin del CD-ROM!" + +#: ../gui/Plugin.c:290 +msgid "Error opening SPU plugin!" +msgstr "Si è verificato un errore durante l'apertura del plugin della SPU!" + +#: ../gui/Plugin.c:293 +msgid "Error opening GPU plugin!" +msgstr "Si è verificato un errore durante l'apertura del plugin della GPU!" + +#: ../gui/Plugin.c:295 +msgid "Error opening Controller 1 plugin!" +msgstr "" +"Si è verificato un errore durante l'apertura del plugin del controller 1!" + +#: ../gui/Plugin.c:297 +msgid "Error opening Controller 2 plugin!" +msgstr "" +"Si è verificato un errore durante l'apertura del plugin del controller 2!" + +#: ../gui/Plugin.c:377 +msgid "Error closing CD-ROM plugin!" +msgstr "Si è verificato un errore durante la chiusura del plugin del CD-ROM!" + +#: ../gui/Plugin.c:379 +msgid "Error closing SPU plugin!" +msgstr "Si è verificato un errore durante la chiusura del plugin della SPU!" + +#: ../gui/Plugin.c:381 +msgid "Error closing Controller 1 Plugin!" +msgstr "" +"Si è verificato un errore durante la chiusura del plugin del controller 1!" + +#: ../gui/Plugin.c:383 +msgid "Error closing Controller 2 plugin!" +msgstr "" +"Si è verificato un errore durante la chiusura del plugin del controller 2!" + +#: ../gui/Plugin.c:385 +msgid "Error closing GPU plugin!" +msgstr "Si è verificato un errore durante la chiusura del plugin della GPU!" + +#: ../libpcsxcore/cdriso.c:658 +#, c-format +msgid "Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n" +msgstr "" + +#: ../libpcsxcore/cdriso.c:677 +#, c-format +msgid "Loaded CD Image: %s" +msgstr "È stata caricata l'immagine del CD: %s" + +#: ../libpcsxcore/cheat.c:147 +#, c-format +msgid "Cheats loaded from: %s\n" +msgstr "Cheat caricati da: %s\n" + +#: ../libpcsxcore/cheat.c:179 +#, c-format +msgid "Cheats saved to: %s\n" +msgstr "Cheat salvati in: %s\n" + +#: ../libpcsxcore/cheat.c:322 ../libpcsxcore/cheat.c:443 +msgid "(Untitled)" +msgstr "(Senza titolo)" + +#: ../libpcsxcore/debug.c:317 +msgid "Error allocating memory" +msgstr "Si è verificato un errore durante l'allocazione della memoria" + +#: ../libpcsxcore/debug.c:322 +msgid "Unable to start debug server.\n" +msgstr "Impossibile avviare il server del debug.\n" + +#: ../libpcsxcore/debug.c:326 +msgid "Debugger started.\n" +msgstr "Il debugger è stato avviato.\n" + +#: ../libpcsxcore/debug.c:333 +msgid "Debugger stopped.\n" +msgstr "Il debugger è stato fermato.\n" + +#: ../libpcsxcore/misc.c:342 +#, c-format +msgid "CD-ROM Label: %.32s\n" +msgstr "" + +#: ../libpcsxcore/misc.c:343 +#, fuzzy, c-format +msgid "CD-ROM ID: %.9s\n" +msgstr "CD-ROM:" + +#: ../libpcsxcore/misc.c:388 +#, c-format +msgid "Error opening file: %s.\n" +msgstr "Si è verificato un errore durante l'apertura del file: %s.\n" + +#: ../libpcsxcore/misc.c:428 +#, c-format +msgid "Unknown CPE opcode %02x at position %08x.\n" +msgstr "Opcode CPE sconosciuto %02x alla posizione %08x.\n" + +#: ../libpcsxcore/misc.c:435 +msgid "COFF files not supported.\n" +msgstr "File COFF non supportato.\n" + +#: ../libpcsxcore/misc.c:439 +msgid "This file does not appear to be a valid PSX file.\n" +msgstr "Questo file non sembra essere un file valido di PSX.\n" + +#: ../libpcsxcore/plugins.c:181 +#, c-format +msgid "Error loading %s: %s" +msgstr "Si è verificato un errore durante il caricamento di %s: %s" + +#: ../libpcsxcore/plugins.c:221 +#, c-format +msgid "Could not load GPU plugin %s!" +msgstr "Impossibile caricare il plugin %s della GPU!" + +#: ../libpcsxcore/plugins.c:292 +#, c-format +msgid "Could not load CD-ROM plugin %s!" +msgstr "Impossibile caricare il plugin %s del CD-ROM!" + +#: ../libpcsxcore/plugins.c:340 +#, c-format +msgid "Could not load SPU plugin %s!" +msgstr "Impossibile caricare il plugin %s della SPU!" + +#: ../libpcsxcore/plugins.c:477 +#, c-format +msgid "Could not load Controller 1 plugin %s!" +msgstr "Impossibile caricare il plugin %s del controller 1!" + +#: ../libpcsxcore/plugins.c:531 +#, c-format +msgid "Could not load Controller 2 plugin %s!" +msgstr "Impossibile caricare il plugin %s del controller 2!" + +#: ../libpcsxcore/plugins.c:574 +#, c-format +msgid "Could not load NetPlay plugin %s!" +msgstr "Impossibile caricare il plugin %s di NetPlay!" + +#: ../libpcsxcore/plugins.c:654 +#, fuzzy, c-format +msgid "Could not load SIO1 plugin %s!" +msgstr "Impossibile caricare il plugin %s della SPU!" + +#: ../libpcsxcore/plugins.c:739 +#, c-format +msgid "Error initializing CD-ROM plugin: %d" +msgstr "" +"Si è verificato un errore durante l'inizializzazione del plugin del CD-ROM: %" +"d" + +#: ../libpcsxcore/plugins.c:741 +#, c-format +msgid "Error initializing GPU plugin: %d" +msgstr "" +"Si è verificato un errore durante l'inizializzazione del plugin della GPU: %d" + +#: ../libpcsxcore/plugins.c:743 +#, c-format +msgid "Error initializing SPU plugin: %d" +msgstr "" +"Si è verificato un errore durante l'inizializzazione del plugin della SPU: %d" + +#: ../libpcsxcore/plugins.c:745 +#, c-format +msgid "Error initializing Controller 1 plugin: %d" +msgstr "" +"Si è verificato un errore durante l'inizializzazione del plugin del " +"controller 1: %d" + +#: ../libpcsxcore/plugins.c:747 +#, c-format +msgid "Error initializing Controller 2 plugin: %d" +msgstr "" +"Si è verificato un errore durante l'inizializzazione del plugin del " +"controller 2: %d" + +#: ../libpcsxcore/plugins.c:751 +#, c-format +msgid "Error initializing NetPlay plugin: %d" +msgstr "" +"Si è verificato un errore durante l'inizializzazione del plugin di NetPlay: %" +"d" + +#: ../libpcsxcore/plugins.c:756 +#, fuzzy, c-format +msgid "Error initializing SIO1 plugin: %d" +msgstr "" +"Si è verificato un errore durante l'inizializzazione del plugin della SPU: %d" + +#: ../libpcsxcore/plugins.c:759 +msgid "Plugins loaded.\n" +msgstr "Plugin caricati.\n" + +#: ../libpcsxcore/ppf.c:216 +#, c-format +msgid "Invalid PPF patch: %s.\n" +msgstr "Patch PPF non valida: %s.\n" + +#: ../libpcsxcore/ppf.c:292 +#, c-format +msgid "Unsupported PPF version (%d).\n" +msgstr "Versione PPF non supportata (%d).\n" + +#: ../libpcsxcore/ppf.c:331 +#, c-format +msgid "Loaded PPF %d.0 patch: %s.\n" +msgstr "Caricata la patch PPF %d.0: %s.\n" + +#: ../libpcsxcore/psxmem.c:80 +msgid "Error allocating memory!" +msgstr "Si è verificato un errore durante l'allocazione della memoria!" + +#: ../libpcsxcore/psxmem.c:122 +#, c-format +msgid "Could not open BIOS:\"%s\". Enabling HLE Bios!\n" +msgstr "Impossibile aprire il BIOS:\"%s\". Sto abilitando il bios HLE!\n" + +#: ../libpcsxcore/r3000a.c:33 +#, c-format +msgid "Running PCSX Version %s (%s).\n" +msgstr "Avvio in corso di PCSX versione %s (%s).\n" + +#: ../libpcsxcore/sio.c:345 +msgid "Connection closed!\n" +msgstr "Connessione chiusa!\n" + +#: ../libpcsxcore/sio.c:371 +#, c-format +msgid "No memory card value was specified - creating a default card %s\n" +msgstr "" +"Nessun valore specificato per la memory card, sto creando una card di " +"default %s\n" + +#: ../libpcsxcore/sio.c:375 +#, c-format +msgid "The memory card %s doesn't exist - creating it\n" +msgstr "La memory card %s non esiste, la sto creando\n" + +#: ../libpcsxcore/sio.c:391 +#, c-format +msgid "Memory card %s failed to load!\n" +msgstr "Impossibile caricare la memory card %s!\n" + +#: ../libpcsxcore/sio.c:395 +#, c-format +msgid "Loading memory card %s\n" +msgstr "Sto caricando la memory card %s\n" + +#: ../plugins/dfxvideo/gpu.c:55 +msgid "SoftGL Driver" +msgstr "Driver SoftGL" + +#: ../plugins/dfxvideo/gpu.c:56 +msgid "" +"P.E.Op.S. SoftGL Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" +"Driver P.E.Op.S. SoftGL V1.17\n" +"Scritto da Pete Bernert e dal team P.E.Op.S.\n" + +#: ../plugins/dfxvideo/gpu.c:58 +msgid "XVideo Driver" +msgstr "Driver XVideo" + +#: ../plugins/dfxvideo/gpu.c:59 +msgid "" +"P.E.Op.S. Xvideo Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" +"Driver P.E.Op.S. Xvideo V1.17\n" +"Scritto da Pete Bernert e dal team P.E.Op.S.\n" + +#: ../plugins/dfxvideo/gpu.c:62 +msgid "Pete Bernert and the P.E.Op.S. team" +msgstr "Pete Bernert ed il team P.E.Op.S." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:8 +msgid "Configure X11 Video" +msgstr "Configura X11 Video" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:45 +msgid "Initial Window Size:" +msgstr "Dimensione iniziale della finestra:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:56 +msgid "Stretching:" +msgstr "Allungamento:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:69 +msgid "Dithering:" +msgstr "Retinatura:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:82 +msgid "" +"320x240\n" +"640x480\n" +"800x600\n" +"1024x768\n" +"1152x864\n" +"1280x1024\n" +"1600x1200" +msgstr "" +"320x240\n" +"640x480\n" +"800x600\n" +"1024x768\n" +"1152x864\n" +"1280x1024\n" +"1600x1200" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:101 +msgid "" +"0: None\n" +"1: 2xSai\n" +"2: 2xSuperSai\n" +"3: SuperEagle\n" +"4: Scale2x\n" +"5: Scale3x\n" +"6: HQ2X\n" +"7: HQ3X" +msgstr "" +"0: Nessuno\n" +"1: 2xSai\n" +"2: 2xSuperSai\n" +"3: SuperEagle\n" +"4: Scala2x\n" +"5: Scala3x\n" +"6: HQ2X\n" +"7: HQ3X" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:123 +msgid "" +"0: Off (fastest)\n" +"1: Game dependant\n" +"2: Always" +msgstr "" +"0: Disattivato (più veloce)\n" +"1: Dipendente dal gioco\n" +"2: Sempre" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:146 +msgid "Maintain 4:3 Aspect Ratio" +msgstr "Mantiene la proporzione dell'aspetto a 4:3" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:161 +#: ../plugins/peopsxgl/gpucfg/interface.c:322 +msgid "Fullscreen" +msgstr "Schermo intero" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:165 +msgid "Toggle windowed/fullscreen mode." +msgstr "Commuta modo finestra/schermo intero." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:187 +msgid "Screen" +msgstr "Schermo" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:216 +msgid "Show FPS" +msgstr "Visualizza gli FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:220 +msgid "Toggle whether the FPS will be shown." +msgstr "Commuta quando saranno visualizzati gli FPS." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:232 +msgid "Autodetect FPS limit" +msgstr "Rileva automaticamente il limite degli FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:236 +msgid "Enable this if games display too quickly." +msgstr "Abilita se i giochi sono visualizzati troppo rapidamente." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:249 +msgid "Enable frame skipping" +msgstr "Abilita il salto dei frame" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:253 +msgid "Skip frames when rendering." +msgstr "Salta i frame durante il rendering." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:270 +msgid "Set FPS" +msgstr "Imposta gli FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:287 +msgid "200.0" +msgstr "200.0" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:310 +msgid "Framerate" +msgstr "Framerate" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:339 +#: ../plugins/peopsxgl/gpucfg/interface.c:568 +msgid "Use game fixes" +msgstr "Usa le difficoltà del gioco" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:366 +msgid "better g-colors, worse textures" +msgstr "Miglior g-color, strutture poco definite" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:381 +msgid "Needed by Dark Forces" +msgstr "Richiesto da Dark Forces" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:394 +msgid "Draw quads with triangles" +msgstr "Disegna quadrati con trinagoli" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:410 +msgid "Repeated flat tex triangles" +msgstr "Triangoli della struttura piana ripetuti" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:426 +msgid "Disable CPU Saving" +msgstr "Disabilita il salvataggio della CPU" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:442 +msgid "Odd/even bit hack" +msgstr "Hack del bit dispari/pari" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:458 +msgid "For precise framerate" +msgstr "Per framerate preciso" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:473 +msgid "Better FPS limit in some" +msgstr "Miglior limite degli FPS in qualche" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:486 +msgid "PC FPS calculation" +msgstr "Calcolo degli FPS del PC" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:504 +msgid "Pandemonium 2" +msgstr "Pandemonium 2" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:517 +msgid "Lazy screen update" +msgstr "Aggiorna schermo pigro" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:535 +msgid "Skip every second frame" +msgstr "Salta ogni secondo frame" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:548 +#: ../plugins/peopsxgl/gpucfg/interface.c:640 +msgid "Old frame skipping" +msgstr "Vecchio salto del frame" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:564 +msgid "Expand screen width" +msgstr "Espandi la larghezza dello schermo" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:580 +msgid "Ignore brightness color" +msgstr "Ignora il colore della luminosità" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:596 +msgid "Disable coordinate check" +msgstr "Disabilita il controllo della coordinata" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:614 +msgid "Chrono Cross" +msgstr "Chrono Cross" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:627 +msgid "Capcom fighting games" +msgstr "Giochi di combattimento della Capcom" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:642 +msgid "Black screens in Lunar" +msgstr "Schermi neri in Lunar" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:657 +msgid "Compatibility mode" +msgstr "Modo di compatibilità" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:670 +#, fuzzy +msgid "Fake 'gpu busy' states" +msgstr "Simula lo stato di 'gpu occupata'" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:688 +msgid "Toggle busy flags after drawing" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:713 +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:268 +msgid "Compatibility" +msgstr "Compatibilità" + +#: ../data/pcsx.glade2:7 +msgid "PCSX" +msgstr "PCSX" + +#: ../data/pcsx.glade2:21 +msgid "_File" +msgstr "_File" + +#: ../data/pcsx.glade2:27 +msgid "Run _CD" +msgstr "Avvia _CD" + +#: ../data/pcsx.glade2:45 +msgid "Run _ISO..." +msgstr "Avvia _ISO..." + +#: ../data/pcsx.glade2:62 +msgid "Run _BIOS" +msgstr "Avvia _BIOS" + +#: ../data/pcsx.glade2:79 +msgid "Run _EXE..." +msgstr "Avvia _EXE..." + +#: ../data/pcsx.glade2:101 +msgid "E_xit" +msgstr "E_sci" + +#: ../data/pcsx.glade2:123 +msgid "_Emulator" +msgstr "_Emulatore" + +#: ../data/pcsx.glade2:129 +msgid "_Continue" +msgstr "_Continua" + +#: ../data/pcsx.glade2:146 +msgid "_Reset" +msgstr "_Resetta" + +#: ../data/pcsx.glade2:168 +msgid "S_witch ISO..." +msgstr "C_ambia ISO..." + +#: ../data/pcsx.glade2:190 +msgid "_Save State" +msgstr "_Salva stato" + +#: ../data/pcsx.glade2:199 ../data/pcsx.glade2:280 +msgid "Slot _1" +msgstr "Slot _1" + +#: ../data/pcsx.glade2:208 ../data/pcsx.glade2:289 +msgid "Slot _2" +msgstr "Slot _2" + +#: ../data/pcsx.glade2:217 ../data/pcsx.glade2:298 +msgid "Slot _3" +msgstr "Slot _3" + +#: ../data/pcsx.glade2:226 ../data/pcsx.glade2:307 +msgid "Slot _4" +msgstr "Slot _4" + +#: ../data/pcsx.glade2:235 ../data/pcsx.glade2:316 +msgid "Slot _5" +msgstr "Slot _5" + +#: ../data/pcsx.glade2:243 ../data/pcsx.glade2:324 +msgid "_Other..." +msgstr "_Altri..." + +#: ../data/pcsx.glade2:271 +msgid "_Load State" +msgstr "_Carica stato" + +#: ../data/pcsx.glade2:357 +msgid "_Configuration" +msgstr "_Configurazione" + +#: ../data/pcsx.glade2:363 +msgid "_Plugins & BIOS..." +msgstr "_Plugin e BIOS..." + +#: ../data/pcsx.glade2:385 +msgid "_Graphics..." +msgstr "_Video..." + +#: ../data/pcsx.glade2:400 +msgid "_Sound..." +msgstr "_Audio..." + +#: ../data/pcsx.glade2:415 +msgid "CD-_ROM..." +msgstr "CD-_ROM..." + +#: ../data/pcsx.glade2:430 +msgid "C_ontrollers..." +msgstr "C_ontroller..." + +#: ../data/pcsx.glade2:450 +msgid "_CPU..." +msgstr "_CPU..." + +#: ../data/pcsx.glade2:466 +msgid "_Memory Cards..." +msgstr "_Memory card..." + +#: ../data/pcsx.glade2:483 +msgid "_Netplay..." +msgstr "_Netplay..." + +#: ../data/pcsx.glade2:504 +msgid "Chea_t" +msgstr "Chea_t" + +#: ../data/pcsx.glade2:513 +msgid "_Browse..." +msgstr "_Visualizza..." + +#: ../data/pcsx.glade2:528 +msgid "_Search..." +msgstr "_Cerca..." + +#: ../data/pcsx.glade2:554 +msgid "Memory _Dump" +msgstr "" + +#: ../data/pcsx.glade2:574 +msgid "_Help" +msgstr "_Aiuto" + +#: ../data/pcsx.glade2:580 +msgid "_About PCSX..." +msgstr "_Informazioni su PCSX..." + +#: ../data/pcsx.glade2:613 ../data/pcsx.glade2:614 +msgid "Run CD" +msgstr "Avvia il CD" + +#: ../data/pcsx.glade2:626 +msgid "Run ISO Image" +msgstr "Avvia l'immagine ISO" + +#: ../data/pcsx.glade2:627 +msgid "Run ISO..." +msgstr "Avvia ISO..." + +#: ../data/pcsx.glade2:648 +msgid "Continue Emulation" +msgstr "Continua l'emulazione" + +#: ../data/pcsx.glade2:649 +msgid "Continue..." +msgstr "Continua..." + +#: ../data/pcsx.glade2:661 +msgid "Switch ISO Image" +msgstr "Cambia l'immagine ISO" + +#: ../data/pcsx.glade2:662 +msgid "Switch ISO..." +msgstr "Cambia ISO..." + +#: ../data/pcsx.glade2:683 ../data/pcsx.glade2:1810 +msgid "Configure Memory Cards" +msgstr "Configura la memory card" + +#: ../data/pcsx.glade2:684 +msgid "Memcards..." +msgstr "Memory card..." + +#: ../data/pcsx.glade2:696 +msgid "Configure Graphics" +msgstr "Configura il video" + +#: ../data/pcsx.glade2:697 +msgid "Graphics..." +msgstr "Video..." + +#: ../data/pcsx.glade2:709 ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:8 +msgid "Configure Sound" +msgstr "Configura l'audio" + +#: ../data/pcsx.glade2:710 +msgid "Sound..." +msgstr "Audio..." + +#: ../data/pcsx.glade2:722 +msgid "Configure CD-ROM" +msgstr "Configura il CD-ROM" + +#: ../data/pcsx.glade2:723 +msgid "CD-ROM..." +msgstr "CD-ROM..." + +#: ../data/pcsx.glade2:735 +msgid "Configure Controllers" +msgstr "Configura i controller" + +#: ../data/pcsx.glade2:736 +msgid "Controllers..." +msgstr "Controller..." + +#: ../data/pcsx.glade2:879 +msgid "Select Folder to Search" +msgstr "Seleziona una cartella per la ricerca" + +#: ../data/pcsx.glade2:895 +msgid "Search in:" +msgstr "Cerca in:" + +#: ../data/pcsx.glade2:1168 +msgid "Graphics:" +msgstr "Video:" + +#: ../data/pcsx.glade2:1181 +msgid "Sound:" +msgstr "Audio:" + +#: ../data/pcsx.glade2:1196 +msgid "Controller 1: " +msgstr "Controller 1: " + +#: ../data/pcsx.glade2:1211 +msgid "Controller 2:" +msgstr "Controller 2:" + +#: ../data/pcsx.glade2:1226 +msgid "CD-ROM:" +msgstr "CD-ROM:" + +#: ../data/pcsx.glade2:1264 +msgid "Plugins" +msgstr "Plugin" + +#: ../data/pcsx.glade2:1325 +msgid "BIOS" +msgstr "BIOS" + +#: ../data/pcsx.glade2:1375 +msgid "Configure CPU" +msgstr "Configura la CPU" + +#: ../data/pcsx.glade2:1419 +msgid "SPU IRQ Always Enabled" +msgstr "SPU IRQ sempre abilitato" + +#: ../data/pcsx.glade2:1435 +msgid "Black & White Movies" +msgstr "Filmati in bianco e nero" + +#: ../data/pcsx.glade2:1469 +msgid "Enable Interpreter CPU" +msgstr "Abilita l'interprete della CPU" + +#: ../data/pcsx.glade2:1503 +msgid "Disable CD Audio" +msgstr "Disabilita CD audio" + +#: ../data/pcsx.glade2:1519 +msgid "Disable XA Decoding" +msgstr "Disabilita il decoding XA" + +#: ../data/pcsx.glade2:1571 +msgid "Options" +msgstr "Opzioni" + +#: ../data/pcsx.glade2:1612 +msgid "" +"NTSC\n" +"PAL" +msgstr "" +"NTSC\n" +"PAL" + +#: ../data/pcsx.glade2:1626 +msgid "System Type" +msgstr "Regione del sistema" + +#: ../data/pcsx.glade2:1674 +msgid "Configure NetPlay" +msgstr "Configura il NetPlay" + +#: ../data/pcsx.glade2:1760 +msgid "NetPlay" +msgstr "NetPlay" + +#: ../data/pcsx.glade2:1886 ../data/pcsx.glade2:2283 +msgid "New" +msgstr "Nuovo" + +#: ../data/pcsx.glade2:1936 ../data/pcsx.glade2:2333 +msgid "Format" +msgstr "Formatta" + +#: ../data/pcsx.glade2:1986 ../data/pcsx.glade2:2383 +msgid "Un/Delete" +msgstr "Non/Elimina" + +#: ../data/pcsx.glade2:2079 +msgid "Memory Card 1" +msgstr "Memory card 1" + +#: ../data/pcsx.glade2:2139 ../data/pcsx.glade2:2189 ../data/pcsx.glade2:3002 +msgid "Copy" +msgstr "Copia" + +#: ../data/pcsx.glade2:2476 +msgid "Memory Card 2" +msgstr "Memory card 2" + +#: ../data/pcsx.glade2:2572 +msgid "Cheat Codes" +msgstr "Codici cheat" + +#: ../data/pcsx.glade2:2736 +msgid "" +"8-bit\n" +"16-bit\n" +"32-bit" +msgstr "" +"8-bit\n" +"16-bit\n" +"32-bit" + +#: ../data/pcsx.glade2:2799 +msgid "" +"Equal Value\n" +"Not Equal Value\n" +"Range\n" +"Increased By\n" +"Decreased By\n" +"Increased\n" +"Decreased\n" +"Different\n" +"No Change" +msgstr "" +"Stesso valore\n" +"Valore diverso\n" +"Scala\n" +"Incrementato da\n" +"Decrementato da\n" +"Incrementato\n" +"Decrementato\n" +"Differente\n" +"Nessun cambio" + +#: ../data/pcsx.glade2:2831 +msgid "" +"Decimal\n" +"Hexadecimal" +msgstr "" +"Decimale\n" +"Esadecimale" + +#: ../data/pcsx.glade2:3035 +msgid "label_resultsfound" +msgstr "etichetta_risultatitrovati" + +#: ../data/pcsx.glade2:3070 +msgid "Search" +msgstr "Cerca" + +#: ../data/pcsx.glade2:3106 +msgid "Restart" +msgstr "Riavvia" + +#: ../data/pcsx.glade2:3135 +msgid "Cheat Search" +msgstr "Cerca cheat" + +#: ../data/pcsx.glade2:3291 +msgid "Raw Dump..." +msgstr "" + +#: ../data/pcsx.glade2:3326 +msgid "Patch Memory..." +msgstr "" + +#: ../plugins/dfsound/spu.c:38 +msgid "Mac OS X Sound" +msgstr "Audio Mac OS X" + +#: ../plugins/dfsound/spu.c:40 +msgid "ALSA Sound" +msgstr "Audio ALSA" + +#: ../plugins/dfsound/spu.c:42 +#, fuzzy +msgid "OSS Sound" +msgstr "Audio OSS" + +#: ../plugins/dfsound/spu.c:44 +#, fuzzy +msgid "SDL Sound" +msgstr "Audio OSS" + +#: ../plugins/dfsound/spu.c:46 +msgid "PulseAudio Sound" +msgstr "Audio PulseAudio" + +#: ../plugins/dfsound/spu.c:48 +msgid "NULL Sound" +msgstr "Senza audio" + +#: ../plugins/dfsound/spu.c:51 +#, fuzzy +msgid "" +"P.E.Op.S. Sound Driver V1.7\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" +"P.E.Op.S. OSS Driver V1.7\n" +"Scritto da Pete Bernert e dal team P.E.Op.S.\n" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:42 +msgid "Volume:" +msgstr "Volume:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:54 +msgid "Interpolation:" +msgstr "Interpolazione:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:68 +msgid "Reverb:" +msgstr "Riverbero:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:81 +msgid "" +"Low\n" +"Medium\n" +"Loud\n" +"Loudest" +msgstr "" +"Basso\n" +"Medio\n" +"Alto\n" +"Altissimo" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:95 +msgid "" +"Off\n" +"Simple\n" +"Playstation" +msgstr "" +"Disattivato\n" +"Semplice\n" +"Playstation" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:111 +msgid "" +"None\n" +"Simple\n" +"Gaussian\n" +"Cubic" +msgstr "" +"Nessuno\n" +"Semplice\n" +"Gaussiano\n" +"Cubico" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:132 +msgid "General" +msgstr "Generale" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:163 +msgid "Adjust XA speed" +msgstr "Aggiusta la velocità di XA" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:167 +msgid "Choose this if XA music is played too quickly." +msgstr "Seleziona se la musica di XA si ascoltasse troppo rapidamente." + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:184 +msgid "XA Music" +msgstr "Musica XA" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:215 +msgid "High compatibility mode" +msgstr "Alto modo di compatibilità" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:219 +msgid "Use the asynchronous SPU interface." +msgstr "Usa l'interfaccia asincrona della SPU." + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:231 +msgid "SPU IRQ Wait" +msgstr "Attesa dell'IRQ della SPU" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:235 +msgid "Wait for CPU; only useful for some games." +msgstr "Attende la CPU; utile solo per alcuni giochi." + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:247 +msgid "Single channel sound" +msgstr "Audio del singolo canale" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:251 +msgid "Play only one channel for a performance boost." +msgstr "Suona solo un canale, per una prestazione migliore." + +#: ../plugins/dfcdrom/cdr-libcdio.c:29 ../plugins/dfcdrom/cdr-linux.c:29 +msgid "CD-ROM Drive Reader" +msgstr "Lettore del dispositivo CD-ROM" + +#: ../plugins/dfcdrom/cdr-null.c:26 +msgid "CDR NULL Plugin" +msgstr "Plugin NULL CDR" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/main.c:219 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:8 +msgid "CDR configuration" +msgstr "Configurazione del CD-ROM" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:33 +msgid "Choose your CD-ROM device or type its path if it's not listed" +msgstr "" +"Scegli il tuo dispositivo CD-ROM o digita il suo path se non è elencato" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:44 +msgid "Select CD-ROM device" +msgstr "Seleziona il dispositivo CD-ROM" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:72 +msgid "Select read mode:" +msgstr "Seleziona la modalità di lettura:" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:83 +msgid "" +"Normal (No Cache)\n" +"Threaded - Faster (With Cache)" +msgstr "" +"Normale (senza cache)\n" +"Threaded, veloce (con la cache)" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:114 +msgid "Cache Size (Def. 64):" +msgstr "Dimensione della cache (def. 64)" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:159 +msgid "Spindown Time:" +msgstr "Tempo di spindown:" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:170 +msgid "" +"Default\n" +"125ms\n" +"250ms\n" +"500ms\n" +"1s\n" +"2s\n" +"4s\n" +"8s\n" +"16s\n" +"32s\n" +"1min\n" +"2min\n" +"4min\n" +"8min\n" +"16min\n" +"32min" +msgstr "" +"Default\n" +"125ms\n" +"250ms\n" +"500ms\n" +"1s\n" +"2s\n" +"4s\n" +"8s\n" +"16s\n" +"32s\n" +"1min\n" +"2min\n" +"4min\n" +"8min\n" +"16min\n" +"32min" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:216 +msgid "Cdrom Speed (Def. 0 = MAX):" +msgstr "Velocità del cdrom (def. 0 = MAX):" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:248 +msgid "hseparator" +msgstr "hseparator" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:258 +msgid "Enable subchannel read" +msgstr "Abilita la lettura del subchannel" + +#: ../plugins/peopsxgl/gpu.c:61 +msgid "OpenGL Driver" +msgstr "Driver OpenGL" + +#: ../plugins/peopsxgl/gpu.c:63 +msgid "Pete Bernert" +msgstr "Pete Bernert" + +#: ../plugins/peopsxgl/gpu.c:64 +msgid "" +"Based on P.E.Op.S. MesaGL Driver V1.78\n" +"Coded by Pete Bernert\n" +msgstr "" +"Basato sul driver P.E.Op.S. MesaGL V1.78\n" +"Scritto da Pete Bernert\n" + +#: ../plugins/peopsxgl/gpucfg/interface.c:118 +msgid "OpenGL Driver configuration" +msgstr "Configurazione del driver OpenGL" + +#: ../plugins/peopsxgl/gpucfg/interface.c:138 +msgid "Textures" +msgstr "Strutture" + +#: ../plugins/peopsxgl/gpucfg/interface.c:161 +msgid "Quality:" +msgstr "Qualità" + +#: ../plugins/peopsxgl/gpucfg/interface.c:178 +#: ../plugins/peopsxgl/gpucfg/interface.c:191 +msgid "0: don't care - Use driver's default textures" +msgstr "0: non se ne preoccupa, usa le strutture di default del driver" + +#: ../plugins/peopsxgl/gpucfg/interface.c:179 +msgid "1: 4444 - Fast, but less colorful" +msgstr "1: 4444, veloce, ma meno colorito" + +#: ../plugins/peopsxgl/gpucfg/interface.c:180 +msgid "2: 5551 - Nice colors, bad transparency" +msgstr "2: 5551, colori piacevoli, cattiva trasparenza" + +#: ../plugins/peopsxgl/gpucfg/interface.c:181 +msgid "3: 8888 - Best colors, more ram needed" +msgstr "3: 8888, colori migliori, richiede più ram" + +#: ../plugins/peopsxgl/gpucfg/interface.c:182 +msgid "4: BGR8888 - Faster on some cards" +msgstr "4: BGR8888, velocissimo su alcune schede" + +#: ../plugins/peopsxgl/gpucfg/interface.c:193 +msgid "VRam size in MBytes (0..1024, 0=auto):" +msgstr "Dimensione della VRam in MByte (0..1024, 0=auto):" + +#: ../plugins/peopsxgl/gpucfg/interface.c:210 +#: ../plugins/peopsxgl/gpucfg/interface.c:225 +msgid "0: None" +msgstr "0: Nessuno" + +#: ../plugins/peopsxgl/gpucfg/interface.c:211 +msgid "1: Standard - Glitches will happen" +msgstr "1: Standard, si verificheranno dei disturbi" + +#: ../plugins/peopsxgl/gpucfg/interface.c:212 +msgid "2: Extended - No black borders" +msgstr "2: Esteso, senza bordi neri" + +#: ../plugins/peopsxgl/gpucfg/interface.c:213 +msgid "3: Standard without sprites - unfiltered 2D" +msgstr "3: Standard senza immagini, 2D non filtrato" + +#: ../plugins/peopsxgl/gpucfg/interface.c:214 +msgid "4: Extended without sprites - unfiltered 2D" +msgstr "4: Esteso senza immagini, 2D non filtrato" + +#: ../plugins/peopsxgl/gpucfg/interface.c:215 +msgid "5: Standard + smoothed sprites" +msgstr "5: Standard + immagini uniformi" + +#: ../plugins/peopsxgl/gpucfg/interface.c:216 +msgid "6: Extended + smoothed sprites" +msgstr "6: Esteso + immagini uniformi" + +#: ../plugins/peopsxgl/gpucfg/interface.c:227 +msgid "Filtering:" +msgstr "Filtraggio:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:235 +msgid "HiRes Tex:" +msgstr "Struttura ad alta risoluzione:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:252 +#: ../plugins/peopsxgl/gpucfg/interface.c:263 +msgid "0: None (standard)" +msgstr "0: Nessuno (standard)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:253 +msgid "1: 2xSaI (much vram needed)" +msgstr "1: 2xSaI (richiede più vram)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:254 +msgid "2: Scaled (needs tex filtering)" +msgstr "2: Scalato (necessita del filtraggio della struttura)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:265 +msgid "Window options" +msgstr "Opzioni della finestra" + +#: ../plugins/peopsxgl/gpucfg/interface.c:296 +msgid "Width:" +msgstr "Larghezza:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:305 +msgid "Height:" +msgstr "Altezza:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:314 +msgid "Keep psx aspect ratio" +msgstr "Mantiene la proporzione dell'aspetto della psx" + +#: ../plugins/peopsxgl/gpucfg/interface.c:330 +msgid "Dithering" +msgstr "Retinatura" + +#: ../plugins/peopsxgl/gpucfg/interface.c:346 +msgid "Framerate" +msgstr "Framerate" + +#: ../plugins/peopsxgl/gpucfg/interface.c:369 +msgid "FPS" +msgstr "FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:377 +msgid "FPS limit manual" +msgstr "Limite manuale degli FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:386 +msgid "Show FPS display on startup" +msgstr "Visualizza gli FPS all'avvio" + +#: ../plugins/peopsxgl/gpucfg/interface.c:394 +msgid "Use FPS limit" +msgstr "Usa il limite degli FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:402 +msgid "FPS limit auto-detection" +msgstr "Autorilevamento del limite degli FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:411 +msgid "Use Frame skipping" +msgstr "Usa il salto dei frame" + +#: ../plugins/peopsxgl/gpucfg/interface.c:419 +msgid "Compatibility" +msgstr "Compatibilità" + +#: ../plugins/peopsxgl/gpucfg/interface.c:434 +msgid "Advanced blending (Accurate psx color emulation)" +msgstr "Mescolamento avanzato (emulazione accurata del colore della psx)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:442 +msgid "Framebuffer textures:" +msgstr "Strutture del framebuffer:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:450 +msgid "Offscreen Drawing:" +msgstr "Disegno fuori schermo:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:458 +msgid "Framebuffer access:" +msgstr "Accesso del framebuffer:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:466 +msgid "Alpha Multipass (correct opaque texture areas)" +msgstr "Alpha Multipass (corregge le aree opache della struttura)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:474 +msgid "Mask bit detection (needed by a few games, zbuffer)" +msgstr "Rilevazione del bit mask (richiesto da pochi giochi, zbuffer)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:491 +#: ../plugins/peopsxgl/gpucfg/interface.c:504 +msgid "0: None - Fastest, most glitches" +msgstr "0: Nessuno, velocissimo, più disturbi" + +#: ../plugins/peopsxgl/gpucfg/interface.c:492 +msgid "1: Minimum - Missing screens" +msgstr "1: Minimo, schermi mancanti" + +#: ../plugins/peopsxgl/gpucfg/interface.c:493 +msgid "2: Standard - OK for most games" +msgstr "2: Standard, va bene per la maggior parte dei giochi" + +#: ../plugins/peopsxgl/gpucfg/interface.c:494 +msgid "3: Enhanced - Shows more stuff" +msgstr "3: Migliorato, visualizza più cose" + +#: ../plugins/peopsxgl/gpucfg/interface.c:495 +msgid "4: Extended - Causing garbage" +msgstr "4: Esteso, produce risultati poco apprezzabili" + +#: ../plugins/peopsxgl/gpucfg/interface.c:515 +#: ../plugins/peopsxgl/gpucfg/interface.c:527 +msgid "0: Emulated vram - Needs FVP" +msgstr "0: Vram emulata, richiede FVP" + +#: ../plugins/peopsxgl/gpucfg/interface.c:516 +msgid "1: Black - Fast, no effects" +msgstr "1: Nero, veloce, nessun effetto" + +#: ../plugins/peopsxgl/gpucfg/interface.c:517 +msgid "2: Gfx card buffer - Can be slow" +msgstr "2: Gfx card buffer, può essere lento" + +#: ../plugins/peopsxgl/gpucfg/interface.c:518 +msgid "3: Gfx card & soft - slow" +msgstr "3: Gfx card e soft, lento" + +#: ../plugins/peopsxgl/gpucfg/interface.c:538 +#: ../plugins/peopsxgl/gpucfg/interface.c:551 +msgid "0: Emulated vram - ok most times" +msgstr "0: Vram emulata, funziona quasi sempre bene" + +#: ../plugins/peopsxgl/gpucfg/interface.c:539 +msgid "1: Gfx card buffer reads" +msgstr "1: Legge il buffer Gfx della scheda" + +#: ../plugins/peopsxgl/gpucfg/interface.c:540 +msgid "2: Gfx card buffer moves" +msgstr "2: Sposta il buffer Gfx della scheda" + +#: ../plugins/peopsxgl/gpucfg/interface.c:541 +msgid "3: Gfx buffer reads & moves" +msgstr "3: Legge e sposta il buffer Gfx" + +#: ../plugins/peopsxgl/gpucfg/interface.c:542 +msgid "4: Full Software (FVP)" +msgstr "4: Software completo (FVP)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:553 +msgid "Special game fixes" +msgstr "Attiva il gioco speciale" + +#: ../plugins/peopsxgl/gpucfg/interface.c:576 +msgid "Battle cursor (FF7)" +msgstr "Cursore della battaglia (Final Fantasy 7)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:584 +msgid "Direct FB updates" +msgstr "Aggiornamenti del Direct FB" + +#: ../plugins/peopsxgl/gpucfg/interface.c:592 +msgid "Black brightness (Lunar)" +msgstr "Luminosità bassa (Lunar)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:600 +msgid "Swap front detection" +msgstr "Rilevamento dell'inversione frontale" + +#: ../plugins/peopsxgl/gpucfg/interface.c:608 +msgid "Disable coord check" +msgstr "Disabilita il controllo della coordinata" + +#: ../plugins/peopsxgl/gpucfg/interface.c:616 +msgid "No blue glitches (LoD)" +msgstr "Senza spurie blu (Legend of Dragoon)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:624 +msgid "Soft FB access" +msgstr "Accesso al FB via software" + +#: ../plugins/peopsxgl/gpucfg/interface.c:632 +msgid "PC fps calculation" +msgstr "Calcolo degli fps del PC" + +#: ../plugins/peopsxgl/gpucfg/interface.c:648 +msgid "Yellow rect (FF9)" +msgstr "Rettangolo giallo (Final Fantasy 9)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:656 +msgid "No subtr. blending" +msgstr "Senza sottrazione nella fusione" + +#: ../plugins/peopsxgl/gpucfg/interface.c:664 +msgid "Lazy upload (DW7)" +msgstr "Upload pigro (Dragon Warrior 7)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:672 +msgid "Odd/even hack" +msgstr "Hack del dispari/pari" + +#: ../plugins/peopsxgl/gpucfg/interface.c:680 +msgid "Adjust screen width" +msgstr "Aggiusta la larghezza dello schermo" + +#: ../plugins/peopsxgl/gpucfg/interface.c:688 +msgid "Old texture filtering" +msgstr "Filtraggio della struttura vecchia" + +#: ../plugins/peopsxgl/gpucfg/interface.c:696 +msgid "Additional uploads" +msgstr "Invio di dati addizionali" + +#: ../plugins/peopsxgl/gpucfg/interface.c:704 +msgid "unused" +msgstr "Inutilizzato" + +#: ../plugins/peopsxgl/gpucfg/interface.c:712 +msgid "Fake 'gpu busy'" +msgstr "Simula lo stato di 'gpu occupata'" + +#: ../plugins/peopsxgl/gpucfg/interface.c:720 +msgid "Misc" +msgstr "Varie" + +#: ../plugins/peopsxgl/gpucfg/interface.c:743 +msgid "Scanlines" +msgstr "Scanlines" + +#: ../plugins/peopsxgl/gpucfg/interface.c:751 +msgid "Blending (0..255, -1=dot):" +msgstr "Fusione (0..255, -1=punto):" + +#: ../plugins/peopsxgl/gpucfg/interface.c:759 +msgid "Screen smoothing (can be slow or unsupported)" +msgstr "Schermo uniforme (può essere lento o non supportato)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:767 +msgid "Use OpenGL extensions (recommended)" +msgstr "Usa le estensioni OpenGL (consigliato)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:775 +msgid "Polygon anti-aliasing (slow with most cards)" +msgstr "Poligono anti-aliasing (lento con la maggior parte delle schede)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:783 +msgid "Line mode (polygons will not get filled)" +msgstr "Modalità linea (i poligoni non saranno riempiti)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:791 +msgid "Force 15 bit framebuffer updates (faster movies)" +msgstr "Forza a 15 bit gli aggiornamenti del framebuffer (filmati velocissimi)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:799 +msgid "Unfiltered MDECs (small movie speedup)" +msgstr "MDECs non filtrati (basso guadagno di velocità nei filmati)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:852 +msgid "Adapted from P.E.Op.S OpenGL GPU by Pete Bernert" +msgstr "Adattato da P.E.Op.S OpenGL GPU da Pete Bernert" + +#: ../plugins/peopsxgl/gpucfg/interface.c:861 +msgid "Homepage: http://www.pbernert.com" +msgstr "Homepage: http://www.pbernert.com" + +#: ../plugins/peopsxgl/gpucfg/interface.c:879 +msgid "Version: 1.78" +msgstr "Versione: 1.78" + +#: ../plugins/dfinput/cfg-gtk2.c:48 +msgid "D-Pad Up" +msgstr "D-Pad Su" + +#: ../plugins/dfinput/cfg-gtk2.c:49 +msgid "D-Pad Down" +msgstr "D-Pad Giù" + +#: ../plugins/dfinput/cfg-gtk2.c:50 +msgid "D-Pad Left" +msgstr "D-Pad Sinistra" + +#: ../plugins/dfinput/cfg-gtk2.c:51 +msgid "D-Pad Right" +msgstr "D-Pad Destra" + +#: ../plugins/dfinput/cfg-gtk2.c:52 +msgid "Cross" +msgstr "Croce" + +#: ../plugins/dfinput/cfg-gtk2.c:53 +msgid "Circle" +msgstr "Cerchio" + +#: ../plugins/dfinput/cfg-gtk2.c:54 +msgid "Square" +msgstr "Quadrato" + +#: ../plugins/dfinput/cfg-gtk2.c:55 +msgid "Triangle" +msgstr "Triangolo" + +#: ../plugins/dfinput/cfg-gtk2.c:56 +msgid "L1" +msgstr "L1" + +#: ../plugins/dfinput/cfg-gtk2.c:57 +msgid "R1" +msgstr "R1" + +#: ../plugins/dfinput/cfg-gtk2.c:58 +msgid "L2" +msgstr "L2" + +#: ../plugins/dfinput/cfg-gtk2.c:59 +msgid "R2" +msgstr "R2" + +#: ../plugins/dfinput/cfg-gtk2.c:60 +msgid "Select" +msgstr "Tasto Select" + +#: ../plugins/dfinput/cfg-gtk2.c:61 +msgid "Start" +msgstr "Tasto Start" + +#: ../plugins/dfinput/cfg-gtk2.c:62 +msgid "L3" +msgstr "L3" + +#: ../plugins/dfinput/cfg-gtk2.c:63 +msgid "R3" +msgstr "R3" + +#: ../plugins/dfinput/cfg-gtk2.c:67 +msgid "L-Stick Right" +msgstr "L-Stick Destra" + +#: ../plugins/dfinput/cfg-gtk2.c:68 +msgid "L-Stick Left" +msgstr "L-Stick Sinistra" + +#: ../plugins/dfinput/cfg-gtk2.c:69 +msgid "L-Stick Down" +msgstr "L-Stick Giù" + +#: ../plugins/dfinput/cfg-gtk2.c:70 +msgid "L-Stick Up" +msgstr "L-Stick Su" + +#: ../plugins/dfinput/cfg-gtk2.c:71 +msgid "R-Stick Right" +msgstr "R-Stick Destra" + +#: ../plugins/dfinput/cfg-gtk2.c:72 +msgid "R-Stick Left" +msgstr "R-Stick Sinistra" + +#: ../plugins/dfinput/cfg-gtk2.c:73 +msgid "R-Stick Down" +msgstr "R-Stick Giù" + +#: ../plugins/dfinput/cfg-gtk2.c:74 +msgid "R-Stick Up" +msgstr "R-Stick Su" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Centered" +msgstr "Centrato" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Up" +msgstr "Su" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Right" +msgstr "Destra" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Rightup" +msgstr "In alto a destra" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Down" +msgstr "Giù" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Rightdown" +msgstr "In basso a destra" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Left" +msgstr "Sinistra" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Leftup" +msgstr "In alto a sinistra" + +#: ../plugins/dfinput/cfg-gtk2.c:105 ../plugins/dfinput/cfg-gtk2.c:144 +msgid "Leftdown" +msgstr "In basso a sinistra" + +#: ../plugins/dfinput/cfg-gtk2.c:109 ../plugins/dfinput/cfg-gtk2.c:148 +#, c-format +msgid "Joystick: Button %d" +msgstr "Joystick: Pulsante %d" + +#: ../plugins/dfinput/cfg-gtk2.c:113 ../plugins/dfinput/cfg-gtk2.c:152 +#, c-format +msgid "Joystick: Axis %d%c" +msgstr "Joystick: Asse %d%c" + +#: ../plugins/dfinput/cfg-gtk2.c:118 ../plugins/dfinput/cfg-gtk2.c:157 +#, c-format +msgid "Joystick: Hat %d %s" +msgstr "Joystick: hat %d %s" + +#: ../plugins/dfinput/cfg-gtk2.c:133 ../plugins/dfinput/cfg-gtk2.c:172 +msgid "Keyboard:" +msgstr "Tastiera:" + +#: ../plugins/dfinput/cfg-gtk2.c:137 ../plugins/dfinput/cfg-gtk2.c:176 +msgid "(Not Set)" +msgstr "(Nessuna impostazione)" + +#: ../plugins/dfinput/cfg-gtk2.c:539 +msgid "None" +msgstr "Nessuno" + +#: ../plugins/dfinput/cfg-gtk2.c:581 +msgid "Gamepad/Keyboard Input Configuration" +msgstr "Configurazione input del gamepad/tastiera" + +#: ../plugins/dfinput/cfg-gtk2.c:587 ../plugins/dfinput/cfg-gtk2.c:607 +msgid "Key" +msgstr "Tasto" + +#: ../plugins/dfinput/cfg-gtk2.c:593 ../plugins/dfinput/cfg-gtk2.c:613 +msgid "Button" +msgstr "Pulsante" + +#: ../plugins/dfinput/pad.c:22 +msgid "Gamepad/Keyboard Input" +msgstr "Input del gamepad/tastiera" + +#: ../plugins/dfinput/dfinput.glade2:35 ../plugins/dfinput/dfinput.glade2:232 +msgid "Device:" +msgstr "Dispositivo:" + +#: ../plugins/dfinput/dfinput.glade2:66 ../plugins/dfinput/dfinput.glade2:263 +msgid "Type:" +msgstr "Tipo:" + +#: ../plugins/dfinput/dfinput.glade2:78 ../plugins/dfinput/dfinput.glade2:275 +msgid "" +"Digital Pad\n" +"Analog Pad" +msgstr "" +"Pad digitale\n" +"Pad analogico" + +#: ../plugins/dfinput/dfinput.glade2:149 ../plugins/dfinput/dfinput.glade2:346 +msgid "Change" +msgstr "Cambia" + +#: ../plugins/dfinput/dfinput.glade2:185 ../plugins/dfinput/dfinput.glade2:382 +msgid "Reset" +msgstr "Resetta" + +#: ../plugins/dfinput/dfinput.glade2:210 +msgid "Controller 1" +msgstr "Controller 1" + +#: ../plugins/dfinput/dfinput.glade2:412 +msgid "Controller 2" +msgstr "Controller 2" + +#: ../plugins/dfinput/dfinput.glade2:427 +msgid "Multi-Threaded (Recommended)" +msgstr "Multi-Threaded (consigliato)" + +#: ../plugins/dfnet/dfnet.c:23 +#, fuzzy +msgid "Socket Driver" +msgstr "Driver SoftGL" + +#: ../plugins/dfnet/dfnet.c:161 +#, fuzzy, c-format +msgid "error connecting to %s: %s\n" +msgstr "Si è verificato un errore durante il caricamento di %s: %s" + +#: ../plugins/dfnet/dfnet.c:186 +#, fuzzy +msgid "Error allocating memory!\n" +msgstr "Si è verificato un errore durante l'allocazione della memoria!" + +#: ../plugins/dfnet/gui.c:39 +msgid "Nothing to configure" +msgstr "" + +#: ../plugins/dfnet/gui.c:95 +#, c-format +msgid "IP %s" +msgstr "" + +#: ../plugins/dfnet/gui.c:165 +msgid "Waiting for connection..." +msgstr "" + +#: ../plugins/dfnet/gui.c:168 +msgid "The Client should now Start a Connection, waiting..." +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:23 +msgid "" +"Select here if you'll be Server (Player1) or Client (Player2).\n" +"\n" +"If you select Server you must Copy your IP address to the Clipboard and " +"paste if (Ctrl+V) wherever the Client can see it.\n" +"\n" +"If you selected Client please enter the IP address the Server gave to you in " +"the IP Address Control." +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:63 +msgid "Copy PC IP to Clipboard" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:94 +msgid "Server (Player1)" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:104 +msgid "Client (Player2)" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:130 +msgid "" +"Do not change if not necessary (remember it must be changed on both sides)." +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:143 +msgid "Port Number" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:202 +#, fuzzy +msgid "Start Game" +msgstr "Tasto Start" + +#: ../plugins/dfnet/dfnet.glade2:240 +msgid "Play Offline" +msgstr "" + +#: ../plugins/bladesio1/sio1.c:29 +#, fuzzy +msgid "Sio1 Driver" +msgstr "Driver SoftGL" + +#, fuzzy +#~ msgid "CD-ROM Device Reader" +#~ msgstr "Lettore del dispositivo CD-ROM" + +#~ msgid "Error Closing PAD1 Plugin" +#~ msgstr "Si è verificato un errore durante la chiusura del plugin del PAD1" + +#~ msgid "Error Closing PAD2 Plugin" +#~ msgstr "Si è verificato un errore durante la chiusura del plugin del PAD2" + +#~ msgid "Internal HLE Bios" +#~ msgstr "Bios HLE interno" + +#, fuzzy +#~ msgid "Dump Memory..." +#~ msgstr "&Memory card..." + +#~ msgid "" +#~ "(C) 1999-2003 PCSX Team\n" +#~ "(C) 2005-2006 Ryan Schultz\n" +#~ "(C) 2005-2006 Andrew Burton\n" +#~ "(C) 2008-2009 Wei Mingzhi" +#~ msgstr "" +#~ "(C) 1999-2003 PCSX Team\n" +#~ "(C) 2005-2006 Ryan Schultz\n" +#~ "(C) 2005-2006 Andrew Burton\n" +#~ "(C) 2008-2009 Wei Mingzhi" + +#~ msgid "PulseAudio Simple Sound" +#~ msgstr "Audio PulseAudio semplice" diff --git a/po/pcsx.pot b/po/pcsx.pot new file mode 100644 index 00000000..3a2fbbb6 --- /dev/null +++ b/po/pcsx.pot @@ -0,0 +1,2950 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-07-10 14:04+0800\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../win32/gui/AboutDlg.c:26 +msgid "" +"PCSX - A PlayStation Emulator\n" +"\n" +"Original Authors:\n" +"main coder: linuzappz\n" +"co-coders: shadow\n" +"ex-coders: Nocomp, Pete Bernett, nik3d\n" +"Webmaster: AkumaX" +msgstr "" + +#: ../win32/gui/AboutDlg.c:35 +msgid "" +"PCSX-df Authors:\n" +"Ryan Schultz, Andrew Burton, Stephen Chao,\n" +"Marcus Comstedt, Stefan Sikora\n" +"\n" +"PCSX-Reloaded By:\n" +"Blade_Arma, Wei Mingzhi, et al.\n" +"\n" +"http://pcsxr.codeplex.com/" +msgstr "" + +#: ../win32/gui/AboutDlg.c:46 ../plugins/peopsxgl/gpucfg/interface.c:831 +msgid "About" +msgstr "" + +#: ../win32/gui/AboutDlg.c:48 ../win32/gui/AboutDlg.c:52 +#: ../win32/gui/CheatDlg.c:69 ../win32/gui/CheatDlg.c:119 +#: ../win32/gui/ConfigurePlugins.c:483 ../win32/gui/ConfigurePlugins.c:614 +#: ../win32/gui/WndMain.c:974 ../win32/gui/WndMain.c:1210 +#: ../plugins/peopsxgl/gpucfg/interface.c:130 +#: ../plugins/peopsxgl/gpucfg/interface.c:843 +msgid "OK" +msgstr "" + +#: ../win32/gui/AboutDlg.c:49 +msgid "PCSX EMU\n" +msgstr "" + +#: ../win32/gui/CheatDlg.c:51 ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "Yes" +msgstr "" + +#: ../win32/gui/CheatDlg.c:51 ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "No" +msgstr "" + +#: ../win32/gui/CheatDlg.c:66 ../gui/Cheat.c:194 +msgid "Edit Cheat" +msgstr "" + +#: ../win32/gui/CheatDlg.c:67 ../win32/gui/CheatDlg.c:117 ../gui/Cheat.c:636 +msgid "Description:" +msgstr "" + +#: ../win32/gui/CheatDlg.c:68 ../win32/gui/CheatDlg.c:118 ../gui/Cheat.c:125 +#: ../gui/Cheat.c:211 +msgid "Cheat Code:" +msgstr "" + +#: ../win32/gui/CheatDlg.c:70 ../win32/gui/CheatDlg.c:120 +#: ../win32/gui/ConfigurePlugins.c:484 ../win32/gui/ConfigurePlugins.c:615 +#: ../win32/gui/WndMain.c:975 ../win32/gui/WndMain.c:1211 +#: ../plugins/peopsxgl/gpucfg/interface.c:338 +msgid "Cancel" +msgstr "" + +#: ../win32/gui/CheatDlg.c:91 ../win32/gui/CheatDlg.c:132 ../gui/Cheat.c:155 +#: ../gui/Cheat.c:251 +msgid "Invalid cheat code!" +msgstr "" + +#: ../win32/gui/CheatDlg.c:116 ../gui/Cheat.c:109 +msgid "Add New Cheat" +msgstr "" + +#: ../win32/gui/CheatDlg.c:166 ../data/pcsx.glade2:2534 +msgid "Edit Cheat Codes" +msgstr "" + +#: ../win32/gui/CheatDlg.c:168 +msgid "&Add Code" +msgstr "" + +#: ../win32/gui/CheatDlg.c:169 +msgid "&Edit Code" +msgstr "" + +#: ../win32/gui/CheatDlg.c:170 +msgid "&Remove Code" +msgstr "" + +#: ../win32/gui/CheatDlg.c:171 +msgid "&Enable/Disable" +msgstr "" + +#: ../win32/gui/CheatDlg.c:172 +msgid "&Load..." +msgstr "" + +#: ../win32/gui/CheatDlg.c:173 +msgid "&Save As..." +msgstr "" + +#: ../win32/gui/CheatDlg.c:174 +msgid "&Close" +msgstr "" + +#: ../win32/gui/CheatDlg.c:185 ../gui/Cheat.c:413 +msgid "Description" +msgstr "" + +#: ../win32/gui/CheatDlg.c:190 +msgid "Enabled" +msgstr "" + +#: ../win32/gui/CheatDlg.c:282 ../win32/gui/CheatDlg.c:311 +msgid "PCSX Cheat Code Files" +msgstr "" + +#: ../win32/gui/CheatDlg.c:402 +msgid "Equal Value" +msgstr "" + +#: ../win32/gui/CheatDlg.c:403 +msgid "Not Equal Value" +msgstr "" + +#: ../win32/gui/CheatDlg.c:404 +msgid "Range" +msgstr "" + +#: ../win32/gui/CheatDlg.c:407 +msgid "Increased By" +msgstr "" + +#: ../win32/gui/CheatDlg.c:408 +msgid "Decreased By" +msgstr "" + +#: ../win32/gui/CheatDlg.c:409 +msgid "Increased" +msgstr "" + +#: ../win32/gui/CheatDlg.c:410 +msgid "Decreased" +msgstr "" + +#: ../win32/gui/CheatDlg.c:411 +msgid "Different" +msgstr "" + +#: ../win32/gui/CheatDlg.c:412 +msgid "No Change" +msgstr "" + +#: ../win32/gui/CheatDlg.c:448 ../gui/Cheat.c:585 +msgid "Enter the values and start your search." +msgstr "" + +#: ../win32/gui/CheatDlg.c:453 +msgid "No addresses found." +msgstr "" + +#: ../win32/gui/CheatDlg.c:457 ../gui/Cheat.c:543 +msgid "Too many addresses found." +msgstr "" + +#: ../win32/gui/CheatDlg.c:466 ../gui/Cheat.c:552 +#, c-format +msgid "%.8X Current: %u (%.2X), Previous: %u (%.2X)" +msgstr "" + +#: ../win32/gui/CheatDlg.c:471 ../gui/Cheat.c:557 +#, c-format +msgid "%.8X Current: %u (%.4X), Previous: %u (%.4X)" +msgstr "" + +#: ../win32/gui/CheatDlg.c:476 ../gui/Cheat.c:562 +#, c-format +msgid "%.8X Current: %u (%.8X), Previous: %u (%.8X)" +msgstr "" + +#: ../win32/gui/CheatDlg.c:492 ../gui/Cheat.c:577 +#, c-format +msgid "Founded Addresses: %d" +msgstr "" + +#: ../win32/gui/CheatDlg.c:504 ../data/pcsx.glade2:2930 +msgid "Freeze" +msgstr "" + +#: ../win32/gui/CheatDlg.c:505 ../win32/gui/CheatDlg.c:596 +msgid "Address:" +msgstr "" + +#: ../win32/gui/CheatDlg.c:506 ../win32/gui/CheatDlg.c:597 +#: ../win32/gui/CheatDlg.c:682 ../gui/Cheat.c:647 ../data/pcsx.glade2:2773 +msgid "Value:" +msgstr "" + +#: ../win32/gui/CheatDlg.c:566 +#, c-format +msgid "Freeze %.8X" +msgstr "" + +#: ../win32/gui/CheatDlg.c:595 ../data/pcsx.glade2:2966 +msgid "Modify" +msgstr "" + +#: ../win32/gui/CheatDlg.c:678 ../gui/Cheat.c:1129 ../data/pcsx.glade2:2703 +msgid "Cheat Search" +msgstr "" + +#: ../win32/gui/CheatDlg.c:680 ../data/pcsx.glade2:2751 +msgid "Search For:" +msgstr "" + +#: ../win32/gui/CheatDlg.c:681 ../data/pcsx.glade2:2761 +msgid "Data Type:" +msgstr "" + +#: ../win32/gui/CheatDlg.c:683 ../data/pcsx.glade2:2785 +msgid "Data Base:" +msgstr "" + +#: ../win32/gui/CheatDlg.c:684 ../data/pcsx.glade2:2845 +msgid "To:" +msgstr "" + +#: ../win32/gui/CheatDlg.c:685 +msgid "&Freeze" +msgstr "" + +#: ../win32/gui/CheatDlg.c:686 +msgid "&Modify" +msgstr "" + +#: ../win32/gui/CheatDlg.c:687 +msgid "&Copy" +msgstr "" + +#: ../win32/gui/CheatDlg.c:688 +msgid "&Search" +msgstr "" + +#: ../win32/gui/CheatDlg.c:689 +msgid "&New Search" +msgstr "" + +#: ../win32/gui/CheatDlg.c:690 +msgid "C&lose" +msgstr "" + +#: ../win32/gui/CheatDlg.c:692 +msgid "8-bit" +msgstr "" + +#: ../win32/gui/CheatDlg.c:693 +msgid "16-bit" +msgstr "" + +#: ../win32/gui/CheatDlg.c:694 +msgid "32-bit" +msgstr "" + +#: ../win32/gui/CheatDlg.c:695 +msgid "Decimal" +msgstr "" + +#: ../win32/gui/CheatDlg.c:696 +msgid "Hexadecimal" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:219 +msgid "Simulate Psx Bios" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:305 +msgid "Configuration not OK!" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:305 ../gui/Cheat.c:155 ../gui/Cheat.c:251 +#: ../gui/LnxMain.c:418 +msgid "Error" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:406 +msgid "This plugin reports that should work correctly" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:407 +msgid "This plugin reports that should not work correctly" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:463 +msgid "Select Plugins Directory" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:472 +msgid "Select Bios Directory" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:481 +msgid "Configuration" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:485 +msgid "Graphics" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:486 +msgid "First Controller" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:487 +msgid "Second Controller" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:488 +msgid "Sound" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:489 +msgid "Cdrom" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:490 +msgid "Bios" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:491 +msgid "Set Bios Directory" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:492 +msgid "Set Plugins Directory" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:493 ../win32/gui/ConfigurePlugins.c:496 +#: ../win32/gui/ConfigurePlugins.c:499 ../win32/gui/ConfigurePlugins.c:502 +#: ../win32/gui/ConfigurePlugins.c:505 ../win32/gui/ConfigurePlugins.c:617 +msgid "Configure..." +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:494 ../win32/gui/ConfigurePlugins.c:497 +#: ../win32/gui/ConfigurePlugins.c:500 ../win32/gui/ConfigurePlugins.c:503 +#: ../win32/gui/ConfigurePlugins.c:506 ../win32/gui/ConfigurePlugins.c:618 +msgid "Test..." +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:495 ../win32/gui/ConfigurePlugins.c:498 +#: ../win32/gui/ConfigurePlugins.c:501 ../win32/gui/ConfigurePlugins.c:504 +#: ../win32/gui/ConfigurePlugins.c:507 ../win32/gui/ConfigurePlugins.c:619 +msgid "About..." +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:612 +msgid "NetPlay Configuration" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:616 ../plugins/dfnet/gui.c:31 +#: ../plugins/dfnet/gui.c:112 +msgid "NetPlay" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:620 +msgid "" +"Note: The NetPlay Plugin Directory should be the same as the other Plugins." +msgstr "" + +#: ../win32/gui/plugin.c:90 ../win32/gui/WndMain.c:281 +#, c-format +msgid "*PCSX*: Saved State %d" +msgstr "" + +#: ../win32/gui/plugin.c:91 ../win32/gui/WndMain.c:282 +#, c-format +msgid "*PCSX*: Error Saving State %d" +msgstr "" + +#: ../win32/gui/plugin.c:107 ../win32/gui/WndMain.c:259 +#, c-format +msgid "*PCSX*: Loaded State %d" +msgstr "" + +#: ../win32/gui/plugin.c:108 ../win32/gui/WndMain.c:260 +#, c-format +msgid "*PCSX*: Error Loading State %d" +msgstr "" + +#: ../win32/gui/plugin.c:119 +#, c-format +msgid "*PCSX*: Sio Irq Always Enabled" +msgstr "" + +#: ../win32/gui/plugin.c:120 +#, c-format +msgid "*PCSX*: Sio Irq Not Always Enabled" +msgstr "" + +#: ../win32/gui/plugin.c:127 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Enabled" +msgstr "" + +#: ../win32/gui/plugin.c:128 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Disabled" +msgstr "" + +#: ../win32/gui/plugin.c:135 +#, c-format +msgid "*PCSX*: Xa Enabled" +msgstr "" + +#: ../win32/gui/plugin.c:136 +#, c-format +msgid "*PCSX*: Xa Disabled" +msgstr "" + +#: ../win32/gui/plugin.c:145 +msgid "*PCSX*: CdRom Case Opened" +msgstr "" + +#: ../win32/gui/plugin.c:150 +msgid "*PCSX*: CdRom Case Closed" +msgstr "" + +#: ../win32/gui/plugin.c:177 +msgid "Connecting..." +msgstr "" + +#: ../win32/gui/plugin.c:179 ../win32/gui/plugin.c:186 +#, c-format +msgid "Please wait while connecting... %c\n" +msgstr "" + +#: ../win32/gui/plugin.c:214 +msgid "Error Opening CDR Plugin" +msgstr "" + +#: ../win32/gui/plugin.c:277 +#, c-format +msgid "Error Opening GPU Plugin (%d)" +msgstr "" + +#: ../win32/gui/plugin.c:279 +#, c-format +msgid "Error Opening SPU Plugin (%d)" +msgstr "" + +#: ../win32/gui/plugin.c:282 +#, c-format +msgid "Error Opening PAD1 Plugin (%d)" +msgstr "" + +#: ../win32/gui/plugin.c:284 +#, c-format +msgid "Error Opening PAD2 Plugin (%d)" +msgstr "" + +#: ../win32/gui/plugin.c:314 +msgid "Error Closing CDR Plugin" +msgstr "" + +#: ../win32/gui/plugin.c:316 +msgid "Error Closing GPU Plugin" +msgstr "" + +#: ../win32/gui/plugin.c:318 +msgid "Error Closing SPU Plugin" +msgstr "" + +#: ../win32/gui/plugin.c:336 +#, c-format +msgid "CDRinit error: %d" +msgstr "" + +#: ../win32/gui/plugin.c:338 +#, c-format +msgid "GPUinit error: %d" +msgstr "" + +#: ../win32/gui/plugin.c:340 +#, c-format +msgid "SPUinit error: %d" +msgstr "" + +#: ../win32/gui/plugin.c:342 +#, c-format +msgid "PAD1init error: %d" +msgstr "" + +#: ../win32/gui/plugin.c:344 +#, c-format +msgid "PAD2init error: %d" +msgstr "" + +#: ../win32/gui/plugin.c:347 +#, c-format +msgid "NETinit error: %d" +msgstr "" + +#: ../win32/gui/WndMain.c:76 +msgid "Arabic" +msgstr "" + +#: ../win32/gui/WndMain.c:77 +msgid "Catalan" +msgstr "" + +#: ../win32/gui/WndMain.c:78 +msgid "German" +msgstr "" + +#: ../win32/gui/WndMain.c:79 +msgid "Greek" +msgstr "" + +#: ../win32/gui/WndMain.c:80 ../win32/gui/WndMain.c:1566 +#: ../win32/gui/WndMain.c:1568 +msgid "English" +msgstr "" + +#: ../win32/gui/WndMain.c:81 +msgid "Spanish" +msgstr "" + +#: ../win32/gui/WndMain.c:82 +msgid "French" +msgstr "" + +#: ../win32/gui/WndMain.c:83 +msgid "Italian" +msgstr "" + +#: ../win32/gui/WndMain.c:84 +msgid "Portuguese" +msgstr "" + +#: ../win32/gui/WndMain.c:85 +msgid "Portuguese (Brazilian)" +msgstr "" + +#: ../win32/gui/WndMain.c:86 +msgid "Romanian" +msgstr "" + +#: ../win32/gui/WndMain.c:87 +msgid "Russian" +msgstr "" + +#: ../win32/gui/WndMain.c:88 +msgid "Simplified Chinese" +msgstr "" + +#: ../win32/gui/WndMain.c:89 +msgid "Traditional Chinese" +msgstr "" + +#: ../win32/gui/WndMain.c:90 +msgid "Japanese" +msgstr "" + +#: ../win32/gui/WndMain.c:91 +msgid "Korean" +msgstr "" + +#: ../win32/gui/WndMain.c:300 ../win32/gui/WndMain.c:352 +msgid "PCSX State Format" +msgstr "" + +#: ../win32/gui/WndMain.c:327 +#, c-format +msgid "*PCSX*: Loaded State %s" +msgstr "" + +#: ../win32/gui/WndMain.c:328 +#, c-format +msgid "*PCSX*: Error Loading State %s" +msgstr "" + +#: ../win32/gui/WndMain.c:379 +#, c-format +msgid "*PCSX*: Saved State %s" +msgstr "" + +#: ../win32/gui/WndMain.c:380 +#, c-format +msgid "*PCSX*: Error Saving State %s" +msgstr "" + +#: ../win32/gui/WndMain.c:429 ../win32/gui/WndMain.c:478 ../gui/Gtk2Gui.c:485 +#: ../gui/Gtk2Gui.c:610 +msgid "The CD does not appear to be a valid Playstation CD" +msgstr "" + +#: ../win32/gui/WndMain.c:435 ../win32/gui/WndMain.c:484 ../gui/Gtk2Gui.c:493 +#: ../gui/Gtk2Gui.c:618 +msgid "Could not load CD-ROM!" +msgstr "" + +#: ../win32/gui/WndMain.c:445 +msgid "Running BIOS is not supported with Internal HLE Bios." +msgstr "" + +#: ../win32/gui/WndMain.c:664 ../gui/MemcardDlg.c:62 +msgid "Title" +msgstr "" + +#: ../win32/gui/WndMain.c:670 ../gui/MemcardDlg.c:68 +msgid "Status" +msgstr "" + +#: ../win32/gui/WndMain.c:676 +msgid "Game ID" +msgstr "" + +#: ../win32/gui/WndMain.c:682 +msgid "Game" +msgstr "" + +#: ../win32/gui/WndMain.c:864 +msgid "mid link block" +msgstr "" + +#: ../win32/gui/WndMain.c:867 +msgid "terminiting link block" +msgstr "" + +#: ../win32/gui/WndMain.c:875 ../gui/MemcardDlg.c:155 ../gui/MemcardDlg.c:260 +msgid "Deleted" +msgstr "" + +#: ../win32/gui/WndMain.c:876 ../win32/gui/WndMain.c:879 +#: ../gui/MemcardDlg.c:157 ../gui/MemcardDlg.c:161 ../gui/MemcardDlg.c:262 +#: ../gui/MemcardDlg.c:266 +msgid "Free" +msgstr "" + +#: ../win32/gui/WndMain.c:878 ../gui/MemcardDlg.c:159 ../gui/MemcardDlg.c:264 +msgid "Used" +msgstr "" + +#: ../win32/gui/WndMain.c:972 +msgid "Memcard Manager" +msgstr "" + +#: ../win32/gui/WndMain.c:976 ../win32/gui/WndMain.c:979 +msgid "Select Mcd" +msgstr "" + +#: ../win32/gui/WndMain.c:977 ../win32/gui/WndMain.c:980 +msgid "Format Mcd" +msgstr "" + +#: ../win32/gui/WndMain.c:978 ../win32/gui/WndMain.c:981 +msgid "Reload Mcd" +msgstr "" + +#: ../win32/gui/WndMain.c:982 +msgid "-> Copy ->" +msgstr "" + +#: ../win32/gui/WndMain.c:983 +msgid "<- Copy <-" +msgstr "" + +#: ../win32/gui/WndMain.c:984 +msgid "Paste" +msgstr "" + +#: ../win32/gui/WndMain.c:985 +msgid "<- Un/Delete" +msgstr "" + +#: ../win32/gui/WndMain.c:986 +msgid "Un/Delete ->" +msgstr "" + +#: ../win32/gui/WndMain.c:988 +msgid "Memory Card 1" +msgstr "" + +#: ../win32/gui/WndMain.c:989 +msgid "Memory Card 2" +msgstr "" + +#: ../win32/gui/WndMain.c:1044 +msgid "Are you sure you want to paste this selection?" +msgstr "" + +#: ../win32/gui/WndMain.c:1044 ../win32/gui/WndMain.c:1155 +#: ../win32/gui/WndMain.c:1162 +msgid "Confirmation" +msgstr "" + +#: ../win32/gui/WndMain.c:1155 ../win32/gui/WndMain.c:1162 +msgid "Are you sure you want to format this Memory Card?" +msgstr "" + +#: ../win32/gui/WndMain.c:1208 +msgid "Cpu Config" +msgstr "" + +#: ../win32/gui/WndMain.c:1213 +msgid "Disable Xa Decoding" +msgstr "" + +#: ../win32/gui/WndMain.c:1214 +msgid "Sio Irq Always Enabled" +msgstr "" + +#: ../win32/gui/WndMain.c:1215 +msgid "Black && White Movies" +msgstr "" + +#: ../win32/gui/WndMain.c:1216 +msgid "Disable Cd audio" +msgstr "" + +#: ../win32/gui/WndMain.c:1217 ../data/pcsx.glade2:1595 +msgid "Autodetect" +msgstr "" + +#: ../win32/gui/WndMain.c:1218 +msgid "Enable Interpreter Cpu" +msgstr "" + +#: ../win32/gui/WndMain.c:1219 ../data/pcsx.glade2:1451 +msgid "Enable Console Output" +msgstr "" + +#: ../win32/gui/WndMain.c:1220 ../data/pcsx.glade2:1401 +msgid "Enable Debugger" +msgstr "" + +#: ../win32/gui/WndMain.c:1221 +msgid "Spu Irq Always Enabled" +msgstr "" + +#: ../win32/gui/WndMain.c:1222 ../data/pcsx.glade2:1538 +msgid "Parasite Eve 2, Vandal Hearts 1/2 Fix" +msgstr "" + +#: ../win32/gui/WndMain.c:1223 ../data/pcsx.glade2:1553 +msgid "InuYasha Sengoku Battle Fix" +msgstr "" + +#: ../win32/gui/WndMain.c:1225 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:277 +#: ../plugins/dfinput/dfinput.glade2:448 +msgid "Options" +msgstr "" + +#: ../win32/gui/WndMain.c:1226 +msgid "Psx System Type" +msgstr "" + +#: ../win32/gui/WndMain.c:1330 +msgid "Psx Mcd Format (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)" +msgstr "" + +#: ../win32/gui/WndMain.c:1335 +msgid "Psx Memory Card (*.mcr;*.mc)" +msgstr "" + +#: ../win32/gui/WndMain.c:1340 +msgid "CVGS Memory Card (*.mem;*.vgs)" +msgstr "" + +#: ../win32/gui/WndMain.c:1345 +msgid "Bleem Memory Card (*.mcd)" +msgstr "" + +#: ../win32/gui/WndMain.c:1350 +msgid "DexDrive Memory Card (*.gme)" +msgstr "" + +#: ../win32/gui/WndMain.c:1355 +msgid "DataDeck Memory Card (*.ddf)" +msgstr "" + +#: ../win32/gui/WndMain.c:1360 ../win32/gui/WndMain.c:1441 ../gui/Cheat.c:321 +#: ../gui/Gtk2Gui.c:422 ../gui/Gtk2Gui.c:561 +msgid "All Files" +msgstr "" + +#: ../win32/gui/WndMain.c:1399 +msgid "Psx Exe Format" +msgstr "" + +#: ../win32/gui/WndMain.c:1436 +msgid "Psx Isos (*.iso;*.mdf;*.img;*.bin)" +msgstr "" + +#: ../win32/gui/WndMain.c:1512 +msgid "&File" +msgstr "" + +#: ../win32/gui/WndMain.c:1513 +msgid "E&xit" +msgstr "" + +#: ../win32/gui/WndMain.c:1515 +msgid "Run &EXE..." +msgstr "" + +#: ../win32/gui/WndMain.c:1516 +msgid "Run &BIOS" +msgstr "" + +#: ../win32/gui/WndMain.c:1517 +msgid "Run &ISO..." +msgstr "" + +#: ../win32/gui/WndMain.c:1518 +msgid "Run &CD" +msgstr "" + +#: ../win32/gui/WndMain.c:1520 +msgid "&Emulator" +msgstr "" + +#: ../win32/gui/WndMain.c:1521 +msgid "&States" +msgstr "" + +#: ../win32/gui/WndMain.c:1523 +msgid "S&witch ISO..." +msgstr "" + +#: ../win32/gui/WndMain.c:1525 +msgid "Re&set" +msgstr "" + +#: ../win32/gui/WndMain.c:1526 +msgid "&Run" +msgstr "" + +#: ../win32/gui/WndMain.c:1527 +msgid "&Save" +msgstr "" + +#: ../win32/gui/WndMain.c:1528 +msgid "&Load" +msgstr "" + +#: ../win32/gui/WndMain.c:1529 ../win32/gui/WndMain.c:1535 +msgid "&Other..." +msgstr "" + +#: ../win32/gui/WndMain.c:1530 ../win32/gui/WndMain.c:1536 +msgid "Slot &5" +msgstr "" + +#: ../win32/gui/WndMain.c:1531 ../win32/gui/WndMain.c:1537 +msgid "Slot &4" +msgstr "" + +#: ../win32/gui/WndMain.c:1532 ../win32/gui/WndMain.c:1538 +msgid "Slot &3" +msgstr "" + +#: ../win32/gui/WndMain.c:1533 ../win32/gui/WndMain.c:1539 +msgid "Slot &2" +msgstr "" + +#: ../win32/gui/WndMain.c:1534 ../win32/gui/WndMain.c:1540 +msgid "Slot &1" +msgstr "" + +#: ../win32/gui/WndMain.c:1542 +msgid "&Configuration" +msgstr "" + +#: ../win32/gui/WndMain.c:1543 +msgid "Cheat &Search..." +msgstr "" + +#: ../win32/gui/WndMain.c:1544 +msgid "Ch&eat Code..." +msgstr "" + +#: ../win32/gui/WndMain.c:1547 +msgid "&Language" +msgstr "" + +#: ../win32/gui/WndMain.c:1572 +msgid "&Memory cards..." +msgstr "" + +#: ../win32/gui/WndMain.c:1573 +msgid "C&PU..." +msgstr "" + +#: ../win32/gui/WndMain.c:1575 +msgid "&NetPlay..." +msgstr "" + +#: ../win32/gui/WndMain.c:1577 +msgid "&Controllers..." +msgstr "" + +#: ../win32/gui/WndMain.c:1578 +msgid "CD-&ROM..." +msgstr "" + +#: ../win32/gui/WndMain.c:1579 +msgid "&Sound..." +msgstr "" + +#: ../win32/gui/WndMain.c:1580 +msgid "&Graphics..." +msgstr "" + +#: ../win32/gui/WndMain.c:1582 +msgid "&Plugins && Bios..." +msgstr "" + +#: ../win32/gui/WndMain.c:1584 +msgid "&Help" +msgstr "" + +#: ../win32/gui/WndMain.c:1585 +msgid "&About..." +msgstr "" + +#: ../win32/gui/WndMain.c:1764 +msgid "Pcsx Msg" +msgstr "" + +#: ../win32/gui/WndMain.c:1767 +msgid "Error Loading Symbol" +msgstr "" + +#: ../gui/AboutDlg.c:74 +msgid "" +"(C) 1999-2003 PCSX Team\n" +"(C) 2005-2009 PCSX-df Team\n" +"(C) 2009-2010 PCSX-Reloaded Team" +msgstr "" + +#: ../gui/AboutDlg.c:79 +msgid "" +"This program is free software; you can redistribute it and/or modify it " +"under the terms of the GNU General Public License as published by the Free " +"Software Foundation; either version 2 of the License, or (at your option) " +"any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but WITHOUT " +"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or " +"FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for " +"more details.\n" +"\n" +"You should have received a copy of the GNU General Public License along with " +"this program; if not, write to the Free Software Foundation, Inc., 51 " +"Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA." +msgstr "" + +#: ../gui/AboutDlg.c:102 +msgid "translator-credits" +msgstr "" + +#: ../gui/AboutDlg.c:103 +msgid "A PlayStation emulator." +msgstr "" + +#: ../gui/Cheat.c:117 ../gui/Cheat.c:202 +msgid "Cheat Description:" +msgstr "" + +#: ../gui/Cheat.c:306 +msgid "Open Cheat File" +msgstr "" + +#: ../gui/Cheat.c:316 ../gui/Cheat.c:356 +msgid "PCSX Cheat Code Files (*.cht)" +msgstr "" + +#: ../gui/Cheat.c:346 +msgid "Save Cheat File" +msgstr "" + +#: ../gui/Cheat.c:361 +msgid "All Files (*.*)" +msgstr "" + +#: ../gui/Cheat.c:394 ../gui/Cheat.c:1124 ../gui/ConfDlg.c:104 +#: ../gui/ConfDlg.c:200 ../gui/DebugMemory.c:259 +msgid "Error: Glade interface could not be loaded!" +msgstr "" + +#: ../gui/Cheat.c:399 +msgid "Cheat Codes" +msgstr "" + +#: ../gui/Cheat.c:405 +msgid "Enable" +msgstr "" + +#: ../gui/Cheat.c:630 +msgid "Freeze value" +msgstr "" + +#: ../gui/Cheat.c:729 +msgid "Modify value" +msgstr "" + +#: ../gui/Cheat.c:737 +msgid "New value:" +msgstr "" + +#: ../gui/Cheat.c:1134 +msgid "Search Results" +msgstr "" + +#: ../gui/ConfDlg.c:112 ../data/pcsx.glade2:778 +msgid "Configure PCSX" +msgstr "" + +#: ../gui/ConfDlg.c:237 ../gui/ConfDlg.c:258 ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 ../gui/ConfDlg.c:355 +msgid "No configuration required" +msgstr "" + +#: ../gui/ConfDlg.c:237 ../gui/ConfDlg.c:258 ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 ../gui/ConfDlg.c:355 +msgid "This plugin doesn't need to be configured." +msgstr "" + +#: ../gui/ConfDlg.c:581 +#, c-format +msgid "Could not open BIOS directory: '%s'\n" +msgstr "" + +#: ../gui/ConfDlg.c:611 ../gui/ConfDlg.c:704 ../gui/LnxMain.c:168 +#, c-format +msgid "Could not open directory: '%s'\n" +msgstr "" + +#: ../gui/ConfDlg.c:675 +msgid "Simulate PSX BIOS" +msgstr "" + +#: ../gui/DebugMemory.c:103 ../data/pcsx.glade2:3178 +msgid "Memory Dump" +msgstr "" + +#: ../gui/DebugMemory.c:111 +msgid "Start Address (Hexadecimal):" +msgstr "" + +#: ../gui/DebugMemory.c:121 +msgid "Length (Decimal):" +msgstr "" + +#: ../gui/DebugMemory.c:147 +msgid "Dump to File" +msgstr "" + +#: ../gui/DebugMemory.c:162 +#, c-format +msgid "Error writing to %s!" +msgstr "" + +#: ../gui/DebugMemory.c:180 +msgid "Memory Patch" +msgstr "" + +#: ../gui/DebugMemory.c:188 ../data/pcsx.glade2:3199 +msgid "Address (Hexadecimal):" +msgstr "" + +#: ../gui/DebugMemory.c:198 +msgid "Value (Hexa string):" +msgstr "" + +#: ../gui/DebugMemory.c:264 +msgid "Memory Viewer" +msgstr "" + +#: ../gui/DebugMemory.c:269 +msgid "Address" +msgstr "" + +#: ../gui/DebugMemory.c:287 +msgid "Text" +msgstr "" + +#: ../gui/Gtk2Gui.c:113 +msgid "Ready" +msgstr "" + +#: ../gui/Gtk2Gui.c:154 +msgid "Emulation Paused." +msgstr "" + +#: ../gui/Gtk2Gui.c:405 +msgid "Select PSX EXE File" +msgstr "" + +#: ../gui/Gtk2Gui.c:418 +msgid "PlayStation Executable Files" +msgstr "" + +#: ../gui/Gtk2Gui.c:454 +msgid "Not a valid PSX file" +msgstr "" + +#: ../gui/Gtk2Gui.c:454 +msgid "The file does not appear to be a valid Playstation executable" +msgstr "" + +#: ../gui/Gtk2Gui.c:485 ../gui/Gtk2Gui.c:610 +msgid "CD ROM failed" +msgstr "" + +#: ../gui/Gtk2Gui.c:493 ../gui/Gtk2Gui.c:618 +msgid "The CD-ROM could not be loaded" +msgstr "" + +#: ../gui/Gtk2Gui.c:507 +msgid "Could not run BIOS" +msgstr "" + +#: ../gui/Gtk2Gui.c:507 +msgid "Running BIOS is not supported with Internal HLE BIOS." +msgstr "" + +#: ../gui/Gtk2Gui.c:536 +msgid "Open PSX Disc Image File" +msgstr "" + +#: ../gui/Gtk2Gui.c:556 +msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" +msgstr "" + +#: ../gui/Gtk2Gui.c:771 +#, c-format +msgid "Loaded state %s." +msgstr "" + +#: ../gui/Gtk2Gui.c:774 +#, c-format +msgid "Error loading state %s!" +msgstr "" + +#: ../gui/Gtk2Gui.c:785 +#, c-format +msgid "Saved state %s." +msgstr "" + +#: ../gui/Gtk2Gui.c:787 +#, c-format +msgid "Error saving state %s!" +msgstr "" + +#: ../gui/Gtk2Gui.c:822 ../gui/Gtk2Gui.c:850 +msgid "Select State File" +msgstr "" + +#: ../gui/Gtk2Gui.c:893 +msgid "Notice" +msgstr "" + +#: ../gui/LnxMain.c:62 +#, c-format +msgid "Creating memory card: %s\n" +msgstr "" + +#: ../gui/LnxMain.c:325 +msgid "" +" pcsx [options] [file]\n" +"\toptions:\n" +"\t-runcd\t\tRuns CD-ROM\n" +"\t-cdfile FILE\tRuns a CD image file\n" +"\t-nogui\t\tDon't open the GTK GUI\n" +"\t-cfg FILE\tLoads desired configuration file (default: ~/.pcsx/pcsx.cfg)\n" +"\t-psxout\t\tEnable PSX output\n" +"\t-load STATENUM\tLoads savestate STATENUM (1-5)\n" +"\t-h -help\tDisplay this message\n" +"\tfile\t\tLoads file\n" +msgstr "" + +#: ../gui/LnxMain.c:362 +#, c-format +msgid "" +"PCSX cannot be configured without using the GUI -- you should restart " +"without -nogui.\n" +msgstr "" + +#: ../gui/LnxMain.c:418 +msgid "Failed loading plugins!" +msgstr "" + +#: ../gui/LnxMain.c:435 +#, c-format +msgid "Could not load CD-ROM!\n" +msgstr "" + +#: ../gui/LnxMain.c:466 +#, c-format +msgid "PSX emulator couldn't be initialized.\n" +msgstr "" + +#: ../gui/MemcardDlg.c:56 +msgid "Icon" +msgstr "" + +#: ../gui/MemcardDlg.c:74 +msgid "ID" +msgstr "" + +#: ../gui/MemcardDlg.c:80 +msgid "Name" +msgstr "" + +#: ../gui/MemcardDlg.c:323 +msgid "Select A File" +msgstr "" + +#: ../gui/MemcardDlg.c:364 +msgid "Format this Memory Card?" +msgstr "" + +#: ../gui/MemcardDlg.c:366 +msgid "" +"If you format the memory card, the card will be empty, and any existing data " +"overwritten." +msgstr "" + +#: ../gui/MemcardDlg.c:369 +msgid "Format card" +msgstr "" + +#: ../gui/MemcardDlg.c:393 +msgid "Create a new Memory Card" +msgstr "" + +#: ../gui/MemcardDlg.c:402 +msgid "New Memory Card.mcd" +msgstr "" + +#: ../gui/MemcardDlg.c:503 +msgid "No free space on memory card" +msgstr "" + +#: ../gui/MemcardDlg.c:504 +msgid "" +"There are no free slots available on the target memory card. Please delete a " +"slot first." +msgstr "" + +#: ../gui/MemcardDlg.c:667 +msgid "Memory Card Manager" +msgstr "" + +#: ../gui/Plugin.c:211 ../data/pcsx.glade2:1487 +#, c-format +msgid "SIO IRQ Always Enabled" +msgstr "" + +#: ../gui/Plugin.c:212 +#, c-format +msgid "SIO IRQ Not Always Enabled" +msgstr "" + +#: ../gui/Plugin.c:218 +#, c-format +msgid "Black & White Mdecs Only Enabled" +msgstr "" + +#: ../gui/Plugin.c:219 +#, c-format +msgid "Black & White Mdecs Only Disabled" +msgstr "" + +#: ../gui/Plugin.c:225 +#, c-format +msgid "XA Enabled" +msgstr "" + +#: ../gui/Plugin.c:226 +#, c-format +msgid "XA Disabled" +msgstr "" + +#: ../gui/Plugin.c:288 +msgid "Error opening CD-ROM plugin!" +msgstr "" + +#: ../gui/Plugin.c:290 +msgid "Error opening SPU plugin!" +msgstr "" + +#: ../gui/Plugin.c:293 +msgid "Error opening GPU plugin!" +msgstr "" + +#: ../gui/Plugin.c:295 +msgid "Error opening Controller 1 plugin!" +msgstr "" + +#: ../gui/Plugin.c:297 +msgid "Error opening Controller 2 plugin!" +msgstr "" + +#: ../gui/Plugin.c:377 +msgid "Error closing CD-ROM plugin!" +msgstr "" + +#: ../gui/Plugin.c:379 +msgid "Error closing SPU plugin!" +msgstr "" + +#: ../gui/Plugin.c:381 +msgid "Error closing Controller 1 Plugin!" +msgstr "" + +#: ../gui/Plugin.c:383 +msgid "Error closing Controller 2 plugin!" +msgstr "" + +#: ../gui/Plugin.c:385 +msgid "Error closing GPU plugin!" +msgstr "" + +#: ../libpcsxcore/cdriso.c:658 +#, c-format +msgid "Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n" +msgstr "" + +#: ../libpcsxcore/cdriso.c:677 +#, c-format +msgid "Loaded CD Image: %s" +msgstr "" + +#: ../libpcsxcore/cheat.c:147 +#, c-format +msgid "Cheats loaded from: %s\n" +msgstr "" + +#: ../libpcsxcore/cheat.c:179 +#, c-format +msgid "Cheats saved to: %s\n" +msgstr "" + +#: ../libpcsxcore/cheat.c:322 ../libpcsxcore/cheat.c:443 +msgid "(Untitled)" +msgstr "" + +#: ../libpcsxcore/debug.c:317 +msgid "Error allocating memory" +msgstr "" + +#: ../libpcsxcore/debug.c:322 +msgid "Unable to start debug server.\n" +msgstr "" + +#: ../libpcsxcore/debug.c:326 +msgid "Debugger started.\n" +msgstr "" + +#: ../libpcsxcore/debug.c:333 +msgid "Debugger stopped.\n" +msgstr "" + +#: ../libpcsxcore/misc.c:342 +#, c-format +msgid "CD-ROM Label: %.32s\n" +msgstr "" + +#: ../libpcsxcore/misc.c:343 +#, c-format +msgid "CD-ROM ID: %.9s\n" +msgstr "" + +#: ../libpcsxcore/misc.c:388 +#, c-format +msgid "Error opening file: %s.\n" +msgstr "" + +#: ../libpcsxcore/misc.c:428 +#, c-format +msgid "Unknown CPE opcode %02x at position %08x.\n" +msgstr "" + +#: ../libpcsxcore/misc.c:435 +msgid "COFF files not supported.\n" +msgstr "" + +#: ../libpcsxcore/misc.c:439 +msgid "This file does not appear to be a valid PSX file.\n" +msgstr "" + +#: ../libpcsxcore/plugins.c:181 +#, c-format +msgid "Error loading %s: %s" +msgstr "" + +#: ../libpcsxcore/plugins.c:221 +#, c-format +msgid "Could not load GPU plugin %s!" +msgstr "" + +#: ../libpcsxcore/plugins.c:292 +#, c-format +msgid "Could not load CD-ROM plugin %s!" +msgstr "" + +#: ../libpcsxcore/plugins.c:340 +#, c-format +msgid "Could not load SPU plugin %s!" +msgstr "" + +#: ../libpcsxcore/plugins.c:477 +#, c-format +msgid "Could not load Controller 1 plugin %s!" +msgstr "" + +#: ../libpcsxcore/plugins.c:531 +#, c-format +msgid "Could not load Controller 2 plugin %s!" +msgstr "" + +#: ../libpcsxcore/plugins.c:574 +#, c-format +msgid "Could not load NetPlay plugin %s!" +msgstr "" + +#: ../libpcsxcore/plugins.c:654 +#, c-format +msgid "Could not load SIO1 plugin %s!" +msgstr "" + +#: ../libpcsxcore/plugins.c:739 +#, c-format +msgid "Error initializing CD-ROM plugin: %d" +msgstr "" + +#: ../libpcsxcore/plugins.c:741 +#, c-format +msgid "Error initializing GPU plugin: %d" +msgstr "" + +#: ../libpcsxcore/plugins.c:743 +#, c-format +msgid "Error initializing SPU plugin: %d" +msgstr "" + +#: ../libpcsxcore/plugins.c:745 +#, c-format +msgid "Error initializing Controller 1 plugin: %d" +msgstr "" + +#: ../libpcsxcore/plugins.c:747 +#, c-format +msgid "Error initializing Controller 2 plugin: %d" +msgstr "" + +#: ../libpcsxcore/plugins.c:751 +#, c-format +msgid "Error initializing NetPlay plugin: %d" +msgstr "" + +#: ../libpcsxcore/plugins.c:756 +#, c-format +msgid "Error initializing SIO1 plugin: %d" +msgstr "" + +#: ../libpcsxcore/plugins.c:759 +msgid "Plugins loaded.\n" +msgstr "" + +#: ../libpcsxcore/ppf.c:216 +#, c-format +msgid "Invalid PPF patch: %s.\n" +msgstr "" + +#: ../libpcsxcore/ppf.c:292 +#, c-format +msgid "Unsupported PPF version (%d).\n" +msgstr "" + +#: ../libpcsxcore/ppf.c:331 +#, c-format +msgid "Loaded PPF %d.0 patch: %s.\n" +msgstr "" + +#: ../libpcsxcore/psxmem.c:80 +msgid "Error allocating memory!" +msgstr "" + +#: ../libpcsxcore/psxmem.c:122 +#, c-format +msgid "Could not open BIOS:\"%s\". Enabling HLE Bios!\n" +msgstr "" + +#: ../libpcsxcore/r3000a.c:33 +#, c-format +msgid "Running PCSX Version %s (%s).\n" +msgstr "" + +#: ../libpcsxcore/sio.c:345 +msgid "Connection closed!\n" +msgstr "" + +#: ../libpcsxcore/sio.c:371 +#, c-format +msgid "No memory card value was specified - creating a default card %s\n" +msgstr "" + +#: ../libpcsxcore/sio.c:375 +#, c-format +msgid "The memory card %s doesn't exist - creating it\n" +msgstr "" + +#: ../libpcsxcore/sio.c:391 +#, c-format +msgid "Memory card %s failed to load!\n" +msgstr "" + +#: ../libpcsxcore/sio.c:395 +#, c-format +msgid "Loading memory card %s\n" +msgstr "" + +#: ../plugins/dfxvideo/gpu.c:55 +msgid "SoftGL Driver" +msgstr "" + +#: ../plugins/dfxvideo/gpu.c:56 +msgid "" +"P.E.Op.S. SoftGL Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" + +#: ../plugins/dfxvideo/gpu.c:58 +msgid "XVideo Driver" +msgstr "" + +#: ../plugins/dfxvideo/gpu.c:59 +msgid "" +"P.E.Op.S. Xvideo Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" + +#: ../plugins/dfxvideo/gpu.c:62 +msgid "Pete Bernert and the P.E.Op.S. team" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:8 +msgid "Configure X11 Video" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:45 +msgid "Initial Window Size:" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:56 +msgid "Stretching:" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:69 +msgid "Dithering:" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:82 +msgid "" +"320x240\n" +"640x480\n" +"800x600\n" +"1024x768\n" +"1152x864\n" +"1280x1024\n" +"1600x1200" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:101 +msgid "" +"0: None\n" +"1: 2xSai\n" +"2: 2xSuperSai\n" +"3: SuperEagle\n" +"4: Scale2x\n" +"5: Scale3x\n" +"6: HQ2X\n" +"7: HQ3X" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:123 +msgid "" +"0: Off (fastest)\n" +"1: Game dependant\n" +"2: Always" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:146 +msgid "Maintain 4:3 Aspect Ratio" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:161 +#: ../plugins/peopsxgl/gpucfg/interface.c:322 +msgid "Fullscreen" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:165 +msgid "Toggle windowed/fullscreen mode." +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:187 +msgid "Screen" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:216 +msgid "Show FPS" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:220 +msgid "Toggle whether the FPS will be shown." +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:232 +msgid "Autodetect FPS limit" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:236 +msgid "Enable this if games display too quickly." +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:249 +msgid "Enable frame skipping" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:253 +msgid "Skip frames when rendering." +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:270 +msgid "Set FPS" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:287 +msgid "200.0" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:310 +msgid "Framerate" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:339 +#: ../plugins/peopsxgl/gpucfg/interface.c:568 +msgid "Use game fixes" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:366 +msgid "better g-colors, worse textures" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:381 +msgid "Needed by Dark Forces" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:394 +msgid "Draw quads with triangles" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:410 +msgid "Repeated flat tex triangles" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:426 +msgid "Disable CPU Saving" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:442 +msgid "Odd/even bit hack" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:458 +msgid "For precise framerate" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:473 +msgid "Better FPS limit in some" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:486 +msgid "PC FPS calculation" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:504 +msgid "Pandemonium 2" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:517 +msgid "Lazy screen update" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:535 +msgid "Skip every second frame" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:548 +#: ../plugins/peopsxgl/gpucfg/interface.c:640 +msgid "Old frame skipping" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:564 +msgid "Expand screen width" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:580 +msgid "Ignore brightness color" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:596 +msgid "Disable coordinate check" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:614 +msgid "Chrono Cross" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:627 +msgid "Capcom fighting games" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:642 +msgid "Black screens in Lunar" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:657 +msgid "Compatibility mode" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:670 +msgid "Fake 'gpu busy' states" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:688 +msgid "Toggle busy flags after drawing" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:713 +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:268 +msgid "Compatibility" +msgstr "" + +#: ../data/pcsx.glade2:7 +msgid "PCSX" +msgstr "" + +#: ../data/pcsx.glade2:21 +msgid "_File" +msgstr "" + +#: ../data/pcsx.glade2:27 +msgid "Run _CD" +msgstr "" + +#: ../data/pcsx.glade2:45 +msgid "Run _ISO..." +msgstr "" + +#: ../data/pcsx.glade2:62 +msgid "Run _BIOS" +msgstr "" + +#: ../data/pcsx.glade2:79 +msgid "Run _EXE..." +msgstr "" + +#: ../data/pcsx.glade2:101 +msgid "E_xit" +msgstr "" + +#: ../data/pcsx.glade2:123 +msgid "_Emulator" +msgstr "" + +#: ../data/pcsx.glade2:129 +msgid "_Continue" +msgstr "" + +#: ../data/pcsx.glade2:146 +msgid "_Reset" +msgstr "" + +#: ../data/pcsx.glade2:168 +msgid "S_witch ISO..." +msgstr "" + +#: ../data/pcsx.glade2:190 +msgid "_Save State" +msgstr "" + +#: ../data/pcsx.glade2:199 ../data/pcsx.glade2:280 +msgid "Slot _1" +msgstr "" + +#: ../data/pcsx.glade2:208 ../data/pcsx.glade2:289 +msgid "Slot _2" +msgstr "" + +#: ../data/pcsx.glade2:217 ../data/pcsx.glade2:298 +msgid "Slot _3" +msgstr "" + +#: ../data/pcsx.glade2:226 ../data/pcsx.glade2:307 +msgid "Slot _4" +msgstr "" + +#: ../data/pcsx.glade2:235 ../data/pcsx.glade2:316 +msgid "Slot _5" +msgstr "" + +#: ../data/pcsx.glade2:243 ../data/pcsx.glade2:324 +msgid "_Other..." +msgstr "" + +#: ../data/pcsx.glade2:271 +msgid "_Load State" +msgstr "" + +#: ../data/pcsx.glade2:357 +msgid "_Configuration" +msgstr "" + +#: ../data/pcsx.glade2:363 +msgid "_Plugins & BIOS..." +msgstr "" + +#: ../data/pcsx.glade2:385 +msgid "_Graphics..." +msgstr "" + +#: ../data/pcsx.glade2:400 +msgid "_Sound..." +msgstr "" + +#: ../data/pcsx.glade2:415 +msgid "CD-_ROM..." +msgstr "" + +#: ../data/pcsx.glade2:430 +msgid "C_ontrollers..." +msgstr "" + +#: ../data/pcsx.glade2:450 +msgid "_CPU..." +msgstr "" + +#: ../data/pcsx.glade2:466 +msgid "_Memory Cards..." +msgstr "" + +#: ../data/pcsx.glade2:483 +msgid "_Netplay..." +msgstr "" + +#: ../data/pcsx.glade2:504 +msgid "Chea_t" +msgstr "" + +#: ../data/pcsx.glade2:513 +msgid "_Browse..." +msgstr "" + +#: ../data/pcsx.glade2:528 +msgid "_Search..." +msgstr "" + +#: ../data/pcsx.glade2:554 +msgid "Memory _Dump" +msgstr "" + +#: ../data/pcsx.glade2:574 +msgid "_Help" +msgstr "" + +#: ../data/pcsx.glade2:580 +msgid "_About PCSX..." +msgstr "" + +#: ../data/pcsx.glade2:613 ../data/pcsx.glade2:614 +msgid "Run CD" +msgstr "" + +#: ../data/pcsx.glade2:626 +msgid "Run ISO Image" +msgstr "" + +#: ../data/pcsx.glade2:627 +msgid "Run ISO..." +msgstr "" + +#: ../data/pcsx.glade2:648 +msgid "Continue Emulation" +msgstr "" + +#: ../data/pcsx.glade2:649 +msgid "Continue..." +msgstr "" + +#: ../data/pcsx.glade2:661 +msgid "Switch ISO Image" +msgstr "" + +#: ../data/pcsx.glade2:662 +msgid "Switch ISO..." +msgstr "" + +#: ../data/pcsx.glade2:683 ../data/pcsx.glade2:1810 +msgid "Configure Memory Cards" +msgstr "" + +#: ../data/pcsx.glade2:684 +msgid "Memcards..." +msgstr "" + +#: ../data/pcsx.glade2:696 +msgid "Configure Graphics" +msgstr "" + +#: ../data/pcsx.glade2:697 +msgid "Graphics..." +msgstr "" + +#: ../data/pcsx.glade2:709 ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:8 +msgid "Configure Sound" +msgstr "" + +#: ../data/pcsx.glade2:710 +msgid "Sound..." +msgstr "" + +#: ../data/pcsx.glade2:722 +msgid "Configure CD-ROM" +msgstr "" + +#: ../data/pcsx.glade2:723 +msgid "CD-ROM..." +msgstr "" + +#: ../data/pcsx.glade2:735 +msgid "Configure Controllers" +msgstr "" + +#: ../data/pcsx.glade2:736 +msgid "Controllers..." +msgstr "" + +#: ../data/pcsx.glade2:879 +msgid "Select Folder to Search" +msgstr "" + +#: ../data/pcsx.glade2:895 +msgid "Search in:" +msgstr "" + +#: ../data/pcsx.glade2:1168 +msgid "Graphics:" +msgstr "" + +#: ../data/pcsx.glade2:1181 +msgid "Sound:" +msgstr "" + +#: ../data/pcsx.glade2:1196 +msgid "Controller 1: " +msgstr "" + +#: ../data/pcsx.glade2:1211 +msgid "Controller 2:" +msgstr "" + +#: ../data/pcsx.glade2:1226 +msgid "CD-ROM:" +msgstr "" + +#: ../data/pcsx.glade2:1264 +msgid "Plugins" +msgstr "" + +#: ../data/pcsx.glade2:1325 +msgid "BIOS" +msgstr "" + +#: ../data/pcsx.glade2:1375 +msgid "Configure CPU" +msgstr "" + +#: ../data/pcsx.glade2:1419 +msgid "SPU IRQ Always Enabled" +msgstr "" + +#: ../data/pcsx.glade2:1435 +msgid "Black & White Movies" +msgstr "" + +#: ../data/pcsx.glade2:1469 +msgid "Enable Interpreter CPU" +msgstr "" + +#: ../data/pcsx.glade2:1503 +msgid "Disable CD Audio" +msgstr "" + +#: ../data/pcsx.glade2:1519 +msgid "Disable XA Decoding" +msgstr "" + +#: ../data/pcsx.glade2:1571 +msgid "Options" +msgstr "" + +#: ../data/pcsx.glade2:1612 +msgid "" +"NTSC\n" +"PAL" +msgstr "" + +#: ../data/pcsx.glade2:1626 +msgid "System Type" +msgstr "" + +#: ../data/pcsx.glade2:1674 +msgid "Configure NetPlay" +msgstr "" + +#: ../data/pcsx.glade2:1760 +msgid "NetPlay" +msgstr "" + +#: ../data/pcsx.glade2:1886 ../data/pcsx.glade2:2283 +msgid "New" +msgstr "" + +#: ../data/pcsx.glade2:1936 ../data/pcsx.glade2:2333 +msgid "Format" +msgstr "" + +#: ../data/pcsx.glade2:1986 ../data/pcsx.glade2:2383 +msgid "Un/Delete" +msgstr "" + +#: ../data/pcsx.glade2:2079 +msgid "Memory Card 1" +msgstr "" + +#: ../data/pcsx.glade2:2139 ../data/pcsx.glade2:2189 ../data/pcsx.glade2:3002 +msgid "Copy" +msgstr "" + +#: ../data/pcsx.glade2:2476 +msgid "Memory Card 2" +msgstr "" + +#: ../data/pcsx.glade2:2572 +msgid "Cheat Codes" +msgstr "" + +#: ../data/pcsx.glade2:2736 +msgid "" +"8-bit\n" +"16-bit\n" +"32-bit" +msgstr "" + +#: ../data/pcsx.glade2:2799 +msgid "" +"Equal Value\n" +"Not Equal Value\n" +"Range\n" +"Increased By\n" +"Decreased By\n" +"Increased\n" +"Decreased\n" +"Different\n" +"No Change" +msgstr "" + +#: ../data/pcsx.glade2:2831 +msgid "" +"Decimal\n" +"Hexadecimal" +msgstr "" + +#: ../data/pcsx.glade2:3035 +msgid "label_resultsfound" +msgstr "" + +#: ../data/pcsx.glade2:3070 +msgid "Search" +msgstr "" + +#: ../data/pcsx.glade2:3106 +msgid "Restart" +msgstr "" + +#: ../data/pcsx.glade2:3135 +msgid "Cheat Search" +msgstr "" + +#: ../data/pcsx.glade2:3291 +msgid "Raw Dump..." +msgstr "" + +#: ../data/pcsx.glade2:3326 +msgid "Patch Memory..." +msgstr "" + +#: ../plugins/dfsound/spu.c:38 +msgid "Mac OS X Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:40 +msgid "ALSA Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:42 +msgid "OSS Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:44 +msgid "SDL Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:46 +msgid "PulseAudio Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:48 +msgid "NULL Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:51 +msgid "" +"P.E.Op.S. Sound Driver V1.7\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:42 +msgid "Volume:" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:54 +msgid "Interpolation:" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:68 +msgid "Reverb:" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:81 +msgid "" +"Low\n" +"Medium\n" +"Loud\n" +"Loudest" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:95 +msgid "" +"Off\n" +"Simple\n" +"Playstation" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:111 +msgid "" +"None\n" +"Simple\n" +"Gaussian\n" +"Cubic" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:132 +msgid "General" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:163 +msgid "Adjust XA speed" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:167 +msgid "Choose this if XA music is played too quickly." +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:184 +msgid "XA Music" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:215 +msgid "High compatibility mode" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:219 +msgid "Use the asynchronous SPU interface." +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:231 +msgid "SPU IRQ Wait" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:235 +msgid "Wait for CPU; only useful for some games." +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:247 +msgid "Single channel sound" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:251 +msgid "Play only one channel for a performance boost." +msgstr "" + +#: ../plugins/dfcdrom/cdr-libcdio.c:29 ../plugins/dfcdrom/cdr-linux.c:29 +msgid "CD-ROM Drive Reader" +msgstr "" + +#: ../plugins/dfcdrom/cdr-null.c:26 +msgid "CDR NULL Plugin" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/main.c:219 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:8 +msgid "CDR configuration" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:33 +msgid "Choose your CD-ROM device or type its path if it's not listed" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:44 +msgid "Select CD-ROM device" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:72 +msgid "Select read mode:" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:83 +msgid "" +"Normal (No Cache)\n" +"Threaded - Faster (With Cache)" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:114 +msgid "Cache Size (Def. 64):" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:159 +msgid "Spindown Time:" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:170 +msgid "" +"Default\n" +"125ms\n" +"250ms\n" +"500ms\n" +"1s\n" +"2s\n" +"4s\n" +"8s\n" +"16s\n" +"32s\n" +"1min\n" +"2min\n" +"4min\n" +"8min\n" +"16min\n" +"32min" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:216 +msgid "Cdrom Speed (Def. 0 = MAX):" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:248 +msgid "hseparator" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:258 +msgid "Enable subchannel read" +msgstr "" + +#: ../plugins/peopsxgl/gpu.c:61 +msgid "OpenGL Driver" +msgstr "" + +#: ../plugins/peopsxgl/gpu.c:63 +msgid "Pete Bernert" +msgstr "" + +#: ../plugins/peopsxgl/gpu.c:64 +msgid "" +"Based on P.E.Op.S. MesaGL Driver V1.78\n" +"Coded by Pete Bernert\n" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:118 +msgid "OpenGL Driver configuration" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:138 +msgid "Textures" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:161 +msgid "Quality:" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:178 +#: ../plugins/peopsxgl/gpucfg/interface.c:191 +msgid "0: don't care - Use driver's default textures" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:179 +msgid "1: 4444 - Fast, but less colorful" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:180 +msgid "2: 5551 - Nice colors, bad transparency" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:181 +msgid "3: 8888 - Best colors, more ram needed" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:182 +msgid "4: BGR8888 - Faster on some cards" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:193 +msgid "VRam size in MBytes (0..1024, 0=auto):" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:210 +#: ../plugins/peopsxgl/gpucfg/interface.c:225 +msgid "0: None" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:211 +msgid "1: Standard - Glitches will happen" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:212 +msgid "2: Extended - No black borders" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:213 +msgid "3: Standard without sprites - unfiltered 2D" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:214 +msgid "4: Extended without sprites - unfiltered 2D" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:215 +msgid "5: Standard + smoothed sprites" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:216 +msgid "6: Extended + smoothed sprites" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:227 +msgid "Filtering:" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:235 +msgid "HiRes Tex:" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:252 +#: ../plugins/peopsxgl/gpucfg/interface.c:263 +msgid "0: None (standard)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:253 +msgid "1: 2xSaI (much vram needed)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:254 +msgid "2: Scaled (needs tex filtering)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:265 +msgid "Window options" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:296 +msgid "Width:" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:305 +msgid "Height:" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:314 +msgid "Keep psx aspect ratio" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:330 +msgid "Dithering" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:346 +msgid "Framerate" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:369 +msgid "FPS" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:377 +msgid "FPS limit manual" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:386 +msgid "Show FPS display on startup" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:394 +msgid "Use FPS limit" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:402 +msgid "FPS limit auto-detection" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:411 +msgid "Use Frame skipping" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:419 +msgid "Compatibility" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:434 +msgid "Advanced blending (Accurate psx color emulation)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:442 +msgid "Framebuffer textures:" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:450 +msgid "Offscreen Drawing:" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:458 +msgid "Framebuffer access:" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:466 +msgid "Alpha Multipass (correct opaque texture areas)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:474 +msgid "Mask bit detection (needed by a few games, zbuffer)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:491 +#: ../plugins/peopsxgl/gpucfg/interface.c:504 +msgid "0: None - Fastest, most glitches" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:492 +msgid "1: Minimum - Missing screens" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:493 +msgid "2: Standard - OK for most games" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:494 +msgid "3: Enhanced - Shows more stuff" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:495 +msgid "4: Extended - Causing garbage" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:515 +#: ../plugins/peopsxgl/gpucfg/interface.c:527 +msgid "0: Emulated vram - Needs FVP" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:516 +msgid "1: Black - Fast, no effects" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:517 +msgid "2: Gfx card buffer - Can be slow" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:518 +msgid "3: Gfx card & soft - slow" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:538 +#: ../plugins/peopsxgl/gpucfg/interface.c:551 +msgid "0: Emulated vram - ok most times" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:539 +msgid "1: Gfx card buffer reads" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:540 +msgid "2: Gfx card buffer moves" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:541 +msgid "3: Gfx buffer reads & moves" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:542 +msgid "4: Full Software (FVP)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:553 +msgid "Special game fixes" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:576 +msgid "Battle cursor (FF7)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:584 +msgid "Direct FB updates" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:592 +msgid "Black brightness (Lunar)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:600 +msgid "Swap front detection" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:608 +msgid "Disable coord check" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:616 +msgid "No blue glitches (LoD)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:624 +msgid "Soft FB access" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:632 +msgid "PC fps calculation" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:648 +msgid "Yellow rect (FF9)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:656 +msgid "No subtr. blending" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:664 +msgid "Lazy upload (DW7)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:672 +msgid "Odd/even hack" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:680 +msgid "Adjust screen width" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:688 +msgid "Old texture filtering" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:696 +msgid "Additional uploads" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:704 +msgid "unused" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:712 +msgid "Fake 'gpu busy'" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:720 +msgid "Misc" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:743 +msgid "Scanlines" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:751 +msgid "Blending (0..255, -1=dot):" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:759 +msgid "Screen smoothing (can be slow or unsupported)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:767 +msgid "Use OpenGL extensions (recommended)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:775 +msgid "Polygon anti-aliasing (slow with most cards)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:783 +msgid "Line mode (polygons will not get filled)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:791 +msgid "Force 15 bit framebuffer updates (faster movies)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:799 +msgid "Unfiltered MDECs (small movie speedup)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:852 +msgid "Adapted from P.E.Op.S OpenGL GPU by Pete Bernert" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:861 +msgid "Homepage: http://www.pbernert.com" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:879 +msgid "Version: 1.78" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:48 +msgid "D-Pad Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:49 +msgid "D-Pad Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:50 +msgid "D-Pad Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:51 +msgid "D-Pad Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:52 +msgid "Cross" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:53 +msgid "Circle" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:54 +msgid "Square" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:55 +msgid "Triangle" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:56 +msgid "L1" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:57 +msgid "R1" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:58 +msgid "L2" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:59 +msgid "R2" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:60 +msgid "Select" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:61 +msgid "Start" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:62 +msgid "L3" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:63 +msgid "R3" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:67 +msgid "L-Stick Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:68 +msgid "L-Stick Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:69 +msgid "L-Stick Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:70 +msgid "L-Stick Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:71 +msgid "R-Stick Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:72 +msgid "R-Stick Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:73 +msgid "R-Stick Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:74 +msgid "R-Stick Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Centered" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Rightup" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Rightdown" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Leftup" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:105 ../plugins/dfinput/cfg-gtk2.c:144 +msgid "Leftdown" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:109 ../plugins/dfinput/cfg-gtk2.c:148 +#, c-format +msgid "Joystick: Button %d" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:113 ../plugins/dfinput/cfg-gtk2.c:152 +#, c-format +msgid "Joystick: Axis %d%c" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:118 ../plugins/dfinput/cfg-gtk2.c:157 +#, c-format +msgid "Joystick: Hat %d %s" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:133 ../plugins/dfinput/cfg-gtk2.c:172 +msgid "Keyboard:" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:137 ../plugins/dfinput/cfg-gtk2.c:176 +msgid "(Not Set)" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:539 +msgid "None" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:581 +msgid "Gamepad/Keyboard Input Configuration" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:587 ../plugins/dfinput/cfg-gtk2.c:607 +msgid "Key" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:593 ../plugins/dfinput/cfg-gtk2.c:613 +msgid "Button" +msgstr "" + +#: ../plugins/dfinput/pad.c:22 +msgid "Gamepad/Keyboard Input" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:35 ../plugins/dfinput/dfinput.glade2:232 +msgid "Device:" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:66 ../plugins/dfinput/dfinput.glade2:263 +msgid "Type:" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:78 ../plugins/dfinput/dfinput.glade2:275 +msgid "" +"Digital Pad\n" +"Analog Pad" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:149 ../plugins/dfinput/dfinput.glade2:346 +msgid "Change" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:185 ../plugins/dfinput/dfinput.glade2:382 +msgid "Reset" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:210 +msgid "Controller 1" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:412 +msgid "Controller 2" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:427 +msgid "Multi-Threaded (Recommended)" +msgstr "" + +#: ../plugins/dfnet/dfnet.c:23 +msgid "Socket Driver" +msgstr "" + +#: ../plugins/dfnet/dfnet.c:161 +#, c-format +msgid "error connecting to %s: %s\n" +msgstr "" + +#: ../plugins/dfnet/dfnet.c:186 +msgid "Error allocating memory!\n" +msgstr "" + +#: ../plugins/dfnet/gui.c:39 +msgid "Nothing to configure" +msgstr "" + +#: ../plugins/dfnet/gui.c:95 +#, c-format +msgid "IP %s" +msgstr "" + +#: ../plugins/dfnet/gui.c:165 +msgid "Waiting for connection..." +msgstr "" + +#: ../plugins/dfnet/gui.c:168 +msgid "The Client should now Start a Connection, waiting..." +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:23 +msgid "" +"Select here if you'll be Server (Player1) or Client (Player2).\n" +"\n" +"If you select Server you must Copy your IP address to the Clipboard and " +"paste if (Ctrl+V) wherever the Client can see it.\n" +"\n" +"If you selected Client please enter the IP address the Server gave to you in " +"the IP Address Control." +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:63 +msgid "Copy PC IP to Clipboard" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:94 +msgid "Server (Player1)" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:104 +msgid "Client (Player2)" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:130 +msgid "" +"Do not change if not necessary (remember it must be changed on both sides)." +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:143 +msgid "Port Number" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:202 +msgid "Start Game" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:240 +msgid "Play Offline" +msgstr "" + +#: ../plugins/bladesio1/sio1.c:29 +msgid "Sio1 Driver" +msgstr "" diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo new file mode 100644 index 0000000000000000000000000000000000000000..ad18e8d2b78bec2aacc525a3b3fc570eaccf3dcc GIT binary patch literal 38731 zcmb`Q33y#a-Tx1p*vq~zVmU1|O-hp{X-i9hLYk%vG)+jl0ZKTz_awRP%{`a9v}s)s z1Vt1VKyjDlRRsPBih$z6s}V)T1$R(T6n6z)ecjO4_y76M%(?g6G-=^^-up29oLSDC z+2=REnF&uGzVACdeslKryc6Jx!#wW^o^!M1>UlqF_PjIq^1P?u0_-R9kJ#&YDV%}* zF2_&9mtdcO2g9$yL*Qd@Klodig3m&|_dGlV?%QhpkA(YUKOPAAtM9+o95R7u0+ALdEk1sQ13=?B9h-_mAOR z_$$}|4{r0kitfrD!3Rb-LHp- z!yBN|aXVCf-3xvA9jJ8w8TP|}!o%UZh1NfS^RZtJsY>rIsCs$=z6?GMXF+d~wak7{|{8W2Q0PidL}#udka)L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B{-FKn(QX*p+=mWX~aMY(6IXYqW4f!YoFC(a zrn}*)NzsWNlWw@yNdue(INhIkpq$Ocg1r_z32hsHIm#ZHVrrY zHAD?DwY9eW)4BZ|FR>f+Y?{#fS?*3cz{wq0CI$BGb(Yx4O&S0P*9F@U?acr*NNVM# zzuj#ANRnyayWE4-y|KYgJJISYY~pg*puHS6h;*$LL%cOorzISW2N-=T)|hcu)m{J_ ztX=vVOe{fam%g|n8&7wfLeL$rczPbR5{Vtx2jkmabdSVk3;hpx&=<0%MqN$|Gn*6z zqy9#$tVubE-q_*k#;jIeG~E$*Uc=mt9^-~=_s5Fr(=5=yAxpN5Tq&n vkrhqSToo&EnK-Kx1FX^3XNM+klSXzUV-NPm@;3fbbiQ^s)hX~QrrG{~>, 2009. +msgid "" +msgstr "" +"Project-Id-Version: pcsx-df\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-07-10 14:04+0800\n" +"PO-Revision-Date: 2009-11-28 23:57+0700\n" +"Last-Translator: Wei Mingzhi \n" +"Language-Team: PoBRE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.2\n" + +#: ../win32/gui/AboutDlg.c:26 +msgid "" +"PCSX - A PlayStation Emulator\n" +"\n" +"Original Authors:\n" +"main coder: linuzappz\n" +"co-coders: shadow\n" +"ex-coders: Nocomp, Pete Bernett, nik3d\n" +"Webmaster: AkumaX" +msgstr "" +"PCSX - Um Emulador de PlayStation\n" +"\n" +"Autores Originais:\n" +"Programador principal: linuzappz\n" +"Programador auxiliar: shadow\n" +"Ex-programadores: Nocomp, Pete Bernett, nik3d\n" +"Webmaster: AkumaX" + +#: ../win32/gui/AboutDlg.c:35 +#, fuzzy +msgid "" +"PCSX-df Authors:\n" +"Ryan Schultz, Andrew Burton, Stephen Chao,\n" +"Marcus Comstedt, Stefan Sikora\n" +"\n" +"PCSX-Reloaded By:\n" +"Blade_Arma, Wei Mingzhi, et al.\n" +"\n" +"http://pcsxr.codeplex.com/" +msgstr "" +"Autores do PCSX-df:\n" +"Ryan Schultz, Andrew Burton, Stephen Chao,\n" +"Marcus Comstedt, Stefan Sikora\n" +"\n" +"PCSX Reloaded por:\n" +"Wei Mingzhi\n" +"\n" +"http://www.codeplex.com/pcsxr" + +#: ../win32/gui/AboutDlg.c:46 ../plugins/peopsxgl/gpucfg/interface.c:831 +msgid "About" +msgstr "Sobre" + +#: ../win32/gui/AboutDlg.c:48 ../win32/gui/AboutDlg.c:52 +#: ../win32/gui/CheatDlg.c:69 ../win32/gui/CheatDlg.c:119 +#: ../win32/gui/ConfigurePlugins.c:483 ../win32/gui/ConfigurePlugins.c:614 +#: ../win32/gui/WndMain.c:974 ../win32/gui/WndMain.c:1210 +#: ../plugins/peopsxgl/gpucfg/interface.c:130 +#: ../plugins/peopsxgl/gpucfg/interface.c:843 +msgid "OK" +msgstr "OK" + +#: ../win32/gui/AboutDlg.c:49 +msgid "PCSX EMU\n" +msgstr "EMULADOR PCSX\n" + +#: ../win32/gui/CheatDlg.c:51 ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "Yes" +msgstr "Sim" + +#: ../win32/gui/CheatDlg.c:51 ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "No" +msgstr "Não" + +#: ../win32/gui/CheatDlg.c:66 ../gui/Cheat.c:194 +msgid "Edit Cheat" +msgstr "Editar Trapaça" + +#: ../win32/gui/CheatDlg.c:67 ../win32/gui/CheatDlg.c:117 ../gui/Cheat.c:636 +msgid "Description:" +msgstr "Descrição:" + +#: ../win32/gui/CheatDlg.c:68 ../win32/gui/CheatDlg.c:118 ../gui/Cheat.c:125 +#: ../gui/Cheat.c:211 +msgid "Cheat Code:" +msgstr "Código de Trapaça:" + +#: ../win32/gui/CheatDlg.c:70 ../win32/gui/CheatDlg.c:120 +#: ../win32/gui/ConfigurePlugins.c:484 ../win32/gui/ConfigurePlugins.c:615 +#: ../win32/gui/WndMain.c:975 ../win32/gui/WndMain.c:1211 +#: ../plugins/peopsxgl/gpucfg/interface.c:338 +msgid "Cancel" +msgstr "Cancelar" + +#: ../win32/gui/CheatDlg.c:91 ../win32/gui/CheatDlg.c:132 ../gui/Cheat.c:155 +#: ../gui/Cheat.c:251 +msgid "Invalid cheat code!" +msgstr "Código de trapaça inválido!" + +#: ../win32/gui/CheatDlg.c:116 ../gui/Cheat.c:109 +msgid "Add New Cheat" +msgstr "Adicionar nova Trapaça" + +#: ../win32/gui/CheatDlg.c:166 ../data/pcsx.glade2:2534 +msgid "Edit Cheat Codes" +msgstr "Editar Códigos de Trapaça" + +#: ../win32/gui/CheatDlg.c:168 +msgid "&Add Code" +msgstr "&Adicionar código" + +#: ../win32/gui/CheatDlg.c:169 +msgid "&Edit Code" +msgstr "&Editar trapaça" + +#: ../win32/gui/CheatDlg.c:170 +msgid "&Remove Code" +msgstr "&Remover trapaça" + +#: ../win32/gui/CheatDlg.c:171 +msgid "&Enable/Disable" +msgstr "Ativar ou desativar" + +#: ../win32/gui/CheatDlg.c:172 +msgid "&Load..." +msgstr "&Carregar..." + +#: ../win32/gui/CheatDlg.c:173 +msgid "&Save As..." +msgstr "&Salvar como..." + +#: ../win32/gui/CheatDlg.c:174 +msgid "&Close" +msgstr "&Fechar" + +#: ../win32/gui/CheatDlg.c:185 ../gui/Cheat.c:413 +msgid "Description" +msgstr "Descrição" + +#: ../win32/gui/CheatDlg.c:190 +msgid "Enabled" +msgstr "Ligado" + +#: ../win32/gui/CheatDlg.c:282 ../win32/gui/CheatDlg.c:311 +msgid "PCSX Cheat Code Files" +msgstr "Arquivos de trapaça do PCSX" + +#: ../win32/gui/CheatDlg.c:402 +msgid "Equal Value" +msgstr "Valores igual à" + +#: ../win32/gui/CheatDlg.c:403 +msgid "Not Equal Value" +msgstr "Valores diferente de" + +#: ../win32/gui/CheatDlg.c:404 +msgid "Range" +msgstr "Intervalo" + +#: ../win32/gui/CheatDlg.c:407 +msgid "Increased By" +msgstr "Somado por" + +#: ../win32/gui/CheatDlg.c:408 +msgid "Decreased By" +msgstr "Subtraído por" + +#: ../win32/gui/CheatDlg.c:409 +msgid "Increased" +msgstr "Maiores" + +#: ../win32/gui/CheatDlg.c:410 +msgid "Decreased" +msgstr "Menores" + +#: ../win32/gui/CheatDlg.c:411 +msgid "Different" +msgstr "Diferentes" + +#: ../win32/gui/CheatDlg.c:412 +msgid "No Change" +msgstr "Sem mudanças" + +#: ../win32/gui/CheatDlg.c:448 ../gui/Cheat.c:585 +msgid "Enter the values and start your search." +msgstr "Digite algum número para começar a pesquisa." + +#: ../win32/gui/CheatDlg.c:453 +msgid "No addresses found." +msgstr "Nenhum endereço encontrado com esse número." + +#: ../win32/gui/CheatDlg.c:457 ../gui/Cheat.c:543 +msgid "Too many addresses found." +msgstr "Muitos endereços encontrados com esse número, refine a pesquisa." + +#: ../win32/gui/CheatDlg.c:466 ../gui/Cheat.c:552 +#, c-format +msgid "%.8X Current: %u (%.2X), Previous: %u (%.2X)" +msgstr "%.8X Atual: %u (%.2X), Anterior: %u (%.2X)" + +#: ../win32/gui/CheatDlg.c:471 ../gui/Cheat.c:557 +#, c-format +msgid "%.8X Current: %u (%.4X), Previous: %u (%.4X)" +msgstr "%.8X Atual: %u (%.4X), Anterior: %u (%.4X)" + +#: ../win32/gui/CheatDlg.c:476 ../gui/Cheat.c:562 +#, c-format +msgid "%.8X Current: %u (%.8X), Previous: %u (%.8X)" +msgstr "%.8X Atual: %u (%.8X), Anterior: %u (%.8X)" + +#: ../win32/gui/CheatDlg.c:492 ../gui/Cheat.c:577 +#, c-format +msgid "Founded Addresses: %d" +msgstr "Endereços com o número: %d" + +#: ../win32/gui/CheatDlg.c:504 ../data/pcsx.glade2:2930 +msgid "Freeze" +msgstr "Parar" + +#: ../win32/gui/CheatDlg.c:505 ../win32/gui/CheatDlg.c:596 +msgid "Address:" +msgstr "Endereço:" + +#: ../win32/gui/CheatDlg.c:506 ../win32/gui/CheatDlg.c:597 +#: ../win32/gui/CheatDlg.c:682 ../gui/Cheat.c:647 ../data/pcsx.glade2:2773 +msgid "Value:" +msgstr "Valor:" + +#: ../win32/gui/CheatDlg.c:566 +#, c-format +msgid "Freeze %.8X" +msgstr "Parar %.8X" + +#: ../win32/gui/CheatDlg.c:595 ../data/pcsx.glade2:2966 +msgid "Modify" +msgstr "Modificar" + +#: ../win32/gui/CheatDlg.c:678 ../gui/Cheat.c:1129 ../data/pcsx.glade2:2703 +msgid "Cheat Search" +msgstr "Procurar por trapaça" + +#: ../win32/gui/CheatDlg.c:680 ../data/pcsx.glade2:2751 +msgid "Search For:" +msgstr "Buscar por:" + +#: ../win32/gui/CheatDlg.c:681 ../data/pcsx.glade2:2761 +msgid "Data Type:" +msgstr "Tipo de dados:" + +#: ../win32/gui/CheatDlg.c:683 ../data/pcsx.glade2:2785 +msgid "Data Base:" +msgstr "Banco de dados:" + +#: ../win32/gui/CheatDlg.c:684 ../data/pcsx.glade2:2845 +msgid "To:" +msgstr "Para:" + +#: ../win32/gui/CheatDlg.c:685 +msgid "&Freeze" +msgstr "&Parar" + +#: ../win32/gui/CheatDlg.c:686 +msgid "&Modify" +msgstr "&Modificar" + +#: ../win32/gui/CheatDlg.c:687 +msgid "&Copy" +msgstr "&Copiar" + +#: ../win32/gui/CheatDlg.c:688 +msgid "&Search" +msgstr "&Buscar" + +#: ../win32/gui/CheatDlg.c:689 +msgid "&New Search" +msgstr "&Nova busca" + +#: ../win32/gui/CheatDlg.c:690 +msgid "C&lose" +msgstr "Fe&char" + +#: ../win32/gui/CheatDlg.c:692 +msgid "8-bit" +msgstr "8-bit" + +#: ../win32/gui/CheatDlg.c:693 +msgid "16-bit" +msgstr "16-bit" + +#: ../win32/gui/CheatDlg.c:694 +msgid "32-bit" +msgstr "32-bit" + +#: ../win32/gui/CheatDlg.c:695 +msgid "Decimal" +msgstr "Decimal" + +#: ../win32/gui/CheatDlg.c:696 +msgid "Hexadecimal" +msgstr "Hexadecimal" + +#: ../win32/gui/ConfigurePlugins.c:219 +msgid "Simulate Psx Bios" +msgstr "" + +#: ../win32/gui/ConfigurePlugins.c:305 +msgid "Configuration not OK!" +msgstr "Não configurou corretamente!" + +#: ../win32/gui/ConfigurePlugins.c:305 ../gui/Cheat.c:155 ../gui/Cheat.c:251 +#: ../gui/LnxMain.c:418 +msgid "Error" +msgstr "Erro" + +#: ../win32/gui/ConfigurePlugins.c:406 +msgid "This plugin reports that should work correctly" +msgstr "Esta extensão informou que deve funcionar corretamente." + +#: ../win32/gui/ConfigurePlugins.c:407 +msgid "This plugin reports that should not work correctly" +msgstr "Esta extensão informou que não deve funcionar corretamente." + +#: ../win32/gui/ConfigurePlugins.c:463 +msgid "Select Plugins Directory" +msgstr "Escolha o diretório das extensões" + +#: ../win32/gui/ConfigurePlugins.c:472 +msgid "Select Bios Directory" +msgstr "Escolha o diretório da BIOS" + +#: ../win32/gui/ConfigurePlugins.c:481 +msgid "Configuration" +msgstr "Configuração" + +#: ../win32/gui/ConfigurePlugins.c:485 +msgid "Graphics" +msgstr "Gráficos" + +#: ../win32/gui/ConfigurePlugins.c:486 +msgid "First Controller" +msgstr "Controle 1" + +#: ../win32/gui/ConfigurePlugins.c:487 +msgid "Second Controller" +msgstr "Controle 2" + +#: ../win32/gui/ConfigurePlugins.c:488 +msgid "Sound" +msgstr "Áudio" + +#: ../win32/gui/ConfigurePlugins.c:489 +msgid "Cdrom" +msgstr "CDROM" + +#: ../win32/gui/ConfigurePlugins.c:490 +msgid "Bios" +msgstr "BIOS" + +#: ../win32/gui/ConfigurePlugins.c:491 +msgid "Set Bios Directory" +msgstr "Escolher o diretório da BIOS" + +#: ../win32/gui/ConfigurePlugins.c:492 +msgid "Set Plugins Directory" +msgstr "Escolher o diretório das extensões" + +#: ../win32/gui/ConfigurePlugins.c:493 ../win32/gui/ConfigurePlugins.c:496 +#: ../win32/gui/ConfigurePlugins.c:499 ../win32/gui/ConfigurePlugins.c:502 +#: ../win32/gui/ConfigurePlugins.c:505 ../win32/gui/ConfigurePlugins.c:617 +msgid "Configure..." +msgstr "Configurar..." + +#: ../win32/gui/ConfigurePlugins.c:494 ../win32/gui/ConfigurePlugins.c:497 +#: ../win32/gui/ConfigurePlugins.c:500 ../win32/gui/ConfigurePlugins.c:503 +#: ../win32/gui/ConfigurePlugins.c:506 ../win32/gui/ConfigurePlugins.c:618 +msgid "Test..." +msgstr "Testar..." + +#: ../win32/gui/ConfigurePlugins.c:495 ../win32/gui/ConfigurePlugins.c:498 +#: ../win32/gui/ConfigurePlugins.c:501 ../win32/gui/ConfigurePlugins.c:504 +#: ../win32/gui/ConfigurePlugins.c:507 ../win32/gui/ConfigurePlugins.c:619 +msgid "About..." +msgstr "Sobre..." + +#: ../win32/gui/ConfigurePlugins.c:612 +msgid "NetPlay Configuration" +msgstr "Configuração do jogo em rede" + +#: ../win32/gui/ConfigurePlugins.c:616 ../plugins/dfnet/gui.c:31 +#: ../plugins/dfnet/gui.c:112 +msgid "NetPlay" +msgstr "Jogo em rede" + +#: ../win32/gui/ConfigurePlugins.c:620 +msgid "" +"Note: The NetPlay Plugin Directory should be the same as the other Plugins." +msgstr "" +"Observação: o diretório da extensão de jogo em rede deve ser o mesmo que " +"odas outras extensões." + +#: ../win32/gui/plugin.c:90 ../win32/gui/WndMain.c:281 +#, c-format +msgid "*PCSX*: Saved State %d" +msgstr "PCSX: Estado \"%d\" salvo." + +#: ../win32/gui/plugin.c:91 ../win32/gui/WndMain.c:282 +#, c-format +msgid "*PCSX*: Error Saving State %d" +msgstr "PCSX: Erro ao salvar o estado \"%d\"!" + +#: ../win32/gui/plugin.c:107 ../win32/gui/WndMain.c:259 +#, c-format +msgid "*PCSX*: Loaded State %d" +msgstr "PCSX: Estado \"%d\" carregado." + +#: ../win32/gui/plugin.c:108 ../win32/gui/WndMain.c:260 +#, c-format +msgid "*PCSX*: Error Loading State %d" +msgstr "PCSX: Erro ao carregar o estado \"%d\"!" + +#: ../win32/gui/plugin.c:119 +#, c-format +msgid "*PCSX*: Sio Irq Always Enabled" +msgstr "PCSX: IRQ SIO sempre ativada." + +#: ../win32/gui/plugin.c:120 +#, c-format +msgid "*PCSX*: Sio Irq Not Always Enabled" +msgstr "PCSX: IRQ SIO nem sempre ativada." + +#: ../win32/gui/plugin.c:127 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Enabled" +msgstr "PCSX: Mdecs apenas em preto e branco." + +#: ../win32/gui/plugin.c:128 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Disabled" +msgstr "PCSX: Mdecs coloridas." + +#: ../win32/gui/plugin.c:135 +#, c-format +msgid "*PCSX*: Xa Enabled" +msgstr "PCSX: XA Ligado." + +#: ../win32/gui/plugin.c:136 +#, c-format +msgid "*PCSX*: Xa Disabled" +msgstr "PCSX: XA Desligado." + +#: ../win32/gui/plugin.c:145 +msgid "*PCSX*: CdRom Case Opened" +msgstr "PCSX: Bandeja do CDROM aberta." + +#: ../win32/gui/plugin.c:150 +msgid "*PCSX*: CdRom Case Closed" +msgstr "PCSX: Bandeja do CDROM fechada." + +#: ../win32/gui/plugin.c:177 +msgid "Connecting..." +msgstr "Conectando..." + +#: ../win32/gui/plugin.c:179 ../win32/gui/plugin.c:186 +#, c-format +msgid "Please wait while connecting... %c\n" +msgstr "Por favor, espere enquanto o emulador se conecta... %c\n" + +#: ../win32/gui/plugin.c:214 +msgid "Error Opening CDR Plugin" +msgstr "Erro ao abrir a extensão de CDROM!" + +#: ../win32/gui/plugin.c:277 +#, c-format +msgid "Error Opening GPU Plugin (%d)" +msgstr "Erro ao abrir a extensão de GPU (%d)!" + +#: ../win32/gui/plugin.c:279 +#, c-format +msgid "Error Opening SPU Plugin (%d)" +msgstr "Erro ao abrir a extensão de SPU (%d)!" + +#: ../win32/gui/plugin.c:282 +#, c-format +msgid "Error Opening PAD1 Plugin (%d)" +msgstr "Erro ao abrir a extensão do controle 1 (%d)!" + +#: ../win32/gui/plugin.c:284 +#, c-format +msgid "Error Opening PAD2 Plugin (%d)" +msgstr "Erro ao abrir a extensão do controle 2 (%d)!" + +#: ../win32/gui/plugin.c:314 +msgid "Error Closing CDR Plugin" +msgstr "Erro ao fechar a extensão de CDROM!" + +#: ../win32/gui/plugin.c:316 +msgid "Error Closing GPU Plugin" +msgstr "Erro ao fechar a extensão de GPU!" + +#: ../win32/gui/plugin.c:318 +msgid "Error Closing SPU Plugin" +msgstr "Erro ao fechar a extensão de SPU!" + +#: ../win32/gui/plugin.c:336 +#, c-format +msgid "CDRinit error: %d" +msgstr "Erro ao iniciar o CDROM: %d" + +#: ../win32/gui/plugin.c:338 +#, c-format +msgid "GPUinit error: %d" +msgstr "Erro ao iniciar a GPU: %d" + +#: ../win32/gui/plugin.c:340 +#, c-format +msgid "SPUinit error: %d" +msgstr "Erro ao iniciar a SPU: %d" + +#: ../win32/gui/plugin.c:342 +#, c-format +msgid "PAD1init error: %d" +msgstr "Erro ao iniciar o controle 1: %d" + +#: ../win32/gui/plugin.c:344 +#, c-format +msgid "PAD2init error: %d" +msgstr "Erro ao iniciar o controle 2: %d" + +#: ../win32/gui/plugin.c:347 +#, c-format +msgid "NETinit error: %d" +msgstr "Erro ao iniciar a rede: %d" + +#: ../win32/gui/WndMain.c:76 +msgid "Arabic" +msgstr "Arábico" + +#: ../win32/gui/WndMain.c:77 +msgid "Catalan" +msgstr "Catalão" + +#: ../win32/gui/WndMain.c:78 +msgid "German" +msgstr "Alemão" + +#: ../win32/gui/WndMain.c:79 +msgid "Greek" +msgstr "Grego" + +#: ../win32/gui/WndMain.c:80 ../win32/gui/WndMain.c:1566 +#: ../win32/gui/WndMain.c:1568 +msgid "English" +msgstr "Inglês" + +#: ../win32/gui/WndMain.c:81 +msgid "Spanish" +msgstr "Espanhol" + +#: ../win32/gui/WndMain.c:82 +msgid "French" +msgstr "Francês" + +#: ../win32/gui/WndMain.c:83 +msgid "Italian" +msgstr "Italiano" + +#: ../win32/gui/WndMain.c:84 +msgid "Portuguese" +msgstr "Português" + +#: ../win32/gui/WndMain.c:85 +#, fuzzy +msgid "Portuguese (Brazilian)" +msgstr "Português" + +#: ../win32/gui/WndMain.c:86 +msgid "Romanian" +msgstr "Romeno" + +#: ../win32/gui/WndMain.c:87 +msgid "Russian" +msgstr "Russo" + +#: ../win32/gui/WndMain.c:88 +msgid "Simplified Chinese" +msgstr "Chinês Simplificado" + +#: ../win32/gui/WndMain.c:89 +msgid "Traditional Chinese" +msgstr "Chinês Tradicional" + +#: ../win32/gui/WndMain.c:90 +msgid "Japanese" +msgstr "Japonês" + +#: ../win32/gui/WndMain.c:91 +msgid "Korean" +msgstr "Coreano" + +#: ../win32/gui/WndMain.c:300 ../win32/gui/WndMain.c:352 +msgid "PCSX State Format" +msgstr "Formato dos estados salvos do PCSX" + +#: ../win32/gui/WndMain.c:327 +#, c-format +msgid "*PCSX*: Loaded State %s" +msgstr "PCSX: Arquivo de estado \"%s\" carregado." + +#: ../win32/gui/WndMain.c:328 +#, c-format +msgid "*PCSX*: Error Loading State %s" +msgstr "PCSX: Erro ao carregar o arquivo de estado \"%s\"!" + +#: ../win32/gui/WndMain.c:379 +#, c-format +msgid "*PCSX*: Saved State %s" +msgstr "PCSX: Arquivo de estado \"%s\" salvo." + +#: ../win32/gui/WndMain.c:380 +#, c-format +msgid "*PCSX*: Error Saving State %s" +msgstr "PCSX: Erro ao salvar o arquivo de estado \"%s\"!" + +#: ../win32/gui/WndMain.c:429 ../win32/gui/WndMain.c:478 ../gui/Gtk2Gui.c:485 +#: ../gui/Gtk2Gui.c:610 +msgid "The CD does not appear to be a valid Playstation CD" +msgstr "Esse CD não parece ser um CD de PlayStation!" + +#: ../win32/gui/WndMain.c:435 ../win32/gui/WndMain.c:484 ../gui/Gtk2Gui.c:493 +#: ../gui/Gtk2Gui.c:618 +msgid "Could not load CD-ROM!" +msgstr "Não pôde carregar o CDROM!" + +#: ../win32/gui/WndMain.c:445 +msgid "Running BIOS is not supported with Internal HLE Bios." +msgstr "Iniciar pela BIOS não é suportado com a BIOS HLE interna." + +#: ../win32/gui/WndMain.c:664 ../gui/MemcardDlg.c:62 +msgid "Title" +msgstr "Título" + +#: ../win32/gui/WndMain.c:670 ../gui/MemcardDlg.c:68 +msgid "Status" +msgstr "Estado" + +#: ../win32/gui/WndMain.c:676 +msgid "Game ID" +msgstr "ID do Jogo" + +#: ../win32/gui/WndMain.c:682 +msgid "Game" +msgstr "Jogo" + +#: ../win32/gui/WndMain.c:864 +msgid "mid link block" +msgstr "bloco de ligação intermediário" + +#: ../win32/gui/WndMain.c:867 +msgid "terminiting link block" +msgstr "bloco final da ligação" + +#: ../win32/gui/WndMain.c:875 ../gui/MemcardDlg.c:155 ../gui/MemcardDlg.c:260 +msgid "Deleted" +msgstr "Apagado" + +#: ../win32/gui/WndMain.c:876 ../win32/gui/WndMain.c:879 +#: ../gui/MemcardDlg.c:157 ../gui/MemcardDlg.c:161 ../gui/MemcardDlg.c:262 +#: ../gui/MemcardDlg.c:266 +msgid "Free" +msgstr "Liberado" + +#: ../win32/gui/WndMain.c:878 ../gui/MemcardDlg.c:159 ../gui/MemcardDlg.c:264 +msgid "Used" +msgstr "Usado" + +#: ../win32/gui/WndMain.c:972 +msgid "Memcard Manager" +msgstr "Gerenciador de cartões de memória" + +#: ../win32/gui/WndMain.c:976 ../win32/gui/WndMain.c:979 +msgid "Select Mcd" +msgstr "Selecionar cartão" + +#: ../win32/gui/WndMain.c:977 ../win32/gui/WndMain.c:980 +msgid "Format Mcd" +msgstr "Formatar cartão" + +#: ../win32/gui/WndMain.c:978 ../win32/gui/WndMain.c:981 +msgid "Reload Mcd" +msgstr "Reiniciar cartão" + +#: ../win32/gui/WndMain.c:982 +msgid "-> Copy ->" +msgstr "-> Copiar ->" + +#: ../win32/gui/WndMain.c:983 +msgid "<- Copy <-" +msgstr "<- Copiar <-" + +#: ../win32/gui/WndMain.c:984 +msgid "Paste" +msgstr "Colar" + +#: ../win32/gui/WndMain.c:985 +msgid "<- Un/Delete" +msgstr "<- Apagar/Desfazer" + +#: ../win32/gui/WndMain.c:986 +msgid "Un/Delete ->" +msgstr "Apagar/Desfazer ->" + +#: ../win32/gui/WndMain.c:988 +msgid "Memory Card 1" +msgstr "Cartão de memória 1" + +#: ../win32/gui/WndMain.c:989 +msgid "Memory Card 2" +msgstr "Cartão de memória 2" + +#: ../win32/gui/WndMain.c:1044 +msgid "Are you sure you want to paste this selection?" +msgstr "Você tem certeza que quer colar o selecionado?" + +#: ../win32/gui/WndMain.c:1044 ../win32/gui/WndMain.c:1155 +#: ../win32/gui/WndMain.c:1162 +msgid "Confirmation" +msgstr "Confirmação" + +#: ../win32/gui/WndMain.c:1155 ../win32/gui/WndMain.c:1162 +msgid "Are you sure you want to format this Memory Card?" +msgstr "Você tem certeza que quer formatar esse Cartão de Memória?" + +#: ../win32/gui/WndMain.c:1208 +msgid "Cpu Config" +msgstr "Configuração da CPU" + +#: ../win32/gui/WndMain.c:1213 +msgid "Disable Xa Decoding" +msgstr "Desativar decodificação de XA" + +#: ../win32/gui/WndMain.c:1214 +msgid "Sio Irq Always Enabled" +msgstr "IRQ SIO sempre ativado" + +#: ../win32/gui/WndMain.c:1215 +msgid "Black && White Movies" +msgstr "Filmes em preto e branco" + +#: ../win32/gui/WndMain.c:1216 +msgid "Disable Cd audio" +msgstr "Desativar áudio de CD" + +#: ../win32/gui/WndMain.c:1217 ../data/pcsx.glade2:1595 +msgid "Autodetect" +msgstr "Detectar Automaticamente" + +#: ../win32/gui/WndMain.c:1218 +msgid "Enable Interpreter Cpu" +msgstr "Ativar interpretador da CPU" + +#: ../win32/gui/WndMain.c:1219 ../data/pcsx.glade2:1451 +msgid "Enable Console Output" +msgstr "Ativar saída no terminal" + +#: ../win32/gui/WndMain.c:1220 ../data/pcsx.glade2:1401 +msgid "Enable Debugger" +msgstr "Ligar debugger" + +#: ../win32/gui/WndMain.c:1221 +msgid "Spu Irq Always Enabled" +msgstr "IRQ da SPU sempre ligada" + +#: ../win32/gui/WndMain.c:1222 ../data/pcsx.glade2:1538 +msgid "Parasite Eve 2, Vandal Hearts 1/2 Fix" +msgstr "Correção para Parasite Eve 2, Vandal Hearts..." + +#: ../win32/gui/WndMain.c:1223 ../data/pcsx.glade2:1553 +msgid "InuYasha Sengoku Battle Fix" +msgstr "Correção para InuYasha, Sengoku Battle..." + +#: ../win32/gui/WndMain.c:1225 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:277 +#: ../plugins/dfinput/dfinput.glade2:448 +msgid "Options" +msgstr "Opções" + +#: ../win32/gui/WndMain.c:1226 +msgid "Psx System Type" +msgstr "Tipo de sistema do PSX" + +#: ../win32/gui/WndMain.c:1330 +msgid "Psx Mcd Format (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)" +msgstr "Qualquer formato (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)" + +#: ../win32/gui/WndMain.c:1335 +msgid "Psx Memory Card (*.mcr;*.mc)" +msgstr "Cartão de memória binário (*.mcr;*.mc)" + +#: ../win32/gui/WndMain.c:1340 +msgid "CVGS Memory Card (*.mem;*.vgs)" +msgstr "Cartão de memória do CVGS (*.mem;*.vgs)" + +#: ../win32/gui/WndMain.c:1345 +msgid "Bleem Memory Card (*.mcd)" +msgstr "Cartão de memória do Bleem (*.mcd)" + +#: ../win32/gui/WndMain.c:1350 +msgid "DexDrive Memory Card (*.gme)" +msgstr "Cartão de memória do DexDrive (*.gme)" + +#: ../win32/gui/WndMain.c:1355 +msgid "DataDeck Memory Card (*.ddf)" +msgstr "Cartão de memória do DataDeck (*.ddf)" + +#: ../win32/gui/WndMain.c:1360 ../win32/gui/WndMain.c:1441 ../gui/Cheat.c:321 +#: ../gui/Gtk2Gui.c:422 ../gui/Gtk2Gui.c:561 +msgid "All Files" +msgstr "Todos os arquivos" + +#: ../win32/gui/WndMain.c:1399 +msgid "Psx Exe Format" +msgstr "Formato executável do PSX" + +#: ../win32/gui/WndMain.c:1436 +msgid "Psx Isos (*.iso;*.mdf;*.img;*.bin)" +msgstr "Imagens de CD (*.iso;*.mdf;*.img;*.bin)" + +#: ../win32/gui/WndMain.c:1512 +msgid "&File" +msgstr "&Arquivo" + +#: ../win32/gui/WndMain.c:1513 +msgid "E&xit" +msgstr "&Sair" + +#: ../win32/gui/WndMain.c:1515 +msgid "Run &EXE..." +msgstr "Rodar &EXE..." + +#: ../win32/gui/WndMain.c:1516 +msgid "Run &BIOS" +msgstr "Iniciar pela &BIOS" + +#: ../win32/gui/WndMain.c:1517 +msgid "Run &ISO..." +msgstr "Rodar &imagem de CD..." + +#: ../win32/gui/WndMain.c:1518 +msgid "Run &CD" +msgstr "Rodar &CD" + +#: ../win32/gui/WndMain.c:1520 +msgid "&Emulator" +msgstr "&Emulador" + +#: ../win32/gui/WndMain.c:1521 +msgid "&States" +msgstr "&Estados" + +#: ../win32/gui/WndMain.c:1523 +msgid "S&witch ISO..." +msgstr "T&rocar de imagem de CD..." + +#: ../win32/gui/WndMain.c:1525 +msgid "Re&set" +msgstr "Re&iniciar" + +#: ../win32/gui/WndMain.c:1526 +msgid "&Run" +msgstr "&Executar" + +#: ../win32/gui/WndMain.c:1527 +msgid "&Save" +msgstr "&Salvar" + +#: ../win32/gui/WndMain.c:1528 +msgid "&Load" +msgstr "&Carregar" + +#: ../win32/gui/WndMain.c:1529 ../win32/gui/WndMain.c:1535 +msgid "&Other..." +msgstr "&Outros..." + +#: ../win32/gui/WndMain.c:1530 ../win32/gui/WndMain.c:1536 +msgid "Slot &5" +msgstr "Unidade &5" + +#: ../win32/gui/WndMain.c:1531 ../win32/gui/WndMain.c:1537 +msgid "Slot &4" +msgstr "Unidade &4" + +#: ../win32/gui/WndMain.c:1532 ../win32/gui/WndMain.c:1538 +msgid "Slot &3" +msgstr "Unidade &3" + +#: ../win32/gui/WndMain.c:1533 ../win32/gui/WndMain.c:1539 +msgid "Slot &2" +msgstr "Unidade &2" + +#: ../win32/gui/WndMain.c:1534 ../win32/gui/WndMain.c:1540 +msgid "Slot &1" +msgstr "Unidade &1" + +#: ../win32/gui/WndMain.c:1542 +msgid "&Configuration" +msgstr "&Configuração" + +#: ../win32/gui/WndMain.c:1543 +msgid "Cheat &Search..." +msgstr "Procurar por &trapaça..." + +#: ../win32/gui/WndMain.c:1544 +msgid "Ch&eat Code..." +msgstr "&Código de trapaça..." + +#: ../win32/gui/WndMain.c:1547 +msgid "&Language" +msgstr "&Linguagem" + +#: ../win32/gui/WndMain.c:1572 +msgid "&Memory cards..." +msgstr "&Cartões de memória..." + +#: ../win32/gui/WndMain.c:1573 +msgid "C&PU..." +msgstr "C&PU..." + +#: ../win32/gui/WndMain.c:1575 +msgid "&NetPlay..." +msgstr "&Jogo em rede..." + +#: ../win32/gui/WndMain.c:1577 +msgid "&Controllers..." +msgstr "&Controles..." + +#: ../win32/gui/WndMain.c:1578 +msgid "CD-&ROM..." +msgstr "CD&ROM..." + +#: ../win32/gui/WndMain.c:1579 +msgid "&Sound..." +msgstr "Á&udio..." + +#: ../win32/gui/WndMain.c:1580 +msgid "&Graphics..." +msgstr "&Gráficos..." + +#: ../win32/gui/WndMain.c:1582 +msgid "&Plugins && Bios..." +msgstr "&Extensões e BIOS..." + +#: ../win32/gui/WndMain.c:1584 +msgid "&Help" +msgstr "&Ajuda" + +#: ../win32/gui/WndMain.c:1585 +msgid "&About..." +msgstr "&Sobre..." + +#: ../win32/gui/WndMain.c:1764 +msgid "Pcsx Msg" +msgstr "Mensagens do PCSX" + +#: ../win32/gui/WndMain.c:1767 +msgid "Error Loading Symbol" +msgstr "Erro ao carregar símbolo" + +#: ../gui/AboutDlg.c:74 +msgid "" +"(C) 1999-2003 PCSX Team\n" +"(C) 2005-2009 PCSX-df Team\n" +"(C) 2009-2010 PCSX-Reloaded Team" +msgstr "" + +#: ../gui/AboutDlg.c:79 +#, fuzzy +msgid "" +"This program is free software; you can redistribute it and/or modify it " +"under the terms of the GNU General Public License as published by the Free " +"Software Foundation; either version 2 of the License, or (at your option) " +"any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but WITHOUT " +"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or " +"FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for " +"more details.\n" +"\n" +"You should have received a copy of the GNU General Public License along with " +"this program; if not, write to the Free Software Foundation, Inc., 51 " +"Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA." +msgstr "" +"This program is free software; you can redistribute it\n" +"and/or modify it under the terms of the GNU General\n" +"Public License as published by the Free Software\n" +"Foundation; either version 2 of the License, or (at your\n" +"option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be\n" +"useful, but WITHOUT ANY WARRANTY; without even\n" +"the implied warranty of MERCHANTABILITY or\n" +"FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General\n" +"Public License along with this program; if not, write to\n" +"the Free Software Foundation, Inc." + +#: ../gui/AboutDlg.c:102 +msgid "translator-credits" +msgstr "" +"Tradução para português brasileiro por Tibério Vítor (tvtoon@gmail.com)" + +#: ../gui/AboutDlg.c:103 +msgid "A PlayStation emulator." +msgstr "Um emulador de PlayStation." + +#: ../gui/Cheat.c:117 ../gui/Cheat.c:202 +msgid "Cheat Description:" +msgstr "Descrição da trapaça:" + +#: ../gui/Cheat.c:306 +msgid "Open Cheat File" +msgstr "Abrir arquivo de trapaça" + +#: ../gui/Cheat.c:316 ../gui/Cheat.c:356 +msgid "PCSX Cheat Code Files (*.cht)" +msgstr "Arquivos de trapaça do PCSX (*.cht)" + +#: ../gui/Cheat.c:346 +msgid "Save Cheat File" +msgstr "Salvar um arquivo de trapaça" + +#: ../gui/Cheat.c:361 +msgid "All Files (*.*)" +msgstr "Todos os arquivos (*.*)" + +#: ../gui/Cheat.c:394 ../gui/Cheat.c:1124 ../gui/ConfDlg.c:104 +#: ../gui/ConfDlg.c:200 ../gui/DebugMemory.c:259 +msgid "Error: Glade interface could not be loaded!" +msgstr "Erro: o ambiente Glade não pôde ser carregado!" + +#: ../gui/Cheat.c:399 +msgid "Cheat Codes" +msgstr "Códigos de trapaça" + +#: ../gui/Cheat.c:405 +msgid "Enable" +msgstr "Ligar" + +#: ../gui/Cheat.c:630 +msgid "Freeze value" +msgstr "Congelar valor" + +#: ../gui/Cheat.c:729 +msgid "Modify value" +msgstr "Modificar valor" + +#: ../gui/Cheat.c:737 +msgid "New value:" +msgstr "Novo valor:" + +#: ../gui/Cheat.c:1134 +msgid "Search Results" +msgstr "Resultados da busca" + +#: ../gui/ConfDlg.c:112 ../data/pcsx.glade2:778 +msgid "Configure PCSX" +msgstr "Configurar PCSX" + +#: ../gui/ConfDlg.c:237 ../gui/ConfDlg.c:258 ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 ../gui/ConfDlg.c:355 +msgid "No configuration required" +msgstr "Não necessita de configuração" + +#: ../gui/ConfDlg.c:237 ../gui/ConfDlg.c:258 ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 ../gui/ConfDlg.c:355 +msgid "This plugin doesn't need to be configured." +msgstr "Esta extensão não pode ser configurada." + +#: ../gui/ConfDlg.c:581 +#, c-format +msgid "Could not open BIOS directory: '%s'\n" +msgstr "Não conseguiu abrir o diretório \"%s\", da BIOS!\n" + +#: ../gui/ConfDlg.c:611 ../gui/ConfDlg.c:704 ../gui/LnxMain.c:168 +#, c-format +msgid "Could not open directory: '%s'\n" +msgstr "Não conseguiu abrir o diretório \"%s\"!\n" + +#: ../gui/ConfDlg.c:675 +msgid "Simulate PSX BIOS" +msgstr "" + +#: ../gui/DebugMemory.c:103 ../data/pcsx.glade2:3178 +msgid "Memory Dump" +msgstr "" + +#: ../gui/DebugMemory.c:111 +#, fuzzy +msgid "Start Address (Hexadecimal):" +msgstr "Hexadecimal" + +#: ../gui/DebugMemory.c:121 +msgid "Length (Decimal):" +msgstr "" + +#: ../gui/DebugMemory.c:147 +msgid "Dump to File" +msgstr "" + +#: ../gui/DebugMemory.c:162 +#, fuzzy, c-format +msgid "Error writing to %s!" +msgstr "Erro ao salvar o arquivo de estado \"%s\"!" + +#: ../gui/DebugMemory.c:180 +#, fuzzy +msgid "Memory Patch" +msgstr "Cartão de memória 1" + +#: ../gui/DebugMemory.c:188 ../data/pcsx.glade2:3199 +#, fuzzy +msgid "Address (Hexadecimal):" +msgstr "Hexadecimal" + +#: ../gui/DebugMemory.c:198 +#, fuzzy +msgid "Value (Hexa string):" +msgstr "Hexadecimal" + +#: ../gui/DebugMemory.c:264 +#, fuzzy +msgid "Memory Viewer" +msgstr "Cartão de memória 1" + +#: ../gui/DebugMemory.c:269 +#, fuzzy +msgid "Address" +msgstr "Endereço:" + +#: ../gui/DebugMemory.c:287 +#, fuzzy +msgid "Text" +msgstr "Texturas" + +#: ../gui/Gtk2Gui.c:113 +msgid "Ready" +msgstr "" + +#: ../gui/Gtk2Gui.c:154 +msgid "Emulation Paused." +msgstr "" + +#: ../gui/Gtk2Gui.c:405 +msgid "Select PSX EXE File" +msgstr "Selecione o arquivo executável de PSX" + +#: ../gui/Gtk2Gui.c:418 +msgid "PlayStation Executable Files" +msgstr "Arquivos executáveis do PlayStation" + +#: ../gui/Gtk2Gui.c:454 +msgid "Not a valid PSX file" +msgstr "Não é um arquivo válido de PSX" + +#: ../gui/Gtk2Gui.c:454 +msgid "The file does not appear to be a valid Playstation executable" +msgstr "Esse arquivo não parece ser um executável válido de PlayStation!" + +#: ../gui/Gtk2Gui.c:485 ../gui/Gtk2Gui.c:610 +msgid "CD ROM failed" +msgstr "CDROM falhou" + +#: ../gui/Gtk2Gui.c:493 ../gui/Gtk2Gui.c:618 +msgid "The CD-ROM could not be loaded" +msgstr "" + +#: ../gui/Gtk2Gui.c:507 +msgid "Could not run BIOS" +msgstr "Não conseguiu iniciar a BIOS" + +#: ../gui/Gtk2Gui.c:507 +msgid "Running BIOS is not supported with Internal HLE BIOS." +msgstr "Iniciar pela BIOS não é suportado com a BIOS HLE interno." + +#: ../gui/Gtk2Gui.c:536 +msgid "Open PSX Disc Image File" +msgstr "Abrir arquivo de imagem de CD de PSX" + +#: ../gui/Gtk2Gui.c:556 +msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" +msgstr "Arquivo de imagens de CD de PSX (*.bin, *.img, *.mdf, *.iso)" + +#: ../gui/Gtk2Gui.c:771 +#, c-format +msgid "Loaded state %s." +msgstr "Arquivo de estado \"%s\" carregado." + +#: ../gui/Gtk2Gui.c:774 +#, c-format +msgid "Error loading state %s!" +msgstr "Erro ao carregar o arquivo de estado \"%s\"!" + +#: ../gui/Gtk2Gui.c:785 +#, c-format +msgid "Saved state %s." +msgstr "Arquivo de estado \"%s\" salvo." + +#: ../gui/Gtk2Gui.c:787 +#, c-format +msgid "Error saving state %s!" +msgstr "Erro ao salvar o arquivo de estado \"%s\"!" + +#: ../gui/Gtk2Gui.c:822 ../gui/Gtk2Gui.c:850 +msgid "Select State File" +msgstr "Selecione o arquivo de estado" + +#: ../gui/Gtk2Gui.c:893 +msgid "Notice" +msgstr "Aviso" + +#: ../gui/LnxMain.c:62 +#, c-format +msgid "Creating memory card: %s\n" +msgstr "Criando cartão de memória \"%s\"\n" + +#: ../gui/LnxMain.c:325 +msgid "" +" pcsx [options] [file]\n" +"\toptions:\n" +"\t-runcd\t\tRuns CD-ROM\n" +"\t-cdfile FILE\tRuns a CD image file\n" +"\t-nogui\t\tDon't open the GTK GUI\n" +"\t-cfg FILE\tLoads desired configuration file (default: ~/.pcsx/pcsx.cfg)\n" +"\t-psxout\t\tEnable PSX output\n" +"\t-load STATENUM\tLoads savestate STATENUM (1-5)\n" +"\t-h -help\tDisplay this message\n" +"\tfile\t\tLoads file\n" +msgstr "" +" pcsx [opções] [arquivo]\n" +"\topções:\n" +"\t-runcd\t\tExecuta direto pelo CD-ROM\n" +"\t-cdfile ARQUIVO\tRoda um arquivo de imagem de CD\n" +"\t-nogui\t\tNão abre o GUI da GTK\n" +"\t-cfg ARQUIVO\tCarrega uma configuração alternativa (padrão: ~/.pcsx/pcsx." +"cfg)\n" +"\t-psxout\t\tAtiva a saída do PSX no console\n" +"\t-load NÚMERO_ESTADO\tCarrega um estado entre 1-5\n" +"\t-h -help\tMostra essa mensagem\n" +"\t[arquivo]\t\tCarrega um arquivo.\n" + +#: ../gui/LnxMain.c:362 +#, c-format +msgid "" +"PCSX cannot be configured without using the GUI -- you should restart " +"without -nogui.\n" +msgstr "" +"PCSX não pode ser configurado sem o GUI -- reinicie sem a opção -nogui.\n" + +#: ../gui/LnxMain.c:418 +msgid "Failed loading plugins!" +msgstr "Não conseguiu carregar as extensões!" + +#: ../gui/LnxMain.c:435 +#, c-format +msgid "Could not load CD-ROM!\n" +msgstr "Não pôde carregar o CD-ROM!\n" + +#: ../gui/LnxMain.c:466 +#, c-format +msgid "PSX emulator couldn't be initialized.\n" +msgstr "O emulador não pôde ser inicializado.\n" + +#: ../gui/MemcardDlg.c:56 +msgid "Icon" +msgstr "Ícone" + +#: ../gui/MemcardDlg.c:74 +msgid "ID" +msgstr "ID" + +#: ../gui/MemcardDlg.c:80 +msgid "Name" +msgstr "Nome" + +#: ../gui/MemcardDlg.c:323 +msgid "Select A File" +msgstr "" + +#: ../gui/MemcardDlg.c:364 +msgid "Format this Memory Card?" +msgstr "Formatar esse cartão de memória?" + +#: ../gui/MemcardDlg.c:366 +msgid "" +"If you format the memory card, the card will be empty, and any existing data " +"overwritten." +msgstr "Ao formatar o cartão de memória, todo o conteúdo será zerado." + +#: ../gui/MemcardDlg.c:369 +msgid "Format card" +msgstr "Formatar cartão" + +#: ../gui/MemcardDlg.c:393 +msgid "Create a new Memory Card" +msgstr "" + +#: ../gui/MemcardDlg.c:402 +msgid "New Memory Card.mcd" +msgstr "" + +#: ../gui/MemcardDlg.c:503 +msgid "No free space on memory card" +msgstr "" + +#: ../gui/MemcardDlg.c:504 +msgid "" +"There are no free slots available on the target memory card. Please delete a " +"slot first." +msgstr "" + +#: ../gui/MemcardDlg.c:667 +msgid "Memory Card Manager" +msgstr "Gerenciador de cartões de memória" + +#: ../gui/Plugin.c:211 ../data/pcsx.glade2:1487 +#, c-format +msgid "SIO IRQ Always Enabled" +msgstr "IRQ SIO sempre ativada" + +#: ../gui/Plugin.c:212 +#, c-format +msgid "SIO IRQ Not Always Enabled" +msgstr "IRQ SIO nem sempre ativada" + +#: ../gui/Plugin.c:218 +#, c-format +msgid "Black & White Mdecs Only Enabled" +msgstr "Mdecs apenas em preto e branco ativado" + +#: ../gui/Plugin.c:219 +#, c-format +msgid "Black & White Mdecs Only Disabled" +msgstr "Mdecs apenas em preto e branco desativado" + +#: ../gui/Plugin.c:225 +#, c-format +msgid "XA Enabled" +msgstr "XA Ligado" + +#: ../gui/Plugin.c:226 +#, c-format +msgid "XA Disabled" +msgstr "XA Desligado" + +#: ../gui/Plugin.c:288 +msgid "Error opening CD-ROM plugin!" +msgstr "Erro ao abrir a extensão de CD-ROM!" + +#: ../gui/Plugin.c:290 +msgid "Error opening SPU plugin!" +msgstr "Erro ao abrir a extensão de SPU!" + +#: ../gui/Plugin.c:293 +msgid "Error opening GPU plugin!" +msgstr "Erro ao abrir a extensão de GPU!" + +#: ../gui/Plugin.c:295 +msgid "Error opening Controller 1 plugin!" +msgstr "Erro ao abrir a extensão do Controle 1!" + +#: ../gui/Plugin.c:297 +msgid "Error opening Controller 2 plugin!" +msgstr "Erro ao abrir a extensão do Controle 2!" + +#: ../gui/Plugin.c:377 +msgid "Error closing CD-ROM plugin!" +msgstr "Erro ao fechar a extensão de CD-ROM!" + +#: ../gui/Plugin.c:379 +msgid "Error closing SPU plugin!" +msgstr "Erro ao fechar a extensão de SPU!" + +#: ../gui/Plugin.c:381 +msgid "Error closing Controller 1 Plugin!" +msgstr "Erro ao fechar a extensão do Controle 1!" + +#: ../gui/Plugin.c:383 +msgid "Error closing Controller 2 plugin!" +msgstr "Erro ao fechar a extensão de Controle 2!" + +#: ../gui/Plugin.c:385 +msgid "Error closing GPU plugin!" +msgstr "Erro ao fechar a extensão de GPU!" + +#: ../libpcsxcore/cdriso.c:658 +#, c-format +msgid "Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n" +msgstr "" + +#: ../libpcsxcore/cdriso.c:677 +#, c-format +msgid "Loaded CD Image: %s" +msgstr "Carregou a imagem de CD \"%s\"." + +#: ../libpcsxcore/cheat.c:147 +#, c-format +msgid "Cheats loaded from: %s\n" +msgstr "Trapaças de \"%s\" carregadas.\n" + +#: ../libpcsxcore/cheat.c:179 +#, c-format +msgid "Cheats saved to: %s\n" +msgstr "Trapaças salvas para \"%s\".\n" + +#: ../libpcsxcore/cheat.c:322 ../libpcsxcore/cheat.c:443 +msgid "(Untitled)" +msgstr "(Sem título)" + +#: ../libpcsxcore/debug.c:317 +msgid "Error allocating memory" +msgstr "Erro ao alocar memória" + +#: ../libpcsxcore/debug.c:322 +msgid "Unable to start debug server.\n" +msgstr "" + +#: ../libpcsxcore/debug.c:326 +msgid "Debugger started.\n" +msgstr "" + +#: ../libpcsxcore/debug.c:333 +msgid "Debugger stopped.\n" +msgstr "" + +#: ../libpcsxcore/misc.c:342 +#, c-format +msgid "CD-ROM Label: %.32s\n" +msgstr "" + +#: ../libpcsxcore/misc.c:343 +#, fuzzy, c-format +msgid "CD-ROM ID: %.9s\n" +msgstr "CD-ROM:" + +#: ../libpcsxcore/misc.c:388 +#, c-format +msgid "Error opening file: %s.\n" +msgstr "Erro ao abrir o arquivo \"%s\"!\n" + +#: ../libpcsxcore/misc.c:428 +#, c-format +msgid "Unknown CPE opcode %02x at position %08x.\n" +msgstr "Código operacional CPE %02x desconhecido, na posição %08x.\n" + +#: ../libpcsxcore/misc.c:435 +msgid "COFF files not supported.\n" +msgstr "Arquivos COFF não são suportados!\n" + +#: ../libpcsxcore/misc.c:439 +msgid "This file does not appear to be a valid PSX file.\n" +msgstr "Esse arquivo não parece ser um arquivo válido de PSX!\n" + +#: ../libpcsxcore/plugins.c:181 +#, c-format +msgid "Error loading %s: %s" +msgstr "Erro carregando \"%s\": \"%s\"" + +#: ../libpcsxcore/plugins.c:221 +#, c-format +msgid "Could not load GPU plugin %s!" +msgstr "Não conseguiu carregar a extensão de GPU \"%s\"!" + +#: ../libpcsxcore/plugins.c:292 +#, c-format +msgid "Could not load CD-ROM plugin %s!" +msgstr "Não conseguiu carregar a extensão de CD-ROM \"%s\"!" + +#: ../libpcsxcore/plugins.c:340 +#, c-format +msgid "Could not load SPU plugin %s!" +msgstr "Não conseguiu carregar a extensão de SPU \"%s\"!" + +#: ../libpcsxcore/plugins.c:477 +#, c-format +msgid "Could not load Controller 1 plugin %s!" +msgstr "Não conseguiu carregar a extensão do Controle 1 \"%s\"!" + +#: ../libpcsxcore/plugins.c:531 +#, c-format +msgid "Could not load Controller 2 plugin %s!" +msgstr "Não conseguiu carregar a extensão do Controle 2 \"%s\"!" + +#: ../libpcsxcore/plugins.c:574 +#, c-format +msgid "Could not load NetPlay plugin %s!" +msgstr "Não conseguiu carregar a extensão de jogo em rede \"%s\"!" + +#: ../libpcsxcore/plugins.c:654 +#, fuzzy, c-format +msgid "Could not load SIO1 plugin %s!" +msgstr "Não conseguiu carregar a extensão de SPU \"%s\"!" + +#: ../libpcsxcore/plugins.c:739 +#, c-format +msgid "Error initializing CD-ROM plugin: %d" +msgstr "Erro ao iniciar a extensão de CD-ROM \"%d\"!" + +#: ../libpcsxcore/plugins.c:741 +#, c-format +msgid "Error initializing GPU plugin: %d" +msgstr "Erro ao iniciar a extensão de GPU \"%d\"!" + +#: ../libpcsxcore/plugins.c:743 +#, c-format +msgid "Error initializing SPU plugin: %d" +msgstr "Erro ao iniciar a extensão de SPU \"%d\"!" + +#: ../libpcsxcore/plugins.c:745 +#, c-format +msgid "Error initializing Controller 1 plugin: %d" +msgstr "Erro ao iniciar a extensão do Controle 1 \"%d\"!" + +#: ../libpcsxcore/plugins.c:747 +#, c-format +msgid "Error initializing Controller 2 plugin: %d" +msgstr "Erro ao iniciar a extensão do Controle 2 \"%d\"!" + +#: ../libpcsxcore/plugins.c:751 +#, c-format +msgid "Error initializing NetPlay plugin: %d" +msgstr "Erro ao iniciar a extensão de jogo em rede \"%d\"!" + +#: ../libpcsxcore/plugins.c:756 +#, fuzzy, c-format +msgid "Error initializing SIO1 plugin: %d" +msgstr "Erro ao iniciar a extensão de SPU \"%d\"!" + +#: ../libpcsxcore/plugins.c:759 +msgid "Plugins loaded.\n" +msgstr "Extensões carregadas.\n" + +#: ../libpcsxcore/ppf.c:216 +#, c-format +msgid "Invalid PPF patch: %s.\n" +msgstr "" + +#: ../libpcsxcore/ppf.c:292 +#, c-format +msgid "Unsupported PPF version (%d).\n" +msgstr "" + +#: ../libpcsxcore/ppf.c:331 +#, fuzzy, c-format +msgid "Loaded PPF %d.0 patch: %s.\n" +msgstr "Arquivo de estado \"%s\" carregado." + +#: ../libpcsxcore/psxmem.c:80 +msgid "Error allocating memory!" +msgstr "Erro ao alocar memória!" + +#: ../libpcsxcore/psxmem.c:122 +#, c-format +msgid "Could not open BIOS:\"%s\". Enabling HLE Bios!\n" +msgstr "Não conseguiu abrir a BIOS\"%s\". Usando BIOS HLE!\n" + +#: ../libpcsxcore/r3000a.c:33 +#, c-format +msgid "Running PCSX Version %s (%s).\n" +msgstr "Rodando o PCSX Versão %s (%s).\n" + +#: ../libpcsxcore/sio.c:345 +msgid "Connection closed!\n" +msgstr "Conexão encerrada!\n" + +#: ../libpcsxcore/sio.c:371 +#, c-format +msgid "No memory card value was specified - creating a default card %s\n" +msgstr "Nenhum cartão de memória foi especificado, criando um \"%s\" padrão.\n" + +#: ../libpcsxcore/sio.c:375 +#, c-format +msgid "The memory card %s doesn't exist - creating it\n" +msgstr "O cartão de memória \"%s\" não existe, será criado.\n" + +#: ../libpcsxcore/sio.c:391 +#, c-format +msgid "Memory card %s failed to load!\n" +msgstr "Cartão de memória \"%s\" falhou para carregar!\n" + +#: ../libpcsxcore/sio.c:395 +#, c-format +msgid "Loading memory card %s\n" +msgstr "Carregando cartão de memória \"%s\".\n" + +#: ../plugins/dfxvideo/gpu.c:55 +msgid "SoftGL Driver" +msgstr "Extensão SoftGL" + +#: ../plugins/dfxvideo/gpu.c:56 +msgid "" +"P.E.Op.S. SoftGL Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" + +#: ../plugins/dfxvideo/gpu.c:58 +msgid "XVideo Driver" +msgstr "Extensão XVideo" + +#: ../plugins/dfxvideo/gpu.c:59 +msgid "" +"P.E.Op.S. Xvideo Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" +"Extensão Xvideo P.E.Op.S. V1.17\n" +"Programada por Pete Bernert e a equipe do P.E.Op.S.\n" + +#: ../plugins/dfxvideo/gpu.c:62 +msgid "Pete Bernert and the P.E.Op.S. team" +msgstr "Pete Bernert e a equipe do P.E.Op.S." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:8 +msgid "Configure X11 Video" +msgstr "Configurar vídeo do X11" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:45 +msgid "Initial Window Size:" +msgstr "Tamanho inicial da janela:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:56 +msgid "Stretching:" +msgstr "Escalonamento:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:69 +msgid "Dithering:" +msgstr "Colorização:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:82 +msgid "" +"320x240\n" +"640x480\n" +"800x600\n" +"1024x768\n" +"1152x864\n" +"1280x1024\n" +"1600x1200" +msgstr "" +"320x240\n" +"640x480\n" +"800x600\n" +"1024x768\n" +"1152x864\n" +"1280x1024\n" +"1600x1200" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:101 +msgid "" +"0: None\n" +"1: 2xSai\n" +"2: 2xSuperSai\n" +"3: SuperEagle\n" +"4: Scale2x\n" +"5: Scale3x\n" +"6: HQ2X\n" +"7: HQ3X" +msgstr "" +"0: Nenhum\n" +"1: 2xSai\n" +"2: 2xSuperSai\n" +"3: SuperEagle\n" +"4: Scale2x\n" +"5: Scale3x\n" +"6: HQ2X\n" +"7: HQ3X" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:123 +msgid "" +"0: Off (fastest)\n" +"1: Game dependant\n" +"2: Always" +msgstr "" +"0: Desligado (mais rápido)\n" +"1: Depende do Jogo\n" +"2: Sempre" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:146 +msgid "Maintain 4:3 Aspect Ratio" +msgstr "Manter proporção 4:3" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:161 +#: ../plugins/peopsxgl/gpucfg/interface.c:322 +msgid "Fullscreen" +msgstr "Tela cheia" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:165 +msgid "Toggle windowed/fullscreen mode." +msgstr "Alternar entre tela cheia e janela." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:187 +msgid "Screen" +msgstr "Tela" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:216 +msgid "Show FPS" +msgstr "Mostrar taxa de FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:220 +msgid "Toggle whether the FPS will be shown." +msgstr "Ligar ou desligar a exibição da taxa de FPS." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:232 +msgid "Autodetect FPS limit" +msgstr "Detectar automaticamente limite de FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:236 +msgid "Enable this if games display too quickly." +msgstr "Ligue isso se os jogos ficarem rápidos demais." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:249 +msgid "Enable frame skipping" +msgstr "Ligar pulo de quadros" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:253 +msgid "Skip frames when rendering." +msgstr "Pula quadros ao exibir." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:270 +msgid "Set FPS" +msgstr "Limite de FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:287 +msgid "200.0" +msgstr "200.0" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:310 +msgid "Framerate" +msgstr "Taxa de FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:339 +#: ../plugins/peopsxgl/gpucfg/interface.c:568 +msgid "Use game fixes" +msgstr "Usar consertos específicos" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:366 +msgid "better g-colors, worse textures" +msgstr "Transparências melhores, texturas piores." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:381 +msgid "Needed by Dark Forces" +msgstr "Necessário para Dark Forces." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:394 +msgid "Draw quads with triangles" +msgstr "Desenhar quadrados com triângulos" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:410 +msgid "Repeated flat tex triangles" +msgstr "Triângulos de textura plana repetidos" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:426 +msgid "Disable CPU Saving" +msgstr "Desativar salvamento da CPU" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:442 +msgid "Odd/even bit hack" +msgstr "Hack do bit ímpar/par" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:458 +msgid "For precise framerate" +msgstr "Para uma taxa de FPS precisa." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:473 +msgid "Better FPS limit in some" +msgstr "Melhor limitação de FPS em alguns jogos." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:486 +msgid "PC FPS calculation" +msgstr "Cálculo de FPS feito pelo PC" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:504 +msgid "Pandemonium 2" +msgstr "Para Pandemonium 2." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:517 +msgid "Lazy screen update" +msgstr "Atualização tardia da tela" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:535 +msgid "Skip every second frame" +msgstr "Pula cada segundo quadro de uma taxa." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:548 +#: ../plugins/peopsxgl/gpucfg/interface.c:640 +msgid "Old frame skipping" +msgstr "Pulo de quadros antigo" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:564 +msgid "Expand screen width" +msgstr "Expandir largura da tela" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:580 +msgid "Ignore brightness color" +msgstr "Ignorar brilho das cores" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:596 +msgid "Disable coordinate check" +msgstr "Desativar checagem de coordenadas" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:614 +msgid "Chrono Cross" +msgstr "Para Chrono Cross." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:627 +msgid "Capcom fighting games" +msgstr "Para jogos de luta da Capcom." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:642 +msgid "Black screens in Lunar" +msgstr "Telas pretas de Lunar." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:657 +msgid "Compatibility mode" +msgstr "Modo de compatibilidade." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:670 +#, fuzzy +msgid "Fake 'gpu busy' states" +msgstr "Imitar estado 'GPU ocupada'" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:688 +msgid "Toggle busy flags after drawing" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:713 +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:268 +msgid "Compatibility" +msgstr "Compatibilidade" + +#: ../data/pcsx.glade2:7 +msgid "PCSX" +msgstr "PCSX" + +#: ../data/pcsx.glade2:21 +msgid "_File" +msgstr "_Arquivo" + +#: ../data/pcsx.glade2:27 +msgid "Run _CD" +msgstr "Rodar _CD" + +#: ../data/pcsx.glade2:45 +msgid "Run _ISO..." +msgstr "Rodar _imagem de CD..." + +#: ../data/pcsx.glade2:62 +msgid "Run _BIOS" +msgstr "Rodar pela _BIOS" + +#: ../data/pcsx.glade2:79 +msgid "Run _EXE..." +msgstr "Rodar _EXE do PSX..." + +#: ../data/pcsx.glade2:101 +msgid "E_xit" +msgstr "_Sair" + +#: ../data/pcsx.glade2:123 +msgid "_Emulator" +msgstr "_Emulador" + +#: ../data/pcsx.glade2:129 +msgid "_Continue" +msgstr "_Continue" + +#: ../data/pcsx.glade2:146 +msgid "_Reset" +msgstr "_Reiniciar" + +#: ../data/pcsx.glade2:168 +msgid "S_witch ISO..." +msgstr "_Trocar de imagem de CD..." + +#: ../data/pcsx.glade2:190 +msgid "_Save State" +msgstr "_Salvar estado" + +#: ../data/pcsx.glade2:199 ../data/pcsx.glade2:280 +msgid "Slot _1" +msgstr "Unidade _1" + +#: ../data/pcsx.glade2:208 ../data/pcsx.glade2:289 +msgid "Slot _2" +msgstr "Unidade _2" + +#: ../data/pcsx.glade2:217 ../data/pcsx.glade2:298 +msgid "Slot _3" +msgstr "Unidade _3" + +#: ../data/pcsx.glade2:226 ../data/pcsx.glade2:307 +msgid "Slot _4" +msgstr "Unidade _4" + +#: ../data/pcsx.glade2:235 ../data/pcsx.glade2:316 +msgid "Slot _5" +msgstr "Unidade _5" + +#: ../data/pcsx.glade2:243 ../data/pcsx.glade2:324 +msgid "_Other..." +msgstr "_Outros..." + +#: ../data/pcsx.glade2:271 +msgid "_Load State" +msgstr "_Carregar estado" + +#: ../data/pcsx.glade2:357 +msgid "_Configuration" +msgstr "C_onfiguração" + +#: ../data/pcsx.glade2:363 +msgid "_Plugins & BIOS..." +msgstr "_Extensões e BIOS..." + +#: ../data/pcsx.glade2:385 +msgid "_Graphics..." +msgstr "_Gráficos..." + +#: ../data/pcsx.glade2:400 +msgid "_Sound..." +msgstr "Á_udio..." + +#: ../data/pcsx.glade2:415 +msgid "CD-_ROM..." +msgstr "CD_ROM..." + +#: ../data/pcsx.glade2:430 +msgid "C_ontrollers..." +msgstr "C_ontroles..." + +#: ../data/pcsx.glade2:450 +msgid "_CPU..." +msgstr "_CPU..." + +#: ../data/pcsx.glade2:466 +msgid "_Memory Cards..." +msgstr "Cartões de _memória..." + +#: ../data/pcsx.glade2:483 +msgid "_Netplay..." +msgstr "Jogo em _rede..." + +#: ../data/pcsx.glade2:504 +msgid "Chea_t" +msgstr "T_rapaça" + +#: ../data/pcsx.glade2:513 +msgid "_Browse..." +msgstr "_Navegar..." + +#: ../data/pcsx.glade2:528 +msgid "_Search..." +msgstr "_Buscar..." + +#: ../data/pcsx.glade2:554 +msgid "Memory _Dump" +msgstr "" + +#: ../data/pcsx.glade2:574 +msgid "_Help" +msgstr "_Ajuda" + +#: ../data/pcsx.glade2:580 +msgid "_About PCSX..." +msgstr "_Sobre o PCSX..." + +#: ../data/pcsx.glade2:613 ../data/pcsx.glade2:614 +msgid "Run CD" +msgstr "" + +#: ../data/pcsx.glade2:626 +msgid "Run ISO Image" +msgstr "" + +#: ../data/pcsx.glade2:627 +msgid "Run ISO..." +msgstr "" + +#: ../data/pcsx.glade2:648 +msgid "Continue Emulation" +msgstr "" + +#: ../data/pcsx.glade2:649 +msgid "Continue..." +msgstr "" + +#: ../data/pcsx.glade2:661 +msgid "Switch ISO Image" +msgstr "" + +#: ../data/pcsx.glade2:662 +msgid "Switch ISO..." +msgstr "" + +#: ../data/pcsx.glade2:683 ../data/pcsx.glade2:1810 +msgid "Configure Memory Cards" +msgstr "Configurar cartões de memória" + +#: ../data/pcsx.glade2:684 +msgid "Memcards..." +msgstr "Cartões de memória..." + +#: ../data/pcsx.glade2:696 +msgid "Configure Graphics" +msgstr "" + +#: ../data/pcsx.glade2:697 +msgid "Graphics..." +msgstr "Gráficos..." + +#: ../data/pcsx.glade2:709 ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:8 +msgid "Configure Sound" +msgstr "Configurar áudio" + +#: ../data/pcsx.glade2:710 +msgid "Sound..." +msgstr "Áudio..." + +#: ../data/pcsx.glade2:722 +msgid "Configure CD-ROM" +msgstr "Configurar CD-ROM" + +#: ../data/pcsx.glade2:723 +msgid "CD-ROM..." +msgstr "CD-ROM..." + +#: ../data/pcsx.glade2:735 +msgid "Configure Controllers" +msgstr "" + +#: ../data/pcsx.glade2:736 +msgid "Controllers..." +msgstr "Controles..." + +#: ../data/pcsx.glade2:879 +msgid "Select Folder to Search" +msgstr "Selecione o diretório para a busca" + +#: ../data/pcsx.glade2:895 +msgid "Search in:" +msgstr "Buscar em:" + +#: ../data/pcsx.glade2:1168 +msgid "Graphics:" +msgstr "Gráficos:" + +#: ../data/pcsx.glade2:1181 +msgid "Sound:" +msgstr "Áudio:" + +#: ../data/pcsx.glade2:1196 +msgid "Controller 1: " +msgstr "Controle 1:" + +#: ../data/pcsx.glade2:1211 +msgid "Controller 2:" +msgstr "Controle 2:" + +#: ../data/pcsx.glade2:1226 +msgid "CD-ROM:" +msgstr "CD-ROM:" + +#: ../data/pcsx.glade2:1264 +msgid "Plugins" +msgstr "Extensões" + +#: ../data/pcsx.glade2:1325 +msgid "BIOS" +msgstr "BIOS" + +#: ../data/pcsx.glade2:1375 +msgid "Configure CPU" +msgstr "Configurar CPU" + +#: ../data/pcsx.glade2:1419 +msgid "SPU IRQ Always Enabled" +msgstr "IRQ da SPU sempre ativada" + +#: ../data/pcsx.glade2:1435 +msgid "Black & White Movies" +msgstr "Filmes em preto e branco" + +#: ../data/pcsx.glade2:1469 +msgid "Enable Interpreter CPU" +msgstr "Ativar interpretador da CPU" + +#: ../data/pcsx.glade2:1503 +msgid "Disable CD Audio" +msgstr "Desativar áudio de CD" + +#: ../data/pcsx.glade2:1519 +msgid "Disable XA Decoding" +msgstr "Desativar decodificação de XA" + +#: ../data/pcsx.glade2:1571 +msgid "Options" +msgstr "Opções" + +#: ../data/pcsx.glade2:1612 +msgid "" +"NTSC\n" +"PAL" +msgstr "" +"NTSC\n" +"PAL" + +#: ../data/pcsx.glade2:1626 +msgid "System Type" +msgstr "Tipo do sistema" + +#: ../data/pcsx.glade2:1674 +msgid "Configure NetPlay" +msgstr "Configurar jogo em rede" + +#: ../data/pcsx.glade2:1760 +msgid "NetPlay" +msgstr "Jogo em rede" + +#: ../data/pcsx.glade2:1886 ../data/pcsx.glade2:2283 +msgid "New" +msgstr "" + +#: ../data/pcsx.glade2:1936 ../data/pcsx.glade2:2333 +msgid "Format" +msgstr "Formatar" + +#: ../data/pcsx.glade2:1986 ../data/pcsx.glade2:2383 +msgid "Un/Delete" +msgstr "Apagar/Desfazer" + +#: ../data/pcsx.glade2:2079 +msgid "Memory Card 1" +msgstr "Cartão de memória 1" + +#: ../data/pcsx.glade2:2139 ../data/pcsx.glade2:2189 ../data/pcsx.glade2:3002 +msgid "Copy" +msgstr "Copiar" + +#: ../data/pcsx.glade2:2476 +msgid "Memory Card 2" +msgstr "Cartão de memória 2" + +#: ../data/pcsx.glade2:2572 +msgid "Cheat Codes" +msgstr "Códigos de trapaça" + +#: ../data/pcsx.glade2:2736 +msgid "" +"8-bit\n" +"16-bit\n" +"32-bit" +msgstr "" +"8-bit\n" +"16-bit\n" +"32-bit" + +#: ../data/pcsx.glade2:2799 +msgid "" +"Equal Value\n" +"Not Equal Value\n" +"Range\n" +"Increased By\n" +"Decreased By\n" +"Increased\n" +"Decreased\n" +"Different\n" +"No Change" +msgstr "" +"Valor igual à\n" +"Valor diferente de\n" +"Intervalo\n" +"Somado por\n" +"Subtraído por\n" +"Aumentado\n" +"Diminuído\n" +"Diferente\n" +"Sem mudanças" + +#: ../data/pcsx.glade2:2831 +msgid "" +"Decimal\n" +"Hexadecimal" +msgstr "" +"Decimal\n" +"Hexadecimal" + +#: ../data/pcsx.glade2:3035 +msgid "label_resultsfound" +msgstr "Resultados encontrados:" + +#: ../data/pcsx.glade2:3070 +msgid "Search" +msgstr "Buscar" + +#: ../data/pcsx.glade2:3106 +msgid "Restart" +msgstr "Reiniciar" + +#: ../data/pcsx.glade2:3135 +msgid "Cheat Search" +msgstr "Busca de trapaças" + +#: ../data/pcsx.glade2:3291 +msgid "Raw Dump..." +msgstr "" + +#: ../data/pcsx.glade2:3326 +msgid "Patch Memory..." +msgstr "" + +#: ../plugins/dfsound/spu.c:38 +msgid "Mac OS X Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:40 +msgid "ALSA Sound" +msgstr "Sistema ALSA" + +#: ../plugins/dfsound/spu.c:42 +#, fuzzy +msgid "OSS Sound" +msgstr "Sistema OSS" + +#: ../plugins/dfsound/spu.c:44 +#, fuzzy +msgid "SDL Sound" +msgstr "Sistema OSS" + +#: ../plugins/dfsound/spu.c:46 +msgid "PulseAudio Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:48 +msgid "NULL Sound" +msgstr "Sem som" + +#: ../plugins/dfsound/spu.c:51 +#, fuzzy +msgid "" +"P.E.Op.S. Sound Driver V1.7\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" +"Extensão OSS P.E.Op.S. V1.7\n" +"Programada por Pete Bernert e a equipe do P.E.Op.S.\n" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:42 +msgid "Volume:" +msgstr "Volume:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:54 +msgid "Interpolation:" +msgstr "Interpolação:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:68 +msgid "Reverb:" +msgstr "Reversão:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:81 +msgid "" +"Low\n" +"Medium\n" +"Loud\n" +"Loudest" +msgstr "" +"Mínimo\n" +"Médio\n" +"Alto\n" +"Máximo" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:95 +msgid "" +"Off\n" +"Simple\n" +"Playstation" +msgstr "" +"Desligada\n" +"Simples\n" +"PlayStation" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:111 +msgid "" +"None\n" +"Simple\n" +"Gaussian\n" +"Cubic" +msgstr "" +"Nenhuma\n" +"Simples\n" +"Gaussiana\n" +"Cúbica" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:132 +msgid "General" +msgstr "Geral" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:163 +msgid "Adjust XA speed" +msgstr "Ajustar velocidade da XA" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:167 +msgid "Choose this if XA music is played too quickly." +msgstr "Selecione isso se a música XA estiver tocando rápido demais." + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:184 +msgid "XA Music" +msgstr "Música XA" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:215 +msgid "High compatibility mode" +msgstr "Modo de alta compatibilidade" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:219 +msgid "Use the asynchronous SPU interface." +msgstr "Usar o ambiente assíncrono da SPU." + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:231 +msgid "SPU IRQ Wait" +msgstr "Esperar pela IRQ da SPU" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:235 +msgid "Wait for CPU; only useful for some games." +msgstr "Esperar pela CPU; útil apenas em alguns jogos." + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:247 +msgid "Single channel sound" +msgstr "Som em canal único" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:251 +msgid "Play only one channel for a performance boost." +msgstr "Tocar apenas um canal para melhorar o desempenho." + +#: ../plugins/dfcdrom/cdr-libcdio.c:29 ../plugins/dfcdrom/cdr-linux.c:29 +msgid "CD-ROM Drive Reader" +msgstr "Leitor de unidade de CDROM" + +#: ../plugins/dfcdrom/cdr-null.c:26 +msgid "CDR NULL Plugin" +msgstr "Sem unidade de CDROM" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/main.c:219 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:8 +msgid "CDR configuration" +msgstr "Configuração do CDROM" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:33 +msgid "Choose your CD-ROM device or type its path if it's not listed" +msgstr "" +"Escolha sua unidade de CDROM ou digite o dispositivo caso não esteja listado." + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:44 +msgid "Select CD-ROM device" +msgstr "Selecione uma unidade de CDROM" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:72 +msgid "Select read mode:" +msgstr "Selecione o modo de leitura:" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:83 +msgid "" +"Normal (No Cache)\n" +"Threaded - Faster (With Cache)" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:114 +msgid "Cache Size (Def. 64):" +msgstr "Tamanho do armazenamento (o padrão é 64):" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:159 +msgid "Spindown Time:" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:170 +msgid "" +"Default\n" +"125ms\n" +"250ms\n" +"500ms\n" +"1s\n" +"2s\n" +"4s\n" +"8s\n" +"16s\n" +"32s\n" +"1min\n" +"2min\n" +"4min\n" +"8min\n" +"16min\n" +"32min" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:216 +msgid "Cdrom Speed (Def. 0 = MAX):" +msgstr "Velocidade do CDROM (o padrão é 0, ou seja, o máximo):" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:248 +msgid "hseparator" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:258 +msgid "Enable subchannel read" +msgstr "Ligar leitura de subcanal" + +#: ../plugins/peopsxgl/gpu.c:61 +msgid "OpenGL Driver" +msgstr "Extensão OpenGL" + +#: ../plugins/peopsxgl/gpu.c:63 +msgid "Pete Bernert" +msgstr "Pete Bernert" + +#: ../plugins/peopsxgl/gpu.c:64 +msgid "" +"Based on P.E.Op.S. MesaGL Driver V1.78\n" +"Coded by Pete Bernert\n" +msgstr "" +"Baseada na extensão MesaGL P.E.Op.S. V1.78\n" +"Programada por Pete Bernert\n" + +#: ../plugins/peopsxgl/gpucfg/interface.c:118 +msgid "OpenGL Driver configuration" +msgstr "Configuração da extensão OpenGL" + +#: ../plugins/peopsxgl/gpucfg/interface.c:138 +msgid "Textures" +msgstr "Texturas" + +#: ../plugins/peopsxgl/gpucfg/interface.c:161 +msgid "Quality:" +msgstr "Qualidade:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:178 +#: ../plugins/peopsxgl/gpucfg/interface.c:191 +msgid "0: don't care - Use driver's default textures" +msgstr "0: tanto faz - usar textura padrão da placa" + +#: ../plugins/peopsxgl/gpucfg/interface.c:179 +msgid "1: 4444 - Fast, but less colorful" +msgstr "1: 4444 - Rápido, mas sem muitas cores" + +#: ../plugins/peopsxgl/gpucfg/interface.c:180 +msgid "2: 5551 - Nice colors, bad transparency" +msgstr "2: 5551 - Cores bonitas, transparência ruim" + +#: ../plugins/peopsxgl/gpucfg/interface.c:181 +msgid "3: 8888 - Best colors, more ram needed" +msgstr "3: 8888 - Melhor padrão, o que mais usa RAM" + +#: ../plugins/peopsxgl/gpucfg/interface.c:182 +msgid "4: BGR8888 - Faster on some cards" +msgstr "4: BGR8888 - Mais rápido em algumas placas" + +#: ../plugins/peopsxgl/gpucfg/interface.c:193 +msgid "VRam size in MBytes (0..1024, 0=auto):" +msgstr "Tamanho da VRAM em MBytes (0..1024, 0=automático):" + +#: ../plugins/peopsxgl/gpucfg/interface.c:210 +#: ../plugins/peopsxgl/gpucfg/interface.c:225 +msgid "0: None" +msgstr "0: Nenhum" + +#: ../plugins/peopsxgl/gpucfg/interface.c:211 +msgid "1: Standard - Glitches will happen" +msgstr "1: Padrão - Problemas vão acontecer" + +#: ../plugins/peopsxgl/gpucfg/interface.c:212 +msgid "2: Extended - No black borders" +msgstr "2: Extendido - Sem bordas escuras" + +#: ../plugins/peopsxgl/gpucfg/interface.c:213 +msgid "3: Standard without sprites - unfiltered 2D" +msgstr "3: Padrão sem sprites - 2D sem filtro" + +#: ../plugins/peopsxgl/gpucfg/interface.c:214 +msgid "4: Extended without sprites - unfiltered 2D" +msgstr "4: Extendido sem sprites - 2D sem filtro" + +#: ../plugins/peopsxgl/gpucfg/interface.c:215 +msgid "5: Standard + smoothed sprites" +msgstr "5: Padrão mais sprites filtrados" + +#: ../plugins/peopsxgl/gpucfg/interface.c:216 +msgid "6: Extended + smoothed sprites" +msgstr "6: Extendido mais sprites filtrados" + +#: ../plugins/peopsxgl/gpucfg/interface.c:227 +msgid "Filtering:" +msgstr "Filtragem:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:235 +msgid "HiRes Tex:" +msgstr "Textura em alta resolução:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:252 +#: ../plugins/peopsxgl/gpucfg/interface.c:263 +msgid "0: None (standard)" +msgstr "0: Nenhuma (padrão)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:253 +msgid "1: 2xSaI (much vram needed)" +msgstr "1: 2xSaI (muita VRAM usada)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:254 +msgid "2: Scaled (needs tex filtering)" +msgstr "2: Escalonado (precisa ativar filtragem)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:265 +msgid "Window options" +msgstr "Opções da janela" + +#: ../plugins/peopsxgl/gpucfg/interface.c:296 +msgid "Width:" +msgstr "Largura:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:305 +msgid "Height:" +msgstr "Altura:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:314 +msgid "Keep psx aspect ratio" +msgstr "Manter proporção do PSX" + +#: ../plugins/peopsxgl/gpucfg/interface.c:330 +msgid "Dithering" +msgstr "Colorização" + +#: ../plugins/peopsxgl/gpucfg/interface.c:346 +msgid "Framerate" +msgstr "Taxa de FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:369 +msgid "FPS" +msgstr "FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:377 +msgid "FPS limit manual" +msgstr "Limite manual de FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:386 +msgid "Show FPS display on startup" +msgstr "Mostrar taxa de FPS ao iniciar" + +#: ../plugins/peopsxgl/gpucfg/interface.c:394 +msgid "Use FPS limit" +msgstr "Usar limite de FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:402 +msgid "FPS limit auto-detection" +msgstr "Autodetecção do limite de FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:411 +msgid "Use Frame skipping" +msgstr "Usar pulo de quadros" + +#: ../plugins/peopsxgl/gpucfg/interface.c:419 +msgid "Compatibility" +msgstr "Compatibilidade" + +#: ../plugins/peopsxgl/gpucfg/interface.c:434 +msgid "Advanced blending (Accurate psx color emulation)" +msgstr "Mesclagem avançada (emulação precisa das cores do PSX)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:442 +msgid "Framebuffer textures:" +msgstr "Texturas do framebuffer:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:450 +msgid "Offscreen Drawing:" +msgstr "Desenhos de fora da tela:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:458 +msgid "Framebuffer access:" +msgstr "Acesso ao framebuffer:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:466 +msgid "Alpha Multipass (correct opaque texture areas)" +msgstr "Multipassagem dos canais alfa (áreas opacas de texturas corretas)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:474 +msgid "Mask bit detection (needed by a few games, zbuffer)" +msgstr "Detecção do bit mascarador (necessário para alguns jogos, zbuffer)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:491 +#: ../plugins/peopsxgl/gpucfg/interface.c:504 +msgid "0: None - Fastest, most glitches" +msgstr "0: Nenhuma - Mais rápido e mais problemas" + +#: ../plugins/peopsxgl/gpucfg/interface.c:492 +msgid "1: Minimum - Missing screens" +msgstr "1: Mínimo - Perde algumas telas" + +#: ../plugins/peopsxgl/gpucfg/interface.c:493 +msgid "2: Standard - OK for most games" +msgstr "2: Padrão - Bom para a maioria dos jogos" + +#: ../plugins/peopsxgl/gpucfg/interface.c:494 +msgid "3: Enhanced - Shows more stuff" +msgstr "3: Aumentado - Mostra mais coisas" + +#: ../plugins/peopsxgl/gpucfg/interface.c:495 +msgid "4: Extended - Causing garbage" +msgstr "4: Extendido - Pode causar lixo na tela" + +#: ../plugins/peopsxgl/gpucfg/interface.c:515 +#: ../plugins/peopsxgl/gpucfg/interface.c:527 +msgid "0: Emulated vram - Needs FVP" +msgstr "0: VRAM emulada - precisa do FVP" + +#: ../plugins/peopsxgl/gpucfg/interface.c:516 +msgid "1: Black - Fast, no effects" +msgstr "1: Preto - Rápido, sem efeitos" + +#: ../plugins/peopsxgl/gpucfg/interface.c:517 +msgid "2: Gfx card buffer - Can be slow" +msgstr "2: Usar buffer da placa - Pode ficar lento" + +#: ../plugins/peopsxgl/gpucfg/interface.c:518 +msgid "3: Gfx card & soft - slow" +msgstr "3: Placa e software - Lento" + +#: ../plugins/peopsxgl/gpucfg/interface.c:538 +#: ../plugins/peopsxgl/gpucfg/interface.c:551 +msgid "0: Emulated vram - ok most times" +msgstr "0: VRAM Emulada - bom na maioria das vezes" + +#: ../plugins/peopsxgl/gpucfg/interface.c:539 +msgid "1: Gfx card buffer reads" +msgstr "1: Leitura do buffer da placa" + +#: ../plugins/peopsxgl/gpucfg/interface.c:540 +msgid "2: Gfx card buffer moves" +msgstr "2: Escrita no buffer da placa" + +#: ../plugins/peopsxgl/gpucfg/interface.c:541 +msgid "3: Gfx buffer reads & moves" +msgstr "3: Leitura e Escrita no buffer da placa" + +#: ../plugins/peopsxgl/gpucfg/interface.c:542 +msgid "4: Full Software (FVP)" +msgstr "4: Todo em software (FVP)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:553 +msgid "Special game fixes" +msgstr "Consertos específicos para jogos" + +#: ../plugins/peopsxgl/gpucfg/interface.c:576 +msgid "Battle cursor (FF7)" +msgstr "Cursor da batalha (Final Fantasy 7)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:584 +msgid "Direct FB updates" +msgstr "Atualização direta do framebuffer" + +#: ../plugins/peopsxgl/gpucfg/interface.c:592 +msgid "Black brightness (Lunar)" +msgstr "Brilho no mínimo (Lunar)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:600 +msgid "Swap front detection" +msgstr "Detecção da inversão frontal" + +#: ../plugins/peopsxgl/gpucfg/interface.c:608 +msgid "Disable coord check" +msgstr "Desligar checagem de coordenadas" + +#: ../plugins/peopsxgl/gpucfg/interface.c:616 +msgid "No blue glitches (LoD)" +msgstr "Sem sujeira azul (Legend of Dragoon)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:624 +msgid "Soft FB access" +msgstr "Acesso ao framebuffer por software" + +#: ../plugins/peopsxgl/gpucfg/interface.c:632 +msgid "PC fps calculation" +msgstr "Cálculo do FPS feito pelo PC" + +#: ../plugins/peopsxgl/gpucfg/interface.c:648 +msgid "Yellow rect (FF9)" +msgstr "Retângulo amarelo (Final Fantasy 9)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:656 +msgid "No subtr. blending" +msgstr "Sem subtração na mesclagem" + +#: ../plugins/peopsxgl/gpucfg/interface.c:664 +msgid "Lazy upload (DW7)" +msgstr "Atualização tardia (Dragon Warrior 7)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:672 +msgid "Odd/even hack" +msgstr "Hack do ímpar/par" + +#: ../plugins/peopsxgl/gpucfg/interface.c:680 +msgid "Adjust screen width" +msgstr "Ajustar largura da tela" + +#: ../plugins/peopsxgl/gpucfg/interface.c:688 +msgid "Old texture filtering" +msgstr "Filtragem de textura antiga" + +#: ../plugins/peopsxgl/gpucfg/interface.c:696 +msgid "Additional uploads" +msgstr "Envio de dados adicionais" + +#: ../plugins/peopsxgl/gpucfg/interface.c:704 +msgid "unused" +msgstr "Não usado" + +#: ../plugins/peopsxgl/gpucfg/interface.c:712 +msgid "Fake 'gpu busy'" +msgstr "Imitar estado 'GPU ocupada'" + +#: ../plugins/peopsxgl/gpucfg/interface.c:720 +msgid "Misc" +msgstr "Miscelânea" + +#: ../plugins/peopsxgl/gpucfg/interface.c:743 +msgid "Scanlines" +msgstr "Scanlines" + +#: ../plugins/peopsxgl/gpucfg/interface.c:751 +msgid "Blending (0..255, -1=dot):" +msgstr "Mesclagem (0..255, -1=por ponto):" + +#: ../plugins/peopsxgl/gpucfg/interface.c:759 +msgid "Screen smoothing (can be slow or unsupported)" +msgstr "Filtragem da tela inteira (pode ser lenta ou não suportada)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:767 +msgid "Use OpenGL extensions (recommended)" +msgstr "Usar extensões OpenGL (recomendado)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:775 +msgid "Polygon anti-aliasing (slow with most cards)" +msgstr "Anti-aliasing de polígonos (lento com a maioria das placas)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:783 +msgid "Line mode (polygons will not get filled)" +msgstr "Modo de linhas (polígonos não serão tratados)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:791 +msgid "Force 15 bit framebuffer updates (faster movies)" +msgstr "Forçar atualizações do framebuffer em 15 bit (filmes mais rápidos)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:799 +msgid "Unfiltered MDECs (small movie speedup)" +msgstr "MDECs sem filtragem (pequeno ganho de velocidade nos filmes)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:852 +msgid "Adapted from P.E.Op.S OpenGL GPU by Pete Bernert" +msgstr "Adaptado da extensão de GPU OpenGL P.E.Op.S por Pete Bernert" + +#: ../plugins/peopsxgl/gpucfg/interface.c:861 +msgid "Homepage: http://www.pbernert.com" +msgstr "Página: http://www.pbernert.com" + +#: ../plugins/peopsxgl/gpucfg/interface.c:879 +msgid "Version: 1.78" +msgstr "Versão: 1.78" + +#: ../plugins/dfinput/cfg-gtk2.c:48 +msgid "D-Pad Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:49 +msgid "D-Pad Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:50 +msgid "D-Pad Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:51 +msgid "D-Pad Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:52 +msgid "Cross" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:53 +msgid "Circle" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:54 +msgid "Square" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:55 +msgid "Triangle" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:56 +msgid "L1" +msgstr "L1" + +#: ../plugins/dfinput/cfg-gtk2.c:57 +msgid "R1" +msgstr "R1" + +#: ../plugins/dfinput/cfg-gtk2.c:58 +msgid "L2" +msgstr "L2" + +#: ../plugins/dfinput/cfg-gtk2.c:59 +msgid "R2" +msgstr "R2" + +#: ../plugins/dfinput/cfg-gtk2.c:60 +msgid "Select" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:61 +msgid "Start" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:62 +msgid "L3" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:63 +msgid "R3" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:67 +msgid "L-Stick Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:68 +msgid "L-Stick Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:69 +msgid "L-Stick Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:70 +msgid "L-Stick Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:71 +msgid "R-Stick Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:72 +msgid "R-Stick Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:73 +msgid "R-Stick Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:74 +msgid "R-Stick Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Centered" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Rightup" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Rightdown" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Leftup" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:105 ../plugins/dfinput/cfg-gtk2.c:144 +msgid "Leftdown" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:109 ../plugins/dfinput/cfg-gtk2.c:148 +#, c-format +msgid "Joystick: Button %d" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:113 ../plugins/dfinput/cfg-gtk2.c:152 +#, c-format +msgid "Joystick: Axis %d%c" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:118 ../plugins/dfinput/cfg-gtk2.c:157 +#, c-format +msgid "Joystick: Hat %d %s" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:133 ../plugins/dfinput/cfg-gtk2.c:172 +msgid "Keyboard:" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:137 ../plugins/dfinput/cfg-gtk2.c:176 +msgid "(Not Set)" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:539 +msgid "None" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:581 +msgid "Gamepad/Keyboard Input Configuration" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:587 ../plugins/dfinput/cfg-gtk2.c:607 +msgid "Key" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:593 ../plugins/dfinput/cfg-gtk2.c:613 +msgid "Button" +msgstr "" + +#: ../plugins/dfinput/pad.c:22 +msgid "Gamepad/Keyboard Input" +msgstr "Entrada do gamepad ou teclado" + +#: ../plugins/dfinput/dfinput.glade2:35 ../plugins/dfinput/dfinput.glade2:232 +msgid "Device:" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:66 ../plugins/dfinput/dfinput.glade2:263 +msgid "Type:" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:78 ../plugins/dfinput/dfinput.glade2:275 +msgid "" +"Digital Pad\n" +"Analog Pad" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:149 ../plugins/dfinput/dfinput.glade2:346 +msgid "Change" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:185 ../plugins/dfinput/dfinput.glade2:382 +msgid "Reset" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:210 +msgid "Controller 1" +msgstr "Controle 1" + +#: ../plugins/dfinput/dfinput.glade2:412 +msgid "Controller 2" +msgstr "Controle 2" + +#: ../plugins/dfinput/dfinput.glade2:427 +msgid "Multi-Threaded (Recommended)" +msgstr "" + +#: ../plugins/dfnet/dfnet.c:23 +#, fuzzy +msgid "Socket Driver" +msgstr "Extensão SoftGL" + +#: ../plugins/dfnet/dfnet.c:161 +#, fuzzy, c-format +msgid "error connecting to %s: %s\n" +msgstr "Erro carregando \"%s\": \"%s\"" + +#: ../plugins/dfnet/dfnet.c:186 +#, fuzzy +msgid "Error allocating memory!\n" +msgstr "Erro ao alocar memória!" + +#: ../plugins/dfnet/gui.c:39 +msgid "Nothing to configure" +msgstr "" + +#: ../plugins/dfnet/gui.c:95 +#, c-format +msgid "IP %s" +msgstr "" + +#: ../plugins/dfnet/gui.c:165 +msgid "Waiting for connection..." +msgstr "" + +#: ../plugins/dfnet/gui.c:168 +msgid "The Client should now Start a Connection, waiting..." +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:23 +msgid "" +"Select here if you'll be Server (Player1) or Client (Player2).\n" +"\n" +"If you select Server you must Copy your IP address to the Clipboard and " +"paste if (Ctrl+V) wherever the Client can see it.\n" +"\n" +"If you selected Client please enter the IP address the Server gave to you in " +"the IP Address Control." +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:63 +msgid "Copy PC IP to Clipboard" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:94 +msgid "Server (Player1)" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:104 +msgid "Client (Player2)" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:130 +msgid "" +"Do not change if not necessary (remember it must be changed on both sides)." +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:143 +msgid "Port Number" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:202 +msgid "Start Game" +msgstr "" + +#: ../plugins/dfnet/dfnet.glade2:240 +msgid "Play Offline" +msgstr "" + +#: ../plugins/bladesio1/sio1.c:29 +#, fuzzy +msgid "Sio1 Driver" +msgstr "Extensão SoftGL" + +#, fuzzy +#~ msgid "CD-ROM Device Reader" +#~ msgstr "Leitor de unidade de CDROM" + +#~ msgid "Error Closing PAD1 Plugin" +#~ msgstr "Erro ao fechar a extensão do controle 1!" + +#~ msgid "Error Closing PAD2 Plugin" +#~ msgstr "Erro ao fechar a extensão do controle 2!" + +#~ msgid "Internal HLE Bios" +#~ msgstr "BIOS HLE interna" + +#, fuzzy +#~ msgid "Dump Memory..." +#~ msgstr "&Cartões de memória..." + +#~ msgid "" +#~ "(C) 1999-2003 PCSX Team\n" +#~ "(C) 2005-2006 Ryan Schultz\n" +#~ "(C) 2005-2006 Andrew Burton\n" +#~ "(C) 2008-2009 Wei Mingzhi" +#~ msgstr "" +#~ "(C) 1999-2003 Equipe do PCSX\n" +#~ "(C) 2005-2006 Ryan Schultz\n" +#~ "(C) 2005-2006 Andrew Burton\n" +#~ "(C) 2008-2009 Wei Mingzhi" diff --git a/po/quot.sed b/po/quot.sed new file mode 100644 index 00000000..0122c463 --- /dev/null +++ b/po/quot.sed @@ -0,0 +1,6 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin new file mode 100644 index 00000000..2436c49e --- /dev/null +++ b/po/remove-potcdate.sin @@ -0,0 +1,19 @@ +# Sed script that remove the POT-Creation-Date line in the header entry +# from a POT file. +# +# The distinction between the first and the following occurrences of the +# pattern is achieved by looking at the hold space. +/^"POT-Creation-Date: .*"$/{ +x +# Test if the hold space is empty. +s/P/P/ +ta +# Yes it was empty. First occurrence. Remove the line. +g +d +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/po/ru_RU.gmo b/po/ru_RU.gmo new file mode 100644 index 0000000000000000000000000000000000000000..5c19bf31c9fa03fb88375c6fe79d50fd485201d9 GIT binary patch literal 47921 zcmds=d04MI0$~j^SBcf8U#OY2!biQ1;KxU%kF(Z}RvBa4-Dd0uKOR1`h;Z1NQ{q1Z%)Qg37mhlZ)RERQ$2v-rz`ZKX9xMKLu3! zDc(N|+z0<$@F4JfQ2DyReZh>!%R%M49y}Dh9aOnbf_s4LK-IemRKD$?%J~MUe1qQq ziueB%RQrDgjt2h()`DSk5F7>0@|XZWfd6uj_k+jb-{SF~!6Weh!Q=iDg5dr5M|nIA zRQ@(_B$x#c1@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>(M?-y0#!Ri>oH3{0&$ABwfv?- zWFa`Rz-kJrOX~^KYqZ)RaYkA8IdOtb57cd*dnh^nx{&=F2&J!!SH|0PQiE+Y{ny6r zx}Yd2wv?E@nPkP~Q-1gTar&#KX@Md?22uVZuC;1Pp&|D>>RwC3#!l}i(n^woe6r*b^ zH}GlNc72*wwl~w;Xp-A&i6&|XfBlz|>)Q3*TCYoJI~!vfD^(jnco9ipbJpMfv8cNk zZ}-aN7Tyu4zZ`1=R^B)*U(qXR`VMhik&mC6RvT)H!@Q-N zVKqTnyzQrrv7F{eBV{Jq8bBo}{^DZp-PtZ#SJ-wfv-=`?09UY#OV5<#6ZgjMR0aPR DLJ9pL literal 0 HcmV?d00001 diff --git a/po/ru_RU.po b/po/ru_RU.po new file mode 100644 index 00000000..1c6290e3 --- /dev/null +++ b/po/ru_RU.po @@ -0,0 +1,3052 @@ +# Russian translation of pcsxr. +# Copyright (C) 2010 edgbla +# This file is distributed under the same license as the pcsxr package. +# +# Blade_Arma , 2010. +msgid "" +msgstr "" +"Project-Id-Version: pcsxr 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-07-10 14:04+0800\n" +"PO-Revision-Date: 2010-07-01 23:53+0400\n" +"Last-Translator: Blade_Arma \n" +"Language-Team: American English \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../win32/gui/AboutDlg.c:26 +msgid "" +"PCSX - A PlayStation Emulator\n" +"\n" +"Original Authors:\n" +"main coder: linuzappz\n" +"co-coders: shadow\n" +"ex-coders: Nocomp, Pete Bernett, nik3d\n" +"Webmaster: AkumaX" +msgstr "" + +#: ../win32/gui/AboutDlg.c:35 +msgid "" +"PCSX-df Authors:\n" +"Ryan Schultz, Andrew Burton, Stephen Chao,\n" +"Marcus Comstedt, Stefan Sikora\n" +"\n" +"PCSX-Reloaded By:\n" +"Blade_Arma, Wei Mingzhi, et al.\n" +"\n" +"http://pcsxr.codeplex.com/" +msgstr "" + +#: ../win32/gui/AboutDlg.c:46 ../plugins/peopsxgl/gpucfg/interface.c:831 +msgid "About" +msgstr "О PCSX" + +#: ../win32/gui/AboutDlg.c:48 ../win32/gui/AboutDlg.c:52 +#: ../win32/gui/CheatDlg.c:69 ../win32/gui/CheatDlg.c:119 +#: ../win32/gui/ConfigurePlugins.c:483 ../win32/gui/ConfigurePlugins.c:614 +#: ../win32/gui/WndMain.c:974 ../win32/gui/WndMain.c:1210 +#: ../plugins/peopsxgl/gpucfg/interface.c:130 +#: ../plugins/peopsxgl/gpucfg/interface.c:843 +msgid "OK" +msgstr "Ок" + +#: ../win32/gui/AboutDlg.c:49 +msgid "PCSX EMU\n" +msgstr "PCSX EMU\n" + +#: ../win32/gui/CheatDlg.c:51 ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "Yes" +msgstr "Да" + +#: ../win32/gui/CheatDlg.c:51 ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "No" +msgstr "Нет" + +#: ../win32/gui/CheatDlg.c:66 ../gui/Cheat.c:194 +msgid "Edit Cheat" +msgstr "Редактирование чита" + +#: ../win32/gui/CheatDlg.c:67 ../win32/gui/CheatDlg.c:117 ../gui/Cheat.c:636 +msgid "Description:" +msgstr "Описание:" + +#: ../win32/gui/CheatDlg.c:68 ../win32/gui/CheatDlg.c:118 ../gui/Cheat.c:125 +#: ../gui/Cheat.c:211 +msgid "Cheat Code:" +msgstr "Чит код:" + +#: ../win32/gui/CheatDlg.c:70 ../win32/gui/CheatDlg.c:120 +#: ../win32/gui/ConfigurePlugins.c:484 ../win32/gui/ConfigurePlugins.c:615 +#: ../win32/gui/WndMain.c:975 ../win32/gui/WndMain.c:1211 +#: ../plugins/peopsxgl/gpucfg/interface.c:338 +msgid "Cancel" +msgstr "Отмена" + +#: ../win32/gui/CheatDlg.c:91 ../win32/gui/CheatDlg.c:132 ../gui/Cheat.c:155 +#: ../gui/Cheat.c:251 +msgid "Invalid cheat code!" +msgstr "Неверный чит код!" + +#: ../win32/gui/CheatDlg.c:116 ../gui/Cheat.c:109 +msgid "Add New Cheat" +msgstr "Добавить новый чит" + +#: ../win32/gui/CheatDlg.c:166 ../data/pcsx.glade2:2534 +msgid "Edit Cheat Codes" +msgstr "Редактировать чит код" + +#: ../win32/gui/CheatDlg.c:168 +msgid "&Add Code" +msgstr "Добавить код(&A)" + +#: ../win32/gui/CheatDlg.c:169 +msgid "&Edit Code" +msgstr "Редактировать код(&E):" + +#: ../win32/gui/CheatDlg.c:170 +msgid "&Remove Code" +msgstr "Удалить код(&R)" + +#: ../win32/gui/CheatDlg.c:171 +msgid "&Enable/Disable" +msgstr "Включить/Выключить(&E)" + +#: ../win32/gui/CheatDlg.c:172 +msgid "&Load..." +msgstr "Загрузить(&L)..." + +#: ../win32/gui/CheatDlg.c:173 +msgid "&Save As..." +msgstr "Сохранить как(&S)..." + +#: ../win32/gui/CheatDlg.c:174 +msgid "&Close" +msgstr "Закрыть(&C)" + +#: ../win32/gui/CheatDlg.c:185 ../gui/Cheat.c:413 +msgid "Description" +msgstr "Описание" + +#: ../win32/gui/CheatDlg.c:190 +msgid "Enabled" +msgstr "Включено" + +#: ../win32/gui/CheatDlg.c:282 ../win32/gui/CheatDlg.c:311 +msgid "PCSX Cheat Code Files" +msgstr "Файл чит кодов PCSX (*.cht)" + +#: ../win32/gui/CheatDlg.c:402 +msgid "Equal Value" +msgstr "Равно значению" + +#: ../win32/gui/CheatDlg.c:403 +msgid "Not Equal Value" +msgstr "Не равно значению" + +#: ../win32/gui/CheatDlg.c:404 +msgid "Range" +msgstr "Диапазон" + +#: ../win32/gui/CheatDlg.c:407 +msgid "Increased By" +msgstr "Увеличилось на" + +#: ../win32/gui/CheatDlg.c:408 +msgid "Decreased By" +msgstr "Уменьшилось на" + +#: ../win32/gui/CheatDlg.c:409 +msgid "Increased" +msgstr "Увеличилось" + +#: ../win32/gui/CheatDlg.c:410 +msgid "Decreased" +msgstr "Уменьшилось" + +#: ../win32/gui/CheatDlg.c:411 +msgid "Different" +msgstr "Изменилось" + +#: ../win32/gui/CheatDlg.c:412 +msgid "No Change" +msgstr "Не изменилось" + +#: ../win32/gui/CheatDlg.c:448 ../gui/Cheat.c:585 +msgid "Enter the values and start your search." +msgstr "Введите значение и начните поиск." + +#: ../win32/gui/CheatDlg.c:453 +msgid "No addresses found." +msgstr "Адреса не найдены." + +#: ../win32/gui/CheatDlg.c:457 ../gui/Cheat.c:543 +msgid "Too many addresses found." +msgstr "Слишком много адресов найдено." + +#: ../win32/gui/CheatDlg.c:466 ../gui/Cheat.c:552 +#, c-format +msgid "%.8X Current: %u (%.2X), Previous: %u (%.2X)" +msgstr "%.8X Текущее: %u (%.2X), Предыдущее: %u (%.2X)" + +#: ../win32/gui/CheatDlg.c:471 ../gui/Cheat.c:557 +#, c-format +msgid "%.8X Current: %u (%.4X), Previous: %u (%.4X)" +msgstr "%.8X Текущее: %u (%.4X), Предыдущее: %u (%.4X)" + +#: ../win32/gui/CheatDlg.c:476 ../gui/Cheat.c:562 +#, c-format +msgid "%.8X Current: %u (%.8X), Previous: %u (%.8X)" +msgstr "%.8X Текущее: %u (%.8X), Предыдущее: %u (%.8X)" + +#: ../win32/gui/CheatDlg.c:492 ../gui/Cheat.c:577 +#, c-format +msgid "Founded Addresses: %d" +msgstr "Найденные адреса: %d" + +#: ../win32/gui/CheatDlg.c:504 ../data/pcsx.glade2:2930 +msgid "Freeze" +msgstr "Заморозить" + +#: ../win32/gui/CheatDlg.c:505 ../win32/gui/CheatDlg.c:596 +msgid "Address:" +msgstr "Адрес:" + +#: ../win32/gui/CheatDlg.c:506 ../win32/gui/CheatDlg.c:597 +#: ../win32/gui/CheatDlg.c:682 ../gui/Cheat.c:647 ../data/pcsx.glade2:2773 +msgid "Value:" +msgstr "Значение:" + +#: ../win32/gui/CheatDlg.c:566 +#, c-format +msgid "Freeze %.8X" +msgstr "Заморозить %.8X" + +#: ../win32/gui/CheatDlg.c:595 ../data/pcsx.glade2:2966 +msgid "Modify" +msgstr "Изменить" + +#: ../win32/gui/CheatDlg.c:678 ../gui/Cheat.c:1129 ../data/pcsx.glade2:2703 +msgid "Cheat Search" +msgstr "Поиск читов" + +#: ../win32/gui/CheatDlg.c:680 ../data/pcsx.glade2:2751 +msgid "Search For:" +msgstr "Искать для:" + +#: ../win32/gui/CheatDlg.c:681 ../data/pcsx.glade2:2761 +msgid "Data Type:" +msgstr "Тип данных:" + +#: ../win32/gui/CheatDlg.c:683 ../data/pcsx.glade2:2785 +msgid "Data Base:" +msgstr "Основание:" + +#: ../win32/gui/CheatDlg.c:684 ../data/pcsx.glade2:2845 +msgid "To:" +msgstr "До:" + +#: ../win32/gui/CheatDlg.c:685 +msgid "&Freeze" +msgstr "Заморозить" + +#: ../win32/gui/CheatDlg.c:686 +msgid "&Modify" +msgstr "Изменить" + +#: ../win32/gui/CheatDlg.c:687 +msgid "&Copy" +msgstr "Копировать" + +#: ../win32/gui/CheatDlg.c:688 +msgid "&Search" +msgstr "Поиск" + +#: ../win32/gui/CheatDlg.c:689 +msgid "&New Search" +msgstr "Новый поиск" + +#: ../win32/gui/CheatDlg.c:690 +msgid "C&lose" +msgstr "Закрыть" + +#: ../win32/gui/CheatDlg.c:692 +msgid "8-bit" +msgstr "8-бит" + +#: ../win32/gui/CheatDlg.c:693 +msgid "16-bit" +msgstr "16-бит" + +#: ../win32/gui/CheatDlg.c:694 +msgid "32-bit" +msgstr "32-бита" + +#: ../win32/gui/CheatDlg.c:695 +msgid "Decimal" +msgstr "Десятичное" + +#: ../win32/gui/CheatDlg.c:696 +msgid "Hexadecimal" +msgstr "Шестнадцатеричное" + +#: ../win32/gui/ConfigurePlugins.c:219 +msgid "Simulate Psx Bios" +msgstr "Симулировать биос psx" + +#: ../win32/gui/ConfigurePlugins.c:305 +msgid "Configuration not OK!" +msgstr "Настройка не завершена!" + +#: ../win32/gui/ConfigurePlugins.c:305 ../gui/Cheat.c:155 ../gui/Cheat.c:251 +#: ../gui/LnxMain.c:418 +msgid "Error" +msgstr "Ошибка" + +#: ../win32/gui/ConfigurePlugins.c:406 +msgid "This plugin reports that should work correctly" +msgstr "Плагин готов к работе" + +#: ../win32/gui/ConfigurePlugins.c:407 +msgid "This plugin reports that should not work correctly" +msgstr "Плагин вернул сообщение об ошибке" + +#: ../win32/gui/ConfigurePlugins.c:463 +msgid "Select Plugins Directory" +msgstr "Каталог с плагинами" + +#: ../win32/gui/ConfigurePlugins.c:472 +msgid "Select Bios Directory" +msgstr "Каталог с биосами" + +#: ../win32/gui/ConfigurePlugins.c:481 +msgid "Configuration" +msgstr "Настройка" + +#: ../win32/gui/ConfigurePlugins.c:485 +msgid "Graphics" +msgstr "Графика" + +#: ../win32/gui/ConfigurePlugins.c:486 +msgid "First Controller" +msgstr "Первый контроллер" + +#: ../win32/gui/ConfigurePlugins.c:487 +msgid "Second Controller" +msgstr "Второй контроллер" + +#: ../win32/gui/ConfigurePlugins.c:488 +msgid "Sound" +msgstr "Звук" + +#: ../win32/gui/ConfigurePlugins.c:489 +msgid "Cdrom" +msgstr "CD-привод" + +#: ../win32/gui/ConfigurePlugins.c:490 +msgid "Bios" +msgstr "Биос" + +#: ../win32/gui/ConfigurePlugins.c:491 +msgid "Set Bios Directory" +msgstr "Выберите каталог с биосами" + +#: ../win32/gui/ConfigurePlugins.c:492 +msgid "Set Plugins Directory" +msgstr "Выберите каталог с плагинами" + +#: ../win32/gui/ConfigurePlugins.c:493 ../win32/gui/ConfigurePlugins.c:496 +#: ../win32/gui/ConfigurePlugins.c:499 ../win32/gui/ConfigurePlugins.c:502 +#: ../win32/gui/ConfigurePlugins.c:505 ../win32/gui/ConfigurePlugins.c:617 +msgid "Configure..." +msgstr "Настройка..." + +#: ../win32/gui/ConfigurePlugins.c:494 ../win32/gui/ConfigurePlugins.c:497 +#: ../win32/gui/ConfigurePlugins.c:500 ../win32/gui/ConfigurePlugins.c:503 +#: ../win32/gui/ConfigurePlugins.c:506 ../win32/gui/ConfigurePlugins.c:618 +msgid "Test..." +msgstr "Тест..." + +#: ../win32/gui/ConfigurePlugins.c:495 ../win32/gui/ConfigurePlugins.c:498 +#: ../win32/gui/ConfigurePlugins.c:501 ../win32/gui/ConfigurePlugins.c:504 +#: ../win32/gui/ConfigurePlugins.c:507 ../win32/gui/ConfigurePlugins.c:619 +msgid "About..." +msgstr "О..." + +#: ../win32/gui/ConfigurePlugins.c:612 +msgid "NetPlay Configuration" +msgstr "Настройка сетевой игры" + +#: ../win32/gui/ConfigurePlugins.c:616 ../plugins/dfnet/gui.c:31 +#: ../plugins/dfnet/gui.c:112 +msgid "NetPlay" +msgstr "Сетевая игра" + +#: ../win32/gui/ConfigurePlugins.c:620 +msgid "" +"Note: The NetPlay Plugin Directory should be the same as the other Plugins." +msgstr "" +"Внимание! NetPlay плагин должен находится в том же каталоге что и остальные " +"плагины." + +#: ../win32/gui/plugin.c:90 ../win32/gui/WndMain.c:281 +#, c-format +msgid "*PCSX*: Saved State %d" +msgstr "*PCSX*: Состояние сохранено %d" + +#: ../win32/gui/plugin.c:91 ../win32/gui/WndMain.c:282 +#, c-format +msgid "*PCSX*: Error Saving State %d" +msgstr "*PCSX*: Ошибка сохранения состояния %d" + +#: ../win32/gui/plugin.c:107 ../win32/gui/WndMain.c:259 +#, c-format +msgid "*PCSX*: Loaded State %d" +msgstr "PCSX*: Состояние загружено %d" + +#: ../win32/gui/plugin.c:108 ../win32/gui/WndMain.c:260 +#, c-format +msgid "*PCSX*: Error Loading State %d" +msgstr "*PCSX*: Ошибка загрузки состояния %d" + +#: ../win32/gui/plugin.c:119 +#, c-format +msgid "*PCSX*: Sio Irq Always Enabled" +msgstr "*PCSX*: Удерживание линии прерывания SIO включено" + +#: ../win32/gui/plugin.c:120 +#, c-format +msgid "*PCSX*: Sio Irq Not Always Enabled" +msgstr "*PCSX*: Удерживание линии прерывания SIO выключено" + +#: ../win32/gui/plugin.c:127 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Enabled" +msgstr "*PCSX*: Режим чёрно-белых видео вставок (Mdecs) включен" + +#: ../win32/gui/plugin.c:128 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Disabled" +msgstr "*PCSX*: Режим чёрно-белых видео вставок (Mdecs) выключен" + +#: ../win32/gui/plugin.c:135 +#, c-format +msgid "*PCSX*: Xa Enabled" +msgstr "*PCSX*: Xa включено" + +#: ../win32/gui/plugin.c:136 +#, c-format +msgid "*PCSX*: Xa Disabled" +msgstr "*PCSX*: Xa выключено" + +#: ../win32/gui/plugin.c:145 +msgid "*PCSX*: CdRom Case Opened" +msgstr "*PCSX*: крышка CD-привода открыта" + +#: ../win32/gui/plugin.c:150 +msgid "*PCSX*: CdRom Case Closed" +msgstr "*PCSX*: крышка CD-привода закрыта" + +#: ../win32/gui/plugin.c:177 +msgid "Connecting..." +msgstr "Соединение..." + +#: ../win32/gui/plugin.c:179 ../win32/gui/plugin.c:186 +#, c-format +msgid "Please wait while connecting... %c\n" +msgstr "Идёт соединение, подождите... %c\n" + +#: ../win32/gui/plugin.c:214 +msgid "Error Opening CDR Plugin" +msgstr "Ошибка открытия CDR плагина" + +#: ../win32/gui/plugin.c:277 +#, c-format +msgid "Error Opening GPU Plugin (%d)" +msgstr "Ошибка открытия GPU плагина (%d)" + +#: ../win32/gui/plugin.c:279 +#, c-format +msgid "Error Opening SPU Plugin (%d)" +msgstr "Ошибка открытия SPU плагина (%d)" + +#: ../win32/gui/plugin.c:282 +#, c-format +msgid "Error Opening PAD1 Plugin (%d)" +msgstr "Ошибка открытия PAD1 плагина (%d)" + +#: ../win32/gui/plugin.c:284 +#, c-format +msgid "Error Opening PAD2 Plugin (%d)" +msgstr "Ошибка открытия PAD2 плагина (%d)" + +#: ../win32/gui/plugin.c:314 +msgid "Error Closing CDR Plugin" +msgstr "Ошибка при закрытии CD-ROM плагина (%d)" + +#: ../win32/gui/plugin.c:316 +msgid "Error Closing GPU Plugin" +msgstr "Ошибка при закрытии GPU плагина" + +#: ../win32/gui/plugin.c:318 +msgid "Error Closing SPU Plugin" +msgstr "Ошибка при закрытии SPU плагина" + +#: ../win32/gui/plugin.c:336 +#, c-format +msgid "CDRinit error: %d" +msgstr "Ошибка в CDRinit: %d" + +#: ../win32/gui/plugin.c:338 +#, c-format +msgid "GPUinit error: %d" +msgstr "Ошибка в GPUinit: %d" + +#: ../win32/gui/plugin.c:340 +#, c-format +msgid "SPUinit error: %d" +msgstr "Ошибка в SPUinit: %d" + +#: ../win32/gui/plugin.c:342 +#, c-format +msgid "PAD1init error: %d" +msgstr "Ошибка в PAD1init: %d" + +#: ../win32/gui/plugin.c:344 +#, c-format +msgid "PAD2init error: %d" +msgstr "Ошибка в PAD2init: %d" + +#: ../win32/gui/plugin.c:347 +#, c-format +msgid "NETinit error: %d" +msgstr "Ошибка в NETinit: %d" + +#: ../win32/gui/WndMain.c:76 +msgid "Arabic" +msgstr "Арабский" + +#: ../win32/gui/WndMain.c:77 +msgid "Catalan" +msgstr "Каталанский" + +#: ../win32/gui/WndMain.c:78 +msgid "German" +msgstr "Немецкий" + +#: ../win32/gui/WndMain.c:79 +msgid "Greek" +msgstr "Греческий" + +#: ../win32/gui/WndMain.c:80 ../win32/gui/WndMain.c:1566 +#: ../win32/gui/WndMain.c:1568 +msgid "English" +msgstr "Английский" + +#: ../win32/gui/WndMain.c:81 +msgid "Spanish" +msgstr "Испанский" + +#: ../win32/gui/WndMain.c:82 +msgid "French" +msgstr "Французский" + +#: ../win32/gui/WndMain.c:83 +msgid "Italian" +msgstr "Итальянский" + +#: ../win32/gui/WndMain.c:84 +msgid "Portuguese" +msgstr "Португальский" + +#: ../win32/gui/WndMain.c:85 +msgid "Portuguese (Brazilian)" +msgstr "Португальский (Бразильский)" + +#: ../win32/gui/WndMain.c:86 +msgid "Romanian" +msgstr "Румынский" + +#: ../win32/gui/WndMain.c:87 +msgid "Russian" +msgstr "Русский" + +#: ../win32/gui/WndMain.c:88 +msgid "Simplified Chinese" +msgstr "Китайский упрощенный" + +#: ../win32/gui/WndMain.c:89 +msgid "Traditional Chinese" +msgstr "Китайский традиционный " + +#: ../win32/gui/WndMain.c:90 +msgid "Japanese" +msgstr "Японский" + +#: ../win32/gui/WndMain.c:91 +msgid "Korean" +msgstr "Корейский" + +#: ../win32/gui/WndMain.c:300 ../win32/gui/WndMain.c:352 +msgid "PCSX State Format" +msgstr "Формат состояния PCSX" + +#: ../win32/gui/WndMain.c:327 +#, c-format +msgid "*PCSX*: Loaded State %s" +msgstr "*PCSX*: Состояние загружено %s" + +#: ../win32/gui/WndMain.c:328 +#, c-format +msgid "*PCSX*: Error Loading State %s" +msgstr "*PCSX*: Ошибка загрузки состояния %s" + +#: ../win32/gui/WndMain.c:379 +#, c-format +msgid "*PCSX*: Saved State %s" +msgstr "*PCSX*: Состояние сохранено %s" + +#: ../win32/gui/WndMain.c:380 +#, c-format +msgid "*PCSX*: Error Saving State %s" +msgstr "*PCSX*: Ошибка сохранения состояния %s" + +#: ../win32/gui/WndMain.c:429 ../win32/gui/WndMain.c:478 ../gui/Gtk2Gui.c:485 +#: ../gui/Gtk2Gui.c:610 +msgid "The CD does not appear to be a valid Playstation CD" +msgstr "Установленный CD-диск не является диском PlayStation" + +#: ../win32/gui/WndMain.c:435 ../win32/gui/WndMain.c:484 ../gui/Gtk2Gui.c:493 +#: ../gui/Gtk2Gui.c:618 +msgid "Could not load CD-ROM!" +msgstr "Не удалось загрузить CD-ROM!" + +#: ../win32/gui/WndMain.c:445 +msgid "Running BIOS is not supported with Internal HLE Bios." +msgstr "" +"Стандартная оболочка, позволяющая управлять картами памяти и проигрывать DA " +"музыку, при использовании HLE-биоса недоступна." + +#: ../win32/gui/WndMain.c:664 ../gui/MemcardDlg.c:62 +msgid "Title" +msgstr "Название" + +#: ../win32/gui/WndMain.c:670 ../gui/MemcardDlg.c:68 +msgid "Status" +msgstr "Статус" + +#: ../win32/gui/WndMain.c:676 +msgid "Game ID" +msgstr "Идентификатор игры" + +#: ../win32/gui/WndMain.c:682 +msgid "Game" +msgstr "Игра" + +#: ../win32/gui/WndMain.c:864 +msgid "mid link block" +msgstr "соединительный блок" + +#: ../win32/gui/WndMain.c:867 +msgid "terminiting link block" +msgstr "завершающий соединительный блок" + +#: ../win32/gui/WndMain.c:875 ../gui/MemcardDlg.c:155 ../gui/MemcardDlg.c:260 +msgid "Deleted" +msgstr "Удалено" + +#: ../win32/gui/WndMain.c:876 ../win32/gui/WndMain.c:879 +#: ../gui/MemcardDlg.c:157 ../gui/MemcardDlg.c:161 ../gui/MemcardDlg.c:262 +#: ../gui/MemcardDlg.c:266 +msgid "Free" +msgstr "Свободно" + +#: ../win32/gui/WndMain.c:878 ../gui/MemcardDlg.c:159 ../gui/MemcardDlg.c:264 +msgid "Used" +msgstr "Использовано" + +#: ../win32/gui/WndMain.c:972 +msgid "Memcard Manager" +msgstr "Менеджер карт памяти" + +#: ../win32/gui/WndMain.c:976 ../win32/gui/WndMain.c:979 +msgid "Select Mcd" +msgstr "Выбрать" + +#: ../win32/gui/WndMain.c:977 ../win32/gui/WndMain.c:980 +msgid "Format Mcd" +msgstr "Форматировать" + +#: ../win32/gui/WndMain.c:978 ../win32/gui/WndMain.c:981 +msgid "Reload Mcd" +msgstr "Перезагрузить" + +#: ../win32/gui/WndMain.c:982 +msgid "-> Copy ->" +msgstr "-> Копировать ->" + +#: ../win32/gui/WndMain.c:983 +msgid "<- Copy <-" +msgstr "<- Копировать <-" + +#: ../win32/gui/WndMain.c:984 +msgid "Paste" +msgstr "Вставить" + +#: ../win32/gui/WndMain.c:985 +msgid "<- Un/Delete" +msgstr "<- Восстановить блок" + +#: ../win32/gui/WndMain.c:986 +msgid "Un/Delete ->" +msgstr "Восстановить блок ->" + +#: ../win32/gui/WndMain.c:988 +msgid "Memory Card 1" +msgstr "Карта памяти 1" + +#: ../win32/gui/WndMain.c:989 +msgid "Memory Card 2" +msgstr "Карта памяти 2" + +#: ../win32/gui/WndMain.c:1044 +msgid "Are you sure you want to paste this selection?" +msgstr "Вы уверены в том, что хотите вставить выделенное?" + +#: ../win32/gui/WndMain.c:1044 ../win32/gui/WndMain.c:1155 +#: ../win32/gui/WndMain.c:1162 +msgid "Confirmation" +msgstr "Подтверждение" + +#: ../win32/gui/WndMain.c:1155 ../win32/gui/WndMain.c:1162 +msgid "Are you sure you want to format this Memory Card?" +msgstr "Вы уверены в том, что хотите отформатировать карту памяти?" + +#: ../win32/gui/WndMain.c:1208 +msgid "Cpu Config" +msgstr "Настройка ЦПУ" + +#: ../win32/gui/WndMain.c:1213 +msgid "Disable Xa Decoding" +msgstr "Отключить декодирование XA" + +#: ../win32/gui/WndMain.c:1214 +msgid "Sio Irq Always Enabled" +msgstr "Удерживание линии прерывания SIO" + +#: ../win32/gui/WndMain.c:1215 +msgid "Black && White Movies" +msgstr "Чёрно-белые заставки" + +#: ../win32/gui/WndMain.c:1216 +msgid "Disable Cd audio" +msgstr "Выключить CD музыку" + +#: ../win32/gui/WndMain.c:1217 ../data/pcsx.glade2:1595 +msgid "Autodetect" +msgstr "Авто-определение" + +#: ../win32/gui/WndMain.c:1218 +msgid "Enable Interpreter Cpu" +msgstr "Включить интерпретатор ЦПУ" + +#: ../win32/gui/WndMain.c:1219 ../data/pcsx.glade2:1451 +msgid "Enable Console Output" +msgstr "Включить вывод в консоль" + +#: ../win32/gui/WndMain.c:1220 ../data/pcsx.glade2:1401 +msgid "Enable Debugger" +msgstr "Включить отладчик" + +#: ../win32/gui/WndMain.c:1221 +msgid "Spu Irq Always Enabled" +msgstr "Удерживание линии прерывания SPU" + +#: ../win32/gui/WndMain.c:1222 ../data/pcsx.glade2:1538 +msgid "Parasite Eve 2, Vandal Hearts 1/2 Fix" +msgstr "Исправление для Parasite Eve 2 и Vandal Hearts" + +#: ../win32/gui/WndMain.c:1223 ../data/pcsx.glade2:1553 +msgid "InuYasha Sengoku Battle Fix" +msgstr "Исправление для InuYasha Sengoku Battle" + +#: ../win32/gui/WndMain.c:1225 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:277 +#: ../plugins/dfinput/dfinput.glade2:448 +msgid "Options" +msgstr "Опции" + +#: ../win32/gui/WndMain.c:1226 +msgid "Psx System Type" +msgstr "Тип системы psx" + +#: ../win32/gui/WndMain.c:1330 +msgid "Psx Mcd Format (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)" +msgstr "Форматы карт памяти psx (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)" + +#: ../win32/gui/WndMain.c:1335 +msgid "Psx Memory Card (*.mcr;*.mc)" +msgstr "Карта памяти psx (*.mcr;*.mc)" + +#: ../win32/gui/WndMain.c:1340 +msgid "CVGS Memory Card (*.mem;*.vgs)" +msgstr "Карта памяти CVGS (*.mem;*.vgs)" + +#: ../win32/gui/WndMain.c:1345 +msgid "Bleem Memory Card (*.mcd)" +msgstr "Карта памяти Bleem (*.mcd)" + +#: ../win32/gui/WndMain.c:1350 +msgid "DexDrive Memory Card (*.gme)" +msgstr "Карта памяти DexDrive (*.gme)" + +#: ../win32/gui/WndMain.c:1355 +msgid "DataDeck Memory Card (*.ddf)" +msgstr "Карта памяти DataDeck (*.ddf)" + +#: ../win32/gui/WndMain.c:1360 ../win32/gui/WndMain.c:1441 ../gui/Cheat.c:321 +#: ../gui/Gtk2Gui.c:422 ../gui/Gtk2Gui.c:561 +msgid "All Files" +msgstr "Все файлы" + +#: ../win32/gui/WndMain.c:1399 +msgid "Psx Exe Format" +msgstr "Psx exe формат" + +#: ../win32/gui/WndMain.c:1436 +msgid "Psx Isos (*.iso;*.mdf;*.img;*.bin)" +msgstr "Образы диска psx (*.iso;*.mdf;*.img;*.bin)" + +#: ../win32/gui/WndMain.c:1512 +msgid "&File" +msgstr "Файл(&F)" + +#: ../win32/gui/WndMain.c:1513 +msgid "E&xit" +msgstr "Выход(&X)" + +#: ../win32/gui/WndMain.c:1515 +msgid "Run &EXE..." +msgstr "Запустить EXE" + +#: ../win32/gui/WndMain.c:1516 +msgid "Run &BIOS" +msgstr "Запустить BIOS" + +#: ../win32/gui/WndMain.c:1517 +msgid "Run &ISO..." +msgstr "Запустить ISO" + +#: ../win32/gui/WndMain.c:1518 +msgid "Run &CD" +msgstr "Запустить CD" + +#: ../win32/gui/WndMain.c:1520 +msgid "&Emulator" +msgstr "Эмулятор(&E)" + +#: ../win32/gui/WndMain.c:1521 +msgid "&States" +msgstr "Состояния(&S)" + +#: ../win32/gui/WndMain.c:1523 +msgid "S&witch ISO..." +msgstr "Изменить ISO(&W)..." + +#: ../win32/gui/WndMain.c:1525 +msgid "Re&set" +msgstr "Сброс(&S)" + +#: ../win32/gui/WndMain.c:1526 +msgid "&Run" +msgstr "Старт(&R)" + +#: ../win32/gui/WndMain.c:1527 +msgid "&Save" +msgstr "Сохранить(&S)" + +#: ../win32/gui/WndMain.c:1528 +msgid "&Load" +msgstr "Загрузить(&L)" + +#: ../win32/gui/WndMain.c:1529 ../win32/gui/WndMain.c:1535 +msgid "&Other..." +msgstr "Другой(&O)..." + +#: ../win32/gui/WndMain.c:1530 ../win32/gui/WndMain.c:1536 +msgid "Slot &5" +msgstr "Слот 5(&5)" + +#: ../win32/gui/WndMain.c:1531 ../win32/gui/WndMain.c:1537 +msgid "Slot &4" +msgstr "Слот 4(&4)" + +#: ../win32/gui/WndMain.c:1532 ../win32/gui/WndMain.c:1538 +msgid "Slot &3" +msgstr "Слот 3(&3)" + +#: ../win32/gui/WndMain.c:1533 ../win32/gui/WndMain.c:1539 +msgid "Slot &2" +msgstr "Слот 2(&2)" + +#: ../win32/gui/WndMain.c:1534 ../win32/gui/WndMain.c:1540 +msgid "Slot &1" +msgstr "Слот 1(&1)" + +#: ../win32/gui/WndMain.c:1542 +msgid "&Configuration" +msgstr "Настройка(&C)" + +#: ../win32/gui/WndMain.c:1543 +msgid "Cheat &Search..." +msgstr "Поиск читов...(&S)" + +#: ../win32/gui/WndMain.c:1544 +msgid "Ch&eat Code..." +msgstr "Чит код...(&E)" + +#: ../win32/gui/WndMain.c:1547 +msgid "&Language" +msgstr "Язык(&L)" + +#: ../win32/gui/WndMain.c:1572 +msgid "&Memory cards..." +msgstr "Карты памяти(&M)..." + +#: ../win32/gui/WndMain.c:1573 +msgid "C&PU..." +msgstr "ЦПУ(&P)..." + +#: ../win32/gui/WndMain.c:1575 +msgid "&NetPlay..." +msgstr "Сетевая игра..." + +#: ../win32/gui/WndMain.c:1577 +msgid "&Controllers..." +msgstr "Управление..." + +#: ../win32/gui/WndMain.c:1578 +msgid "CD-&ROM..." +msgstr "CD-привод(&R)..." + +#: ../win32/gui/WndMain.c:1579 +msgid "&Sound..." +msgstr "Звук..." + +#: ../win32/gui/WndMain.c:1580 +msgid "&Graphics..." +msgstr "Графика..." + +#: ../win32/gui/WndMain.c:1582 +msgid "&Plugins && Bios..." +msgstr "Плагины и биос(&P)..." + +#: ../win32/gui/WndMain.c:1584 +msgid "&Help" +msgstr "Помощь(&H)" + +#: ../win32/gui/WndMain.c:1585 +msgid "&About..." +msgstr "О(&A)..." + +#: ../win32/gui/WndMain.c:1764 +msgid "Pcsx Msg" +msgstr "Сообщение pcsx" + +#: ../win32/gui/WndMain.c:1767 +msgid "Error Loading Symbol" +msgstr "Ошибка загрузки символа" + +#: ../gui/AboutDlg.c:74 +msgid "" +"(C) 1999-2003 PCSX Team\n" +"(C) 2005-2009 PCSX-df Team\n" +"(C) 2009-2010 PCSX-Reloaded Team" +msgstr "" + +#: ../gui/AboutDlg.c:79 +msgid "" +"This program is free software; you can redistribute it and/or modify it " +"under the terms of the GNU General Public License as published by the Free " +"Software Foundation; either version 2 of the License, or (at your option) " +"any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but WITHOUT " +"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or " +"FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for " +"more details.\n" +"\n" +"You should have received a copy of the GNU General Public License along with " +"this program; if not, write to the Free Software Foundation, Inc., 51 " +"Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA." +msgstr "" + +#: ../gui/AboutDlg.c:102 +msgid "translator-credits" +msgstr "edgbla" + +#: ../gui/AboutDlg.c:103 +msgid "A PlayStation emulator." +msgstr "Эмулятор PlayStation." + +#: ../gui/Cheat.c:117 ../gui/Cheat.c:202 +msgid "Cheat Description:" +msgstr "Описание чита:" + +#: ../gui/Cheat.c:306 +msgid "Open Cheat File" +msgstr "Открыть файл чита" + +#: ../gui/Cheat.c:316 ../gui/Cheat.c:356 +msgid "PCSX Cheat Code Files (*.cht)" +msgstr "Файлы читов PCSX (*.cht)" + +#: ../gui/Cheat.c:346 +msgid "Save Cheat File" +msgstr "Сохранить чит файл" + +#: ../gui/Cheat.c:361 +msgid "All Files (*.*)" +msgstr "Все файлы (*.*)" + +#: ../gui/Cheat.c:394 ../gui/Cheat.c:1124 ../gui/ConfDlg.c:104 +#: ../gui/ConfDlg.c:200 ../gui/DebugMemory.c:259 +msgid "Error: Glade interface could not be loaded!" +msgstr "Ошибка: интерфейс Glade не может быть загружен!" + +#: ../gui/Cheat.c:399 +msgid "Cheat Codes" +msgstr "Чит коды" + +#: ../gui/Cheat.c:405 +msgid "Enable" +msgstr "Включить" + +#: ../gui/Cheat.c:630 +msgid "Freeze value" +msgstr "Заморозить значение" + +#: ../gui/Cheat.c:729 +msgid "Modify value" +msgstr "Изменить значение" + +#: ../gui/Cheat.c:737 +msgid "New value:" +msgstr "Новое значение:" + +#: ../gui/Cheat.c:1134 +msgid "Search Results" +msgstr "Результат поиска" + +#: ../gui/ConfDlg.c:112 ../data/pcsx.glade2:778 +msgid "Configure PCSX" +msgstr "Настройка PCSX" + +#: ../gui/ConfDlg.c:237 ../gui/ConfDlg.c:258 ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 ../gui/ConfDlg.c:355 +msgid "No configuration required" +msgstr "Настройка не требуется" + +#: ../gui/ConfDlg.c:237 ../gui/ConfDlg.c:258 ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 ../gui/ConfDlg.c:355 +msgid "This plugin doesn't need to be configured." +msgstr "Плагин не нуждается в настройке." + +#: ../gui/ConfDlg.c:581 +#, c-format +msgid "Could not open BIOS directory: '%s'\n" +msgstr "Не удалось открыть каталог с биосами BIOS: \"%s\"\n" + +#: ../gui/ConfDlg.c:611 ../gui/ConfDlg.c:704 ../gui/LnxMain.c:168 +#, c-format +msgid "Could not open directory: '%s'\n" +msgstr "Не удалось открыть каталог: '%s'\n" + +#: ../gui/ConfDlg.c:675 +msgid "Simulate PSX BIOS" +msgstr "Симулировать биос psx" + +#: ../gui/DebugMemory.c:103 ../data/pcsx.glade2:3178 +msgid "Memory Dump" +msgstr "Дамп памяти" + +#: ../gui/DebugMemory.c:111 +msgid "Start Address (Hexadecimal):" +msgstr "Начальный адрес (шестнадцатиричный):" + +#: ../gui/DebugMemory.c:121 +msgid "Length (Decimal):" +msgstr "Длина (десятичный):" + +#: ../gui/DebugMemory.c:147 +msgid "Dump to File" +msgstr "Дамп в файл" + +#: ../gui/DebugMemory.c:162 +#, c-format +msgid "Error writing to %s!" +msgstr "Ошибка записи в %s!" + +#: ../gui/DebugMemory.c:180 +msgid "Memory Patch" +msgstr "Патч памяти" + +#: ../gui/DebugMemory.c:188 ../data/pcsx.glade2:3199 +msgid "Address (Hexadecimal):" +msgstr "Адрес (шестнадцатиричный):" + +#: ../gui/DebugMemory.c:198 +msgid "Value (Hexa string):" +msgstr "Значение (Hexa string):" + +#: ../gui/DebugMemory.c:264 +msgid "Memory Viewer" +msgstr "Просмотр памяти" + +#: ../gui/DebugMemory.c:269 +msgid "Address" +msgstr "Адрес" + +#: ../gui/DebugMemory.c:287 +msgid "Text" +msgstr "Текст" + +#: ../gui/Gtk2Gui.c:113 +msgid "Ready" +msgstr "Готово" + +#: ../gui/Gtk2Gui.c:154 +msgid "Emulation Paused." +msgstr "Эмуляция приостановлена." + +#: ../gui/Gtk2Gui.c:405 +msgid "Select PSX EXE File" +msgstr "Выберите PSX EXE файл" + +#: ../gui/Gtk2Gui.c:418 +msgid "PlayStation Executable Files" +msgstr "Выполняемые файлы PlayStation" + +#: ../gui/Gtk2Gui.c:454 +msgid "Not a valid PSX file" +msgstr "Недопустимый формат файла" + +#: ../gui/Gtk2Gui.c:454 +msgid "The file does not appear to be a valid Playstation executable" +msgstr "Файл не является запускным файлом PlayStation" + +#: ../gui/Gtk2Gui.c:485 ../gui/Gtk2Gui.c:610 +msgid "CD ROM failed" +msgstr "Ошибка CD-привода" + +#: ../gui/Gtk2Gui.c:493 ../gui/Gtk2Gui.c:618 +msgid "The CD-ROM could not be loaded" +msgstr "Не удалось загрузить CD-ROM" + +#: ../gui/Gtk2Gui.c:507 +msgid "Could not run BIOS" +msgstr "Не удалось запустить биос" + +#: ../gui/Gtk2Gui.c:507 +msgid "Running BIOS is not supported with Internal HLE BIOS." +msgstr "" +"Стандартная оболочка, позволяющая управлять картами памяти и проигрывать DA " +"музыку, при использовании HLE-биоса недоступна." + +#: ../gui/Gtk2Gui.c:536 +msgid "Open PSX Disc Image File" +msgstr "Открыть образ PSX диска" + +#: ../gui/Gtk2Gui.c:556 +msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" +msgstr "Образы PSX дисков (*.bin, *.img, *.mdf, *.iso)" + +#: ../gui/Gtk2Gui.c:771 +#, c-format +msgid "Loaded state %s." +msgstr "Состояние загружено %s." + +#: ../gui/Gtk2Gui.c:774 +#, c-format +msgid "Error loading state %s!" +msgstr "Ошибка загрузки состояния %s!" + +#: ../gui/Gtk2Gui.c:785 +#, c-format +msgid "Saved state %s." +msgstr "Состояние сохранено %s." + +#: ../gui/Gtk2Gui.c:787 +#, c-format +msgid "Error saving state %s!" +msgstr "Ошибка сохранения состояния %s!" + +#: ../gui/Gtk2Gui.c:822 ../gui/Gtk2Gui.c:850 +msgid "Select State File" +msgstr "Выберите файл состояния" + +#: ../gui/Gtk2Gui.c:893 +msgid "Notice" +msgstr "Сообщение" + +#: ../gui/LnxMain.c:62 +#, c-format +msgid "Creating memory card: %s\n" +msgstr "Создание карты памяти: %s\n" + +#: ../gui/LnxMain.c:325 +msgid "" +" pcsx [options] [file]\n" +"\toptions:\n" +"\t-runcd\t\tRuns CD-ROM\n" +"\t-cdfile FILE\tRuns a CD image file\n" +"\t-nogui\t\tDon't open the GTK GUI\n" +"\t-cfg FILE\tLoads desired configuration file (default: ~/.pcsx/pcsx.cfg)\n" +"\t-psxout\t\tEnable PSX output\n" +"\t-load STATENUM\tLoads savestate STATENUM (1-5)\n" +"\t-h -help\tDisplay this message\n" +"\tfile\t\tLoads file\n" +msgstr "" +" pcsx [опции] [файл]\n" +"\tопции:\n" +"\t-runcd\t\tЗапустить с CD-привода\n" +"\t-cdfile FILE\tЗапустить с файла образа CD\n" +"\t-nogui\t\tНе использовать графический интерфейс GTK\n" +"\t-cfg FILE\tУказать файл конфигурации (по умолчанию: ~/.pcsx/pcsx.cfg)\n" +"\t-psxout\t\tВключить вывод PSX\n" +"\t-load STATENUM\tЗагрузить состояние с номером STATENUM (1-5)\n" +"\t-h -help\tПоказать это сообщение\n" +"\tfile\t\tЗагрузить файл\n" + +#: ../gui/LnxMain.c:362 +#, c-format +msgid "" +"PCSX cannot be configured without using the GUI -- you should restart " +"without -nogui.\n" +msgstr "" +"PCSX не может быть настроен без использования графического интерфейса -- " +"необходимо перезапустить эмулятор без опции -nogui.\n" + +#: ../gui/LnxMain.c:418 +msgid "Failed loading plugins!" +msgstr "Ошибка загрузки плагинов!" + +#: ../gui/LnxMain.c:435 +#, c-format +msgid "Could not load CD-ROM!\n" +msgstr "Не удалось загрузить CD-ROM!\n" + +#: ../gui/LnxMain.c:466 +#, c-format +msgid "PSX emulator couldn't be initialized.\n" +msgstr "Ошибка инициализации эмулятора.\n" + +#: ../gui/MemcardDlg.c:56 +msgid "Icon" +msgstr "Иконка" + +#: ../gui/MemcardDlg.c:74 +msgid "ID" +msgstr "Идентификатор" + +#: ../gui/MemcardDlg.c:80 +msgid "Name" +msgstr "Название" + +#: ../gui/MemcardDlg.c:323 +msgid "Select A File" +msgstr "Выберите файл" + +#: ../gui/MemcardDlg.c:364 +msgid "Format this Memory Card?" +msgstr "Отформатировать карту памяти?" + +#: ../gui/MemcardDlg.c:366 +msgid "" +"If you format the memory card, the card will be empty, and any existing data " +"overwritten." +msgstr "" +"При форматировании все данные на карте памяти будут безвозвратно утеряны." + +#: ../gui/MemcardDlg.c:369 +msgid "Format card" +msgstr "Отформатировать карту памяти" + +#: ../gui/MemcardDlg.c:393 +msgid "Create a new Memory Card" +msgstr "Создать новую карту памяти" + +#: ../gui/MemcardDlg.c:402 +msgid "New Memory Card.mcd" +msgstr "" + +#: ../gui/MemcardDlg.c:503 +msgid "No free space on memory card" +msgstr "Недостаточно места на карте памяти" + +#: ../gui/MemcardDlg.c:504 +msgid "" +"There are no free slots available on the target memory card. Please delete a " +"slot first." +msgstr "Недостаточно свободных блоков на карте памяти." + +#: ../gui/MemcardDlg.c:667 +msgid "Memory Card Manager" +msgstr "Менеджер карт памяти" + +#: ../gui/Plugin.c:211 ../data/pcsx.glade2:1487 +#, c-format +msgid "SIO IRQ Always Enabled" +msgstr "Удерживание линии прерывания SIO" + +#: ../gui/Plugin.c:212 +#, c-format +msgid "SIO IRQ Not Always Enabled" +msgstr "Удерживание линии прерывания SIO выключено" + +#: ../gui/Plugin.c:218 +#, c-format +msgid "Black & White Mdecs Only Enabled" +msgstr "Режим чёрно-белых видео вставок (Mdecs) включен" + +#: ../gui/Plugin.c:219 +#, c-format +msgid "Black & White Mdecs Only Disabled" +msgstr "Режим чёрно-белых видео вставок (Mdecs) выключен" + +#: ../gui/Plugin.c:225 +#, c-format +msgid "XA Enabled" +msgstr "XA включено" + +#: ../gui/Plugin.c:226 +#, c-format +msgid "XA Disabled" +msgstr "XA выключено" + +#: ../gui/Plugin.c:288 +msgid "Error opening CD-ROM plugin!" +msgstr "Ошибка открытия CD-ROM плагина!" + +#: ../gui/Plugin.c:290 +msgid "Error opening SPU plugin!" +msgstr "Ошибка открытия SPU плагина!" + +#: ../gui/Plugin.c:293 +msgid "Error opening GPU plugin!" +msgstr "Ошибка открытия GPU плагина!" + +#: ../gui/Plugin.c:295 +msgid "Error opening Controller 1 plugin!" +msgstr "Ошибка открытия PAD1 плагина!" + +#: ../gui/Plugin.c:297 +msgid "Error opening Controller 2 plugin!" +msgstr "Ошибка открытия PAD2 плагина!" + +#: ../gui/Plugin.c:377 +msgid "Error closing CD-ROM plugin!" +msgstr "Ошибка при закрытии CD-ROM плагина!" + +#: ../gui/Plugin.c:379 +msgid "Error closing SPU plugin!" +msgstr "Ошибка при закрытии SPU плагина!" + +#: ../gui/Plugin.c:381 +msgid "Error closing Controller 1 Plugin!" +msgstr "Ошибка при закрытии PAD1 плагина!" + +#: ../gui/Plugin.c:383 +msgid "Error closing Controller 2 plugin!" +msgstr "Ошибка при закрытии PAD2 плагина!" + +#: ../gui/Plugin.c:385 +msgid "Error closing GPU plugin!" +msgstr "Ошибка при закрытии GPU плагина!" + +#: ../libpcsxcore/cdriso.c:658 +#, c-format +msgid "Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n" +msgstr "Трек %.2d (%s) - Начало %.2d:%.2d:%.2d, Длина %.2d:%.2d:%.2d\n" + +#: ../libpcsxcore/cdriso.c:677 +#, c-format +msgid "Loaded CD Image: %s" +msgstr "Загружен образ CD: %s" + +#: ../libpcsxcore/cheat.c:147 +#, c-format +msgid "Cheats loaded from: %s\n" +msgstr "Чит загружен из: %s\n" + +#: ../libpcsxcore/cheat.c:179 +#, c-format +msgid "Cheats saved to: %s\n" +msgstr "Чит сохранён в: %s\n" + +#: ../libpcsxcore/cheat.c:322 ../libpcsxcore/cheat.c:443 +msgid "(Untitled)" +msgstr "(без названия)" + +#: ../libpcsxcore/debug.c:317 +msgid "Error allocating memory" +msgstr "Ошибка выделения памяти" + +#: ../libpcsxcore/debug.c:322 +msgid "Unable to start debug server.\n" +msgstr "Не удалось запустить сервер отладки.\n" + +#: ../libpcsxcore/debug.c:326 +msgid "Debugger started.\n" +msgstr "Дебаггер запущен.\n" + +#: ../libpcsxcore/debug.c:333 +msgid "Debugger stopped.\n" +msgstr "Дебаггер остановлен.\n" + +#: ../libpcsxcore/misc.c:342 +#, c-format +msgid "CD-ROM Label: %.32s\n" +msgstr "" + +#: ../libpcsxcore/misc.c:343 +#, fuzzy, c-format +msgid "CD-ROM ID: %.9s\n" +msgstr "CD-привод:" + +#: ../libpcsxcore/misc.c:388 +#, c-format +msgid "Error opening file: %s.\n" +msgstr "Ошибка открытия файла: %s.\n" + +#: ../libpcsxcore/misc.c:428 +#, c-format +msgid "Unknown CPE opcode %02x at position %08x.\n" +msgstr "Неизвестный опкод CPE %02x по адресу %08x.\n" + +#: ../libpcsxcore/misc.c:435 +msgid "COFF files not supported.\n" +msgstr "Формат COFF не поддерживается.\n" + +#: ../libpcsxcore/misc.c:439 +msgid "This file does not appear to be a valid PSX file.\n" +msgstr "This file does not appear to be a valid PSX file.\n" + +#: ../libpcsxcore/plugins.c:181 +#, c-format +msgid "Error loading %s: %s" +msgstr "Ошибка загрузки %s: %s" + +#: ../libpcsxcore/plugins.c:221 +#, c-format +msgid "Could not load GPU plugin %s!" +msgstr "Не удалось загрузить GPU плагин %s!" + +#: ../libpcsxcore/plugins.c:292 +#, c-format +msgid "Could not load CD-ROM plugin %s!" +msgstr "Не удалось загрузить CD-ROM плагин %s!" + +#: ../libpcsxcore/plugins.c:340 +#, c-format +msgid "Could not load SPU plugin %s!" +msgstr "Не удалось загрузить SPU плагин %s!" + +#: ../libpcsxcore/plugins.c:477 +#, c-format +msgid "Could not load Controller 1 plugin %s!" +msgstr "Не удалось загрузить PAD1 плагин %s!" + +#: ../libpcsxcore/plugins.c:531 +#, c-format +msgid "Could not load Controller 2 plugin %s!" +msgstr "Не удалось загрузить PAD2 плагин %s!" + +#: ../libpcsxcore/plugins.c:574 +#, c-format +msgid "Could not load NetPlay plugin %s!" +msgstr "Не удалось загрузить NetPlay плагин %s!" + +#: ../libpcsxcore/plugins.c:654 +#, fuzzy, c-format +msgid "Could not load SIO1 plugin %s!" +msgstr "Не удалось загрузить SPU плагин %s!" + +#: ../libpcsxcore/plugins.c:739 +#, c-format +msgid "Error initializing CD-ROM plugin: %d" +msgstr "Ошибка инициализации CD-ROM плагина: %d" + +#: ../libpcsxcore/plugins.c:741 +#, c-format +msgid "Error initializing GPU plugin: %d" +msgstr "Ошибка инициализации GPU плагина: %d" + +#: ../libpcsxcore/plugins.c:743 +#, c-format +msgid "Error initializing SPU plugin: %d" +msgstr "Ошибка инициализации SPU плагина: %d" + +#: ../libpcsxcore/plugins.c:745 +#, c-format +msgid "Error initializing Controller 1 plugin: %d" +msgstr "Ошибка инициализации PAD1 плагина: %d" + +#: ../libpcsxcore/plugins.c:747 +#, c-format +msgid "Error initializing Controller 2 plugin: %d" +msgstr "Ошибка инициализации PAD2 плагина: %d" + +#: ../libpcsxcore/plugins.c:751 +#, c-format +msgid "Error initializing NetPlay plugin: %d" +msgstr "Ошибка инициализации NetPlay плагина: %d" + +#: ../libpcsxcore/plugins.c:756 +#, fuzzy, c-format +msgid "Error initializing SIO1 plugin: %d" +msgstr "Ошибка инициализации SPU плагина: %d" + +#: ../libpcsxcore/plugins.c:759 +msgid "Plugins loaded.\n" +msgstr "Плагины загружены.\n" + +#: ../libpcsxcore/ppf.c:216 +#, c-format +msgid "Invalid PPF patch: %s.\n" +msgstr "Неверный PPF патч: %s。\n" + +#: ../libpcsxcore/ppf.c:292 +#, c-format +msgid "Unsupported PPF version (%d).\n" +msgstr "Неподдерживаемая версия PPF(%d).\n" + +#: ../libpcsxcore/ppf.c:331 +#, c-format +msgid "Loaded PPF %d.0 patch: %s.\n" +msgstr "Загружен PPF %d.0 патч: %s。\n" + +#: ../libpcsxcore/psxmem.c:80 +msgid "Error allocating memory!" +msgstr "Ошибка выделения памяти!" + +#: ../libpcsxcore/psxmem.c:122 +#, c-format +msgid "Could not open BIOS:\"%s\". Enabling HLE Bios!\n" +msgstr "Could not open BIOS:\"%s\". Enabling HLE Bios!\n" + +#: ../libpcsxcore/r3000a.c:33 +#, c-format +msgid "Running PCSX Version %s (%s).\n" +msgstr "Запуск PCSX версии %s (%s) 執行中。\n" + +#: ../libpcsxcore/sio.c:345 +msgid "Connection closed!\n" +msgstr "Соединение закрыто!\n" + +#: ../libpcsxcore/sio.c:371 +#, c-format +msgid "No memory card value was specified - creating a default card %s\n" +msgstr "Карта памяти не указана - создана новая карта %s\n" + +#: ../libpcsxcore/sio.c:375 +#, c-format +msgid "The memory card %s doesn't exist - creating it\n" +msgstr "Карта памяти %s не существует - создана новая\n" + +#: ../libpcsxcore/sio.c:391 +#, c-format +msgid "Memory card %s failed to load!\n" +msgstr "Ошибка загрузки карты памяти %s!\n" + +#: ../libpcsxcore/sio.c:395 +#, c-format +msgid "Loading memory card %s\n" +msgstr "Загрузка карты памяти %s\n" + +#: ../plugins/dfxvideo/gpu.c:55 +msgid "SoftGL Driver" +msgstr "" + +#: ../plugins/dfxvideo/gpu.c:56 +msgid "" +"P.E.Op.S. SoftGL Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" + +#: ../plugins/dfxvideo/gpu.c:58 +msgid "XVideo Driver" +msgstr "" + +#: ../plugins/dfxvideo/gpu.c:59 +msgid "" +"P.E.Op.S. Xvideo Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" + +#: ../plugins/dfxvideo/gpu.c:62 +msgid "Pete Bernert and the P.E.Op.S. team" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:8 +msgid "Configure X11 Video" +msgstr "Настройка X11 Video" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:45 +msgid "Initial Window Size:" +msgstr "Размер окна:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:56 +msgid "Stretching:" +msgstr "Растяжение:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:69 +msgid "Dithering:" +msgstr "Дизеринг:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:82 +msgid "" +"320x240\n" +"640x480\n" +"800x600\n" +"1024x768\n" +"1152x864\n" +"1280x1024\n" +"1600x1200" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:101 +msgid "" +"0: None\n" +"1: 2xSai\n" +"2: 2xSuperSai\n" +"3: SuperEagle\n" +"4: Scale2x\n" +"5: Scale3x\n" +"6: HQ2X\n" +"7: HQ3X" +msgstr "" +"0: Выключено\n" +"1: 2xSai\n" +"2: 2xSuperSai\n" +"3: SuperEagle\n" +"4: Scale2x\n" +"5: Scale3x\n" +"6: HQ2X\n" +"7: HQ3X" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:123 +msgid "" +"0: Off (fastest)\n" +"1: Game dependant\n" +"2: Always" +msgstr "" +"0: Выключен (быстрейший режим)\n" +"1: Устанавливается игрой\n" +"2: Включен всегда" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:146 +msgid "Maintain 4:3 Aspect Ratio" +msgstr "Сохранять соотношение сторон 4:3" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:161 +#: ../plugins/peopsxgl/gpucfg/interface.c:322 +msgid "Fullscreen" +msgstr "Полноэкранный режим" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:165 +msgid "Toggle windowed/fullscreen mode." +msgstr "Переключение между оконным/полноэкранным режимами." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:187 +msgid "Screen" +msgstr "Экран" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:216 +msgid "Show FPS" +msgstr "Отображать FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:220 +msgid "Toggle whether the FPS will be shown." +msgstr "Отображать FPS при старте эмуляции." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:232 +msgid "Autodetect FPS limit" +msgstr "Авто-определение FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:236 +msgid "Enable this if games display too quickly." +msgstr "" +"Следует включить для автоматического определения и ограничения скорости игры." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:249 +msgid "Enable frame skipping" +msgstr "Включить пропуск кадров" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:253 +msgid "Skip frames when rendering." +msgstr "Пропуск кадров при отрисовке." + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:270 +msgid "Set FPS" +msgstr "Установить FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:287 +msgid "200.0" +msgstr "200.0" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:310 +msgid "Framerate" +msgstr "Частота кадров" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:339 +#: ../plugins/peopsxgl/gpucfg/interface.c:568 +msgid "Use game fixes" +msgstr "Исправления для некоторых игр" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:366 +msgid "better g-colors, worse textures" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:381 +msgid "Needed by Dark Forces" +msgstr "Необходимо для Dark Forces" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:394 +msgid "Draw quads with triangles" +msgstr "Рисовать четырёхугольники треугольниками" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:410 +msgid "Repeated flat tex triangles" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:426 +msgid "Disable CPU Saving" +msgstr "Выключить экономию ресурсов ЦПУ" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:442 +msgid "Odd/even bit hack" +msgstr "Хак бита ODE" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:458 +msgid "For precise framerate" +msgstr "Для повышения точности частоты смены кадров" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:473 +msgid "Better FPS limit in some" +msgstr "Возможно более точное ограничение FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:486 +msgid "PC FPS calculation" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:504 +msgid "Pandemonium 2" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:517 +msgid "Lazy screen update" +msgstr "\"Ленивое\" обновление экрана" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:535 +msgid "Skip every second frame" +msgstr "Пропускать каждый второй кадр" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:548 +#: ../plugins/peopsxgl/gpucfg/interface.c:640 +msgid "Old frame skipping" +msgstr "Старый режим пропуска кадров" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:564 +msgid "Expand screen width" +msgstr "Увеличить ширину экрана" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:580 +msgid "Ignore brightness color" +msgstr "Игнорировать яркость цвета" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:596 +msgid "Disable coordinate check" +msgstr "Выключить проверку координат" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:614 +msgid "Chrono Cross" +msgstr "" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:627 +msgid "Capcom fighting games" +msgstr "Файтинги от Capcom" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:642 +msgid "Black screens in Lunar" +msgstr "Чёрный экран в LunarSSSC" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:657 +msgid "Compatibility mode" +msgstr "Режим совместимости" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:670 +msgid "Fake 'gpu busy' states" +msgstr "Имитация 'занятости' gpu " + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:688 +msgid "Toggle busy flags after drawing" +msgstr "Переключить флаг занятости после отрисовки" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:713 +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:268 +msgid "Compatibility" +msgstr "Совместимость" + +#: ../data/pcsx.glade2:7 +msgid "PCSX" +msgstr "PCSX" + +#: ../data/pcsx.glade2:21 +msgid "_File" +msgstr "Файл(_F)" + +#: ../data/pcsx.glade2:27 +msgid "Run _CD" +msgstr "Запустить _CD" + +#: ../data/pcsx.glade2:45 +msgid "Run _ISO..." +msgstr "Запустить _ISO" + +#: ../data/pcsx.glade2:62 +msgid "Run _BIOS" +msgstr "Запустить _BIOS" + +#: ../data/pcsx.glade2:79 +msgid "Run _EXE..." +msgstr "Запустить _EXE" + +#: ../data/pcsx.glade2:101 +msgid "E_xit" +msgstr "Выход" + +#: ../data/pcsx.glade2:123 +msgid "_Emulator" +msgstr "Эмулятор(_E)" + +#: ../data/pcsx.glade2:129 +msgid "_Continue" +msgstr "Продолжить(_C)" + +#: ../data/pcsx.glade2:146 +msgid "_Reset" +msgstr "Сброс(_R)" + +#: ../data/pcsx.glade2:168 +msgid "S_witch ISO..." +msgstr "Сменить ISO..." + +#: ../data/pcsx.glade2:190 +msgid "_Save State" +msgstr "Сохранить состояние" + +#: ../data/pcsx.glade2:199 ../data/pcsx.glade2:280 +msgid "Slot _1" +msgstr "Слот _1" + +#: ../data/pcsx.glade2:208 ../data/pcsx.glade2:289 +msgid "Slot _2" +msgstr "Слот _2" + +#: ../data/pcsx.glade2:217 ../data/pcsx.glade2:298 +msgid "Slot _3" +msgstr "Слот _3" + +#: ../data/pcsx.glade2:226 ../data/pcsx.glade2:307 +msgid "Slot _4" +msgstr "Слот _4" + +#: ../data/pcsx.glade2:235 ../data/pcsx.glade2:316 +msgid "Slot _5" +msgstr "Слот _5" + +#: ../data/pcsx.glade2:243 ../data/pcsx.glade2:324 +msgid "_Other..." +msgstr "Другой..." + +#: ../data/pcsx.glade2:271 +msgid "_Load State" +msgstr "Загрузить состояние(_L)" + +#: ../data/pcsx.glade2:357 +msgid "_Configuration" +msgstr "Настройка(_C)" + +#: ../data/pcsx.glade2:363 +msgid "_Plugins & BIOS..." +msgstr "Плагины и биос..." + +#: ../data/pcsx.glade2:385 +msgid "_Graphics..." +msgstr "Графика..." + +#: ../data/pcsx.glade2:400 +msgid "_Sound..." +msgstr "Звук..." + +#: ../data/pcsx.glade2:415 +msgid "CD-_ROM..." +msgstr "CD-привод..." + +#: ../data/pcsx.glade2:430 +msgid "C_ontrollers..." +msgstr "Управление..." + +#: ../data/pcsx.glade2:450 +msgid "_CPU..." +msgstr "ЦПУ..." + +#: ../data/pcsx.glade2:466 +msgid "_Memory Cards..." +msgstr "Карты памяти..." + +#: ../data/pcsx.glade2:483 +msgid "_Netplay..." +msgstr "Сетевая игра..." + +#: ../data/pcsx.glade2:504 +msgid "Chea_t" +msgstr "Читы" + +#: ../data/pcsx.glade2:513 +msgid "_Browse..." +msgstr "Обзор..." + +#: ../data/pcsx.glade2:528 +msgid "_Search..." +msgstr "Поиск..." + +#: ../data/pcsx.glade2:554 +msgid "Memory _Dump" +msgstr "Дамп памяти" + +#: ../data/pcsx.glade2:574 +msgid "_Help" +msgstr "Помошь(_H)" + +#: ../data/pcsx.glade2:580 +msgid "_About PCSX..." +msgstr "О PCSX..." + +#: ../data/pcsx.glade2:613 ../data/pcsx.glade2:614 +msgid "Run CD" +msgstr "Запустить CD" + +#: ../data/pcsx.glade2:626 +msgid "Run ISO Image" +msgstr "Запустить образ ISO" + +#: ../data/pcsx.glade2:627 +msgid "Run ISO..." +msgstr "Запустить ISO..." + +#: ../data/pcsx.glade2:648 +msgid "Continue Emulation" +msgstr "Продолжить эмуляцию" + +#: ../data/pcsx.glade2:649 +msgid "Continue..." +msgstr "Продолжить..." + +#: ../data/pcsx.glade2:661 +msgid "Switch ISO Image" +msgstr "Сменить образ ISO" + +#: ../data/pcsx.glade2:662 +msgid "Switch ISO..." +msgstr "Сменить ISO..." + +#: ../data/pcsx.glade2:683 ../data/pcsx.glade2:1810 +msgid "Configure Memory Cards" +msgstr "Настройка карт памяти" + +#: ../data/pcsx.glade2:684 +msgid "Memcards..." +msgstr "Карты памяти..." + +#: ../data/pcsx.glade2:696 +msgid "Configure Graphics" +msgstr "Настройка видео" + +#: ../data/pcsx.glade2:697 +msgid "Graphics..." +msgstr "Графика..." + +#: ../data/pcsx.glade2:709 ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:8 +msgid "Configure Sound" +msgstr "Настройка звука" + +#: ../data/pcsx.glade2:710 +msgid "Sound..." +msgstr "Звук..." + +#: ../data/pcsx.glade2:722 +msgid "Configure CD-ROM" +msgstr "Настройка CD-привода" + +#: ../data/pcsx.glade2:723 +msgid "CD-ROM..." +msgstr "CD-привод..." + +#: ../data/pcsx.glade2:735 +msgid "Configure Controllers" +msgstr "Настройка управления" + +#: ../data/pcsx.glade2:736 +msgid "Controllers..." +msgstr "Контроллеры..." + +#: ../data/pcsx.glade2:879 +msgid "Select Folder to Search" +msgstr "Выберите каталог для поиска" + +#: ../data/pcsx.glade2:895 +msgid "Search in:" +msgstr "Каталог с плагинами:" + +#: ../data/pcsx.glade2:1168 +msgid "Graphics:" +msgstr "Графика:" + +#: ../data/pcsx.glade2:1181 +msgid "Sound:" +msgstr "Звук:" + +#: ../data/pcsx.glade2:1196 +msgid "Controller 1: " +msgstr "Контроллер 1:" + +#: ../data/pcsx.glade2:1211 +msgid "Controller 2:" +msgstr "Контроллер 2:" + +#: ../data/pcsx.glade2:1226 +msgid "CD-ROM:" +msgstr "CD-привод:" + +#: ../data/pcsx.glade2:1264 +msgid "Plugins" +msgstr "Плагины" + +#: ../data/pcsx.glade2:1325 +msgid "BIOS" +msgstr "Биос" + +#: ../data/pcsx.glade2:1375 +msgid "Configure CPU" +msgstr "Настройка ЦПУ" + +#: ../data/pcsx.glade2:1419 +msgid "SPU IRQ Always Enabled" +msgstr "Удерживание линии прерывания SPU" + +#: ../data/pcsx.glade2:1435 +msgid "Black & White Movies" +msgstr "Чёрно-белые видео заставки" + +#: ../data/pcsx.glade2:1469 +msgid "Enable Interpreter CPU" +msgstr "Включить интерпретатор ЦПУ" + +#: ../data/pcsx.glade2:1503 +msgid "Disable CD Audio" +msgstr "Выключить CD музыку" + +#: ../data/pcsx.glade2:1519 +msgid "Disable XA Decoding" +msgstr "Выключить декодирование XA" + +#: ../data/pcsx.glade2:1571 +msgid "Options" +msgstr "Опции" + +#: ../data/pcsx.glade2:1612 +msgid "" +"NTSC\n" +"PAL" +msgstr "" + +#: ../data/pcsx.glade2:1626 +msgid "System Type" +msgstr "Тип системы" + +#: ../data/pcsx.glade2:1674 +msgid "Configure NetPlay" +msgstr "Настройка сетевой игры" + +#: ../data/pcsx.glade2:1760 +msgid "NetPlay" +msgstr "Сетевая игра" + +#: ../data/pcsx.glade2:1886 ../data/pcsx.glade2:2283 +msgid "New" +msgstr "Создать" + +#: ../data/pcsx.glade2:1936 ../data/pcsx.glade2:2333 +msgid "Format" +msgstr "Форматировать" + +#: ../data/pcsx.glade2:1986 ../data/pcsx.glade2:2383 +msgid "Un/Delete" +msgstr "Восстановить блок" + +#: ../data/pcsx.glade2:2079 +msgid "Memory Card 1" +msgstr "Карта памяти 1" + +#: ../data/pcsx.glade2:2139 ../data/pcsx.glade2:2189 ../data/pcsx.glade2:3002 +msgid "Copy" +msgstr "Копировать" + +#: ../data/pcsx.glade2:2476 +msgid "Memory Card 2" +msgstr "Карта памяти 2" + +#: ../data/pcsx.glade2:2572 +msgid "Cheat Codes" +msgstr "Чит коды" + +#: ../data/pcsx.glade2:2736 +msgid "" +"8-bit\n" +"16-bit\n" +"32-bit" +msgstr "" +"8-бит\n" +"16-бит\n" +"32-бита" + +#: ../data/pcsx.glade2:2799 +msgid "" +"Equal Value\n" +"Not Equal Value\n" +"Range\n" +"Increased By\n" +"Decreased By\n" +"Increased\n" +"Decreased\n" +"Different\n" +"No Change" +msgstr "" +"Равно значению\n" +"Не равно значению\n" +"Диапазон\n" +"Увеличилось на\n" +"Уменьшилось на\n" +"Увеличилось\n" +"Уменьшилось\n" +"Изменилось\n" +"Не изменилось" + +#: ../data/pcsx.glade2:2831 +msgid "" +"Decimal\n" +"Hexadecimal" +msgstr "" +"Десятичное\n" +"Шестнадцатиричное" + +#: ../data/pcsx.glade2:3035 +msgid "label_resultsfound" +msgstr "" + +#: ../data/pcsx.glade2:3070 +msgid "Search" +msgstr "Поиск" + +#: ../data/pcsx.glade2:3106 +msgid "Restart" +msgstr "Рестарт" + +#: ../data/pcsx.glade2:3135 +msgid "Cheat Search" +msgstr "Поиск читов" + +#: ../data/pcsx.glade2:3291 +msgid "Raw Dump..." +msgstr "\"Сырой\" дамп" + +#: ../data/pcsx.glade2:3326 +msgid "Patch Memory..." +msgstr "Патч памяти..." + +#: ../plugins/dfsound/spu.c:38 +msgid "Mac OS X Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:40 +msgid "ALSA Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:42 +msgid "OSS Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:44 +msgid "SDL Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:46 +msgid "PulseAudio Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:48 +msgid "NULL Sound" +msgstr "" + +#: ../plugins/dfsound/spu.c:51 +msgid "" +"P.E.Op.S. Sound Driver V1.7\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:42 +msgid "Volume:" +msgstr "Громкость:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:54 +msgid "Interpolation:" +msgstr "Интерполяция:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:68 +msgid "Reverb:" +msgstr "Реверберация:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:81 +msgid "" +"Low\n" +"Medium\n" +"Loud\n" +"Loudest" +msgstr "" +"Минимальная\n" +"Средняя\n" +"Сильная\n" +"Максимальная" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:95 +msgid "" +"Off\n" +"Simple\n" +"Playstation" +msgstr "" +"Выключена\n" +"Простая\n" +"Playstation" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:111 +msgid "" +"None\n" +"Simple\n" +"Gaussian\n" +"Cubic" +msgstr "" +"Выключена\n" +"Линейная\n" +"Гаусса\n" +"Кубическая" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:132 +msgid "General" +msgstr "Главные" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:163 +msgid "Adjust XA speed" +msgstr "Корректировка скорости проигрывания XA" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:167 +msgid "Choose this if XA music is played too quickly." +msgstr "Установить в том случае, когда XA музыка играет слишком быстро." + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:184 +msgid "XA Music" +msgstr "XA музыка" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:215 +msgid "High compatibility mode" +msgstr "Режим повышенной совместимости" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:219 +msgid "Use the asynchronous SPU interface." +msgstr "Использовать асинхронный интерфейс SPU" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:231 +msgid "SPU IRQ Wait" +msgstr "" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:235 +msgid "Wait for CPU; only useful for some games." +msgstr "Ожидать CPU; имеет смысл только для некоторых игр." + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:247 +msgid "Single channel sound" +msgstr "Одноканальный звук" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:251 +msgid "Play only one channel for a performance boost." +msgstr "Проигрывать только один канал, для прироста производительности" + +#: ../plugins/dfcdrom/cdr-libcdio.c:29 ../plugins/dfcdrom/cdr-linux.c:29 +msgid "CD-ROM Drive Reader" +msgstr "" + +#: ../plugins/dfcdrom/cdr-null.c:26 +msgid "CDR NULL Plugin" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/main.c:219 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:8 +msgid "CDR configuration" +msgstr "Настройка CDR" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:33 +msgid "Choose your CD-ROM device or type its path if it's not listed" +msgstr "" +"Выберите CD-привод или введите свой путь, если устройства нету в списке" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:44 +msgid "Select CD-ROM device" +msgstr "Выберите CD-привод" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:72 +msgid "Select read mode:" +msgstr "Режим чтения:" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:83 +msgid "" +"Normal (No Cache)\n" +"Threaded - Faster (With Cache)" +msgstr "" +"Обычный (Кеширование недоступно)\n" +"В отдельном потоке - (Кеширование)" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:114 +msgid "Cache Size (Def. 64):" +msgstr "Размер кеша (по умолчанию 64):" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:159 +msgid "Spindown Time:" +msgstr "Время до остановки шпинделя cd-привода" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:170 +msgid "" +"Default\n" +"125ms\n" +"250ms\n" +"500ms\n" +"1s\n" +"2s\n" +"4s\n" +"8s\n" +"16s\n" +"32s\n" +"1min\n" +"2min\n" +"4min\n" +"8min\n" +"16min\n" +"32min" +msgstr "" +"По умолчанию\n" +"125мс\n" +"250мс\n" +"500мс\n" +"1с\n" +"2с\n" +"4с\n" +"8с\n" +"16с\n" +"32с\n" +"1мин\n" +"2мин\n" +"4мин\n" +"8мин\n" +"16мин\n" +"32мин" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:216 +msgid "Cdrom Speed (Def. 0 = MAX):" +msgstr "Скорость вращения диска (по умолчанию 0 = максимальная):" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:248 +msgid "hseparator" +msgstr "" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:258 +msgid "Enable subchannel read" +msgstr "Включить чтение субканальных данных" + +#: ../plugins/peopsxgl/gpu.c:61 +msgid "OpenGL Driver" +msgstr "" + +#: ../plugins/peopsxgl/gpu.c:63 +msgid "Pete Bernert" +msgstr "" + +#: ../plugins/peopsxgl/gpu.c:64 +msgid "" +"Based on P.E.Op.S. MesaGL Driver V1.78\n" +"Coded by Pete Bernert\n" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:118 +msgid "OpenGL Driver configuration" +msgstr "Настройка OpenGL Driver" + +#: ../plugins/peopsxgl/gpucfg/interface.c:138 +msgid "Textures" +msgstr "Текстуры" + +#: ../plugins/peopsxgl/gpucfg/interface.c:161 +msgid "Quality:" +msgstr "Качество:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:178 +#: ../plugins/peopsxgl/gpucfg/interface.c:191 +msgid "0: don't care - Use driver's default textures" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:179 +msgid "1: 4444 - Fast, but less colorful" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:180 +msgid "2: 5551 - Nice colors, bad transparency" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:181 +msgid "3: 8888 - Best colors, more ram needed" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:182 +msgid "4: BGR8888 - Faster on some cards" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:193 +msgid "VRam size in MBytes (0..1024, 0=auto):" +msgstr "Размер видеопамяти в мегабайтах (0..1024, 0=авто):" + +#: ../plugins/peopsxgl/gpucfg/interface.c:210 +#: ../plugins/peopsxgl/gpucfg/interface.c:225 +msgid "0: None" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:211 +msgid "1: Standard - Glitches will happen" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:212 +msgid "2: Extended - No black borders" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:213 +msgid "3: Standard without sprites - unfiltered 2D" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:214 +msgid "4: Extended without sprites - unfiltered 2D" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:215 +msgid "5: Standard + smoothed sprites" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:216 +msgid "6: Extended + smoothed sprites" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:227 +msgid "Filtering:" +msgstr "Фильтрация:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:235 +msgid "HiRes Tex:" +msgstr "HiRes текстуры:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:252 +#: ../plugins/peopsxgl/gpucfg/interface.c:263 +msgid "0: None (standard)" +msgstr "0: None (стандартный)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:253 +msgid "1: 2xSaI (much vram needed)" +msgstr "1: 2xSaI (требуется много видеопамяти)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:254 +msgid "2: Scaled (needs tex filtering)" +msgstr "2: Scaled (используется совместно с текстурной фильтрацией)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:265 +msgid "Window options" +msgstr "Опции окна" + +#: ../plugins/peopsxgl/gpucfg/interface.c:296 +msgid "Width:" +msgstr "Ширина:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:305 +msgid "Height:" +msgstr "Высота:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:314 +msgid "Keep psx aspect ratio" +msgstr "Сохранять пропорции картинки psx" + +#: ../plugins/peopsxgl/gpucfg/interface.c:330 +msgid "Dithering" +msgstr "Дизеринг" + +#: ../plugins/peopsxgl/gpucfg/interface.c:346 +msgid "Framerate" +msgstr "Частота кадров" + +#: ../plugins/peopsxgl/gpucfg/interface.c:369 +msgid "FPS" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:377 +msgid "FPS limit manual" +msgstr "Ручное ограничение FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:386 +msgid "Show FPS display on startup" +msgstr "Отображать FPS дисплей при старте" + +#: ../plugins/peopsxgl/gpucfg/interface.c:394 +msgid "Use FPS limit" +msgstr "Включить ограничение FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:402 +msgid "FPS limit auto-detection" +msgstr "Авто-определение FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:411 +msgid "Use Frame skipping" +msgstr "Пропуск кадров" + +#: ../plugins/peopsxgl/gpucfg/interface.c:419 +msgid "Compatibility" +msgstr "Совместимость" + +#: ../plugins/peopsxgl/gpucfg/interface.c:434 +msgid "Advanced blending (Accurate psx color emulation)" +msgstr "Улучшенное смешивание (более точная эмуляция цветов psx)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:442 +msgid "Framebuffer textures:" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:450 +msgid "Offscreen Drawing:" +msgstr "Внеэкранная отрисовка:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:458 +msgid "Framebuffer access:" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:466 +msgid "Alpha Multipass (correct opaque texture areas)" +msgstr "Многопроходная отрисовка текстур с прозрачностью" + +#: ../plugins/peopsxgl/gpucfg/interface.c:474 +msgid "Mask bit detection (needed by a few games, zbuffer)" +msgstr "Эмуляция маскирования (используется в нескольких играх, zbuffer)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:491 +#: ../plugins/peopsxgl/gpucfg/interface.c:504 +msgid "0: None - Fastest, most glitches" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:492 +msgid "1: Minimum - Missing screens" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:493 +msgid "2: Standard - OK for most games" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:494 +msgid "3: Enhanced - Shows more stuff" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:495 +msgid "4: Extended - Causing garbage" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:515 +#: ../plugins/peopsxgl/gpucfg/interface.c:527 +msgid "0: Emulated vram - Needs FVP" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:516 +msgid "1: Black - Fast, no effects" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:517 +msgid "2: Gfx card buffer - Can be slow" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:518 +msgid "3: Gfx card & soft - slow" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:538 +#: ../plugins/peopsxgl/gpucfg/interface.c:551 +msgid "0: Emulated vram - ok most times" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:539 +msgid "1: Gfx card buffer reads" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:540 +msgid "2: Gfx card buffer moves" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:541 +msgid "3: Gfx buffer reads & moves" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:542 +msgid "4: Full Software (FVP)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:553 +msgid "Special game fixes" +msgstr "Исправления для некоторых игр" + +#: ../plugins/peopsxgl/gpucfg/interface.c:576 +msgid "Battle cursor (FF7)" +msgstr "Курсор в режиме боя (FF7)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:584 +msgid "Direct FB updates" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:592 +msgid "Black brightness (Lunar)" +msgstr "Чёрный экран в LunarSSSC" + +#: ../plugins/peopsxgl/gpucfg/interface.c:600 +msgid "Swap front detection" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:608 +msgid "Disable coord check" +msgstr "Выключить проверку координат" + +#: ../plugins/peopsxgl/gpucfg/interface.c:616 +msgid "No blue glitches (LoD)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:624 +msgid "Soft FB access" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:632 +msgid "PC fps calculation" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:648 +msgid "Yellow rect (FF9)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:656 +msgid "No subtr. blending" +msgstr "Отключить вычитающее смешивание" + +#: ../plugins/peopsxgl/gpucfg/interface.c:664 +msgid "Lazy upload (DW7)" +msgstr "\"Ленивая\" загрузка (DW7)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:672 +msgid "Odd/even hack" +msgstr "Хак бита ODE" + +#: ../plugins/peopsxgl/gpucfg/interface.c:680 +msgid "Adjust screen width" +msgstr "Корректировка ширины экрана" + +#: ../plugins/peopsxgl/gpucfg/interface.c:688 +msgid "Old texture filtering" +msgstr "Старый режим текстурной фильтрации" + +#: ../plugins/peopsxgl/gpucfg/interface.c:696 +msgid "Additional uploads" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:704 +msgid "unused" +msgstr "не используется" + +#: ../plugins/peopsxgl/gpucfg/interface.c:712 +msgid "Fake 'gpu busy'" +msgstr "Имитация 'занятости' gpu" + +#: ../plugins/peopsxgl/gpucfg/interface.c:720 +msgid "Misc" +msgstr "Разное" + +#: ../plugins/peopsxgl/gpucfg/interface.c:743 +msgid "Scanlines" +msgstr "Скан-линии" + +#: ../plugins/peopsxgl/gpucfg/interface.c:751 +msgid "Blending (0..255, -1=dot):" +msgstr "Смешивание (0..255, -1=точка):" + +#: ../plugins/peopsxgl/gpucfg/interface.c:759 +msgid "Screen smoothing (can be slow or unsupported)" +msgstr "Полноэкранное сглаживание (может быть медленно или неподдерживатся)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:767 +msgid "Use OpenGL extensions (recommended)" +msgstr "Использовать расширения OpenGL (рекомендуется)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:775 +msgid "Polygon anti-aliasing (slow with most cards)" +msgstr "Антиалиясинг полигонов (медленно на большинстве карт)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:783 +msgid "Line mode (polygons will not get filled)" +msgstr "Режим линий (отрисовываются только края полигонов)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:791 +msgid "Force 15 bit framebuffer updates (faster movies)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:799 +msgid "Unfiltered MDECs (small movie speedup)" +msgstr "" +"Не фильтровать MDECs (некоторый прирост скорости при проигрывании " +"видеовставок)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:852 +msgid "Adapted from P.E.Op.S OpenGL GPU by Pete Bernert" +msgstr "Адаптированно из \"P.E.Op.S OpenGL GPU\" от Pete Bernert" + +#: ../plugins/peopsxgl/gpucfg/interface.c:861 +msgid "Homepage: http://www.pbernert.com" +msgstr "Домашняя страница: http://www.pbernert.com" + +#: ../plugins/peopsxgl/gpucfg/interface.c:879 +msgid "Version: 1.78" +msgstr "Версия: 1.78" + +#: ../plugins/dfinput/cfg-gtk2.c:48 +msgid "D-Pad Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:49 +msgid "D-Pad Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:50 +msgid "D-Pad Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:51 +msgid "D-Pad Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:52 +msgid "Cross" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:53 +msgid "Circle" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:54 +msgid "Square" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:55 +msgid "Triangle" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:56 +msgid "L1" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:57 +msgid "R1" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:58 +msgid "L2" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:59 +msgid "R2" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:60 +msgid "Select" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:61 +msgid "Start" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:62 +msgid "L3" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:63 +msgid "R3" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:67 +msgid "L-Stick Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:68 +msgid "L-Stick Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:69 +msgid "L-Stick Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:70 +msgid "L-Stick Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:71 +msgid "R-Stick Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:72 +msgid "R-Stick Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:73 +msgid "R-Stick Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:74 +msgid "R-Stick Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Centered" +msgstr "Отцентровано" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Up" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Right" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Rightup" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Down" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Rightdown" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Left" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Leftup" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:105 ../plugins/dfinput/cfg-gtk2.c:144 +msgid "Leftdown" +msgstr "" + +#: ../plugins/dfinput/cfg-gtk2.c:109 ../plugins/dfinput/cfg-gtk2.c:148 +#, c-format +msgid "Joystick: Button %d" +msgstr "Джойстик: Кнопка %d" + +#: ../plugins/dfinput/cfg-gtk2.c:113 ../plugins/dfinput/cfg-gtk2.c:152 +#, c-format +msgid "Joystick: Axis %d%c" +msgstr "Джойстик: Ось %d%c" + +#: ../plugins/dfinput/cfg-gtk2.c:118 ../plugins/dfinput/cfg-gtk2.c:157 +#, c-format +msgid "Joystick: Hat %d %s" +msgstr "Джойстик: Крестовина %d %s" + +#: ../plugins/dfinput/cfg-gtk2.c:133 ../plugins/dfinput/cfg-gtk2.c:172 +msgid "Keyboard:" +msgstr "Клавиатура:" + +#: ../plugins/dfinput/cfg-gtk2.c:137 ../plugins/dfinput/cfg-gtk2.c:176 +msgid "(Not Set)" +msgstr "(Не установлено)" + +#: ../plugins/dfinput/cfg-gtk2.c:539 +msgid "None" +msgstr "Нету" + +#: ../plugins/dfinput/cfg-gtk2.c:581 +msgid "Gamepad/Keyboard Input Configuration" +msgstr "Настройка Gamepad/Keyboard" + +#: ../plugins/dfinput/cfg-gtk2.c:587 ../plugins/dfinput/cfg-gtk2.c:607 +msgid "Key" +msgstr "Клавиша" + +#: ../plugins/dfinput/cfg-gtk2.c:593 ../plugins/dfinput/cfg-gtk2.c:613 +msgid "Button" +msgstr "Кнопка" + +#: ../plugins/dfinput/pad.c:22 +msgid "Gamepad/Keyboard Input" +msgstr "" + +#: ../plugins/dfinput/dfinput.glade2:35 ../plugins/dfinput/dfinput.glade2:232 +msgid "Device:" +msgstr "Устройство:" + +#: ../plugins/dfinput/dfinput.glade2:66 ../plugins/dfinput/dfinput.glade2:263 +msgid "Type:" +msgstr "Тип:" + +#: ../plugins/dfinput/dfinput.glade2:78 ../plugins/dfinput/dfinput.glade2:275 +msgid "" +"Digital Pad\n" +"Analog Pad" +msgstr "" +"Стандартный контроллер\n" +"Аналоговый контроллер" + +#: ../plugins/dfinput/dfinput.glade2:149 ../plugins/dfinput/dfinput.glade2:346 +msgid "Change" +msgstr "Изменить" + +#: ../plugins/dfinput/dfinput.glade2:185 ../plugins/dfinput/dfinput.glade2:382 +msgid "Reset" +msgstr "Сброс" + +#: ../plugins/dfinput/dfinput.glade2:210 +msgid "Controller 1" +msgstr "Контроллер 1" + +#: ../plugins/dfinput/dfinput.glade2:412 +msgid "Controller 2" +msgstr "Контроллер 2" + +#: ../plugins/dfinput/dfinput.glade2:427 +msgid "Multi-Threaded (Recommended)" +msgstr "В отдельном потоке (Рекомендуется)" + +#: ../plugins/dfnet/dfnet.c:23 +msgid "Socket Driver" +msgstr "" + +#: ../plugins/dfnet/dfnet.c:161 +#, c-format +msgid "error connecting to %s: %s\n" +msgstr "Ошибка соединения с %s: %s\n" + +#: ../plugins/dfnet/dfnet.c:186 +msgid "Error allocating memory!\n" +msgstr "Ошибка выделения памяти!\n" + +#: ../plugins/dfnet/gui.c:39 +msgid "Nothing to configure" +msgstr "Не подлежит настройке" + +#: ../plugins/dfnet/gui.c:95 +#, c-format +msgid "IP %s" +msgstr "" + +#: ../plugins/dfnet/gui.c:165 +msgid "Waiting for connection..." +msgstr "Ожидание соединения..." + +#: ../plugins/dfnet/gui.c:168 +msgid "The Client should now Start a Connection, waiting..." +msgstr "Ожидание соединения с клиентом..." + +#: ../plugins/dfnet/dfnet.glade2:23 +msgid "" +"Select here if you'll be Server (Player1) or Client (Player2).\n" +"\n" +"If you select Server you must Copy your IP address to the Clipboard and " +"paste if (Ctrl+V) wherever the Client can see it.\n" +"\n" +"If you selected Client please enter the IP address the Server gave to you in " +"the IP Address Control." +msgstr "" +"Выберите здесь сторону: Сервер (Игрок 1) или Клиент (Игрок 2)\n" +"\n" +"Если вы выбрали Сервер - скопируйте IP адрес в буфер обмена и вставьте (Ctrl" +"+V) куда-либо, чтобы Клиент мог его видеть.\n" +"\n" +"Если вы выбрали Клиента - введите полученный IP адрес Сервера в " +"соответствующее поле." + +#: ../plugins/dfnet/dfnet.glade2:63 +msgid "Copy PC IP to Clipboard" +msgstr "Скопировать IP адрес в буфер обмена" + +#: ../plugins/dfnet/dfnet.glade2:94 +msgid "Server (Player1)" +msgstr "Сервер (Игрок 1)" + +#: ../plugins/dfnet/dfnet.glade2:104 +msgid "Client (Player2)" +msgstr "Клиент (Игрок 2)" + +#: ../plugins/dfnet/dfnet.glade2:130 +msgid "" +"Do not change if not necessary (remember it must be changed on both sides)." +msgstr "" +"Не меняйте без особой необходимости (помните что порты должны быть одинаковы " +"для обеих сторон)" + +#: ../plugins/dfnet/dfnet.glade2:143 +msgid "Port Number" +msgstr "Номер порта" + +#: ../plugins/dfnet/dfnet.glade2:202 +msgid "Start Game" +msgstr "Начать сетевую игру" + +#: ../plugins/dfnet/dfnet.glade2:240 +msgid "Play Offline" +msgstr "Начать без использования сети" + +#: ../plugins/bladesio1/sio1.c:29 +msgid "Sio1 Driver" +msgstr "" + +#, fuzzy +#~ msgid "CD-ROM Device Reader" +#~ msgstr "Выберите CD-привод" + +#~ msgid "Error Closing PAD1 Plugin" +#~ msgstr "Ошибка при закрытии PAD1 плагина" + +#~ msgid "Error Closing PAD2 Plugin" +#~ msgstr "Ошибка при закрытии PAD2 плагина" + +#~ msgid "Internal HLE Bios" +#~ msgstr "Внутренний HLE-биос" diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo new file mode 100644 index 0000000000000000000000000000000000000000..b7a3b08203e7b93a9563a22baf18a62a487ab973 GIT binary patch literal 45315 zcmeIbcYIvco%es~cz_Tf2@nWeNGwZW$&ze?5g4%Lf`c294W>mIOCx!(q!BYC%O)Y% z;NIlkjWMni7qG$Iel~?{c2hT`C!5ViGmzwBP%4&bd=$o6SDY^ZUJif9$-t zdY^XBJ^g&o_nc$?`O5QGd;Fe1*YmE2mwwRm7Mkvz2Oea zwT@qey>S1X<2eSM;^}p#eeVh= z`*pAye$=_QLFHo>>;o6W0(cN!3xDAFTX+NZ%kQ!*fgiy>#&IgV8v6prt?)zGk2roE z>itf5GrVxH%|{Wu68m7Nbc~1B!$+YHr$eQCJ**22#euFsCs)2 zUI!P#o8V4o|9f~1_714;{23}eAHK(y-(aY6sDwAbsnCZDq27B1-UvVM*a7vu^Y0}O z@Dix<8wK@#3sgGVp~~|Wcq{w@RJwi%KLW2BV%^K2%I$He_mhq*q3ZW_sQNz)RbF3) zY6stes`n14@_7d;+<8Mi?*s5^sP@$tsyz>O?xP*U&V8EW9LH7gGQw|ziuX0Be(-sy z`hFWK9sdqZ`-5uFe}<*-!bQ2G2MRQNWicxOVTdl}UG+o9V1x19fv zVF~tMK$ZIq!|02!HE*oLLe+@MC0QH^0Q2DEZdjBz~ z@O4n-5rbF2XB?M9eRmsF`#1>|?nhAR{SSB{Ja446hoIv1;RUb|sy&uKmHWq`+Cw$e zdy^fbQ0Z)eYFD!ymq69ydZ>2yDpWf-0+pX{K-EJUs@y+#pAAb*{=@B9|3{ha@CoBv+W$9@x3x`sOUhhYKsCmq*8_4iZo zCio+$di<+%zu|t*`xy4SU@;6sjW_L3>D&iH@Uu|u@+(m7F%4C}-e~K8q2m?s5}dDx z7sEp5Ugmfg)Hpa2D*ighHh2;Cg;3?V0``JC;iYgt90N~4g}VfczH=3n|BX=YeWBtX z0QLR@Q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=}UF6T49fx1nc~GgXZ5G{q>TZtvXjy7!AN@=HccLPk z!;Ha-i0wC*WQ3+o3pgQ!V6Ft(sl>jMJy^)51Y0b`Wp=iZ^Q6(|G!W|scShM-+-l_v zDnZU(%|=&lg#vf6ns)ASw!xf-=lEk`jk~q@Mtj$;`Gqw@&5EhU-LJN@idpj6Lyg9m z(bE*xWN#hTm|KVDs$osuRl^#t8d{|pLMmJLg*Ccx7|g1LHTGU%t`fVj#$G0L*9YCX zUpwJtt`F9@>w{)ZU0B0a!CcK;VGZ{J?NUU>tgIE-vS-7ySF+`1?)e1ricwM73ZbvF s*wjYUe{~-lk)wO, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: pcsxr 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-07-10 14:04+0800\n" +"PO-Revision-Date: 2010-07-13 14:36+0800\n" +"Last-Translator: Wei Mingzhi \n" +"Language-Team: Simplified Chinese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../win32/gui/AboutDlg.c:26 +msgid "" +"PCSX - A PlayStation Emulator\n" +"\n" +"Original Authors:\n" +"main coder: linuzappz\n" +"co-coders: shadow\n" +"ex-coders: Nocomp, Pete Bernett, nik3d\n" +"Webmaster: AkumaX" +msgstr "" +"PCSX - 一个 PlayStation 模拟器\n" +"\n" +"原作者:\n" +"主程序员: linuzappz\n" +"辅助程序员: shadow\n" +"前程序员: Nocomp, Pete Bernett, nik3d\n" +"网络管理: AkumaX" + +#: ../win32/gui/AboutDlg.c:35 +msgid "" +"PCSX-df Authors:\n" +"Ryan Schultz, Andrew Burton, Stephen Chao,\n" +"Marcus Comstedt, Stefan Sikora\n" +"\n" +"PCSX-Reloaded By:\n" +"Blade_Arma, Wei Mingzhi, et al.\n" +"\n" +"http://pcsxr.codeplex.com/" +msgstr "" +"PCSX-df 开发者:\n" +"Ryan Schultz, Andrew Burton, Stephen Chao,\n" +"Marcus Comstedt, Stefan Sikora\n" +"\n" +"PCSX-Reloaded 开发者:\n" +"Blade_Arma, Wei Mingzhi, et al.\n" +"\n" +"http://pcsxr.codeplex.com/" + +#: ../win32/gui/AboutDlg.c:46 +#: ../plugins/peopsxgl/gpucfg/interface.c:831 +msgid "About" +msgstr "关于 PCSX" + +#: ../win32/gui/AboutDlg.c:48 +#: ../win32/gui/AboutDlg.c:52 +#: ../win32/gui/CheatDlg.c:69 +#: ../win32/gui/CheatDlg.c:119 +#: ../win32/gui/ConfigurePlugins.c:483 +#: ../win32/gui/ConfigurePlugins.c:614 +#: ../win32/gui/WndMain.c:974 +#: ../win32/gui/WndMain.c:1210 +#: ../plugins/peopsxgl/gpucfg/interface.c:130 +#: ../plugins/peopsxgl/gpucfg/interface.c:843 +msgid "OK" +msgstr "确定" + +#: ../win32/gui/AboutDlg.c:49 +msgid "PCSX EMU\n" +msgstr "PCSX 模拟器\n" + +#: ../win32/gui/CheatDlg.c:51 +#: ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "Yes" +msgstr "是" + +#: ../win32/gui/CheatDlg.c:51 +#: ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "No" +msgstr "否" + +#: ../win32/gui/CheatDlg.c:66 +#: ../gui/Cheat.c:194 +msgid "Edit Cheat" +msgstr "编辑作弊码" + +#: ../win32/gui/CheatDlg.c:67 +#: ../win32/gui/CheatDlg.c:117 +#: ../gui/Cheat.c:636 +msgid "Description:" +msgstr "描述:" + +#: ../win32/gui/CheatDlg.c:68 +#: ../win32/gui/CheatDlg.c:118 +#: ../gui/Cheat.c:125 +#: ../gui/Cheat.c:211 +msgid "Cheat Code:" +msgstr "作弊码:" + +#: ../win32/gui/CheatDlg.c:70 +#: ../win32/gui/CheatDlg.c:120 +#: ../win32/gui/ConfigurePlugins.c:484 +#: ../win32/gui/ConfigurePlugins.c:615 +#: ../win32/gui/WndMain.c:975 +#: ../win32/gui/WndMain.c:1211 +#: ../plugins/peopsxgl/gpucfg/interface.c:338 +msgid "Cancel" +msgstr "取消" + +#: ../win32/gui/CheatDlg.c:91 +#: ../win32/gui/CheatDlg.c:132 +#: ../gui/Cheat.c:155 +#: ../gui/Cheat.c:251 +msgid "Invalid cheat code!" +msgstr "非法作弊码!" + +#: ../win32/gui/CheatDlg.c:116 +#: ../gui/Cheat.c:109 +msgid "Add New Cheat" +msgstr "添加新作弊码" + +#: ../win32/gui/CheatDlg.c:166 +#: ../data/pcsx.glade2:2534 +msgid "Edit Cheat Codes" +msgstr "编辑作弊码" + +#: ../win32/gui/CheatDlg.c:168 +msgid "&Add Code" +msgstr "添加作弊码(&A)" + +#: ../win32/gui/CheatDlg.c:169 +msgid "&Edit Code" +msgstr "编辑作弊码(&E)" + +#: ../win32/gui/CheatDlg.c:170 +msgid "&Remove Code" +msgstr "删除作弊码(&R)" + +#: ../win32/gui/CheatDlg.c:171 +msgid "&Enable/Disable" +msgstr "启用/禁用(&E)" + +#: ../win32/gui/CheatDlg.c:172 +msgid "&Load..." +msgstr "读取(&L)..." + +#: ../win32/gui/CheatDlg.c:173 +msgid "&Save As..." +msgstr "另存为(&S)" + +#: ../win32/gui/CheatDlg.c:174 +msgid "&Close" +msgstr "关闭(&C)" + +#: ../win32/gui/CheatDlg.c:185 +#: ../gui/Cheat.c:413 +msgid "Description" +msgstr "描述" + +#: ../win32/gui/CheatDlg.c:190 +msgid "Enabled" +msgstr "启用" + +#: ../win32/gui/CheatDlg.c:282 +#: ../win32/gui/CheatDlg.c:311 +msgid "PCSX Cheat Code Files" +msgstr "PCSX 作弊码文件" + +#: ../win32/gui/CheatDlg.c:402 +msgid "Equal Value" +msgstr "等于数值" + +#: ../win32/gui/CheatDlg.c:403 +msgid "Not Equal Value" +msgstr "不等于数值" + +#: ../win32/gui/CheatDlg.c:404 +msgid "Range" +msgstr "范围" + +#: ../win32/gui/CheatDlg.c:407 +msgid "Increased By" +msgstr "增加数值" + +#: ../win32/gui/CheatDlg.c:408 +msgid "Decreased By" +msgstr "减少数值" + +#: ../win32/gui/CheatDlg.c:409 +msgid "Increased" +msgstr "增加" + +#: ../win32/gui/CheatDlg.c:410 +msgid "Decreased" +msgstr "减少" + +#: ../win32/gui/CheatDlg.c:411 +msgid "Different" +msgstr "不同" + +#: ../win32/gui/CheatDlg.c:412 +msgid "No Change" +msgstr "无改变" + +#: ../win32/gui/CheatDlg.c:448 +#: ../gui/Cheat.c:585 +msgid "Enter the values and start your search." +msgstr "输入数值并开始查找。" + +#: ../win32/gui/CheatDlg.c:453 +msgid "No addresses found." +msgstr "未找到地址。" + +#: ../win32/gui/CheatDlg.c:457 +#: ../gui/Cheat.c:543 +msgid "Too many addresses found." +msgstr "找到过多的地址。" + +#: ../win32/gui/CheatDlg.c:466 +#: ../gui/Cheat.c:552 +#, c-format +msgid "%.8X Current: %u (%.2X), Previous: %u (%.2X)" +msgstr "%.8X 当前值: %u (%.2X), 前次值: %u (%.2X)" + +#: ../win32/gui/CheatDlg.c:471 +#: ../gui/Cheat.c:557 +#, c-format +msgid "%.8X Current: %u (%.4X), Previous: %u (%.4X)" +msgstr "%.8X 当前值: %u (%.4X), 前次值: %u (%.4X)" + +#: ../win32/gui/CheatDlg.c:476 +#: ../gui/Cheat.c:562 +#, c-format +msgid "%.8X Current: %u (%.8X), Previous: %u (%.8X)" +msgstr "%.8X 当前值: %u (%.8X), 前次值: %u (%.8X)" + +#: ../win32/gui/CheatDlg.c:492 +#: ../gui/Cheat.c:577 +#, c-format +msgid "Founded Addresses: %d" +msgstr "找到地址个数: %d" + +#: ../win32/gui/CheatDlg.c:504 +#: ../data/pcsx.glade2:2930 +msgid "Freeze" +msgstr "固定" + +#: ../win32/gui/CheatDlg.c:505 +#: ../win32/gui/CheatDlg.c:596 +msgid "Address:" +msgstr "地址:" + +#: ../win32/gui/CheatDlg.c:506 +#: ../win32/gui/CheatDlg.c:597 +#: ../win32/gui/CheatDlg.c:682 +#: ../gui/Cheat.c:647 +#: ../data/pcsx.glade2:2773 +msgid "Value:" +msgstr "值:" + +#: ../win32/gui/CheatDlg.c:566 +#, c-format +msgid "Freeze %.8X" +msgstr "固定 %.8X" + +#: ../win32/gui/CheatDlg.c:595 +#: ../data/pcsx.glade2:2966 +msgid "Modify" +msgstr "修改" + +#: ../win32/gui/CheatDlg.c:678 +#: ../gui/Cheat.c:1129 +#: ../data/pcsx.glade2:2703 +msgid "Cheat Search" +msgstr "查找作弊码" + +#: ../win32/gui/CheatDlg.c:680 +#: ../data/pcsx.glade2:2751 +msgid "Search For:" +msgstr "查找:" + +#: ../win32/gui/CheatDlg.c:681 +#: ../data/pcsx.glade2:2761 +msgid "Data Type:" +msgstr "数据类型:" + +#: ../win32/gui/CheatDlg.c:683 +#: ../data/pcsx.glade2:2785 +msgid "Data Base:" +msgstr "数据基:" + +#: ../win32/gui/CheatDlg.c:684 +#: ../data/pcsx.glade2:2845 +msgid "To:" +msgstr "到:" + +#: ../win32/gui/CheatDlg.c:685 +msgid "&Freeze" +msgstr "固定(&F)" + +#: ../win32/gui/CheatDlg.c:686 +msgid "&Modify" +msgstr "修改(&M)" + +#: ../win32/gui/CheatDlg.c:687 +msgid "&Copy" +msgstr "复制(&C)" + +#: ../win32/gui/CheatDlg.c:688 +msgid "&Search" +msgstr "查找(&S)" + +#: ../win32/gui/CheatDlg.c:689 +msgid "&New Search" +msgstr "新查找(&N)" + +#: ../win32/gui/CheatDlg.c:690 +msgid "C&lose" +msgstr "关闭(&L)" + +#: ../win32/gui/CheatDlg.c:692 +msgid "8-bit" +msgstr "8 位" + +#: ../win32/gui/CheatDlg.c:693 +msgid "16-bit" +msgstr "16 位" + +#: ../win32/gui/CheatDlg.c:694 +msgid "32-bit" +msgstr "32 位" + +#: ../win32/gui/CheatDlg.c:695 +msgid "Decimal" +msgstr "十进制" + +#: ../win32/gui/CheatDlg.c:696 +msgid "Hexadecimal" +msgstr "十六进制" + +#: ../win32/gui/ConfigurePlugins.c:219 +msgid "Simulate Psx Bios" +msgstr "模拟 PS BIOS" + +#: ../win32/gui/ConfigurePlugins.c:305 +msgid "Configuration not OK!" +msgstr "配置不正确!" + +#: ../win32/gui/ConfigurePlugins.c:305 +#: ../gui/Cheat.c:155 +#: ../gui/Cheat.c:251 +#: ../gui/LnxMain.c:418 +msgid "Error" +msgstr "错误" + +#: ../win32/gui/ConfigurePlugins.c:406 +msgid "This plugin reports that should work correctly" +msgstr "此插件报告其可正常工作。" + +#: ../win32/gui/ConfigurePlugins.c:407 +msgid "This plugin reports that should not work correctly" +msgstr "此插件报告其不可正常工作。" + +#: ../win32/gui/ConfigurePlugins.c:463 +msgid "Select Plugins Directory" +msgstr "选择插件目录" + +#: ../win32/gui/ConfigurePlugins.c:472 +msgid "Select Bios Directory" +msgstr "选择 BIOS 目录" + +#: ../win32/gui/ConfigurePlugins.c:481 +msgid "Configuration" +msgstr "配置" + +#: ../win32/gui/ConfigurePlugins.c:485 +msgid "Graphics" +msgstr "图像" + +#: ../win32/gui/ConfigurePlugins.c:486 +msgid "First Controller" +msgstr "主控制器" + +#: ../win32/gui/ConfigurePlugins.c:487 +msgid "Second Controller" +msgstr "辅控制器" + +#: ../win32/gui/ConfigurePlugins.c:488 +msgid "Sound" +msgstr "声音" + +#: ../win32/gui/ConfigurePlugins.c:489 +msgid "Cdrom" +msgstr "CD-ROM" + +#: ../win32/gui/ConfigurePlugins.c:490 +msgid "Bios" +msgstr "BIOS" + +#: ../win32/gui/ConfigurePlugins.c:491 +msgid "Set Bios Directory" +msgstr "设置 BIOS 目录" + +#: ../win32/gui/ConfigurePlugins.c:492 +msgid "Set Plugins Directory" +msgstr "设置插件目录" + +#: ../win32/gui/ConfigurePlugins.c:493 +#: ../win32/gui/ConfigurePlugins.c:496 +#: ../win32/gui/ConfigurePlugins.c:499 +#: ../win32/gui/ConfigurePlugins.c:502 +#: ../win32/gui/ConfigurePlugins.c:505 +#: ../win32/gui/ConfigurePlugins.c:617 +msgid "Configure..." +msgstr "配置..." + +#: ../win32/gui/ConfigurePlugins.c:494 +#: ../win32/gui/ConfigurePlugins.c:497 +#: ../win32/gui/ConfigurePlugins.c:500 +#: ../win32/gui/ConfigurePlugins.c:503 +#: ../win32/gui/ConfigurePlugins.c:506 +#: ../win32/gui/ConfigurePlugins.c:618 +msgid "Test..." +msgstr "测试..." + +#: ../win32/gui/ConfigurePlugins.c:495 +#: ../win32/gui/ConfigurePlugins.c:498 +#: ../win32/gui/ConfigurePlugins.c:501 +#: ../win32/gui/ConfigurePlugins.c:504 +#: ../win32/gui/ConfigurePlugins.c:507 +#: ../win32/gui/ConfigurePlugins.c:619 +msgid "About..." +msgstr "关于..." + +#: ../win32/gui/ConfigurePlugins.c:612 +msgid "NetPlay Configuration" +msgstr "联网游戏配置" + +#: ../win32/gui/ConfigurePlugins.c:616 +#: ../plugins/dfnet/gui.c:31 +#: ../plugins/dfnet/gui.c:112 +msgid "NetPlay" +msgstr "联网游戏" + +#: ../win32/gui/ConfigurePlugins.c:620 +msgid "Note: The NetPlay Plugin Directory should be the same as the other Plugins." +msgstr "注意: 联网游戏插件应和其它插件放在同一目录中。" + +#: ../win32/gui/plugin.c:90 +#: ../win32/gui/WndMain.c:281 +#, c-format +msgid "*PCSX*: Saved State %d" +msgstr "*PCSX*: Saved State %d" + +#: ../win32/gui/plugin.c:91 +#: ../win32/gui/WndMain.c:282 +#, c-format +msgid "*PCSX*: Error Saving State %d" +msgstr "*PCSX*: Error Saving State %d" + +#: ../win32/gui/plugin.c:107 +#: ../win32/gui/WndMain.c:259 +#, c-format +msgid "*PCSX*: Loaded State %d" +msgstr "*PCSX*: Loaded State %d" + +#: ../win32/gui/plugin.c:108 +#: ../win32/gui/WndMain.c:260 +#, c-format +msgid "*PCSX*: Error Loading State %d" +msgstr "*PCSX*: Error Loading State %d" + +#: ../win32/gui/plugin.c:119 +#, c-format +msgid "*PCSX*: Sio Irq Always Enabled" +msgstr "*PCSX*: Sio Irq Always Enabled" + +#: ../win32/gui/plugin.c:120 +#, c-format +msgid "*PCSX*: Sio Irq Not Always Enabled" +msgstr "*PCSX*: Sio Irq Not Always Enabled" + +#: ../win32/gui/plugin.c:127 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Enabled" +msgstr "*PCSX*: Black&White Mdecs Only Enabled" + +#: ../win32/gui/plugin.c:128 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Disabled" +msgstr "*PCSX*: Black&White Mdecs Only Disabled" + +#: ../win32/gui/plugin.c:135 +#, c-format +msgid "*PCSX*: Xa Enabled" +msgstr "*PCSX*: Xa Enabled" + +#: ../win32/gui/plugin.c:136 +#, c-format +msgid "*PCSX*: Xa Disabled" +msgstr "*PCSX*: Xa Disabled" + +#: ../win32/gui/plugin.c:145 +msgid "*PCSX*: CdRom Case Opened" +msgstr "*PCSX*: CdRom Case Opened" + +#: ../win32/gui/plugin.c:150 +msgid "*PCSX*: CdRom Case Closed" +msgstr "*PCSX*: CdRom Case Closed" + +#: ../win32/gui/plugin.c:177 +msgid "Connecting..." +msgstr "正在连接..." + +#: ../win32/gui/plugin.c:179 +#: ../win32/gui/plugin.c:186 +#, c-format +msgid "Please wait while connecting... %c\n" +msgstr "请稍候,正在连接... %c\n" + +#: ../win32/gui/plugin.c:214 +msgid "Error Opening CDR Plugin" +msgstr "无法打开 CDR 插件" + +#: ../win32/gui/plugin.c:277 +#, c-format +msgid "Error Opening GPU Plugin (%d)" +msgstr "无法打开 GPU 插件 (%d)" + +#: ../win32/gui/plugin.c:279 +#, c-format +msgid "Error Opening SPU Plugin (%d)" +msgstr "无法打开 SPU 插件 (%d)" + +#: ../win32/gui/plugin.c:282 +#, c-format +msgid "Error Opening PAD1 Plugin (%d)" +msgstr "无法打开 PAD1 插件 (%d)" + +#: ../win32/gui/plugin.c:284 +#, c-format +msgid "Error Opening PAD2 Plugin (%d)" +msgstr "无法打开 PAD2 插件 (%d)" + +#: ../win32/gui/plugin.c:314 +msgid "Error Closing CDR Plugin" +msgstr "无法关闭 CD-ROM 插件 (%d)" + +#: ../win32/gui/plugin.c:316 +msgid "Error Closing GPU Plugin" +msgstr "无法关闭 GPU 插件" + +#: ../win32/gui/plugin.c:318 +msgid "Error Closing SPU Plugin" +msgstr "无法关闭 SPU 插件" + +#: ../win32/gui/plugin.c:336 +#, c-format +msgid "CDRinit error: %d" +msgstr "CDRinit 错误: %d" + +#: ../win32/gui/plugin.c:338 +#, c-format +msgid "GPUinit error: %d" +msgstr "GPUinit 错误: %d" + +#: ../win32/gui/plugin.c:340 +#, c-format +msgid "SPUinit error: %d" +msgstr "SPUinit 错误: %d" + +#: ../win32/gui/plugin.c:342 +#, c-format +msgid "PAD1init error: %d" +msgstr "PAD1init 错误: %d" + +#: ../win32/gui/plugin.c:344 +#, c-format +msgid "PAD2init error: %d" +msgstr "PAD2init 错误: %d" + +#: ../win32/gui/plugin.c:347 +#, c-format +msgid "NETinit error: %d" +msgstr "NETinit 错误: %d" + +#: ../win32/gui/WndMain.c:76 +msgid "Arabic" +msgstr "阿拉伯语" + +#: ../win32/gui/WndMain.c:77 +msgid "Catalan" +msgstr "加泰隆尼亚语" + +#: ../win32/gui/WndMain.c:78 +msgid "German" +msgstr "德语" + +#: ../win32/gui/WndMain.c:79 +msgid "Greek" +msgstr "希腊语" + +#: ../win32/gui/WndMain.c:80 +#: ../win32/gui/WndMain.c:1566 +#: ../win32/gui/WndMain.c:1568 +msgid "English" +msgstr "英语" + +#: ../win32/gui/WndMain.c:81 +msgid "Spanish" +msgstr "西班牙语" + +#: ../win32/gui/WndMain.c:82 +msgid "French" +msgstr "法语" + +#: ../win32/gui/WndMain.c:83 +msgid "Italian" +msgstr "意大利语" + +#: ../win32/gui/WndMain.c:84 +msgid "Portuguese" +msgstr "葡萄牙语" + +#: ../win32/gui/WndMain.c:85 +msgid "Portuguese (Brazilian)" +msgstr "葡萄牙语 (巴西)" + +#: ../win32/gui/WndMain.c:86 +msgid "Romanian" +msgstr "罗马尼亚语" + +#: ../win32/gui/WndMain.c:87 +msgid "Russian" +msgstr "俄语" + +#: ../win32/gui/WndMain.c:88 +msgid "Simplified Chinese" +msgstr "简体中文" + +#: ../win32/gui/WndMain.c:89 +msgid "Traditional Chinese" +msgstr "繁体中文" + +#: ../win32/gui/WndMain.c:90 +msgid "Japanese" +msgstr "日语" + +#: ../win32/gui/WndMain.c:91 +msgid "Korean" +msgstr "朝鲜语" + +#: ../win32/gui/WndMain.c:300 +#: ../win32/gui/WndMain.c:352 +msgid "PCSX State Format" +msgstr "PCSX 即时存档格式" + +#: ../win32/gui/WndMain.c:327 +#, c-format +msgid "*PCSX*: Loaded State %s" +msgstr "*PCSX*: Loaded State %s" + +#: ../win32/gui/WndMain.c:328 +#, c-format +msgid "*PCSX*: Error Loading State %s" +msgstr "*PCSX*: Error Loading State %s" + +#: ../win32/gui/WndMain.c:379 +#, c-format +msgid "*PCSX*: Saved State %s" +msgstr "*PCSX*: Saved State %s" + +#: ../win32/gui/WndMain.c:380 +#, c-format +msgid "*PCSX*: Error Saving State %s" +msgstr "*PCSX*: Error Saving State %s" + +#: ../win32/gui/WndMain.c:429 +#: ../win32/gui/WndMain.c:478 +#: ../gui/Gtk2Gui.c:485 +#: ../gui/Gtk2Gui.c:610 +msgid "The CD does not appear to be a valid Playstation CD" +msgstr "此光盘不是一张合法的 PlayStation 光盘。" + +#: ../win32/gui/WndMain.c:435 +#: ../win32/gui/WndMain.c:484 +#: ../gui/Gtk2Gui.c:493 +#: ../gui/Gtk2Gui.c:618 +msgid "Could not load CD-ROM!" +msgstr "无法加载光盘!" + +#: ../win32/gui/WndMain.c:445 +msgid "Running BIOS is not supported with Internal HLE Bios." +msgstr "内部 HLE BIOS 不支持直接运行。" + +#: ../win32/gui/WndMain.c:664 +#: ../gui/MemcardDlg.c:62 +msgid "Title" +msgstr "标题" + +#: ../win32/gui/WndMain.c:670 +#: ../gui/MemcardDlg.c:68 +msgid "Status" +msgstr "状态" + +#: ../win32/gui/WndMain.c:676 +msgid "Game ID" +msgstr "游戏 ID" + +#: ../win32/gui/WndMain.c:682 +msgid "Game" +msgstr "游戏" + +#: ../win32/gui/WndMain.c:864 +msgid "mid link block" +msgstr "中间链接块" + +#: ../win32/gui/WndMain.c:867 +msgid "terminiting link block" +msgstr "终止链接块" + +#: ../win32/gui/WndMain.c:875 +#: ../gui/MemcardDlg.c:155 +#: ../gui/MemcardDlg.c:260 +msgid "Deleted" +msgstr "已删除" + +#: ../win32/gui/WndMain.c:876 +#: ../win32/gui/WndMain.c:879 +#: ../gui/MemcardDlg.c:157 +#: ../gui/MemcardDlg.c:161 +#: ../gui/MemcardDlg.c:262 +#: ../gui/MemcardDlg.c:266 +msgid "Free" +msgstr "空闲" + +#: ../win32/gui/WndMain.c:878 +#: ../gui/MemcardDlg.c:159 +#: ../gui/MemcardDlg.c:264 +msgid "Used" +msgstr "已使用" + +#: ../win32/gui/WndMain.c:972 +msgid "Memcard Manager" +msgstr "记忆卡管理器" + +#: ../win32/gui/WndMain.c:976 +#: ../win32/gui/WndMain.c:979 +msgid "Select Mcd" +msgstr "选择" + +#: ../win32/gui/WndMain.c:977 +#: ../win32/gui/WndMain.c:980 +msgid "Format Mcd" +msgstr "格式化" + +#: ../win32/gui/WndMain.c:978 +#: ../win32/gui/WndMain.c:981 +msgid "Reload Mcd" +msgstr "重新加载" + +#: ../win32/gui/WndMain.c:982 +msgid "-> Copy ->" +msgstr "-> 复制 ->" + +#: ../win32/gui/WndMain.c:983 +msgid "<- Copy <-" +msgstr "<- 复制 <-" + +#: ../win32/gui/WndMain.c:984 +msgid "Paste" +msgstr "粘贴" + +#: ../win32/gui/WndMain.c:985 +msgid "<- Un/Delete" +msgstr "<- 删除/恢复" + +#: ../win32/gui/WndMain.c:986 +msgid "Un/Delete ->" +msgstr "删除/恢复 ->" + +#: ../win32/gui/WndMain.c:988 +msgid "Memory Card 1" +msgstr "记忆卡 1" + +#: ../win32/gui/WndMain.c:989 +msgid "Memory Card 2" +msgstr "记忆卡 2" + +#: ../win32/gui/WndMain.c:1044 +msgid "Are you sure you want to paste this selection?" +msgstr "是否确认粘贴此选中内容?" + +#: ../win32/gui/WndMain.c:1044 +#: ../win32/gui/WndMain.c:1155 +#: ../win32/gui/WndMain.c:1162 +msgid "Confirmation" +msgstr "确认" + +#: ../win32/gui/WndMain.c:1155 +#: ../win32/gui/WndMain.c:1162 +msgid "Are you sure you want to format this Memory Card?" +msgstr "是否确认格式化此记忆卡?" + +#: ../win32/gui/WndMain.c:1208 +msgid "Cpu Config" +msgstr "CPU 配置" + +#: ../win32/gui/WndMain.c:1213 +msgid "Disable Xa Decoding" +msgstr "禁用 XA 解码" + +#: ../win32/gui/WndMain.c:1214 +msgid "Sio Irq Always Enabled" +msgstr "SIO IRQ 总是启用" + +#: ../win32/gui/WndMain.c:1215 +msgid "Black && White Movies" +msgstr "黑白电影" + +#: ../win32/gui/WndMain.c:1216 +msgid "Disable Cd audio" +msgstr "禁用 CD 音频" + +#: ../win32/gui/WndMain.c:1217 +#: ../data/pcsx.glade2:1595 +msgid "Autodetect" +msgstr "自动检测" + +#: ../win32/gui/WndMain.c:1218 +msgid "Enable Interpreter Cpu" +msgstr "启用解释执行 CPU" + +#: ../win32/gui/WndMain.c:1219 +#: ../data/pcsx.glade2:1451 +msgid "Enable Console Output" +msgstr "启用控制台输出" + +#: ../win32/gui/WndMain.c:1220 +#: ../data/pcsx.glade2:1401 +msgid "Enable Debugger" +msgstr "启用调试器" + +#: ../win32/gui/WndMain.c:1221 +msgid "Spu Irq Always Enabled" +msgstr "SPU IRQ 总是启用" + +#: ../win32/gui/WndMain.c:1222 +#: ../data/pcsx.glade2:1538 +msgid "Parasite Eve 2, Vandal Hearts 1/2 Fix" +msgstr "Parasite Eve 2, Vandal Hearts 1/2 修正" + +#: ../win32/gui/WndMain.c:1223 +#: ../data/pcsx.glade2:1553 +msgid "InuYasha Sengoku Battle Fix" +msgstr "InuYasha Sengoku Battle 修正" + +#: ../win32/gui/WndMain.c:1225 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:277 +#: ../plugins/dfinput/dfinput.glade2:448 +msgid "Options" +msgstr "选项" + +#: ../win32/gui/WndMain.c:1226 +msgid "Psx System Type" +msgstr "PS 系统类型" + +#: ../win32/gui/WndMain.c:1330 +msgid "Psx Mcd Format (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)" +msgstr "PS 记忆卡格式 (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)" + +#: ../win32/gui/WndMain.c:1335 +msgid "Psx Memory Card (*.mcr;*.mc)" +msgstr "PS 记忆卡 (*.mcr;*.mc)" + +#: ../win32/gui/WndMain.c:1340 +msgid "CVGS Memory Card (*.mem;*.vgs)" +msgstr "VGS 记忆卡 (*.mem;*.vgs)" + +#: ../win32/gui/WndMain.c:1345 +msgid "Bleem Memory Card (*.mcd)" +msgstr "Bleem 记忆卡 (*.mcd)" + +#: ../win32/gui/WndMain.c:1350 +msgid "DexDrive Memory Card (*.gme)" +msgstr "DexDrive 记忆卡 (*.gme)" + +#: ../win32/gui/WndMain.c:1355 +msgid "DataDeck Memory Card (*.ddf)" +msgstr "DataDeck 记忆卡 (*.ddl)" + +#: ../win32/gui/WndMain.c:1360 +#: ../win32/gui/WndMain.c:1441 +#: ../gui/Cheat.c:321 +#: ../gui/Gtk2Gui.c:422 +#: ../gui/Gtk2Gui.c:561 +msgid "All Files" +msgstr "所有文件" + +#: ../win32/gui/WndMain.c:1399 +msgid "Psx Exe Format" +msgstr "PS EXE 格式" + +#: ../win32/gui/WndMain.c:1436 +msgid "Psx Isos (*.iso;*.mdf;*.img;*.bin)" +msgstr "PS 光盘镜像 (*.iso;*.mdf;*.img;*.bin)" + +#: ../win32/gui/WndMain.c:1512 +msgid "&File" +msgstr "文件(&F)" + +#: ../win32/gui/WndMain.c:1513 +msgid "E&xit" +msgstr "退出(&X)" + +#: ../win32/gui/WndMain.c:1515 +msgid "Run &EXE..." +msgstr "运行 &EXE..." + +#: ../win32/gui/WndMain.c:1516 +msgid "Run &BIOS" +msgstr "运行 BIOS(&B)" + +#: ../win32/gui/WndMain.c:1517 +msgid "Run &ISO..." +msgstr "运行 &ISO..." + +#: ../win32/gui/WndMain.c:1518 +msgid "Run &CD" +msgstr "运行光碟(&C)" + +#: ../win32/gui/WndMain.c:1520 +msgid "&Emulator" +msgstr "模拟器(&E)" + +#: ../win32/gui/WndMain.c:1521 +msgid "&States" +msgstr "存档(&S)" + +#: ../win32/gui/WndMain.c:1523 +msgid "S&witch ISO..." +msgstr "更换 ISO(&W)..." + +#: ../win32/gui/WndMain.c:1525 +msgid "Re&set" +msgstr "复位(&S)" + +#: ../win32/gui/WndMain.c:1526 +msgid "&Run" +msgstr "运行(&R)" + +#: ../win32/gui/WndMain.c:1527 +msgid "&Save" +msgstr "保存(&S)" + +#: ../win32/gui/WndMain.c:1528 +msgid "&Load" +msgstr "读取(&L)" + +#: ../win32/gui/WndMain.c:1529 +#: ../win32/gui/WndMain.c:1535 +msgid "&Other..." +msgstr "其它(&O)..." + +#: ../win32/gui/WndMain.c:1530 +#: ../win32/gui/WndMain.c:1536 +msgid "Slot &5" +msgstr "存档 5(&5)" + +#: ../win32/gui/WndMain.c:1531 +#: ../win32/gui/WndMain.c:1537 +msgid "Slot &4" +msgstr "存档 4(&4)" + +#: ../win32/gui/WndMain.c:1532 +#: ../win32/gui/WndMain.c:1538 +msgid "Slot &3" +msgstr "存档 3(&3)" + +#: ../win32/gui/WndMain.c:1533 +#: ../win32/gui/WndMain.c:1539 +msgid "Slot &2" +msgstr "存档 2(&2)" + +#: ../win32/gui/WndMain.c:1534 +#: ../win32/gui/WndMain.c:1540 +msgid "Slot &1" +msgstr "存档 1(&1)" + +#: ../win32/gui/WndMain.c:1542 +msgid "&Configuration" +msgstr "配置(&C)" + +#: ../win32/gui/WndMain.c:1543 +msgid "Cheat &Search..." +msgstr "查找作弊码(&S)..." + +#: ../win32/gui/WndMain.c:1544 +msgid "Ch&eat Code..." +msgstr "作弊码(&E)..." + +#: ../win32/gui/WndMain.c:1547 +msgid "&Language" +msgstr "语言(&L)" + +#: ../win32/gui/WndMain.c:1572 +msgid "&Memory cards..." +msgstr "记忆卡(&M)..." + +#: ../win32/gui/WndMain.c:1573 +msgid "C&PU..." +msgstr "C&PU..." + +#: ../win32/gui/WndMain.c:1575 +msgid "&NetPlay..." +msgstr "联网游戏(&N)..." + +#: ../win32/gui/WndMain.c:1577 +msgid "&Controllers..." +msgstr "控制器(&C)..." + +#: ../win32/gui/WndMain.c:1578 +msgid "CD-&ROM..." +msgstr "CD-&ROM..." + +#: ../win32/gui/WndMain.c:1579 +msgid "&Sound..." +msgstr "声音(&S)..." + +#: ../win32/gui/WndMain.c:1580 +msgid "&Graphics..." +msgstr "图像(&G)..." + +#: ../win32/gui/WndMain.c:1582 +msgid "&Plugins && Bios..." +msgstr "插件及 BIOS(&P)..." + +#: ../win32/gui/WndMain.c:1584 +msgid "&Help" +msgstr "帮助(&H)" + +#: ../win32/gui/WndMain.c:1585 +msgid "&About..." +msgstr "关于(&A)..." + +#: ../win32/gui/WndMain.c:1764 +msgid "Pcsx Msg" +msgstr "PCSX 消息" + +#: ../win32/gui/WndMain.c:1767 +msgid "Error Loading Symbol" +msgstr "无法加载符号" + +#: ../gui/AboutDlg.c:74 +msgid "" +"(C) 1999-2003 PCSX Team\n" +"(C) 2005-2009 PCSX-df Team\n" +"(C) 2009-2010 PCSX-Reloaded Team" +msgstr "" +"(C) 1999-2003 PCSX 开发组\n" +"(C) 2005-2009 PCSX-df 开发组\n" +"(C) 2009-2010 PCSX-Reloaded 开发组" + +#: ../gui/AboutDlg.c:79 +msgid "" +"This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA." +msgstr "" +"This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA." + +#: ../gui/AboutDlg.c:102 +msgid "translator-credits" +msgstr "Wei Mingzhi " + +#: ../gui/AboutDlg.c:103 +msgid "A PlayStation emulator." +msgstr "一个 PlayStation 模拟器。" + +#: ../gui/Cheat.c:117 +#: ../gui/Cheat.c:202 +msgid "Cheat Description:" +msgstr "作弊码描述:" + +#: ../gui/Cheat.c:306 +msgid "Open Cheat File" +msgstr "打开作弊码文件" + +#: ../gui/Cheat.c:316 +#: ../gui/Cheat.c:356 +msgid "PCSX Cheat Code Files (*.cht)" +msgstr "PCSX 作弊码文件 (*.cht)" + +#: ../gui/Cheat.c:346 +msgid "Save Cheat File" +msgstr "保存作弊码文件" + +#: ../gui/Cheat.c:361 +msgid "All Files (*.*)" +msgstr "所有文件 (*.*)" + +#: ../gui/Cheat.c:394 +#: ../gui/Cheat.c:1124 +#: ../gui/ConfDlg.c:104 +#: ../gui/ConfDlg.c:200 +#: ../gui/DebugMemory.c:259 +msgid "Error: Glade interface could not be loaded!" +msgstr "错误:无法加载 Glade 界面!" + +#: ../gui/Cheat.c:399 +msgid "Cheat Codes" +msgstr "作弊码" + +#: ../gui/Cheat.c:405 +msgid "Enable" +msgstr "启用" + +#: ../gui/Cheat.c:630 +msgid "Freeze value" +msgstr "固定数值" + +#: ../gui/Cheat.c:729 +msgid "Modify value" +msgstr "修改数值" + +#: ../gui/Cheat.c:737 +msgid "New value:" +msgstr "新值:" + +#: ../gui/Cheat.c:1134 +msgid "Search Results" +msgstr "查找结果" + +#: ../gui/ConfDlg.c:112 +#: ../data/pcsx.glade2:778 +msgid "Configure PCSX" +msgstr "配置 PCSX" + +#: ../gui/ConfDlg.c:237 +#: ../gui/ConfDlg.c:258 +#: ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 +#: ../gui/ConfDlg.c:355 +msgid "No configuration required" +msgstr "不需要配置" + +#: ../gui/ConfDlg.c:237 +#: ../gui/ConfDlg.c:258 +#: ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 +#: ../gui/ConfDlg.c:355 +msgid "This plugin doesn't need to be configured." +msgstr "此插件需要被配置。" + +#: ../gui/ConfDlg.c:581 +#, c-format +msgid "Could not open BIOS directory: '%s'\n" +msgstr "无法打开 BIOS 目录: \"%s\"\n" + +#: ../gui/ConfDlg.c:611 +#: ../gui/ConfDlg.c:704 +#: ../gui/LnxMain.c:168 +#, c-format +msgid "Could not open directory: '%s'\n" +msgstr "无法打开目录: \"%s\"\n" + +#: ../gui/ConfDlg.c:675 +msgid "Simulate PSX BIOS" +msgstr "模拟 PS BIOS" + +#: ../gui/DebugMemory.c:103 +#: ../data/pcsx.glade2:3178 +msgid "Memory Dump" +msgstr "内存转储" + +#: ../gui/DebugMemory.c:111 +msgid "Start Address (Hexadecimal):" +msgstr "开始地址 (十六进制):" + +#: ../gui/DebugMemory.c:121 +msgid "Length (Decimal):" +msgstr "长度 (十进制):" + +#: ../gui/DebugMemory.c:147 +msgid "Dump to File" +msgstr "转储至文件" + +#: ../gui/DebugMemory.c:162 +#, c-format +msgid "Error writing to %s!" +msgstr "写入到 %s 时出错!" + +#: ../gui/DebugMemory.c:180 +msgid "Memory Patch" +msgstr "内存修改" + +#: ../gui/DebugMemory.c:188 +#: ../data/pcsx.glade2:3199 +msgid "Address (Hexadecimal):" +msgstr "地址 (十六进制):" + +#: ../gui/DebugMemory.c:198 +msgid "Value (Hexa string):" +msgstr "数值 (十六进制串):" + +#: ../gui/DebugMemory.c:264 +msgid "Memory Viewer" +msgstr "内存查看器" + +#: ../gui/DebugMemory.c:269 +msgid "Address" +msgstr "地址" + +#: ../gui/DebugMemory.c:287 +msgid "Text" +msgstr "文本" + +#: ../gui/Gtk2Gui.c:113 +msgid "Ready" +msgstr "就绪" + +#: ../gui/Gtk2Gui.c:154 +msgid "Emulation Paused." +msgstr "模拟器已暂停。" + +#: ../gui/Gtk2Gui.c:405 +msgid "Select PSX EXE File" +msgstr "选择 PS EXE 文件" + +#: ../gui/Gtk2Gui.c:418 +msgid "PlayStation Executable Files" +msgstr "PlayStation 可执行文件" + +#: ../gui/Gtk2Gui.c:454 +msgid "Not a valid PSX file" +msgstr "不是一个合法的 PSX 文件" + +#: ../gui/Gtk2Gui.c:454 +msgid "The file does not appear to be a valid Playstation executable" +msgstr "此文件不是一个合法的 PlayStation 可执行文件" + +#: ../gui/Gtk2Gui.c:485 +#: ../gui/Gtk2Gui.c:610 +msgid "CD ROM failed" +msgstr "CD-ROM 失败" + +#: ../gui/Gtk2Gui.c:493 +#: ../gui/Gtk2Gui.c:618 +msgid "The CD-ROM could not be loaded" +msgstr "无法加载 CD-ROM" + +#: ../gui/Gtk2Gui.c:507 +msgid "Could not run BIOS" +msgstr "无法运行 BIOS" + +#: ../gui/Gtk2Gui.c:507 +msgid "Running BIOS is not supported with Internal HLE BIOS." +msgstr "内部 HLE BIOS 不支持直接运行。" + +#: ../gui/Gtk2Gui.c:536 +msgid "Open PSX Disc Image File" +msgstr "打开 PS 光盘镜像文件" + +#: ../gui/Gtk2Gui.c:556 +msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" +msgstr "PS 镜像文件 (*.bin, *.img, *.mdf, *.iso)" + +#: ../gui/Gtk2Gui.c:771 +#, c-format +msgid "Loaded state %s." +msgstr "已读取存档 %s。" + +#: ../gui/Gtk2Gui.c:774 +#, c-format +msgid "Error loading state %s!" +msgstr "读取存档 %s 时出错。" + +#: ../gui/Gtk2Gui.c:785 +#, c-format +msgid "Saved state %s." +msgstr "已保存存档 %s" + +#: ../gui/Gtk2Gui.c:787 +#, c-format +msgid "Error saving state %s!" +msgstr "保存存档 %s 时出错。" + +#: ../gui/Gtk2Gui.c:822 +#: ../gui/Gtk2Gui.c:850 +msgid "Select State File" +msgstr "选择存档文件" + +#: ../gui/Gtk2Gui.c:893 +msgid "Notice" +msgstr "警告" + +#: ../gui/LnxMain.c:62 +#, c-format +msgid "Creating memory card: %s\n" +msgstr "建立记忆卡: %s\n" + +#: ../gui/LnxMain.c:325 +msgid "" +" pcsx [options] [file]\n" +"\toptions:\n" +"\t-runcd\t\tRuns CD-ROM\n" +"\t-cdfile FILE\tRuns a CD image file\n" +"\t-nogui\t\tDon't open the GTK GUI\n" +"\t-cfg FILE\tLoads desired configuration file (default: ~/.pcsx/pcsx.cfg)\n" +"\t-psxout\t\tEnable PSX output\n" +"\t-load STATENUM\tLoads savestate STATENUM (1-5)\n" +"\t-h -help\tDisplay this message\n" +"\tfile\t\tLoads file\n" +msgstr "" +" pcsx [选项] [文件]\n" +"\t选项:\n" +"\t-runcd\t\t运行 CD-ROM\n" +"\t-cdfile 文件\t运行一个 CD 镜像文件\n" +"\t-nogui\t\t不使用 GTK 图形界面\n" +"\t-cfg 文件\t加载一个特定的配置文件 (默认为: ~/.pcsx/pcsx.cfg)\n" +"\t-psxout\t\t启用 PSX 输出\n" +"\t-load 编号\t加载指定编号的存档 (1-5)\n" +"\t-h -help\t显示此信息\n" +"\t文件\t\t加载文件\n" + +#: ../gui/LnxMain.c:362 +#, c-format +msgid "PCSX cannot be configured without using the GUI -- you should restart without -nogui.\n" +msgstr "PCSX 不能在字符界面下配置 -- 请不使用 -nogui 参数重新启动程序\n" + +#: ../gui/LnxMain.c:418 +msgid "Failed loading plugins!" +msgstr "加载插件失败!" + +#: ../gui/LnxMain.c:435 +#, c-format +msgid "Could not load CD-ROM!\n" +msgstr "无法加载光盘。\n" + +#: ../gui/LnxMain.c:466 +#, c-format +msgid "PSX emulator couldn't be initialized.\n" +msgstr "无法初始化 PS 模拟器。\n" + +#: ../gui/MemcardDlg.c:56 +msgid "Icon" +msgstr "图标" + +#: ../gui/MemcardDlg.c:74 +msgid "ID" +msgstr "ID" + +#: ../gui/MemcardDlg.c:80 +msgid "Name" +msgstr "名称" + +#: ../gui/MemcardDlg.c:323 +msgid "Select A File" +msgstr "选择一个文件" + +#: ../gui/MemcardDlg.c:364 +msgid "Format this Memory Card?" +msgstr "格式化此记忆卡?" + +#: ../gui/MemcardDlg.c:366 +msgid "If you format the memory card, the card will be empty, and any existing data overwritten." +msgstr "如果您选择格式化记忆卡,记忆卡将被清空,并且任何现有数据都将被覆盖。" + +#: ../gui/MemcardDlg.c:369 +msgid "Format card" +msgstr "格式化记忆卡" + +#: ../gui/MemcardDlg.c:393 +msgid "Create a new Memory Card" +msgstr "新建记忆卡" + +#: ../gui/MemcardDlg.c:402 +msgid "New Memory Card.mcd" +msgstr "新记忆卡.mcd" + +#: ../gui/MemcardDlg.c:503 +msgid "No free space on memory card" +msgstr "记忆卡无空余位置" + +#: ../gui/MemcardDlg.c:504 +msgid "There are no free slots available on the target memory card. Please delete a slot first." +msgstr "目标记忆卡上无空余位置。请先删除一个存档。" + +#: ../gui/MemcardDlg.c:667 +msgid "Memory Card Manager" +msgstr "记忆卡管理器" + +#: ../gui/Plugin.c:211 +#: ../data/pcsx.glade2:1487 +#, c-format +msgid "SIO IRQ Always Enabled" +msgstr "SIO IRQ 总是启用" + +#: ../gui/Plugin.c:212 +#, c-format +msgid "SIO IRQ Not Always Enabled" +msgstr "SIO IRQ 不总是启用" + +#: ../gui/Plugin.c:218 +#, c-format +msgid "Black & White Mdecs Only Enabled" +msgstr "Black & White Mdecs Only 启用" + +#: ../gui/Plugin.c:219 +#, c-format +msgid "Black & White Mdecs Only Disabled" +msgstr "Black & White Mdecs Only 禁用" + +#: ../gui/Plugin.c:225 +#, c-format +msgid "XA Enabled" +msgstr "XA 已启用" + +#: ../gui/Plugin.c:226 +#, c-format +msgid "XA Disabled" +msgstr "XA 已禁用" + +#: ../gui/Plugin.c:288 +msgid "Error opening CD-ROM plugin!" +msgstr "无法打开CD-ROM 插件!" + +#: ../gui/Plugin.c:290 +msgid "Error opening SPU plugin!" +msgstr "无法打开 SPU 插件!" + +#: ../gui/Plugin.c:293 +msgid "Error opening GPU plugin!" +msgstr "无法打开 GPU 插件!" + +#: ../gui/Plugin.c:295 +msgid "Error opening Controller 1 plugin!" +msgstr "无法打开 \"控制器 1\" 插件!" + +#: ../gui/Plugin.c:297 +msgid "Error opening Controller 2 plugin!" +msgstr "无法打开 \"控制器 2\" 插件!" + +#: ../gui/Plugin.c:377 +msgid "Error closing CD-ROM plugin!" +msgstr "无法关闭 CD-ROM 插件!" + +#: ../gui/Plugin.c:379 +msgid "Error closing SPU plugin!" +msgstr "无法关闭 SPU 插件!" + +#: ../gui/Plugin.c:381 +msgid "Error closing Controller 1 Plugin!" +msgstr "无法关闭 \"控制器 1\" 插件!" + +#: ../gui/Plugin.c:383 +msgid "Error closing Controller 2 plugin!" +msgstr "无法关闭 \"控制器 2\" 插件!" + +#: ../gui/Plugin.c:385 +msgid "Error closing GPU plugin!" +msgstr "无法关闭 GPU 插件!" + +#: ../libpcsxcore/cdriso.c:658 +#, c-format +msgid "Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n" +msgstr "音轨 %.2d (%s) - 起始位置 %.2d:%.2d:%.2d, 长度 %.2d:%.2d:%.2d\n" + +#: ../libpcsxcore/cdriso.c:677 +#, c-format +msgid "Loaded CD Image: %s" +msgstr "已加载 CD 镜像: %s" + +#: ../libpcsxcore/cheat.c:147 +#, c-format +msgid "Cheats loaded from: %s\n" +msgstr "作弊码已加载: %s\n" + +#: ../libpcsxcore/cheat.c:179 +#, c-format +msgid "Cheats saved to: %s\n" +msgstr "作弊码己保存: %s\n" + +#: ../libpcsxcore/cheat.c:322 +#: ../libpcsxcore/cheat.c:443 +msgid "(Untitled)" +msgstr "(未命名)" + +#: ../libpcsxcore/debug.c:317 +msgid "Error allocating memory" +msgstr "分配内存错误" + +#: ../libpcsxcore/debug.c:322 +msgid "Unable to start debug server.\n" +msgstr "无法启动调试服务器。\n" + +#: ../libpcsxcore/debug.c:326 +msgid "Debugger started.\n" +msgstr "调试器已启动。\n" + +#: ../libpcsxcore/debug.c:333 +msgid "Debugger stopped.\n" +msgstr "调试器已停止。\n" + +#: ../libpcsxcore/misc.c:342 +#, c-format +msgid "CD-ROM Label: %.32s\n" +msgstr "CD-ROM 卷标: %.32s\n" + +#: ../libpcsxcore/misc.c:343 +#, c-format +msgid "CD-ROM ID: %.9s\n" +msgstr "CD-ROM ID: %.9s\n" + +#: ../libpcsxcore/misc.c:388 +#, c-format +msgid "Error opening file: %s.\n" +msgstr "打开文件错误: %s。\n" + +#: ../libpcsxcore/misc.c:428 +#, c-format +msgid "Unknown CPE opcode %02x at position %08x.\n" +msgstr "未知 CPE 指令码 %02x 位于 %08x。\n" + +#: ../libpcsxcore/misc.c:435 +msgid "COFF files not supported.\n" +msgstr "COFF 文件尚未支持。\n" + +#: ../libpcsxcore/misc.c:439 +msgid "This file does not appear to be a valid PSX file.\n" +msgstr "此文件不是一个合法的 PSX 文件。\n" + +#: ../libpcsxcore/plugins.c:181 +#, c-format +msgid "Error loading %s: %s" +msgstr "无法加载 %s: %s" + +#: ../libpcsxcore/plugins.c:221 +#, c-format +msgid "Could not load GPU plugin %s!" +msgstr "无法加载 GPU 插件 %s!" + +#: ../libpcsxcore/plugins.c:292 +#, c-format +msgid "Could not load CD-ROM plugin %s!" +msgstr "无法加载 CD-ROM 插件 %s!" + +#: ../libpcsxcore/plugins.c:340 +#, c-format +msgid "Could not load SPU plugin %s!" +msgstr "无法加载 SPU 插件 %s!" + +#: ../libpcsxcore/plugins.c:477 +#, c-format +msgid "Could not load Controller 1 plugin %s!" +msgstr "无法加载 \"控制器1\" 插件 %s!" + +#: ../libpcsxcore/plugins.c:531 +#, c-format +msgid "Could not load Controller 2 plugin %s!" +msgstr "无法加载 \"控制器2\" 插件 %s!" + +#: ../libpcsxcore/plugins.c:574 +#, c-format +msgid "Could not load NetPlay plugin %s!" +msgstr "无法加载联网游戏插件 %s!" + +#: ../libpcsxcore/plugins.c:654 +#, c-format +msgid "Could not load SIO1 plugin %s!" +msgstr "无法加载 SIO1 插件 %s!" + +#: ../libpcsxcore/plugins.c:739 +#, c-format +msgid "Error initializing CD-ROM plugin: %d" +msgstr "CD-ROM 插件初始化错误: %d" + +#: ../libpcsxcore/plugins.c:741 +#, c-format +msgid "Error initializing GPU plugin: %d" +msgstr "GPU 插件初始化错误: %d" + +#: ../libpcsxcore/plugins.c:743 +#, c-format +msgid "Error initializing SPU plugin: %d" +msgstr "SPU 插件初始化错误: %d" + +#: ../libpcsxcore/plugins.c:745 +#, c-format +msgid "Error initializing Controller 1 plugin: %d" +msgstr "\"控制器1\" 插件初始化错误: %d" + +#: ../libpcsxcore/plugins.c:747 +#, c-format +msgid "Error initializing Controller 2 plugin: %d" +msgstr "\"控制器2\" 插件初始化错误: %d" + +#: ../libpcsxcore/plugins.c:751 +#, c-format +msgid "Error initializing NetPlay plugin: %d" +msgstr "联网游戏插件初始化错误: %d" + +#: ../libpcsxcore/plugins.c:756 +#, c-format +msgid "Error initializing SIO1 plugin: %d" +msgstr "SIO1 插件初始化错误: %d" + +#: ../libpcsxcore/plugins.c:759 +msgid "Plugins loaded.\n" +msgstr "插件已加载。\n" + +#: ../libpcsxcore/ppf.c:216 +#, c-format +msgid "Invalid PPF patch: %s.\n" +msgstr "非法 PPF 补丁: %s。\n" + +#: ../libpcsxcore/ppf.c:292 +#, c-format +msgid "Unsupported PPF version (%d).\n" +msgstr "不支持的 PPF 补丁版本 (%d)。\n" + +#: ../libpcsxcore/ppf.c:331 +#, c-format +msgid "Loaded PPF %d.0 patch: %s.\n" +msgstr "已加载 PPF %d.0 补丁文件: %s。\n" + +#: ../libpcsxcore/psxmem.c:80 +msgid "Error allocating memory!" +msgstr "分配内存错误!" + +#: ../libpcsxcore/psxmem.c:122 +#, c-format +msgid "Could not open BIOS:\"%s\". Enabling HLE Bios!\n" +msgstr "无法打开 BIOS: \"%s\"。使用内部 HLE Bios。\n" + +#: ../libpcsxcore/r3000a.c:33 +#, c-format +msgid "Running PCSX Version %s (%s).\n" +msgstr "正在运行 PCSX 版本 %s (%s)。\n" + +#: ../libpcsxcore/sio.c:345 +msgid "Connection closed!\n" +msgstr "连接被关闭!\n" + +#: ../libpcsxcore/sio.c:371 +#, c-format +msgid "No memory card value was specified - creating a default card %s\n" +msgstr "未指定记忆卡 - 创建一个默认的记忆卡 %s\n" + +#: ../libpcsxcore/sio.c:375 +#, c-format +msgid "The memory card %s doesn't exist - creating it\n" +msgstr "记忆卡 %s 不存在 - 正在创建\n" + +#: ../libpcsxcore/sio.c:391 +#, c-format +msgid "Memory card %s failed to load!\n" +msgstr "记忆卡 %s 读取失败!\n" + +#: ../libpcsxcore/sio.c:395 +#, c-format +msgid "Loading memory card %s\n" +msgstr "加载记忆卡 %s\n" + +#: ../plugins/dfxvideo/gpu.c:55 +msgid "SoftGL Driver" +msgstr "SoftGL 驱动程序" + +#: ../plugins/dfxvideo/gpu.c:56 +msgid "" +"P.E.Op.S. SoftGL Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" +"P.E.Op.S SoftGL 驱动程序 V1.17\n" +"编写: Pete Bernert 以及 P.E.Op.S. 开发组\n" + +#: ../plugins/dfxvideo/gpu.c:58 +msgid "XVideo Driver" +msgstr "XVideo 驱动程序" + +#: ../plugins/dfxvideo/gpu.c:59 +msgid "" +"P.E.Op.S. Xvideo Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" +"P.E.Op.S XVideo 驱动程序 V1.17\n" +"编写: Pete Bernert 以及 P.E.Op.S. 开发组\n" + +#: ../plugins/dfxvideo/gpu.c:62 +msgid "Pete Bernert and the P.E.Op.S. team" +msgstr "Pete Bernert 及 P.E.Op.S. 开发组" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:8 +msgid "Configure X11 Video" +msgstr "配置 X11 视频" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:45 +msgid "Initial Window Size:" +msgstr "初始窗口大小:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:56 +msgid "Stretching:" +msgstr "拉抻:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:69 +msgid "Dithering:" +msgstr "抖动:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:82 +msgid "" +"320x240\n" +"640x480\n" +"800x600\n" +"1024x768\n" +"1152x864\n" +"1280x1024\n" +"1600x1200" +msgstr "" +"320x240\n" +"640x480\n" +"800x600\n" +"1024x768\n" +"1152x864\n" +"1280x1024\n" +"1600x1200" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:101 +msgid "" +"0: None\n" +"1: 2xSai\n" +"2: 2xSuperSai\n" +"3: SuperEagle\n" +"4: Scale2x\n" +"5: Scale3x\n" +"6: HQ2X\n" +"7: HQ3X" +msgstr "" +"0: 无\n" +"1: 2xSai\n" +"2: 2xSuperSai\n" +"3: SuperEagle\n" +"4: Scale2x\n" +"5: Scale3x\n" +"6: HQ2X\n" +"7: HQ3X" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:123 +msgid "" +"0: Off (fastest)\n" +"1: Game dependant\n" +"2: Always" +msgstr "" +"0: 关闭 (最快)\n" +"1: 取决于游戏\n" +"2: 总是" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:146 +msgid "Maintain 4:3 Aspect Ratio" +msgstr "维持 4:3 宽高比" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:161 +#: ../plugins/peopsxgl/gpucfg/interface.c:322 +msgid "Fullscreen" +msgstr "全屏" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:165 +msgid "Toggle windowed/fullscreen mode." +msgstr "切换窗口/全屏模式" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:187 +msgid "Screen" +msgstr "屏幕" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:216 +msgid "Show FPS" +msgstr "显示 FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:220 +msgid "Toggle whether the FPS will be shown." +msgstr "切换 FPS (每秒帧数) 是否将被显示。" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:232 +msgid "Autodetect FPS limit" +msgstr "自动检测 FPS 界限" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:236 +msgid "Enable this if games display too quickly." +msgstr "如果游戏运行得过快,请启用此项。" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:249 +msgid "Enable frame skipping" +msgstr "启用跳帧" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:253 +msgid "Skip frames when rendering." +msgstr "渲染时跳帧。" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:270 +msgid "Set FPS" +msgstr "设置 FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:287 +msgid "200.0" +msgstr "200.0" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:310 +msgid "Framerate" +msgstr "帧率" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:339 +#: ../plugins/peopsxgl/gpucfg/interface.c:568 +msgid "Use game fixes" +msgstr "使用特定游戏修正" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:366 +msgid "better g-colors, worse textures" +msgstr "较好的 g-colors, 较差的纹理" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:381 +msgid "Needed by Dark Forces" +msgstr "Dark Forces 运行需要" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:394 +msgid "Draw quads with triangles" +msgstr "使用三角形绘制 quad" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:410 +msgid "Repeated flat tex triangles" +msgstr "重复平滑多边形纹理" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:426 +msgid "Disable CPU Saving" +msgstr "禁用 CPU 保存" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:442 +msgid "Odd/even bit hack" +msgstr "奇/偶位 hack" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:458 +msgid "For precise framerate" +msgstr "精确帧率" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:473 +msgid "Better FPS limit in some" +msgstr "某些游戏中可取得较好的 FPS 界限值" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:486 +msgid "PC FPS calculation" +msgstr "PC FPS 计算" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:504 +msgid "Pandemonium 2" +msgstr "Pandemonium 2" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:517 +msgid "Lazy screen update" +msgstr "懒惰的屏幕更新" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:535 +msgid "Skip every second frame" +msgstr "每两帧跳过一帧" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:548 +#: ../plugins/peopsxgl/gpucfg/interface.c:640 +msgid "Old frame skipping" +msgstr "旧的跳帧方式" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:564 +msgid "Expand screen width" +msgstr "扩展屏幕宽度" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:580 +msgid "Ignore brightness color" +msgstr "忽略亮色" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:596 +msgid "Disable coordinate check" +msgstr "禁用坐标检查" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:614 +msgid "Chrono Cross" +msgstr "Chrono Cross" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:627 +msgid "Capcom fighting games" +msgstr "Capcom 格斗游戏" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:642 +msgid "Black screens in Lunar" +msgstr "Lunar 中黑屏" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:657 +msgid "Compatibility mode" +msgstr "兼容模式" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:670 +msgid "Fake 'gpu busy' states" +msgstr "欺骗 'gpu 忙' 状态" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:688 +msgid "Toggle busy flags after drawing" +msgstr "绘制后切换忙碌标志" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:713 +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:268 +msgid "Compatibility" +msgstr "兼容性" + +#: ../data/pcsx.glade2:7 +msgid "PCSX" +msgstr "PCSX" + +#: ../data/pcsx.glade2:21 +msgid "_File" +msgstr "文件(_F)" + +#: ../data/pcsx.glade2:27 +msgid "Run _CD" +msgstr "运行光盘(_C)" + +#: ../data/pcsx.glade2:45 +msgid "Run _ISO..." +msgstr "运行 _ISO..." + +#: ../data/pcsx.glade2:62 +msgid "Run _BIOS" +msgstr "运行 _BIOS" + +#: ../data/pcsx.glade2:79 +msgid "Run _EXE..." +msgstr "运行 _EXE..." + +#: ../data/pcsx.glade2:101 +msgid "E_xit" +msgstr "退出(_X)" + +#: ../data/pcsx.glade2:123 +msgid "_Emulator" +msgstr "模拟器(_E)" + +#: ../data/pcsx.glade2:129 +msgid "_Continue" +msgstr "继续(_C)" + +#: ../data/pcsx.glade2:146 +msgid "_Reset" +msgstr "复位(_R)" + +#: ../data/pcsx.glade2:168 +msgid "S_witch ISO..." +msgstr "更换 ISO(_W)..." + +#: ../data/pcsx.glade2:190 +msgid "_Save State" +msgstr "即时存档(_S)" + +#: ../data/pcsx.glade2:199 +#: ../data/pcsx.glade2:280 +msgid "Slot _1" +msgstr "存档 _1" + +#: ../data/pcsx.glade2:208 +#: ../data/pcsx.glade2:289 +msgid "Slot _2" +msgstr "存档 _2" + +#: ../data/pcsx.glade2:217 +#: ../data/pcsx.glade2:298 +msgid "Slot _3" +msgstr "存档 _3" + +#: ../data/pcsx.glade2:226 +#: ../data/pcsx.glade2:307 +msgid "Slot _4" +msgstr "存档 _4" + +#: ../data/pcsx.glade2:235 +#: ../data/pcsx.glade2:316 +msgid "Slot _5" +msgstr "存档 _5" + +#: ../data/pcsx.glade2:243 +#: ../data/pcsx.glade2:324 +msgid "_Other..." +msgstr "其它(_O)..." + +#: ../data/pcsx.glade2:271 +msgid "_Load State" +msgstr "即时读档(_L)" + +#: ../data/pcsx.glade2:357 +msgid "_Configuration" +msgstr "配置(_C)" + +#: ../data/pcsx.glade2:363 +msgid "_Plugins & BIOS..." +msgstr "插件及 BIOS(_P)..." + +#: ../data/pcsx.glade2:385 +msgid "_Graphics..." +msgstr "图像(_G)..." + +#: ../data/pcsx.glade2:400 +msgid "_Sound..." +msgstr "声音(_S)..." + +#: ../data/pcsx.glade2:415 +msgid "CD-_ROM..." +msgstr "CD-_ROM..." + +#: ../data/pcsx.glade2:430 +msgid "C_ontrollers..." +msgstr "控制器(_O)..." + +#: ../data/pcsx.glade2:450 +msgid "_CPU..." +msgstr "_CPU..." + +#: ../data/pcsx.glade2:466 +msgid "_Memory Cards..." +msgstr "记忆卡(_M)..." + +#: ../data/pcsx.glade2:483 +msgid "_Netplay..." +msgstr "联网游戏(_N)..." + +#: ../data/pcsx.glade2:504 +msgid "Chea_t" +msgstr "作弊码(_T)" + +#: ../data/pcsx.glade2:513 +msgid "_Browse..." +msgstr "浏览(_B)..." + +#: ../data/pcsx.glade2:528 +msgid "_Search..." +msgstr "查找(_S)..." + +#: ../data/pcsx.glade2:554 +msgid "Memory _Dump" +msgstr "内存转储(_D)" + +#: ../data/pcsx.glade2:574 +msgid "_Help" +msgstr "帮助(_H)" + +#: ../data/pcsx.glade2:580 +msgid "_About PCSX..." +msgstr "关于 PCSX(_A)..." + +#: ../data/pcsx.glade2:613 +#: ../data/pcsx.glade2:614 +msgid "Run CD" +msgstr "运行光碟" + +#: ../data/pcsx.glade2:626 +msgid "Run ISO Image" +msgstr "运行 ISO 光盘镜像" + +#: ../data/pcsx.glade2:627 +msgid "Run ISO..." +msgstr "运行 ISO..." + +#: ../data/pcsx.glade2:648 +msgid "Continue Emulation" +msgstr "继续模拟" + +#: ../data/pcsx.glade2:649 +msgid "Continue..." +msgstr "继续..." + +#: ../data/pcsx.glade2:661 +msgid "Switch ISO Image" +msgstr "更换 ISO 光盘镜像" + +#: ../data/pcsx.glade2:662 +msgid "Switch ISO..." +msgstr "更换 ISO..." + +#: ../data/pcsx.glade2:683 +#: ../data/pcsx.glade2:1810 +msgid "Configure Memory Cards" +msgstr "配置记忆卡" + +#: ../data/pcsx.glade2:684 +msgid "Memcards..." +msgstr "记忆卡..." + +#: ../data/pcsx.glade2:696 +msgid "Configure Graphics" +msgstr "配置图像" + +#: ../data/pcsx.glade2:697 +msgid "Graphics..." +msgstr "图像..." + +#: ../data/pcsx.glade2:709 +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:8 +msgid "Configure Sound" +msgstr "配置音频" + +#: ../data/pcsx.glade2:710 +msgid "Sound..." +msgstr "声音..." + +#: ../data/pcsx.glade2:722 +msgid "Configure CD-ROM" +msgstr "配置 CD-ROM" + +#: ../data/pcsx.glade2:723 +msgid "CD-ROM..." +msgstr "CD-ROM..." + +#: ../data/pcsx.glade2:735 +msgid "Configure Controllers" +msgstr "配置控制器" + +#: ../data/pcsx.glade2:736 +msgid "Controllers..." +msgstr "控制器..." + +#: ../data/pcsx.glade2:879 +msgid "Select Folder to Search" +msgstr "选择要查找的文件夹" + +#: ../data/pcsx.glade2:895 +msgid "Search in:" +msgstr "在此处查找插件:" + +#: ../data/pcsx.glade2:1168 +msgid "Graphics:" +msgstr "图像:" + +#: ../data/pcsx.glade2:1181 +msgid "Sound:" +msgstr "声音:" + +#: ../data/pcsx.glade2:1196 +msgid "Controller 1: " +msgstr "控制器 1:" + +#: ../data/pcsx.glade2:1211 +msgid "Controller 2:" +msgstr "控制器 2:" + +#: ../data/pcsx.glade2:1226 +msgid "CD-ROM:" +msgstr "CD-ROM:" + +#: ../data/pcsx.glade2:1264 +msgid "Plugins" +msgstr "插件" + +#: ../data/pcsx.glade2:1325 +msgid "BIOS" +msgstr "BIOS" + +#: ../data/pcsx.glade2:1375 +msgid "Configure CPU" +msgstr "配置 CPU" + +#: ../data/pcsx.glade2:1419 +msgid "SPU IRQ Always Enabled" +msgstr "SPU IRQ 总是启用" + +#: ../data/pcsx.glade2:1435 +msgid "Black & White Movies" +msgstr "黑白电影" + +#: ../data/pcsx.glade2:1469 +msgid "Enable Interpreter CPU" +msgstr "启用解释执行 CPU" + +#: ../data/pcsx.glade2:1503 +msgid "Disable CD Audio" +msgstr "禁用 CD 音频" + +#: ../data/pcsx.glade2:1519 +msgid "Disable XA Decoding" +msgstr "禁用 XA 解码" + +#: ../data/pcsx.glade2:1571 +msgid "Options" +msgstr "选项" + +#: ../data/pcsx.glade2:1612 +msgid "" +"NTSC\n" +"PAL" +msgstr "" +"NTSC\n" +"PAL" + +#: ../data/pcsx.glade2:1626 +msgid "System Type" +msgstr "系统类型" + +#: ../data/pcsx.glade2:1674 +msgid "Configure NetPlay" +msgstr "配置联网游戏" + +#: ../data/pcsx.glade2:1760 +msgid "NetPlay" +msgstr "联网游戏" + +#: ../data/pcsx.glade2:1886 +#: ../data/pcsx.glade2:2283 +msgid "New" +msgstr "新建" + +#: ../data/pcsx.glade2:1936 +#: ../data/pcsx.glade2:2333 +msgid "Format" +msgstr "格式化" + +#: ../data/pcsx.glade2:1986 +#: ../data/pcsx.glade2:2383 +msgid "Un/Delete" +msgstr "删除/恢复" + +#: ../data/pcsx.glade2:2079 +msgid "Memory Card 1" +msgstr "记忆卡 1" + +#: ../data/pcsx.glade2:2139 +#: ../data/pcsx.glade2:2189 +#: ../data/pcsx.glade2:3002 +msgid "Copy" +msgstr "复制" + +#: ../data/pcsx.glade2:2476 +msgid "Memory Card 2" +msgstr "记忆卡 2" + +#: ../data/pcsx.glade2:2572 +msgid "Cheat Codes" +msgstr "作弊码" + +#: ../data/pcsx.glade2:2736 +msgid "" +"8-bit\n" +"16-bit\n" +"32-bit" +msgstr "" +"8 位\n" +"16 位\n" +"32 位" + +#: ../data/pcsx.glade2:2799 +msgid "" +"Equal Value\n" +"Not Equal Value\n" +"Range\n" +"Increased By\n" +"Decreased By\n" +"Increased\n" +"Decreased\n" +"Different\n" +"No Change" +msgstr "" +"等于数值\n" +"不等于数值\n" +"范围\n" +"增加数值\n" +"减少数值\n" +"增加\n" +"减少\n" +"改变\n" +"无改变" + +#: ../data/pcsx.glade2:2831 +msgid "" +"Decimal\n" +"Hexadecimal" +msgstr "" +"十进制\n" +"十六进制" + +#: ../data/pcsx.glade2:3035 +msgid "label_resultsfound" +msgstr "label_resultsfound" + +#: ../data/pcsx.glade2:3070 +msgid "Search" +msgstr "查找" + +#: ../data/pcsx.glade2:3106 +msgid "Restart" +msgstr "复位" + +#: ../data/pcsx.glade2:3135 +msgid "Cheat Search" +msgstr "作弊码查找" + +#: ../data/pcsx.glade2:3291 +msgid "Raw Dump..." +msgstr "Raw 转储..." + +#: ../data/pcsx.glade2:3326 +msgid "Patch Memory..." +msgstr "修改内存..." + +#: ../plugins/dfsound/spu.c:38 +msgid "Mac OS X Sound" +msgstr "Mac OS X 声音" + +#: ../plugins/dfsound/spu.c:40 +msgid "ALSA Sound" +msgstr "ALSA 声音" + +#: ../plugins/dfsound/spu.c:42 +msgid "OSS Sound" +msgstr "OSS 声音" + +#: ../plugins/dfsound/spu.c:44 +msgid "SDL Sound" +msgstr "SDL 声音" + +#: ../plugins/dfsound/spu.c:46 +msgid "PulseAudio Sound" +msgstr "PulseAudio 声音" + +#: ../plugins/dfsound/spu.c:48 +msgid "NULL Sound" +msgstr "空声音" + +#: ../plugins/dfsound/spu.c:51 +msgid "" +"P.E.Op.S. Sound Driver V1.7\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" +"P.E.Op.S 声音驱动程序 V1.7\n" +"编写: Pete Bernert 以及 P.E.Op.S. 开发组\n" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:42 +msgid "Volume:" +msgstr "音量:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:54 +msgid "Interpolation:" +msgstr "插值:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:68 +msgid "Reverb:" +msgstr "回响:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:81 +msgid "" +"Low\n" +"Medium\n" +"Loud\n" +"Loudest" +msgstr "" +"低\n" +"中\n" +"高\n" +"最高" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:95 +msgid "" +"Off\n" +"Simple\n" +"Playstation" +msgstr "" +"关\n" +"简易\n" +"Playstation" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:111 +msgid "" +"None\n" +"Simple\n" +"Gaussian\n" +"Cubic" +msgstr "" +"无\n" +"简易\n" +"高斯\n" +"立方" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:132 +msgid "General" +msgstr "一般" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:163 +msgid "Adjust XA speed" +msgstr "调整 XA 速度" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:167 +msgid "Choose this if XA music is played too quickly." +msgstr "如 XA 音乐播放得太快,请选择此项。" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:184 +msgid "XA Music" +msgstr "XA 音乐" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:215 +msgid "High compatibility mode" +msgstr "高兼容性模式" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:219 +msgid "Use the asynchronous SPU interface." +msgstr "使用异步 SPU 接口。" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:231 +msgid "SPU IRQ Wait" +msgstr "SPU IRQ 等待" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:235 +msgid "Wait for CPU; only useful for some games." +msgstr "等待 CPU; 仅在部分游戏中有用处。" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:247 +msgid "Single channel sound" +msgstr "单声道" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:251 +msgid "Play only one channel for a performance boost." +msgstr "仅播放一个声道以提升性能。" + +#: ../plugins/dfcdrom/cdr-libcdio.c:29 +#: ../plugins/dfcdrom/cdr-linux.c:29 +msgid "CD-ROM Drive Reader" +msgstr "CD-ROM 设备读取插件" + +#: ../plugins/dfcdrom/cdr-null.c:26 +msgid "CDR NULL Plugin" +msgstr "CDR 空插件" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/main.c:219 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:8 +msgid "CDR configuration" +msgstr "CDR 配置" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:33 +msgid "Choose your CD-ROM device or type its path if it's not listed" +msgstr "请选择您的 CD-ROM 设备或直接输入设备路径" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:44 +msgid "Select CD-ROM device" +msgstr "选择 CD-ROM 设备" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:72 +msgid "Select read mode:" +msgstr "选择读取模式:" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:83 +msgid "" +"Normal (No Cache)\n" +"Threaded - Faster (With Cache)" +msgstr "" +"正常 (无缓存)\n" +"多线程 - 较快 (使用缓存)" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:114 +msgid "Cache Size (Def. 64):" +msgstr "缓存大小 (默认为 64):" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:159 +msgid "Spindown Time:" +msgstr "电机停转时限:" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:170 +msgid "" +"Default\n" +"125ms\n" +"250ms\n" +"500ms\n" +"1s\n" +"2s\n" +"4s\n" +"8s\n" +"16s\n" +"32s\n" +"1min\n" +"2min\n" +"4min\n" +"8min\n" +"16min\n" +"32min" +msgstr "" +"默认\n" +"125 毫秒\n" +"250 毫秒\n" +"500 毫秒\n" +"1 秒\n" +"2 秒\n" +"4 秒\n" +"8 秒\n" +"16 秒\n" +"32 秒\n" +"1 分钟\n" +"2 分钟\n" +"4 分钟\n" +"8 分钟\n" +"16 分钟\n" +"32 分钟" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:216 +msgid "Cdrom Speed (Def. 0 = MAX):" +msgstr "光驱速度 (默认 0 为最大速度):" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:248 +msgid "hseparator" +msgstr "hseparator" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:258 +msgid "Enable subchannel read" +msgstr "启用子通道读取" + +#: ../plugins/peopsxgl/gpu.c:61 +msgid "OpenGL Driver" +msgstr "OpenGL 驱动程序" + +#: ../plugins/peopsxgl/gpu.c:63 +msgid "Pete Bernert" +msgstr "Pete Bernert" + +#: ../plugins/peopsxgl/gpu.c:64 +msgid "" +"Based on P.E.Op.S. MesaGL Driver V1.78\n" +"Coded by Pete Bernert\n" +msgstr "" +"基于 P.E.Op.S MesaGL 驱动程序 V1.78\n" +"作者: Pete Bernert\n" + +#: ../plugins/peopsxgl/gpucfg/interface.c:118 +msgid "OpenGL Driver configuration" +msgstr "OpenGL 驱动程序配置" + +#: ../plugins/peopsxgl/gpucfg/interface.c:138 +msgid "Textures" +msgstr "纹理" + +#: ../plugins/peopsxgl/gpucfg/interface.c:161 +msgid "Quality:" +msgstr "质量:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:178 +#: ../plugins/peopsxgl/gpucfg/interface.c:191 +msgid "0: don't care - Use driver's default textures" +msgstr "0: 使用驱动程序的默认纹理" + +#: ../plugins/peopsxgl/gpucfg/interface.c:179 +msgid "1: 4444 - Fast, but less colorful" +msgstr "1: 4444 - 较快,较少颜色" + +#: ../plugins/peopsxgl/gpucfg/interface.c:180 +msgid "2: 5551 - Nice colors, bad transparency" +msgstr "2: 5551 - 较好的颜色,较差的透明效果" + +#: ../plugins/peopsxgl/gpucfg/interface.c:181 +msgid "3: 8888 - Best colors, more ram needed" +msgstr "3: 8888 - 最佳的颜色,需更多内存" + +#: ../plugins/peopsxgl/gpucfg/interface.c:182 +msgid "4: BGR8888 - Faster on some cards" +msgstr "4: BGR8888 - 某些显卡较快" + +#: ../plugins/peopsxgl/gpucfg/interface.c:193 +msgid "VRam size in MBytes (0..1024, 0=auto):" +msgstr "显存大小,以 MB 为单位 (0..1024, 0=自动):" + +#: ../plugins/peopsxgl/gpucfg/interface.c:210 +#: ../plugins/peopsxgl/gpucfg/interface.c:225 +msgid "0: None" +msgstr "0: 无" + +#: ../plugins/peopsxgl/gpucfg/interface.c:211 +msgid "1: Standard - Glitches will happen" +msgstr "1: 标准 - 可能会发生问题" + +#: ../plugins/peopsxgl/gpucfg/interface.c:212 +msgid "2: Extended - No black borders" +msgstr "2: 增强 - 去除黑框" + +#: ../plugins/peopsxgl/gpucfg/interface.c:213 +msgid "3: Standard without sprites - unfiltered 2D" +msgstr "3: 标准,不含贴图 - 未过滤的 2D" + +#: ../plugins/peopsxgl/gpucfg/interface.c:214 +msgid "4: Extended without sprites - unfiltered 2D" +msgstr "4: 增强,不含贴图 - 未过滤的 2D" + +#: ../plugins/peopsxgl/gpucfg/interface.c:215 +msgid "5: Standard + smoothed sprites" +msgstr "5: 标准 + 平滑贴图" + +#: ../plugins/peopsxgl/gpucfg/interface.c:216 +msgid "6: Extended + smoothed sprites" +msgstr "6: 增强 + 平滑贴图" + +#: ../plugins/peopsxgl/gpucfg/interface.c:227 +msgid "Filtering:" +msgstr "过滤:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:235 +msgid "HiRes Tex:" +msgstr "高分纹理:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:252 +#: ../plugins/peopsxgl/gpucfg/interface.c:263 +msgid "0: None (standard)" +msgstr "0: 无 (标准)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:253 +msgid "1: 2xSaI (much vram needed)" +msgstr "1: 2xSaI (需较多显存)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:254 +msgid "2: Scaled (needs tex filtering)" +msgstr "2: 拉伸 (需要纹理过滤)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:265 +msgid "Window options" +msgstr "窗口选项" + +#: ../plugins/peopsxgl/gpucfg/interface.c:296 +msgid "Width:" +msgstr "宽度:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:305 +msgid "Height:" +msgstr "高度" + +#: ../plugins/peopsxgl/gpucfg/interface.c:314 +msgid "Keep psx aspect ratio" +msgstr "保持 psx 纵横比" + +#: ../plugins/peopsxgl/gpucfg/interface.c:330 +msgid "Dithering" +msgstr "抖动" + +#: ../plugins/peopsxgl/gpucfg/interface.c:346 +msgid "Framerate" +msgstr "帧率" + +#: ../plugins/peopsxgl/gpucfg/interface.c:369 +msgid "FPS" +msgstr "FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:377 +msgid "FPS limit manual" +msgstr "手动设置 FPS 界限" + +#: ../plugins/peopsxgl/gpucfg/interface.c:386 +msgid "Show FPS display on startup" +msgstr "启动时显示 FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:394 +msgid "Use FPS limit" +msgstr "启用 FPS 界限" + +#: ../plugins/peopsxgl/gpucfg/interface.c:402 +msgid "FPS limit auto-detection" +msgstr "FPS 界限自动检测" + +#: ../plugins/peopsxgl/gpucfg/interface.c:411 +msgid "Use Frame skipping" +msgstr "启用跳帧" + +#: ../plugins/peopsxgl/gpucfg/interface.c:419 +msgid "Compatibility" +msgstr "兼容性" + +#: ../plugins/peopsxgl/gpucfg/interface.c:434 +msgid "Advanced blending (Accurate psx color emulation)" +msgstr "高级混合 (精确的 psx 色彩模拟)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:442 +msgid "Framebuffer textures:" +msgstr "帧缓冲纹理:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:450 +msgid "Offscreen Drawing:" +msgstr "离屏描绘:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:458 +msgid "Framebuffer access:" +msgstr "帧缓冲访问:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:466 +msgid "Alpha Multipass (correct opaque texture areas)" +msgstr "半透明多通道 (更正不透明的纹理区域)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:474 +msgid "Mask bit detection (needed by a few games, zbuffer)" +msgstr "屏蔽位检测 (某些游戏需要)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:491 +#: ../plugins/peopsxgl/gpucfg/interface.c:504 +msgid "0: None - Fastest, most glitches" +msgstr "0: 无 - 最快,问题较多" + +#: ../plugins/peopsxgl/gpucfg/interface.c:492 +msgid "1: Minimum - Missing screens" +msgstr "1: 最小 - 丢失屏幕元素" + +#: ../plugins/peopsxgl/gpucfg/interface.c:493 +msgid "2: Standard - OK for most games" +msgstr "2: 标准 - 大多数游戏运行良好" + +#: ../plugins/peopsxgl/gpucfg/interface.c:494 +msgid "3: Enhanced - Shows more stuff" +msgstr "3: 增强 - 显示更多的东西" + +#: ../plugins/peopsxgl/gpucfg/interface.c:495 +msgid "4: Extended - Causing garbage" +msgstr "4: 增强 - 可能导致错误" + +#: ../plugins/peopsxgl/gpucfg/interface.c:515 +#: ../plugins/peopsxgl/gpucfg/interface.c:527 +msgid "0: Emulated vram - Needs FVP" +msgstr "0: 模拟 vram - 需 FVP" + +#: ../plugins/peopsxgl/gpucfg/interface.c:516 +msgid "1: Black - Fast, no effects" +msgstr "1: 黑色 - 快,无特效" + +#: ../plugins/peopsxgl/gpucfg/interface.c:517 +msgid "2: Gfx card buffer - Can be slow" +msgstr "2: Gfx 卡缓存 - 可能较慢" + +#: ../plugins/peopsxgl/gpucfg/interface.c:518 +msgid "3: Gfx card & soft - slow" +msgstr "3: Gfx 卡缓存与软件 - 较慢" + +#: ../plugins/peopsxgl/gpucfg/interface.c:538 +#: ../plugins/peopsxgl/gpucfg/interface.c:551 +msgid "0: Emulated vram - ok most times" +msgstr "0: 模拟 vram - 大多数情况运行良好" + +#: ../plugins/peopsxgl/gpucfg/interface.c:539 +msgid "1: Gfx card buffer reads" +msgstr "1: Gfx 卡缓存读取" + +#: ../plugins/peopsxgl/gpucfg/interface.c:540 +msgid "2: Gfx card buffer moves" +msgstr "2: Gfx 卡缓存移动" + +#: ../plugins/peopsxgl/gpucfg/interface.c:541 +msgid "3: Gfx buffer reads & moves" +msgstr "3: Gfx 卡缓存读取与移动" + +#: ../plugins/peopsxgl/gpucfg/interface.c:542 +msgid "4: Full Software (FVP)" +msgstr "4: 纯软件 (FVP)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:553 +msgid "Special game fixes" +msgstr "特定游戏修正" + +#: ../plugins/peopsxgl/gpucfg/interface.c:576 +msgid "Battle cursor (FF7)" +msgstr "战斗光标 (FF7)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:584 +msgid "Direct FB updates" +msgstr "直接 FB 更新" + +#: ../plugins/peopsxgl/gpucfg/interface.c:592 +msgid "Black brightness (Lunar)" +msgstr "黑色亮度 (Lunar)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:600 +msgid "Swap front detection" +msgstr "Swap front 检测" + +#: ../plugins/peopsxgl/gpucfg/interface.c:608 +msgid "Disable coord check" +msgstr "禁用坐标检查" + +#: ../plugins/peopsxgl/gpucfg/interface.c:616 +msgid "No blue glitches (LoD)" +msgstr "去除蓝色干扰 (LoD)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:624 +msgid "Soft FB access" +msgstr "软件 FB 访问" + +#: ../plugins/peopsxgl/gpucfg/interface.c:632 +msgid "PC fps calculation" +msgstr "PC FPS 计算" + +#: ../plugins/peopsxgl/gpucfg/interface.c:648 +msgid "Yellow rect (FF9)" +msgstr "黄色方块 (FF9)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:656 +msgid "No subtr. blending" +msgstr "无 subtr. 混合" + +#: ../plugins/peopsxgl/gpucfg/interface.c:664 +msgid "Lazy upload (DW7)" +msgstr "懒惰上传 (DW7)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:672 +msgid "Odd/even hack" +msgstr "奇/偶位 hack" + +#: ../plugins/peopsxgl/gpucfg/interface.c:680 +msgid "Adjust screen width" +msgstr "调整屏幕宽度" + +#: ../plugins/peopsxgl/gpucfg/interface.c:688 +msgid "Old texture filtering" +msgstr "旧的纹理过滤" + +#: ../plugins/peopsxgl/gpucfg/interface.c:696 +msgid "Additional uploads" +msgstr "附加上传" + +#: ../plugins/peopsxgl/gpucfg/interface.c:704 +msgid "unused" +msgstr "未使用" + +#: ../plugins/peopsxgl/gpucfg/interface.c:712 +msgid "Fake 'gpu busy'" +msgstr "欺骗 'gpu 忙' 状态" + +#: ../plugins/peopsxgl/gpucfg/interface.c:720 +msgid "Misc" +msgstr "杂项" + +#: ../plugins/peopsxgl/gpucfg/interface.c:743 +msgid "Scanlines" +msgstr "扫描线" + +#: ../plugins/peopsxgl/gpucfg/interface.c:751 +msgid "Blending (0..255, -1=dot):" +msgstr "混合 (0..255, -1=点阵):" + +#: ../plugins/peopsxgl/gpucfg/interface.c:759 +msgid "Screen smoothing (can be slow or unsupported)" +msgstr "屏幕平滑 (可能较慢或不被支持)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:767 +msgid "Use OpenGL extensions (recommended)" +msgstr "使用 OpenGL 扩展 (推荐)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:775 +msgid "Polygon anti-aliasing (slow with most cards)" +msgstr "多边形抗锯齿 (对大多数显卡较慢)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:783 +msgid "Line mode (polygons will not get filled)" +msgstr "框架模式 (不填充多边形)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:791 +msgid "Force 15 bit framebuffer updates (faster movies)" +msgstr "强制 15 位帧缓冲更新 (影片较快)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:799 +msgid "Unfiltered MDECs (small movie speedup)" +msgstr "非过滤 MDEC (微小的影片加速)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:852 +msgid "Adapted from P.E.Op.S OpenGL GPU by Pete Bernert" +msgstr "基于 Pete Bernert 的 P.E.Op.S OpenGL GPU" + +#: ../plugins/peopsxgl/gpucfg/interface.c:861 +msgid "Homepage: http://www.pbernert.com" +msgstr "主页: http://www.pbernert.com" + +#: ../plugins/peopsxgl/gpucfg/interface.c:879 +msgid "Version: 1.78" +msgstr "版本: 1.78" + +#: ../plugins/dfinput/cfg-gtk2.c:48 +msgid "D-Pad Up" +msgstr "方向键上" + +#: ../plugins/dfinput/cfg-gtk2.c:49 +msgid "D-Pad Down" +msgstr "方向键下" + +#: ../plugins/dfinput/cfg-gtk2.c:50 +msgid "D-Pad Left" +msgstr "方向键左" + +#: ../plugins/dfinput/cfg-gtk2.c:51 +msgid "D-Pad Right" +msgstr "方向键右" + +#: ../plugins/dfinput/cfg-gtk2.c:52 +msgid "Cross" +msgstr "叉号键" + +#: ../plugins/dfinput/cfg-gtk2.c:53 +msgid "Circle" +msgstr "圆圈键" + +#: ../plugins/dfinput/cfg-gtk2.c:54 +msgid "Square" +msgstr "方块键" + +#: ../plugins/dfinput/cfg-gtk2.c:55 +msgid "Triangle" +msgstr "三角键" + +#: ../plugins/dfinput/cfg-gtk2.c:56 +msgid "L1" +msgstr "L1" + +#: ../plugins/dfinput/cfg-gtk2.c:57 +msgid "R1" +msgstr "R1" + +#: ../plugins/dfinput/cfg-gtk2.c:58 +msgid "L2" +msgstr "L2" + +#: ../plugins/dfinput/cfg-gtk2.c:59 +msgid "R2" +msgstr "R2" + +#: ../plugins/dfinput/cfg-gtk2.c:60 +msgid "Select" +msgstr "选择键" + +#: ../plugins/dfinput/cfg-gtk2.c:61 +msgid "Start" +msgstr "开始键" + +#: ../plugins/dfinput/cfg-gtk2.c:62 +msgid "L3" +msgstr "L3" + +#: ../plugins/dfinput/cfg-gtk2.c:63 +msgid "R3" +msgstr "R3" + +#: ../plugins/dfinput/cfg-gtk2.c:67 +msgid "L-Stick Right" +msgstr "左摇杆右方向" + +#: ../plugins/dfinput/cfg-gtk2.c:68 +msgid "L-Stick Left" +msgstr "左摇杆左方向" + +#: ../plugins/dfinput/cfg-gtk2.c:69 +msgid "L-Stick Down" +msgstr "左摇杆下方向" + +#: ../plugins/dfinput/cfg-gtk2.c:70 +msgid "L-Stick Up" +msgstr "左摇杆上方向" + +#: ../plugins/dfinput/cfg-gtk2.c:71 +msgid "R-Stick Right" +msgstr "右摇杆右方向" + +#: ../plugins/dfinput/cfg-gtk2.c:72 +msgid "R-Stick Left" +msgstr "右摇杆左方向" + +#: ../plugins/dfinput/cfg-gtk2.c:73 +msgid "R-Stick Down" +msgstr "右摇杆下方向" + +#: ../plugins/dfinput/cfg-gtk2.c:74 +msgid "R-Stick Up" +msgstr "右摇杆上方向" + +#: ../plugins/dfinput/cfg-gtk2.c:103 +#: ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Centered" +msgstr "居中" + +#: ../plugins/dfinput/cfg-gtk2.c:103 +#: ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Up" +msgstr "上" + +#: ../plugins/dfinput/cfg-gtk2.c:103 +#: ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Right" +msgstr "右方向键" + +#: ../plugins/dfinput/cfg-gtk2.c:103 +#: ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Rightup" +msgstr "右上" + +#: ../plugins/dfinput/cfg-gtk2.c:104 +#: ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Down" +msgstr "下" + +#: ../plugins/dfinput/cfg-gtk2.c:104 +#: ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Rightdown" +msgstr "右下" + +#: ../plugins/dfinput/cfg-gtk2.c:104 +#: ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Left" +msgstr "å·¦" + +#: ../plugins/dfinput/cfg-gtk2.c:104 +#: ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Leftup" +msgstr "左上" + +#: ../plugins/dfinput/cfg-gtk2.c:105 +#: ../plugins/dfinput/cfg-gtk2.c:144 +msgid "Leftdown" +msgstr "左下" + +#: ../plugins/dfinput/cfg-gtk2.c:109 +#: ../plugins/dfinput/cfg-gtk2.c:148 +#, c-format +msgid "Joystick: Button %d" +msgstr "手柄: 按钮 %d" + +#: ../plugins/dfinput/cfg-gtk2.c:113 +#: ../plugins/dfinput/cfg-gtk2.c:152 +#, c-format +msgid "Joystick: Axis %d%c" +msgstr "手柄: è½´ %d%c" + +#: ../plugins/dfinput/cfg-gtk2.c:118 +#: ../plugins/dfinput/cfg-gtk2.c:157 +#, c-format +msgid "Joystick: Hat %d %s" +msgstr "Joystick: 操纵杆 %d %s" + +#: ../plugins/dfinput/cfg-gtk2.c:133 +#: ../plugins/dfinput/cfg-gtk2.c:172 +msgid "Keyboard:" +msgstr "键盘:" + +#: ../plugins/dfinput/cfg-gtk2.c:137 +#: ../plugins/dfinput/cfg-gtk2.c:176 +msgid "(Not Set)" +msgstr "(未设定)" + +#: ../plugins/dfinput/cfg-gtk2.c:539 +msgid "None" +msgstr "无" + +#: ../plugins/dfinput/cfg-gtk2.c:581 +msgid "Gamepad/Keyboard Input Configuration" +msgstr "手柄/键盘输入配置" + +#: ../plugins/dfinput/cfg-gtk2.c:587 +#: ../plugins/dfinput/cfg-gtk2.c:607 +msgid "Key" +msgstr "按钮" + +#: ../plugins/dfinput/cfg-gtk2.c:593 +#: ../plugins/dfinput/cfg-gtk2.c:613 +msgid "Button" +msgstr "按键" + +#: ../plugins/dfinput/pad.c:22 +msgid "Gamepad/Keyboard Input" +msgstr "手柄/键盘输入" + +#: ../plugins/dfinput/dfinput.glade2:35 +#: ../plugins/dfinput/dfinput.glade2:232 +msgid "Device:" +msgstr "设备:" + +#: ../plugins/dfinput/dfinput.glade2:66 +#: ../plugins/dfinput/dfinput.glade2:263 +msgid "Type:" +msgstr "类型:" + +#: ../plugins/dfinput/dfinput.glade2:78 +#: ../plugins/dfinput/dfinput.glade2:275 +msgid "" +"Digital Pad\n" +"Analog Pad" +msgstr "" +"普通手柄\n" +"摇杆手柄" + +#: ../plugins/dfinput/dfinput.glade2:149 +#: ../plugins/dfinput/dfinput.glade2:346 +msgid "Change" +msgstr "更改" + +#: ../plugins/dfinput/dfinput.glade2:185 +#: ../plugins/dfinput/dfinput.glade2:382 +msgid "Reset" +msgstr "重置" + +#: ../plugins/dfinput/dfinput.glade2:210 +msgid "Controller 1" +msgstr "控制器 1" + +#: ../plugins/dfinput/dfinput.glade2:412 +msgid "Controller 2" +msgstr "控制器 2" + +#: ../plugins/dfinput/dfinput.glade2:427 +msgid "Multi-Threaded (Recommended)" +msgstr "多线程 (推荐)" + +#: ../plugins/dfnet/dfnet.c:23 +msgid "Socket Driver" +msgstr "套接字驱动程序" + +#: ../plugins/dfnet/dfnet.c:161 +#, c-format +msgid "error connecting to %s: %s\n" +msgstr "无法连接到 %s: %s\n" + +#: ../plugins/dfnet/dfnet.c:186 +msgid "Error allocating memory!\n" +msgstr "分配内存错误!\n" + +#: ../plugins/dfnet/gui.c:39 +msgid "Nothing to configure" +msgstr "没有可以配置的项目" + +#: ../plugins/dfnet/gui.c:95 +#, c-format +msgid "IP %s" +msgstr "IP %s" + +#: ../plugins/dfnet/gui.c:165 +msgid "Waiting for connection..." +msgstr "正在等待连接..." + +#: ../plugins/dfnet/gui.c:168 +msgid "The Client should now Start a Connection, waiting..." +msgstr "客户端应在此时发起连接,等待中..." + +#: ../plugins/dfnet/dfnet.glade2:23 +msgid "" +"Select here if you'll be Server (Player1) or Client (Player2).\n" +"\n" +"If you select Server you must Copy your IP address to the Clipboard and paste if (Ctrl+V) wherever the Client can see it.\n" +"\n" +"If you selected Client please enter the IP address the Server gave to you in the IP Address Control." +msgstr "" +"请在此选择作为服务器 (玩家 1) 还是作为客户端 (玩家 2) 来运行。\n" +"\n" +"如果您选择作为服务器,您必须复制本机 IP 地址到剪贴板并将此信息告知客户端。\n" +"\n" +"如果您选择作为客户端,请输入服务器方提供给您的 IP 地址。" + +#: ../plugins/dfnet/dfnet.glade2:63 +msgid "Copy PC IP to Clipboard" +msgstr "将本机 IP 复制到剪贴板" + +#: ../plugins/dfnet/dfnet.glade2:94 +msgid "Server (Player1)" +msgstr "服务器 (玩家 1)" + +#: ../plugins/dfnet/dfnet.glade2:104 +msgid "Client (Player2)" +msgstr "客户端 (玩家 2)" + +#: ../plugins/dfnet/dfnet.glade2:130 +msgid "Do not change if not necessary (remember it must be changed on both sides)." +msgstr "如非必要,请勿改动 (必须在两端都要改动)。" + +#: ../plugins/dfnet/dfnet.glade2:143 +msgid "Port Number" +msgstr "端口号" + +#: ../plugins/dfnet/dfnet.glade2:202 +msgid "Start Game" +msgstr "开始游戏" + +#: ../plugins/dfnet/dfnet.glade2:240 +msgid "Play Offline" +msgstr "离线运行" + +#: ../plugins/bladesio1/sio1.c:29 +msgid "Sio1 Driver" +msgstr "Sio1 驱动程序" + diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo new file mode 100644 index 0000000000000000000000000000000000000000..95bd0d4e56b7d3ce141446e856372407bad45947 GIT binary patch literal 43245 zcmeI5cYIvMx%W?i0A2_XT0($uC>9b}vLxGJM78A#Zb)uaWvyLFizThlu3Sh$TyeJy zxPl8d#@GfoihF_Nrjky|B|R7KO1cRly_fgd!gr5o$7gu^X2M!XWrm>x4zHwdcfY;hu&y8)$w`Q1NZMb z{uG{${b%qT_-lABd|!Xhdq4aj48adUy>}Iqe=p~M3p@k+KzKI1)45N83jct!*TOTg zH^B4Y6sY&+!LwkiV=r{P3w{WD%yA~X82cK>-B9m;9$p30 zQ2F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ztCPHD#xN%O+;hj;T6ehFx6K@0cPEyt-igCR?B=ua#bl#uShI{9quq@?YS0@On*M4g z5t-Uw-N$qyCB?cK3>P^XKXfs6u5o(Dwna12a~F9W|4J`BROThJcTxjwaAx4@JS}7g zH06qeU2GT|)5>`Wxt^Qk7;WtIqOsntN)Nx9vntIw&}YM`a-Gm;rck%jl07zpN>GEq zyag^BGoEF9q$9BgX6U7Hnndi_OdCCZXm9qjGZvlXvt}eP(pN?o!&JhHs@1hyS?D_@ zl3DJvtbbZdUD}F07fE7sRRyGD|9SweLCBPu+*>CQ#Qql>c*SH0uA)rP0jA z-v4hdjdH?4N4Pm)fL7U@J4hW}oSHum>53hwwoM$cVnMT*ZCp8-{VRK-)ovcx=}f)C z2C!QKy)#=hRy;7h#;6dr%fI<4JCe$^{Se3Fo@B2lds8$s*dopwkK7BRP8r_y!YExd zJC)jV6lMfBXP}Y)JDv9KWYdv-H$WPdfIaY#5dcV|*_p6vu;9{Y>gZ06MoL3xHqp?B zbGi{xaqV_wl@o4_l3UJ7bA!}e7}ZE+PGw5=k@npx-ksE~0|VxpTBM{7&(K}1?7m`f z+QO>ooOZ)$+uYgvF6v~B>MJ&6WMYdUT_eOO*M{7wtujpSSfA{dyEbo~T z7}Rr>{t}2dk-b7=whPYTKV~I28QCM=%=l*a$qwJTC`#hp@nUPSS@+z%(N0oC$D!Fe z0&Zq{cYTyboqNMwl3$g*YE`AHR`z~X zRj2z^Rk~kgE>&4MDZfg$tb%DUzsg>wYR@@TnO|jZP`Nu(!C~Fbcc!ZBohf8#Eu^b5 zm!pD@a1F{XVe+f&iCHU3Wo+ogpF5(a8C*P-P>th0&C*T^vHitX3IhjAD|@i+zvJ3z Q&OfAf@{5@2X|AFEFV+HUMF0Q* literal 0 HcmV?d00001 diff --git a/po/zh_TW.po b/po/zh_TW.po new file mode 100644 index 00000000..e24620e1 --- /dev/null +++ b/po/zh_TW.po @@ -0,0 +1,3189 @@ +# Traditional Chinese translation of pcsxr. +# Copyright (C) 2008 Wei Mingzhi +# This file is distributed under the same license as the pcsxr package. +# Wei Mingzhi , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: pcsxr 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-07-10 14:04+0800\n" +"PO-Revision-Date: 2010-07-10 14:06+0700\n" +"Last-Translator: Wei Mingzhi \n" +"Language-Team: Traditional Chinese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../win32/gui/AboutDlg.c:26 +msgid "" +"PCSX - A PlayStation Emulator\n" +"\n" +"Original Authors:\n" +"main coder: linuzappz\n" +"co-coders: shadow\n" +"ex-coders: Nocomp, Pete Bernett, nik3d\n" +"Webmaster: AkumaX" +msgstr "" +"PCSX - 一個 PlayStation 模擬器\n" +"\n" +"原作者:\n" +"主程式: linuzappz\n" +"輔助程式: shadow\n" +"前程式: Nocomp, Pete Bernett, nik3d\n" +"網站管理: AkumaX" + +#: ../win32/gui/AboutDlg.c:35 +msgid "" +"PCSX-df Authors:\n" +"Ryan Schultz, Andrew Burton, Stephen Chao,\n" +"Marcus Comstedt, Stefan Sikora\n" +"\n" +"PCSX-Reloaded By:\n" +"Blade_Arma, Wei Mingzhi, et al.\n" +"\n" +"http://pcsxr.codeplex.com/" +msgstr "" +"PCSX-df 開發者:\n" +"Ryan Schultz, Andrew Burton, Stephen Chao,\n" +"Marcus Comstedt, Stefan Sikora\n" +"\n" +"PCSX-Reloaded 開發者:\n" +"Blade_Arma, Wei Mingzhi, et al.\n" +"\n" +"http://pcsxr.codeplex.com/" + +#: ../win32/gui/AboutDlg.c:46 +#: ../plugins/peopsxgl/gpucfg/interface.c:831 +msgid "About" +msgstr "關於 PCSX" + +#: ../win32/gui/AboutDlg.c:48 +#: ../win32/gui/AboutDlg.c:52 +#: ../win32/gui/CheatDlg.c:69 +#: ../win32/gui/CheatDlg.c:119 +#: ../win32/gui/ConfigurePlugins.c:483 +#: ../win32/gui/ConfigurePlugins.c:614 +#: ../win32/gui/WndMain.c:974 +#: ../win32/gui/WndMain.c:1210 +#: ../plugins/peopsxgl/gpucfg/interface.c:130 +#: ../plugins/peopsxgl/gpucfg/interface.c:843 +msgid "OK" +msgstr "確定" + +#: ../win32/gui/AboutDlg.c:49 +msgid "PCSX EMU\n" +msgstr "PCSX 模擬器\n" + +#: ../win32/gui/CheatDlg.c:51 +#: ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "Yes" +msgstr "是" + +#: ../win32/gui/CheatDlg.c:51 +#: ../win32/gui/CheatDlg.c:223 +#: ../win32/gui/CheatDlg.c:270 +msgid "No" +msgstr "否" + +#: ../win32/gui/CheatDlg.c:66 +#: ../gui/Cheat.c:194 +msgid "Edit Cheat" +msgstr "編輯金手指" + +#: ../win32/gui/CheatDlg.c:67 +#: ../win32/gui/CheatDlg.c:117 +#: ../gui/Cheat.c:636 +msgid "Description:" +msgstr "描述:" + +#: ../win32/gui/CheatDlg.c:68 +#: ../win32/gui/CheatDlg.c:118 +#: ../gui/Cheat.c:125 +#: ../gui/Cheat.c:211 +msgid "Cheat Code:" +msgstr "金手指碼:" + +#: ../win32/gui/CheatDlg.c:70 +#: ../win32/gui/CheatDlg.c:120 +#: ../win32/gui/ConfigurePlugins.c:484 +#: ../win32/gui/ConfigurePlugins.c:615 +#: ../win32/gui/WndMain.c:975 +#: ../win32/gui/WndMain.c:1211 +#: ../plugins/peopsxgl/gpucfg/interface.c:338 +msgid "Cancel" +msgstr "取消" + +#: ../win32/gui/CheatDlg.c:91 +#: ../win32/gui/CheatDlg.c:132 +#: ../gui/Cheat.c:155 +#: ../gui/Cheat.c:251 +msgid "Invalid cheat code!" +msgstr "非法金手指碼!" + +#: ../win32/gui/CheatDlg.c:116 +#: ../gui/Cheat.c:109 +msgid "Add New Cheat" +msgstr "添加新金手指" + +#: ../win32/gui/CheatDlg.c:166 +#: ../data/pcsx.glade2:2534 +msgid "Edit Cheat Codes" +msgstr "編輯金手指" + +#: ../win32/gui/CheatDlg.c:168 +msgid "&Add Code" +msgstr "增加金手指碼(&A)" + +#: ../win32/gui/CheatDlg.c:169 +msgid "&Edit Code" +msgstr "編輯金手指(&E):" + +#: ../win32/gui/CheatDlg.c:170 +msgid "&Remove Code" +msgstr "刪除金手指碼(&R)" + +#: ../win32/gui/CheatDlg.c:171 +msgid "&Enable/Disable" +msgstr "開啟/關閉(&E)" + +#: ../win32/gui/CheatDlg.c:172 +msgid "&Load..." +msgstr "讀取(&L)..." + +#: ../win32/gui/CheatDlg.c:173 +msgid "&Save As..." +msgstr "存儲為(&S)..." + +#: ../win32/gui/CheatDlg.c:174 +msgid "&Close" +msgstr "關閉(&C)" + +#: ../win32/gui/CheatDlg.c:185 +#: ../gui/Cheat.c:413 +msgid "Description" +msgstr "描述" + +#: ../win32/gui/CheatDlg.c:190 +msgid "Enabled" +msgstr "開啟" + +#: ../win32/gui/CheatDlg.c:282 +#: ../win32/gui/CheatDlg.c:311 +msgid "PCSX Cheat Code Files" +msgstr "PCSX 金手指檔 (*.cht)" + +#: ../win32/gui/CheatDlg.c:402 +msgid "Equal Value" +msgstr "等于數值" + +#: ../win32/gui/CheatDlg.c:403 +msgid "Not Equal Value" +msgstr "不等于數值" + +#: ../win32/gui/CheatDlg.c:404 +msgid "Range" +msgstr "範圍" + +#: ../win32/gui/CheatDlg.c:407 +msgid "Increased By" +msgstr "增加數值" + +#: ../win32/gui/CheatDlg.c:408 +msgid "Decreased By" +msgstr "減少數值" + +#: ../win32/gui/CheatDlg.c:409 +msgid "Increased" +msgstr "增加" + +#: ../win32/gui/CheatDlg.c:410 +msgid "Decreased" +msgstr "已減少" + +#: ../win32/gui/CheatDlg.c:411 +msgid "Different" +msgstr "不同" + +#: ../win32/gui/CheatDlg.c:412 +msgid "No Change" +msgstr "無改變" + +#: ../win32/gui/CheatDlg.c:448 +#: ../gui/Cheat.c:585 +msgid "Enter the values and start your search." +msgstr "輸入數值並開始搜索。" + +#: ../win32/gui/CheatDlg.c:453 +msgid "No addresses found." +msgstr "未找到位址。" + +#: ../win32/gui/CheatDlg.c:457 +#: ../gui/Cheat.c:543 +msgid "Too many addresses found." +msgstr "找到過多位址。" + +#: ../win32/gui/CheatDlg.c:466 +#: ../gui/Cheat.c:552 +#, c-format +msgid "%.8X Current: %u (%.2X), Previous: %u (%.2X)" +msgstr "%.8X 當前值: %u (%.2X), 前次值: %u (%.2X)" + +#: ../win32/gui/CheatDlg.c:471 +#: ../gui/Cheat.c:557 +#, c-format +msgid "%.8X Current: %u (%.4X), Previous: %u (%.4X)" +msgstr "%.8X 當前值: %u (%.4X), 前次值: %u (%.4X)" + +#: ../win32/gui/CheatDlg.c:476 +#: ../gui/Cheat.c:562 +#, c-format +msgid "%.8X Current: %u (%.8X), Previous: %u (%.8X)" +msgstr "%.8X 當前值: %u (%.8X), 前次值: %u (%.8X)" + +#: ../win32/gui/CheatDlg.c:492 +#: ../gui/Cheat.c:577 +#, c-format +msgid "Founded Addresses: %d" +msgstr "找到位址: %d" + +#: ../win32/gui/CheatDlg.c:504 +#: ../data/pcsx.glade2:2930 +msgid "Freeze" +msgstr "固定" + +#: ../win32/gui/CheatDlg.c:505 +#: ../win32/gui/CheatDlg.c:596 +msgid "Address:" +msgstr "位址:" + +#: ../win32/gui/CheatDlg.c:506 +#: ../win32/gui/CheatDlg.c:597 +#: ../win32/gui/CheatDlg.c:682 +#: ../gui/Cheat.c:647 +#: ../data/pcsx.glade2:2773 +msgid "Value:" +msgstr "值:" + +#: ../win32/gui/CheatDlg.c:566 +#, c-format +msgid "Freeze %.8X" +msgstr "固定 %.8X" + +#: ../win32/gui/CheatDlg.c:595 +#: ../data/pcsx.glade2:2966 +msgid "Modify" +msgstr "更改" + +#: ../win32/gui/CheatDlg.c:678 +#: ../gui/Cheat.c:1129 +#: ../data/pcsx.glade2:2703 +msgid "Cheat Search" +msgstr "搜尋金手指碼" + +#: ../win32/gui/CheatDlg.c:680 +#: ../data/pcsx.glade2:2751 +msgid "Search For:" +msgstr "搜尋:" + +#: ../win32/gui/CheatDlg.c:681 +#: ../data/pcsx.glade2:2761 +msgid "Data Type:" +msgstr "數值類型:" + +#: ../win32/gui/CheatDlg.c:683 +#: ../data/pcsx.glade2:2785 +msgid "Data Base:" +msgstr "數值基:" + +#: ../win32/gui/CheatDlg.c:684 +#: ../data/pcsx.glade2:2845 +msgid "To:" +msgstr "至:" + +#: ../win32/gui/CheatDlg.c:685 +msgid "&Freeze" +msgstr "固定(&F)" + +#: ../win32/gui/CheatDlg.c:686 +msgid "&Modify" +msgstr "更改(&M)" + +#: ../win32/gui/CheatDlg.c:687 +msgid "&Copy" +msgstr "複制(&C)" + +#: ../win32/gui/CheatDlg.c:688 +msgid "&Search" +msgstr "搜尋(&S)" + +#: ../win32/gui/CheatDlg.c:689 +msgid "&New Search" +msgstr "新搜尋(&N)" + +#: ../win32/gui/CheatDlg.c:690 +msgid "C&lose" +msgstr "關閉(&L)" + +#: ../win32/gui/CheatDlg.c:692 +msgid "8-bit" +msgstr "8 位元" + +#: ../win32/gui/CheatDlg.c:693 +msgid "16-bit" +msgstr "16 位元" + +#: ../win32/gui/CheatDlg.c:694 +msgid "32-bit" +msgstr "32 位元" + +#: ../win32/gui/CheatDlg.c:695 +msgid "Decimal" +msgstr "十進制" + +#: ../win32/gui/CheatDlg.c:696 +msgid "Hexadecimal" +msgstr "十六進制" + +#: ../win32/gui/ConfigurePlugins.c:219 +msgid "Simulate Psx Bios" +msgstr "模擬 PS BIOS" + +#: ../win32/gui/ConfigurePlugins.c:305 +msgid "Configuration not OK!" +msgstr "設定不正確!" + +#: ../win32/gui/ConfigurePlugins.c:305 +#: ../gui/Cheat.c:155 +#: ../gui/Cheat.c:251 +#: ../gui/LnxMain.c:418 +msgid "Error" +msgstr "錯誤" + +#: ../win32/gui/ConfigurePlugins.c:406 +msgid "This plugin reports that should work correctly" +msgstr "此外掛報告其可正常工作。" + +#: ../win32/gui/ConfigurePlugins.c:407 +msgid "This plugin reports that should not work correctly" +msgstr "此外掛報告其不可正常工作。" + +#: ../win32/gui/ConfigurePlugins.c:463 +msgid "Select Plugins Directory" +msgstr "選擇外掛目錄" + +#: ../win32/gui/ConfigurePlugins.c:472 +msgid "Select Bios Directory" +msgstr "選擇 BIOS 目錄" + +#: ../win32/gui/ConfigurePlugins.c:481 +msgid "Configuration" +msgstr "設定" + +#: ../win32/gui/ConfigurePlugins.c:485 +msgid "Graphics" +msgstr "圖像" + +#: ../win32/gui/ConfigurePlugins.c:486 +msgid "First Controller" +msgstr "主控制器" + +#: ../win32/gui/ConfigurePlugins.c:487 +msgid "Second Controller" +msgstr "輔控制器" + +#: ../win32/gui/ConfigurePlugins.c:488 +msgid "Sound" +msgstr "聲音" + +#: ../win32/gui/ConfigurePlugins.c:489 +msgid "Cdrom" +msgstr "CD-ROM" + +#: ../win32/gui/ConfigurePlugins.c:490 +msgid "Bios" +msgstr "BIOS" + +#: ../win32/gui/ConfigurePlugins.c:491 +msgid "Set Bios Directory" +msgstr "設定 BIOS 目錄" + +#: ../win32/gui/ConfigurePlugins.c:492 +msgid "Set Plugins Directory" +msgstr "設定外掛目錄" + +#: ../win32/gui/ConfigurePlugins.c:493 +#: ../win32/gui/ConfigurePlugins.c:496 +#: ../win32/gui/ConfigurePlugins.c:499 +#: ../win32/gui/ConfigurePlugins.c:502 +#: ../win32/gui/ConfigurePlugins.c:505 +#: ../win32/gui/ConfigurePlugins.c:617 +msgid "Configure..." +msgstr "設定..." + +#: ../win32/gui/ConfigurePlugins.c:494 +#: ../win32/gui/ConfigurePlugins.c:497 +#: ../win32/gui/ConfigurePlugins.c:500 +#: ../win32/gui/ConfigurePlugins.c:503 +#: ../win32/gui/ConfigurePlugins.c:506 +#: ../win32/gui/ConfigurePlugins.c:618 +msgid "Test..." +msgstr "測試..." + +#: ../win32/gui/ConfigurePlugins.c:495 +#: ../win32/gui/ConfigurePlugins.c:498 +#: ../win32/gui/ConfigurePlugins.c:501 +#: ../win32/gui/ConfigurePlugins.c:504 +#: ../win32/gui/ConfigurePlugins.c:507 +#: ../win32/gui/ConfigurePlugins.c:619 +msgid "About..." +msgstr "關於..." + +#: ../win32/gui/ConfigurePlugins.c:612 +msgid "NetPlay Configuration" +msgstr "聯線遊戲設定" + +#: ../win32/gui/ConfigurePlugins.c:616 +#: ../plugins/dfnet/gui.c:31 +#: ../plugins/dfnet/gui.c:112 +msgid "NetPlay" +msgstr "聯線遊戲" + +#: ../win32/gui/ConfigurePlugins.c:620 +msgid "Note: The NetPlay Plugin Directory should be the same as the other Plugins." +msgstr "注意: 聯線遊戲外掛應和其它外掛放在同一資料夾中。" + +#: ../win32/gui/plugin.c:90 +#: ../win32/gui/WndMain.c:281 +#, c-format +msgid "*PCSX*: Saved State %d" +msgstr "*PCSX*: Saved State %d" + +#: ../win32/gui/plugin.c:91 +#: ../win32/gui/WndMain.c:282 +#, c-format +msgid "*PCSX*: Error Saving State %d" +msgstr "*PCSX*: Error Saving State %d" + +#: ../win32/gui/plugin.c:107 +#: ../win32/gui/WndMain.c:259 +#, c-format +msgid "*PCSX*: Loaded State %d" +msgstr "*PCSX*: Loaded State %d" + +#: ../win32/gui/plugin.c:108 +#: ../win32/gui/WndMain.c:260 +#, c-format +msgid "*PCSX*: Error Loading State %d" +msgstr "*PCSX*: Error Loading State %d" + +#: ../win32/gui/plugin.c:119 +#, c-format +msgid "*PCSX*: Sio Irq Always Enabled" +msgstr "*PCSX*: Sio Irq Always Enabled" + +#: ../win32/gui/plugin.c:120 +#, c-format +msgid "*PCSX*: Sio Irq Not Always Enabled" +msgstr "*PCSX*: Sio Irq Not Always Enabled" + +#: ../win32/gui/plugin.c:127 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Enabled" +msgstr "*PCSX*: Black&White Mdecs Only Enabled" + +#: ../win32/gui/plugin.c:128 +#, c-format +msgid "*PCSX*: Black&White Mdecs Only Disabled" +msgstr "*PCSX*: Black&White Mdecs Only Disabled" + +#: ../win32/gui/plugin.c:135 +#, c-format +msgid "*PCSX*: Xa Enabled" +msgstr "*PCSX*: Xa Enabled" + +#: ../win32/gui/plugin.c:136 +#, c-format +msgid "*PCSX*: Xa Disabled" +msgstr "*PCSX*: Xa Disabled" + +#: ../win32/gui/plugin.c:145 +msgid "*PCSX*: CdRom Case Opened" +msgstr "*PCSX*: CdRom Case Opened" + +#: ../win32/gui/plugin.c:150 +msgid "*PCSX*: CdRom Case Closed" +msgstr "*PCSX*: CdRom Case Closed" + +#: ../win32/gui/plugin.c:177 +msgid "Connecting..." +msgstr "正在連接..." + +#: ../win32/gui/plugin.c:179 +#: ../win32/gui/plugin.c:186 +#, c-format +msgid "Please wait while connecting... %c\n" +msgstr "請稍候,正在連接... %c\n" + +#: ../win32/gui/plugin.c:214 +msgid "Error Opening CDR Plugin" +msgstr "無法開啟 CDR 外掛" + +#: ../win32/gui/plugin.c:277 +#, c-format +msgid "Error Opening GPU Plugin (%d)" +msgstr "無法開啟 GPU 外掛 (%d)" + +#: ../win32/gui/plugin.c:279 +#, c-format +msgid "Error Opening SPU Plugin (%d)" +msgstr "無法開啟 SPU 外掛 (%d)" + +#: ../win32/gui/plugin.c:282 +#, c-format +msgid "Error Opening PAD1 Plugin (%d)" +msgstr "無法開啟 PAD1 外掛 (%d)" + +#: ../win32/gui/plugin.c:284 +#, c-format +msgid "Error Opening PAD2 Plugin (%d)" +msgstr "無法開啟 PAD2 外掛 (%d)" + +#: ../win32/gui/plugin.c:314 +msgid "Error Closing CDR Plugin" +msgstr "無法關閉 CD-ROM 外掛 (%d)" + +#: ../win32/gui/plugin.c:316 +msgid "Error Closing GPU Plugin" +msgstr "無法關閉 GPU 外掛" + +#: ../win32/gui/plugin.c:318 +msgid "Error Closing SPU Plugin" +msgstr "無法關閉 SPU 外掛" + +#: ../win32/gui/plugin.c:336 +#, c-format +msgid "CDRinit error: %d" +msgstr "CDRinit 錯誤: %d" + +#: ../win32/gui/plugin.c:338 +#, c-format +msgid "GPUinit error: %d" +msgstr "GPUinit 錯誤: %d" + +#: ../win32/gui/plugin.c:340 +#, c-format +msgid "SPUinit error: %d" +msgstr "SPUinit 錯誤: %d" + +#: ../win32/gui/plugin.c:342 +#, c-format +msgid "PAD1init error: %d" +msgstr "PAD1init 錯誤: %d" + +#: ../win32/gui/plugin.c:344 +#, c-format +msgid "PAD2init error: %d" +msgstr "PAD2init 錯誤: %d" + +#: ../win32/gui/plugin.c:347 +#, c-format +msgid "NETinit error: %d" +msgstr "NETinit 錯誤: %d" + +#: ../win32/gui/WndMain.c:76 +msgid "Arabic" +msgstr "阿拉伯語" + +#: ../win32/gui/WndMain.c:77 +msgid "Catalan" +msgstr "加泰隆尼亞語" + +#: ../win32/gui/WndMain.c:78 +msgid "German" +msgstr "德語" + +#: ../win32/gui/WndMain.c:79 +msgid "Greek" +msgstr "希臘語" + +#: ../win32/gui/WndMain.c:80 +#: ../win32/gui/WndMain.c:1566 +#: ../win32/gui/WndMain.c:1568 +msgid "English" +msgstr "英語" + +#: ../win32/gui/WndMain.c:81 +msgid "Spanish" +msgstr "西班牙語" + +#: ../win32/gui/WndMain.c:82 +msgid "French" +msgstr "法語" + +#: ../win32/gui/WndMain.c:83 +msgid "Italian" +msgstr "義大利語" + +#: ../win32/gui/WndMain.c:84 +msgid "Portuguese" +msgstr "葡萄牙語" + +#: ../win32/gui/WndMain.c:85 +msgid "Portuguese (Brazilian)" +msgstr "葡萄牙語 (巴西)" + +#: ../win32/gui/WndMain.c:86 +msgid "Romanian" +msgstr "羅馬尼亞語" + +#: ../win32/gui/WndMain.c:87 +msgid "Russian" +msgstr "俄語" + +#: ../win32/gui/WndMain.c:88 +msgid "Simplified Chinese" +msgstr "簡體中文" + +#: ../win32/gui/WndMain.c:89 +msgid "Traditional Chinese" +msgstr "正體中文" + +#: ../win32/gui/WndMain.c:90 +msgid "Japanese" +msgstr "日語" + +#: ../win32/gui/WndMain.c:91 +msgid "Korean" +msgstr "韓國語" + +#: ../win32/gui/WndMain.c:300 +#: ../win32/gui/WndMain.c:352 +msgid "PCSX State Format" +msgstr "PCSX 記錄格式" + +#: ../win32/gui/WndMain.c:327 +#, c-format +msgid "*PCSX*: Loaded State %s" +msgstr "*PCSX*: Loaded State %s" + +#: ../win32/gui/WndMain.c:328 +#, c-format +msgid "*PCSX*: Error Loading State %s" +msgstr "*PCSX*: Error Loading State %s" + +#: ../win32/gui/WndMain.c:379 +#, c-format +msgid "*PCSX*: Saved State %s" +msgstr "*PCSX*: Saved State %s" + +#: ../win32/gui/WndMain.c:380 +#, c-format +msgid "*PCSX*: Error Saving State %s" +msgstr "*PCSX*: Error Saving State %s" + +#: ../win32/gui/WndMain.c:429 +#: ../win32/gui/WndMain.c:478 +#: ../gui/Gtk2Gui.c:485 +#: ../gui/Gtk2Gui.c:610 +msgid "The CD does not appear to be a valid Playstation CD" +msgstr "此光碟不是一張合法的 PlayStation 光碟。" + +#: ../win32/gui/WndMain.c:435 +#: ../win32/gui/WndMain.c:484 +#: ../gui/Gtk2Gui.c:493 +#: ../gui/Gtk2Gui.c:618 +msgid "Could not load CD-ROM!" +msgstr "無法加載光碟!" + +#: ../win32/gui/WndMain.c:445 +msgid "Running BIOS is not supported with Internal HLE Bios." +msgstr "內部 HLE BIOS 不支援直接執行。" + +#: ../win32/gui/WndMain.c:664 +#: ../gui/MemcardDlg.c:62 +msgid "Title" +msgstr "標題" + +#: ../win32/gui/WndMain.c:670 +#: ../gui/MemcardDlg.c:68 +msgid "Status" +msgstr "狀態" + +#: ../win32/gui/WndMain.c:676 +msgid "Game ID" +msgstr "遊戲 ID" + +#: ../win32/gui/WndMain.c:682 +msgid "Game" +msgstr "遊戲" + +#: ../win32/gui/WndMain.c:864 +msgid "mid link block" +msgstr "mid link block" + +#: ../win32/gui/WndMain.c:867 +msgid "terminiting link block" +msgstr "terminiting link block" + +#: ../win32/gui/WndMain.c:875 +#: ../gui/MemcardDlg.c:155 +#: ../gui/MemcardDlg.c:260 +msgid "Deleted" +msgstr "已刪除" + +#: ../win32/gui/WndMain.c:876 +#: ../win32/gui/WndMain.c:879 +#: ../gui/MemcardDlg.c:157 +#: ../gui/MemcardDlg.c:161 +#: ../gui/MemcardDlg.c:262 +#: ../gui/MemcardDlg.c:266 +msgid "Free" +msgstr "空閑" + +#: ../win32/gui/WndMain.c:878 +#: ../gui/MemcardDlg.c:159 +#: ../gui/MemcardDlg.c:264 +msgid "Used" +msgstr "已使用" + +#: ../win32/gui/WndMain.c:972 +msgid "Memcard Manager" +msgstr "記憶卡管理器" + +#: ../win32/gui/WndMain.c:976 +#: ../win32/gui/WndMain.c:979 +msgid "Select Mcd" +msgstr "選擇" + +#: ../win32/gui/WndMain.c:977 +#: ../win32/gui/WndMain.c:980 +msgid "Format Mcd" +msgstr "格式化" + +#: ../win32/gui/WndMain.c:978 +#: ../win32/gui/WndMain.c:981 +msgid "Reload Mcd" +msgstr "重新加載" + +#: ../win32/gui/WndMain.c:982 +msgid "-> Copy ->" +msgstr "-> 複制 ->" + +#: ../win32/gui/WndMain.c:983 +msgid "<- Copy <-" +msgstr "<- 複制 <-" + +#: ../win32/gui/WndMain.c:984 +msgid "Paste" +msgstr "粘貼" + +#: ../win32/gui/WndMain.c:985 +msgid "<- Un/Delete" +msgstr "<- 刪除/恢複" + +#: ../win32/gui/WndMain.c:986 +msgid "Un/Delete ->" +msgstr "刪除/恢複 ->" + +#: ../win32/gui/WndMain.c:988 +msgid "Memory Card 1" +msgstr "記憶卡 1" + +#: ../win32/gui/WndMain.c:989 +msgid "Memory Card 2" +msgstr "記憶卡 2" + +#: ../win32/gui/WndMain.c:1044 +msgid "Are you sure you want to paste this selection?" +msgstr "是否確認粘貼此選中內容?" + +#: ../win32/gui/WndMain.c:1044 +#: ../win32/gui/WndMain.c:1155 +#: ../win32/gui/WndMain.c:1162 +msgid "Confirmation" +msgstr "確認" + +#: ../win32/gui/WndMain.c:1155 +#: ../win32/gui/WndMain.c:1162 +msgid "Are you sure you want to format this Memory Card?" +msgstr "是否確認格式化此記憶卡?" + +#: ../win32/gui/WndMain.c:1208 +msgid "Cpu Config" +msgstr "CPU 設定" + +#: ../win32/gui/WndMain.c:1213 +msgid "Disable Xa Decoding" +msgstr "禁用 XA 解碼" + +#: ../win32/gui/WndMain.c:1214 +msgid "Sio Irq Always Enabled" +msgstr "SIO IRQ 總是開啟" + +#: ../win32/gui/WndMain.c:1215 +msgid "Black && White Movies" +msgstr "黑白電影" + +#: ../win32/gui/WndMain.c:1216 +msgid "Disable Cd audio" +msgstr "禁用 CD 音頻" + +#: ../win32/gui/WndMain.c:1217 +#: ../data/pcsx.glade2:1595 +msgid "Autodetect" +msgstr "自動檢測" + +#: ../win32/gui/WndMain.c:1218 +msgid "Enable Interpreter Cpu" +msgstr "開啟解釋執行 CPU" + +#: ../win32/gui/WndMain.c:1219 +#: ../data/pcsx.glade2:1451 +msgid "Enable Console Output" +msgstr "開啟控制台輸出" + +#: ../win32/gui/WndMain.c:1220 +#: ../data/pcsx.glade2:1401 +msgid "Enable Debugger" +msgstr "開啟調試器" + +#: ../win32/gui/WndMain.c:1221 +msgid "Spu Irq Always Enabled" +msgstr "SPU IRQ 總是開啟" + +#: ../win32/gui/WndMain.c:1222 +#: ../data/pcsx.glade2:1538 +msgid "Parasite Eve 2, Vandal Hearts 1/2 Fix" +msgstr "Parasite Eve 2, Vandal Hearts 1/2 修正" + +#: ../win32/gui/WndMain.c:1223 +#: ../data/pcsx.glade2:1553 +msgid "InuYasha Sengoku Battle Fix" +msgstr "InuYasha Sengoku 戰斗修正" + +#: ../win32/gui/WndMain.c:1225 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:277 +#: ../plugins/dfinput/dfinput.glade2:448 +msgid "Options" +msgstr "選項" + +#: ../win32/gui/WndMain.c:1226 +msgid "Psx System Type" +msgstr "PS 系統類型" + +#: ../win32/gui/WndMain.c:1330 +msgid "Psx Mcd Format (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)" +msgstr "PS 記憶卡格式 (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)" + +#: ../win32/gui/WndMain.c:1335 +msgid "Psx Memory Card (*.mcr;*.mc)" +msgstr "PS 記憶卡 (*.mcr;*.mc)" + +#: ../win32/gui/WndMain.c:1340 +msgid "CVGS Memory Card (*.mem;*.vgs)" +msgstr "VGS 記憶卡 (*.mem;*.vgs)" + +#: ../win32/gui/WndMain.c:1345 +msgid "Bleem Memory Card (*.mcd)" +msgstr "Bleem 記憶卡 (*.mcd)" + +#: ../win32/gui/WndMain.c:1350 +msgid "DexDrive Memory Card (*.gme)" +msgstr "DexDrive 記憶卡 (*.gme)" + +#: ../win32/gui/WndMain.c:1355 +msgid "DataDeck Memory Card (*.ddf)" +msgstr "DataDeck 記憶卡 (*.ddl)" + +#: ../win32/gui/WndMain.c:1360 +#: ../win32/gui/WndMain.c:1441 +#: ../gui/Cheat.c:321 +#: ../gui/Gtk2Gui.c:422 +#: ../gui/Gtk2Gui.c:561 +msgid "All Files" +msgstr "所有檔案" + +#: ../win32/gui/WndMain.c:1399 +msgid "Psx Exe Format" +msgstr "PS EXE 格式" + +#: ../win32/gui/WndMain.c:1436 +msgid "Psx Isos (*.iso;*.mdf;*.img;*.bin)" +msgstr "PS 鏡像檔 (*.iso;*.mdf;*.img;*.bin)" + +#: ../win32/gui/WndMain.c:1512 +msgid "&File" +msgstr "檔案(&F)" + +#: ../win32/gui/WndMain.c:1513 +msgid "E&xit" +msgstr "離開(&X)" + +#: ../win32/gui/WndMain.c:1515 +msgid "Run &EXE..." +msgstr "執行 EXE(&E)..." + +#: ../win32/gui/WndMain.c:1516 +msgid "Run &BIOS" +msgstr "執行 BIOS(&B)" + +#: ../win32/gui/WndMain.c:1517 +msgid "Run &ISO..." +msgstr "執行 ISO(&I)..." + +#: ../win32/gui/WndMain.c:1518 +msgid "Run &CD" +msgstr "執行光碟(&C)" + +#: ../win32/gui/WndMain.c:1520 +msgid "&Emulator" +msgstr "模擬器(&E)" + +#: ../win32/gui/WndMain.c:1521 +msgid "&States" +msgstr "記錄(&S)" + +#: ../win32/gui/WndMain.c:1523 +msgid "S&witch ISO..." +msgstr "更換 ISO(&W)..." + +#: ../win32/gui/WndMain.c:1525 +msgid "Re&set" +msgstr "複位(&S)" + +#: ../win32/gui/WndMain.c:1526 +msgid "&Run" +msgstr "執行(&R)" + +#: ../win32/gui/WndMain.c:1527 +msgid "&Save" +msgstr "存儲(&S)" + +#: ../win32/gui/WndMain.c:1528 +msgid "&Load" +msgstr "讀取(&L)" + +#: ../win32/gui/WndMain.c:1529 +#: ../win32/gui/WndMain.c:1535 +msgid "&Other..." +msgstr "其它(&O)..." + +#: ../win32/gui/WndMain.c:1530 +#: ../win32/gui/WndMain.c:1536 +msgid "Slot &5" +msgstr "記錄 5(&5)" + +#: ../win32/gui/WndMain.c:1531 +#: ../win32/gui/WndMain.c:1537 +msgid "Slot &4" +msgstr "記錄 4(&4)" + +#: ../win32/gui/WndMain.c:1532 +#: ../win32/gui/WndMain.c:1538 +msgid "Slot &3" +msgstr "記錄 3(&3)" + +#: ../win32/gui/WndMain.c:1533 +#: ../win32/gui/WndMain.c:1539 +msgid "Slot &2" +msgstr "記錄 2(&2)" + +#: ../win32/gui/WndMain.c:1534 +#: ../win32/gui/WndMain.c:1540 +msgid "Slot &1" +msgstr "記錄 1(&1)" + +#: ../win32/gui/WndMain.c:1542 +msgid "&Configuration" +msgstr "設定(&C)" + +#: ../win32/gui/WndMain.c:1543 +msgid "Cheat &Search..." +msgstr "搜尋金手指碼(&S)..." + +#: ../win32/gui/WndMain.c:1544 +msgid "Ch&eat Code..." +msgstr "金手指碼(&E)..." + +#: ../win32/gui/WndMain.c:1547 +msgid "&Language" +msgstr "語言(&L)" + +#: ../win32/gui/WndMain.c:1572 +msgid "&Memory cards..." +msgstr "記憶卡(&M)..." + +#: ../win32/gui/WndMain.c:1573 +msgid "C&PU..." +msgstr "CPU(&P)..." + +#: ../win32/gui/WndMain.c:1575 +msgid "&NetPlay..." +msgstr "聯線遊戲(&N)..." + +#: ../win32/gui/WndMain.c:1577 +msgid "&Controllers..." +msgstr "控制器(&C)..." + +#: ../win32/gui/WndMain.c:1578 +msgid "CD-&ROM..." +msgstr "CD-ROM(&R)..." + +#: ../win32/gui/WndMain.c:1579 +msgid "&Sound..." +msgstr "聲音(&S)..." + +#: ../win32/gui/WndMain.c:1580 +msgid "&Graphics..." +msgstr "圖像(&G)..." + +#: ../win32/gui/WndMain.c:1582 +msgid "&Plugins && Bios..." +msgstr "外掛及 BIOS(&P)..." + +#: ../win32/gui/WndMain.c:1584 +msgid "&Help" +msgstr "說明(&H)" + +#: ../win32/gui/WndMain.c:1585 +msgid "&About..." +msgstr "關於(&A)..." + +#: ../win32/gui/WndMain.c:1764 +msgid "Pcsx Msg" +msgstr "Pcsx 消息" + +#: ../win32/gui/WndMain.c:1767 +msgid "Error Loading Symbol" +msgstr "無法加載符號" + +#: ../gui/AboutDlg.c:74 +msgid "" +"(C) 1999-2003 PCSX Team\n" +"(C) 2005-2009 PCSX-df Team\n" +"(C) 2009-2010 PCSX-Reloaded Team" +msgstr "" +"(C) 1999-2003 PCSX 開發組\n" +"(C) 2005-2009 PCSX-df 開發組\n" +"(C) 2009-2010 PCSX-Reloaded 開發組" + +#: ../gui/AboutDlg.c:79 +msgid "" +"This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA." +msgstr "" +"This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA." + +#: ../gui/AboutDlg.c:102 +msgid "translator-credits" +msgstr "Wei Mingzhi " + +#: ../gui/AboutDlg.c:103 +msgid "A PlayStation emulator." +msgstr "一個 PlayStation 模擬器。" + +#: ../gui/Cheat.c:117 +#: ../gui/Cheat.c:202 +msgid "Cheat Description:" +msgstr "金手指描述:" + +#: ../gui/Cheat.c:306 +msgid "Open Cheat File" +msgstr "打開金手指檔" + +#: ../gui/Cheat.c:316 +#: ../gui/Cheat.c:356 +msgid "PCSX Cheat Code Files (*.cht)" +msgstr "PCSX 金手指檔 (*.cht)" + +#: ../gui/Cheat.c:346 +msgid "Save Cheat File" +msgstr "儲存金手指檔" + +#: ../gui/Cheat.c:361 +msgid "All Files (*.*)" +msgstr "所有檔案 (*.*)" + +#: ../gui/Cheat.c:394 +#: ../gui/Cheat.c:1124 +#: ../gui/ConfDlg.c:104 +#: ../gui/ConfDlg.c:200 +#: ../gui/DebugMemory.c:259 +msgid "Error: Glade interface could not be loaded!" +msgstr "錯誤:無法加載 Glade 界面!" + +#: ../gui/Cheat.c:399 +msgid "Cheat Codes" +msgstr "金手指碼" + +#: ../gui/Cheat.c:405 +msgid "Enable" +msgstr "開啟" + +#: ../gui/Cheat.c:630 +msgid "Freeze value" +msgstr "固定數值" + +#: ../gui/Cheat.c:729 +msgid "Modify value" +msgstr "更改數值" + +#: ../gui/Cheat.c:737 +msgid "New value:" +msgstr "新值:" + +#: ../gui/Cheat.c:1134 +msgid "Search Results" +msgstr "搜尋結果" + +#: ../gui/ConfDlg.c:112 +#: ../data/pcsx.glade2:778 +msgid "Configure PCSX" +msgstr "設定 PCSX" + +#: ../gui/ConfDlg.c:237 +#: ../gui/ConfDlg.c:258 +#: ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 +#: ../gui/ConfDlg.c:355 +msgid "No configuration required" +msgstr "不需要設定" + +#: ../gui/ConfDlg.c:237 +#: ../gui/ConfDlg.c:258 +#: ../gui/ConfDlg.c:279 +#: ../gui/ConfDlg.c:300 +#: ../gui/ConfDlg.c:355 +msgid "This plugin doesn't need to be configured." +msgstr "此外掛不需要被設定。" + +#: ../gui/ConfDlg.c:581 +#, c-format +msgid "Could not open BIOS directory: '%s'\n" +msgstr "無法開啟 BIOS 目錄: \"%s\"\n" + +#: ../gui/ConfDlg.c:611 +#: ../gui/ConfDlg.c:704 +#: ../gui/LnxMain.c:168 +#, c-format +msgid "Could not open directory: '%s'\n" +msgstr "無法開啟目錄: \"%s\"\n" + +#: ../gui/ConfDlg.c:675 +msgid "Simulate PSX BIOS" +msgstr "模擬 PS BIOS" + +#: ../gui/DebugMemory.c:103 +#: ../data/pcsx.glade2:3178 +msgid "Memory Dump" +msgstr "記憶體轉儲" + +#: ../gui/DebugMemory.c:111 +msgid "Start Address (Hexadecimal):" +msgstr "起始位址 (十六進制):" + +#: ../gui/DebugMemory.c:121 +msgid "Length (Decimal):" +msgstr "長度 (十進制):" + +#: ../gui/DebugMemory.c:147 +msgid "Dump to File" +msgstr "轉儲至檔案" + +#: ../gui/DebugMemory.c:162 +#, c-format +msgid "Error writing to %s!" +msgstr "存儲至 %s 時出錯!" + +#: ../gui/DebugMemory.c:180 +msgid "Memory Patch" +msgstr "記憶體修改" + +#: ../gui/DebugMemory.c:188 +#: ../data/pcsx.glade2:3199 +msgid "Address (Hexadecimal):" +msgstr "位址 (十六進制):" + +#: ../gui/DebugMemory.c:198 +msgid "Value (Hexa string):" +msgstr "數值 (十六進制串):" + +#: ../gui/DebugMemory.c:264 +msgid "Memory Viewer" +msgstr "記憶體檢視" + +#: ../gui/DebugMemory.c:269 +msgid "Address" +msgstr "位址" + +#: ../gui/DebugMemory.c:287 +msgid "Text" +msgstr "文字" + +#: ../gui/Gtk2Gui.c:113 +msgid "Ready" +msgstr "就緒" + +#: ../gui/Gtk2Gui.c:154 +msgid "Emulation Paused." +msgstr "模擬器已暫停。" + +#: ../gui/Gtk2Gui.c:405 +msgid "Select PSX EXE File" +msgstr "選擇 PS EXE 檔案" + +#: ../gui/Gtk2Gui.c:418 +msgid "PlayStation Executable Files" +msgstr "PlayStation 執行檔" + +#: ../gui/Gtk2Gui.c:454 +msgid "Not a valid PSX file" +msgstr "不是一個合法的 PSX 檔" + +#: ../gui/Gtk2Gui.c:454 +msgid "The file does not appear to be a valid Playstation executable" +msgstr "此文件不是一個合法的 PlayStation 執行檔" + +#: ../gui/Gtk2Gui.c:485 +#: ../gui/Gtk2Gui.c:610 +msgid "CD ROM failed" +msgstr "CD-ROM 失敗" + +#: ../gui/Gtk2Gui.c:493 +#: ../gui/Gtk2Gui.c:618 +msgid "The CD-ROM could not be loaded" +msgstr "無法加載 CD-ROM" + +#: ../gui/Gtk2Gui.c:507 +msgid "Could not run BIOS" +msgstr "無法執行 BIOS" + +#: ../gui/Gtk2Gui.c:507 +msgid "Running BIOS is not supported with Internal HLE BIOS." +msgstr "內部 HLE BIOS 不支援直接執行。" + +#: ../gui/Gtk2Gui.c:536 +msgid "Open PSX Disc Image File" +msgstr "打開 PS 光碟映像檔" + +#: ../gui/Gtk2Gui.c:556 +msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" +msgstr "PS 鏡像檔 (*.bin, *.img, *.mdf, *.iso)" + +#: ../gui/Gtk2Gui.c:771 +#, c-format +msgid "Loaded state %s." +msgstr "已讀取記錄 %s。" + +#: ../gui/Gtk2Gui.c:774 +#, c-format +msgid "Error loading state %s!" +msgstr "讀取記錄 %s 時出錯。" + +#: ../gui/Gtk2Gui.c:785 +#, c-format +msgid "Saved state %s." +msgstr "已存儲記錄 %s" + +#: ../gui/Gtk2Gui.c:787 +#, c-format +msgid "Error saving state %s!" +msgstr "存儲記錄 %s 時出錯。" + +#: ../gui/Gtk2Gui.c:822 +#: ../gui/Gtk2Gui.c:850 +msgid "Select State File" +msgstr "選擇記錄檔案" + +#: ../gui/Gtk2Gui.c:893 +msgid "Notice" +msgstr "警告" + +#: ../gui/LnxMain.c:62 +#, c-format +msgid "Creating memory card: %s\n" +msgstr "創建記憶卡: %s\n" + +#: ../gui/LnxMain.c:325 +msgid "" +" pcsx [options] [file]\n" +"\toptions:\n" +"\t-runcd\t\tRuns CD-ROM\n" +"\t-cdfile FILE\tRuns a CD image file\n" +"\t-nogui\t\tDon't open the GTK GUI\n" +"\t-cfg FILE\tLoads desired configuration file (default: ~/.pcsx/pcsx.cfg)\n" +"\t-psxout\t\tEnable PSX output\n" +"\t-load STATENUM\tLoads savestate STATENUM (1-5)\n" +"\t-h -help\tDisplay this message\n" +"\tfile\t\tLoads file\n" +msgstr "" +" pcsx [選項] [檔案]\n" +"\t選項:\n" +"\t-runcd\t\t執行 CD-ROM\n" +"\t-cdfile 檔案\t執行 CD 鏡像檔\n" +"\t-nogui\t\t不開啟 GTK GUI\n" +"\t-cfg 檔案\t加載一個特定的設定檔案 (缺省為: ~/.pcsx/pcsx.cfg)\n" +"\t-psxout\t\t開啟 PSX 輸出\n" +"\t-load 編號\t加載指定編號的記錄 (1-5)\n" +"\t-h -help\t顯示此說明\n" +"\t檔案\t\t加載檔案\n" + +#: ../gui/LnxMain.c:362 +#, c-format +msgid "PCSX cannot be configured without using the GUI -- you should restart without -nogui.\n" +msgstr "PCSX 不能在字符界面下設定 -- 請不使用 -nogui 參數重新啟動程式\n" + +#: ../gui/LnxMain.c:418 +msgid "Failed loading plugins!" +msgstr "外掛加載失敗" + +#: ../gui/LnxMain.c:435 +#, c-format +msgid "Could not load CD-ROM!\n" +msgstr "無法加載光碟。\n" + +#: ../gui/LnxMain.c:466 +#, c-format +msgid "PSX emulator couldn't be initialized.\n" +msgstr "PS 模擬器無法初期化。\n" + +#: ../gui/MemcardDlg.c:56 +msgid "Icon" +msgstr "圖符" + +#: ../gui/MemcardDlg.c:74 +msgid "ID" +msgstr "ID" + +#: ../gui/MemcardDlg.c:80 +msgid "Name" +msgstr "名稱" + +#: ../gui/MemcardDlg.c:323 +msgid "Select A File" +msgstr "選擇檔案" + +#: ../gui/MemcardDlg.c:364 +msgid "Format this Memory Card?" +msgstr "格式化此記憶卡?" + +#: ../gui/MemcardDlg.c:366 +msgid "If you format the memory card, the card will be empty, and any existing data overwritten." +msgstr "如果您選擇格式化記憶卡,記憶卡將被清空,並且任何現有資料都將被覆蓋。" + +#: ../gui/MemcardDlg.c:369 +msgid "Format card" +msgstr "格式化記憶卡" + +#: ../gui/MemcardDlg.c:393 +msgid "Create a new Memory Card" +msgstr "新增記憶卡" + +#: ../gui/MemcardDlg.c:402 +msgid "New Memory Card.mcd" +msgstr "新記憶卡檔.mcd" + +#: ../gui/MemcardDlg.c:503 +msgid "No free space on memory card" +msgstr "記憶卡無空餘位置" + +#: ../gui/MemcardDlg.c:504 +msgid "There are no free slots available on the target memory card. Please delete a slot first." +msgstr "目的記憶卡無空餘位置。請先刪除一個檔案。" + +#: ../gui/MemcardDlg.c:667 +msgid "Memory Card Manager" +msgstr "記憶卡管理器" + +#: ../gui/Plugin.c:211 +#: ../data/pcsx.glade2:1487 +#, c-format +msgid "SIO IRQ Always Enabled" +msgstr "SIO IRQ 總是開啟" + +#: ../gui/Plugin.c:212 +#, c-format +msgid "SIO IRQ Not Always Enabled" +msgstr "SIO IRQ 不總是開啟" + +#: ../gui/Plugin.c:218 +#, c-format +msgid "Black & White Mdecs Only Enabled" +msgstr "Black & White Mdecs Only 開啟" + +#: ../gui/Plugin.c:219 +#, c-format +msgid "Black & White Mdecs Only Disabled" +msgstr "Black & White Mdecs Only 禁用" + +#: ../gui/Plugin.c:225 +#, c-format +msgid "XA Enabled" +msgstr "XA 已開啟" + +#: ../gui/Plugin.c:226 +#, c-format +msgid "XA Disabled" +msgstr "XA 已禁用" + +#: ../gui/Plugin.c:288 +msgid "Error opening CD-ROM plugin!" +msgstr "無法開啟 CD-ROM 外掛!" + +#: ../gui/Plugin.c:290 +msgid "Error opening SPU plugin!" +msgstr "無法開啟 SPU 外掛!" + +#: ../gui/Plugin.c:293 +msgid "Error opening GPU plugin!" +msgstr "無法開啟 GPU 外掛!" + +#: ../gui/Plugin.c:295 +msgid "Error opening Controller 1 plugin!" +msgstr "無法開啟 \"控制器 1\" 外掛!" + +#: ../gui/Plugin.c:297 +msgid "Error opening Controller 2 plugin!" +msgstr "無法開啟 \"控制器 2\" 外掛!" + +#: ../gui/Plugin.c:377 +msgid "Error closing CD-ROM plugin!" +msgstr "無法關閉 CD-ROM 外掛!" + +#: ../gui/Plugin.c:379 +msgid "Error closing SPU plugin!" +msgstr "無法關閉 SPU 外掛!" + +#: ../gui/Plugin.c:381 +msgid "Error closing Controller 1 Plugin!" +msgstr "無法關閉 \"控制器 1\" 外掛!" + +#: ../gui/Plugin.c:383 +msgid "Error closing Controller 2 plugin!" +msgstr "無法關閉 \"控制器 2\" 外掛!" + +#: ../gui/Plugin.c:385 +msgid "Error closing GPU plugin!" +msgstr "無法關閉 GPU 外掛!" + +#: ../libpcsxcore/cdriso.c:658 +#, c-format +msgid "Track %.2d (%s) - Start %.2d:%.2d:%.2d, Length %.2d:%.2d:%.2d\n" +msgstr "軌道 %.2d (%s) - 起始位置 %.2d:%.2d:%.2d, 長度 %.2d:%.2d:%.2d\n" + +#: ../libpcsxcore/cdriso.c:677 +#, c-format +msgid "Loaded CD Image: %s" +msgstr "已加載 CD 映像: %s" + +#: ../libpcsxcore/cheat.c:147 +#, c-format +msgid "Cheats loaded from: %s\n" +msgstr "金手指碼已加載: %s\n" + +#: ../libpcsxcore/cheat.c:179 +#, c-format +msgid "Cheats saved to: %s\n" +msgstr "金手指碼已保存: %s\n" + +#: ../libpcsxcore/cheat.c:322 +#: ../libpcsxcore/cheat.c:443 +msgid "(Untitled)" +msgstr "(未定名)" + +#: ../libpcsxcore/debug.c:317 +msgid "Error allocating memory" +msgstr "分配記憶體錯誤" + +#: ../libpcsxcore/debug.c:322 +msgid "Unable to start debug server.\n" +msgstr "無法啟動調試伺服器。\n" + +#: ../libpcsxcore/debug.c:326 +msgid "Debugger started.\n" +msgstr "調試器已啟動。\n" + +#: ../libpcsxcore/debug.c:333 +msgid "Debugger stopped.\n" +msgstr "調試器已停止。\n" + +#: ../libpcsxcore/misc.c:342 +#, c-format +msgid "CD-ROM Label: %.32s\n" +msgstr "CD-ROM 卷標: %.32s\n" + +#: ../libpcsxcore/misc.c:343 +#, c-format +msgid "CD-ROM ID: %.9s\n" +msgstr "CD-ROM ID: %.9s\n" + +#: ../libpcsxcore/misc.c:388 +#, c-format +msgid "Error opening file: %s.\n" +msgstr "開啟檔案錯誤: %s.\n" + +#: ../libpcsxcore/misc.c:428 +#, c-format +msgid "Unknown CPE opcode %02x at position %08x.\n" +msgstr "未知 CPE opcode %02x 位於 %08x.\n" + +#: ../libpcsxcore/misc.c:435 +msgid "COFF files not supported.\n" +msgstr "COFF 檔案不被支援.\n" + +#: ../libpcsxcore/misc.c:439 +msgid "This file does not appear to be a valid PSX file.\n" +msgstr "此檔案不是一個合法的 PSX 檔案。\n" + +#: ../libpcsxcore/plugins.c:181 +#, c-format +msgid "Error loading %s: %s" +msgstr "無法加載 %s: %s" + +#: ../libpcsxcore/plugins.c:221 +#, c-format +msgid "Could not load GPU plugin %s!" +msgstr "無法加載 GPU 外掛 %s!" + +#: ../libpcsxcore/plugins.c:292 +#, c-format +msgid "Could not load CD-ROM plugin %s!" +msgstr "無法加載 CD-ROM 外掛 %s!" + +#: ../libpcsxcore/plugins.c:340 +#, c-format +msgid "Could not load SPU plugin %s!" +msgstr "無法加載 SPU 外掛 %s!" + +#: ../libpcsxcore/plugins.c:477 +#, c-format +msgid "Could not load Controller 1 plugin %s!" +msgstr "無法加載 \"控制器1\" 外掛 %s!" + +#: ../libpcsxcore/plugins.c:531 +#, c-format +msgid "Could not load Controller 2 plugin %s!" +msgstr "無法加載 \"控制器2\" 外掛 %s!" + +#: ../libpcsxcore/plugins.c:574 +#, c-format +msgid "Could not load NetPlay plugin %s!" +msgstr "無法加載聯線遊戲外掛 %s!" + +#: ../libpcsxcore/plugins.c:654 +#, c-format +msgid "Could not load SIO1 plugin %s!" +msgstr "無法加載 SIO1 外掛 %s!" + +#: ../libpcsxcore/plugins.c:739 +#, c-format +msgid "Error initializing CD-ROM plugin: %d" +msgstr "CD-ROM 外掛初始化錯誤: %d" + +#: ../libpcsxcore/plugins.c:741 +#, c-format +msgid "Error initializing GPU plugin: %d" +msgstr "GPU 外掛初始化錯誤: %d" + +#: ../libpcsxcore/plugins.c:743 +#, c-format +msgid "Error initializing SPU plugin: %d" +msgstr "SPU 外掛初始化錯誤: %d" + +#: ../libpcsxcore/plugins.c:745 +#, c-format +msgid "Error initializing Controller 1 plugin: %d" +msgstr "\"控制器1\" 外掛初始化錯誤: %d" + +#: ../libpcsxcore/plugins.c:747 +#, c-format +msgid "Error initializing Controller 2 plugin: %d" +msgstr "\"控制器2\" 外掛初始化錯誤: %d" + +#: ../libpcsxcore/plugins.c:751 +#, c-format +msgid "Error initializing NetPlay plugin: %d" +msgstr "聯線遊戲外掛初始化錯誤: %d" + +#: ../libpcsxcore/plugins.c:756 +#, c-format +msgid "Error initializing SIO1 plugin: %d" +msgstr "SIO1 外掛初始化錯誤: %d" + +#: ../libpcsxcore/plugins.c:759 +msgid "Plugins loaded.\n" +msgstr "外掛已加載。\n" + +#: ../libpcsxcore/ppf.c:216 +#, c-format +msgid "Invalid PPF patch: %s.\n" +msgstr "無效 PPF 補丁: %s。\n" + +#: ../libpcsxcore/ppf.c:292 +#, c-format +msgid "Unsupported PPF version (%d).\n" +msgstr "不支援的 PPF 補丁版本 (%d)。\n" + +#: ../libpcsxcore/ppf.c:331 +#, c-format +msgid "Loaded PPF %d.0 patch: %s.\n" +msgstr "已加載 PPF %d.0 補丁: %s。\n" + +#: ../libpcsxcore/psxmem.c:80 +msgid "Error allocating memory!" +msgstr "分配記憶體錯誤!" + +#: ../libpcsxcore/psxmem.c:122 +#, c-format +msgid "Could not open BIOS:\"%s\". Enabling HLE Bios!\n" +msgstr "無法開啟 BIOS: \"%s\"。使用內部 HLE Bios。\n" + +#: ../libpcsxcore/r3000a.c:33 +#, c-format +msgid "Running PCSX Version %s (%s).\n" +msgstr "PCSX 版本 %s (%s) 執行中。\n" + +#: ../libpcsxcore/sio.c:345 +msgid "Connection closed!\n" +msgstr "連接被關閉!\n" + +#: ../libpcsxcore/sio.c:371 +#, c-format +msgid "No memory card value was specified - creating a default card %s\n" +msgstr "未指定記憶卡 - 創建一個新的記憶卡 %s\n" + +#: ../libpcsxcore/sio.c:375 +#, c-format +msgid "The memory card %s doesn't exist - creating it\n" +msgstr "記憶卡 %s 不存在 - 正在創建\n" + +#: ../libpcsxcore/sio.c:391 +#, c-format +msgid "Memory card %s failed to load!\n" +msgstr "記憶卡 %s 讀取失敗!\n" + +#: ../libpcsxcore/sio.c:395 +#, c-format +msgid "Loading memory card %s\n" +msgstr "正在加載記憶卡 %s\n" + +#: ../plugins/dfxvideo/gpu.c:55 +msgid "SoftGL Driver" +msgstr "SoftGL 驅動程式" + +#: ../plugins/dfxvideo/gpu.c:56 +msgid "" +"P.E.Op.S. SoftGL Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" +"P.E.Op.S. SoftGL Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" + +#: ../plugins/dfxvideo/gpu.c:58 +msgid "XVideo Driver" +msgstr "XVideo 驅動程式" + +#: ../plugins/dfxvideo/gpu.c:59 +msgid "" +"P.E.Op.S. Xvideo Driver V1.17\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" +"P.E.Op.S. Xvideo 驅動程序 V1.17\n" +"由 Pete Bernert 及 P.E.Op.S. 開發組編寫\n" + +#: ../plugins/dfxvideo/gpu.c:62 +msgid "Pete Bernert and the P.E.Op.S. team" +msgstr "Pete Bernert 和 P.E.Op.S. 開發組" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:8 +msgid "Configure X11 Video" +msgstr "設定 X11 Video" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:45 +msgid "Initial Window Size:" +msgstr "初始視窗大小:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:56 +msgid "Stretching:" +msgstr "拉抻:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:69 +msgid "Dithering:" +msgstr "抖動:" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:82 +msgid "" +"320x240\n" +"640x480\n" +"800x600\n" +"1024x768\n" +"1152x864\n" +"1280x1024\n" +"1600x1200" +msgstr "" +"320x240\n" +"640x480\n" +"800x600\n" +"1024x768\n" +"1152x864\n" +"1280x1024\n" +"1600x1200" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:101 +msgid "" +"0: None\n" +"1: 2xSai\n" +"2: 2xSuperSai\n" +"3: SuperEagle\n" +"4: Scale2x\n" +"5: Scale3x\n" +"6: HQ2X\n" +"7: HQ3X" +msgstr "" +"0: 無\n" +"1: 2xSai\n" +"2: 2xSuperSai\n" +"3: SuperEagle\n" +"4: Scale2x\n" +"5: Scale3x\n" +"6: HQ2X\n" +"7: HQ3X" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:123 +msgid "" +"0: Off (fastest)\n" +"1: Game dependant\n" +"2: Always" +msgstr "" +"0: 關閉 (最快)\n" +"1: 取決于遊戲\n" +"2: 總是開啟" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:146 +msgid "Maintain 4:3 Aspect Ratio" +msgstr "維持 4:3 縱橫比" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:161 +#: ../plugins/peopsxgl/gpucfg/interface.c:322 +msgid "Fullscreen" +msgstr "全螢幕" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:165 +msgid "Toggle windowed/fullscreen mode." +msgstr "切換視窗/全螢幕方式。" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:187 +msgid "Screen" +msgstr "螢幕" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:216 +msgid "Show FPS" +msgstr "顯示 FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:220 +msgid "Toggle whether the FPS will be shown." +msgstr "切換 FPS 是否將被顯示。" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:232 +msgid "Autodetect FPS limit" +msgstr "自動偵測 FPS 界限" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:236 +msgid "Enable this if games display too quickly." +msgstr "如遊戲顯示過快,請開啟此項。" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:249 +msgid "Enable frame skipping" +msgstr "開啟跳幀" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:253 +msgid "Skip frames when rendering." +msgstr "渲染時跳幀。" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:270 +msgid "Set FPS" +msgstr "設定 FPS" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:287 +msgid "200.0" +msgstr "200.0" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:310 +msgid "Framerate" +msgstr "幀率" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:339 +#: ../plugins/peopsxgl/gpucfg/interface.c:568 +msgid "Use game fixes" +msgstr "開啟遊戲修補" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:366 +msgid "better g-colors, worse textures" +msgstr "較好的 g-colors,較差的紋理" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:381 +msgid "Needed by Dark Forces" +msgstr "Dark Forces 需要" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:394 +msgid "Draw quads with triangles" +msgstr "用三角形繪製 quad" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:410 +msgid "Repeated flat tex triangles" +msgstr "重復平滑多邊形紋理" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:426 +msgid "Disable CPU Saving" +msgstr "禁用 CPU Saving" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:442 +msgid "Odd/even bit hack" +msgstr "奇偶位修正" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:458 +msgid "For precise framerate" +msgstr "確保準確幀率" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:473 +msgid "Better FPS limit in some" +msgstr "部分遊戲中可取得更佳的 FPS 界限" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:486 +msgid "PC FPS calculation" +msgstr "PC FPS 計算" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:504 +msgid "Pandemonium 2" +msgstr "Pandemonium 2" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:517 +msgid "Lazy screen update" +msgstr "延遲熒幕更新" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:535 +msgid "Skip every second frame" +msgstr "每兩幀跳過一幀" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:548 +#: ../plugins/peopsxgl/gpucfg/interface.c:640 +msgid "Old frame skipping" +msgstr "老式跳幀" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:564 +msgid "Expand screen width" +msgstr "擴展熒幕寬度" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:580 +msgid "Ignore brightness color" +msgstr "忽略高亮度顏色" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:596 +msgid "Disable coordinate check" +msgstr "禁用坐標檢查" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:614 +msgid "Chrono Cross" +msgstr "Chrono Cross" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:627 +msgid "Capcom fighting games" +msgstr "Capcom 格鬥遊戲" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:642 +msgid "Black screens in Lunar" +msgstr "Lunar 中黑螢幕" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:657 +msgid "Compatibility mode" +msgstr "相容方式" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:670 +msgid "Fake 'gpu busy' states" +msgstr "欺騙 'gpu 忙'" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:688 +msgid "Toggle busy flags after drawing" +msgstr "繪製後切換忙碌標誌" + +#: ../plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2:713 +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:268 +msgid "Compatibility" +msgstr "相容性" + +#: ../data/pcsx.glade2:7 +msgid "PCSX" +msgstr "PCSX" + +#: ../data/pcsx.glade2:21 +msgid "_File" +msgstr "檔案(_F)" + +#: ../data/pcsx.glade2:27 +msgid "Run _CD" +msgstr "執行光碟(_C)" + +#: ../data/pcsx.glade2:45 +msgid "Run _ISO..." +msgstr "執行 _ISO..." + +#: ../data/pcsx.glade2:62 +msgid "Run _BIOS" +msgstr "執行 _BIOS" + +#: ../data/pcsx.glade2:79 +msgid "Run _EXE..." +msgstr "執行 _EXE..." + +#: ../data/pcsx.glade2:101 +msgid "E_xit" +msgstr "離開(_X)" + +#: ../data/pcsx.glade2:123 +msgid "_Emulator" +msgstr "模擬器(_E)" + +#: ../data/pcsx.glade2:129 +msgid "_Continue" +msgstr "繼續(_C)" + +#: ../data/pcsx.glade2:146 +msgid "_Reset" +msgstr "複位(_R)" + +#: ../data/pcsx.glade2:168 +msgid "S_witch ISO..." +msgstr "更換 ISO(_W)" + +#: ../data/pcsx.glade2:190 +msgid "_Save State" +msgstr "存儲記錄(_S)" + +#: ../data/pcsx.glade2:199 +#: ../data/pcsx.glade2:280 +msgid "Slot _1" +msgstr "記錄 _1" + +#: ../data/pcsx.glade2:208 +#: ../data/pcsx.glade2:289 +msgid "Slot _2" +msgstr "記錄 _2" + +#: ../data/pcsx.glade2:217 +#: ../data/pcsx.glade2:298 +msgid "Slot _3" +msgstr "記錄 _3" + +#: ../data/pcsx.glade2:226 +#: ../data/pcsx.glade2:307 +msgid "Slot _4" +msgstr "記錄 _4" + +#: ../data/pcsx.glade2:235 +#: ../data/pcsx.glade2:316 +msgid "Slot _5" +msgstr "記錄 _5" + +#: ../data/pcsx.glade2:243 +#: ../data/pcsx.glade2:324 +msgid "_Other..." +msgstr "其它(_O)..." + +#: ../data/pcsx.glade2:271 +msgid "_Load State" +msgstr "讀取記錄(_L)" + +#: ../data/pcsx.glade2:357 +msgid "_Configuration" +msgstr "設定(_C)" + +#: ../data/pcsx.glade2:363 +msgid "_Plugins & BIOS..." +msgstr "外掛及 BIOS(_P)..." + +#: ../data/pcsx.glade2:385 +msgid "_Graphics..." +msgstr "圖像(_G)..." + +#: ../data/pcsx.glade2:400 +msgid "_Sound..." +msgstr "聲音(_S)..." + +#: ../data/pcsx.glade2:415 +msgid "CD-_ROM..." +msgstr "CD-_ROM..." + +#: ../data/pcsx.glade2:430 +msgid "C_ontrollers..." +msgstr "控制器(_O)..." + +#: ../data/pcsx.glade2:450 +msgid "_CPU..." +msgstr "_CPU..." + +#: ../data/pcsx.glade2:466 +msgid "_Memory Cards..." +msgstr "記憶卡(_M)..." + +#: ../data/pcsx.glade2:483 +msgid "_Netplay..." +msgstr "聯線遊戲(_N)..." + +#: ../data/pcsx.glade2:504 +msgid "Chea_t" +msgstr "金手指(_T)" + +#: ../data/pcsx.glade2:513 +msgid "_Browse..." +msgstr "檢視(_B)..." + +#: ../data/pcsx.glade2:528 +msgid "_Search..." +msgstr "搜尋(_S)..." + +#: ../data/pcsx.glade2:554 +msgid "Memory _Dump" +msgstr "記憶體轉儲(_D)" + +#: ../data/pcsx.glade2:574 +msgid "_Help" +msgstr "說明(_H)" + +#: ../data/pcsx.glade2:580 +msgid "_About PCSX..." +msgstr "關於 PCSX(_A)..." + +#: ../data/pcsx.glade2:613 +#: ../data/pcsx.glade2:614 +msgid "Run CD" +msgstr "執行光碟" + +#: ../data/pcsx.glade2:626 +msgid "Run ISO Image" +msgstr "執行 ISO 光碟映像" + +#: ../data/pcsx.glade2:627 +msgid "Run ISO..." +msgstr "執行 ISO..." + +#: ../data/pcsx.glade2:648 +msgid "Continue Emulation" +msgstr "繼續模擬" + +#: ../data/pcsx.glade2:649 +msgid "Continue..." +msgstr "繼續..." + +#: ../data/pcsx.glade2:661 +msgid "Switch ISO Image" +msgstr "更換 ISO 光碟映像" + +#: ../data/pcsx.glade2:662 +msgid "Switch ISO..." +msgstr "更換 ISO..." + +#: ../data/pcsx.glade2:683 +#: ../data/pcsx.glade2:1810 +msgid "Configure Memory Cards" +msgstr "記憶卡設定" + +#: ../data/pcsx.glade2:684 +msgid "Memcards..." +msgstr "記憶卡..." + +#: ../data/pcsx.glade2:696 +msgid "Configure Graphics" +msgstr "圖像設定" + +#: ../data/pcsx.glade2:697 +msgid "Graphics..." +msgstr "圖像..." + +#: ../data/pcsx.glade2:709 +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:8 +msgid "Configure Sound" +msgstr "聲音設定" + +#: ../data/pcsx.glade2:710 +msgid "Sound..." +msgstr "聲音..." + +#: ../data/pcsx.glade2:722 +msgid "Configure CD-ROM" +msgstr "CD-ROM 設定" + +#: ../data/pcsx.glade2:723 +msgid "CD-ROM..." +msgstr "CD-ROM..." + +#: ../data/pcsx.glade2:735 +msgid "Configure Controllers" +msgstr "控制器設定" + +#: ../data/pcsx.glade2:736 +msgid "Controllers..." +msgstr "控制器..." + +#: ../data/pcsx.glade2:879 +msgid "Select Folder to Search" +msgstr "選擇要檢索的資料夾" + +#: ../data/pcsx.glade2:895 +msgid "Search in:" +msgstr "在此處檢索外掛:" + +#: ../data/pcsx.glade2:1168 +msgid "Graphics:" +msgstr "圖像:" + +#: ../data/pcsx.glade2:1181 +msgid "Sound:" +msgstr "聲音:" + +#: ../data/pcsx.glade2:1196 +msgid "Controller 1: " +msgstr "控制器 1:" + +#: ../data/pcsx.glade2:1211 +msgid "Controller 2:" +msgstr "控制器 2:" + +#: ../data/pcsx.glade2:1226 +msgid "CD-ROM:" +msgstr "CD-ROM:" + +#: ../data/pcsx.glade2:1264 +msgid "Plugins" +msgstr "外掛" + +#: ../data/pcsx.glade2:1325 +msgid "BIOS" +msgstr "BIOS" + +#: ../data/pcsx.glade2:1375 +msgid "Configure CPU" +msgstr "CPU 設定" + +#: ../data/pcsx.glade2:1419 +msgid "SPU IRQ Always Enabled" +msgstr "SPU IRQ 總是開啟" + +#: ../data/pcsx.glade2:1435 +msgid "Black & White Movies" +msgstr "黑白電影" + +#: ../data/pcsx.glade2:1469 +msgid "Enable Interpreter CPU" +msgstr "開啟解釋執行 CPU" + +#: ../data/pcsx.glade2:1503 +msgid "Disable CD Audio" +msgstr "禁用 CD 音頻" + +#: ../data/pcsx.glade2:1519 +msgid "Disable XA Decoding" +msgstr "禁用 XA 解碼" + +#: ../data/pcsx.glade2:1571 +msgid "Options" +msgstr "選項" + +#: ../data/pcsx.glade2:1612 +msgid "" +"NTSC\n" +"PAL" +msgstr "" +"NTSC\n" +"PAL" + +#: ../data/pcsx.glade2:1626 +msgid "System Type" +msgstr "系統類型" + +#: ../data/pcsx.glade2:1674 +msgid "Configure NetPlay" +msgstr "聯線遊戲設定" + +#: ../data/pcsx.glade2:1760 +msgid "NetPlay" +msgstr "聯線遊戲" + +#: ../data/pcsx.glade2:1886 +#: ../data/pcsx.glade2:2283 +msgid "New" +msgstr "新增" + +#: ../data/pcsx.glade2:1936 +#: ../data/pcsx.glade2:2333 +msgid "Format" +msgstr "格式化" + +#: ../data/pcsx.glade2:1986 +#: ../data/pcsx.glade2:2383 +msgid "Un/Delete" +msgstr "刪除/恢複" + +#: ../data/pcsx.glade2:2079 +msgid "Memory Card 1" +msgstr "記憶卡 1" + +#: ../data/pcsx.glade2:2139 +#: ../data/pcsx.glade2:2189 +#: ../data/pcsx.glade2:3002 +msgid "Copy" +msgstr "複制" + +#: ../data/pcsx.glade2:2476 +msgid "Memory Card 2" +msgstr "記憶卡 2" + +#: ../data/pcsx.glade2:2572 +msgid "Cheat Codes" +msgstr "金手指碼" + +#: ../data/pcsx.glade2:2736 +msgid "" +"8-bit\n" +"16-bit\n" +"32-bit" +msgstr "" +"8 位元\n" +"16 位元\n" +"32 位元" + +#: ../data/pcsx.glade2:2799 +msgid "" +"Equal Value\n" +"Not Equal Value\n" +"Range\n" +"Increased By\n" +"Decreased By\n" +"Increased\n" +"Decreased\n" +"Different\n" +"No Change" +msgstr "" +"等于數值\n" +"不等于數值\n" +"範圍\n" +"增加數值\n" +"減少數值\n" +"增加\n" +"減少\n" +"不同\n" +"無變動" + +#: ../data/pcsx.glade2:2831 +msgid "" +"Decimal\n" +"Hexadecimal" +msgstr "" +"十進制\n" +"十六進制" + +#: ../data/pcsx.glade2:3035 +msgid "label_resultsfound" +msgstr "label_resultsfound" + +#: ../data/pcsx.glade2:3070 +msgid "Search" +msgstr "搜尋" + +#: ../data/pcsx.glade2:3106 +msgid "Restart" +msgstr "重新開始" + +#: ../data/pcsx.glade2:3135 +msgid "Cheat Search" +msgstr "金手指碼搜尋" + +#: ../data/pcsx.glade2:3291 +msgid "Raw Dump..." +msgstr "Raw 轉儲..." + +#: ../data/pcsx.glade2:3326 +msgid "Patch Memory..." +msgstr "修改記憶體..." + +#: ../plugins/dfsound/spu.c:38 +msgid "Mac OS X Sound" +msgstr "Mac OS X 聲音" + +#: ../plugins/dfsound/spu.c:40 +msgid "ALSA Sound" +msgstr "ALSA 聲音" + +#: ../plugins/dfsound/spu.c:42 +msgid "OSS Sound" +msgstr "OSS 聲音" + +#: ../plugins/dfsound/spu.c:44 +msgid "SDL Sound" +msgstr "SDL 聲音" + +#: ../plugins/dfsound/spu.c:46 +msgid "PulseAudio Sound" +msgstr "PulseAudio 聲音" + +#: ../plugins/dfsound/spu.c:48 +msgid "NULL Sound" +msgstr "NULL 聲音" + +#: ../plugins/dfsound/spu.c:51 +msgid "" +"P.E.Op.S. Sound Driver V1.7\n" +"Coded by Pete Bernert and the P.E.Op.S. team\n" +msgstr "" +"P.E.Op.S. Sound 驅動程式 V1.7\n" +"由 Pete Bernert 及 P.E.Op.S. 開發組編寫\n" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:42 +msgid "Volume:" +msgstr "音量:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:54 +msgid "Interpolation:" +msgstr "插值:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:68 +msgid "Reverb:" +msgstr "回響:" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:81 +msgid "" +"Low\n" +"Medium\n" +"Loud\n" +"Loudest" +msgstr "" +"低\n" +"中\n" +"高\n" +"最高" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:95 +msgid "" +"Off\n" +"Simple\n" +"Playstation" +msgstr "" +"關閉\n" +"簡易\n" +"Playstation" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:111 +msgid "" +"None\n" +"Simple\n" +"Gaussian\n" +"Cubic" +msgstr "" +"無\n" +"簡易\n" +"高斯\n" +"立方" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:132 +msgid "General" +msgstr "一般" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:163 +msgid "Adjust XA speed" +msgstr "調整 XA 速度" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:167 +msgid "Choose this if XA music is played too quickly." +msgstr "如 XA 音樂播放得過快,選中此項。" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:184 +msgid "XA Music" +msgstr "XA 音樂" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:215 +msgid "High compatibility mode" +msgstr "高相容性模式" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:219 +msgid "Use the asynchronous SPU interface." +msgstr "使用異步 SPU 介面。" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:231 +msgid "SPU IRQ Wait" +msgstr "SPU IRQ 等待" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:235 +msgid "Wait for CPU; only useful for some games." +msgstr "等待 CPU;僅在一部分遊戲中有效。" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:247 +msgid "Single channel sound" +msgstr "單聲道聲音" + +#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:251 +msgid "Play only one channel for a performance boost." +msgstr "僅播放一個聲道以提高性能。" + +#: ../plugins/dfcdrom/cdr-libcdio.c:29 +#: ../plugins/dfcdrom/cdr-linux.c:29 +msgid "CD-ROM Drive Reader" +msgstr "CD-ROM 裝置讀取外掛" + +#: ../plugins/dfcdrom/cdr-null.c:26 +msgid "CDR NULL Plugin" +msgstr "CDR NULL 外掛" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/main.c:219 +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:8 +msgid "CDR configuration" +msgstr "CDR 設定" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:33 +msgid "Choose your CD-ROM device or type its path if it's not listed" +msgstr "選擇 CD-ROM 裝置,如未列出請輸入其路徑" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:44 +msgid "Select CD-ROM device" +msgstr "選擇 CD-ROM 裝置" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:72 +msgid "Select read mode:" +msgstr "選擇讀取模式:" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:83 +msgid "" +"Normal (No Cache)\n" +"Threaded - Faster (With Cache)" +msgstr "" +"正常 (無快取)\n" +"多執行緒 - 較快 (使用快取)" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:114 +msgid "Cache Size (Def. 64):" +msgstr "快取大小 (缺省 64):" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:159 +msgid "Spindown Time:" +msgstr "電機停轉時限:" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:170 +msgid "" +"Default\n" +"125ms\n" +"250ms\n" +"500ms\n" +"1s\n" +"2s\n" +"4s\n" +"8s\n" +"16s\n" +"32s\n" +"1min\n" +"2min\n" +"4min\n" +"8min\n" +"16min\n" +"32min" +msgstr "" +"缺省\n" +"125 毫秒\n" +"250 毫秒\n" +"500 毫秒\n" +"1 秒\n" +"2 秒\n" +"4 秒\n" +"8 秒\n" +"16 秒\n" +"32 秒\n" +"1 分鐘\n" +"2 分鐘\n" +"4 分鐘\n" +"8 分鐘\n" +"16 分鐘\n" +"32 分鐘" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:216 +msgid "Cdrom Speed (Def. 0 = MAX):" +msgstr "Cdrom 速度 (缺省 0 = 最快):" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:248 +msgid "hseparator" +msgstr "hseparator" + +#: ../plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2:258 +msgid "Enable subchannel read" +msgstr "開啟子通道讀取" + +#: ../plugins/peopsxgl/gpu.c:61 +msgid "OpenGL Driver" +msgstr "OpenGL 驅動程式" + +#: ../plugins/peopsxgl/gpu.c:63 +msgid "Pete Bernert" +msgstr "Pete Bernert" + +#: ../plugins/peopsxgl/gpu.c:64 +msgid "" +"Based on P.E.Op.S. MesaGL Driver V1.78\n" +"Coded by Pete Bernert\n" +msgstr "" +"基于 P.E.Op.S. MesaGL 驅動程式 V1.78\n" +"由 Pete Bernert 編寫\n" + +#: ../plugins/peopsxgl/gpucfg/interface.c:118 +msgid "OpenGL Driver configuration" +msgstr "OpenGL 驅動程式設定" + +#: ../plugins/peopsxgl/gpucfg/interface.c:138 +msgid "Textures" +msgstr "紋理" + +#: ../plugins/peopsxgl/gpucfg/interface.c:161 +msgid "Quality:" +msgstr "質量:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:178 +#: ../plugins/peopsxgl/gpucfg/interface.c:191 +msgid "0: don't care - Use driver's default textures" +msgstr "0: 不設定 - 使用驅動程式缺省紋理" + +#: ../plugins/peopsxgl/gpucfg/interface.c:179 +msgid "1: 4444 - Fast, but less colorful" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:180 +msgid "2: 5551 - Nice colors, bad transparency" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:181 +msgid "3: 8888 - Best colors, more ram needed" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:182 +msgid "4: BGR8888 - Faster on some cards" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:193 +msgid "VRam size in MBytes (0..1024, 0=auto):" +msgstr "顯存大小 MB (0..1024, 0=自動):" + +#: ../plugins/peopsxgl/gpucfg/interface.c:210 +#: ../plugins/peopsxgl/gpucfg/interface.c:225 +msgid "0: None" +msgstr "0: 無" + +#: ../plugins/peopsxgl/gpucfg/interface.c:211 +msgid "1: Standard - Glitches will happen" +msgstr "1: 標準 - 可能有問題" + +#: ../plugins/peopsxgl/gpucfg/interface.c:212 +msgid "2: Extended - No black borders" +msgstr "2: 擴展 - 無黑色邊緣" + +#: ../plugins/peopsxgl/gpucfg/interface.c:213 +msgid "3: Standard without sprites - unfiltered 2D" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:214 +msgid "4: Extended without sprites - unfiltered 2D" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:215 +msgid "5: Standard + smoothed sprites" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:216 +msgid "6: Extended + smoothed sprites" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:227 +msgid "Filtering:" +msgstr "過濾:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:235 +msgid "HiRes Tex:" +msgstr "高分辨率紋理:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:252 +#: ../plugins/peopsxgl/gpucfg/interface.c:263 +msgid "0: None (standard)" +msgstr "0: 無 (標準)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:253 +msgid "1: 2xSaI (much vram needed)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:254 +msgid "2: Scaled (needs tex filtering)" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:265 +msgid "Window options" +msgstr "視窗設定" + +#: ../plugins/peopsxgl/gpucfg/interface.c:296 +msgid "Width:" +msgstr "寬度:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:305 +msgid "Height:" +msgstr "高度:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:314 +msgid "Keep psx aspect ratio" +msgstr "保持 psx 縱橫比" + +#: ../plugins/peopsxgl/gpucfg/interface.c:330 +msgid "Dithering" +msgstr "抖動" + +#: ../plugins/peopsxgl/gpucfg/interface.c:346 +msgid "Framerate" +msgstr "幀率" + +#: ../plugins/peopsxgl/gpucfg/interface.c:369 +msgid "FPS" +msgstr "FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:377 +msgid "FPS limit manual" +msgstr "手動設定 FPS 界限" + +#: ../plugins/peopsxgl/gpucfg/interface.c:386 +msgid "Show FPS display on startup" +msgstr "啟動時顯示 FPS" + +#: ../plugins/peopsxgl/gpucfg/interface.c:394 +msgid "Use FPS limit" +msgstr "开啟 FPS 界限" + +#: ../plugins/peopsxgl/gpucfg/interface.c:402 +msgid "FPS limit auto-detection" +msgstr "FPS 界限自動偵測" + +#: ../plugins/peopsxgl/gpucfg/interface.c:411 +msgid "Use Frame skipping" +msgstr "開啟跳幀" + +#: ../plugins/peopsxgl/gpucfg/interface.c:419 +msgid "Compatibility" +msgstr "相容性" + +#: ../plugins/peopsxgl/gpucfg/interface.c:434 +msgid "Advanced blending (Accurate psx color emulation)" +msgstr "高級混合 (準確的 psx 顏色模擬)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:442 +msgid "Framebuffer textures:" +msgstr "Framebuffer 紋理:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:450 +msgid "Offscreen Drawing:" +msgstr "離熒幕描繪:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:458 +msgid "Framebuffer access:" +msgstr "Framebuffer 存取:" + +#: ../plugins/peopsxgl/gpucfg/interface.c:466 +msgid "Alpha Multipass (correct opaque texture areas)" +msgstr "半透明多通道 (更正不透明的紋理區域)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:474 +msgid "Mask bit detection (needed by a few games, zbuffer)" +msgstr "屏蔽位偵測 (部分遊戲需要, zbuffer)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:491 +#: ../plugins/peopsxgl/gpucfg/interface.c:504 +msgid "0: None - Fastest, most glitches" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:492 +msgid "1: Minimum - Missing screens" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:493 +msgid "2: Standard - OK for most games" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:494 +msgid "3: Enhanced - Shows more stuff" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:495 +msgid "4: Extended - Causing garbage" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:515 +#: ../plugins/peopsxgl/gpucfg/interface.c:527 +msgid "0: Emulated vram - Needs FVP" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:516 +msgid "1: Black - Fast, no effects" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:517 +msgid "2: Gfx card buffer - Can be slow" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:518 +msgid "3: Gfx card & soft - slow" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:538 +#: ../plugins/peopsxgl/gpucfg/interface.c:551 +msgid "0: Emulated vram - ok most times" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:539 +msgid "1: Gfx card buffer reads" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:540 +msgid "2: Gfx card buffer moves" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:541 +msgid "3: Gfx buffer reads & moves" +msgstr "" + +#: ../plugins/peopsxgl/gpucfg/interface.c:542 +msgid "4: Full Software (FVP)" +msgstr "4: 全軟體 (FVP)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:553 +msgid "Special game fixes" +msgstr "特定遊戲修正" + +#: ../plugins/peopsxgl/gpucfg/interface.c:576 +msgid "Battle cursor (FF7)" +msgstr "戰鬥光標 (FF7)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:584 +msgid "Direct FB updates" +msgstr "直接 FB 更新" + +#: ../plugins/peopsxgl/gpucfg/interface.c:592 +msgid "Black brightness (Lunar)" +msgstr "黑色亮度 (Lunar)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:600 +msgid "Swap front detection" +msgstr "swap front 偵測" + +#: ../plugins/peopsxgl/gpucfg/interface.c:608 +msgid "Disable coord check" +msgstr "禁用坐標檢查" + +#: ../plugins/peopsxgl/gpucfg/interface.c:616 +msgid "No blue glitches (LoD)" +msgstr "無藍色干擾 (LoD)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:624 +msgid "Soft FB access" +msgstr "軟 FB 存取" + +#: ../plugins/peopsxgl/gpucfg/interface.c:632 +msgid "PC fps calculation" +msgstr "PC fps 計算" + +#: ../plugins/peopsxgl/gpucfg/interface.c:648 +msgid "Yellow rect (FF9)" +msgstr "黃色方塊 (FF9)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:656 +msgid "No subtr. blending" +msgstr "無 subtr. 混合" + +#: ../plugins/peopsxgl/gpucfg/interface.c:664 +msgid "Lazy upload (DW7)" +msgstr "延遲上傳 (DW7)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:672 +msgid "Odd/even hack" +msgstr "奇偶位修正" + +#: ../plugins/peopsxgl/gpucfg/interface.c:680 +msgid "Adjust screen width" +msgstr "調整熒幕寬度" + +#: ../plugins/peopsxgl/gpucfg/interface.c:688 +msgid "Old texture filtering" +msgstr "老式紋理過濾" + +#: ../plugins/peopsxgl/gpucfg/interface.c:696 +msgid "Additional uploads" +msgstr "附加上傳" + +#: ../plugins/peopsxgl/gpucfg/interface.c:704 +msgid "unused" +msgstr "未使用" + +#: ../plugins/peopsxgl/gpucfg/interface.c:712 +msgid "Fake 'gpu busy'" +msgstr "欺騙 'gpu 忙'" + +#: ../plugins/peopsxgl/gpucfg/interface.c:720 +msgid "Misc" +msgstr "雜項" + +#: ../plugins/peopsxgl/gpucfg/interface.c:743 +msgid "Scanlines" +msgstr "掃描線" + +#: ../plugins/peopsxgl/gpucfg/interface.c:751 +msgid "Blending (0..255, -1=dot):" +msgstr "混合 (0..255, -1=dot):" + +#: ../plugins/peopsxgl/gpucfg/interface.c:759 +msgid "Screen smoothing (can be slow or unsupported)" +msgstr "平滑熒幕 (可能較慢或不被支援)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:767 +msgid "Use OpenGL extensions (recommended)" +msgstr "使用 OpenGL 擴展 (建議使用)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:775 +msgid "Polygon anti-aliasing (slow with most cards)" +msgstr "多邊形抗鋸齒 (對于大多數顯卡較慢)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:783 +msgid "Line mode (polygons will not get filled)" +msgstr "直線模式 (多邊形將不被填充)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:791 +msgid "Force 15 bit framebuffer updates (faster movies)" +msgstr "強制 15 位 framebuffer 更新 (影片較快)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:799 +msgid "Unfiltered MDECs (small movie speedup)" +msgstr "非過濾 MDECs (微小的影片加速)" + +#: ../plugins/peopsxgl/gpucfg/interface.c:852 +msgid "Adapted from P.E.Op.S OpenGL GPU by Pete Bernert" +msgstr "基於由 Pete Bernert 編寫的 P.E.Op.S OpenGL GPU" + +#: ../plugins/peopsxgl/gpucfg/interface.c:861 +msgid "Homepage: http://www.pbernert.com" +msgstr "網址: http://www.pbernert.com" + +#: ../plugins/peopsxgl/gpucfg/interface.c:879 +msgid "Version: 1.78" +msgstr "版本: 1.78" + +#: ../plugins/dfinput/cfg-gtk2.c:48 +msgid "D-Pad Up" +msgstr "上方向鍵" + +#: ../plugins/dfinput/cfg-gtk2.c:49 +msgid "D-Pad Down" +msgstr "下方向鍵" + +#: ../plugins/dfinput/cfg-gtk2.c:50 +msgid "D-Pad Left" +msgstr "左方向鍵" + +#: ../plugins/dfinput/cfg-gtk2.c:51 +msgid "D-Pad Right" +msgstr "右方向鍵" + +#: ../plugins/dfinput/cfg-gtk2.c:52 +msgid "Cross" +msgstr "叉號鍵" + +#: ../plugins/dfinput/cfg-gtk2.c:53 +msgid "Circle" +msgstr "圓圈鍵" + +#: ../plugins/dfinput/cfg-gtk2.c:54 +msgid "Square" +msgstr "方塊鍵" + +#: ../plugins/dfinput/cfg-gtk2.c:55 +msgid "Triangle" +msgstr "三角鍵" + +#: ../plugins/dfinput/cfg-gtk2.c:56 +msgid "L1" +msgstr "L1" + +#: ../plugins/dfinput/cfg-gtk2.c:57 +msgid "R1" +msgstr "R1" + +#: ../plugins/dfinput/cfg-gtk2.c:58 +msgid "L2" +msgstr "L2" + +#: ../plugins/dfinput/cfg-gtk2.c:59 +msgid "R2" +msgstr "R2" + +#: ../plugins/dfinput/cfg-gtk2.c:60 +msgid "Select" +msgstr "選擇鍵" + +#: ../plugins/dfinput/cfg-gtk2.c:61 +msgid "Start" +msgstr "開始鍵" + +#: ../plugins/dfinput/cfg-gtk2.c:62 +msgid "L3" +msgstr "L3" + +#: ../plugins/dfinput/cfg-gtk2.c:63 +msgid "R3" +msgstr "R3" + +#: ../plugins/dfinput/cfg-gtk2.c:67 +msgid "L-Stick Right" +msgstr "左搖桿右方向" + +#: ../plugins/dfinput/cfg-gtk2.c:68 +msgid "L-Stick Left" +msgstr "左搖桿左方向" + +#: ../plugins/dfinput/cfg-gtk2.c:69 +msgid "L-Stick Down" +msgstr "左搖桿下方向" + +#: ../plugins/dfinput/cfg-gtk2.c:70 +msgid "L-Stick Up" +msgstr "左搖桿上方向" + +#: ../plugins/dfinput/cfg-gtk2.c:71 +msgid "R-Stick Right" +msgstr "右搖桿右方向" + +#: ../plugins/dfinput/cfg-gtk2.c:72 +msgid "R-Stick Left" +msgstr "右搖桿左方向" + +#: ../plugins/dfinput/cfg-gtk2.c:73 +msgid "R-Stick Down" +msgstr "右搖桿下方向" + +#: ../plugins/dfinput/cfg-gtk2.c:74 +msgid "R-Stick Up" +msgstr "右搖桿上方向" + +#: ../plugins/dfinput/cfg-gtk2.c:103 +#: ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Centered" +msgstr "居中" + +#: ../plugins/dfinput/cfg-gtk2.c:103 +#: ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Up" +msgstr "上" + +#: ../plugins/dfinput/cfg-gtk2.c:103 +#: ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Right" +msgstr "右" + +#: ../plugins/dfinput/cfg-gtk2.c:103 +#: ../plugins/dfinput/cfg-gtk2.c:142 +msgid "Rightup" +msgstr "右上" + +#: ../plugins/dfinput/cfg-gtk2.c:104 +#: ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Down" +msgstr "下" + +#: ../plugins/dfinput/cfg-gtk2.c:104 +#: ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Rightdown" +msgstr "右下" + +#: ../plugins/dfinput/cfg-gtk2.c:104 +#: ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Left" +msgstr "å·¦" + +#: ../plugins/dfinput/cfg-gtk2.c:104 +#: ../plugins/dfinput/cfg-gtk2.c:143 +msgid "Leftup" +msgstr "左上" + +#: ../plugins/dfinput/cfg-gtk2.c:105 +#: ../plugins/dfinput/cfg-gtk2.c:144 +msgid "Leftdown" +msgstr "左下" + +#: ../plugins/dfinput/cfg-gtk2.c:109 +#: ../plugins/dfinput/cfg-gtk2.c:148 +#, c-format +msgid "Joystick: Button %d" +msgstr "手把: 按鈕 %d" + +#: ../plugins/dfinput/cfg-gtk2.c:113 +#: ../plugins/dfinput/cfg-gtk2.c:152 +#, c-format +msgid "Joystick: Axis %d%c" +msgstr "手把: 軸 %d%c" + +#: ../plugins/dfinput/cfg-gtk2.c:118 +#: ../plugins/dfinput/cfg-gtk2.c:157 +#, c-format +msgid "Joystick: Hat %d %s" +msgstr "手把: Hat %d %s" + +#: ../plugins/dfinput/cfg-gtk2.c:133 +#: ../plugins/dfinput/cfg-gtk2.c:172 +msgid "Keyboard:" +msgstr "鍵盤:" + +#: ../plugins/dfinput/cfg-gtk2.c:137 +#: ../plugins/dfinput/cfg-gtk2.c:176 +msgid "(Not Set)" +msgstr "(未設定)" + +#: ../plugins/dfinput/cfg-gtk2.c:539 +msgid "None" +msgstr "無" + +#: ../plugins/dfinput/cfg-gtk2.c:581 +msgid "Gamepad/Keyboard Input Configuration" +msgstr "手把/鍵盤輸入設定" + +#: ../plugins/dfinput/cfg-gtk2.c:587 +#: ../plugins/dfinput/cfg-gtk2.c:607 +msgid "Key" +msgstr "按鍵" + +#: ../plugins/dfinput/cfg-gtk2.c:593 +#: ../plugins/dfinput/cfg-gtk2.c:613 +msgid "Button" +msgstr "按鈕" + +#: ../plugins/dfinput/pad.c:22 +msgid "Gamepad/Keyboard Input" +msgstr "手把/鍵盤輸入" + +#: ../plugins/dfinput/dfinput.glade2:35 +#: ../plugins/dfinput/dfinput.glade2:232 +msgid "Device:" +msgstr "裝置:" + +#: ../plugins/dfinput/dfinput.glade2:66 +#: ../plugins/dfinput/dfinput.glade2:263 +msgid "Type:" +msgstr "類型:" + +#: ../plugins/dfinput/dfinput.glade2:78 +#: ../plugins/dfinput/dfinput.glade2:275 +msgid "" +"Digital Pad\n" +"Analog Pad" +msgstr "" +"數字手把\n" +"模擬手把" + +#: ../plugins/dfinput/dfinput.glade2:149 +#: ../plugins/dfinput/dfinput.glade2:346 +msgid "Change" +msgstr "更改" + +#: ../plugins/dfinput/dfinput.glade2:185 +#: ../plugins/dfinput/dfinput.glade2:382 +msgid "Reset" +msgstr "重置" + +#: ../plugins/dfinput/dfinput.glade2:210 +msgid "Controller 1" +msgstr "控制器 1" + +#: ../plugins/dfinput/dfinput.glade2:412 +msgid "Controller 2" +msgstr "控制器 2" + +#: ../plugins/dfinput/dfinput.glade2:427 +msgid "Multi-Threaded (Recommended)" +msgstr "多執行緒 (建議使用)" + +#: ../plugins/dfnet/dfnet.c:23 +msgid "Socket Driver" +msgstr "Socket 驅動程式" + +#: ../plugins/dfnet/dfnet.c:161 +#, c-format +msgid "error connecting to %s: %s\n" +msgstr "無法連線至 %s: %s\n" + +#: ../plugins/dfnet/dfnet.c:186 +msgid "Error allocating memory!\n" +msgstr "分配記憶體錯誤!\n" + +#: ../plugins/dfnet/gui.c:39 +msgid "Nothing to configure" +msgstr "沒有可以配置的內容" + +#: ../plugins/dfnet/gui.c:95 +#, c-format +msgid "IP %s" +msgstr "IP %s" + +#: ../plugins/dfnet/gui.c:165 +msgid "Waiting for connection..." +msgstr "等待連線中..." + +#: ../plugins/dfnet/gui.c:168 +msgid "The Client should now Start a Connection, waiting..." +msgstr "客戶端現在應開始連線,等待中..." + +#: ../plugins/dfnet/dfnet.glade2:23 +msgid "" +"Select here if you'll be Server (Player1) or Client (Player2).\n" +"\n" +"If you select Server you must Copy your IP address to the Clipboard and paste if (Ctrl+V) wherever the Client can see it.\n" +"\n" +"If you selected Client please enter the IP address the Server gave to you in the IP Address Control." +msgstr "" +"在此選擇以伺服器端 (玩家 1) 還是客戶端 (玩家 2) 方式執行。\n" +"\n" +"如果您選擇伺服器端,您必須將您的 IP 地址複制到剪貼板並告知客戶端。\n" +"\n" +"如果您選擇客戶端,請輸入伺服器端提供給您的 IP 地址。" + +#: ../plugins/dfnet/dfnet.glade2:63 +msgid "Copy PC IP to Clipboard" +msgstr "將本機 IP 複制到剪貼板" + +#: ../plugins/dfnet/dfnet.glade2:94 +msgid "Server (Player1)" +msgstr "伺服器 (玩家 1)" + +#: ../plugins/dfnet/dfnet.glade2:104 +msgid "Client (Player2)" +msgstr "客戶端 (玩家 2)" + +#: ../plugins/dfnet/dfnet.glade2:130 +msgid "Do not change if not necessary (remember it must be changed on both sides)." +msgstr "如非必要請勿更改 (必須在兩端都要更改)。" + +#: ../plugins/dfnet/dfnet.glade2:143 +msgid "Port Number" +msgstr "Port 號" + +#: ../plugins/dfnet/dfnet.glade2:202 +msgid "Start Game" +msgstr "開始遊戲" + +#: ../plugins/dfnet/dfnet.glade2:240 +msgid "Play Offline" +msgstr "離線遊戲" + +#: ../plugins/bladesio1/sio1.c:29 +msgid "Sio1 Driver" +msgstr "Sio1 驅動程式" diff --git a/strip_fPIC.sh b/strip_fPIC.sh new file mode 100644 index 00000000..6edacd2d --- /dev/null +++ b/strip_fPIC.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# +# libtool assumes that the compiler can handle the -fPIC flag +# This isn't always true (for example, nasm can't handle it) +command="" +while [ $1 ]; do + if [ "$1" != "-fPIC" ]; then + if [ "$1" != "-DPIC" ]; then + command="$command $1" + fi + fi + shift +done +echo $command +exec $command diff --git a/win32/config.h b/win32/config.h new file mode 100644 index 00000000..f13d3e89 --- /dev/null +++ b/win32/config.h @@ -0,0 +1,50 @@ +// +// Copyright (c) 2008, Wei Mingzhi. All rights reserved. +// +// Use, redistribution and modification of this code is unrestricted as long as this +// notice is preserved. +// + +#ifndef CONFIG_H +#define CONFIG_H + +#ifndef __i386__ +#define __i386__ 1 +#endif + +#include + +#ifndef MAXPATHLEN +#define MAXPATHLEN 256 +#endif + +#ifndef PACKAGE_VERSION +#define PACKAGE_VERSION "1.9" +#endif + +#ifndef PREFIX +#define PREFIX "./" +#endif + +#ifndef inline +#ifdef _DEBUG +#define inline /* */ +#else +#ifdef _MSC_VER +#define inline __forceinline +#else +#define inline __inline__ +#endif +#endif +#endif + +#ifdef _MSC_VER +#pragma warning (disable:4133) +#pragma warning (disable:4142) +#pragma warning (disable:4244) +#pragma warning (disable:4996) +#pragma warning (disable:4018) +#pragma warning (disable:4761) +#endif + +#endif diff --git a/win32/glue/stdint.h b/win32/glue/stdint.h new file mode 100644 index 00000000..1a1eace1 --- /dev/null +++ b/win32/glue/stdint.h @@ -0,0 +1,42 @@ +// +// Copyright (c) 2008, Wei Mingzhi. All rights reserved. +// +// Use, redistribution and modification of this code is unrestricted +// as long as this notice is preserved. +// +// This code is provided with ABSOLUTELY NO WARRANTY. +// + +#ifndef __STDINT_H +#define __STDINT_H + +#ifdef _MSC_VER + +typedef __int8 int8_t; +typedef __int16 int16_t; +typedef __int32 int32_t; +typedef __int64 int64_t; + +typedef unsigned __int8 uint8_t; +typedef unsigned __int16 uint16_t; +typedef unsigned __int32 uint32_t; +typedef unsigned __int64 uint64_t; + +#else + +typedef signed char int8_t; +typedef signed short int16_t; +typedef signed int int32_t; +typedef signed __int64 int64_t; + +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +typedef unsigned __int64 uint64_t; + +#endif + +#define intptr_t int32_t +#define uintptr_t uint32_t + +#endif diff --git a/win32/glue/sys/mman.h b/win32/glue/sys/mman.h new file mode 100644 index 00000000..4b12e8d9 --- /dev/null +++ b/win32/glue/sys/mman.h @@ -0,0 +1,20 @@ +// +// Copyright (c) 2008, Wei Mingzhi. All rights reserved. +// +// Use, redistribution and modification of this code is unrestricted +// as long as this notice is preserved. +// +// This code is provided with ABSOLUTELY NO WARRANTY. +// + +#ifndef MMAN_H +#define MMAN_H + +#include + +#define mmap(start, length, prot, flags, fd, offset) \ + ((unsigned char *)VirtualAlloc(NULL, (length), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE)) + +#define munmap(start, length) do { VirtualFree((start), (length), MEM_RELEASE); } while (0) + +#endif diff --git a/win32/gui/AboutDlg.c b/win32/gui/AboutDlg.c new file mode 100644 index 00000000..b8d348eb --- /dev/null +++ b/win32/gui/AboutDlg.c @@ -0,0 +1,68 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include +#include +#include "resource.h" +#include "AboutDlg.h" +#include "psxcommon.h" + +char *LabelAuthors = { N_( + "PCSX - A PlayStation Emulator\n\n" + "Original Authors:\n" + "main coder: linuzappz\n" + "co-coders: shadow\n" + "ex-coders: Nocomp, Pete Bernett, nik3d\n" + "Webmaster: AkumaX") +}; + +char *LabelGreets = { N_( + "PCSX-df Authors:\n" + "Ryan Schultz, Andrew Burton, Stephen Chao,\n" + "Marcus Comstedt, Stefan Sikora\n\n" + "PCSX-Reloaded By:\n" + "Blade_Arma, Wei Mingzhi, et al.\n\n" + "http://pcsxr.codeplex.com/") +}; + +LRESULT WINAPI AboutDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hDlg, _("About")); + + Button_SetText(GetDlgItem(hDlg, IDOK), _("OK")); + Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_TEXT), _("PCSX EMU\n")); + Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_AUTHORS), _(LabelAuthors)); + Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_GREETS), _(LabelGreets)); + Button_SetText(GetDlgItem(hDlg,IDOK), _("OK")); + return TRUE; + + case WM_COMMAND: + switch (wParam) { + case IDOK: + EndDialog(hDlg, TRUE); + return TRUE; + } + break; + + case WM_CLOSE: + EndDialog(hDlg, TRUE); + return TRUE; + } + return FALSE; +} diff --git a/win32/gui/AboutDlg.h b/win32/gui/AboutDlg.h new file mode 100644 index 00000000..a6fb136c --- /dev/null +++ b/win32/gui/AboutDlg.h @@ -0,0 +1,24 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifndef _PCSX_ABOUTDLG_H_ +#define _PCSX_ABOUTDLG_H_ + +LRESULT WINAPI AboutDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); + +#endif diff --git a/win32/gui/CheatDlg.c b/win32/gui/CheatDlg.c new file mode 100644 index 00000000..a09587a6 --- /dev/null +++ b/win32/gui/CheatDlg.c @@ -0,0 +1,1021 @@ +/* Cheat Support for PCSX-Reloaded + * Copyright (C) 2009, Wei Mingzhi . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include +#include +#ifndef _WIN32_IE +#define _WIN32_IE 0x0400 +#endif +#include +#include +#include "psxcommon.h" +#include "psxmem.h" +#include "cheat.h" +#include "resource.h" +#include "Win32.h" + +static void UpdateCheatDlg(HWND hW) { + HWND List; + LV_ITEM item; + int i; + + List = GetDlgItem(hW, IDC_CODELIST); + + ListView_DeleteAllItems(List); + + for (i = 0; i < NumCheats; i++) { + memset(&item, 0, sizeof(item)); + + item.mask = LVIF_TEXT; + item.iItem = i; + item.pszText = Cheats[i].Descr; + item.iSubItem = 0; + + SendMessage(List, LVM_INSERTITEM, 0, (LPARAM)&item); + + item.pszText = (Cheats[i].Enabled ? _("Yes") : _("No")); + item.iSubItem = 1; + + SendMessage(List, LVM_SETITEM, 0, (LPARAM)&item); + } +} + +static int iEditItem = -1; +static char szDescr[256], szCode[1024]; + +static LRESULT WINAPI CheatEditDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + int i; + + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Edit Cheat")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_DESCR), _("Description:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_CODE), _("Cheat Code:")); + Button_SetText(GetDlgItem(hW, IDOK), _("OK")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("Cancel")); + + assert(iEditItem != -1 && iEditItem < NumCheats); + + Edit_SetText(GetDlgItem(hW, IDC_DESCR), Cheats[iEditItem].Descr); + + szCode[0] = '\0'; + for (i = Cheats[iEditItem].First; i < Cheats[iEditItem].First + Cheats[iEditItem].n; i++) { + sprintf(szDescr, "%.8X %.4X\r\n", CheatCodes[i].Addr, CheatCodes[i].Val); + strcat(szCode, szDescr); + } + Edit_SetText(GetDlgItem(hW, IDC_CODE), szCode); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDOK: + Edit_GetText(GetDlgItem(hW, IDC_DESCR), szDescr, 256); + Edit_GetText(GetDlgItem(hW, IDC_CODE), szCode, 1024); + + if (EditCheat(iEditItem, szDescr, szCode) != 0) { + SysMessage(_("Invalid cheat code!")); + } + else { + EndDialog(hW, TRUE); + return TRUE; + } + break; + + case IDCANCEL: + EndDialog(hW, FALSE); + return TRUE; + } + break; + + case WM_CLOSE: + EndDialog(hW, FALSE); + return TRUE; + } + + return FALSE; +} + +static LRESULT WINAPI CheatAddDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Add New Cheat")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_DESCR), _("Description:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_CODE), _("Cheat Code:")); + Button_SetText(GetDlgItem(hW, IDOK), _("OK")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("Cancel")); + Edit_SetText(GetDlgItem(hW, IDC_DESCR), szDescr); + Edit_SetText(GetDlgItem(hW, IDC_CODE), szCode); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDOK: + Edit_GetText(GetDlgItem(hW, IDC_DESCR), szDescr, 256); + Edit_GetText(GetDlgItem(hW, IDC_CODE), szCode, 1024); + + if (AddCheat(szDescr, szCode) != 0) { + SysMessage(_("Invalid cheat code!")); + } + else { + EndDialog(hW, TRUE); + return TRUE; + } + break; + + case IDCANCEL: + EndDialog(hW, FALSE); + return TRUE; + } + break; + + case WM_CLOSE: + EndDialog(hW, FALSE); + return TRUE; + } + + return FALSE; +} + +LRESULT WINAPI CheatDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + HWND List; + LV_COLUMN col; + LV_ITEM item; + int i; + OPENFILENAME ofn; + char szFileName[256]; + char szFileTitle[256]; + char szFilter[256]; + + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Edit Cheat Codes")); + + Button_SetText(GetDlgItem(hW, IDC_ADDCODE), _("&Add Code")); + Button_SetText(GetDlgItem(hW, IDC_EDITCODE), _("&Edit Code")); + Button_SetText(GetDlgItem(hW, IDC_REMOVECODE), _("&Remove Code")); + Button_SetText(GetDlgItem(hW, IDC_TOGGLECODE), _("&Enable/Disable")); + Button_SetText(GetDlgItem(hW, IDC_LOADCODE), _("&Load...")); + Button_SetText(GetDlgItem(hW, IDC_SAVECODE), _("&Save As...")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("&Close")); + + List = GetDlgItem(hW, IDC_CODELIST); + + SendMessage(List, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT); + + memset(&col, 0, sizeof(col)); + + col.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; + col.fmt = LVCFMT_LEFT; + + col.pszText = _("Description"); + col.cx = 400; + + SendMessage(List, LVM_INSERTCOLUMN, 0, (LPARAM)&col); + + col.pszText = _("Enabled"); + col.cx = 55; + + SendMessage(List, LVM_INSERTCOLUMN, 1, (LPARAM)&col); + + UpdateCheatDlg(hW); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDCANCEL: + EndDialog(hW, FALSE); + return TRUE; + + case IDC_ADDCODE: + i = NumCheats; + szDescr[0] = '\0'; + szCode[0] = '\0'; + + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATEDIT), hW, (DLGPROC)CheatAddDlgProc); + + if (NumCheats > i) { + // new cheat added + List = GetDlgItem(hW, IDC_CODELIST); + memset(&item, 0, sizeof(item)); + + item.mask = LVIF_TEXT; + item.iItem = i; + item.pszText = Cheats[i].Descr; + item.iSubItem = 0; + + SendMessage(List, LVM_INSERTITEM, 0, (LPARAM)&item); + + item.pszText = (Cheats[i].Enabled ? _("Yes") : _("No")); + item.iSubItem = 1; + + SendMessage(List, LVM_SETITEM, 0, (LPARAM)&item); + } + break; + + case IDC_EDITCODE: + List = GetDlgItem(hW, IDC_CODELIST); + iEditItem = ListView_GetSelectionMark(List); + + if (iEditItem != -1) { + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATEDIT), hW, (DLGPROC)CheatEditDlgProc); + + memset(&item, 0, sizeof(item)); + + item.mask = LVIF_TEXT; + item.iItem = iEditItem; + item.pszText = Cheats[iEditItem].Descr; + item.iSubItem = 0; + + SendMessage(List, LVM_SETITEM, 0, (LPARAM)&item); + } + break; + + case IDC_REMOVECODE: + List = GetDlgItem(hW, IDC_CODELIST); + i = ListView_GetSelectionMark(List); + + if (i != -1) { + RemoveCheat(i); + ListView_DeleteItem(List, i); + ListView_SetSelectionMark(List, -1); + } + break; + + case IDC_TOGGLECODE: + List = GetDlgItem(hW, IDC_CODELIST); + i = ListView_GetSelectionMark(List); + + if (i != -1) { + Cheats[i].Enabled ^= 1; + + memset(&item, 0, sizeof(item)); + + item.mask = LVIF_TEXT; + item.iItem = i; + item.pszText = (Cheats[i].Enabled ? _("Yes") : _("No")); + item.iSubItem = 1; + + SendMessage(List, LVM_SETITEM, 0, (LPARAM)&item); + } + break; + + case IDC_LOADCODE: + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + strcpy(szFilter, _("PCSX Cheat Code Files")); + strcatz(szFilter, "*.*"); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = hW; + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = 256; + ofn.lpstrInitialDir = ".\\Cheats"; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = 256; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = "CHT"; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName((LPOPENFILENAME)&ofn)) { + LoadCheats(szFileName); + UpdateCheatDlg(hW); + } + break; + + case IDC_SAVECODE: + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + strcpy(szFilter, _("PCSX Cheat Code Files")); + strcatz(szFilter, "*.*"); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = hW; + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = 256; + ofn.lpstrInitialDir = ".\\Cheats"; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = 256; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = "CHT"; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR | OFN_OVERWRITEPROMPT; + + if (GetOpenFileName((LPOPENFILENAME)&ofn)) { + SaveCheats(szFileName); + } + break; + } + break; + + case WM_NOTIFY: + switch (LOWORD(wParam)) { + case IDC_CODELIST: + List = GetDlgItem(hW, IDC_CODELIST); + i = ListView_GetSelectionMark(List); + + if (i != -1) { + Button_Enable(GetDlgItem(hW, IDC_EDITCODE), TRUE); + Button_Enable(GetDlgItem(hW, IDC_REMOVECODE), TRUE); + Button_Enable(GetDlgItem(hW, IDC_TOGGLECODE), TRUE); + } + else { + Button_Enable(GetDlgItem(hW, IDC_EDITCODE), FALSE); + Button_Enable(GetDlgItem(hW, IDC_REMOVECODE), FALSE); + Button_Enable(GetDlgItem(hW, IDC_TOGGLECODE), FALSE); + } + + Button_Enable(GetDlgItem(hW, IDC_SAVECODE), (NumCheats > 0)); + break; + } + break; + + case WM_CLOSE: + EndDialog(hW, FALSE); + return TRUE; + } + + return FALSE; +} + +/////////////////////////////////////////////////////////////////////////////// + +#define SEARCH_EQUALVAL 0 +#define SEARCH_NOTEQUALVAL 1 +#define SEARCH_RANGE 2 +#define SEARCH_INCBY 3 +#define SEARCH_DECBY 4 +#define SEARCH_INC 5 +#define SEARCH_DEC 6 +#define SEARCH_DIFFERENT 7 +#define SEARCH_NOCHANGE 8 + +#define SEARCHTYPE_8BIT 0 +#define SEARCHTYPE_16BIT 1 +#define SEARCHTYPE_32BIT 2 + +#define SEARCHBASE_DEC 0 +#define SEARCHBASE_HEX 1 + +static char current_search = SEARCH_EQUALVAL; +static char current_searchtype = SEARCHTYPE_8BIT; +static char current_searchbase = SEARCHBASE_DEC; +static uint32_t current_valuefrom = 0; +static uint32_t current_valueto = 0; + +static void UpdateCheatSearchDlg(HWND hW) { + char buf[256]; + int i; + + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_RESETCONTENT, 0, 0); + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_RESETCONTENT, 0, 0); + + Button_Enable(GetDlgItem(hW, IDC_FREEZE), FALSE); + Button_Enable(GetDlgItem(hW, IDC_MODIFY), FALSE); + Button_Enable(GetDlgItem(hW, IDC_COPY), FALSE); + + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Equal Value")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Not Equal Value")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Range")); + + if (prevM != NULL) { + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Increased By")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Decreased By")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Increased")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Decreased")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("Different")); + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_ADDSTRING, 0, (LPARAM)_("No Change")); + + ComboBox_Enable(GetDlgItem(hW, IDC_DATATYPE), FALSE); + } + else { + ComboBox_Enable(GetDlgItem(hW, IDC_DATATYPE), TRUE); + } + + SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_SETCURSEL, (WPARAM)current_search, 0); + + if (current_search == SEARCH_RANGE) { + ShowWindow(GetDlgItem(hW, IDC_LABEL_TO), SW_SHOW); + ShowWindow(GetDlgItem(hW, IDC_VALUETO), SW_SHOW); + } + else { + ShowWindow(GetDlgItem(hW, IDC_LABEL_TO), SW_HIDE); + ShowWindow(GetDlgItem(hW, IDC_VALUETO), SW_HIDE); + } + + SendMessage(GetDlgItem(hW, IDC_DATATYPE), CB_SETCURSEL, (WPARAM)current_searchtype, 0); + SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_SETCURSEL, (WPARAM)current_searchbase, 0); + + if (current_searchbase == SEARCHBASE_HEX) { + sprintf(buf, "%X", current_valuefrom); + SetWindowText(GetDlgItem(hW, IDC_VALUEFROM), buf); + sprintf(buf, "%X", current_valueto); + SetWindowText(GetDlgItem(hW, IDC_VALUETO), buf); + } + else { + sprintf(buf, "%u", current_valuefrom); + SetWindowText(GetDlgItem(hW, IDC_VALUEFROM), buf); + sprintf(buf, "%u", current_valueto); + SetWindowText(GetDlgItem(hW, IDC_VALUETO), buf); + } + + if (prevM == NULL) { + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_ADDSTRING, (WPARAM)0, (LPARAM)_("Enter the values and start your search.")); + EnableWindow(GetDlgItem(hW, IDC_RESLIST), FALSE); + } + else { + if (NumSearchResults == 0) { + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_ADDSTRING, (WPARAM)0, (LPARAM)_("No addresses found.")); + EnableWindow(GetDlgItem(hW, IDC_RESLIST), FALSE); + } + else if (NumSearchResults > 100) { + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_ADDSTRING, (WPARAM)0, (LPARAM)_("Too many addresses found.")); + EnableWindow(GetDlgItem(hW, IDC_RESLIST), FALSE); + } + else { + for (i = 0; i < NumSearchResults; i++) { + u32 addr = SearchResults[i]; + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + sprintf(buf, _("%.8X Current: %u (%.2X), Previous: %u (%.2X)"), + addr, PSXMu8(addr), PSXMu8(addr), PrevMu8(addr), PrevMu8(addr)); + break; + + case SEARCHTYPE_16BIT: + sprintf(buf, _("%.8X Current: %u (%.4X), Previous: %u (%.4X)"), + addr, PSXMu16(addr), PSXMu16(addr), PrevMu16(addr), PrevMu16(addr)); + break; + + case SEARCHTYPE_32BIT: + sprintf(buf, _("%.8X Current: %u (%.8X), Previous: %u (%.8X)"), + addr, PSXMu32(addr), PSXMu32(addr), PrevMu32(addr), PrevMu32(addr)); + break; + + default: + assert(FALSE); // impossible + break; + } + + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_ADDSTRING, (WPARAM)0, (LPARAM)buf); + SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_SETITEMDATA, i, (LPARAM)i); + } + EnableWindow(GetDlgItem(hW, IDC_RESLIST), TRUE); + } + } + + sprintf(buf, _("Founded Addresses: %d"), NumSearchResults); + Static_SetText(GetDlgItem(hW, IDC_LABEL_RESULTSFOUND), buf); +} + +static int iCurItem = 0; + +static LRESULT WINAPI CheatFreezeProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + u32 val; + char buf[256]; + + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Freeze")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_ADDRESS), _("Address:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_VALUE), _("Value:")); + + sprintf(buf, "%.8X", SearchResults[iCurItem]); + SetWindowText(GetDlgItem(hW, IDC_ADDRESS), buf); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + val = PSXMu8(SearchResults[iCurItem]); + break; + + case SEARCHTYPE_16BIT: + val = PSXMu16(SearchResults[iCurItem]); + break; + + case SEARCHTYPE_32BIT: + val = PSXMu32(SearchResults[iCurItem]); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + sprintf(buf, "%u", val); + SetWindowText(GetDlgItem(hW, IDC_VALUE), buf); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDOK: + val = 0; + GetWindowText(GetDlgItem(hW, IDC_VALUE), buf, 255); + sscanf(buf, "%u", &val); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + if (val > (u32)0xFF) { + val = 0xFF; + } + sprintf(szCode, "%.8X %.4X", (SearchResults[iCurItem] & 0x1FFFFF) | (CHEAT_CONST8 << 24), val); + break; + + case SEARCHTYPE_16BIT: + if (val > (u32)0xFFFF) { + val = 0xFFFF; + } + sprintf(szCode, "%.8X %.4X", (SearchResults[iCurItem] & 0x1FFFFF) | (CHEAT_CONST16 << 24), val); + break; + + case SEARCHTYPE_32BIT: + sprintf(szCode, "%.8X %.4X\n%.8X %.4X", + (SearchResults[iCurItem] & 0x1FFFFF) | (CHEAT_CONST16 << 24), val & 0xFFFF, + ((SearchResults[iCurItem] + 2) & 0x1FFFFF) | (CHEAT_CONST16 << 24), ((val & 0xFFFF0000) >> 16) & 0xFFFF); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + sprintf(szDescr, _("Freeze %.8X"), SearchResults[iCurItem]); + + if (DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATEDIT), hW, (DLGPROC)CheatAddDlgProc)) { + Cheats[NumCheats - 1].Enabled = 1; + EndDialog(hW, TRUE); + return TRUE; + } + break; + + case IDCANCEL: + EndDialog(hW, FALSE); + return TRUE; + } + break; + + case WM_CLOSE: + EndDialog(hW, FALSE); + return TRUE; + } + + return FALSE; +} + +static LRESULT WINAPI CheatModifyProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + u32 val; + char buf[256]; + + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Modify")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_ADDRESS), _("Address:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_VALUE), _("Value:")); + + sprintf(buf, "%.8X", SearchResults[iCurItem]); + SetWindowText(GetDlgItem(hW, IDC_ADDRESS), buf); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + val = PSXMu8(SearchResults[iCurItem]); + break; + + case SEARCHTYPE_16BIT: + val = PSXMu16(SearchResults[iCurItem]); + break; + + case SEARCHTYPE_32BIT: + val = PSXMu32(SearchResults[iCurItem]); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + sprintf(buf, "%u", val); + SetWindowText(GetDlgItem(hW, IDC_VALUE), buf); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDOK: + val = 0; + GetWindowText(GetDlgItem(hW, IDC_VALUE), buf, 255); + sscanf(buf, "%u", &val); + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + if (val > 0xFF) { + val = 0xFF; + } + psxMemWrite8(SearchResults[iCurItem], (u8)val); + break; + + case SEARCHTYPE_16BIT: + if (val > 0xFFFF) { + val = 0xFFFF; + } + psxMemWrite16(SearchResults[iCurItem], (u16)val); + break; + + case SEARCHTYPE_32BIT: + psxMemWrite32(SearchResults[iCurItem], (u32)val); + break; + + default: + assert(FALSE); // should not reach here + break; + } + + EndDialog(hW, TRUE); + return TRUE; + + case IDCANCEL: + EndDialog(hW, TRUE); + return FALSE; + } + break; + + case WM_CLOSE: + EndDialog(hW, TRUE); + return FALSE; + } + + return FALSE; +} + +LRESULT WINAPI CheatSearchDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + char buf[256]; + uint32_t i; + + switch (uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Cheat Search")); + + Static_SetText(GetDlgItem(hW, IDC_LABEL_SEARCHFOR), _("Search For:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_DATATYPE), _("Data Type:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_VALUE), _("Value:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_DATABASE), _("Data Base:")); + Static_SetText(GetDlgItem(hW, IDC_LABEL_TO), _("To:")); + Button_SetText(GetDlgItem(hW, IDC_FREEZE), _("&Freeze")); + Button_SetText(GetDlgItem(hW, IDC_MODIFY), _("&Modify")); + Button_SetText(GetDlgItem(hW, IDC_COPY), _("&Copy")); + Button_SetText(GetDlgItem(hW, IDC_SEARCH), _("&Search")); + Button_SetText(GetDlgItem(hW, IDC_NEWSEARCH), _("&New Search")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("C&lose")); + + SendMessage(GetDlgItem(hW, IDC_DATATYPE), CB_ADDSTRING, 0, (LPARAM)_("8-bit")); + SendMessage(GetDlgItem(hW, IDC_DATATYPE), CB_ADDSTRING, 0, (LPARAM)_("16-bit")); + SendMessage(GetDlgItem(hW, IDC_DATATYPE), CB_ADDSTRING, 0, (LPARAM)_("32-bit")); + SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_ADDSTRING, 0, (LPARAM)_("Decimal")); + SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_ADDSTRING, 0, (LPARAM)_("Hexadecimal")); + + UpdateCheatSearchDlg(hW); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDCANCEL: + EndDialog(hW, FALSE); + return TRUE; + + case IDC_FREEZE: + iCurItem = SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_GETCURSEL, 0, 0); + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATVALEDIT), hW, (DLGPROC)CheatFreezeProc); + break; + + case IDC_MODIFY: + iCurItem = SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_GETCURSEL, 0, 0); + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATVALEDIT), hW, (DLGPROC)CheatModifyProc); + UpdateCheatSearchDlg(hW); + break; + + case IDC_COPY: + i = SendMessage(GetDlgItem(hW, IDC_RESLIST), LB_GETCURSEL, 0, 0); + sprintf(buf, "%.8X", SearchResults[i]); + + if (OpenClipboard(gApp.hWnd)) { + HGLOBAL hglbCopy = GlobalAlloc(GHND, 256); + char *p; + + if (hglbCopy != NULL) { + p = (char *)GlobalLock(hglbCopy); + strcpy(p, buf); + GlobalUnlock(p); + + EmptyClipboard(); + SetClipboardData(CF_TEXT, (HANDLE)hglbCopy); + } + + CloseClipboard(); + } + break; + + case IDC_SEARCH: + current_search = SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_GETCURSEL, 0, 0); + current_searchtype = SendMessage(GetDlgItem(hW, IDC_DATATYPE), CB_GETCURSEL, 0, 0); + current_searchbase = SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_GETCURSEL, 0, 0); + current_valuefrom = 0; + current_valueto = 0; + + if (current_searchbase == SEARCHBASE_DEC) { + GetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPTSTR)buf, 255); + sscanf(buf, "%u", ¤t_valuefrom); + GetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPTSTR)buf, 255); + sscanf(buf, "%u", ¤t_valueto); + } + else { + GetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPTSTR)buf, 255); + sscanf(buf, "%x", ¤t_valuefrom); + GetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPTSTR)buf, 255); + sscanf(buf, "%x", ¤t_valueto); + } + + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + if (current_valuefrom > (u32)0xFF) { + current_valuefrom = 0xFF; + } + if (current_valueto > (u32)0xFF) { + current_valueto = 0xFF; + } + break; + + case SEARCHTYPE_16BIT: + if (current_valuefrom > (u32)0xFFFF) { + current_valuefrom = 0xFFFF; + } + if (current_valueto > (u32)0xFFFF) { + current_valueto = 0xFFFF; + } + break; + } + + if (current_search == SEARCH_RANGE && current_valuefrom > current_valueto) { + u32 t = current_valuefrom; + current_valuefrom = current_valueto; + current_valueto = t; + } + + switch (current_search) { + case SEARCH_EQUALVAL: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchEqual8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchEqual16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchEqual32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_NOTEQUALVAL: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchNotEqual8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchNotEqual16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchNotEqual32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_RANGE: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchRange8((u8)current_valuefrom, (u8)current_valueto); + break; + + case SEARCHTYPE_16BIT: + CheatSearchRange16((u16)current_valuefrom, (u16)current_valueto); + break; + + case SEARCHTYPE_32BIT: + CheatSearchRange32((u32)current_valuefrom, (u32)current_valueto); + break; + } + break; + + case SEARCH_INCBY: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchIncreasedBy8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchIncreasedBy16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchIncreasedBy32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_DECBY: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchDecreasedBy8((u8)current_valuefrom); + break; + + case SEARCHTYPE_16BIT: + CheatSearchDecreasedBy16((u16)current_valuefrom); + break; + + case SEARCHTYPE_32BIT: + CheatSearchDecreasedBy32((u32)current_valuefrom); + break; + } + break; + + case SEARCH_INC: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchIncreased8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchIncreased16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchIncreased32(); + break; + } + break; + + case SEARCH_DEC: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchDecreased8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchDecreased16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchDecreased32(); + break; + } + break; + + case SEARCH_DIFFERENT: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchDifferent8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchDifferent16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchDifferent32(); + break; + } + break; + + case SEARCH_NOCHANGE: + switch (current_searchtype) { + case SEARCHTYPE_8BIT: + CheatSearchNoChange8(); + break; + + case SEARCHTYPE_16BIT: + CheatSearchNoChange16(); + break; + + case SEARCHTYPE_32BIT: + CheatSearchNoChange32(); + break; + } + break; + + default: + assert(FALSE); // not possible + break; + } + + UpdateCheatSearchDlg(hW); + break; + + case IDC_NEWSEARCH: + FreeCheatSearchMem(); + FreeCheatSearchResults(); + + current_search = SEARCH_EQUALVAL; + current_searchtype = SEARCHTYPE_8BIT; + current_searchbase = SEARCHBASE_DEC; + current_valuefrom = 0; + current_valueto = 0; + + UpdateCheatSearchDlg(hW); + EnableWindow(GetDlgItem(hW, IDC_VALUEFROM), TRUE); + break; + + case IDC_SEARCHFOR: + EnableWindow(GetDlgItem(hW, IDC_VALUEFROM), TRUE); + + if (SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_GETCURSEL, 0, 0) == SEARCH_RANGE) { + ShowWindow(GetDlgItem(hW, IDC_LABEL_TO), SW_SHOW); + ShowWindow(GetDlgItem(hW, IDC_VALUETO), SW_SHOW); + } + else { + ShowWindow(GetDlgItem(hW, IDC_LABEL_TO), SW_HIDE); + ShowWindow(GetDlgItem(hW, IDC_VALUETO), SW_HIDE); + + if (SendMessage(GetDlgItem(hW, IDC_SEARCHFOR), CB_GETCURSEL, 0, 0) >= SEARCH_INC) { + EnableWindow(GetDlgItem(hW, IDC_VALUEFROM), FALSE); + } + } + break; + + case IDC_DATABASE: + if (SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_GETCURSEL, 0, 0) == SEARCHBASE_DEC) { + if (current_searchbase == SEARCHBASE_HEX) { + GetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPTSTR)buf, 255); + sscanf(buf, "%x", &i); + sprintf(buf, "%u", i); + SetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPCTSTR)buf); + + GetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPTSTR)buf, 255); + sscanf(buf, "%x", &i); + sprintf(buf, "%u", i); + SetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPCTSTR)buf); + } + } + else if (current_searchbase == SEARCHBASE_DEC){ + GetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPTSTR)buf, 255); + sscanf(buf, "%u", &i); + sprintf(buf, "%X", i); + SetWindowText(GetDlgItem(hW, IDC_VALUEFROM), (LPCTSTR)buf); + + GetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPTSTR)buf, 255); + sscanf(buf, "%u", &i); + sprintf(buf, "%X", i); + SetWindowText(GetDlgItem(hW, IDC_VALUETO), (LPCTSTR)buf); + } + current_searchbase = SendMessage(GetDlgItem(hW, IDC_DATABASE), CB_GETCURSEL, 0, 0); + break; + + case IDC_RESLIST: + switch (HIWORD(wParam)) { + case LBN_SELCHANGE: + Button_Enable(GetDlgItem(hW, IDC_FREEZE), TRUE); + Button_Enable(GetDlgItem(hW, IDC_MODIFY), TRUE); + Button_Enable(GetDlgItem(hW, IDC_COPY), TRUE); + break; + + case LBN_SELCANCEL: + Button_Enable(GetDlgItem(hW, IDC_FREEZE), FALSE); + Button_Enable(GetDlgItem(hW, IDC_MODIFY), FALSE); + Button_Enable(GetDlgItem(hW, IDC_COPY), FALSE); + break; + } + break; + } + break; + + case WM_CLOSE: + EndDialog(hW, FALSE); + return TRUE; + } + + return FALSE; +} diff --git a/win32/gui/ConfigurePlugins.c b/win32/gui/ConfigurePlugins.c new file mode 100644 index 00000000..6f734a1e --- /dev/null +++ b/win32/gui/ConfigurePlugins.c @@ -0,0 +1,649 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include "psxcommon.h" +#include "plugin.h" +#include "plugins.h" +#include "resource.h" +#include "Win32.h" + +#define QueryKeyV(name, var) \ + size = sizeof(DWORD); \ + if (RegQueryValueEx(myKey, name, 0, &type, (LPBYTE)&tmp, &size) != 0) { if (err) { RegCloseKey(myKey); return -1; } } \ + var = tmp; + +#define QueryKey(s, name, var) \ + size = s; \ + if (RegQueryValueEx(myKey, name, 0, &type, (LPBYTE)var, &size) != 0) { if (err) { RegCloseKey(myKey); return -1; } } + +#define SetKeyV(name, var) \ + tmp = var; \ + RegSetValueEx(myKey, name, 0, REG_DWORD, (LPBYTE)&tmp, sizeof(DWORD)); + +#define SetKey(name, var, s, t) \ + RegSetValueEx(myKey, name, 0, t, (LPBYTE)var, s); + +int LoadConfig() { + HKEY myKey; + DWORD type, size, tmp; + PcsxConfig *Conf = &Config; + int err; +#ifdef ENABLE_NLS + char text[256]; +#endif + + if (RegOpenKeyEx(HKEY_CURRENT_USER,cfgfile,0,KEY_ALL_ACCESS,&myKey)!=ERROR_SUCCESS) return -1; + + err = 1; + QueryKey(256, "Bios", Conf->Bios); + QueryKey(256, "Gpu", Conf->Gpu); + QueryKey(256, "Spu", Conf->Spu); + QueryKey(256, "Cdr", Conf->Cdr); + QueryKey(256, "Pad1", Conf->Pad1); + QueryKey(256, "Pad2", Conf->Pad2); + QueryKey(256, "Mcd1", Conf->Mcd1); + QueryKey(256, "Mcd2", Conf->Mcd2); + QueryKey(256, "PluginsDir", Conf->PluginsDir); + QueryKey(256, "BiosDir", Conf->BiosDir); + err = 0; + QueryKey(256, "Net", Conf->Net); + QueryKey(256, "Lang", Conf->Lang); + + QueryKeyV("Xa", Conf->Xa); + QueryKeyV("Sio", Conf->Sio); + QueryKeyV("Mdec", Conf->Mdec); + QueryKeyV("PsxAuto", Conf->PsxAuto); + QueryKeyV("Cdda", Conf->Cdda); + QueryKeyV("Debug", Conf->Debug); + QueryKeyV("PsxOut", Conf->PsxOut); + QueryKeyV("SpuIrq", Conf->SpuIrq); + QueryKeyV("RCntFix", Conf->RCntFix); + QueryKeyV("VSyncWA", Conf->VSyncWA); + + QueryKeyV("Cpu", Conf->Cpu); + QueryKeyV("PsxType", Conf->PsxType); + + if (Config.Cpu == CPU_DYNAREC) { + Config.Debug = 0; // don't enable debugger if using dynarec core + } + + RegCloseKey(myKey); + +#ifdef ENABLE_NLS + sprintf(text, "LANGUAGE=%s", Conf->Lang); + gettext_putenv(text); +#endif + + return 0; +} + +///////////////////////////////////////////////////////// + +void SaveConfig() { + HKEY myKey; + DWORD myDisp, tmp; + PcsxConfig *Conf = &Config; + + RegCreateKeyEx(HKEY_CURRENT_USER, cfgfile, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &myKey, &myDisp); + + SetKey("Bios", Conf->Bios, strlen(Conf->Bios), REG_SZ); + SetKey("Gpu", Conf->Gpu, strlen(Conf->Gpu), REG_SZ); + SetKey("Spu", Conf->Spu, strlen(Conf->Spu), REG_SZ); + SetKey("Cdr", Conf->Cdr, strlen(Conf->Cdr), REG_SZ); + SetKey("Pad1", Conf->Pad1, strlen(Conf->Pad1), REG_SZ); + SetKey("Pad2", Conf->Pad2, strlen(Conf->Pad2), REG_SZ); + SetKey("Net", Conf->Net, strlen(Conf->Net), REG_SZ); + SetKey("Mcd1", Conf->Mcd1, strlen(Conf->Mcd1), REG_SZ); + SetKey("Mcd2", Conf->Mcd2, strlen(Conf->Mcd2), REG_SZ); + SetKey("Lang", Conf->Lang, strlen(Conf->Lang), REG_SZ); + SetKey("PluginsDir", Conf->PluginsDir, strlen(Conf->PluginsDir), REG_SZ); + SetKey("BiosDir", Conf->BiosDir, strlen(Conf->BiosDir), REG_SZ); + + SetKeyV("Xa", Conf->Xa); + SetKeyV("Sio", Conf->Sio); + SetKeyV("Mdec", Conf->Mdec); + SetKeyV("PsxAuto", Conf->PsxAuto); + SetKeyV("Cdda", Conf->Cdda); + SetKeyV("Debug", Conf->Debug); + SetKeyV("PsxOut", Conf->PsxOut); + SetKeyV("SpuIrq", Conf->SpuIrq); + SetKeyV("RCntFix", Conf->RCntFix); + SetKeyV("VSyncWA", Conf->VSyncWA); + + SetKeyV("Cpu", Conf->Cpu); + SetKeyV("PsxType", Conf->PsxType); + + RegCloseKey(myKey); +} + +///////////////////////////////////////////////////////// + +#define ComboAddPlugin(hw, str) { \ + lp = (char *)malloc(strlen(FindData.cFileName)+8); \ + sprintf(lp, "%s", FindData.cFileName); \ + i = ComboBox_AddString(hw, tmpStr); \ + ComboBox_SetItemData(hw, i, lp); \ + if (stricmp(str, lp)==0) \ + ComboBox_SetCurSel(hw, i); \ +} + +BOOL OnConfigurePluginsDialog(HWND hW) { + WIN32_FIND_DATA FindData; + HANDLE Find; + HANDLE Lib; + PSEgetLibType PSE_GetLibType; + PSEgetLibName PSE_GetLibName; + PSEgetLibVersion PSE_GetLibVersion; + HWND hWC_GPU=GetDlgItem(hW,IDC_LISTGPU); + HWND hWC_SPU=GetDlgItem(hW,IDC_LISTSPU); + HWND hWC_CDR=GetDlgItem(hW,IDC_LISTCDR); + HWND hWC_PAD1=GetDlgItem(hW,IDC_LISTPAD1); + HWND hWC_PAD2=GetDlgItem(hW,IDC_LISTPAD2); + HWND hWC_BIOS=GetDlgItem(hW,IDC_LISTBIOS); + char tmpStr[256]; + char *lp; + int i; + + strcpy(tmpStr, Config.PluginsDir); + strcat(tmpStr, "*.dll"); + Find = FindFirstFile(tmpStr, &FindData); + + do { + if (Find == INVALID_HANDLE_VALUE) break; + sprintf(tmpStr,"%s%s", Config.PluginsDir, FindData.cFileName); + Lib = LoadLibrary(tmpStr); + if (Lib != NULL) { + PSE_GetLibType = (PSEgetLibType) GetProcAddress((HMODULE)Lib,"PSEgetLibType"); + PSE_GetLibName = (PSEgetLibName) GetProcAddress((HMODULE)Lib,"PSEgetLibName"); + PSE_GetLibVersion = (PSEgetLibVersion) GetProcAddress((HMODULE)Lib,"PSEgetLibVersion"); + + if (PSE_GetLibType != NULL && PSE_GetLibName != NULL && PSE_GetLibVersion != NULL) { + unsigned long version = PSE_GetLibVersion(); + long type; + + sprintf(tmpStr, "%s %d.%d", PSE_GetLibName(), (int)(version>>8)&0xff, (int)version&0xff); + type = PSE_GetLibType(); + if (type & PSE_LT_CDR) { + ComboAddPlugin(hWC_CDR, Config.Cdr); + } + + if (type & PSE_LT_SPU) { + ComboAddPlugin(hWC_SPU, Config.Spu); + } + + if (type & PSE_LT_GPU) { + ComboAddPlugin(hWC_GPU, Config.Gpu); + } + + if (type & PSE_LT_PAD) { + PADquery query; + + query = (PADquery)GetProcAddress((HMODULE)Lib, "PADquery"); + if (query != NULL) { + if (query() & 0x1) + ComboAddPlugin(hWC_PAD1, Config.Pad1); + if (query() & 0x2) + ComboAddPlugin(hWC_PAD2, Config.Pad2); + } else { // just a guess + ComboAddPlugin(hWC_PAD1, Config.Pad1); + } + } + } + } + } while (FindNextFile(Find,&FindData)); + + if (Find != INVALID_HANDLE_VALUE) FindClose(Find); + +// BIOS + + lp = (char *)malloc(strlen("HLE") + 1); + sprintf(lp, "HLE"); + i = ComboBox_AddString(hWC_BIOS, _("Simulate Psx Bios")); + ComboBox_SetItemData(hWC_BIOS, i, lp); + if (stricmp(Config.Bios, lp)==0) + ComboBox_SetCurSel(hWC_BIOS, i); + + strcpy(tmpStr, Config.BiosDir); + strcat(tmpStr, "*"); + Find=FindFirstFile(tmpStr, &FindData); + + do { + if (Find==INVALID_HANDLE_VALUE) break; + if (!strcmp(FindData.cFileName, ".")) continue; + if (!strcmp(FindData.cFileName, "..")) continue; + if (FindData.nFileSizeLow != 1024 * 512) continue; + lp = (char *)malloc(strlen(FindData.cFileName)+8); + sprintf(lp, "%s", (char *)FindData.cFileName); + i = ComboBox_AddString(hWC_BIOS, FindData.cFileName); + ComboBox_SetItemData(hWC_BIOS, i, lp); + if (Config.Bios[0]=='\0') { + ComboBox_SetCurSel(hWC_BIOS, i); + strcpy(Config.Bios, FindData.cFileName); + } else if (stricmp(Config.Bios, FindData.cFileName)==0) + ComboBox_SetCurSel(hWC_BIOS, i); + } while (FindNextFile(Find,&FindData)); + + if (Find!=INVALID_HANDLE_VALUE) FindClose(Find); + + if (ComboBox_GetCurSel(hWC_CDR ) == -1) + ComboBox_SetCurSel(hWC_CDR, 0); + if (ComboBox_GetCurSel(hWC_GPU ) == -1) + ComboBox_SetCurSel(hWC_GPU, 0); + if (ComboBox_GetCurSel(hWC_SPU ) == -1) + ComboBox_SetCurSel(hWC_SPU, 0); + if (ComboBox_GetCurSel(hWC_PAD1) == -1) + ComboBox_SetCurSel(hWC_PAD1, 0); + if (ComboBox_GetCurSel(hWC_PAD2) == -1) + ComboBox_SetCurSel(hWC_PAD2, 0); + if (ComboBox_GetCurSel(hWC_BIOS) == -1) + ComboBox_SetCurSel(hWC_BIOS, 0); + + return TRUE; +} + +#define CleanCombo(item) \ + hWC = GetDlgItem(hW, item); \ + iCnt = ComboBox_GetCount(hWC); \ + for (i=0; i + +int SelectPath(HWND hW, char *Title, char *Path) { + LPITEMIDLIST pidl; + BROWSEINFO bi; + char Buffer[256]; + + bi.hwndOwner = hW; + bi.pidlRoot = NULL; + bi.pszDisplayName = Buffer; + bi.lpszTitle = Title; + bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS; + bi.lpfn = NULL; + bi.lParam = 0; + if ((pidl = SHBrowseForFolder(&bi)) != NULL) { + if (SHGetPathFromIDList(pidl, Path)) { + int len = strlen(Path); + + if (Path[len - 1] != '\\') { strcat(Path,"\\"); } + return 0; + } + } + return -1; +} + +void SetPluginsDir(HWND hW) { + char Path[256]; + + if (SelectPath(hW, _("Select Plugins Directory"), Path) == -1) return; + strcpy(Config.PluginsDir, Path); + CleanUpCombos(hW); + OnConfigurePluginsDialog(hW); +} + +void SetBiosDir(HWND hW) { + char Path[256]; + + if (SelectPath(hW, _("Select Bios Directory"), Path) == -1) return; + strcpy(Config.BiosDir, Path); + CleanUpCombos(hW); + OnConfigurePluginsDialog(hW); +} + +BOOL CALLBACK ConfigurePluginsDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + switch(uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Configuration")); + + Button_SetText(GetDlgItem(hW, IDOK), _("OK")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("Cancel")); + Static_SetText(GetDlgItem(hW, IDC_GRAPHICS), _("Graphics")); + Static_SetText(GetDlgItem(hW, IDC_FIRSTCONTROLLER), _("First Controller")); + Static_SetText(GetDlgItem(hW, IDC_SECONDCONTROLLER), _("Second Controller")); + Static_SetText(GetDlgItem(hW, IDC_SOUND), _("Sound")); + Static_SetText(GetDlgItem(hW, IDC_CDROM), _("Cdrom")); + Static_SetText(GetDlgItem(hW, IDC_BIOS), _("Bios")); + Button_SetText(GetDlgItem(hW, IDC_BIOSDIR), _("Set Bios Directory")); + Button_SetText(GetDlgItem(hW, IDC_PLUGINSDIR), _("Set Plugins Directory")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGGPU), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTGPU), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTGPU), _("About...")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGSPU), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTSPU), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTSPU), _("About...")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGCDR), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTCDR), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTCDR), _("About...")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGPAD1), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTPAD1), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTPAD1), _("About...")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGPAD2), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTPAD2), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTPAD2), _("About...")); + + return OnConfigurePluginsDialog(hW); + + case WM_COMMAND: + switch(LOWORD(wParam)) { + case IDC_CONFIGGPU: ConfigureGPU(hW); return TRUE; + case IDC_CONFIGSPU: ConfigureSPU(hW); return TRUE; + case IDC_CONFIGCDR: ConfigureCDR(hW); return TRUE; + case IDC_CONFIGPAD1: ConfigurePAD1(hW); return TRUE; + case IDC_CONFIGPAD2: ConfigurePAD2(hW); return TRUE; + + case IDC_TESTGPU: TestGPU(hW); return TRUE; + case IDC_TESTSPU: TestSPU(hW); return TRUE; + case IDC_TESTCDR: TestCDR(hW); return TRUE; + case IDC_TESTPAD1: TestPAD1(hW); return TRUE; + case IDC_TESTPAD2: TestPAD2(hW); return TRUE; + + case IDC_ABOUTGPU: AboutGPU(hW); return TRUE; + case IDC_ABOUTSPU: AboutSPU(hW); return TRUE; + case IDC_ABOUTCDR: AboutCDR(hW); return TRUE; + case IDC_ABOUTPAD1: AboutPAD1(hW); return TRUE; + case IDC_ABOUTPAD2: AboutPAD2(hW); return TRUE; + + case IDC_PLUGINSDIR: SetPluginsDir(hW); return TRUE; + case IDC_BIOSDIR: SetBiosDir(hW); return TRUE; + + case IDCANCEL: + OnCancel(hW); + if (CancelQuit) { + SysClose(); exit(1); + } + return TRUE; + case IDOK: + OnOK(hW); + return TRUE; + } + } + return FALSE; +} + + +void ConfigurePlugins(HWND hWnd) { + DialogBox(gApp.hInstance, + MAKEINTRESOURCE(IDD_CONFIG), + hWnd, + (DLGPROC)ConfigurePluginsDlgProc); +} + +// NetPlay Config Dialog + +BOOL OnConfigureNetPlayDialog(HWND hW) { + WIN32_FIND_DATA FindData; + HANDLE Find; + HANDLE Lib; + PSEgetLibType PSE_GetLibType; + PSEgetLibName PSE_GetLibName; + PSEgetLibVersion PSE_GetLibVersion; + HWND hWC_NET=GetDlgItem(hW,IDC_LISTNET); + char tmpStr[256]; + char *lp; + int i; + + strcpy(tmpStr, Config.PluginsDir); + strcat(tmpStr, "*.dll"); + Find = FindFirstFile(tmpStr, &FindData); + + lp = (char *)malloc(strlen("Disabled")+8); + sprintf(lp, "Disabled"); + i = ComboBox_AddString(hWC_NET, "Disabled"); + ComboBox_SetItemData(hWC_NET, i, lp); + ComboBox_SetCurSel(hWC_NET, 0); + + do { + if (Find==INVALID_HANDLE_VALUE) break; + sprintf(tmpStr,"%s%s", Config.PluginsDir, FindData.cFileName); + Lib = LoadLibrary(tmpStr); + if (Lib!=NULL) { + PSE_GetLibType = (PSEgetLibType) GetProcAddress((HMODULE)Lib,"PSEgetLibType"); + PSE_GetLibName = (PSEgetLibName) GetProcAddress((HMODULE)Lib,"PSEgetLibName"); + PSE_GetLibVersion = (PSEgetLibVersion) GetProcAddress((HMODULE)Lib,"PSEgetLibVersion"); + + if (PSE_GetLibType != NULL && PSE_GetLibName != NULL && PSE_GetLibVersion != NULL) { + unsigned long version = PSE_GetLibVersion(); + long type; + + sprintf(tmpStr, "%s %d.%d", PSE_GetLibName(), (int)(version>>8)&0xff, (int)version&0xff); + type = PSE_GetLibType(); + if (type & PSE_LT_NET && ((version >> 16) == 2)) { + ComboAddPlugin(hWC_NET, Config.Net); + } + } + } + } while (FindNextFile(Find,&FindData)); + + if (Find!=INVALID_HANDLE_VALUE) FindClose(Find); + + return TRUE; +} + +BOOL CALLBACK ConfigureNetPlayDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + int i,iCnt;HWND hWC;char * lp; + + switch(uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("NetPlay Configuration")); + + Button_SetText(GetDlgItem(hW, IDOK), _("OK")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("Cancel")); + Static_SetText(GetDlgItem(hW, IDC_NETPLAY), _("NetPlay")); + Button_SetText(GetDlgItem(hW, IDC_CONFIGNET), _("Configure...")); + Button_SetText(GetDlgItem(hW, IDC_TESTNET), _("Test...")); + Button_SetText(GetDlgItem(hW, IDC_ABOUTNET), _("About...")); + Static_SetText(GetDlgItem(hW, IDC_NETPLAYNOTE), _("Note: The NetPlay Plugin Directory should be the same as the other Plugins.")); + + OnConfigureNetPlayDialog(hW); + return TRUE; + + case WM_COMMAND: { + switch (LOWORD(wParam)) { + case IDC_CONFIGNET: ConfigureNET(hW); return TRUE; + case IDC_TESTNET: TestNET(hW); return TRUE; + case IDC_ABOUTNET: AboutNET(hW); return TRUE; + + case IDCANCEL: + CleanCombo(IDC_LISTNET); + EndDialog(hW,FALSE); + return TRUE; + + case IDOK: + strcpy(Config.Net, GetSelDLL(hW, IDC_LISTNET)); + SaveConfig(); + CleanUpCombos(hW); + LoadPlugins(); + CleanCombo(IDC_LISTNET); + EndDialog(hW,TRUE); + return TRUE; + } + } + } + + return FALSE; +} diff --git a/win32/gui/NoPic.h b/win32/gui/NoPic.h new file mode 100644 index 00000000..553cede5 --- /dev/null +++ b/win32/gui/NoPic.h @@ -0,0 +1,1345 @@ +//////////////////////////////////////////////////////////////////////// +// following code taken from the gpuPeopsSoft +//////////////////////////////////////////////////////////////////////// + +// font 0-9, 24x20 pixels, 1 byte = 4 dots +// 00 = black +// 01 = white +// 10 = red +// 11 = transparent + +unsigned char cFont[10][120]= +{ +// 0 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 1 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 2 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 3 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 4 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x14,0x00,0x00, + 0x80,0x00,0x14,0x14,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x55,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 5 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 6 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x01,0x54,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x14,0x00,0x00,0x00, + 0x80,0x00,0x15,0x54,0x00,0x00, + 0x80,0x00,0x15,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 7 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x15,0x55,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x00,0x50,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x01,0x40,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x05,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 8 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +}, +// 9 +{0xaa,0xaa,0xaa,0xaa,0xaa,0xaa, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x05,0x54,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x05,0x00,0x00, + 0x80,0x00,0x14,0x15,0x00,0x00, + 0x80,0x00,0x05,0x55,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x05,0x00,0x00, + 0x80,0x00,0x00,0x14,0x00,0x00, + 0x80,0x00,0x05,0x50,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0x80,0x00,0x00,0x00,0x00,0x00, + 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa +} +}; + +//////////////////////////////////////////////////////////////////////// + +void PaintPicDot(unsigned char * p,unsigned char c) +{ + + if(c==0) {*p++=0x00;*p++=0x00;*p=0x00;return;} // black + if(c==1) {*p++=0xff;*p++=0xff;*p=0xff;return;} // white + if(c==2) {*p++=0x00;*p++=0x00;*p=0xff;return;} // red + // transparent +} + + ///////////////////////////////////////////////////////////////////// + // generic number/border painter + +void DrawNumBorPic(unsigned char *pMem, int lSelectedSlot) +{ + unsigned char *pf; + int x,y; + int c,v; + + pf=pMem+(103*3); // offset to number rect + + for(y=0;y<20;y++) // loop the number rect pixel + { + for(x=0;x<6;x++) + { + c=cFont[lSelectedSlot][x+y*6]; // get 4 char dot infos at once (number depends on selected slot) + v=(c&0xc0)>>6; + PaintPicDot(pf,(unsigned char)v);pf+=3; // paint the dots into the rect + v=(c&0x30)>>4; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=(c&0x0c)>>2; + PaintPicDot(pf,(unsigned char)v);pf+=3; + v=c&0x03; + PaintPicDot(pf,(unsigned char)v);pf+=3; + } + pf+=104*3; // next rect y line + } + + pf=pMem; // ptr to first pos in 128x96 pic + for(x=0;x<128;x++) // loop top/bottom line + { + *(pf+(95*128*3))=0x00;*pf++=0x00; + *(pf+(95*128*3))=0x00;*pf++=0x00; // paint it red + *(pf+(95*128*3))=0xff;*pf++=0xff; + } + pf=pMem; // ptr to first pos + for(y=0;y<96;y++) // loop left/right line + { + *(pf+(127*3))=0x00;*pf++=0x00; + *(pf+(127*3))=0x00;*pf++=0x00; // paint it red + *(pf+(127*3))=0xff;*pf++=0xff; + pf+=127*3; // offset to next line + } +} + +//////////////////////////////////////////////////////////////////////// + + +/* GIMP RGB C-Source image dump (NoPic.h) */ + +static const struct { + unsigned int width; + unsigned int height; + unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ + unsigned char pixel_data[128 * 96 * 3 + 1]; +} NoPic_Image = { + 128, 96, 3,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0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8" + "\0\0\305\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\251" + "\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\251\0" + "\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\305" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0\214\0\0\34\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\305\0\0\376\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\305\0\0\34\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0""8\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0U\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0\0\305\0\0q\0\0U\0\0U\0" + "\0U\0\0\214\0\0\341\0\0\376\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\341\0\0\251\0\0\251\0\0\251\0\0\251\0\0\251" + "\0\0\251\0\0\251\0\0\341\0\0\376\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\376\0\0\251\0\0U\0\0U\0\0" + "U\0\0q\0\0\251\0\0\376\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0" + "\0\376\0\0\376\0\0\341\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0U\0\0\341\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\341\0\0" + "\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\305" + "\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376" + "\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\341\0\0\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\305\0\0\376\0\0\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214" + "\0\0\376\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0U\0\0\376\0\0\376" + "\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\376\0\0\34" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34" + "\0\0\376\0\0\376\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\341\0\0\376\0\0" + "\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\251\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0" + "\376\0\0\0\0\0\251\0\0\376\0\0\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0" + "\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376" + "\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\251\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376" + "\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0\214\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0" + "\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\305\0\0" + "\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\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0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\214\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0" + "\376\0\0\341\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0" + "\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0" + "\0\376\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0q\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0" + "\0\376\0\0\305\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0U\0\0\214\0\0\341\0\0\376" + "\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\34" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\251\0" + "\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0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\0\376\0\0\376\0\0\251" + "\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0" + "\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\34\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\305" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376" + "\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0" + "\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\214\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\376\0\0\214\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0" + "\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376" + "\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\376" + "\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\376\0\0""8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\214\0\0\376\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0\376\0\0\214\0\0\34\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\251\0\0\376\0\0\376\0\0\376\0\0\251\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\305\0\0\376\0\0\376\0\0\376\0\0\214\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\305\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\341\0\0\376\0\0\376\0" + "\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\251\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\305\0\0\251\0\0\251\0\0\251\0\0\341\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376" + "\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0" + "U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\341\0\0\376\0\0\376\0\0" + "\376\0\0\376\0\0\251\0\0\251\0\0\251\0\0\251\0\0\376\0\0\376\0\0\376\0\0" + "\376\0\0\341\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0\0\376\0\0\376\0\0\376\0\0U\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0q\0\0\376\0\0\376\0\0\376\0\0\376" + "\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\341\0\0q\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0U\0\0\376\0\0\376\0\0\251\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\251\0\0\376\0\0\376\0\0U\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\34\0\0\251\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0\0\376\0" + "\0\376\0\0\376\0\0\376\0\0\376\0\0\251\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0U\0\0U\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\0U\0" + "\0U\0\0\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0q\0\0\251\0\0\376\0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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0", +}; + diff --git a/win32/gui/Win32.h b/win32/gui/Win32.h new file mode 100644 index 00000000..39aa59f3 --- /dev/null +++ b/win32/gui/Win32.h @@ -0,0 +1,69 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#ifndef __WIN32_H__ +#define __WIN32_H__ + +typedef struct { + HWND hWnd; // Main window handle + HINSTANCE hInstance; // Application instance + HMENU hMenu; // Main window menu +} AppData; + +AppData gApp; +HANDLE hConsole; + +extern int StatesC; +extern int AccBreak; +extern int ConfPlug; +extern int CancelQuit; +extern char cfgfile[256]; +extern int Running; +extern char PcsxDir[256]; + +void strcatz(char *dst, char *src); + +LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); +BOOL CALLBACK ConfigureMcdsDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); +BOOL CALLBACK ConfigureCpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); +BOOL CALLBACK ConfigureNetPlayDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); + +LRESULT WINAPI CheatDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); +LRESULT WINAPI CheatSearchDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); + +void ConfigurePlugins(HWND hWnd); + +int Open_File_Proc(char *file); +int Open_Iso_Proc(char *file); +void Open_Mcd_Proc(HWND hW, int MCDID); +void CreateMainWindow(int nCmdShow); +void RunGui(); +void PADhandleKey(int key); + +int LoadConfig(); +void SaveConfig(); + +void UpdateMenuSlots(); +void ResetMenuSlots(); + +void InitLanguages(); +char *GetLanguageNext(); +void CloseLanguages(); +void ChangeLanguage(char *lang); + +#endif /* __WIN32_H__ */ diff --git a/win32/gui/WndMain.c b/win32/gui/WndMain.c new file mode 100644 index 00000000..f167c0ef --- /dev/null +++ b/win32/gui/WndMain.c @@ -0,0 +1,1802 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "resource.h" +#include "AboutDlg.h" + +#include "psxcommon.h" +#include "plugin.h" +#include "debug.h" +#include "Win32.h" +#include "sio.h" +#include "misc.h" +#include "cheat.h" + +#ifdef __MINGW32__ +#ifndef LVM_GETSELECTIONMARK +#define LVM_GETSELECTIONMARK (LVM_FIRST+66) +#endif +#ifndef ListView_GetSelectionMark +#define ListView_GetSelectionMark(w) (INT)SNDMSG((w),LVM_GETSELECTIONMARK,0,0) +#endif +#endif + +int AccBreak = 0; +int ConfPlug = 0; +int StatesC = 0; +int CancelQuit = 0; +char cfgfile[256]; +int Running = 0; +char PcsxDir[256]; + +static HDC hDC; +static HDC hdcmem; +static HBITMAP hBm; +static BITMAP bm; + +#ifdef ENABLE_NLS + +unsigned int langsMax; + +typedef struct { + char lang[256]; +} _langs; +_langs *langs = NULL; + +typedef struct { + char id[8]; + char name[64]; + LANGID langid; +} LangDef; + +LangDef sLangs[] = { + { "ar", N_("Arabic"), 0x0401 }, + { "ca", N_("Catalan"), 0x0403 }, + { "de", N_("German"), 0x0407 }, + { "el", N_("Greek"), 0x0408 }, + { "en", N_("English"), 0x0409 }, + { "es", N_("Spanish"), 0x040a }, + { "fr_FR", N_("French"), 0x040c }, + { "it", N_("Italian"), 0x0410 }, + { "pt", N_("Portuguese"), 0x0816 }, + { "pt_BR", N_("Portuguese (Brazilian)"), 0x0416 }, + { "ro", N_("Romanian"), 0x0418 }, + { "ru_RU", N_("Russian"), 0x0419 }, + { "zh_CN", N_("Simplified Chinese"), 0x0804 }, + { "zh_TW", N_("Traditional Chinese"), 0x0404 }, + { "ja", N_("Japanese"), 0x0411 }, + { "ko", N_("Korean"), 0x0412 }, + { "", "", 0xFFFF }, +}; + +char *ParseLang(char *id) { + int i=0; + + while (sLangs[i].id[0] != '\0') { + if (!strcmp(id, sLangs[i].id)) + return _(sLangs[i].name); + i++; + } + + return id; +} + +static void SetDefaultLang(void) { + LANGID langid; + int i; + + langid = GetSystemDefaultLangID(); + + i = 0; + while (sLangs[i].id[0] != '\0') { + if (langid == sLangs[i].langid) { + strcpy(Config.Lang, sLangs[i].id); + return; + } + i++; + } + + strcpy(Config.Lang, "English"); +} + +#endif + +void strcatz(char *dst, char *src) { + int len = strlen(dst) + 1; + strcpy(dst + len, src); +} + +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { + strcpy(cfgfile, "Software\\Pcsx"); + + gApp.hInstance = hInstance; + +#ifdef ENABLE_NLS + bindtextdomain(PACKAGE, "Langs\\"); + textdomain(PACKAGE); +#endif + + Running = 0; + + GetCurrentDirectory(256, PcsxDir); + + memset(&Config, 0, sizeof(PcsxConfig)); + strcpy(Config.Net, "Disabled"); + if (LoadConfig() == -1) { + Config.PsxAuto = 1; + strcpy(Config.PluginsDir, "Plugins\\"); + strcpy(Config.BiosDir, "Bios\\"); + + strcpy(Config.Mcd1, "memcards\\Mcd001.mcr"); + strcpy(Config.Mcd2, "memcards\\Mcd002.mcr"); + + ConfPlug = 1; + +#ifdef ENABLE_NLS + { + char text[256]; + SetDefaultLang(); + sprintf(text, "LANGUAGE=%s", Config.Lang); + gettext_putenv(text); + } +#endif + + ConfigurePlugins(gApp.hWnd); + + if (LoadConfig() == -1) { + return 0; + } + } + + strcpy(Config.PatchesDir, "Patches\\"); + +#ifdef ENABLE_NLS + if (Config.Lang[0] == 0) { + SetDefaultLang(); + SaveConfig(); + LoadConfig(); + } +#endif + + if (SysInit() == -1) return 1; + + CreateMainWindow(nCmdShow); + + RunGui(); + + return 0; +} + +void RunGui() { + MSG msg; + + for (;;) { + if(PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } +} + +void RestoreWindow() { + AccBreak = 1; + DestroyWindow(gApp.hWnd); + CreateMainWindow(SW_SHOWNORMAL); + ShowCursor(TRUE); + SetCursor(LoadCursor(gApp.hInstance, IDC_ARROW)); + ShowCursor(TRUE); +} + +int Slots[5] = { -1, -1, -1, -1, -1 }; + +void ResetMenuSlots() { + int i; + + for (i = 0; i < 5; i++) { + if (Slots[i] == -1) + EnableMenuItem(GetSubMenu(gApp.hMenu, 0), ID_FILE_STATES_LOAD_SLOT1+i, MF_GRAYED); + else + EnableMenuItem(GetSubMenu(gApp.hMenu, 0), ID_FILE_STATES_LOAD_SLOT1+i, MF_ENABLED); + } +} + +void UpdateMenuSlots() { + char str[256]; + int i; + + for (i = 0; i < 5; i++) { + GetStateFilename(str, i); + Slots[i] = CheckState(str); + } +} + +void OpenConsole() { + if (hConsole) return; + AllocConsole(); + SetConsoleTitle("Psx Output"); + hConsole = GetStdHandle(STD_OUTPUT_HANDLE); +} + +void CloseConsole() { + FreeConsole(); + hConsole = NULL; +} + +void States_Load(int num) { + char Text[256]; + int ret; + + SetMenu(gApp.hWnd, NULL); + OpenPlugins(gApp.hWnd); + + GetStateFilename(Text, num); + + ret = LoadState(Text); + if (ret == 0) + sprintf(Text, _("*PCSX*: Loaded State %d"), num+1); + else sprintf(Text, _("*PCSX*: Error Loading State %d"), num+1); + GPU_displayText(Text); + + Running = 1; + CheatSearchBackupMemory(); + psxCpu->Execute(); +} + +void States_Save(int num) { + char Text[256]; + int ret; + + SetMenu(gApp.hWnd, NULL); + OpenPlugins(gApp.hWnd); + + GPU_updateLace(); + + GetStateFilename(Text, num); + GPU_freeze(2, (GPUFreeze_t *)&num); + ret = SaveState(Text); + if (ret == 0) + sprintf(Text, _("*PCSX*: Saved State %d"), num+1); + else sprintf(Text, _("*PCSX*: Error Saving State %d"), num+1); + GPU_displayText(Text); + + Running = 1; + CheatSearchBackupMemory(); + psxCpu->Execute(); +} + +void OnStates_LoadOther() { + OPENFILENAME ofn; + char szFileName[MAXPATHLEN]; + char szFileTitle[MAXPATHLEN]; + char szFilter[256]; + + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + strcpy(szFilter, _("PCSX State Format")); + strcatz(szFilter, "*.*"); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = gApp.hWnd; + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = MAXPATHLEN; + ofn.lpstrInitialDir = NULL; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = MAXPATHLEN; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = NULL; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName ((LPOPENFILENAME)&ofn)) { + char Text[256]; + int ret; + + SetMenu(gApp.hWnd, NULL); + OpenPlugins(gApp.hWnd); + + ret = LoadState(szFileName); + if (ret == 0) + sprintf(Text, _("*PCSX*: Loaded State %s"), szFileName); + else sprintf(Text, _("*PCSX*: Error Loading State %s"), szFileName); + GPU_displayText(Text); + + Running = 1; + psxCpu->Execute(); + } +} + +void OnStates_Save1() { States_Save(0); } +void OnStates_Save2() { States_Save(1); } +void OnStates_Save3() { States_Save(2); } +void OnStates_Save4() { States_Save(3); } +void OnStates_Save5() { States_Save(4); } + +void OnStates_SaveOther() { + OPENFILENAME ofn; + char szFileName[MAXPATHLEN]; + char szFileTitle[MAXPATHLEN]; + char szFilter[256]; + + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + strcpy(szFilter, _("PCSX State Format")); + strcatz(szFilter, "*.*"); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = gApp.hWnd; + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = MAXPATHLEN; + ofn.lpstrInitialDir = NULL; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = MAXPATHLEN; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = NULL; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName ((LPOPENFILENAME)&ofn)) { + char Text[256]; + int ret; + + SetMenu(gApp.hWnd, NULL); + OpenPlugins(gApp.hWnd); + + ret = SaveState(szFileName); + if (ret == 0) + sprintf(Text, _("*PCSX*: Saved State %s"), szFileName); + else sprintf(Text, _("*PCSX*: Error Saving State %s"), szFileName); + GPU_displayText(Text); + + Running = 1; + psxCpu->Execute(); + } +} + +LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { + char File[256]; + PAINTSTRUCT ps; + + switch (msg) { + case WM_CREATE: + hBm = LoadBitmap(gApp.hInstance, MAKEINTRESOURCE(MAIN_LOGO)); + GetObject(hBm, sizeof(BITMAP), (LPVOID)&bm); + hDC = GetDC(hWnd); + hdcmem = CreateCompatibleDC(hDC); + ReleaseDC(hWnd, hDC); + break; + + case WM_PAINT: + hDC = BeginPaint(hWnd, &ps); + SelectObject(hdcmem, hBm); + if (!Running) BitBlt(hDC, 0, 0, bm.bmWidth, bm.bmHeight, hdcmem, 0, 0, SRCCOPY); + EndPaint(hWnd, &ps); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case ID_FILE_EXIT: + SysClose(); + PostQuitMessage(0); + exit(0); + return TRUE; + + case ID_FILE_RUN_CD: + SetIsoFile(NULL); + SetMenu(hWnd, NULL); + LoadPlugins(); + if (OpenPlugins(hWnd) == -1) { + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + SysReset(); + if (CheckCdrom() == -1) { + ClosePlugins(); + RestoreWindow(); + SysMessage(_("The CD does not appear to be a valid Playstation CD")); + return TRUE; + } + if (LoadCdrom() == -1) { + ClosePlugins(); + RestoreWindow(); + SysMessage(_("Could not load CD-ROM!")); + return TRUE; + } + ShowCursor(FALSE); + Running = 1; + psxCpu->Execute(); + return TRUE; + + case ID_FILE_RUNBIOS: + if (strcmp(Config.Bios, "HLE") == 0) { + SysMessage(_("Running BIOS is not supported with Internal HLE Bios.")); + return TRUE; + } + SetIsoFile(NULL); + SetMenu(hWnd, NULL); + LoadPlugins(); + if (OpenPlugins(hWnd) == -1) { + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + ShowCursor(FALSE); + SysReset(); + CdromId[0] = '\0'; + CdromLabel[0] = '\0'; + Running = 1; + psxCpu->Execute(); + return TRUE; + + case ID_FILE_RUN_ISO: + if (!Open_Iso_Proc(File)) return TRUE; + SetIsoFile(File); + SetMenu(hWnd, NULL); + LoadPlugins(); + if (OpenPlugins(hWnd) == -1) { + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + SysReset(); + if (CheckCdrom() == -1) { + ClosePlugins(); + RestoreWindow(); + SysMessage(_("The CD does not appear to be a valid Playstation CD")); + return TRUE; + } + if (LoadCdrom() == -1) { + ClosePlugins(); + RestoreWindow(); + SysMessage(_("Could not load CD-ROM!")); + return TRUE; + } + ShowCursor(FALSE); + Running = 1; + psxCpu->Execute(); + return TRUE; + + case ID_FILE_RUN_EXE: + if (!Open_File_Proc(File)) return TRUE; + SetIsoFile(NULL); + SetMenu(hWnd, NULL); + LoadPlugins(); + if (OpenPlugins(hWnd) == -1) { + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + SysReset(); + CheckCdrom(); + Load(File); + Running = 1; + psxCpu->Execute(); + return TRUE; + + case ID_FILE_STATES_LOAD_SLOT1: States_Load(0); return TRUE; + case ID_FILE_STATES_LOAD_SLOT2: States_Load(1); return TRUE; + case ID_FILE_STATES_LOAD_SLOT3: States_Load(2); return TRUE; + case ID_FILE_STATES_LOAD_SLOT4: States_Load(3); return TRUE; + case ID_FILE_STATES_LOAD_SLOT5: States_Load(4); return TRUE; + case ID_FILE_STATES_LOAD_OTHER: OnStates_LoadOther(); return TRUE; + + case ID_FILE_STATES_SAVE_SLOT1: States_Save(0); return TRUE; + case ID_FILE_STATES_SAVE_SLOT2: States_Save(1); return TRUE; + case ID_FILE_STATES_SAVE_SLOT3: States_Save(2); return TRUE; + case ID_FILE_STATES_SAVE_SLOT4: States_Save(3); return TRUE; + case ID_FILE_STATES_SAVE_SLOT5: States_Save(4); return TRUE; + case ID_FILE_STATES_SAVE_OTHER: OnStates_SaveOther(); return TRUE; + + case ID_EMULATOR_RUN: + SetMenu(hWnd, NULL); + OpenPlugins(hWnd); + ShowCursor(FALSE); + Running = 1; + CheatSearchBackupMemory(); + psxCpu->Execute(); + return TRUE; + + case ID_EMULATOR_RESET: + SetMenu(hWnd, NULL); + OpenPlugins(hWnd); + SysReset(); + CheckCdrom(); + LoadCdrom(); + ShowCursor(FALSE); + Running = 1; + psxCpu->Execute(); + return TRUE; + + case ID_EMULATOR_SWITCH_ISO: + if (!Open_Iso_Proc(File)) return TRUE; + SetIsoFile(File); + SetMenu(hWnd, NULL); + if (OpenPlugins(hWnd) == -1) { + ClosePlugins(); + RestoreWindow(); + return TRUE; + } + ShowCursor(FALSE); + Running = 1; + SetCdOpenCaseTime(time(NULL) + 2); + CheatSearchBackupMemory(); + psxCpu->Execute(); + return TRUE; + + case ID_CONFIGURATION_GRAPHICS: + if (GPU_configure) GPU_configure(); + return TRUE; + + case ID_CONFIGURATION_SOUND: + if (SPU_configure) SPU_configure(); + return TRUE; + + case ID_CONFIGURATION_CONTROLLERS: + if (PAD1_configure) PAD1_configure(); + if (strcmp(Config.Pad1, Config.Pad2)) if (PAD2_configure) PAD2_configure(); + return TRUE; + + case ID_CONFIGURATION_CDROM: + if (CDR_configure) CDR_configure(); + return TRUE; + + case ID_CONFIGURATION_NETPLAY: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_NETPLAY), hWnd, (DLGPROC)ConfigureNetPlayDlgProc); + return TRUE; + + case ID_CONFIGURATION_MEMORYCARDMANAGER: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_MCDCONF), hWnd, (DLGPROC)ConfigureMcdsDlgProc); + return TRUE; + + case ID_CONFIGURATION_CPU: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CPUCONF), hWnd, (DLGPROC)ConfigureCpuDlgProc); + return TRUE; + + case ID_CONFIGURATION: + ConfigurePlugins(hWnd); + return TRUE; + + case ID_CONFIGURATION_CHEATLIST: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATLIST), hWnd, (DLGPROC)CheatDlgProc); + break; + + case ID_CONFIGURATION_CHEATSEARCH: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CHEATSEARCH), hWnd, (DLGPROC)CheatSearchDlgProc); + break; + + case ID_HELP_ABOUT: + DialogBox(gApp.hInstance, MAKEINTRESOURCE(ABOUT_DIALOG), hWnd, (DLGPROC)AboutDlgProc); + return TRUE; + + default: +#ifdef ENABLE_NLS + if (LOWORD(wParam) >= ID_LANGS && LOWORD(wParam) <= (ID_LANGS + langsMax)) { + AccBreak = 1; + DestroyWindow(gApp.hWnd); + ChangeLanguage(langs[LOWORD(wParam) - ID_LANGS].lang); + CreateMainWindow(SW_NORMAL); + return TRUE; + } +#endif + break; + } + break; + + case WM_SYSKEYDOWN: + if (wParam != VK_F10) + return DefWindowProc(hWnd, msg, wParam, lParam); + case WM_KEYDOWN: + PADhandleKey(wParam); + return TRUE; + + case WM_DESTROY: + if (!AccBreak) { + if (Running) ClosePlugins(); + SysClose(); + PostQuitMessage(0); + exit(0); + } + else AccBreak = 0; + + DeleteObject(hBm); + DeleteDC(hdcmem); + return TRUE; + + case WM_QUIT: + exit(0); + break; + + default: + return DefWindowProc(hWnd, msg, wParam, lParam); + } + + return FALSE; +} + +HWND mcdDlg; +McdBlock Blocks[2][15]; +int IconC[2][15]; +HIMAGELIST Iiml[2]; +HICON eICON; + +void CreateListView(int idc) { + HWND List; + LV_COLUMN col; + + List = GetDlgItem(mcdDlg, idc); + + col.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; + col.fmt = LVCFMT_LEFT; + + col.pszText = _("Title"); + col.cx = 170; + col.iSubItem = 0; + + ListView_InsertColumn(List, 0, &col); + + col.pszText = _("Status"); + col.cx = 50; + col.iSubItem = 1; + + ListView_InsertColumn(List, 1, &col); + + col.pszText = _("Game ID"); + col.cx = 90; + col.iSubItem = 2; + + ListView_InsertColumn(List, 2, &col); + + col.pszText = _("Game"); + col.cx = 80; + col.iSubItem = 3; + + ListView_InsertColumn(List, 3, &col); +} + +int GetRGB() { + HDC scrDC, memDC; + HBITMAP oldBmp = NULL; + HBITMAP curBmp = NULL; + COLORREF oldColor; + COLORREF curColor = RGB(255,255,255); + int i, R, G, B; + + R = G = B = 1; + + scrDC = CreateDC("DISPLAY", NULL, NULL, NULL); + memDC = CreateCompatibleDC(NULL); + curBmp = CreateCompatibleBitmap(scrDC, 1, 1); + oldBmp = (HBITMAP)SelectObject(memDC, curBmp); + + for (i = 255; i >= 0; --i) { + oldColor = curColor; + curColor = SetPixel(memDC, 0, 0, RGB(i, i, i)); + + if (GetRValue(curColor) < GetRValue(oldColor)) ++R; + if (GetGValue(curColor) < GetGValue(oldColor)) ++G; + if (GetBValue(curColor) < GetBValue(oldColor)) ++B; + } + + DeleteObject(oldBmp); + DeleteObject(curBmp); + DeleteDC(scrDC); + DeleteDC(memDC); + + return (R * G * B); +} + +HICON GetIcon(short *icon) { + ICONINFO iInfo; + HDC hDC; + char mask[16*16]; + int x, y, c, Depth; + + hDC = CreateIC("DISPLAY",NULL,NULL,NULL); + Depth=GetDeviceCaps(hDC, BITSPIXEL); + DeleteDC(hDC); + + if (Depth == 16) { + if (GetRGB() == (32 * 32 * 32)) + Depth = 15; + } + + for (y=0; y<16; y++) { + for (x=0; x<16; x++) { + c = icon[y*16+x]; + if (Depth == 15 || Depth == 32) + c = ((c&0x001f) << 10) | + ((c&0x7c00) >> 10) | + ((c&0x03e0) ); + else + c = ((c&0x001f) << 11) | + ((c&0x7c00) >> 9) | + ((c&0x03e0) << 1); + + icon[y*16+x] = c; + } + } + + iInfo.fIcon = TRUE; + memset(mask, 0, 16*16); + iInfo.hbmMask = CreateBitmap(16, 16, 1, 1, mask); + iInfo.hbmColor = CreateBitmap(16, 16, 1, 16, icon); + + return CreateIconIndirect(&iInfo); +} + +HICON hICON[2][3][15]; +int aIover[2]; +int ani[2]; + +void LoadMcdItems(int mcd, int idc) { + HWND List = GetDlgItem(mcdDlg, idc); + LV_ITEM item; + HIMAGELIST iml = Iiml[mcd-1]; + int i, j; + HICON hIcon; + McdBlock *Info; + + aIover[mcd-1]=0; + ani[mcd-1]=0; + + ListView_DeleteAllItems(List); + + for (i=0; i<15; i++) { + + item.mask = LVIF_TEXT | LVIF_IMAGE; + item.iItem = i; + item.iImage = i; + item.pszText = LPSTR_TEXTCALLBACK; + item.iSubItem = 0; + + IconC[mcd-1][i] = 0; + Info = &Blocks[mcd-1][i]; + + if ((Info->Flags & 0xF) == 1 && Info->IconCount != 0) { + hIcon = GetIcon(Info->Icon); + + if (Info->IconCount > 1) { + for(j = 0; j < 3; j++) + hICON[mcd-1][j][i]=hIcon; + } + } else { + hIcon = eICON; + } + + ImageList_ReplaceIcon(iml, -1, hIcon); + ListView_InsertItem(List, &item); + } +} + +void UpdateMcdItems(int mcd, int idc) { + HWND List = GetDlgItem(mcdDlg, idc); + LV_ITEM item; + HIMAGELIST iml = Iiml[mcd-1]; + int i, j; + McdBlock *Info; + HICON hIcon; + + aIover[mcd-1]=0; + ani[mcd-1]=0; + + for (i=0; i<15; i++) { + + item.mask = LVIF_TEXT | LVIF_IMAGE; + item.iItem = i; + item.iImage = i; + item.pszText = LPSTR_TEXTCALLBACK; + item.iSubItem = 0; + + IconC[mcd-1][i] = 0; + Info = &Blocks[mcd-1][i]; + + if ((Info->Flags & 0xF) == 1 && Info->IconCount != 0) { + hIcon = GetIcon(Info->Icon); + + if (Info->IconCount > 1) { + for(j = 0; j < 3; j++) + hICON[mcd-1][j][i]=hIcon; + } + } else { + hIcon = eICON; + } + + ImageList_ReplaceIcon(iml, i, hIcon); + ListView_SetItem(List, &item); + } + ListView_Update(List, -1); +} + +void McdListGetDispInfo(int mcd, int idc, LPNMHDR pnmh) { + LV_DISPINFO *lpdi = (LV_DISPINFO *)pnmh; + McdBlock *Info; + char buf[256]; + static char buftitle[256]; + + Info = &Blocks[mcd - 1][lpdi->item.iItem]; + + switch (lpdi->item.iSubItem) { + case 0: + switch (Info->Flags & 0xF) { + case 1: + if (MultiByteToWideChar(932, 0, (LPCSTR)Info->sTitle, -1, (LPWSTR)buf, sizeof(buf)) == 0) { + lpdi->item.pszText = Info->Title; + } else if (WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)buf, -1, (LPSTR)buftitle, sizeof(buftitle), NULL, NULL) == 0) { + lpdi->item.pszText = Info->Title; + } else { + lpdi->item.pszText = buftitle; + } + break; + case 2: + lpdi->item.pszText = _("mid link block"); + break; + case 3: + lpdi->item.pszText = _("terminiting link block"); + break; + } + break; + case 1: + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { + lpdi->item.pszText = _("Deleted"); + } else lpdi->item.pszText = _("Free"); + } else if ((Info->Flags & 0xF0) == 0x50) + lpdi->item.pszText = _("Used"); + else { lpdi->item.pszText = _("Free"); } + break; + case 2: + if((Info->Flags & 0xF)==1) + lpdi->item.pszText = Info->ID; + break; + case 3: + if((Info->Flags & 0xF)==1) + lpdi->item.pszText = Info->Name; + break; + } +} + +void McdListNotify(int mcd, int idc, LPNMHDR pnmh) { + switch (pnmh->code) { + case LVN_GETDISPINFO: McdListGetDispInfo(mcd, idc, pnmh); break; + } +} + +void UpdateMcdDlg() { + int i; + + for (i=1; i<16; i++) GetMcdBlockInfo(1, i, &Blocks[0][i-1]); + for (i=1; i<16; i++) GetMcdBlockInfo(2, i, &Blocks[1][i-1]); + UpdateMcdItems(1, IDC_LIST1); + UpdateMcdItems(2, IDC_LIST2); +} + +void LoadMcdDlg() { + int i; + + for (i=1; i<16; i++) GetMcdBlockInfo(1, i, &Blocks[0][i-1]); + for (i=1; i<16; i++) GetMcdBlockInfo(2, i, &Blocks[1][i-1]); + LoadMcdItems(1, IDC_LIST1); + LoadMcdItems(2, IDC_LIST2); +} + +void UpdateMcdIcon(int mcd, int idc) { + HWND List = GetDlgItem(mcdDlg, idc); + HIMAGELIST iml = Iiml[mcd-1]; + int i; + McdBlock *Info; + int *count; + + if(!aIover[mcd-1]) { + ani[mcd-1]++; + + for (i=0; i<15; i++) { + Info = &Blocks[mcd-1][i]; + count = &IconC[mcd-1][i]; + + if ((Info->Flags & 0xF) != 1) continue; + if (Info->IconCount <= 1) continue; + + if (*count < Info->IconCount) { + (*count)++; + aIover[mcd-1]=0; + + if(ani[mcd-1] <= (Info->IconCount-1)) // last frame and below... + hICON[mcd-1][ani[mcd-1]][i] = GetIcon(&Info->Icon[(*count)*16*16]); + } else { + aIover[mcd-1]=1; + } + } + + } else { + + if (ani[mcd-1] > 1) ani[mcd-1] = 0; // 1st frame + else ani[mcd-1]++; // 2nd, 3rd frame + + for(i=0;i<15;i++) { + Info = &Blocks[mcd-1][i]; + + if (((Info->Flags & 0xF) == 1) && (Info->IconCount > 1)) + ImageList_ReplaceIcon(iml, i, hICON[mcd-1][ani[mcd-1]][i]); + } + InvalidateRect(List, NULL, FALSE); + } +} + +static int copy = 0, copymcd = 0; +//static int listsel = 0; + +BOOL CALLBACK ConfigureMcdsDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + char str[256]; + LPBYTE lpAND, lpXOR; + LPBYTE lpA, lpX; + int i, j; + + switch(uMsg) { + case WM_INITDIALOG: + mcdDlg = hW; + + SetWindowText(hW, _("Memcard Manager")); + + Button_SetText(GetDlgItem(hW, IDOK), _("OK")); + Button_SetText(GetDlgItem(hW, IDCANCEL), _("Cancel")); + Button_SetText(GetDlgItem(hW, IDC_MCDSEL1), _("Select Mcd")); + Button_SetText(GetDlgItem(hW, IDC_FORMAT1), _("Format Mcd")); + Button_SetText(GetDlgItem(hW, IDC_RELOAD1), _("Reload Mcd")); + Button_SetText(GetDlgItem(hW, IDC_MCDSEL2), _("Select Mcd")); + Button_SetText(GetDlgItem(hW, IDC_FORMAT2), _("Format Mcd")); + Button_SetText(GetDlgItem(hW, IDC_RELOAD2), _("Reload Mcd")); + Button_SetText(GetDlgItem(hW, IDC_COPYTO2), _("-> Copy ->")); + Button_SetText(GetDlgItem(hW, IDC_COPYTO1), _("<- Copy <-")); + Button_SetText(GetDlgItem(hW, IDC_PASTE), _("Paste")); + Button_SetText(GetDlgItem(hW, IDC_DELETE1), _("<- Un/Delete")); + Button_SetText(GetDlgItem(hW, IDC_DELETE2), _("Un/Delete ->")); + + Static_SetText(GetDlgItem(hW, IDC_FRAMEMCD1), _("Memory Card 1")); + Static_SetText(GetDlgItem(hW, IDC_FRAMEMCD2), _("Memory Card 2")); + + lpA=lpAND=(LPBYTE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(16*16)); + lpX=lpXOR=(LPBYTE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(16*16)); + + for(i=0;i<16;i++) + { + for(j=0;j<16;j++) + { + *lpA++=0xff; + *lpX++=0; + } + } + eICON=CreateIcon(gApp.hInstance,16,16,1,1,lpAND,lpXOR); + + HeapFree(GetProcessHeap(),0,lpAND); + HeapFree(GetProcessHeap(),0,lpXOR); + + if (!strlen(Config.Mcd1)) strcpy(Config.Mcd1, "memcards\\Mcd001.mcr"); + if (!strlen(Config.Mcd2)) strcpy(Config.Mcd2, "memcards\\Mcd002.mcr"); + Edit_SetText(GetDlgItem(hW,IDC_MCD1), Config.Mcd1); + Edit_SetText(GetDlgItem(hW,IDC_MCD2), Config.Mcd2); + + CreateListView(IDC_LIST1); + CreateListView(IDC_LIST2); + + Iiml[0] = ImageList_Create(16, 16, ILC_COLOR16, 0, 0); + Iiml[1] = ImageList_Create(16, 16, ILC_COLOR16, 0, 0); + + ListView_SetImageList(GetDlgItem(mcdDlg, IDC_LIST1), Iiml[0], LVSIL_SMALL); + ListView_SetImageList(GetDlgItem(mcdDlg, IDC_LIST2), Iiml[1], LVSIL_SMALL); + + Button_Enable(GetDlgItem(hW, IDC_PASTE), FALSE); + + LoadMcdDlg(); + + SetTimer(hW, 1, 250, NULL); + + return TRUE; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDC_COPYTO1: + copy = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST2)); + copymcd = 1; + + Button_Enable(GetDlgItem(hW, IDC_PASTE), TRUE); + return TRUE; + case IDC_COPYTO2: + copy = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST1)); + copymcd = 2; + + Button_Enable(GetDlgItem(hW, IDC_PASTE), TRUE); + return TRUE; + case IDC_PASTE: + if (MessageBox(hW, _("Are you sure you want to paste this selection?"), _("Confirmation"), MB_YESNO) == IDNO) return TRUE; + + if (copymcd == 1) { + Edit_GetText(GetDlgItem(hW,IDC_MCD1), str, 256); + i = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST1)); + + // save dir data + save data + memcpy(Mcd1Data + (i+1) * 128, Mcd2Data + (copy+1) * 128, 128); + SaveMcd(str, Mcd1Data, (i+1) * 128, 128); + memcpy(Mcd1Data + (i+1) * 1024 * 8, Mcd2Data + (copy+1) * 1024 * 8, 1024 * 8); + SaveMcd(str, Mcd1Data, (i+1) * 1024 * 8, 1024 * 8); + } else { // 2 + Edit_GetText(GetDlgItem(hW,IDC_MCD2), str, 256); + i = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST2)); + + // save dir data + save data + memcpy(Mcd2Data + (i+1) * 128, Mcd1Data + (copy+1) * 128, 128); + SaveMcd(str, Mcd2Data, (i+1) * 128, 128); + memcpy(Mcd2Data + (i+1) * 1024 * 8, Mcd1Data + (copy+1) * 1024 * 8, 1024 * 8); + SaveMcd(str, Mcd2Data, (i+1) * 1024 * 8, 1024 * 8); + } + + UpdateMcdDlg(); + + return TRUE; + case IDC_DELETE1: + { + McdBlock *Info; + int mcd = 1; + int i, xor = 0, j; + unsigned char *data, *ptr; + + Edit_GetText(GetDlgItem(hW,IDC_MCD1), str, 256); + i = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST1)); + data = Mcd1Data; + + i++; + + ptr = data + i * 128; + + Info = &Blocks[mcd-1][i-1]; + + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { // deleted + *ptr = 0x50 | (Info->Flags & 0xF); + } else return TRUE; + } else if ((Info->Flags & 0xF0) == 0x50) { // used + *ptr = 0xA0 | (Info->Flags & 0xF); + } else { return TRUE; } + + for (j=0; j<127; j++) xor^=*ptr++; + *ptr = xor; + + SaveMcd(str, data, i * 128, 128); + UpdateMcdDlg(); + } + + return TRUE; + case IDC_DELETE2: + { + McdBlock *Info; + int mcd = 2; + int i, xor = 0, j; + unsigned char *data, *ptr; + + Edit_GetText(GetDlgItem(hW,IDC_MCD2), str, 256); + i = ListView_GetSelectionMark(GetDlgItem(mcdDlg, IDC_LIST2)); + data = Mcd2Data; + + i++; + + ptr = data + i * 128; + + Info = &Blocks[mcd-1][i-1]; + + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { // deleted + *ptr = 0x50 | (Info->Flags & 0xF); + } else return TRUE; + } else if ((Info->Flags & 0xF0) == 0x50) { // used + *ptr = 0xA0 | (Info->Flags & 0xF); + } else { return TRUE; } + + for (j=0; j<127; j++) xor^=*ptr++; + *ptr = xor; + + SaveMcd(str, data, i * 128, 128); + UpdateMcdDlg(); + } + + return TRUE; + + case IDC_MCDSEL1: + Open_Mcd_Proc(hW, 1); + return TRUE; + case IDC_MCDSEL2: + Open_Mcd_Proc(hW, 2); + return TRUE; + case IDC_RELOAD1: + Edit_GetText(GetDlgItem(hW,IDC_MCD1), str, 256); + LoadMcd(1, str); + UpdateMcdDlg(); + return TRUE; + case IDC_RELOAD2: + Edit_GetText(GetDlgItem(hW,IDC_MCD2), str, 256); + LoadMcd(2, str); + UpdateMcdDlg(); + return TRUE; + case IDC_FORMAT1: + if (MessageBox(hW, _("Are you sure you want to format this Memory Card?"), _("Confirmation"), MB_YESNO) == IDNO) return TRUE; + Edit_GetText(GetDlgItem(hW,IDC_MCD1), str, 256); + CreateMcd(str); + LoadMcd(1, str); + UpdateMcdDlg(); + return TRUE; + case IDC_FORMAT2: + if (MessageBox(hW, _("Are you sure you want to format this Memory Card?"), _("Confirmation"), MB_YESNO) == IDNO) return TRUE; + Edit_GetText(GetDlgItem(hW,IDC_MCD2), str, 256); + CreateMcd(str); + LoadMcd(2, str); + UpdateMcdDlg(); + return TRUE; + case IDCANCEL: + LoadMcds(Config.Mcd1, Config.Mcd2); + + EndDialog(hW,FALSE); + + return TRUE; + case IDOK: + Edit_GetText(GetDlgItem(hW,IDC_MCD1), Config.Mcd1, 256); + Edit_GetText(GetDlgItem(hW,IDC_MCD2), Config.Mcd2, 256); + + LoadMcds(Config.Mcd1, Config.Mcd2); + SaveConfig(); + + EndDialog(hW,TRUE); + + return TRUE; + } + case WM_NOTIFY: + switch (wParam) { + case IDC_LIST1: McdListNotify(1, IDC_LIST1, (LPNMHDR)lParam); break; + case IDC_LIST2: McdListNotify(2, IDC_LIST2, (LPNMHDR)lParam); break; + } + return TRUE; + case WM_TIMER: + UpdateMcdIcon(1, IDC_LIST1); + UpdateMcdIcon(2, IDC_LIST2); + return TRUE; + case WM_DESTROY: + DestroyIcon(eICON); + //KillTimer(hW, 1); + return TRUE; + } + return FALSE; +} + +BOOL CALLBACK ConfigureCpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + long tmp; + + switch(uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Cpu Config")); + + Button_SetText(GetDlgItem(hW,IDOK), _("OK")); + Button_SetText(GetDlgItem(hW,IDCANCEL), _("Cancel")); + + Button_SetText(GetDlgItem(hW,IDC_XA), _("Disable Xa Decoding")); + Button_SetText(GetDlgItem(hW,IDC_SIO), _("Sio Irq Always Enabled")); + Button_SetText(GetDlgItem(hW,IDC_MDEC), _("Black && White Movies")); + Button_SetText(GetDlgItem(hW,IDC_CDDA), _("Disable Cd audio")); + Button_SetText(GetDlgItem(hW,IDC_PSXAUTO), _("Autodetect")); + Button_SetText(GetDlgItem(hW,IDC_CPU), _("Enable Interpreter Cpu")); + Button_SetText(GetDlgItem(hW,IDC_PSXOUT), _("Enable Console Output")); + Button_SetText(GetDlgItem(hW,IDC_DEBUG), _("Enable Debugger")); + Button_SetText(GetDlgItem(hW,IDC_SPUIRQ), _("Spu Irq Always Enabled")); + Button_SetText(GetDlgItem(hW,IDC_RCNTFIX), _("Parasite Eve 2, Vandal Hearts 1/2 Fix")); + Button_SetText(GetDlgItem(hW,IDC_VSYNCWA), _("InuYasha Sengoku Battle Fix")); + + Static_SetText(GetDlgItem(hW,IDC_MISCOPT), _("Options")); + Static_SetText(GetDlgItem(hW,IDC_SELPSX), _("Psx System Type")); + + Button_SetCheck(GetDlgItem(hW,IDC_XA), Config.Xa); + Button_SetCheck(GetDlgItem(hW,IDC_SIO), Config.Sio); + Button_SetCheck(GetDlgItem(hW,IDC_MDEC), Config.Mdec); + Button_SetCheck(GetDlgItem(hW,IDC_CDDA), Config.Cdda); + Button_SetCheck(GetDlgItem(hW,IDC_PSXAUTO), Config.PsxAuto); + Button_SetCheck(GetDlgItem(hW,IDC_CPU), (Config.Cpu == CPU_INTERPRETER)); + Button_SetCheck(GetDlgItem(hW,IDC_PSXOUT), Config.PsxOut); + Button_SetCheck(GetDlgItem(hW,IDC_DEBUG), Config.Debug); + Button_SetCheck(GetDlgItem(hW,IDC_SPUIRQ), Config.SpuIrq); + Button_SetCheck(GetDlgItem(hW,IDC_RCNTFIX), Config.RCntFix); + Button_SetCheck(GetDlgItem(hW,IDC_VSYNCWA), Config.VSyncWA); + ComboBox_AddString(GetDlgItem(hW,IDC_PSXTYPES), "NTSC"); + ComboBox_AddString(GetDlgItem(hW,IDC_PSXTYPES), "PAL"); + ComboBox_SetCurSel(GetDlgItem(hW,IDC_PSXTYPES),Config.PsxType); + + if (Config.Cpu == CPU_DYNAREC) { + Config.Debug = 0; + Button_SetCheck(GetDlgItem(hW, IDC_DEBUG), FALSE); + EnableWindow(GetDlgItem(hW, IDC_DEBUG), FALSE); + } + + EnableWindow(GetDlgItem(hW,IDC_PSXTYPES), !Config.PsxAuto); + break; + + case WM_COMMAND: { + switch (LOWORD(wParam)) { + case IDCANCEL: EndDialog(hW, FALSE); return TRUE; + case IDOK: + tmp = ComboBox_GetCurSel(GetDlgItem(hW,IDC_PSXTYPES)); + if (tmp == 0) Config.PsxType = 0; + else Config.PsxType = 1; + + Config.Xa = Button_GetCheck(GetDlgItem(hW,IDC_XA)); + Config.Sio = Button_GetCheck(GetDlgItem(hW,IDC_SIO)); + Config.Mdec = Button_GetCheck(GetDlgItem(hW,IDC_MDEC)); + Config.Cdda = Button_GetCheck(GetDlgItem(hW,IDC_CDDA)); + Config.PsxAuto = Button_GetCheck(GetDlgItem(hW,IDC_PSXAUTO)); + tmp = Config.Cpu; + Config.Cpu = (Button_GetCheck(GetDlgItem(hW,IDC_CPU)) ? CPU_INTERPRETER : CPU_DYNAREC); + if (tmp != Config.Cpu) { + psxCpu->Shutdown(); + if (Config.Cpu == CPU_INTERPRETER) psxCpu = &psxInt; + else psxCpu = &psxRec; + if (psxCpu->Init() == -1) { + SysClose(); + exit(1); + } + psxCpu->Reset(); + } + Config.PsxOut = Button_GetCheck(GetDlgItem(hW,IDC_PSXOUT)); + Config.SpuIrq = Button_GetCheck(GetDlgItem(hW,IDC_SPUIRQ)); + Config.RCntFix = Button_GetCheck(GetDlgItem(hW,IDC_RCNTFIX)); + Config.VSyncWA = Button_GetCheck(GetDlgItem(hW,IDC_VSYNCWA)); + tmp = Config.Debug; + Config.Debug = Button_GetCheck(GetDlgItem(hW,IDC_DEBUG)); + if (tmp != Config.Debug) { + if (Config.Debug) StartDebugger(); + else StopDebugger(); + } + + SaveConfig(); + + EndDialog(hW,TRUE); + + if (Config.PsxOut) OpenConsole(); + else CloseConsole(); + + return TRUE; + + case IDC_CPU: + if (Button_GetCheck(GetDlgItem(hW,IDC_CPU))) { + EnableWindow(GetDlgItem(hW,IDC_DEBUG), TRUE); + } else { + Button_SetCheck(GetDlgItem(hW,IDC_DEBUG), FALSE); + EnableWindow(GetDlgItem(hW,IDC_DEBUG), FALSE); + } + break; + + case IDC_PSXAUTO: + if (Button_GetCheck(GetDlgItem(hW,IDC_PSXAUTO))) { + EnableWindow(GetDlgItem(hW,IDC_PSXTYPES), FALSE); + } else { + EnableWindow(GetDlgItem(hW,IDC_PSXTYPES), TRUE); + } + break; + } + } + } + return FALSE; +} + +void Open_Mcd_Proc(HWND hW, int mcd) { + OPENFILENAME ofn; + char szFileName[MAXPATHLEN]; + char szFileTitle[MAXPATHLEN]; + char szFilter[1024]; + char *str; + + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + strcpy(szFilter, _("Psx Mcd Format (*.mcr;*.mc;*.mem;*.vgs;*.mcd;*.gme;*.ddf)")); + str = szFilter + strlen(szFilter) + 1; + strcpy(str, "*.mcr;*.mcd;*.mem;*.gme;*.mc;*.ddf"); + + str+= strlen(str) + 1; + strcpy(str, _("Psx Memory Card (*.mcr;*.mc)")); + str+= strlen(str) + 1; + strcpy(str, "*.mcr;0*.mc"); + + str+= strlen(str) + 1; + strcpy(str, _("CVGS Memory Card (*.mem;*.vgs)")); + str+= strlen(str) + 1; + strcpy(str, "*.mem;*.vgs"); + + str+= strlen(str) + 1; + strcpy(str, _("Bleem Memory Card (*.mcd)")); + str+= strlen(str) + 1; + strcpy(str, "*.mcd"); + + str+= strlen(str) + 1; + strcpy(str, _("DexDrive Memory Card (*.gme)")); + str+= strlen(str) + 1; + strcpy(str, "*.gme"); + + str+= strlen(str) + 1; + strcpy(str, _("DataDeck Memory Card (*.ddf)")); + str+= strlen(str) + 1; + strcpy(str, "*.ddf"); + + str+= strlen(str) + 1; + strcpy(str, _("All Files")); + str+= strlen(str) + 1; + strcpy(str, "*.*"); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = hW; + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = MAXPATHLEN; + ofn.lpstrInitialDir = "memcards"; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = MAXPATHLEN; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = "MCR"; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName ((LPOPENFILENAME)&ofn)) { + Edit_SetText(GetDlgItem(hW,mcd == 1 ? IDC_MCD1 : IDC_MCD2), szFileName); + LoadMcd(mcd, szFileName); + UpdateMcdDlg(); + } +} + +int Open_File_Proc(char *file) { + OPENFILENAME ofn; + char szFileName[MAXPATHLEN]; + char szFileTitle[MAXPATHLEN]; + char szFilter[256]; + + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = gApp.hWnd; + + strcpy(szFilter, _("Psx Exe Format")); + strcatz(szFilter, "*.*"); + + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = MAXPATHLEN; + ofn.lpstrInitialDir = NULL; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = MAXPATHLEN; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = "EXE"; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName ((LPOPENFILENAME)&ofn)) { + strcpy(file, szFileName); + return 1; + } else + return 0; +} + +int Open_Iso_Proc(char *file) { + OPENFILENAME ofn; + char szFileName[MAXPATHLEN]; + char szFileTitle[MAXPATHLEN]; + char szFilter[256]; + char *str; + + memset(&szFileName, 0, sizeof(szFileName)); + memset(&szFileTitle, 0, sizeof(szFileTitle)); + memset(&szFilter, 0, sizeof(szFilter)); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = gApp.hWnd; + + strcpy(szFilter, _("Psx Isos (*.iso;*.mdf;*.img;*.bin)")); + str = szFilter + strlen(szFilter) + 1; + strcpy(str, "*.iso;*.mdf;*.img;*.bin"); + + str += strlen(str) + 1; + strcpy(str, _("All Files")); + str += strlen(str) + 1; + strcpy(str, "*.*"); + + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 1; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = MAXPATHLEN; + ofn.lpstrInitialDir = NULL; + ofn.lpstrFileTitle = szFileTitle; + ofn.nMaxFileTitle = MAXPATHLEN; + ofn.lpstrTitle = NULL; + ofn.lpstrDefExt = "ISO"; + ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR; + + if (GetOpenFileName ((LPOPENFILENAME)&ofn)) { + strcpy(file, szFileName); + return 1; + } else + return 0; +} + +#define _ADDSUBMENU(menu, menun, string) \ + submenu[menun] = CreatePopupMenu(); \ + AppendMenu(menu, MF_STRING | MF_POPUP, (UINT)submenu[menun], string); + +#define ADDSUBMENU(menun, string) \ + _ADDSUBMENU(gApp.hMenu, menun, string); + +#define ADDSUBMENUS(submn, menun, string) \ + submenu[menun] = CreatePopupMenu(); \ + InsertMenu(submenu[submn], 0, MF_BYPOSITION | MF_STRING | MF_POPUP, (UINT)submenu[menun], string); + +#define ADDMENUITEM(menun, string, id) \ + item.fType = MFT_STRING; \ + item.fMask = MIIM_STATE | MIIM_TYPE | MIIM_ID; \ + item.fState = MFS_ENABLED; \ + item.wID = id; \ + sprintf(buf, string); \ + InsertMenuItem(submenu[menun], 0, TRUE, &item); + +#define ADDMENUITEMC(menun, string, id) \ + item.fType = MFT_STRING; \ + item.fMask = MIIM_STATE | MIIM_TYPE | MIIM_ID; \ + item.fState = MFS_ENABLED | MFS_CHECKED; \ + item.wID = id; \ + sprintf(buf, string); \ + InsertMenuItem(submenu[menun], 0, TRUE, &item); + +#define ADDSEPARATOR(menun) \ + item.fMask = MIIM_TYPE; \ + item.fType = MFT_SEPARATOR; \ + InsertMenuItem(submenu[menun], 0, TRUE, &item); + +void CreateMainMenu() { + MENUITEMINFO item; + HMENU submenu[256]; + char buf[256]; +#ifdef ENABLE_NLS + char *lang; + int i; +#endif + + item.cbSize = sizeof(MENUITEMINFO); + item.dwTypeData = buf; + item.cch = 256; + + gApp.hMenu = CreateMenu(); + + ADDSUBMENU(0, _("&File")); + ADDMENUITEM(0, _("E&xit"), ID_FILE_EXIT); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("Run &EXE..."), ID_FILE_RUN_EXE); + ADDMENUITEM(0, _("Run &BIOS"), ID_FILE_RUNBIOS); + ADDMENUITEM(0, _("Run &ISO..."), ID_FILE_RUN_ISO); + ADDMENUITEM(0, _("Run &CD"), ID_FILE_RUN_CD); + + ADDSUBMENU(0, _("&Emulator")); + ADDSUBMENUS(0, 1, _("&States")); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("S&witch ISO..."), ID_EMULATOR_SWITCH_ISO); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("Re&set"), ID_EMULATOR_RESET); + ADDMENUITEM(0, _("&Run"), ID_EMULATOR_RUN); + ADDSUBMENUS(1, 3, _("&Save")); + ADDSUBMENUS(1, 2, _("&Load")); + ADDMENUITEM(2, _("&Other..."), ID_FILE_STATES_LOAD_OTHER); + ADDMENUITEM(2, _("Slot &5"), ID_FILE_STATES_LOAD_SLOT5); + ADDMENUITEM(2, _("Slot &4"), ID_FILE_STATES_LOAD_SLOT4); + ADDMENUITEM(2, _("Slot &3"), ID_FILE_STATES_LOAD_SLOT3); + ADDMENUITEM(2, _("Slot &2"), ID_FILE_STATES_LOAD_SLOT2); + ADDMENUITEM(2, _("Slot &1"), ID_FILE_STATES_LOAD_SLOT1); + ADDMENUITEM(3, _("&Other..."), ID_FILE_STATES_SAVE_OTHER); + ADDMENUITEM(3, _("Slot &5"), ID_FILE_STATES_SAVE_SLOT5); + ADDMENUITEM(3, _("Slot &4"), ID_FILE_STATES_SAVE_SLOT4); + ADDMENUITEM(3, _("Slot &3"), ID_FILE_STATES_SAVE_SLOT3); + ADDMENUITEM(3, _("Slot &2"), ID_FILE_STATES_SAVE_SLOT2); + ADDMENUITEM(3, _("Slot &1"), ID_FILE_STATES_SAVE_SLOT1); + + ADDSUBMENU(0, _("&Configuration")); + ADDMENUITEM(0, _("Cheat &Search..."), ID_CONFIGURATION_CHEATSEARCH); + ADDMENUITEM(0, _("Ch&eat Code..."), ID_CONFIGURATION_CHEATLIST); + ADDSEPARATOR(0); +#ifdef ENABLE_NLS + ADDSUBMENUS(0, 1, _("&Language")); + + if (langs != langs) free(langs); + langs = (_langs*)malloc(sizeof(_langs)); + strcpy(langs[0].lang, "English"); + InitLanguages(); i=1; + while ((lang = GetLanguageNext()) != NULL) { + langs = (_langs*)realloc(langs, sizeof(_langs)*(i+1)); + strcpy(langs[i].lang, lang); + if (!strcmp(Config.Lang, lang)) { + ADDMENUITEMC(1, ParseLang(langs[i].lang), ID_LANGS + i); + } else { + ADDMENUITEM(1, ParseLang(langs[i].lang), ID_LANGS + i); + } + i++; + } + CloseLanguages(); + langsMax = i; + if (!strcmp(Config.Lang, "English")) { + ADDMENUITEMC(1, _("English"), ID_LANGS); + } else { + ADDMENUITEM(1, _("English"), ID_LANGS); + } + ADDSEPARATOR(0); +#endif + ADDMENUITEM(0, _("&Memory cards..."), ID_CONFIGURATION_MEMORYCARDMANAGER); + ADDMENUITEM(0, _("C&PU..."), ID_CONFIGURATION_CPU); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("&NetPlay..."), ID_CONFIGURATION_NETPLAY); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("&Controllers..."), ID_CONFIGURATION_CONTROLLERS); + ADDMENUITEM(0, _("CD-&ROM..."), ID_CONFIGURATION_CDROM); + ADDMENUITEM(0, _("&Sound..."), ID_CONFIGURATION_SOUND); + ADDMENUITEM(0, _("&Graphics..."), ID_CONFIGURATION_GRAPHICS); + ADDSEPARATOR(0); + ADDMENUITEM(0, _("&Plugins && Bios..."), ID_CONFIGURATION); + + ADDSUBMENU(0, _("&Help")); + ADDMENUITEM(0, _("&About..."), ID_HELP_ABOUT); + + if (CdromId[0] != '\0') { + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_NETPLAY, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_CONTROLLERS, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_CDROM, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_SOUND, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_GRAPHICS, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION, MF_BYCOMMAND | MF_GRAYED); + if (!UsingIso()) { + EnableMenuItem(gApp.hMenu, ID_EMULATOR_SWITCH_ISO, MF_BYCOMMAND | MF_GRAYED); + } + } else { + EnableMenuItem(gApp.hMenu, ID_EMULATOR_RESET, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_EMULATOR_RUN, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_EMULATOR_SWITCH_ISO, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT1, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT2, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT3, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT4, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_SLOT5, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_LOAD_OTHER, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT1, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT2, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT3, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT4, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_SLOT5, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_FILE_STATES_SAVE_OTHER, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(gApp.hMenu, ID_CONFIGURATION_CHEATSEARCH, MF_BYCOMMAND | MF_GRAYED); + } +} + +void CreateMainWindow(int nCmdShow) { + WNDCLASS wc; + HWND hWnd; + + wc.lpszClassName = "PCSX Main"; + wc.lpfnWndProc = MainWndProc; + wc.style = 0; + wc.hInstance = gApp.hInstance; + wc.hIcon = LoadIcon(gApp.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + wc.hCursor = NULL; + wc.hbrBackground = (HBRUSH)(COLOR_MENUTEXT); + wc.lpszMenuName = 0; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + + RegisterClass(&wc); + + hWnd = CreateWindow("PCSX Main", + "PCSX", + WS_CAPTION | WS_POPUPWINDOW | WS_MINIMIZEBOX, + CW_USEDEFAULT, + 0, + 350, + 220, + NULL, + NULL, + gApp.hInstance, + NULL); + + gApp.hWnd = hWnd; + ResetMenuSlots(); + + CreateMainMenu(); + SetMenu(gApp.hWnd, gApp.hMenu); + + ShowWindow(hWnd, nCmdShow); +} + +#ifdef ENABLE_NLS + +WIN32_FIND_DATA lFindData; +HANDLE lFind; +int lFirst; + +void InitLanguages() { + lFind = FindFirstFile("Langs\\*", &lFindData); + lFirst = 1; +} + +char *GetLanguageNext() { + for (;;) { + if (!strcmp(lFindData.cFileName, ".")) { + if (FindNextFile(lFind, &lFindData) == FALSE) + return NULL; + continue; + } + if (!strcmp(lFindData.cFileName, "..")) { + if (FindNextFile(lFind, &lFindData) == FALSE) + return NULL; + continue; + } + break; + } + if (lFirst == 0) { + if (FindNextFile(lFind, &lFindData) == FALSE) + return NULL; + } else lFirst = 0; + if (lFind==INVALID_HANDLE_VALUE) return NULL; + + return lFindData.cFileName; +} + +void CloseLanguages() { + if (lFind != INVALID_HANDLE_VALUE) FindClose(lFind); +} + +void ChangeLanguage(char *lang) { + strcpy(Config.Lang, lang); + SaveConfig(); + LoadConfig(); +} + +#endif + +int SysInit() { + if (Config.PsxOut) OpenConsole(); + + if (EmuInit() == -1) return -1; + +#ifdef EMU_LOG + emuLog = fopen("emuLog.txt","w"); + setvbuf(emuLog, NULL, _IONBF, 0); +#endif + + while (LoadPlugins(0) == -1) { + CancelQuit = 1; + ConfigurePlugins(gApp.hWnd); + CancelQuit = 0; + } + LoadMcds(Config.Mcd1, Config.Mcd2); + + if (Config.Debug) StartDebugger(); + + return 0; +} + +void SysReset() { + EmuReset(); +} + +void SysClose() { + EmuShutdown(); + ReleasePlugins(); + + StopDebugger(); + + if (Config.PsxOut) CloseConsole(); + + if (emuLog != NULL) fclose(emuLog); +} + +void SysPrintf(const char *fmt, ...) { + va_list list; + char msg[512]; + DWORD tmp; + + if (!hConsole) return; + + va_start(list,fmt); + vsprintf(msg,fmt,list); + va_end(list); + + WriteConsole(hConsole, msg, (DWORD)strlen(msg), &tmp, 0); +#ifdef EMU_LOG +#ifndef LOG_STDOUT + if (emuLog != NULL) fprintf(emuLog, "%s", msg); +#endif +#endif +} + +void SysMessage(const char *fmt, ...) { + va_list list; + char tmp[512]; + + va_start(list,fmt); + vsprintf(tmp,fmt,list); + va_end(list); + MessageBox(0, tmp, _("Pcsx Msg"), 0); +} + +static char *err = N_("Error Loading Symbol"); +static int errval; + +void *SysLoadLibrary(const char *lib) { + return LoadLibrary(lib); +} + +void *SysLoadSym(void *lib, const char *sym) { + void *tmp = GetProcAddress((HINSTANCE)lib, sym); + if (tmp == NULL) errval = 1; + else errval = 0; + return tmp; +} + +const char *SysLibError() { + if (errval) { errval = 0; return err; } + return NULL; +} + +void SysCloseLibrary(void *lib) { + FreeLibrary((HINSTANCE)lib); +} + +void SysUpdate() { + MSG msg; + + while (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } +} + +void SysRunGui() { + RestoreWindow(); + RunGui(); +} diff --git a/win32/gui/about.bmp b/win32/gui/about.bmp new file mode 100755 index 0000000000000000000000000000000000000000..2e35d2f58e0382f6ec0c251a14d62aeb59134876 GIT binary patch literal 105270 zcmdR%2Yg%A`S&GR*4}$t!^3t$n%Ukl2_lQ>#XHT*xBoIg#AqgQngzN+o_FiR{ zU7!#~34h9Jngqh8h0+!%dVg2Pz7cj30u7YcpI>f{uH>sbzRz=>^PJ(z#=v$agZc^J zUpoH9@b60eV={Eu;s@_PC1J$>ksS<%?0@v5kjc(0m0WhNq>;;hJ38}4o${WX+ebvc zf}93!i#9HuTxyU@O>(J4A+;)`Higu#kftgJlol^w>x>HpBJu(9F8yKrB7}nw;ee1i zesE*_Tl8`%zD_HX;;V52>i8DtqZ~xy++OeLj+T;=GH3+9_Wvvf;|yXm89z_SOa|xw zAD!+RPkCp~;S++7Bwv9OAh(OhWC&OcA&VhqF=R;$c@jevmxj&I#-(R7Xc^fIh<=HJ zF8-2y5?lNh5jlt=i2>oTkc34^6c@e`!dFA&G{_Ah=XMUS_jHGXU7YT%Uv&Q|pD)>& z#Q05+&y7D6@@RhE7Ds^2#u#C}ZP+1Y&NzsLRz#&YHpIHeUN-Win7Arj=s#M|J+$b|z%FbO_E zDTsyl2FAp<6VA=a3|cAivL%^8ME1ip5^W*T5MWI>;P8sz3??v~*mJw**XN(Ed51h% zy!;uS|G$rReo^30XA5Vj7ls@AkQ;T*O#t6WZX?c?@DKkF{sAh8CHxc555j>uu!pR} zME2tY_!w;kq&mPsNOeG)Kw?Ee$3oM|Nh9dggb} zE%^u@hU;|v)B8_p2;}J}8p4oRXvjnS*)IuTG&rh5d8lT{y{bHCfKKO7^hTf+%AS20xXEG3+SeC zVk|Vg79e+koaE28@iYJ8ugQNR?L*2xDf0O>;fFi=Z-77D?~Aea&Vk5j@qqh$)WOj1CJ{+~F1@DK8xak)4QT4WElcz3uJ&_NNbfNm7PzEBa6 zSST?mMD7eu3Fk(xdI-kMgr6aA{iK(_8vo}i@)_I^O4M-b688`?Psi;k_oMj+ z5%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F{IlXG<6o-_phN(QO}VgEFF;<1q5#w6?ZG_x z93mgsliLCLSQ;ukjC^wYST*xJll9 z5d1ggpSl3xO8k=x(h33KO{mi={-j1yuZcYb|AyqF$06BghF?qh5x=u#dl)T0BK{|a z0NacIgbBt!!H-vnC)z~w!;;_c)BhVCL-^UJfS=|E{7m+-99kw8&ODE%;hzNl*|I&18DnE(O#eT_x`f97 literal 0 HcmV?d00001 diff --git a/win32/gui/cdrom02.ico b/win32/gui/cdrom02.ico new file mode 100755 index 0000000000000000000000000000000000000000..98daa5b8391de62380eb2b4e08ba26457bbda457 GIT binary patch literal 9662 zcmd^E2UJ#9)}@Ik8fV5e@y{}oxS}Q|Ml&(7#+Ya%7Azzv5>ya-K@kBP3J4;I1yNDN zhAm()xFtd#WZsl?XyvGnToyZrD&v2^a7E3I1Hl=}5kiY+bUFT#c>6O*`c)v8T! zuTi6ROtos&V#^N;3yWBes#U9M!`$3FmZM6QDzRo}X4)_{HH|efF^M%cHr57?LvRnX zH}}n%Z;g#_ORZW;-g{3yhu_9ViGzcZL4%Zx8l}YDUCHFhN_>5l1OzDY@_HmrPWkfP zcQ@t350j)(qZrt?UhM2bWz3lA;_dAt)2C0DnKNffaB#59nl($ChYuev-Me=eYin!i z(xr=h|NZy4$9MA0H{Sq9tz_V@`RDNGREocEUnMayN}{8cj2-(T{@`FGbLJ=s4b{iY znWf_4Q6fEhWXWfrU6hYLIw0-Zt$~dpGJbr3`1?;6S65eg>#esAATBnD%L@bNo4q-9 zuB87f$M58%bvA zSk&F|=P-d)}QBqQ(L@6b||E}cfRVCN2D|zrhKmP4EC978}*|SFp z?Oe7@$)ZI{7%PAOQZ09yHM{npX3h9G=-UL?@e#(K$X#0Ydi?ZjVxp4$`*pq>^7r6D z9sA?QIz9t`A|v$}T)L!W`*wW|Z7e8Ia^{SZhzLDj=FU~fXX-#HG%imXHcWkBW_EU8 z_3CH)1DEBi{cia7_4pq?RC48t?pI>{^;cbgE?(5J@w>|SzjUb*+OlhxK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L}u!d~gggb5Rh(1)ZuIy&wLUQqqVfza(%nEwaI)!!7?o34Yt zwnKeU#Lhl93vtMY@3WwnY0#X@;Ql4(Pdw~7jB}fyJ*?9K@VA?rThX9FgN{RgmjK(C zK7IOhaBy&Ffbnnn^i8pI9r$B`77m962pJ%y`}8W z*I55RKbYcU`MIio%+uQWZ_4Jf^G3W>^Pf-IT&rxx0_{Am)MhNyW~0~7zS=^OLuK>z zvbpdLXT$ne&cLI64}6D=@CUpVXWz2(+6=q28Fp$j>@GhW{D7}%CsuRT+$NfnaP0d& I&p!M6Uw>(FcmMzZ literal 0 HcmV?d00001 diff --git a/win32/gui/pcsx.bmp b/win32/gui/pcsx.bmp new file mode 100755 index 0000000000000000000000000000000000000000..fca63000989749412f83013cb89fbd455d1976ab GIT binary patch literal 185190 zcmeF)2e@X}Ss(f>X?m|`deulHSzWSv9myK2OO`t}rW?b>CM1|pE&&G!I3(t(j3Eml|T8II#g2Y+SL8D<m!ph$=LG9w0ZMpm!r4ccH72{8}GjR z?oFFE-F4Sp=$&`o87d!--gx7UBz4nGH=);GfBhL}oIx6svXeiVxyYO|&y3o-6)RS_ zgf!5!*wX5Ww%Yu&&pvyR4V`W=4e8tB)1{YQs<6Hh5xQi_l3Q-M1=aJVOPAu8En9{z zU%vdvks}66yeo%9y?(0hOy&NlD41y?gg6 zFDZZEz=4B9B2pJh=MG6Xj7!fmI@E~t|Fb78&T`nxDPdyl-KRQMVOzu@i%HI?ElOq! zjAAj^P)PAeXxPHUD#hrE%E!kZLm6h0!>OpSII*2xDMCKw1&b+j%1RbrKy!RzF^QB? ztS*rQA*5n}L=v2kI2l?v5v6lw2~sSK6ST}2GHI}lojZ5N>ErA1@^gk1N8i1Bw@b_$ zN=k4-j^wJv;Dl~xTtJPSz}^9B%5_Dlj^G%Bx1@7jvjiK5@DUNJv90agx9ZX%tT+ zm_TV+qVd8Bu1P@wb=ns?)XjnjAVC0xklLFCAw++-Fn7O@VB-Aq&xZ$0MJ2(B{>EeO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t@UMPTce9d zE_h@dNZl~sMilGg^9zU1&oW>~<@=S@0DUSCu&UJR*ON`fP)iA5rLFJ$!fY_Ba%H7# zXUIaBY=#5yP6mUhd)WP*MBhx13iSkqNIl`IVSCSti6-0W!TFVuXINyJ^w?hqnLTyq z!`X2uJs-_`RyvReWW*E=2(Cy}9s>AVI_%ZMd=)_tv|9=BXEtL^5gC}a`R6QNz@cW8 z9g`z?QMCZF`6xpF=KdE&|9+}&jr2fE4YAxiUdF# xW}6 + + +MyApplication + + + + + + diff --git a/win32/gui/plugin.c b/win32/gui/plugin.c new file mode 100644 index 00000000..14ff7edb --- /dev/null +++ b/win32/gui/plugin.c @@ -0,0 +1,351 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include "plugin.h" +#include "plugins.h" +#include "resource.h" +#include +#include + +#include "r3000a.h" +#include "Win32.h" +#include "NoPic.h" +#include "misc.h" +#include "sio.h" + +int ShowPic = 0; + +void gpuShowPic() { + char Text[255]; + gzFile f; + + if (!ShowPic) { + unsigned char *pMem; + + pMem = (unsigned char *) malloc(128*96*3); + if (pMem == NULL) return; + GetStateFilename(Text, StatesC); + + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + + f = gzopen(Text, "rb"); + if (f != NULL) { + gzseek(f, 32, SEEK_SET); // skip header + gzread(f, pMem, 128*96*3); + gzclose(f); + } else { + memcpy(pMem, NoPic_Image.pixel_data, 128*96*3); + DrawNumBorPic(pMem, StatesC+1); + } + GPU_showScreenPic(pMem); + + free(pMem); + ShowPic = 1; + } else { GPU_showScreenPic(NULL); ShowPic = 0; } +} + +void GetStateFilename(char *out, int i) { + char trimlabel[33]; + int j; + + strncpy(trimlabel, CdromLabel, 32); + trimlabel[32] = 0; + for (j=31; j>=0; j--) + if (trimlabel[j] == ' ') + trimlabel[j] = '\0'; + + sprintf(out, "sstates\\%.32s-%.9s.%3.3d", trimlabel, CdromId, i); +} + +void PADhandleKey(int key) { + char Text[255]; + int ret; + + if (Running == 0) return; + switch (key) { + case 0: break; + case VK_F1: + GetStateFilename(Text, StatesC); + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + ret = SaveState(Text); + if (ret == 0) + sprintf(Text, _("*PCSX*: Saved State %d"), StatesC+1); + else sprintf(Text, _("*PCSX*: Error Saving State %d"), StatesC+1); + GPU_displayText(Text); + if (ShowPic) { ShowPic = 0; gpuShowPic(); } + break; + + case VK_F2: + if (StatesC < 4) StatesC++; + else StatesC = 0; + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + if (ShowPic) { ShowPic = 0; gpuShowPic(); } + break; + + case VK_F3: + GetStateFilename(Text, StatesC); + ret = LoadState(Text); + if (ret == 0) + sprintf(Text, _("*PCSX*: Loaded State %d"), StatesC+1); + else sprintf(Text, _("*PCSX*: Error Loading State %d"), StatesC+1); + GPU_displayText(Text); + break; + + case VK_F4: + gpuShowPic(); + break; + + case VK_F5: + Config.Sio ^= 0x1; + if (Config.Sio) + sprintf(Text, _("*PCSX*: Sio Irq Always Enabled")); + else sprintf(Text, _("*PCSX*: Sio Irq Not Always Enabled")); + GPU_displayText(Text); + break; + + case VK_F6: + Config.Mdec ^= 0x1; + if (Config.Mdec) + sprintf(Text, _("*PCSX*: Black&White Mdecs Only Enabled")); + else sprintf(Text, _("*PCSX*: Black&White Mdecs Only Disabled")); + GPU_displayText(Text); + break; + + case VK_F7: + Config.Xa ^= 0x1; + if (Config.Xa == 0) + sprintf (Text, _("*PCSX*: Xa Enabled")); + else sprintf (Text, _("*PCSX*: Xa Disabled")); + GPU_displayText(Text); + break; + + case VK_F8: + GPU_makeSnapshot(); + return; + + case VK_F9: + GPU_displayText(_("*PCSX*: CdRom Case Opened")); + SetCdOpenCaseTime(-1); + break; + + case VK_F10: + GPU_displayText(_("*PCSX*: CdRom Case Closed")); + SetCdOpenCaseTime(0); + break; + + case VK_F12: + SysPrintf("*PCSX*: CpuReset\n"); + psxCpu->Reset(); + break; + + case VK_ESCAPE: + Running = 0; + ClosePlugins(); + SysRunGui(); + break; + } +} + +void CALLBACK SPUirq(void); + +char charsTable[4] = { "|/-\\" }; + +BOOL CALLBACK ConnectDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) { + char str[256]; + static int waitState; + + switch(uMsg) { + case WM_INITDIALOG: + SetWindowText(hW, _("Connecting...")); + + sprintf(str, _("Please wait while connecting... %c\n"), charsTable[waitState]); + Static_SetText(GetDlgItem(hW, IDC_CONNECTSTR), str); + SetTimer(hW, 0, 100, NULL); + return TRUE; + + case WM_TIMER: + if (++waitState == 4) waitState = 0; + sprintf(str, _("Please wait while connecting... %c\n"), charsTable[waitState]); + Static_SetText(GetDlgItem(hW, IDC_CONNECTSTR), str); + return TRUE; + +/* case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDCANCEL: + WaitCancel = 1; + return TRUE; + }*/ + } + + return FALSE; +} + +#define PARSEPATH(dst, src) \ + ptr = src + strlen(src); \ + while (*ptr != '\\' && ptr != src) ptr--; \ + if (ptr != src) { \ + strcpy(dst, ptr+1); \ + } + +int _OpenPlugins(HWND hWnd) { + int ret; + + GPU_clearDynarec(clearDynarec); + + ret = CDR_open(); + if (ret < 0) { SysMessage (_("Error Opening CDR Plugin")); return -1; } + + SetCurrentDirectory(PcsxDir); + if (Config.UseNet && !NetOpened) { + netInfo info; + char path[256]; + + strcpy(info.EmuName, "PCSX " PACKAGE_VERSION); + strncpy(info.CdromID, CdromId, 9); + strncpy(info.CdromLabel, CdromLabel, 9); + info.psxMem = psxM; + info.GPU_showScreenPic = GPU_showScreenPic; + info.GPU_displayText = GPU_displayText; + info.GPU_showScreenPic = GPU_showScreenPic; + info.PAD_setSensitive = PAD1_setSensitive; + sprintf(path, "%s%s", Config.BiosDir, Config.Bios); + strcpy(info.BIOSpath, path); + strcpy(info.MCD1path, Config.Mcd1); + strcpy(info.MCD2path, Config.Mcd2); + sprintf(path, "%s%s", Config.PluginsDir, Config.Gpu); + strcpy(info.GPUpath, path); + sprintf(path, "%s%s", Config.PluginsDir, Config.Spu); + strcpy(info.SPUpath, path); + sprintf(path, "%s%s", Config.PluginsDir, Config.Cdr); + strcpy(info.CDRpath, path); + NET_setInfo(&info); + + ret = NET_open(hWnd); + if (ret < 0) { + if (ret == -2) { + // -2 is returned when something in the info + // changed and needs to be synced + char *ptr; + + PARSEPATH(Config.Bios, info.BIOSpath); + PARSEPATH(Config.Gpu, info.GPUpath); + PARSEPATH(Config.Spu, info.SPUpath); + PARSEPATH(Config.Cdr, info.CDRpath); + + strcpy(Config.Mcd1, info.MCD1path); + strcpy(Config.Mcd2, info.MCD2path); + return -2; + } else { + Config.UseNet = FALSE; + } + } else { + HWND hW = CreateDialog(gApp.hInstance, MAKEINTRESOURCE(IDD_CONNECT), gApp.hWnd, ConnectDlgProc); + ShowWindow(hW, SW_SHOW); + + if (NET_queryPlayer() == 1) { + if (SendPcsxInfo() == -1) Config.UseNet = FALSE; + } else { + if (RecvPcsxInfo() == -1) Config.UseNet = FALSE; + } + + DestroyWindow(hW); + } + NetOpened = TRUE; + } else if (Config.UseNet) { + NET_resume(); + } + + ret = GPU_open(hWnd); + if (ret < 0) { SysMessage (_("Error Opening GPU Plugin (%d)"), ret); return -1; } + ret = SPU_open(hWnd); + if (ret < 0) { SysMessage (_("Error Opening SPU Plugin (%d)"), ret); return -1; } + SPU_registerCallback(SPUirq); + ret = PAD1_open(hWnd); + if (ret < 0) { SysMessage (_("Error Opening PAD1 Plugin (%d)"), ret); return -1; } + ret = PAD2_open(hWnd); + if (ret < 0) { SysMessage (_("Error Opening PAD2 Plugin (%d)"), ret); return -1; } + + SetCurrentDirectory(PcsxDir); + ShowCursor(FALSE); + return 0; +} + +int OpenPlugins(HWND hWnd, int internaliso) { + int ret; + + while ((ret = _OpenPlugins(hWnd)) == -2) { + ReleasePlugins(); + LoadMcds(Config.Mcd1, Config.Mcd2); + if (LoadPlugins() == -1) return -1; + } + return ret; +} + +void ClosePlugins() { + int ret; + + // PAD plugins have to be closed first, otherwise some plugins like + // LilyPad will mess up the window handle and cause crash. + // Also don't check return value here, as LilyPad uses void. + PAD1_close(); + PAD2_close(); + + UpdateMenuSlots(); + + ret = CDR_close(); + if (ret < 0) { SysMessage (_("Error Closing CDR Plugin")); return; } + ret = GPU_close(); + if (ret < 0) { SysMessage (_("Error Closing GPU Plugin")); return; } + ret = SPU_close(); + if (ret < 0) { SysMessage (_("Error Closing SPU Plugin")); return; } + + if (Config.UseNet) { + NET_pause(); + } +} + +void ResetPlugins() { + int ret; + + CDR_shutdown(); + GPU_shutdown(); + SPU_shutdown(); + PAD1_shutdown(); + PAD2_shutdown(); + if (Config.UseNet) NET_shutdown(); + + ret = CDR_init(); + if (ret != 0) { SysMessage (_("CDRinit error: %d"), ret); return; } + ret = GPU_init(); + if (ret != 0) { SysMessage (_("GPUinit error: %d"), ret); return; } + ret = SPU_init(); + if (ret != 0) { SysMessage (_("SPUinit error: %d"), ret); return; } + ret = PAD1_init(1); + if (ret != 0) { SysMessage (_("PAD1init error: %d"), ret); return; } + ret = PAD2_init(2); + if (ret != 0) { SysMessage (_("PAD2init error: %d"), ret); return; } + if (Config.UseNet) { + ret = NET_init(); + if (ret < 0) { SysMessage (_("NETinit error: %d"), ret); return; } + } + + NetOpened = FALSE; +} diff --git a/win32/gui/plugin.h b/win32/gui/plugin.h new file mode 100644 index 00000000..048dc3eb --- /dev/null +++ b/win32/gui/plugin.h @@ -0,0 +1,27 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2003 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA + */ + +// Windows Specific Plugin Functions +#ifndef __PLUGIN_H__ +#define __PLUGIN_H__ + +#include "plugins.h" + +void GetStateFilename(char *out, int i); + +#endif /* __PLUGIN_H__ */ diff --git a/win32/intl/bindtextdom.c b/win32/intl/bindtextdom.c new file mode 100644 index 00000000..67b5742d --- /dev/null +++ b/win32/intl/bindtextdom.c @@ -0,0 +1,245 @@ +/* Implementation of the bindtextdomain(3) function + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#include "intlconfig.h" + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif +#include "gettext.h" +#include "gettextP.h" + +/* @@ end of prolog @@ */ + +/* Contains the default location of the message catalogs. */ +extern const char _nl_default_dirname[]; + +/* List with bindings of specific domains. */ +extern struct binding *_nl_domain_bindings; + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define BINDTEXTDOMAIN __bindtextdomain +# ifndef strdup +# define strdup(str) __strdup (str) +# endif +#else +# define BINDTEXTDOMAIN bindtextdomain__ +#endif + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +char * +BINDTEXTDOMAIN (domainname, dirname_IN) /* FRANCO */ + const char *domainname; + const char *dirname_IN; +{ + struct binding *binding; + /*FRANCO*/ + char *dirname_MOD,*pos; + const char *dirname; + size_t len; + dirname_MOD=NULL; + pos=NULL; + dirname=dirname_IN; + len=strlen(dirname); + if((len>0) && (pos=strchr(dirname,'\\'))){ /* SUBST DOS LIKE \ into UNIX like / */ +#if defined _LIBC || defined HAVE_STRDUP + dirname_MOD = strdup (dirname); + if (dirname_MOD == NULL) + return NULL; +#else + size_t len1 = strlen (dirname) + 1; + dirname_MOD = (char *) malloc (len1); + if (dirname_MOD == NULL) + return NULL; + memcpy (dirname_MOD, dirname, len1); +#endif + dirname=dirname_MOD; + pos=dirname_MOD; + while( pos=strchr(pos,'\\')){ + *pos='/'; + } + }/*FRANCO END*/ + + /* Some sanity checks. */ + if (domainname == NULL || domainname[0] == '\0'){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } + + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (dirname == NULL) + /* The current binding has be to returned. */ + return binding == NULL ? (char *) _nl_default_dirname : binding->dirname; + + if (binding != NULL) + { + /* The domain is already bound. If the new value and the old + one are equal we simply do nothing. Otherwise replace the + old binding. */ + if (strcmp (dirname, binding->dirname) != 0) + { + char *new_dirname; + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_dirname = strdup (dirname); + if (new_dirname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } +#else + size_t len = strlen (dirname) + 1; + new_dirname = (char *) malloc (len); + if (new_dirname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } + + memcpy (new_dirname, dirname, len); +#endif + } + + if (binding->dirname != _nl_default_dirname) + free (binding->dirname); + + binding->dirname = new_dirname; + } + } + else + { + /* We have to create a new binding. */ +#if !defined _LIBC && !defined HAVE_STRDUP + size_t len; +#endif + struct binding *new_binding = + (struct binding *) malloc (sizeof (*new_binding)); + + if (new_binding == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } + +#if defined _LIBC || defined HAVE_STRDUP + new_binding->domainname = strdup (domainname); + if (new_binding->domainname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } +#else + len = strlen (domainname) + 1; + new_binding->domainname = (char *) malloc (len); + if (new_binding->domainname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } + memcpy (new_binding->domainname, domainname, len); +#endif + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_binding->dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_binding->dirname = strdup (dirname); + if (new_binding->dirname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } +#else + len = strlen (dirname) + 1; + new_binding->dirname = (char *) malloc (len); + if (new_binding->dirname == NULL){ + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + return NULL; + } + memcpy (new_binding->dirname, dirname, len); +#endif + } + + /* Now enqueue it. */ + if (_nl_domain_bindings == NULL + || strcmp (domainname, _nl_domain_bindings->domainname) < 0) + { + new_binding->next = _nl_domain_bindings; + _nl_domain_bindings = new_binding; + } + else + { + binding = _nl_domain_bindings; + while (binding->next != NULL + && strcmp (domainname, binding->next->domainname) > 0) + binding = binding->next; + + new_binding->next = binding->next; + binding->next = new_binding; + } + + binding = new_binding; + } + + if(dirname_MOD)free(dirname_MOD); /*FRANCO*/ + + return binding->dirname; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__bindtextdomain, bindtextdomain); +#endif diff --git a/win32/intl/dcgettext.c b/win32/intl/dcgettext.c new file mode 100644 index 00000000..64811b1e --- /dev/null +++ b/win32/intl/dcgettext.c @@ -0,0 +1,622 @@ +/* Implementation of the dcgettext(3) function. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#include "intlconfig.h" + +#include + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#include +#ifndef errno +extern int errno; +#endif +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include "gettext.h" +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif +#include "hash-string.h" + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define getcwd __getcwd +# ifndef stpcpy +# define stpcpy __stpcpy +# endif +#else +# if !defined HAVE_GETCWD +char *getwd (); +# define getcwd(buf, max) getwd (buf) +# else +char *getcwd (); +# endif +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Amount to increase buffer size by in each try. */ +#define PATH_INCR 32 + +/* The following is from pathmax.h. */ +/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define + PATH_MAX but might cause redefinition warnings when sys/param.h is + later included (as on MORE/BSD 4.3). */ +#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__)) +# include +#endif + +#ifndef _POSIX_PATH_MAX +# define _POSIX_PATH_MAX 255 +#endif + +#if !defined(PATH_MAX) && defined(_PC_PATH_MAX) +# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) +#endif + +/* Don't include sys/param.h if it already has been. */ +#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN) +# include +#endif + +#if !defined(PATH_MAX) && defined(MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +#endif + +#ifndef PATH_MAX +# define PATH_MAX _POSIX_PATH_MAX +#endif + +/* XPG3 defines the result of `setlocale (category, NULL)' as: + ``Directs `setlocale()' to query `category' and return the current + setting of `local'.'' + However it does not specify the exact format. And even worse: POSIX + defines this not at all. So we can use this feature only on selected + system (e.g. those using GNU C Library). */ +#ifdef _LIBC +# define HAVE_LOCALE_NULL +#endif + +/* Name of the default domain used for gettext(3) prior any call to + textdomain(3). The default value for this is "messages". */ +const char _nl_default_default_domain[] = "messages"; + +/* Value used as the default domain for gettext(3). */ +const char *_nl_current_default_domain = _nl_default_default_domain; + +/* Contains the default location of the message catalogs. */ +const char _nl_default_dirname[] = GNULOCALEDIR; + +/* List with bindings of specific domains created by bindtextdomain() + calls. */ +struct binding *_nl_domain_bindings; + +/* Prototypes for local functions. */ +static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file, + const char *msgid)) internal_function; +static const char *category_to_name PARAMS ((int category)) internal_function; +static const char *guess_category_value PARAMS ((int category, + const char *categoryname)) + internal_function; + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DCGETTEXT __dcgettext +#else +# define DCGETTEXT dcgettext__ +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +char * +DCGETTEXT (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + struct loaded_l10nfile *domain; + struct binding *binding; + const char *categoryname; + const char *categoryvalue; + char *dirname, *xdomainname; + char *single_locale; + char *retval; + int saved_errno = errno; + + /* If no real MSGID is given return NULL. */ + if (msgid == NULL) + return NULL; + + /* If DOMAINNAME is NULL, we are interested in the default domain. If + CATEGORY is not LC_MESSAGES this might not make much sense but the + defintion left this undefined. */ + if (domainname == NULL) + domainname = _nl_current_default_domain; + + /* First find matching binding. */ + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (binding == NULL) + dirname = (char *) _nl_default_dirname; + else if (binding->dirname[0] == '/' || binding->dirname[1] == ':' ) /*FRANCO für win32*/ + dirname = binding->dirname; + else + { + /* We have a relative path. Make it absolute now. */ + size_t dirname_len = strlen (binding->dirname) + 1; + size_t path_max; + char *ret; + + path_max = (unsigned) PATH_MAX; + path_max += 2; /* The getcwd docs say to do this. */ + + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + + __set_errno (0); + while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE) + { + path_max += PATH_INCR; + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + __set_errno (0); + } + + if (ret == NULL) + { + /* We cannot get the current working directory. Don't signal an + error but simply return the default string. */ + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); + } + + /* Now determine the symbolic name of CATEGORY and its value. */ + categoryname = category_to_name (category); + categoryvalue = guess_category_value (category, categoryname); + + xdomainname = (char *) alloca (strlen (categoryname) + + strlen (domainname) + 5); + ADD_BLOCK (block_list, xdomainname); + + stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), + domainname), + ".mo"); + + /* Creating working area. */ + single_locale = (char *) alloca (strlen (categoryvalue) + 1); + ADD_BLOCK (block_list, single_locale); + + + /* Search for the given string. This is a loop because we perhaps + got an ordered list of languages to consider for th translation. */ + while (1) + { + /* Make CATEGORYVALUE point to the next element of the list. */ + while (categoryvalue[0] != '\0' && categoryvalue[0] == ';') /* FRANCO changed : to ; */ + ++categoryvalue; + if (categoryvalue[0] == '\0') + { + /* The whole contents of CATEGORYVALUE has been searched but + no valid entry has been found. We solve this situation + by implicitly appending a "C" entry, i.e. no translation + will take place. */ + single_locale[0] = 'C'; + single_locale[1] = '\0'; + } + else + { + char *cp = single_locale; + while (categoryvalue[0] != '\0' && categoryvalue[0] != ';')/* FRANCO changed : to ; */ + *cp++ = *categoryvalue++; + *cp = '\0'; + } + + /* If the current locale value is C (or POSIX) we don't load a + domain. Return the MSGID. */ + if (strcmp (single_locale, "C") == 0 + || strcmp (single_locale, "POSIX") == 0) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + + /* Find structure describing the message catalog matching the + DOMAINNAME and CATEGORY. */ + domain = _nl_find_domain (dirname, single_locale, xdomainname); + + if (domain != NULL) + { + retval = find_msg (domain, msgid); + + if (retval == NULL) + { + int cnt; + + for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) + { + retval = find_msg (domain->successor[cnt], msgid); + + if (retval != NULL) + break; + } + } + + if (retval != NULL) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return retval; + } + } + } + /* NOTREACHED */ +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dcgettext, dcgettext); +#endif + + +static char * +internal_function +find_msg (domain_file, msgid) + struct loaded_l10nfile *domain_file; + const char *msgid; +{ + size_t top, act, bottom; + struct loaded_domain *domain; + + if (domain_file->decided == 0) + _nl_load_domain (domain_file); + + if (domain_file->data == NULL) + return NULL; + + domain = (struct loaded_domain *) domain_file->data; + + /* Locate the MSGID and its translation. */ + if (domain->hash_size > 2 && domain->hash_tab != NULL) + { + /* Use the hashing table. */ + nls_uint32 len = strlen (msgid); + nls_uint32 hash_val = hash_string (msgid); + nls_uint32 idx = hash_val % domain->hash_size; + nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); + nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]); + + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) == 0) + return (char *) domain->data + W (domain->must_swap, + domain->trans_tab[nstr - 1].offset); + + while (1) + { + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + + nstr = W (domain->must_swap, domain->hash_tab[idx]); + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) + == 0) + return (char *) domain->data + + W (domain->must_swap, domain->trans_tab[nstr - 1].offset); + } + /* NOTREACHED */ + } + + /* Now we try the default method: binary search in the sorted + array of messages. */ + bottom = 0; + top = domain->nstrings; + while (bottom < top) + { + int cmp_val; + + act = (bottom + top) / 2; + cmp_val = strcmp (msgid, domain->data + + W (domain->must_swap, + domain->orig_tab[act].offset)); + if (cmp_val < 0) + top = act; + else if (cmp_val > 0) + bottom = act + 1; + else + break; + } + + /* If an translation is found return this. */ + return bottom >= top ? NULL : (char *) domain->data + + W (domain->must_swap, + domain->trans_tab[act].offset); +} + + +/* Return string representation of locale CATEGORY. */ +static const char * +internal_function +category_to_name (category) + int category; +{ + const char *retval; + + switch (category) + { +#ifdef LC_COLLATE + case LC_COLLATE: + retval = "LC_COLLATE"; + break; +#endif +#ifdef LC_CTYPE + case LC_CTYPE: + retval = "LC_CTYPE"; + break; +#endif +#ifdef LC_MONETARY + case LC_MONETARY: + retval = "LC_MONETARY"; + break; +#endif +#ifdef LC_NUMERIC + case LC_NUMERIC: + retval = "LC_NUMERIC"; + break; +#endif +#ifdef LC_TIME + case LC_TIME: + retval = "LC_TIME"; + break; +#endif +#ifdef LC_MESSAGES + case LC_MESSAGES: + retval = "LC_MESSAGES"; + break; +#endif +#ifdef LC_RESPONSE + case LC_RESPONSE: + retval = "LC_RESPONSE"; + break; +#endif +#ifdef LC_ALL + case LC_ALL: + /* This might not make sense but is perhaps better than any other + value. */ + retval = "LC_ALL"; + break; +#endif + default: + /* If you have a better idea for a default value let me know. */ + retval = "LC_XXX"; + } + + return retval; +} + +/* Guess value of current locale from value of the environment variables. */ +static const char * +internal_function +guess_category_value (category, categoryname) + int category; + const char *categoryname; +{ + const char *retval; + + /* The highest priority value is the `LANGUAGE' environment + variable. This is a GNU extension. */ + retval = getenv ("LANGUAGE"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* `LANGUAGE' is not set. So we have to proceed with the POSIX + methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some + systems this can be done by the `setlocale' function itself. */ +#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL + return setlocale (category, NULL); +#else + /* Setting of LC_ALL overwrites all other. */ + retval = getenv ("LC_ALL"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Next comes the name of the desired category. */ + retval = getenv (categoryname); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Last possibility is the LANG environment variable. */ + retval = getenv ("LANG"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* We use C as the default domain. POSIX says this is implementation + defined. */ + return "C"; +#endif +} + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif + + +#ifdef _LIBC +/* If we want to free all resources we have to do some work at + program's end. */ +static void __attribute__ ((unused)) +free_mem (void) +{ + struct binding *runp; + + for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next) + { + free (runp->domainname); + if (runp->dirname != _nl_default_dirname) + /* Yes, this is a pointer comparison. */ + free (runp->dirname); + } + + if (_nl_current_default_domain != _nl_default_default_domain) + /* Yes, again a pointer comparison. */ + free ((char *) _nl_current_default_domain); +} + +text_set_element (__libc_subfreeres, free_mem); +#endif diff --git a/win32/intl/dgettext.c b/win32/intl/dgettext.c new file mode 100644 index 00000000..264bba38 --- /dev/null +++ b/win32/intl/dgettext.c @@ -0,0 +1,57 @@ +/* Implementation of the dgettext(3) function + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#include + +#if defined HAVE_LOCALE_H || defined _LIBC +# include +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DGETTEXT __dgettext +# define DCGETTEXT __dcgettext +#else +# define DGETTEXT dgettext__ +# define DCGETTEXT dcgettext__ +#endif + +/* Look up MSGID in the DOMAINNAME message catalog of the current + LC_MESSAGES locale. */ +char * +DGETTEXT (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return DCGETTEXT (domainname, msgid, LC_MESSAGES); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dgettext, dgettext); +#endif diff --git a/win32/intl/explodename.c b/win32/intl/explodename.c new file mode 100644 index 00000000..a4f88c26 --- /dev/null +++ b/win32/intl/explodename.c @@ -0,0 +1,186 @@ +/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#include "intlconfig.h" + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +#endif +#include + +#include "loadinfo.h" + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +int +_nl_explode_name (name, language, modifier, territory, codeset, + normalized_codeset, special, sponsor, revision) + char *name; + const char **language; + const char **modifier; + const char **territory; + const char **codeset; + const char **normalized_codeset; + const char **special; + const char **sponsor; + const char **revision; +{ + enum { undecided, xpg, cen } syntax; + char *cp; + int mask; + + *modifier = NULL; + *territory = NULL; + *codeset = NULL; + *normalized_codeset = NULL; + *special = NULL; + *sponsor = NULL; + *revision = NULL; + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = 0; + syntax = undecided; + *language = cp = name; + while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',') + ++cp; + + if (*language == cp) + /* This does not make sense: language has to be specified. Use + this entry as it is without exploding. Perhaps it is an alias. */ + cp = strchr (*language, '\0'); + else if (cp[0] == '_') + { + /* Next is the territory. */ + cp[0] = '\0'; + *territory = ++cp; + + while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= TERRITORY; + + if (cp[0] == '.') + { + /* Next is the codeset. */ + syntax = xpg; + cp[0] = '\0'; + *codeset = ++cp; + + while (cp[0] != '\0' && cp[0] != '@') + ++cp; + + mask |= XPG_CODESET; + + if (*codeset != cp && (*codeset)[0] != '\0') + { + *normalized_codeset = _nl_normalize_codeset (*codeset, + cp - *codeset); + if (strcmp (*codeset, *normalized_codeset) == 0) + free ((char *) *normalized_codeset); + else + mask |= XPG_NORM_CODESET; + } + } + } + + if (cp[0] == '@' || (syntax != xpg && cp[0] == '+')) + { + /* Next is the modifier. */ + syntax = cp[0] == '@' ? xpg : cen; + cp[0] = '\0'; + *modifier = ++cp; + + while (syntax == cen && cp[0] != '\0' && cp[0] != '+' + && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= XPG_MODIFIER | CEN_AUDIENCE; + } + + if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_')) + { + syntax = cen; + + if (cp[0] == '+') + { + /* Next is special application (CEN syntax). */ + cp[0] = '\0'; + *special = ++cp; + + while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= CEN_SPECIAL; + } + + if (cp[0] == ',') + { + /* Next is sponsor (CEN syntax). */ + cp[0] = '\0'; + *sponsor = ++cp; + + while (cp[0] != '\0' && cp[0] != '_') + ++cp; + + mask |= CEN_SPONSOR; + } + + if (cp[0] == '_') + { + /* Next is revision (CEN syntax). */ + cp[0] = '\0'; + *revision = ++cp; + + mask |= CEN_REVISION; + } + } + + /* For CEN syntax values it might be important to have the + separator character in the file name, not for XPG syntax. */ + if (syntax == xpg) + { + if (*territory != NULL && (*territory)[0] == '\0') + mask &= ~TERRITORY; + + if (*codeset != NULL && (*codeset)[0] == '\0') + mask &= ~XPG_CODESET; + + if (*modifier != NULL && (*modifier)[0] == '\0') + mask &= ~XPG_MODIFIER; + } + + return mask; +} diff --git a/win32/intl/finddomain.c b/win32/intl/finddomain.c new file mode 100644 index 00000000..9d856e4b --- /dev/null +++ b/win32/intl/finddomain.c @@ -0,0 +1,214 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#include "intlconfig.h" + +#include +#include +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include "gettext.h" +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ +/* List of already loaded domains. */ +static struct loaded_l10nfile *_nl_loaded_domains; + + +/* Return a data structure describing the message catalog described by + the DOMAINNAME and CATEGORY parameters with respect to the currently + established bindings. */ +struct loaded_l10nfile * +internal_function +_nl_find_domain (dirname, locale, domainname) + const char *dirname; + char *locale; + const char *domainname; +{ + struct loaded_l10nfile *retval; + const char *language; + const char *modifier; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *special; + const char *sponsor; + const char *revision; + const char *alias_value; + int mask; + + /* LOCALE can consist of up to four recognized parts for the XPG syntax: + + language[_territory[.codeset]][@modifier] + + and six parts for the CEN syntax: + + language[_territory][+audience][+special][,[sponsor][_revision]] + + Beside the first part all of them are allowed to be missing. If + the full specified locale is not found, the less specific one are + looked for. The various parts will be stripped off according to + the following order: + (1) revision + (2) sponsor + (3) special + (4) codeset + (5) normalized codeset + (6) territory + (7) audience/modifier + */ + + /* If we have already tested for this locale entry there has to + be one data set in the list of loaded domains. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, 0, locale, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, domainname, 0); + if (retval != NULL) + { + /* We know something about this locale. */ + int cnt; + + if (retval->decided == 0) + _nl_load_domain (retval); + + if (retval->data != NULL) + return retval; + + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt]); + + if (retval->successor[cnt]->data != NULL) + break; + } + return cnt >= 0 ? retval : NULL; + /* NOTREACHED */ + } + + /* See whether the locale value is an alias. If yes its value + *overwrites* the alias name. No test for the original value is + done. */ + alias_value = _nl_expand_alias (locale); + if (alias_value != NULL) + { +#if defined _LIBC || defined HAVE_STRDUP + locale = strdup (alias_value); + if (locale == NULL) + return NULL; +#else + size_t len = strlen (alias_value) + 1; + locale = (char *) malloc (len); + if (locale == NULL) + return NULL; + + memcpy (locale, alias_value, len); +#endif + } + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = _nl_explode_name (locale, &language, &modifier, &territory, + &codeset, &normalized_codeset, &special, + &sponsor, &revision); + + /* Create all possible locale entries which might be interested in + generalization. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, mask, language, territory, + codeset, normalized_codeset, modifier, special, + sponsor, revision, domainname, 1); + if (retval == NULL) + /* This means we are out of core. */ + return NULL; + + if (retval->decided == 0) + _nl_load_domain (retval); + if (retval->data == NULL) + { + int cnt; + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt]); + if (retval->successor[cnt]->data != NULL) + break; + } + } + + /* The room for an alias was dynamically allocated. Free it now. */ + if (alias_value != NULL) + free (locale); + + return retval; +} + + +#ifdef _LIBC +static void __attribute__ ((unused)) +free_mem (void) +{ + struct loaded_l10nfile *runp = _nl_loaded_domains; + + while (runp != NULL) + { + struct loaded_l10nfile *here = runp; + if (runp->data != NULL) + _nl_unload_domain ((struct loaded_domain *) runp->data); + runp = runp->next; + free (here); + } +} + +text_set_element (__libc_subfreeres, free_mem); +#endif diff --git a/win32/intl/gettext.c b/win32/intl/gettext.c new file mode 100644 index 00000000..b72f7342 --- /dev/null +++ b/win32/intl/gettext.c @@ -0,0 +1,86 @@ +/* Implementation of gettext(3) function. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#include "intlconfig.h" + +#ifdef _LIBC +# define __need_NULL +# include +#else +# ifdef STDC_HEADERS +# include /* Just for NULL. */ +# else +# ifdef HAVE_STRING_H +# include +# else +# define NULL ((void *) 0) +# endif +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define GETTEXT __gettext +# define DGETTEXT __dgettext +#else +# define GETTEXT gettext__ +# define DGETTEXT dgettext__ +#endif + +#include // Added by Wei Mingzhi 5-4-2010 + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +char * +GETTEXT (msgid) + const char *msgid; +{ +// return DGETTEXT (NULL, msgid); + + // 5-24-2010 Wei Mingzhi + // Hack for UTF-8 support + char *t = DGETTEXT(NULL, msgid); + char buf[16384]; + static char bufout[16384]; + + if (MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)t, -1, (LPWSTR)buf, sizeof(buf)) == 0) { + return t; + } + + if (WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)buf, -1, (LPSTR)bufout, sizeof(bufout), NULL, NULL) == 0) { + return t; + } + + return bufout; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__gettext, gettext); +#endif diff --git a/win32/intl/gettext.h b/win32/intl/gettext.h new file mode 100644 index 00000000..9108a2ed --- /dev/null +++ b/win32/intl/gettext.h @@ -0,0 +1,105 @@ +/* Internal header for GNU gettext internationalization functions. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program; see the file COPYING. If not, + write to the Free Software Foundation, Inc., 51 Franklin Street, + Fifth Floor, Boston, MA 02111-1307 USA. */ + +#ifndef _GETTEXT_H +#define _GETTEXT_H 1 + +#include + +#if HAVE_LIMITS_H || _LIBC +# include +#endif + +/* @@ end of prolog @@ */ + +/* The magic number of the GNU message catalog format. */ +#define _MAGIC 0x950412de +#define _MAGIC_SWAPPED 0xde120495 + +/* Revision number of the currently used .mo (binary) file format. */ +#define MO_REVISION_NUMBER 0 + +/* The following contortions are an attempt to use the C preprocessor + to determine an unsigned integral type that is 32 bits wide. An + alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but + doing that would require that the configure script compile and *run* + the resulting executable. Locally running cross-compiled executables + is usually not possible. */ + +#if __STDC__ +# define UINT_MAX_32_BITS 4294967295U +#else +# define UINT_MAX_32_BITS 0xFFFFFFFF +#endif + +/* If UINT_MAX isn't defined, assume it's a 32-bit type. + This should be valid for all systems GNU cares about because + that doesn't include 16-bit systems, and only modern systems + (that certainly have ) have 64+-bit integral types. */ + +#ifndef UINT_MAX +# define UINT_MAX UINT_MAX_32_BITS +#endif + +#if UINT_MAX == UINT_MAX_32_BITS +typedef unsigned nls_uint32; +#else +# if USHRT_MAX == UINT_MAX_32_BITS +typedef unsigned short nls_uint32; +# else +# if ULONG_MAX == UINT_MAX_32_BITS +typedef unsigned long nls_uint32; +# else + /* The following line is intended to throw an error. Using #error is + not portable enough. */ + "Cannot determine unsigned 32-bit data type." +# endif +# endif +#endif + + +/* Header for binary .mo file format. */ +struct mo_file_header +{ + /* The magic number. */ + nls_uint32 magic; + /* The revision number of the file format. */ + nls_uint32 revision; + /* The number of strings pairs. */ + nls_uint32 nstrings; + /* Offset of table with start offsets of original strings. */ + nls_uint32 orig_tab_offset; + /* Offset of table with start offsets of translation strings. */ + nls_uint32 trans_tab_offset; + /* Size of hashing table. */ + nls_uint32 hash_tab_size; + /* Offset of first hashing entry. */ + nls_uint32 hash_tab_offset; +}; + +struct string_desc +{ + /* Length of addressed string. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; +}; + +/* @@ begin of epilog @@ */ + +#endif /* gettext.h */ diff --git a/win32/intl/gettextP.h b/win32/intl/gettextP.h new file mode 100644 index 00000000..87b076c3 --- /dev/null +++ b/win32/intl/gettextP.h @@ -0,0 +1,89 @@ +/* Header describing internals of gettext library + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#ifndef _GETTEXTP_H +#define _GETTEXTP_H + +#include "loadinfo.h" + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef internal_function +# define internal_function +#endif + +#ifndef W +# define W(flag, data) ((flag) ? SWAP (data) : (data)) +#endif + + +#ifdef _LIBC +# include +# define SWAP(i) bswap_32 (i) +#else +static nls_uint32 SWAP PARAMS ((nls_uint32 i)); + +static inline nls_uint32 +SWAP (i) + nls_uint32 i; +{ + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); +} +#endif + + +struct loaded_domain +{ + const char *data; + int use_mmap; + size_t mmap_size; + int must_swap; + nls_uint32 nstrings; + struct string_desc *orig_tab; + struct string_desc *trans_tab; + nls_uint32 hash_size; + nls_uint32 *hash_tab; +}; + +struct binding +{ + struct binding *next; + char *domainname; + char *dirname; +}; + +struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, + char *__locale, + const char *__domainname)) + internal_function; +void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain)) + internal_function; +void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) + internal_function; + +/* @@ begin of epilog @@ */ + +#endif /* gettextP.h */ diff --git a/win32/intl/hash-string.h b/win32/intl/hash-string.h new file mode 100644 index 00000000..9bb0014f --- /dev/null +++ b/win32/intl/hash-string.h @@ -0,0 +1,59 @@ +/* Implements a string hashing function. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with the this program; see the file COPYING. If not, + write to the Free Software Foundation, Inc., 51 Franklin Street, + Fifth Floor, Boston, MA 02111-1307 USA. */ + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(Args) Args +# else +# define PARAMS(Args) () +# endif +#endif + +/* We assume to have `unsigned long int' value with at least 32 bits. */ +#define HASHWORDBITS 32 + + +/* Defines the so called `hashpjw' function by P.J. Weinberger + [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, + 1986, 1987 Bell Telephone Laboratories, Inc.] */ +static unsigned long hash_string PARAMS ((const char *__str_param)); + +static inline unsigned long +hash_string (str_param) + const char *str_param; +{ + unsigned long int hval, g; + const char *str = str_param; + + /* Compute the hash value for the given string. */ + hval = 0; + while (*str != '\0') + { + hval <<= 4; + hval += (unsigned long) *str++; + g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4)); + if (g != 0) + { + hval ^= g >> (HASHWORDBITS - 8); + hval ^= g; + } + } + return hval; +} diff --git a/win32/intl/intl-compat.c b/win32/intl/intl-compat.c new file mode 100644 index 00000000..5f90dab4 --- /dev/null +++ b/win32/intl/intl-compat.c @@ -0,0 +1,74 @@ +/* intl-compat.c - Stub functions to call gettext functions from GNU gettext + Library. + Copyright (C) 1995 Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#include "intlconfig.h" + +#include "libgettext.h" + +/* @@ end of prolog @@ */ + + +#undef gettext +#undef dgettext +#undef dcgettext +#undef textdomain +#undef bindtextdomain + + +char * +bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; +{ + return bindtextdomain__ (domainname, dirname); +} + + +char * +dcgettext (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ + return dcgettext__ (domainname, msgid, category); +} + + +char * +dgettext (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return dgettext__ (domainname, msgid); +} + + +char * +gettext (msgid) + const char *msgid; +{ + return gettext__ (msgid); +} + + +char * +textdomain (domainname) + const char *domainname; +{ + return textdomain__ (domainname); +} diff --git a/win32/intl/intlconfig.h b/win32/intl/intlconfig.h new file mode 100644 index 00000000..fa86071e --- /dev/null +++ b/win32/intl/intlconfig.h @@ -0,0 +1,248 @@ +/* config.h. Generated automatically by configure. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ +/* Special definitions, processed by autoheader. + Copyright (C) 1995, 1996, 1997 Free Software Foundation. + Ulrich Drepper , 1995. */ + +/* Default value for alignment of strings in .mo file. */ +#define DEFAULT_OUTPUT_ALIGNMENT 1 + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + + +/* Define if using alloca.c. */ +/* #undef C_ALLOCA */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +/* #undef CRAY_STACKSEG_END */ + +/* Define if you have alloca, as a function or macro. */ +/* #define HAVE_ALLOCA 1 */ + +/* Define if you have and it should be used (not on Ultrix). */ +/* #undef HAVE_ALLOCA_H */ + +/* Define if you don't have vprintf but do have _doprnt. */ +/* #undef HAVE_DOPRNT */ + +/* Define if you have a working `mmap' system call. */ +/* #undef HAVE_MMAP */ + +/* Define if you have the vprintf function. */ +#define HAVE_VPRINTF 1 + +/* Define as __inline if that's what the C compiler calls it. */ +/* #undef inline */ + +/* Define to `long' if doesn't define. */ +/* #undef off_t */ + +/* Define if you need to in order for stat and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +/* #undef STACK_DIRECTION */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to the name of the distribution. */ +/* #define PACKAGE "gettext" */ + +/* Define to the version of the distribution. */ +/* #define VERSION "0.10.35" */ + +/* Define if defines ptrdiff_t. */ +#define HAVE_PTRDIFF_T 1 + +/* Define if your locale.h file contains LC_MESSAGES. */ +/* #undef HAVE_LC_MESSAGES */ + +/* Define if you have the parse_printf_format function. */ +/* #undef HAVE_PARSE_PRINTF_FORMAT */ + +/* Define to 1 if NLS is requested. */ +/* #undef ENABLE_NLS */ + +/* Define as 1 if you have catgets and don't want to use GNU gettext. */ +/* #undef HAVE_CATGETS */ + +/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +/* #undef HAVE_GETTEXT */ + +/* Define as 1 if you have the stpcpy function. */ +/* #undef HAVE_STPCPY */ + +/* Define if you have the __argz_count function. */ +/* #undef HAVE___ARGZ_COUNT */ + +/* Define if you have the __argz_next function. */ +/* #undef HAVE___ARGZ_NEXT */ + +/* Define if you have the __argz_stringify function. */ +/* #undef HAVE___ARGZ_STRINGIFY */ + +/* Define if you have the dcgettext function. */ +/* #undef HAVE_DCGETTEXT */ + +/* Define if you have the getcwd function. */ +#define HAVE_GETCWD 1 + +/* Define if you have the getdelim function. */ +/* #undef HAVE_GETDELIM */ + +/* Define if you have the getline function. */ +/* #undef HAVE_GETLINE */ + +/* Define if you have the getpagesize function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if you have the mblen function. */ +#define HAVE_MBLEN 1 + +/* Define if you have the memcpy function. */ +#define HAVE_MEMCPY 1 + +/* Define if you have the memmove function. */ +#define HAVE_MEMMOVE 1 + +/* Define if you have the memset function. */ +#define HAVE_MEMSET 1 + +/* Define if you have the munmap function. */ +/* #undef HAVE_MUNMAP */ + +/* Define if you have the putenv function. */ +#define HAVE_PUTENV 1 + +/* Define if you have the setenv function. */ +/* #undef HAVE_SETENV */ + +/* Define if you have the setlocale function. */ +#define HAVE_SETLOCALE 1 + +/* Define if you have the stpcpy function. */ +/* #undef HAVE_STPCPY */ + +/* Define if you have the stpncpy function. */ +/* #undef HAVE_STPNCPY */ + +/* Define if you have the strcasecmp function. */ +/* #define HAVE_STRCASECMP 1 */ + +/* Define if you have the strchr function. */ +#define HAVE_STRCHR 1 + +/* Define if you have the strcspn function. */ +#define HAVE_STRCSPN 1 + +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define if you have the strerror function. */ +#define HAVE_STRERROR 1 + +/* Define if you have the strncasecmp function. */ +#define HAVE_STRNCASECMP 1 + +/* Define if you have the strstr function. */ +#define HAVE_STRSTR 1 + +/* Define if you have the strtoul function. */ +#define HAVE_STRTOUL 1 + +/* Define if you have the uname function. */ +/* #undef HAVE_UNAME */ + +/* Define if you have the vasprintf function. */ +/* #undef HAVE_VASPRINTF */ + +/* Define if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_NL_TYPES_H */ + +/* Define if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* Define if you have the header file. */ +/* #define HAVE_UNISTD_H 1 */ + +/* Define if you have the header file. */ +#define HAVE_VALUES_H 1 + +/* Define if you have the i library (-li). */ +/* #undef HAVE_LIBI */ + +/* We don't test for the basename function but still want to use the + version in the libc when compiling for a system using glibc. */ +#ifdef __GNU_LIBRARY__ +# define HAVE_BASENAME 1 +#endif + +/* On GNU systems we want to use the extensions. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + + +/* A file name cannot consist of any character possible. INVALID_PATH_CHAR + contains the characters not allowed. */ +#ifndef MSDOS +# define INVALID_PATH_CHAR "\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37 \177/" +#else +/* Something like this for MSDOG. */ +# define INVALID_PATH_CHAR "\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37 \177\\:." +#endif + +/* Length from which starting on warnings about too long strings are given. + Several systems have limits for strings itself, more have problems with + strings in their tools (important here: gencat). 1024 bytes is a + conservative limit. Because many translation let the message size grow + (German translations are always bigger) choose a length < 1024. */ +#define WARN_ID_LEN 900 + +/* This is the page width for the message_print function. It should + not be set to more than 79 characters (Emacs users will appreciate + it). It is used to wrap the msgid and msgstr strings, and also to + wrap the file position (#:) comments. */ +#define PAGE_WIDTH 79 + +#define GNULOCALEDIR "./Langs" +#define LOCALE_ALIAS_PATH GNULOCALEDIR + +#ifdef _MSC_VER +#pragma warning (disable:4996) +#endif diff --git a/win32/intl/l10nflist.c b/win32/intl/l10nflist.c new file mode 100644 index 00000000..d2c32df7 --- /dev/null +++ b/win32/intl/l10nflist.c @@ -0,0 +1,408 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#include "intlconfig.h" + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined _LIBC || defined HAVE_ARGZ_H +# include +#endif +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#include "loadinfo.h" + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# ifndef stpcpy +# define stpcpy(dest, src) __stpcpy(dest, src) +# endif +#else +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Define function which are usually not available. */ + +#if !defined _LIBC && !defined HAVE___ARGZ_COUNT +/* Returns the number of strings in ARGZ. */ +static size_t argz_count__ PARAMS ((const char *argz, size_t len)); + +static size_t +argz_count__ (argz, len) + const char *argz; + size_t len; +{ + size_t count = 0; + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len + 1; + len -= part_len + 1; + count++; + } + return count; +} +# undef __argz_count +# define __argz_count(argz, len) argz_count__ (argz, len) +#endif /* !_LIBC && !HAVE___ARGZ_COUNT */ + +#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY +/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's + except the last into the character SEP. */ +static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); + +static void +argz_stringify__ (argz, len, sep) + char *argz; + size_t len; + int sep; +{ + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len; + len -= part_len + 1; + if (len > 0) + *argz++ = sep; + } +} +# undef __argz_stringify +# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) +#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ + +#if !defined _LIBC && !defined HAVE___ARGZ_NEXT +static char *argz_next__ PARAMS ((char *argz, size_t argz_len, + const char *entry)); + +static char * +argz_next__ (argz, argz_len, entry) + char *argz; + size_t argz_len; + const char *entry; +{ + if (entry) + { + if (entry < argz + argz_len) + entry = strchr (entry, '\0') + 1; + + return entry >= argz + argz_len ? NULL : (char *) entry; + } + else + if (argz_len > 0) + return argz; + else + return 0; +} +# undef __argz_next +# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) +#endif /* !_LIBC && !HAVE___ARGZ_NEXT */ + + +/* Return number of bits set in X. */ +static int pop PARAMS ((int x)); + +static inline int +pop (x) + int x; +{ + /* We assume that no more than 16 bits are used. */ + x = ((x & ~0x5555) >> 1) + (x & 0x5555); + x = ((x & ~0x3333) >> 2) + (x & 0x3333); + x = ((x >> 4) + x) & 0x0f0f; + x = ((x >> 8) + x) & 0xff; + + return x; +} + + +struct loaded_l10nfile * +_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, + territory, codeset, normalized_codeset, modifier, special, + sponsor, revision, filename, do_allocate) + struct loaded_l10nfile **l10nfile_list; + const char *dirlist; + size_t dirlist_len; + int mask; + const char *language; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *modifier; + const char *special; + const char *sponsor; + const char *revision; + const char *filename; + int do_allocate; +{ + char *abs_filename; + struct loaded_l10nfile *last = NULL; + struct loaded_l10nfile *retval; + char *cp; + size_t entries; + int cnt; + + /* Allocate room for the full file name. */ + abs_filename = (char *) malloc (dirlist_len + + strlen (language) + + ((mask & TERRITORY) != 0 + ? strlen (territory) + 1 : 0) + + ((mask & XPG_CODESET) != 0 + ? strlen (codeset) + 1 : 0) + + ((mask & XPG_NORM_CODESET) != 0 + ? strlen (normalized_codeset) + 1 : 0) + + (((mask & XPG_MODIFIER) != 0 + || (mask & CEN_AUDIENCE) != 0) + ? strlen (modifier) + 1 : 0) + + ((mask & CEN_SPECIAL) != 0 + ? strlen (special) + 1 : 0) + + (((mask & CEN_SPONSOR) != 0 + || (mask & CEN_REVISION) != 0) + ? (1 + ((mask & CEN_SPONSOR) != 0 + ? strlen (sponsor) + 1 : 0) + + ((mask & CEN_REVISION) != 0 + ? strlen (revision) + 1 : 0)) : 0) + + 1 + strlen (filename) + 1); + + if (abs_filename == NULL) + return NULL; + + retval = NULL; + last = NULL; + + /* Construct file name. */ + memcpy (abs_filename, dirlist, dirlist_len); + __argz_stringify (abs_filename, dirlist_len, ';'); /*FRANCO changed : to ; for win32*/ + cp = abs_filename + (dirlist_len - 1); + *cp++ = '/'; + cp = stpcpy (cp, language); + + if ((mask & TERRITORY) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, territory); + } + if ((mask & XPG_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, codeset); + } + if ((mask & XPG_NORM_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, normalized_codeset); + } + if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) + { + /* This component can be part of both syntaces but has different + leading characters. For CEN we use `+', else `@'. */ + *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; + cp = stpcpy (cp, modifier); + } + if ((mask & CEN_SPECIAL) != 0) + { + *cp++ = '+'; + cp = stpcpy (cp, special); + } + if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) + { + *cp++ = ','; + if ((mask & CEN_SPONSOR) != 0) + cp = stpcpy (cp, sponsor); + if ((mask & CEN_REVISION) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, revision); + } + } + + *cp++ = '/'; + stpcpy (cp, filename); + + /* Look in list of already loaded domains whether it is already + available. */ + last = NULL; + for (retval = *l10nfile_list; retval != NULL; retval = retval->next) + if (retval->filename != NULL) + { + int compare = strcmp (retval->filename, abs_filename); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It's not in the list. */ + retval = NULL; + break; + } + + last = retval; + } + + if (retval != NULL || do_allocate == 0) + { + free (abs_filename); + return retval; + } + + retval = (struct loaded_l10nfile *) + malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len) + * (1 << pop (mask)) + * sizeof (struct loaded_l10nfile *))); + if (retval == NULL) + return NULL; + + retval->filename = abs_filename; + retval->decided = (__argz_count (dirlist, dirlist_len) != 1 + || ((mask & XPG_CODESET) != 0 + && (mask & XPG_NORM_CODESET) != 0)); + retval->data = NULL; + + if (last == NULL) + { + retval->next = *l10nfile_list; + *l10nfile_list = retval; + } + else + { + retval->next = last->next; + last->next = retval; + } + + entries = 0; + /* If the DIRLIST is a real list the RETVAL entry corresponds not to + a real file. So we have to use the DIRLIST separation mechanism + of the inner loop. */ + cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask; + for (; cnt >= 0; --cnt) + if ((cnt & ~mask) == 0 + && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) + && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) + { + /* Iterate over all elements of the DIRLIST. */ + char *dir = NULL; + + while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) + != NULL) + retval->successor[entries++] + = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, + language, territory, codeset, + normalized_codeset, modifier, special, + sponsor, revision, filename, 1); + } + retval->successor[entries] = NULL; + + return retval; +} + +/* Normalize codeset name. There is no standard for the codeset + names. Normalization allows the user to use any of the common + names. */ +const char * +_nl_normalize_codeset (codeset, name_len) + const unsigned char *codeset; + size_t name_len; +{ + int len = 0; + int only_digit = 1; + char *retval; + char *wp; + size_t cnt; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalnum (codeset[cnt])) + { + ++len; + + if (isalpha (codeset[cnt])) + only_digit = 0; + } + + retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); + + if (retval != NULL) + { + if (only_digit) + wp = stpcpy (retval, "iso"); + else + wp = retval; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalpha (codeset[cnt])) + *wp++ = tolower (codeset[cnt]); + else if (isdigit (codeset[cnt])) + *wp++ = codeset[cnt]; + + *wp = '\0'; + } + + return (const char *) retval; +} + + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif diff --git a/win32/intl/libgettext.h b/win32/intl/libgettext.h new file mode 100644 index 00000000..de4defd3 --- /dev/null +++ b/win32/intl/libgettext.h @@ -0,0 +1,182 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +/* Because on some systems (e.g. Solaris) we sometimes have to include + the systems libintl.h as well as this file we have more complex + include protection above. But the systems header might perhaps also + define _LIBINTL_H and therefore we have to protect the definition here. */ + +#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H +#ifndef _LIBINTL_H +# define _LIBINTL_H 1 +#endif +#define _LIBGETTEXT_H 1 + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +#include + +#if HAVE_LOCALE_H +# include +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ || defined __cplusplus +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef NULL +# if !defined __cplusplus || defined __GNUC__ +# define NULL ((void *) 0) +# else +# define NULL (0) +# endif +#endif + +#if !HAVE_LC_MESSAGES +/* This value determines the behaviour of the gettext() and dgettext() + function. But some system does not have this defined. Define it + to a default value. */ +# define LC_MESSAGES (-1) +#endif + + +/* Declarations for gettext-using-catgets interface. Derived from + Jim Meyering's libintl.h. */ +struct _msg_ent +{ + const char *_msg; + int _msg_number; +}; + + +#if HAVE_CATGETS +/* These two variables are defined in the automatically by po-to-tbl.sed + generated file `cat-id-tbl.c'. */ +extern const struct _msg_ent _msg_tbl[]; +extern int _msg_tbl_length; +#endif + + +/* For automatical extraction of messages sometimes no real + translation is needed. Instead the string itself is the result. */ +#define gettext_noop(Str) (Str) + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +extern char *gettext PARAMS ((const char *__msgid)); +extern char *gettext__ PARAMS ((const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid)); +extern char *dgettext__ PARAMS ((const char *__domainname, + const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid, + int __category)); +extern char *dcgettext__ PARAMS ((const char *__domainname, + const char *__msgid, int __category)); + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +extern char *textdomain PARAMS ((const char *__domainname)); +extern char *textdomain__ PARAMS ((const char *__domainname)); + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +extern char *bindtextdomain PARAMS ((const char *__domainname, + const char *__dirname)); +extern char *bindtextdomain__ PARAMS ((const char *__domainname, + const char *__dirname)); + +#if ENABLE_NLS + +/* Solaris 2.3 has the gettext function but dcgettext is missing. + So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4 + has dcgettext. */ +# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT) + +# define gettext(Msgid) \ + dgettext (NULL, Msgid) + +# define dgettext(Domainname, Msgid) \ + dcgettext (Domainname, Msgid, LC_MESSAGES) + +# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7 +/* This global variable is defined in loadmsgcat.c. We need a sign, + whether a new catalog was loaded, which can be associated with all + translations. */ +extern int _nl_msg_cat_cntr; + +# define dcgettext(Domainname, Msgid, Category) \ + (__extension__ \ + ({ \ + char *__result; \ + if (__builtin_constant_p (Msgid)) \ + { \ + static char *__translation__; \ + static int __catalog_counter__; \ + if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ + { \ + __translation__ = \ + dcgettext__ (Domainname, Msgid, Category); \ + __catalog_counter__ = _nl_msg_cat_cntr; \ + } \ + __result = __translation__; \ + } \ + else \ + __result = dcgettext__ (Domainname, Msgid, Category); \ + __result; \ + })) +# endif +# endif + +#else + +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) ((char *) Domainname) +# define bindtextdomain(Domainname, Dirname) ((char *) Dirname) + +#endif + +/* @@ begin of epilog @@ */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/win32/intl/libintl.h b/win32/intl/libintl.h new file mode 100644 index 00000000..1dcc6af5 --- /dev/null +++ b/win32/intl/libintl.h @@ -0,0 +1,112 @@ +/* This file is part of a Windows32 DLL Interface to: + GNU gettext - internationalization aids + Copyright (C) 1996, 1998 Free Software Foundation, Inc. + + This file was written by Franco Bez + +This program 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, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +/* REPLACEMENT FOR ORIGINAL LIBINTL.H for use with Windows32 */ + +#if !defined(__LIBINTL_H_INCLUDED) +#define __LIBINTL_H_INCLUDED + +#if defined(__cplusplus) +extern "C" { +#endif + +/* See if we allready know what we want static or dll linkage or none at all*/ +#if defined DONT_USE_GETTEXT || ( defined USE_SAFE_GETTEXT_DLL && defined USE_GETTEXT_STATIC ) || ( defined USE_GETTEXT_DLL && defined USE_SAFE_GETTEXT_DLL ) || ( defined USE_GETTEXT_DLL && defined USE_GETTEXT_STATIC ) +/* TWO IS HARDLY POSSIBLE */ +#undef USE_GETTEXT_DLL +#undef USE_GETTEXT_STATIC +#undef USE_SAFE_GETTEXT_DLL +#endif /* MORE THAN ONE - OR NONE AT ALL */ + +#if !defined USE_GETTEXT_DLL && !defined USE_SAFE_GETTEXT_DLL && !defined USE_GETTEXT_STATIC && !defined DONT_USE_GETTEXT +/* not explicitly defined so try to guess it - + if GNUC is used - we use static linkage by default + because at the moment this is the only plattform + for which a static lib is available + else we use the DLL built with GNUC */ +# define USE_GETTEXT_STATIC +#endif /* NONE */ + +/* NOW ONLY ONE OF + DONT_USE_GETTEXT , USE_GETTEXT_DLL , USE_SAFE_GETTEXT_DLL , USE_GETTEXT_STATIC + IS DEFINED */ + +#if defined USE_GETTEXT_DLL +/* exported functions in DLL gnu_gettext.dll + you should link with import library + -lgnu_gettext (for mingw32) OR gnu_gettext.lib (MSVC) */ +__declspec(dllimport) char *gettext(const char *__msgid); +__declspec(dllimport) char *dgettext(const char *__domainname,const char *__msgid); +__declspec(dllimport) char *dcgettext(const char *__domainname,const char *__msgid, int __category); +__declspec(dllimport) char *textdomain(const char *__domainname); +__declspec(dllimport) char *bindtextdomain(const char *__domainname,const char *__dirname); +/* calling _putenv from within the DLL */ +__declspec(dllexport) int gettext_putenv(const char *envstring); +#endif /* DLL */ + +#if defined USE_SAFE_GETTEXT_DLL +/* Uses DLL gnu_gettext.dll ONLY if present, otherwise NO translation will take place + you should link with "safe_gettext_dll.o -lstdc++" see README for safe_gettext_dll for Details */ +/* The safe gettext functions */ +extern char *gettext(const char *szMsgId); +extern char *dgettext(const char *szDomain,const char *szMsgId); +extern char *dcgettext(const char *szDomain,const char *szMsgId,int iCategory); +extern char *textdomain(const char *szDomain); +extern char *bindtextdomain(const char *szDomain,const char *szDirectory); +/* calling _putenv from within the DLL */ +extern int gettext_putenv(const char *envstring); +#endif /* SAFE DLL */ + +#if defined USE_GETTEXT_STATIC +/* exported functions in static library libintl.a + and supporting macros + you should link with -lintl (mingw32) */ +extern char *gettext__(const char *__msgid); +extern char *dgettext__(const char *__domainname,const char *__msgid); +extern char *dcgettext__(const char *__domainname,const char *__msgid, int __category); +extern char *textdomain__(const char *__domainname); +extern char *bindtextdomain__(const char *__domainname,const char *__dirname); +#define gettext(szMsgId) gettext__(szMsgId) +#define dgettext(szDomain,szMsgId) dgettext__(szDomain,szMsgId) +#define dcgettext(szDomain,szMsgId,iCategory) dcgettext__(szDomain,szMsgId,iCategory) +#define textdomain(szDomain) textdomain__(szDomain) +#define bindtextdomain(szDomain,szDirectory) bindtextdomain__(szDomain,szDirectory) +// dummy - for static linkage - calling _putenv from within the DLL +#define gettext_putenv(a) _putenv(a) +#endif /* STATIC */ + +#if defined DONT_USE_GETTEXT +/* DON'T USE GETTEXT AT ALL + MAKROS TO MAKE CODE COMPILE WELL, BUT GETTEXT WILL NOT BE USESD +*/ +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) ((char *) Domainname) +# define bindtextdomain(Domainname, Dirname) ((char *) Dirname) +// dummy - for static linkage - calling _putenv from within the DLL +# define gettext_putenv(a) _putenv(a) +#endif /* DON'T USE AT ALL */ + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#endif /*!defined(__LIBINTL_H_INCLUDED)*/ diff --git a/win32/intl/loadinfo.h b/win32/intl/loadinfo.h new file mode 100644 index 00000000..48326e97 --- /dev/null +++ b/win32/intl/loadinfo.h @@ -0,0 +1,76 @@ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +/* Encoding of locale name parts. */ +#define CEN_REVISION 1 +#define CEN_SPONSOR 2 +#define CEN_SPECIAL 4 +#define XPG_NORM_CODESET 8 +#define XPG_CODESET 16 +#define TERRITORY 32 +#define CEN_AUDIENCE 64 +#define XPG_MODIFIER 128 + +#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) +#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) + + +struct loaded_l10nfile +{ + const char *filename; + int decided; + + const void *data; + + struct loaded_l10nfile *next; + struct loaded_l10nfile *successor[1]; +}; + + +extern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset, + size_t name_len)); + +extern struct loaded_l10nfile * +_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, + const char *dirlist, size_t dirlist_len, int mask, + const char *language, const char *territory, + const char *codeset, + const char *normalized_codeset, + const char *modifier, const char *special, + const char *sponsor, const char *revision, + const char *filename, int do_allocate)); + + +extern const char *_nl_expand_alias PARAMS ((const char *name)); + +extern int _nl_explode_name PARAMS ((char *name, const char **language, + const char **modifier, + const char **territory, + const char **codeset, + const char **normalized_codeset, + const char **special, + const char **sponsor, + const char **revision)); diff --git a/win32/intl/loadmsgcat.c b/win32/intl/loadmsgcat.c new file mode 100644 index 00000000..57d148c3 --- /dev/null +++ b/win32/intl/loadmsgcat.c @@ -0,0 +1,227 @@ +/* Load needed message catalogs. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#include "intlconfig.h" + +#include +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC +# include +#endif + +#ifdef _WIN32 +#include +#ifdef _MSC_VER +#pragma warning (disable:4018) +#endif +#endif + +#include "gettext.h" +#include "gettextP.h" + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ISO C functions. This is required by the standard + because some ISO C functions will require linking with this object + file and the name space must not be polluted. */ +# define open __open +# define close __close +# define read __read +# define mmap __mmap +# define munmap __munmap +#endif + +/* We need a sign, whether a new catalog was loaded, which can be associated + with all translations. This is important if the translations are + cached by one of GCC's features. */ +int _nl_msg_cat_cntr = 0; + + +/* Load the message catalogs specified by FILENAME. If it is no valid + message catalog do nothing. */ +void +internal_function +_nl_load_domain (domain_file) + struct loaded_l10nfile *domain_file; +{ + int fd; + size_t size; + struct stat st; + struct mo_file_header *data = (struct mo_file_header *) -1; +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + int use_mmap = 0; +#endif + struct loaded_domain *domain; + + domain_file->decided = 1; + domain_file->data = NULL; + + /* If the record does not represent a valid locale the FILENAME + might be NULL. This can happen when according to the given + specification the locale file name is different for XPG and CEN + syntax. */ + if (domain_file->filename == NULL) + return; + + /* Try to open the addressed file. */ + fd = open (domain_file->filename, O_RDONLY | O_BINARY); /*FRANCO - binary*/ + if (fd == -1) + return; + + /* We must know about the size of the file. */ + if (fstat (fd, &st) != 0 + || (size = (size_t) st.st_size) != st.st_size + || size < sizeof (struct mo_file_header)) + { + /* Something went wrong. */ + close (fd); + return; + } + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + /* Now we are ready to load the file. If mmap() is available we try + this first. If not available or it failed we try to load it. */ + data = (struct mo_file_header *) mmap (NULL, size, PROT_READ, + MAP_PRIVATE, fd, 0); + + if (data != (struct mo_file_header *) -1) + { + /* mmap() call was successful. */ + close (fd); + use_mmap = 1; + } +#endif + + /* If the data is not yet available (i.e. mmap'ed) we try to load + it manually. */ + if (data == (struct mo_file_header *) -1) + { + size_t to_read; + char *read_ptr; + + data = (struct mo_file_header *) malloc (size); + if (data == NULL) + return; + + to_read = size; + read_ptr = (char *) data; + do + { + long int nb = (long int) read (fd, read_ptr, to_read); + if (nb == -1) + { + close (fd); + return; + } + + read_ptr += nb; + to_read -= nb; + } + while (to_read > 0); + + close (fd); + } + + /* Using the magic number we can test whether it really is a message + catalog file. */ + if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED) + { + /* The magic number is wrong: not a message catalog file. */ +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + return; + } + + domain_file->data + = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); + if (domain_file->data == NULL) + return; + + domain = (struct loaded_domain *) domain_file->data; + domain->data = (char *) data; +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + domain->use_mmap = use_mmap; +#endif + domain->mmap_size = size; + domain->must_swap = data->magic != _MAGIC; + + /* Fill in the information about the available tables. */ + switch (W (domain->must_swap, data->revision)) + { + case 0: + domain->nstrings = W (domain->must_swap, data->nstrings); + domain->orig_tab = (struct string_desc *) + ((char *) data + W (domain->must_swap, data->orig_tab_offset)); + domain->trans_tab = (struct string_desc *) + ((char *) data + W (domain->must_swap, data->trans_tab_offset)); + domain->hash_size = W (domain->must_swap, data->hash_tab_size); + domain->hash_tab = (nls_uint32 *) + ((char *) data + W (domain->must_swap, data->hash_tab_offset)); + break; + default: + /* This is an illegal revision. */ +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + free (domain); + domain_file->data = NULL; + return; + } + + /* Show that one domain is changed. This might make some cached + translations invalid. */ + ++_nl_msg_cat_cntr; +} + + +#ifdef _LIBC +void +internal_function +_nl_unload_domain (domain) + struct loaded_domain *domain; +{ + if (domain->use_mmap) + munmap ((caddr_t) domain->data, domain->mmap_size); + else + free ((void *) domain->data); + + free (domain); +} +#endif diff --git a/win32/intl/localealias.c b/win32/intl/localealias.c new file mode 100644 index 00000000..dfdb8486 --- /dev/null +++ b/win32/intl/localealias.c @@ -0,0 +1,426 @@ +/* Handle aliases for locale names. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#include "intlconfig.h" + +#include +#include +#include + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#include "gettext.h" +#include "gettextP.h" + +#ifdef _MSC_VER +#pragma warning (disable:4113) +#endif + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define strcasecmp __strcasecmp + +# define mempcpy __mempcpy +# define HAVE_MEMPCPY 1 + +/* We need locking here since we can be called from different places. */ +# include + +__libc_lock_define_initialized (static, lock); +#endif + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + + +struct alias_map +{ + const char *alias; + const char *value; +}; + + +static char *string_space = NULL; +static size_t string_space_act = 0; +static size_t string_space_max = 0; +static struct alias_map *map; +static size_t nmap = 0; +static size_t maxmap = 0; + + +/* Prototypes for local functions. */ +static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) + internal_function; +static void extend_alias_table PARAMS ((void)); +static int alias_compare PARAMS ((const struct alias_map *map1, + const struct alias_map *map2)); + + +const char * +_nl_expand_alias (name) + const char *name; +{ + static const char *locale_alias_path = LOCALE_ALIAS_PATH; + struct alias_map *retval; + const char *result = NULL; + size_t added; + +#ifdef _LIBC + __libc_lock_lock (lock); +#endif + + do + { + struct alias_map item; + + item.alias = name; + + if (nmap > 0) + retval = (struct alias_map *) bsearch (&item, map, nmap, + sizeof (struct alias_map), + (int (*) PARAMS ((const void *, + const void *)) + ) alias_compare); + else + retval = NULL; + + /* We really found an alias. Return the value. */ + if (retval != NULL) + { + result = retval->value; + break; + } + + /* Perhaps we can find another alias file. */ + added = 0; + while (added == 0 && locale_alias_path[0] != '\0') + { + const char *start; + + while (locale_alias_path[0] == ';')/*FRANCO changed : to ; for win32*/ + ++locale_alias_path; + start = locale_alias_path; + + while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ';')/*FRANCO changed : to ; for win32*/ + ++locale_alias_path; + + if (start < locale_alias_path) + added = read_alias_file (start, locale_alias_path - start); + } + } + while (added != 0); + +#ifdef _LIBC + __libc_lock_unlock (lock); +#endif + + return result; +} + + +static size_t +internal_function +read_alias_file (fname, fname_len) + const char *fname; + int fname_len; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + FILE *fp; + char *full_fname; + size_t added; + static const char aliasfile[] = "/locale.alias"; + + full_fname = (char *) alloca (fname_len + sizeof aliasfile); + ADD_BLOCK (block_list, full_fname); +#ifdef HAVE_MEMPCPY + mempcpy (mempcpy (full_fname, fname, fname_len), + aliasfile, sizeof aliasfile); +#else + memcpy (full_fname, fname, fname_len); + memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); +#endif + + fp = fopen (full_fname, "r"); + if (fp == NULL) + { + FREE_BLOCKS (block_list); + return 0; + } + + added = 0; + while (!feof (fp)) + { + /* It is a reasonable approach to use a fix buffer here because + a) we are only interested in the first two fields + b) these fields must be usable as file names and so must not + be that long + */ + unsigned char buf[BUFSIZ]; + unsigned char *alias; + unsigned char *value; + unsigned char *cp; + + if (fgets (buf, sizeof buf, fp) == NULL) + /* EOF reached. */ + break; + + /* Possibly not the whole line fits into the buffer. Ignore + the rest of the line. */ + if (strchr (buf, '\n') == NULL) + { + char altbuf[BUFSIZ]; + do + if (fgets (altbuf, sizeof altbuf, fp) == NULL) + /* Make sure the inner loop will be left. The outer loop + will exit at the `feof' test. */ + break; + while (strchr (altbuf, '\n') == NULL); + } + + cp = buf; + /* Ignore leading white space. */ + while (isspace (cp[0])) + ++cp; + + /* A leading '#' signals a comment line. */ + if (cp[0] != '\0' && cp[0] != '#') + { + alias = cp++; + while (cp[0] != '\0' && !isspace (cp[0])) + ++cp; + /* Terminate alias name. */ + if (cp[0] != '\0') + *cp++ = '\0'; + + /* Now look for the beginning of the value. */ + while (isspace (cp[0])) + ++cp; + + if (cp[0] != '\0') + { + size_t alias_len; + size_t value_len; + + value = cp++; + while (cp[0] != '\0' && !isspace (cp[0])) + ++cp; + /* Terminate value. */ + if (cp[0] == '\n') + { + /* This has to be done to make the following test + for the end of line possible. We are looking for + the terminating '\n' which do not overwrite here. */ + *cp++ = '\0'; + *cp = '\n'; + } + else if (cp[0] != '\0') + *cp++ = '\0'; + + if (nmap >= maxmap) + extend_alias_table (); + + alias_len = strlen (alias) + 1; + value_len = strlen (value) + 1; + + if (string_space_act + alias_len + value_len > string_space_max) + { + /* Increase size of memory pool. */ + size_t new_size = (string_space_max + + (alias_len + value_len > 1024 + ? alias_len + value_len : 1024)); + char *new_pool = (char *) realloc (string_space, new_size); + if (new_pool == NULL) + { + FREE_BLOCKS (block_list); + return added; + } + string_space = new_pool; + string_space_max = new_size; + } + + map[nmap].alias = memcpy (&string_space[string_space_act], + alias, alias_len); + string_space_act += alias_len; + + map[nmap].value = memcpy (&string_space[string_space_act], + value, value_len); + string_space_act += value_len; + + ++nmap; + ++added; + } + } + } + + /* Should we test for ferror()? I think we have to silently ignore + errors. --drepper */ + fclose (fp); + + if (added > 0) + qsort (map, nmap, sizeof (struct alias_map), + (int (*) PARAMS ((const void *, const void *))) alias_compare); + + FREE_BLOCKS (block_list); + return added; +} + + +static void +extend_alias_table () +{ + size_t new_size; + struct alias_map *new_map; + + new_size = maxmap == 0 ? 100 : 2 * maxmap; + new_map = (struct alias_map *) realloc (map, (new_size + * sizeof (struct alias_map))); + if (new_map == NULL) + /* Simply don't extend: we don't have any more core. */ + return; + + map = new_map; + maxmap = new_size; +} + + +#ifdef _LIBC +static void __attribute__ ((unused)) +free_mem (void) +{ + if (string_space != NULL) + free (string_space); + if (map != NULL) + free (map); +} +text_set_element (__libc_subfreeres, free_mem); +#endif + + +static int +alias_compare (map1, map2) + const struct alias_map *map1; + const struct alias_map *map2; +{ +#if defined _LIBC || defined HAVE_STRCASECMP + return strcasecmp (map1->alias, map2->alias); +#else + const unsigned char *p1 = (const unsigned char *) map1->alias; + const unsigned char *p2 = (const unsigned char *) map2->alias; + unsigned char c1, c2; + + if (p1 == p2) + return 0; + + do + { + /* I know this seems to be odd but the tolower() function in + some systems libc cannot handle nonalpha characters. */ + c1 = isupper (*p1) ? tolower (*p1) : *p1; + c2 = isupper (*p2) ? tolower (*p2) : *p2; + if (c1 == '\0') + break; + ++p1; + ++p2; + } + while (c1 == c2); + + return c1 - c2; +#endif +} diff --git a/win32/intl/textdomain.c b/win32/intl/textdomain.c new file mode 100644 index 00000000..8ec2fd85 --- /dev/null +++ b/win32/intl/textdomain.c @@ -0,0 +1,106 @@ +/* Implementation of the textdomain(3) function. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. */ + +#include "intlconfig.h" + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Name of the default text domain. */ +extern const char _nl_default_default_domain[]; + +/* Default text domain in which entries for gettext(3) are to be found. */ +extern const char *_nl_current_default_domain; + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define TEXTDOMAIN __textdomain +# ifndef strdup +# define strdup(str) __strdup (str) +# endif +#else +# define TEXTDOMAIN textdomain__ +#endif + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +char * +TEXTDOMAIN (domainname) + const char *domainname; +{ + char *old; + + /* A NULL pointer requests the current setting. */ + if (domainname == NULL) + return (char *) _nl_current_default_domain; + + old = (char *) _nl_current_default_domain; + + /* If domain name is the null string set to default domain "messages". */ + if (domainname[0] == '\0' + || strcmp (domainname, _nl_default_default_domain) == 0) + _nl_current_default_domain = _nl_default_default_domain; + else + { + /* If the following malloc fails `_nl_current_default_domain' + will be NULL. This value will be returned and so signals we + are out of core. */ +#if defined _LIBC || defined HAVE_STRDUP + _nl_current_default_domain = strdup (domainname); +#else + size_t len = strlen (domainname) + 1; + char *cp = (char *) malloc (len); + if (cp != NULL) + memcpy (cp, domainname, len); + _nl_current_default_domain = cp; +#endif + } + + if (old != _nl_default_default_domain) + free (old); + + return (char *) _nl_current_default_domain; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__textdomain, textdomain); +#endif diff --git a/win32/pcsx.dev b/win32/pcsx.dev new file mode 100644 index 00000000..58505a40 --- /dev/null +++ b/win32/pcsx.dev @@ -0,0 +1,1189 @@ +[Project] +FileName=pcsx.dev +Name=pcsx +Ver=1 +IsCpp=1 +Type=0 +Compiler=-D__GNUWIN32__ -march=pentiumpro -D_M_IX86=600 -W -finline-functions -fomit-frame-pointer -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D__WIN32__ -DPCSX_VERSION=\"1.5\" -D__i386__ -DENABLE_NLS -DPACKAGE=\"pcsx\" -Dinline=__inline___@@_ +CppCompiler=-D__GNUWIN32__ -march=pentiumpro -D_M_IX86=600 -W -finline-functions -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D__WIN32__ -D_MSC_VER_ -DPCSX_VERSION=\"1.5\" -D__i386__ -DENABLE_NLS -DPACKAGE=\"pcsx\"_@@_ +Includes=.;./zlib;../libpcsxcore;./glue;./gui;./intl +Linker=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lcomctl32 -lwsock32_@@_ +Libs= +UnitCount=114 +Folders=glue,glue/sys,gui,intl,libpcsxcore,libpcsxcore/ix86,zlib +ObjFiles= +PrivateResource=pcsx_private.rc +ResourceIncludes= +MakeIncludes= +Icon= +ExeOutput= +ObjectOutput= +OverrideOutput=0 +OverrideOutputName=pcsx.exe +HostApplication= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0010000001001000000100 + +[Unit1] +FileName=..\libpcsxcore\ix86\iGte.h +Folder=libpcsxcore/ix86 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=..\libpcsxcore\ix86\iR3000A.c +Folder=libpcsxcore/ix86 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=..\libpcsxcore\ix86\ix86.c +Folder=libpcsxcore/ix86 +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=..\libpcsxcore\ix86\ix86.h +Folder=libpcsxcore/ix86 +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=..\libpcsxcore\cdrom.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=..\libpcsxcore\cdrom.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=..\libpcsxcore\coff.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit8] +FileName=..\libpcsxcore\debug.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit9] +FileName=..\libpcsxcore\decode_xa.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=..\libpcsxcore\decode_xa.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit11] +FileName=..\libpcsxcore\disr3000a.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit12] +FileName=..\libpcsxcore\gte.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit13] +FileName=..\libpcsxcore\gte.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit14] +FileName=..\libpcsxcore\mdec.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit15] +FileName=..\libpcsxcore\mdec.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit16] +FileName=..\libpcsxcore\misc.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit17] +FileName=..\libpcsxcore\misc.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit18] +FileName=..\libpcsxcore\plugins.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit19] +FileName=..\libpcsxcore\plugins.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit20] +FileName=..\libpcsxcore\psemu_plugin_defs.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit21] +FileName=..\libpcsxcore\psxbios.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit22] +FileName=..\libpcsxcore\psxbios.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit23] +FileName=..\libpcsxcore\psxcommon.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit24] +FileName=..\libpcsxcore\psxcounters.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit25] +FileName=..\libpcsxcore\psxcounters.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit26] +FileName=..\libpcsxcore\psxdma.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit27] +FileName=..\libpcsxcore\psxdma.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit28] +FileName=..\libpcsxcore\psxhle.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit29] +FileName=..\libpcsxcore\psxhle.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit30] +FileName=..\libpcsxcore\psxhw.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit31] +FileName=..\libpcsxcore\psxhw.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit32] +FileName=..\libpcsxcore\psxinterpreter.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit33] +FileName=..\libpcsxcore\psxmem.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit34] +FileName=..\libpcsxcore\psxmem.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit35] +FileName=..\libpcsxcore\r3000a.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit36] +FileName=..\libpcsxcore\r3000a.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit37] +FileName=..\libpcsxcore\sio.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit38] +FileName=..\libpcsxcore\sio.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit39] +FileName=..\libpcsxcore\spu.c +Folder=libpcsxcore +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit40] +FileName=..\libpcsxcore\spu.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit41] +FileName=..\libpcsxcore\system.h +Folder=libpcsxcore +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit42] +FileName=gui\about.bmp +Folder=gui +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit43] +FileName=gui\AboutDlg.c +Folder=gui +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit44] +FileName=gui\AboutDlg.h +Folder=gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit45] +FileName=gui\cdrom02.ico +Folder=gui +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit46] +FileName=gui\ConfigurePlugins.c +Folder=gui +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit47] +FileName=gui\NoPic.h +Folder=gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit48] +FileName=gui\pcsx.bmp +Folder=gui +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit49] +FileName=gui\pcsx.exe.manifest +Folder=gui +Compile=0 +CompileCpp=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit51] +FileName=gui\plugin.h +Folder=gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit52] +FileName=gui\Win32.h +Folder=gui +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit53] +FileName=gui\WndMain.c +Folder=gui +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit54] +FileName=zlib\adler32.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit55] +FileName=zlib\compress.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit56] +FileName=zlib\crc32.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit57] +FileName=zlib\deflate.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit58] +FileName=zlib\deflate.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit59] +FileName=zlib\gzio.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit60] +FileName=zlib\infblock.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit61] +FileName=zlib\infblock.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit62] +FileName=zlib\infcodes.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit63] +FileName=zlib\infcodes.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit64] +FileName=zlib\inffast.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit65] +FileName=zlib\inffast.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit66] +FileName=zlib\inffixed.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit67] +FileName=zlib\inflate.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit68] +FileName=zlib\inftrees.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit69] +FileName=zlib\inftrees.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit70] +FileName=zlib\infutil.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit71] +FileName=zlib\infutil.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit72] +FileName=zlib\trees.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit73] +FileName=zlib\trees.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit74] +FileName=zlib\uncompr.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit75] +FileName=zlib\zconf.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit76] +FileName=zlib\zlib.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit77] +FileName=zlib\zutil.c +Folder=zlib +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit78] +FileName=zlib\zutil.h +Folder=zlib +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit79] +FileName=glue\sys\mman.h +Folder=glue/sys +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit80] +FileName=glue\stdint.h +Folder=glue +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit81] +FileName=intl\bindtextdom.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit82] +FileName=intl\intlconfig.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit83] +FileName=intl\dcgettext.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit84] +FileName=intl\dgettext.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit85] +FileName=intl\explodename.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit86] +FileName=intl\finddomain.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit87] +FileName=intl\gettext.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit88] +FileName=intl\gettext.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit89] +FileName=intl\gettextP.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit90] +FileName=intl\l10nflist.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit91] +FileName=intl\libgettext.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit92] +FileName=intl\libintl.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit93] +FileName=intl\loadinfo.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit94] +FileName=intl\loadmsgcat.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit95] +FileName=intl\localealias.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit96] +FileName=intl\textdomain.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit97] +FileName=config.h +Folder= +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit98] +FileName=intl\intl-compat.c +Folder=intl +Compile=1 +CompileCpp=0 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c intl-compat.c -o intl-compat.o $(CFLAGS) + +[Unit99] +FileName=intl\hash-string.h +Folder=intl +Compile=1 +CompileCpp=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=0.1 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename=pcsx.exe +ProductName=pcsx +ProductVersion=0.1 +AutoIncBuildNr=0 + +[Unit50] +FileName=gui\plugin.c +CompileCpp=0 +Folder=gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit102] +FileName=..\libpcsxcore\cdriso.h +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= +CompileCpp=1 + +[Unit101] +FileName=pcsx.rc +CompileCpp=1 +Folder=pcsx +Compile=1 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit100] +FileName=resource.h +CompileCpp=1 +Folder=pcsx +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit103] +FileName=..\libpcsxcore\cdriso.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c cdriso.c -o cdriso.o $(CFLAGS) + +[Unit104] +FileName=..\libpcsxcore\cheat.h +CompileCpp=1 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit105] +FileName=..\libpcsxcore\cheat.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c cheat.c -o cheat.o $(CFLAGS) + +[Unit106] +FileName=gui\CheatDlg.c +CompileCpp=0 +Folder=gui +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c CheatDlg.c -o CheatDlg.o $(CFLAGS) + +[Unit107] +FileName=..\libpcsxcore\socket.h +CompileCpp=1 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit108] +FileName=..\libpcsxcore\debug.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c debug.c -o debug.o $(CFLAGS) + +[Unit109] +FileName=..\libpcsxcore\socket.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c socket.c -o socket.o $(CFLAGS) + +[Unit110] +FileName=..\libpcsxcore\ppf.h +CompileCpp=1 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit111] +FileName=..\libpcsxcore\ppf.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c ppf.c -o ppf.o $(CFLAGS) + +[Unit112] +FileName=..\libpcsxcore\psxcommon.c +CompileCpp=0 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd=$(CC) -c psxcommon.c -o psxcommon.o $(CFLAGS) + +[Unit113] +FileName=..\libpcsxcore\gte_divider.h +CompileCpp=1 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit114] +FileName=..\libpcsxcore\sjisfont.h +CompileCpp=1 +Folder=libpcsxcore +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/win32/pcsx.dsp b/win32/pcsx.dsp new file mode 100644 index 00000000..c9d730db --- /dev/null +++ b/win32/pcsx.dsp @@ -0,0 +1,575 @@ +# Microsoft Developer Studio Project File - Name="pcsx" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=PCSX - WIN32 RELEASE +!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 "pcsx.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 "pcsx.mak" CFG="PCSX - WIN32 RELEASE" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "pcsx - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "pcsx - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "pcsx - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /G6 /Zp16 /MT /W3 /GX /O2 /Op /Ob2 /I "../" /I "./zlib" /I "../libpcsxcore" /I "./glue" /I "./" /I "./gui" /I "./intl" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "__WIN32__" /D "_MSC_VER_" /D PCSX_VERSION=\"1.5\" /D "__i386__" /D "ENABLE_NLS" /D PACKAGE=\"pcsx\" /D inline=__forceinline /FR /FD /Zm200 /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x408 /d "NDEBUG" +# ADD RSC /l 0x408 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib wsock32.lib /nologo /subsystem:windows /pdb:none /machine:I386 + +!ELSEIF "$(CFG)" == "pcsx - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D PCSX_VERSION=\"1.3\" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "../" /I "./zlib" /I "../libpcsxcore" /I "./glue" /I "./" /I "./gui" /I "./intl" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "__WIN32__" /D "__i386__" /D PCSX_VERSION=\"1.5\" /D "ENABLE_NLS" /D PACKAGE=\"pcsx\" /D inline= /FR /FD /GZ /Zm200 /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x408 /d "_DEBUG" +# ADD RSC /l 0x408 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "pcsx - Win32 Release" +# Name "pcsx - Win32 Debug" +# Begin Group "libpcsxcore" + +# PROP Default_Filter "" +# Begin Group "ix86" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\libpcsxcore\ix86\iGte.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\ix86\iR3000A.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\ix86\ix86.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\ix86\ix86.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\libpcsxcore\cdriso.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\cdriso.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\cdrom.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\cdrom.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\cheat.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\cheat.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\coff.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\debug.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\debug.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\decode_xa.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\decode_xa.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\disr3000a.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\gte.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\gte.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\gte_divider.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\mdec.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\mdec.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\misc.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\misc.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\plugins.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\plugins.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\ppf.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\ppf.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psemu_plugin_defs.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxbios.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxbios.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxcommon.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxcommon.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxcounters.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxcounters.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxdma.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxdma.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxhle.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxhle.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxhw.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxhw.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxinterpreter.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxmem.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\psxmem.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\r3000a.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\r3000a.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\sio.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\sio.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\sjisfont.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\socket.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\socket.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\spu.c +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\spu.h +# End Source File +# Begin Source File + +SOURCE=..\libpcsxcore\system.h +# End Source File +# End Group +# Begin Group "gui" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\gui\about.bmp +# End Source File +# Begin Source File + +SOURCE=.\gui\AboutDlg.c +# End Source File +# Begin Source File + +SOURCE=.\gui\AboutDlg.h +# End Source File +# Begin Source File + +SOURCE=.\gui\cdrom02.ico +# End Source File +# Begin Source File + +SOURCE=.\gui\CheatDlg.c +# End Source File +# Begin Source File + +SOURCE=.\gui\ConfigurePlugins.c +# End Source File +# Begin Source File + +SOURCE=.\gui\NoPic.h +# End Source File +# Begin Source File + +SOURCE=.\gui\pcsx.bmp +# End Source File +# Begin Source File + +SOURCE=.\gui\pcsx.exe.manifest +# End Source File +# Begin Source File + +SOURCE=.\gui\plugin.c +# End Source File +# Begin Source File + +SOURCE=.\gui\plugin.h +# End Source File +# Begin Source File + +SOURCE=.\gui\Win32.h +# End Source File +# Begin Source File + +SOURCE=.\gui\WndMain.c +# End Source File +# End Group +# Begin Group "zlib" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\zlib\adler32.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\compress.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\crc32.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\deflate.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\deflate.h +# End Source File +# Begin Source File + +SOURCE=.\zlib\gzio.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\infblock.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\infblock.h +# End Source File +# Begin Source File + +SOURCE=.\zlib\infcodes.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\infcodes.h +# End Source File +# Begin Source File + +SOURCE=.\zlib\inffast.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\inffast.h +# End Source File +# Begin Source File + +SOURCE=.\zlib\inffixed.h +# End Source File +# Begin Source File + +SOURCE=.\zlib\inflate.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\inftrees.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\inftrees.h +# End Source File +# Begin Source File + +SOURCE=.\zlib\infutil.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\infutil.h +# End Source File +# Begin Source File + +SOURCE=.\zlib\trees.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\trees.h +# End Source File +# Begin Source File + +SOURCE=.\zlib\uncompr.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\zconf.h +# End Source File +# Begin Source File + +SOURCE=.\zlib\zlib.h +# End Source File +# Begin Source File + +SOURCE=.\zlib\zutil.c +# End Source File +# Begin Source File + +SOURCE=.\zlib\zutil.h +# End Source File +# End Group +# Begin Group "glue" + +# PROP Default_Filter "" +# Begin Group "sys" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\glue\sys\mman.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\glue\stdint.h +# End Source File +# End Group +# Begin Group "intl" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\intl\bindtextdom.c +# End Source File +# Begin Source File + +SOURCE=.\intl\dcgettext.c +# End Source File +# Begin Source File + +SOURCE=.\intl\dgettext.c +# End Source File +# Begin Source File + +SOURCE=.\intl\explodename.c +# End Source File +# Begin Source File + +SOURCE=.\intl\finddomain.c +# End Source File +# Begin Source File + +SOURCE=.\intl\gettext.c +# End Source File +# Begin Source File + +SOURCE=.\intl\gettext.h +# End Source File +# Begin Source File + +SOURCE=.\intl\gettextP.h +# End Source File +# Begin Source File + +SOURCE=".\intl\hash-string.h" +# End Source File +# Begin Source File + +SOURCE=".\intl\intl-compat.c" +# End Source File +# Begin Source File + +SOURCE=.\intl\intlconfig.h +# End Source File +# Begin Source File + +SOURCE=.\intl\l10nflist.c +# End Source File +# Begin Source File + +SOURCE=.\intl\libgettext.h +# End Source File +# Begin Source File + +SOURCE=.\intl\libintl.h +# End Source File +# Begin Source File + +SOURCE=.\intl\loadinfo.h +# End Source File +# Begin Source File + +SOURCE=.\intl\loadmsgcat.c +# End Source File +# Begin Source File + +SOURCE=.\intl\localealias.c +# End Source File +# Begin Source File + +SOURCE=.\intl\textdomain.c +# End Source File +# End Group +# Begin Source File + +SOURCE=.\config.h +# End Source File +# Begin Source File + +SOURCE=.\pcsx.rc +# End Source File +# Begin Source File + +SOURCE=.\resource.h +# End Source File +# End Target +# End Project diff --git a/win32/pcsx.rc b/win32/pcsx.rc new file mode 100644 index 00000000..2b07248f --- /dev/null +++ b/win32/pcsx.rc @@ -0,0 +1,440 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080404b0" + BEGIN + VALUE "CompanyName", "http://pcsxr.codeplex.com/\0" + VALUE "FileDescription", "Playstation Emulator based on PCSX-df\0" + VALUE "FileVersion", "1, 9, 1, 1\0" + VALUE "InternalName", "pcsx\0" + VALUE "LegalCopyright", "Copyright (c) 2010\0" + VALUE "OriginalFilename", "pcsx.exe\0" + VALUE "ProductName", "PCSX-Reloaded\0" + VALUE "ProductVersion", "1, 9, 1, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x804, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_MCDCONF DIALOG DISCARDABLE 0, 0, 407, 197 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Memcard Manager" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,285,175,50,14 + PUSHBUTTON "Cancel",IDCANCEL,345,175,50,14 + EDITTEXT IDC_MCD1,10,155,160,14,ES_AUTOHSCROLL + EDITTEXT IDC_MCD2,235,155,160,14,ES_AUTOHSCROLL + PUSHBUTTON "Select Mcd",IDC_MCDSEL1,10,135,50,14 + PUSHBUTTON "Select Mcd",IDC_MCDSEL2,235,135,50,14 + GROUPBOX "Memory Card 2",IDC_FRAMEMCD2,230,5,170,125 + PUSHBUTTON "Format Mcd",IDC_FORMAT1,65,135,50,14 + GROUPBOX "Memory Card 1",IDC_FRAMEMCD1,5,5,170,125 + PUSHBUTTON "Format Mcd",IDC_FORMAT2,290,135,50,14 + CONTROL "List3",IDC_LIST1,"SysListView32",LVS_REPORT | + LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,10,15,160,110 + CONTROL "List3",IDC_LIST2,"SysListView32",LVS_REPORT | + LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,235,15,160,110 + PUSHBUTTON "Reload Mcd",IDC_RELOAD1,120,135,50,14 + PUSHBUTTON "Reload Mcd",IDC_RELOAD2,345,135,50,14 + PUSHBUTTON "-> Copy ->",IDC_COPYTO2,180,30,45,14 + PUSHBUTTON "<- Copy <-",IDC_COPYTO1,180,50,45,14 + PUSHBUTTON "Paste",IDC_PASTE,180,70,45,14 + PUSHBUTTON "<- Un/Delete",IDC_DELETE1,180,90,45,14 + PUSHBUTTON "Un/Delete ->",IDC_DELETE2,180,110,45,14 +END + +ABOUT_DIALOG DIALOGEX 0, 0, 332, 209 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,134,187,50,14 + CTEXT "PCSX EMU\nVersion x.x",IDC_PCSX_ABOUT_TEXT,22,10,112,15, + 0,WS_EX_TRANSPARENT + CTEXT "PCSX a psx emulator...",IDC_PCSX_ABOUT_AUTHORS,10,35, + 135,63,0,WS_EX_TRANSPARENT + CTEXT "Greets to...",IDC_PCSX_ABOUT_GREETS,45,110,232,65 + CONTROL 113,IDC_STATIC,"Static",SS_BITMAP | WS_BORDER,155,10,171, + 101 + GROUPBOX "",IDC_STATIC,5,25,145,77 + GROUPBOX "",IDC_STATIC,43,100,234,79 +END + +IDD_CPUCONF DIALOG DISCARDABLE 0, 0, 232, 175 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Cpu Config" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,50,155,50,14 + PUSHBUTTON "Cancel",IDCANCEL,120,155,50,14 + CONTROL "Disable Xa Decoding",IDC_XA,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,10,15,91,10 + CONTROL "Sio Irq Always Enabled",IDC_SIO,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,10,30,92,10 + CONTROL "Black && White Movies",IDC_MDEC,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,10,60,100,10 + CONTROL "Autodetect",IDC_PSXAUTO,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,10,126,83,10 + GROUPBOX "Misc Options",IDC_MISCOPT,5,5,220,100 + COMBOBOX IDC_PSXTYPES,105,126,53,50,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP + GROUPBOX "Select Psx System Type",IDC_SELPSX,5,110,220,35 + CONTROL "Disable Cd Audio",IDC_CDDA,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,112,15,113,10 + CONTROL "Enable Console Output",IDC_PSXOUT,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,112,30,113,10 + CONTROL "Enable Interpreter Cpu",IDC_CPU,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,112,45,113,10 + CONTROL "Spu Irq Always Enabled",IDC_SPUIRQ,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,10,45,91,10 + CONTROL "Parasite Eve 2, Vandal Hearts 1/2 Fix",IDC_RCNTFIX, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,75,205,10 + CONTROL "InuYasha Sengoku Battle Fix",IDC_VSYNCWA,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,10,90,205,10 + CONTROL "Enable Debugger",IDC_DEBUG,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,112,60,76,10 +END + +IDD_NETPLAY DIALOG DISCARDABLE 0, 0, 165, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "NetPlay Configuration" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,55,75,50,14 + PUSHBUTTON "Cancel",IDCANCEL,110,75,50,14 + COMBOBOX IDC_LISTNET,10,15,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGNET,10,35,45,12 + PUSHBUTTON "Test...",IDC_TESTNET,60,35,45,12 + PUSHBUTTON "About...",IDC_ABOUTNET,110,35,45,12 + RTEXT "NetPlay",IDC_NETPLAY,50,5,41,10,SS_CENTERIMAGE + CTEXT "Note: The NetPlay Plugin Directory should be the same as the other Plugins.", + IDC_NETPLAYNOTE,10,50,145,19 +END + +IDD_CONNECT DIALOG DISCARDABLE 0, 0, 112, 31 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Connecting..." +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Please wait while connecting... /",IDC_CONNECTSTR,5,10, + 104,8 +END + +IDD_CONFIG DIALOGEX 0, 0, 322, 161 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configuration" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + COMBOBOX IDC_LISTGPU,10,10,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGGPU,10,30,45,12 + PUSHBUTTON "Test...",IDC_TESTGPU,60,30,45,12 + PUSHBUTTON "About...",IDC_ABOUTGPU,110,30,45,12 + COMBOBOX IDC_LISTSPU,165,10,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGSPU,165,30,45,12 + PUSHBUTTON "Test...",IDC_TESTSPU,215,30,45,12 + PUSHBUTTON "About...",IDC_ABOUTSPU,265,30,43,12 + COMBOBOX IDC_LISTCDR,10,100,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGCDR,10,120,43,12 + PUSHBUTTON "Test...",IDC_TESTCDR,60,120,45,12 + PUSHBUTTON "About...",IDC_ABOUTCDR,110,120,45,12 + COMBOBOX IDC_LISTBIOS,165,100,145,74,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + DEFPUSHBUTTON "OK",IDOK,205,140,50,14 + PUSHBUTTON "Cancel",IDCANCEL,260,140,50,14 + CTEXT "Graphics",IDC_GRAPHICS,10,0,145,10,SS_CENTERIMAGE + CTEXT "Sound",IDC_SOUND,165,0,144,10,SS_CENTERIMAGE + CTEXT "Cdrom",IDC_CDROM,10,90,144,10,SS_CENTERIMAGE + CTEXT "Bios",IDC_BIOS,166,90,146,10,SS_CENTERIMAGE + COMBOBOX IDC_LISTPAD1,10,55,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGPAD1,10,75,45,12 + PUSHBUTTON "Test...",IDC_TESTPAD1,60,75,45,12 + PUSHBUTTON "About...",IDC_ABOUTPAD1,110,75,45,12 + CTEXT "Second Controller",IDC_SECONDCONTROLLER,164,45,144,10, + SS_CENTERIMAGE + COMBOBOX IDC_LISTPAD2,165,55,145,74,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + PUSHBUTTON "Configure...",IDC_CONFIGPAD2,165,75,45,12 + PUSHBUTTON "Test...",IDC_TESTPAD2,215,75,45,12 + PUSHBUTTON "About...",IDC_ABOUTPAD2,265,75,45,12 + CTEXT "First Controller",IDC_FIRSTCONTROLLER,11,45,138,10, + SS_CENTERIMAGE + PUSHBUTTON "Set Bios Directory",IDC_BIOSDIR,90,140,65,14 + PUSHBUTTON "Set Plugins Directory",IDC_PLUGINSDIR,10,140,75,14 +END + +IDD_CHEATLIST DIALOGEX 0, 0, 392, 201 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Edit Cheat Codes" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + PUSHBUTTON "&Close",IDCANCEL,324,180,61,14 + CONTROL "List2",IDC_CODELIST,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | + LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,312,187 + PUSHBUTTON "&Enable/Disable",IDC_TOGGLECODE,324,7,61,14 + PUSHBUTTON "&Add Code",IDC_ADDCODE,324,32,61,14 + PUSHBUTTON "&Edit Code",IDC_EDITCODE,324,50,61,14 + PUSHBUTTON "&Remove Code",IDC_REMOVECODE,324,68,61,14 + PUSHBUTTON "&Load...",IDC_LOADCODE,324,96,61,14 + PUSHBUTTON "&Save As...",IDC_SAVECODE,324,114,61,14 +END + +IDD_CHEATSEARCH DIALOGEX 0, 0, 280, 214 +STYLE DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_CAPTION +CAPTION "Cheat Search" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + LTEXT "Search For:",IDC_LABEL_SEARCHFOR,7,9,51,8,0, + WS_EX_TRANSPARENT + COMBOBOX IDC_SEARCHFOR,60,7,80,224,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "Data Type:",IDC_LABEL_DATATYPE,7,26,51,8,0, + WS_EX_TRANSPARENT + COMBOBOX IDC_DATATYPE,60,24,80,224,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "Data Base:",IDC_LABEL_DATABASE,147,26,44,8,0, + WS_EX_TRANSPARENT + COMBOBOX IDC_DATABASE,194,24,81,224,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "Value:",IDC_LABEL_VALUE,7,43,50,8,0,WS_EX_TRANSPARENT + EDITTEXT IDC_VALUEFROM,60,41,80,12,ES_AUTOHSCROLL + RTEXT "To",IDC_LABEL_TO,144,43,45,8,0,WS_EX_TRANSPARENT + EDITTEXT IDC_VALUETO,194,41,80,12,ES_AUTOHSCROLL + LTEXT "Addresses Found : 0",IDC_LABEL_RESULTSFOUND,7,180,263,8, + 0,WS_EX_TRANSPARENT + LISTBOX IDC_RESLIST,6,62,199,112,LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Freeze",IDC_FREEZE,213,63,62,17,WS_DISABLED + PUSHBUTTON "&Modify",IDC_MODIFY,213,86,62,17,WS_DISABLED + PUSHBUTTON "&Copy",IDC_COPY,213,109,62,17,WS_DISABLED + DEFPUSHBUTTON "&Search",IDC_SEARCH,8,194,86,14 + PUSHBUTTON "&New Search",IDC_NEWSEARCH,98,194,86,14 + PUSHBUTTON "C&lose",IDCANCEL,188,194,86,14 + EDITTEXT 10000,0,1000,10,10,ES_AUTOHSCROLL | NOT WS_BORDER | NOT + WS_TABSTOP +END + +IDD_CHEATEDIT DIALOGEX 0, 0, 242, 161 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Edit Cheat Code" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,126,143,50,14 + PUSHBUTTON "Cancel",IDCANCEL,185,143,50,14 + LTEXT "Description:",IDC_LABEL_DESCR,7,6,39,8 + LTEXT "Cheat Code:",IDC_LABEL_CODE,6,40,42,8 + EDITTEXT IDC_DESCR,6,17,232,14,ES_AUTOHSCROLL + EDITTEXT IDC_CODE,6,52,231,84,ES_MULTILINE | ES_UPPERCASE | + ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN +END + +IDD_CHEATVALEDIT DIALOGEX 0, 0, 162, 57 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Enter New Value" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,25,40,50,14 + PUSHBUTTON "Cancel",IDCANCEL,87,40,50,14 + LTEXT "Address:",IDC_LABEL_ADDRESS,7,7,30,8 + LTEXT "Value:",IDC_LABEL_VALUE,8,24,30,8 + EDITTEXT IDC_ADDRESS,41,4,113,12,ES_AUTOHSCROLL | WS_DISABLED + EDITTEXT IDC_VALUE,41,22,113,12,ES_AUTOHSCROLL +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO MOVEABLE PURE +BEGIN + IDD_MCDCONF, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 400 + TOPMARGIN, 7 + BOTTOMMARGIN, 190 + END + + ABOUT_DIALOG, DIALOG + BEGIN + RIGHTMARGIN, 310 + BOTTOMMARGIN, 201 + END + + IDD_CPUCONF, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 225 + TOPMARGIN, 7 + BOTTOMMARGIN, 168 + END + + IDD_NETPLAY, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 158 + TOPMARGIN, 7 + BOTTOMMARGIN, 88 + END + + IDD_CONNECT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 105 + TOPMARGIN, 7 + BOTTOMMARGIN, 24 + END + + IDD_CONFIG, DIALOG + BEGIN + BOTTOMMARGIN, 147 + END + + IDD_CHEATLIST, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 385 + TOPMARGIN, 7 + BOTTOMMARGIN, 194 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON DISCARDABLE "gui\\cdrom02.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +SPLASH_LOGO BITMAP MOVEABLE PURE "gui\\about.bmp" +MAIN_LOGO BITMAP MOVEABLE PURE "gui\\pcsx.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// 24 +// + +1 24 MOVEABLE PURE "gui\\pcsx.exe.manifest" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Greek resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ELL) +#ifdef _WIN32 +LANGUAGE LANG_GREEK, SUBLANG_DEFAULT +#pragma code_page(1253) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE MOVEABLE PURE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE MOVEABLE PURE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE MOVEABLE PURE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Greek resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/win32/pcsx.sln b/win32/pcsx.sln new file mode 100644 index 00000000..22307457 --- /dev/null +++ b/win32/pcsx.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcsx", "pcsx.vcproj", "{9EEA62F5-46DC-4C07-AFE1-F72F9D6B9E3E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9EEA62F5-46DC-4C07-AFE1-F72F9D6B9E3E}.Debug|Win32.ActiveCfg = Debug|Win32 + {9EEA62F5-46DC-4C07-AFE1-F72F9D6B9E3E}.Debug|Win32.Build.0 = Debug|Win32 + {9EEA62F5-46DC-4C07-AFE1-F72F9D6B9E3E}.Release|Win32.ActiveCfg = Release|Win32 + {9EEA62F5-46DC-4C07-AFE1-F72F9D6B9E3E}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/pcsx.vcproj b/win32/pcsx.vcproj new file mode 100644 index 00000000..e0fc751e --- /dev/null +++ b/win32/pcsx.vcproj @@ -0,0 +1,1709 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/resource.h b/win32/resource.h new file mode 100644 index 00000000..7f3bc399 --- /dev/null +++ b/win32/resource.h @@ -0,0 +1,344 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by pcsx.rc +// +#define IDS_TITLE 1 +#define IDC_SEARCHFOR 100 +#define IDR_MENU1 101 +#define IDI_APP_ICON 102 +#define IDD_MCDCONF 102 +#define DEBUG_DIALOG 103 +#define IDC_VALUEFROM 103 +#define ABOUT_DIALOG 104 +#define IDC_LABEL_TO 104 +#define IDD_CPUCONF 105 +#define IDC_VALUETO 105 +#define IDC_DATATYPE 106 +#define IDC_DATABASE 107 +#define IDD_NETPLAY 108 +#define IDC_LABEL_RESULTSFOUND 108 +#define IDD_CONNECT 109 +#define IDC_RESLIST 109 +#define IDD_CHEATLIST 110 +#define IDC_SEARCH 110 +#define IDC_NEWSEARCH 111 +#define IDD_CHEATSEARCH 112 +#define SPLASH_LOGO 113 +#define IDC_MODIFY 113 +#define IDD_GPREGS 114 +#define IDC_FREEZE 114 +#define IDD_CHEATEDIT 114 +#define IDD_CP0REGS 115 +#define IDC_COPY 115 +#define IDD_CHEATVALEDIT 115 +#define IDD_COP2D 116 +#define IDD_COP2C 117 +#define MAIN_LOGO 118 +#define IDD_CONFIG 120 +#define IDD_MEMVIEW 136 +#define IDC_EDIT2 1001 +#define IDC_CODE 1001 +#define IDC_VALUE 1001 +#define IDC_MCD2 1004 +#define IDC_ASMCHECK1 1005 +#define IDC_MCD1 1005 +#define IDC_MCDSEL1 1006 +#define IDC_STEP 1007 +#define IDC_MCDSEL2 1007 +#define IDC_XA 1007 +#define IDC_SIO 1008 +#define IDC_SKIP 1009 +#define IDC_MDEC 1009 +#define IDC_RESET 1010 +#define IDC_PSXAUTO 1010 +#define IDC_GO 1011 +#define IDC_PSXTYPES 1011 +#define IDC_BREAK 1012 +#define IDC_DISCPUQKEYS 1012 +#define IDC_QKEYS 1012 +#define IDC_EDIT1 1013 +#define IDC_CDDA 1013 +#define IDC_DESCR 1013 +#define IDC_ADDRESS 1013 +#define IDC_CLOSE 1014 +#define IDC_PCSX_ABOUT_TEXT 1014 +#define IDC_PSXOUT 1014 +#define IDC_ASM_SCROLL 1015 +#define IDC_CPU 1015 +#define IDC_ASMCHECK2 1016 +#define IDC_SPUIRQ 1016 +#define IDC_ASMCHECK3 1017 +#define IDC_MDEC2 1017 +#define IDC_CDTIMING 1017 +#define IDC_ASMCHECK4 1018 +#define IDC_ASMCHECK5 1019 +#define IDC_RELOAD1 1019 +#define IDC_CP07 1020 +#define IDC_ASMCHECK6 1020 +#define IDC_RELOAD2 1020 +#define IDC_ASMCHECK7 1021 +#define IDC_COPYTO2 1021 +#define IDC_ASMCHECK8 1022 +#define IDC_COPYTO1 1022 +#define IDC_RCNTFIX 1022 +#define IDC_ASMCHECK9 1023 +#define IDC_PASTE 1023 +#define IDC_CONFIGNET 1023 +#define IDC_VSYNCWA 1023 +#define IDC_ASMCHECK10 1024 +#define IDC_DELETE1 1024 +#define IDC_TESTNET 1024 +#define IDC_ASMCHECK11 1025 +#define IDC_DELETE2 1025 +#define IDC_ABOUTNET 1025 +#define IDC_ASMCHECK12 1026 +#define IDC_LISTNET 1026 +#define IDC_LIST1 1027 +#define IDC_ASMCHECK13 1027 +#define IDC_SYSCMCDS 1027 +#define IDC_ASMCHECK14 1028 +#define IDC_LIST2 1028 +#define IDC_CONNECTSTR 1028 +#define IDC_ASMCHECK15 1029 +#define IDC_PCSX_ABOUT_AUTHORS 1029 +#define IDC_ASMCHECK16 1030 +#define IDC_PCSX_ABOUT_GREETS 1030 +#define IDC_ASMCHECK17 1031 +#define IDC_SELPSX 1031 +#define IDC_ASMCHECK18 1032 +#define IDC_MISCOPT 1032 +#define IDC_ASMCHECK19 1033 +#define IDC_GRAPHICS 1033 +#define IDC_CP021 1034 +#define IDC_ASMCHECK20 1034 +#define IDC_FIRSTCONTROLLER 1034 +#define IDC_CP022 1035 +#define IDC_ASMCHECK21 1035 +#define IDC_SECONDCONTROLLER 1035 +#define IDC_CP023 1036 +#define IDC_ASMCHECK22 1036 +#define IDC_SOUND 1036 +#define IDC_CP024 1037 +#define IDC_ASMCHECK23 1037 +#define IDC_CDROM 1037 +#define IDC_CP025 1038 +#define IDC_ASMCHECK24 1038 +#define IDC_BIOS 1038 +#define IDC_NETPLAY 1039 +#define IDC_NETPLAYNOTE 1040 +#define IDC_FRAMEMCD1 1041 +#define IDC_FRAMEMCD2 1042 +#define IDC_CP031 1044 +#define IDC_CODELIST 1044 +#define IDC_REMOVECODE 1045 +#define IDC_EDITCODE 1046 +#define IDC_GPR0 1047 +#define IDC_TOGGLECODE 1047 +#define IDC_GPR1 1048 +#define IDC_SAVECODE 1048 +#define IDC_GPR2 1049 +#define IDC_LOADCODE 1049 +#define IDC_GPR3 1050 +#define IDC_LABEL_DESCR 1050 +#define IDC_GPR4 1051 +#define IDC_LABEL_CODE 1051 +#define IDC_GPR5 1052 +#define IDC_LISTGPU 1052 +#define IDC_LABEL_ADDRESS 1052 +#define IDC_GPR6 1053 +#define IDC_LISTSPU 1053 +#define IDC_DEBUG 1053 +#define IDC_GPR7 1054 +#define IDC_LISTCDR 1054 +#define IDC_GPR8 1055 +#define IDC_LISTBIOS 1055 +#define IDC_GPR9 1056 +#define IDC_CONFIGGPU 1056 +#define IDC_GPR10 1057 +#define IDC_TESTGPU 1057 +#define IDC_ABOUTGPU 1058 +#define IDC_CONFIGSPU 1059 +#define IDC_TESTSPU 1060 +#define IDC_ABOUTSPU 1061 +#define IDC_CONFIGCDR 1062 +#define IDC_GPR11 1063 +#define IDC_TESTCDR 1063 +#define IDC_ABOUTCDR 1064 +#define IDC_COMBODRIVE 1065 +#define IDC_LISTPAD1 1066 +#define IDC_CONFIGPAD1 1067 +#define IDC_GPR12 1068 +#define IDC_TESTPAD1 1068 +#define IDC_GPR13 1069 +#define IDC_ABOUTPAD1 1069 +#define IDC_GPR14 1070 +#define IDC_LISTPAD2 1070 +#define IDC_GPR15 1071 +#define IDC_CONFIGPAD2 1071 +#define IDC_GPR16 1072 +#define IDC_TESTPAD2 1072 +#define IDC_GPR17 1073 +#define IDC_ABOUTPAD2 1073 +#define IDC_GPR18 1074 +#define IDC_GPR19 1075 +#define IDC_GPR20 1076 +#define IDC_GPR21 1077 +#define IDC_GPR22 1078 +#define IDC_GPR23 1079 +#define IDC_GPR24 1080 +#define IDC_GPR25 1081 +#define IDC_GPR26 1082 +#define IDC_GPR27 1083 +#define IDC_GPR28 1084 +#define IDC_GPR29 1085 +#define IDC_GPR30 1086 +#define IDC_GPR31 1087 +#define IDC_GPR_PC 1089 +#define IDC_GPR_HI 1091 +#define IDC_GPR_LO 1092 +#define IDC_CP00 1093 +#define IDC_CP01 1094 +#define IDC_CP02 1095 +#define IDC_CP03 1096 +#define IDC_CP04 1097 +#define IDC_CP05 1098 +#define IDC_CP06 1099 +#define IDC_CP08 1100 +#define IDC_CP09 1101 +#define IDC_CP010 1102 +#define IDC_CP011 1103 +#define IDC_CP012 1104 +#define IDC_CP013 1105 +#define IDC_CP014 1106 +#define IDC_CP015 1107 +#define IDC_CP016 1108 +#define IDC_CP017 1109 +#define IDC_CP018 1110 +#define IDC_CP019 1111 +#define IDC_CP020 1112 +#define IDC_CP026 1113 +#define IDC_CP027 1114 +#define IDC_CP028 1115 +#define IDC_CP029 1116 +#define IDC_CP030 1117 +#define IDC_COP2D0 1118 +#define IDC_COP2D1 1119 +#define IDC_COP2D2 1120 +#define IDC_COP2D3 1121 +#define IDC_COP2D4 1122 +#define IDC_COP2D5 1123 +#define IDC_COP2D6 1124 +#define IDC_COP2D7 1125 +#define IDC_COP2D8 1126 +#define IDC_COP2D9 1127 +#define IDC_COP2D10 1128 +#define IDC_COP2D11 1129 +#define IDC_COP2D12 1130 +#define IDC_COP2D13 1131 +#define IDC_COP2D14 1132 +#define IDC_COP2D15 1133 +#define IDC_COP2D16 1134 +#define IDC_COP2D17 1135 +#define IDC_COP2D18 1136 +#define IDC_COP2D19 1137 +#define IDC_COP2D20 1138 +#define IDC_COP2D21 1139 +#define IDC_COP2D22 1140 +#define IDC_COP2D23 1141 +#define IDC_COP2D24 1142 +#define IDC_COP2D25 1143 +#define IDC_COP2D26 1144 +#define IDC_COP2D27 1145 +#define IDC_COP2D28 1146 +#define IDC_COP2D29 1147 +#define IDC_COP2D30 1148 +#define IDC_COP2D31 1149 +#define IDC_COP2C0 1152 +#define IDC_COP2C1 1153 +#define IDC_COP2C2 1154 +#define IDC_COP2C3 1155 +#define IDC_COP2C4 1156 +#define IDC_COP2C5 1157 +#define IDC_COP2C6 1158 +#define IDC_COP2C7 1159 +#define IDC_COP2C8 1160 +#define IDC_COP2C9 1161 +#define IDC_COP2C10 1162 +#define IDC_COP2C11 1163 +#define IDC_COP2C12 1164 +#define IDC_COP2C13 1165 +#define IDC_COP2C14 1166 +#define IDC_COP2C15 1167 +#define IDC_COP2C16 1168 +#define IDC_COP2C17 1169 +#define IDC_COP2C18 1170 +#define IDC_COP2C19 1171 +#define IDC_COP2C20 1172 +#define IDC_COP2C21 1173 +#define IDC_COP2C22 1174 +#define IDC_COP2C23 1175 +#define IDC_COP2C24 1176 +#define IDC_COP2C25 1177 +#define IDC_COP2C26 1178 +#define IDC_COP2C27 1179 +#define IDC_COP2C28 1180 +#define IDC_COP2C29 1181 +#define IDC_COP2C30 1182 +#define IDC_COP2C31 1183 +#define IDC_BUTTON1 1254 +#define IDC_BIOSDIR 1254 +#define IDC_FORMAT1 1254 +#define IDC_ADDCODE 1254 +#define IDC_PLUGINSDIR 1255 +#define IDC_FORMAT2 1255 +#define IDC_LABEL_DATATYPE 1260 +#define IDC_LABEL_SEARCHFOR 1261 +#define IDC_LABEL_VALUE 1262 +#define IDC_LABEL_DATABASE 1263 +#define ID_FILE_EXIT 40001 +#define ID_HELP_ABOUT 40002 +#define ID_FILE_RUN_CD 40003 +#define ID_FILE_RUN_EXE 40004 +#define ID_EMULATOR_PAUSE 40005 +#define ID_EMULATOR_RESET 40006 +#define ID_FILE_RUN_ISO 40007 +#define ID_DEBUG_ENABLE_DEBUGGER 40008 +#define ID_CONFIGURATION_GRAPHICS 40009 +#define ID_CONFIGURATION_SOUND 40010 +#define ID_CONFIGURATION_CDROM 40011 +#define ID_CONFIGURATION_MEMORYCARDMANAGER 40012 +#define ID_CONFIGURATION_CPU 40013 +#define ID_EMULATOR_RUN 40014 +#define ID_DEBUGREG 40015 +#define ID_DEBUG_MESSAGES 40015 +#define ID_CONFIGURATION_CONTROLLERS 40017 +#define ID_CONFIGURATION 40018 +#define ID_FILE_RUNBIOS 40026 +#define ID_FILE_STATES_LOAD_SLOT1 40031 +#define ID_FILE_STATES_LOAD_SLOT2 40032 +#define ID_FILE_STATES_LOAD_SLOT3 40033 +#define ID_FILE_STATES_LOAD_SLOT4 40034 +#define ID_FILE_STATES_LOAD_SLOT5 40035 +#define ID_FILE_STATES_LOAD_OTHER 40036 +#define ID_FILE_STATES_SAVE_SLOT1 40037 +#define ID_FILE_STATES_SAVE_SLOT2 40038 +#define ID_FILE_STATES_SAVE_SLOT3 40039 +#define ID_FILE_STATES_SAVE_SLOT4 40040 +#define ID_FILE_STATES_SAVE_SLOT5 40041 +#define ID_FILE_STATES_SAVE_OTHER 40042 +#define ID_CONFIGURATION_NETPLAY 40043 +#define ID_EMULATOR_SWITCH_ISO 40044 +#define ID_CONFIGURATION_CHEATLIST 40045 +#define ID_CONFIGURATION_CHEATSEARCH 40046 +#define ID_LANGS 50000 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 116 +#define _APS_NEXT_COMMAND_VALUE 40047 +#define _APS_NEXT_CONTROL_VALUE 1054 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/win32/zlib/adler32.c b/win32/zlib/adler32.c new file mode 100644 index 00000000..fae88b65 --- /dev/null +++ b/win32/zlib/adler32.c @@ -0,0 +1,48 @@ +/* adler32.c -- compute the Adler-32 checksum of a data stream + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zlib.h" + +#define BASE 65521L /* largest prime smaller than 65536 */ +#define NMAX 5552 +/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ + +#define DO1(buf,i) {s1 += buf[i]; s2 += s1;} +#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); +#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); +#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); +#define DO16(buf) DO8(buf,0); DO8(buf,8); + +/* ========================================================================= */ +uLong ZEXPORT adler32(adler, buf, len) + uLong adler; + const Bytef *buf; + uInt len; +{ + unsigned long s1 = adler & 0xffff; + unsigned long s2 = (adler >> 16) & 0xffff; + int k; + + if (buf == Z_NULL) return 1L; + + while (len > 0) { + k = len < NMAX ? len : NMAX; + len -= k; + while (k >= 16) { + DO16(buf); + buf += 16; + k -= 16; + } + if (k != 0) do { + s1 += *buf++; + s2 += s1; + } while (--k); + s1 %= BASE; + s2 %= BASE; + } + return (s2 << 16) | s1; +} diff --git a/win32/zlib/compress.c b/win32/zlib/compress.c new file mode 100644 index 00000000..814bd9d6 --- /dev/null +++ b/win32/zlib/compress.c @@ -0,0 +1,68 @@ +/* compress.c -- compress a memory buffer + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zlib.h" + +/* =========================================================================== + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least 0.1% larger than sourceLen plus + 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ +int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; + int level; +{ + z_stream stream; + int err; + + stream.next_in = (Bytef*)source; + stream.avail_in = (uInt)sourceLen; +#ifdef MAXSEG_64K + /* Check for source > 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; +#endif + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; + + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + stream.opaque = (voidpf)0; + + err = deflateInit(&stream, level); + if (err != Z_OK) return err; + + err = deflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + deflateEnd(&stream); + return err == Z_OK ? Z_BUF_ERROR : err; + } + *destLen = stream.total_out; + + err = deflateEnd(&stream); + return err; +} + +/* =========================================================================== + */ +int ZEXPORT compress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; +{ + return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); +} diff --git a/win32/zlib/crc32.c b/win32/zlib/crc32.c new file mode 100644 index 00000000..60deca2d --- /dev/null +++ b/win32/zlib/crc32.c @@ -0,0 +1,162 @@ +/* crc32.c -- compute the CRC-32 of a data stream + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zlib.h" + +#define local static + +#ifdef DYNAMIC_CRC_TABLE + +local int crc_table_empty = 1; +local uLongf crc_table[256]; +local void make_crc_table OF((void)); + +/* + Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by + x (which is shifting right by one and adding x^32 mod p if the bit shifted + out is a one). We start with the highest power (least significant bit) of + q and repeat for all eight bits of q. + + The table is simply the CRC of all possible eight bit values. This is all + the information needed to generate CRC's on data a byte at a time for all + combinations of CRC register values and incoming bytes. +*/ +local void make_crc_table() +{ + uLong c; + int n, k; + uLong poly; /* polynomial exclusive-or pattern */ + /* terms of polynomial defining this crc (except x^32): */ + static const Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; + + /* make exclusive-or pattern from polynomial (0xedb88320L) */ + poly = 0L; + for (n = 0; n < sizeof(p)/sizeof(Byte); n++) + poly |= 1L << (31 - p[n]); + + for (n = 0; n < 256; n++) + { + c = (uLong)n; + for (k = 0; k < 8; k++) + c = c & 1 ? poly ^ (c >> 1) : c >> 1; + crc_table[n] = c; + } + crc_table_empty = 0; +} +#else +/* ======================================================================== + * Table of CRC-32's of all single-byte values (made by make_crc_table) + */ +local const uLongf crc_table[256] = { + 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, + 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, + 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, + 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, + 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, + 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, + 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, + 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, + 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, + 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, + 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, + 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, + 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, + 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, + 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, + 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, + 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, + 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, + 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, + 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, + 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, + 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, + 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, + 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, + 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, + 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, + 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, + 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, + 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, + 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, + 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, + 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, + 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, + 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, + 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, + 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, + 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, + 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, + 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, + 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, + 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, + 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, + 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, + 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, + 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, + 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, + 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, + 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, + 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, + 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, + 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, + 0x2d02ef8dL +}; +#endif + +/* ========================================================================= + * This function can be used by asm versions of crc32() + */ +const uLongf * ZEXPORT get_crc_table() +{ +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) make_crc_table(); +#endif + return (const uLongf *)crc_table; +} + +/* ========================================================================= */ +#define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8); +#define DO2(buf) DO1(buf); DO1(buf); +#define DO4(buf) DO2(buf); DO2(buf); +#define DO8(buf) DO4(buf); DO4(buf); + +/* ========================================================================= */ +uLong ZEXPORT crc32(crc, buf, len) + uLong crc; + const Bytef *buf; + uInt len; +{ + if (buf == Z_NULL) return 0L; +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) + make_crc_table(); +#endif + crc = crc ^ 0xffffffffL; + while (len >= 8) + { + DO8(buf); + len -= 8; + } + if (len) do { + DO1(buf); + } while (--len); + return crc ^ 0xffffffffL; +} diff --git a/win32/zlib/deflate.c b/win32/zlib/deflate.c new file mode 100644 index 00000000..16ebdade --- /dev/null +++ b/win32/zlib/deflate.c @@ -0,0 +1,1350 @@ +/* deflate.c -- compress data using the deflation algorithm + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * ALGORITHM + * + * The "deflation" process depends on being able to identify portions + * of the input text which are identical to earlier input (within a + * sliding window trailing behind the input currently being processed). + * + * The most straightforward technique turns out to be the fastest for + * most input files: try all possible matches and select the longest. + * The key feature of this algorithm is that insertions into the string + * dictionary are very simple and thus fast, and deletions are avoided + * completely. Insertions are performed at each input character, whereas + * string matches are performed only when the previous match ends. So it + * is preferable to spend more time in matches to allow very fast string + * insertions and avoid deletions. The matching algorithm for small + * strings is inspired from that of Rabin & Karp. A brute force approach + * is used to find longer strings when a small match has been found. + * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze + * (by Leonid Broukhis). + * A previous version of this file used a more sophisticated algorithm + * (by Fiala and Greene) which is guaranteed to run in linear amortized + * time, but has a larger average cost, uses more memory and is patented. + * However the F&G algorithm may be faster for some highly redundant + * files if the parameter max_chain_length (described below) is too large. + * + * ACKNOWLEDGEMENTS + * + * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and + * I found it in 'freeze' written by Leonid Broukhis. + * Thanks to many people for bug reports and testing. + * + * REFERENCES + * + * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification". + * Available in ftp://ds.internic.net/rfc/rfc1951.txt + * + * A description of the Rabin and Karp algorithm is given in the book + * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. + * + * Fiala,E.R., and Greene,D.H. + * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 + * + */ + +/* @(#) $Id$ */ + +#include "deflate.h" + +const char deflate_copyright[] = + " deflate 1.1.4 Copyright 1995-2002 Jean-loup Gailly "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ + +/* =========================================================================== + * Function prototypes. + */ +typedef enum { + need_more, /* block not completed, need more input or more output */ + block_done, /* block flush performed */ + finish_started, /* finish started, need only more output at next deflate */ + finish_done /* finish done, accept no more input or output */ +} block_state; + +typedef block_state (*compress_func) OF((deflate_state *s, int flush)); +/* Compression function. Returns the block state after the call. */ + +local void fill_window OF((deflate_state *s)); +local block_state deflate_stored OF((deflate_state *s, int flush)); +local block_state deflate_fast OF((deflate_state *s, int flush)); +local block_state deflate_slow OF((deflate_state *s, int flush)); +local void lm_init OF((deflate_state *s)); +local void putShortMSB OF((deflate_state *s, uInt b)); +local void flush_pending OF((z_streamp strm)); +local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); +#ifdef ASMV + void match_init OF((void)); /* asm code initialization */ + uInt longest_match OF((deflate_state *s, IPos cur_match)); +#else +local uInt longest_match OF((deflate_state *s, IPos cur_match)); +#endif + +#ifdef DEBUG +local void check_match OF((deflate_state *s, IPos start, IPos match, + int length)); +#endif + +/* =========================================================================== + * Local data + */ + +#define NIL 0 +/* Tail of hash chains */ + +#ifndef TOO_FAR +# define TOO_FAR 4096 +#endif +/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ + +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) +/* Minimum amount of lookahead, except at the end of the input file. + * See deflate.c for comments about the MIN_MATCH+1. + */ + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +typedef struct config_s { + ush good_length; /* reduce lazy search above this match length */ + ush max_lazy; /* do not perform lazy search above this match length */ + ush nice_length; /* quit search above this match length */ + ush max_chain; + compress_func func; +} config; + +local const config configuration_table[10] = { +/* good lazy nice chain */ +/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ +/* 1 */ {4, 4, 8, 4, deflate_fast}, /* maximum speed, no lazy matches */ +/* 2 */ {4, 5, 16, 8, deflate_fast}, +/* 3 */ {4, 6, 32, 32, deflate_fast}, + +/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */ +/* 5 */ {8, 16, 32, 32, deflate_slow}, +/* 6 */ {8, 16, 128, 128, deflate_slow}, +/* 7 */ {8, 32, 128, 256, deflate_slow}, +/* 8 */ {32, 128, 258, 1024, deflate_slow}, +/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* maximum compression */ + +/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 + * For deflate_fast() (levels <= 3) good is ignored and lazy has a different + * meaning. + */ + +#define EQUAL 0 +/* result of memcmp for equal strings */ + +struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ + +/* =========================================================================== + * Update a hash value with the given input byte + * IN assertion: all calls to to UPDATE_HASH are made with consecutive + * input characters, so that a running hash key can be computed from the + * previous key instead of complete recalculation each time. + */ +#define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) + + +/* =========================================================================== + * Insert string str in the dictionary and set match_head to the previous head + * of the hash chain (the most recent string with same hash key). Return + * the previous length of the hash chain. + * If this file is compiled with -DFASTEST, the compression level is forced + * to 1, and no hash chains are maintained. + * IN assertion: all calls to to INSERT_STRING are made with consecutive + * input characters and the first MIN_MATCH bytes of str are valid + * (except for the last MIN_MATCH-1 bytes of the input file). + */ +#ifdef FASTEST +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + match_head = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#else +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + s->prev[(str) & s->w_mask] = match_head = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#endif + +/* =========================================================================== + * Initialize the hash table (avoiding 64K overflow for 16 bit systems). + * prev[] will be initialized on the fly. + */ +#define CLEAR_HASH(s) \ + s->head[s->hash_size-1] = NIL; \ + zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); + +/* ========================================================================= */ +int ZEXPORT deflateInit_(strm, level, version, stream_size) + z_streamp strm; + int level; + const char *version; + int stream_size; +{ + return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, + Z_DEFAULT_STRATEGY, version, stream_size); + /* To do: ignore strm->next_in if we use it as window */ +} + +/* ========================================================================= */ +int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, + version, stream_size) + z_streamp strm; + int level; + int method; + int windowBits; + int memLevel; + int strategy; + const char *version; + int stream_size; +{ + deflate_state *s; + int noheader = 0; + static const char* my_version = ZLIB_VERSION; + + ushf *overlay; + /* We overlay pending_buf and d_buf+l_buf. This works since the average + * output size for (length,distance) codes is <= 24 bits. + */ + + if (version == Z_NULL || version[0] != my_version[0] || + stream_size != sizeof(z_stream)) { + return Z_VERSION_ERROR; + } + if (strm == Z_NULL) return Z_STREAM_ERROR; + + strm->msg = Z_NULL; + if (strm->zalloc == Z_NULL) { + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; + } + if (strm->zfree == Z_NULL) strm->zfree = zcfree; + + if (level == Z_DEFAULT_COMPRESSION) level = 6; +#ifdef FASTEST + level = 1; +#endif + + if (windowBits < 0) { /* undocumented feature: suppress zlib header */ + noheader = 1; + windowBits = -windowBits; + } + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || + windowBits < 9 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_HUFFMAN_ONLY) { + return Z_STREAM_ERROR; + } + s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); + if (s == Z_NULL) return Z_MEM_ERROR; + strm->state = (struct internal_state FAR *)s; + s->strm = strm; + + s->noheader = noheader; + s->w_bits = windowBits; + s->w_size = 1 << s->w_bits; + s->w_mask = s->w_size - 1; + + s->hash_bits = memLevel + 7; + s->hash_size = 1 << s->hash_bits; + s->hash_mask = s->hash_size - 1; + s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); + + s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); + s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); + s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); + + s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + s->pending_buf = (uchf *) overlay; + s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); + + if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || + s->pending_buf == Z_NULL) { + strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); + deflateEnd (strm); + return Z_MEM_ERROR; + } + s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + + s->level = level; + s->strategy = strategy; + s->method = (Byte)method; + + return deflateReset(strm); +} + +/* ========================================================================= */ +int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) + z_streamp strm; + const Bytef *dictionary; + uInt dictLength; +{ + deflate_state *s; + uInt length = dictLength; + uInt n; + IPos hash_head = 0; + + if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL || + strm->state->status != INIT_STATE) return Z_STREAM_ERROR; + + s = strm->state; + strm->adler = adler32(strm->adler, dictionary, dictLength); + + if (length < MIN_MATCH) return Z_OK; + if (length > MAX_DIST(s)) { + length = MAX_DIST(s); +#ifndef USE_DICT_HEAD + dictionary += dictLength - length; /* use the tail of the dictionary */ +#endif + } + zmemcpy(s->window, dictionary, length); + s->strstart = length; + s->block_start = (long)length; + + /* Insert all strings in the hash table (except for the last two bytes). + * s->lookahead stays null, so s->ins_h will be recomputed at the next + * call of fill_window. + */ + s->ins_h = s->window[0]; + UPDATE_HASH(s, s->ins_h, s->window[1]); + for (n = 0; n <= length - MIN_MATCH; n++) { + INSERT_STRING(s, n, hash_head); + } + if (hash_head) hash_head = 0; /* to make compiler happy */ + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateReset (strm) + z_streamp strm; +{ + deflate_state *s; + + if (strm == Z_NULL || strm->state == Z_NULL || + strm->zalloc == Z_NULL || strm->zfree == Z_NULL) return Z_STREAM_ERROR; + + strm->total_in = strm->total_out = 0; + strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ + strm->data_type = Z_UNKNOWN; + + s = (deflate_state *)strm->state; + s->pending = 0; + s->pending_out = s->pending_buf; + + if (s->noheader < 0) { + s->noheader = 0; /* was set to -1 by deflate(..., Z_FINISH); */ + } + s->status = s->noheader ? BUSY_STATE : INIT_STATE; + strm->adler = 1; + s->last_flush = Z_NO_FLUSH; + + _tr_init(s); + lm_init(s); + + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateParams(strm, level, strategy) + z_streamp strm; + int level; + int strategy; +{ + deflate_state *s; + compress_func func; + int err = Z_OK; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + s = strm->state; + + if (level == Z_DEFAULT_COMPRESSION) { + level = 6; + } + if (level < 0 || level > 9 || strategy < 0 || strategy > Z_HUFFMAN_ONLY) { + return Z_STREAM_ERROR; + } + func = configuration_table[s->level].func; + + if (func != configuration_table[level].func && strm->total_in != 0) { + /* Flush the last buffer: */ + err = deflate(strm, Z_PARTIAL_FLUSH); + } + if (s->level != level) { + s->level = level; + s->max_lazy_match = configuration_table[level].max_lazy; + s->good_match = configuration_table[level].good_length; + s->nice_match = configuration_table[level].nice_length; + s->max_chain_length = configuration_table[level].max_chain; + } + s->strategy = strategy; + return err; +} + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +local void putShortMSB (s, b) + deflate_state *s; + uInt b; +{ + put_byte(s, (Byte)(b >> 8)); + put_byte(s, (Byte)(b & 0xff)); +} + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output goes + * through this function so some applications may wish to modify it + * to avoid allocating a large strm->next_out buffer and copying into it. + * (See also read_buf()). + */ +local void flush_pending(strm) + z_streamp strm; +{ + unsigned len = strm->state->pending; + + if (len > strm->avail_out) len = strm->avail_out; + if (len == 0) return; + + zmemcpy(strm->next_out, strm->state->pending_out, len); + strm->next_out += len; + strm->state->pending_out += len; + strm->total_out += len; + strm->avail_out -= len; + strm->state->pending -= len; + if (strm->state->pending == 0) { + strm->state->pending_out = strm->state->pending_buf; + } +} + +/* ========================================================================= */ +int ZEXPORT deflate (strm, flush) + z_streamp strm; + int flush; +{ + int old_flush; /* value of flush param for previous deflate call */ + deflate_state *s; + + if (strm == Z_NULL || strm->state == Z_NULL || + flush > Z_FINISH || flush < 0) { + return Z_STREAM_ERROR; + } + s = strm->state; + + if (strm->next_out == Z_NULL || + (strm->next_in == Z_NULL && strm->avail_in != 0) || + (s->status == FINISH_STATE && flush != Z_FINISH)) { + ERR_RETURN(strm, Z_STREAM_ERROR); + } + if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); + + s->strm = strm; /* just in case */ + old_flush = s->last_flush; + s->last_flush = flush; + + /* Write the zlib header */ + if (s->status == INIT_STATE) { + + uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; + uInt level_flags = (s->level-1) >> 1; + + if (level_flags > 3) level_flags = 3; + header |= (level_flags << 6); + if (s->strstart != 0) header |= PRESET_DICT; + header += 31 - (header % 31); + + s->status = BUSY_STATE; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s->strstart != 0) { + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + } + strm->adler = 1L; + } + + /* Flush as much pending output as possible */ + if (s->pending != 0) { + flush_pending(strm); + if (strm->avail_out == 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s->last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUFF_ERROR. + */ + } else if (strm->avail_in == 0 && flush <= old_flush && + flush != Z_FINISH) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s->status == FINISH_STATE && strm->avail_in != 0) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* Start a new block or continue the current one. + */ + if (strm->avail_in != 0 || s->lookahead != 0 || + (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { + block_state bstate; + + bstate = (*(configuration_table[s->level].func))(s, flush); + + if (bstate == finish_started || bstate == finish_done) { + s->status = FINISH_STATE; + } + if (bstate == need_more || bstate == finish_started) { + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate == block_done) { + if (flush == Z_PARTIAL_FLUSH) { + _tr_align(s); + } else { /* FULL_FLUSH or SYNC_FLUSH */ + _tr_stored_block(s, (char*)0, 0L, 0); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush == Z_FULL_FLUSH) { + CLEAR_HASH(s); /* forget history */ + } + } + flush_pending(strm); + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + Assert(strm->avail_out > 0, "bug2"); + + if (flush != Z_FINISH) return Z_OK; + if (s->noheader) return Z_STREAM_END; + + /* Write the zlib trailer (adler32) */ + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + s->noheader = -1; /* write the trailer only once! */ + return s->pending != 0 ? Z_OK : Z_STREAM_END; +} + +/* ========================================================================= */ +int ZEXPORT deflateEnd (strm) + z_streamp strm; +{ + int status; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + + status = strm->state->status; + if (status != INIT_STATE && status != BUSY_STATE && + status != FINISH_STATE) { + return Z_STREAM_ERROR; + } + + /* Deallocate in reverse order of allocations: */ + TRY_FREE(strm, strm->state->pending_buf); + TRY_FREE(strm, strm->state->head); + TRY_FREE(strm, strm->state->prev); + TRY_FREE(strm, strm->state->window); + + ZFREE(strm, strm->state); + strm->state = Z_NULL; + + return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; +} + +/* ========================================================================= + * Copy the source state to the destination state. + * To simplify the source, this is not supported for 16-bit MSDOS (which + * doesn't have enough memory anyway to duplicate compression states). + */ +int ZEXPORT deflateCopy (dest, source) + z_streamp dest; + z_streamp source; +{ +#ifdef MAXSEG_64K + return Z_STREAM_ERROR; +#else + deflate_state *ds; + deflate_state *ss; + ushf *overlay; + + + if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) { + return Z_STREAM_ERROR; + } + + ss = source->state; + + *dest = *source; + + ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); + if (ds == Z_NULL) return Z_MEM_ERROR; + dest->state = (struct internal_state FAR *) ds; + *ds = *ss; + ds->strm = dest; + + ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); + ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); + ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); + overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2); + ds->pending_buf = (uchf *) overlay; + + if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || + ds->pending_buf == Z_NULL) { + deflateEnd (dest); + return Z_MEM_ERROR; + } + /* following zmemcpy do not work for 16-bit MSDOS */ + zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); + zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos)); + zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos)); + zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); + + ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); + ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); + ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; + + ds->l_desc.dyn_tree = ds->dyn_ltree; + ds->d_desc.dyn_tree = ds->dyn_dtree; + ds->bl_desc.dyn_tree = ds->bl_tree; + + return Z_OK; +#endif +} + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->next_in buffer and copying from it. + * (See also flush_pending()). + */ +local int read_buf(strm, buf, size) + z_streamp strm; + Bytef *buf; + unsigned size; +{ + unsigned len = strm->avail_in; + + if (len > size) len = size; + if (len == 0) return 0; + + strm->avail_in -= len; + + if (!strm->state->noheader) { + strm->adler = adler32(strm->adler, strm->next_in, len); + } + zmemcpy(buf, strm->next_in, len); + strm->next_in += len; + strm->total_in += len; + + return (int)len; +} + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +local void lm_init (s) + deflate_state *s; +{ + s->window_size = (ulg)2L*s->w_size; + + CLEAR_HASH(s); + + /* Set the default configuration parameters: + */ + s->max_lazy_match = configuration_table[s->level].max_lazy; + s->good_match = configuration_table[s->level].good_length; + s->nice_match = configuration_table[s->level].nice_length; + s->max_chain_length = configuration_table[s->level].max_chain; + + s->strstart = 0; + s->block_start = 0L; + s->lookahead = 0; + s->match_length = s->prev_length = MIN_MATCH-1; + s->match_available = 0; + s->ins_h = 0; +#ifdef ASMV + match_init(); /* initialize the asm code */ +#endif +} + +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +#ifndef ASMV +/* For 80x86 and 680x0, an optimized version will be provided in match.asm or + * match.S. The code will be functionally equivalent. + */ +#ifndef FASTEST +local uInt longest_match(s, cur_match) + deflate_state *s; + IPos cur_match; /* current match */ +{ + unsigned chain_length = s->max_chain_length;/* max hash chain length */ + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + int best_len = s->prev_length; /* best match length so far */ + int nice_match = s->nice_match; /* stop if match long enough */ + IPos limit = s->strstart > (IPos)MAX_DIST(s) ? + s->strstart - (IPos)MAX_DIST(s) : NIL; + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + Posf *prev = s->prev; + uInt wmask = s->w_mask; + +#ifdef UNALIGNED_OK + /* Compare two bytes at a time. Note: this is not always beneficial. + * Try with and without -DUNALIGNED_OK to check. + */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; + register ush scan_start = *(ushf*)scan; + register ush scan_end = *(ushf*)(scan+best_len-1); +#else + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + register Byte scan_end1 = scan[best_len-1]; + register Byte scan_end = scan[best_len]; +#endif + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s->prev_length >= s->good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + Assert(cur_match < s->strstart, "no future"); + match = s->window + cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2: + */ +#if (defined(UNALIGNED_OK) && MAX_MATCH == 258) + /* This code assumes sizeof(unsigned short) == 2. Do not use + * UNALIGNED_OK if your compiler uses a different size. + */ + if (*(ushf*)(match+best_len-1) != scan_end || + *(ushf*)match != scan_start) continue; + + /* It is not necessary to compare scan[2] and match[2] since they are + * always equal when the other bytes match, given that the hash keys + * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at + * strstart+3, +5, ... up to strstart+257. We check for insufficient + * lookahead only every 4th comparison; the 128th check will be made + * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is + * necessary to put more guard bytes at the end of the window, or + * to check more often for insufficient lookahead. + */ + Assert(scan[2] == match[2], "scan[2]?"); + scan++, match++; + do { + } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + scan < strend); + /* The funny "do {}" generates better code on most compilers */ + + /* Here, scan <= window+strstart+257 */ + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + if (*scan == *match) scan++; + + len = (MAX_MATCH - 1) - (int)(strend-scan); + scan = strend - (MAX_MATCH-1); + +#else /* UNALIGNED_OK */ + + if (match[best_len] != scan_end || + match[best_len-1] != scan_end1 || + *match != *scan || + *++match != scan[1]) continue; + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match++; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + scan = strend - MAX_MATCH; + +#endif /* UNALIGNED_OK */ + + if (len > best_len) { + s->match_start = cur_match; + best_len = len; + if (len >= nice_match) break; +#ifdef UNALIGNED_OK + scan_end = *(ushf*)(scan+best_len-1); +#else + scan_end1 = scan[best_len-1]; + scan_end = scan[best_len]; +#endif + } + } while ((cur_match = prev[cur_match & wmask]) > limit + && --chain_length != 0); + + if ((uInt)best_len <= s->lookahead) return (uInt)best_len; + return s->lookahead; +} + +#else /* FASTEST */ +/* --------------------------------------------------------------------------- + * Optimized version for level == 1 only + */ +local uInt longest_match(s, cur_match) + deflate_state *s; + IPos cur_match; /* current match */ +{ + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + Assert(cur_match < s->strstart, "no future"); + + match = s->window + cur_match; + + /* Return failure if the match length is less than 2: + */ + if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match += 2; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + + if (len < MIN_MATCH) return MIN_MATCH - 1; + + s->match_start = cur_match; + return len <= s->lookahead ? len : s->lookahead; +} +#endif /* FASTEST */ +#endif /* ASMV */ + +#ifdef DEBUG +/* =========================================================================== + * Check that the match at match_start is indeed a match. + */ +local void check_match(s, start, match, length) + deflate_state *s; + IPos start, match; + int length; +{ + /* check that the match is indeed a match */ + if (zmemcmp(s->window + match, + s->window + start, length) != EQUAL) { + fprintf(stderr, " start %u, match %u, length %d\n", + start, match, length); + do { + fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); + } while (--length != 0); + z_error("invalid match"); + } + if (z_verbose > 1) { + fprintf(stderr,"\\[%d,%d]", start-match, length); + do { putc(s->window[start++], stderr); } while (--length != 0); + } +} +#else +# define check_match(s, start, match, length) +#endif + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +local void fill_window(s) + deflate_state *s; +{ + register unsigned n, m; + register Posf *p; + unsigned more; /* Amount of free space at the end of the window. */ + uInt wsize = s->w_size; + + do { + more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); + + /* Deal with !@#$% 64K limit: */ + if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + more = wsize; + + } else if (more == (unsigned)(-1)) { + /* Very unlikely, but possible on 16 bit machine if strstart == 0 + * and lookahead == 1 (input done one byte at time) + */ + more--; + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + } else if (s->strstart >= wsize+MAX_DIST(s)) { + + zmemcpy(s->window, s->window+wsize, (unsigned)wsize); + s->match_start -= wsize; + s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ + s->block_start -= (long) wsize; + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + n = s->hash_size; + p = &s->head[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m-wsize : NIL); + } while (--n); + + n = wsize; +#ifndef FASTEST + p = &s->prev[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m-wsize : NIL); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); +#endif + more += wsize; + } + if (s->strm->avail_in == 0) return; + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + Assert(more >= 2, "more < 2"); + + n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); + s->lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s->lookahead >= MIN_MATCH) { + s->ins_h = s->window[s->strstart]; + UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); +} + +/* =========================================================================== + * Flush the current block, with given end-of-file flag. + * IN assertion: strstart is set to the end of the current match. + */ +#define FLUSH_BLOCK_ONLY(s, eof) { \ + _tr_flush_block(s, (s->block_start >= 0L ? \ + (charf *)&s->window[(unsigned)s->block_start] : \ + (charf *)Z_NULL), \ + (ulg)((long)s->strstart - s->block_start), \ + (eof)); \ + s->block_start = s->strstart; \ + flush_pending(s->strm); \ + Tracev((stderr,"[FLUSH]")); \ +} + +/* Same but force premature exit if necessary. */ +#define FLUSH_BLOCK(s, eof) { \ + FLUSH_BLOCK_ONLY(s, eof); \ + if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \ +} + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * This function does not insert new strings in the dictionary since + * uncompressible data is probably not useful. This function is used + * only for the level=0 compression option. + * NOTE: this function should be optimized to avoid extra copying from + * window to pending_buf. + */ +local block_state deflate_stored(s, flush) + deflate_state *s; + int flush; +{ + /* Stored blocks are limited to 0xffff bytes, pending_buf is limited + * to pending_buf_size, and each stored block has a 5 byte header: + */ + ulg max_block_size = 0xffff; + ulg max_start; + + if (max_block_size > s->pending_buf_size - 5) { + max_block_size = s->pending_buf_size - 5; + } + + /* Copy as much as possible from input to output: */ + for (;;) { + /* Fill the window as much as possible: */ + if (s->lookahead <= 1) { + + Assert(s->strstart < s->w_size+MAX_DIST(s) || + s->block_start >= (long)s->w_size, "slide too late"); + + fill_window(s); + if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more; + + if (s->lookahead == 0) break; /* flush the current block */ + } + Assert(s->block_start >= 0L, "block gone"); + + s->strstart += s->lookahead; + s->lookahead = 0; + + /* Emit a stored block if pending_buf will be full: */ + max_start = s->block_start + max_block_size; + if (s->strstart == 0 || (ulg)s->strstart >= max_start) { + /* strstart == 0 is possible when wraparound on 16-bit machine */ + s->lookahead = (uInt)(s->strstart - max_start); + s->strstart = (uInt)max_start; + FLUSH_BLOCK(s, 0); + } + /* Flush if we may have to slide, otherwise block_start may become + * negative and the data will be gone: + */ + if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) { + FLUSH_BLOCK(s, 0); + } + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +local block_state deflate_fast(s, flush) + deflate_state *s; + int flush; +{ + IPos hash_head = NIL; /* head of the hash chain */ + int bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + if (s->strategy != Z_HUFFMAN_ONLY) { + s->match_length = longest_match (s, hash_head); + } + /* longest_match() sets match_start */ + } + if (s->match_length >= MIN_MATCH) { + check_match(s, s->strstart, s->match_start, s->match_length); + + _tr_tally_dist(s, s->strstart - s->match_start, + s->match_length - MIN_MATCH, bflush); + + s->lookahead -= s->match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ +#ifndef FASTEST + if (s->match_length <= s->max_insert_length && + s->lookahead >= MIN_MATCH) { + s->match_length--; /* string at strstart already in hash table */ + do { + s->strstart++; + INSERT_STRING(s, s->strstart, hash_head); + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s->match_length != 0); + s->strstart++; + } else +#endif + { + s->strstart += s->match_length; + s->match_length = 0; + s->ins_h = s->window[s->strstart]; + UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + } + if (bflush) FLUSH_BLOCK(s, 0); + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} + +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +local block_state deflate_slow(s, flush) + deflate_state *s; + int flush; +{ + IPos hash_head = NIL; /* head of hash chain */ + int bflush; /* set if current block must be flushed */ + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + */ + s->prev_length = s->match_length, s->prev_match = s->match_start; + s->match_length = MIN_MATCH-1; + + if (hash_head != NIL && s->prev_length < s->max_lazy_match && + s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + if (s->strategy != Z_HUFFMAN_ONLY) { + s->match_length = longest_match (s, hash_head); + } + /* longest_match() sets match_start */ + + if (s->match_length <= 5 && (s->strategy == Z_FILTERED || + (s->match_length == MIN_MATCH && + s->strstart - s->match_start > TOO_FAR))) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s->match_length = MIN_MATCH-1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { + uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + check_match(s, s->strstart-1, s->prev_match, s->prev_length); + + _tr_tally_dist(s, s->strstart -1 - s->prev_match, + s->prev_length - MIN_MATCH, bflush); + + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s->lookahead -= s->prev_length-1; + s->prev_length -= 2; + do { + if (++s->strstart <= max_insert) { + INSERT_STRING(s, s->strstart, hash_head); + } + } while (--s->prev_length != 0); + s->match_available = 0; + s->match_length = MIN_MATCH-1; + s->strstart++; + + if (bflush) FLUSH_BLOCK(s, 0); + + } else if (s->match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + Tracevv((stderr,"%c", s->window[s->strstart-1])); + _tr_tally_lit(s, s->window[s->strstart-1], bflush); + if (bflush) { + FLUSH_BLOCK_ONLY(s, 0); + } + s->strstart++; + s->lookahead--; + if (s->strm->avail_out == 0) return need_more; + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s->match_available = 1; + s->strstart++; + s->lookahead--; + } + } + Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s->match_available) { + Tracevv((stderr,"%c", s->window[s->strstart-1])); + _tr_tally_lit(s, s->window[s->strstart-1], bflush); + s->match_available = 0; + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} diff --git a/win32/zlib/deflate.h b/win32/zlib/deflate.h new file mode 100644 index 00000000..b99a48a5 --- /dev/null +++ b/win32/zlib/deflate.h @@ -0,0 +1,318 @@ +/* deflate.h -- internal compression state + * Copyright (C) 1995-2002 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id$ */ + +#ifndef _DEFLATE_H +#define _DEFLATE_H + +#include "zutil.h" + +/* =========================================================================== + * Internal compression state. + */ + +#define LENGTH_CODES 29 +/* number of length codes, not counting the special END_BLOCK code */ + +#define LITERALS 256 +/* number of literal bytes 0..255 */ + +#define L_CODES (LITERALS+1+LENGTH_CODES) +/* number of Literal or Length codes, including the END_BLOCK code */ + +#define D_CODES 30 +/* number of distance codes */ + +#define BL_CODES 19 +/* number of codes used to transfer the bit lengths */ + +#define HEAP_SIZE (2*L_CODES+1) +/* maximum heap size */ + +#define MAX_BITS 15 +/* All codes must not exceed MAX_BITS bits */ + +#define INIT_STATE 42 +#define BUSY_STATE 113 +#define FINISH_STATE 666 +/* Stream status */ + + +/* Data structure describing a single value and its code string. */ +typedef struct ct_data_s { + union { + ush freq; /* frequency count */ + ush code; /* bit string */ + } fc; + union { + ush dad; /* father node in Huffman tree */ + ush len; /* length of bit string */ + } dl; +} FAR ct_data; + +#define Freq fc.freq +#define Code fc.code +#define Dad dl.dad +#define Len dl.len + +typedef struct static_tree_desc_s static_tree_desc; + +typedef struct tree_desc_s { + ct_data *dyn_tree; /* the dynamic tree */ + int max_code; /* largest code with non zero frequency */ + static_tree_desc *stat_desc; /* the corresponding static tree */ +} FAR tree_desc; + +typedef ush Pos; +typedef Pos FAR Posf; +typedef unsigned IPos; + +/* A Pos is an index in the character window. We use short instead of int to + * save space in the various tables. IPos is used only for parameter passing. + */ + +typedef struct internal_state { + z_streamp strm; /* pointer back to this zlib stream */ + int status; /* as the name implies */ + Bytef *pending_buf; /* output still pending */ + ulg pending_buf_size; /* size of pending_buf */ + Bytef *pending_out; /* next pending byte to output to the stream */ + int pending; /* nb of bytes in the pending buffer */ + int noheader; /* suppress zlib header and adler32 */ + Byte data_type; /* UNKNOWN, BINARY or ASCII */ + Byte method; /* STORED (for zip only) or DEFLATED */ + int last_flush; /* value of flush param for previous deflate call */ + + /* used by deflate.c: */ + + uInt w_size; /* LZ77 window size (32K by default) */ + uInt w_bits; /* log2(w_size) (8..16) */ + uInt w_mask; /* w_size - 1 */ + + Bytef *window; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. Also, it limits + * the window size to 64K, which is quite useful on MSDOS. + * To do: use the user input buffer as sliding window. + */ + + ulg window_size; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + Posf *prev; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + Posf *head; /* Heads of the hash chains or NIL. */ + + uInt ins_h; /* hash index of string to be inserted */ + uInt hash_size; /* number of elements in hash table */ + uInt hash_bits; /* log2(hash_size) */ + uInt hash_mask; /* hash_size-1 */ + + uInt hash_shift; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + long block_start; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + uInt match_length; /* length of best match */ + IPos prev_match; /* previous match */ + int match_available; /* set if previous match exists */ + uInt strstart; /* start of string to insert */ + uInt match_start; /* start of matching string */ + uInt lookahead; /* number of valid bytes ahead in window */ + + uInt prev_length; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + uInt max_chain_length; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + uInt max_lazy_match; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ +# define max_insert_length max_lazy_match + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + int level; /* compression level (1..9) */ + int strategy; /* favor or force Huffman coding*/ + + uInt good_match; + /* Use a faster search when the previous match is longer than this */ + + int nice_match; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + /* Didn't use ct_data typedef below to supress compiler warning */ + struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + struct tree_desc_s l_desc; /* desc. for literal tree */ + struct tree_desc_s d_desc; /* desc. for distance tree */ + struct tree_desc_s bl_desc; /* desc. for bit length tree */ + + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + int heap_len; /* number of elements in the heap */ + int heap_max; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + uch depth[2*L_CODES+1]; + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + uchf *l_buf; /* buffer for literals or lengths */ + + uInt lit_bufsize; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + uInt last_lit; /* running index in l_buf */ + + ushf *d_buf; + /* Buffer for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ + + ulg opt_len; /* bit length of current block with optimal trees */ + ulg static_len; /* bit length of current block with static trees */ + uInt matches; /* number of string matches in current block */ + int last_eob_len; /* bit length of EOB code for last block */ + +#ifdef DEBUG + ulg compressed_len; /* total bit length of compressed file mod 2^32 */ + ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ +#endif + + ush bi_buf; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + int bi_valid; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + +} FAR deflate_state; + +/* Output a byte on the stream. + * IN assertion: there is enough room in pending_buf. + */ +#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} + + +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) +/* Minimum amount of lookahead, except at the end of the input file. + * See deflate.c for comments about the MIN_MATCH+1. + */ + +#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) +/* In order to simplify the code, particularly on 16 bit machines, match + * distances are limited to MAX_DIST instead of WSIZE. + */ + + /* in trees.c */ +void _tr_init OF((deflate_state *s)); +int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); +void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, + int eof)); +void _tr_align OF((deflate_state *s)); +void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, + int eof)); + +#define d_code(dist) \ + ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) +/* Mapping from a distance to a distance code. dist is the distance - 1 and + * must not have side effects. _dist_code[256] and _dist_code[257] are never + * used. + */ + +#ifndef DEBUG +/* Inline versions of _tr_tally for speed: */ + +#if defined(GEN_TREES_H) || !defined(STDC) + extern uch _length_code[]; + extern uch _dist_code[]; +#else + extern const uch _length_code[]; + extern const uch _dist_code[]; +#endif + +# define _tr_tally_lit(s, c, flush) \ + { uch cc = (c); \ + s->d_buf[s->last_lit] = 0; \ + s->l_buf[s->last_lit++] = cc; \ + s->dyn_ltree[cc].Freq++; \ + flush = (s->last_lit == s->lit_bufsize-1); \ + } +# define _tr_tally_dist(s, distance, length, flush) \ + { uch len = (length); \ + ush dist = (distance); \ + s->d_buf[s->last_lit] = dist; \ + s->l_buf[s->last_lit++] = len; \ + dist--; \ + s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ + s->dyn_dtree[d_code(dist)].Freq++; \ + flush = (s->last_lit == s->lit_bufsize-1); \ + } +#else +# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) +# define _tr_tally_dist(s, distance, length, flush) \ + flush = _tr_tally(s, distance, length) +#endif + +#endif diff --git a/win32/zlib/gzio.c b/win32/zlib/gzio.c new file mode 100644 index 00000000..7909f659 --- /dev/null +++ b/win32/zlib/gzio.c @@ -0,0 +1,879 @@ +/* gzio.c -- IO on .gz files + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Compile this file with -DNO_DEFLATE to avoid the compression code. + */ + +/* @(#) $Id$ */ + +#include + +#include "zutil.h" + +#ifdef _MSC_VER +#pragma warning (disable:4996) +#endif + +struct internal_state {int dummy;}; /* for buggy compilers */ + +#ifndef Z_BUFSIZE +# ifdef MAXSEG_64K +# define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */ +# else +# define Z_BUFSIZE 16384 +# endif +#endif +#ifndef Z_PRINTF_BUFSIZE +# define Z_PRINTF_BUFSIZE 4096 +#endif + +#define ALLOC(size) malloc(size) +#define TRYFREE(p) {if (p) free(p);} + +static int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ + +/* gzip flag byte */ +#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ +#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ +#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ +#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ +#define COMMENT 0x10 /* bit 4 set: file comment present */ +#define RESERVED 0xE0 /* bits 5..7: reserved */ + +typedef struct gz_stream { + z_stream stream; + int z_err; /* error code for last stream operation */ + int z_eof; /* set if end of input file */ + FILE *file; /* .gz file */ + Byte *inbuf; /* input buffer */ + Byte *outbuf; /* output buffer */ + uLong crc; /* crc32 of uncompressed data */ + char *msg; /* error message */ + char *path; /* path name for debugging only */ + int transparent; /* 1 if input file is not a .gz file */ + char mode; /* 'w' or 'r' */ + long startpos; /* start of compressed data in file (header skipped) */ +} gz_stream; + + +local gzFile gz_open OF((const char *path, const char *mode, int fd)); +local int do_flush OF((gzFile file, int flush)); +local int get_byte OF((gz_stream *s)); +local void check_header OF((gz_stream *s)); +local int destroy OF((gz_stream *s)); +local void putLong OF((FILE *file, uLong x)); +local uLong getLong OF((gz_stream *s)); + +/* =========================================================================== + Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb"). The file is given either by file descriptor + or path name (if fd == -1). + gz_open return NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). +*/ +local gzFile gz_open (path, mode, fd) + const char *path; + const char *mode; + int fd; +{ + int err; + int level = Z_DEFAULT_COMPRESSION; /* compression level */ + int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */ + char *p = (char*)mode; + gz_stream *s; + char fmode[80]; /* copy of mode, without the compression level */ + char *m = fmode; + + if (!path || !mode) return Z_NULL; + + s = (gz_stream *)ALLOC(sizeof(gz_stream)); + if (!s) return Z_NULL; + + s->stream.zalloc = (alloc_func)0; + s->stream.zfree = (free_func)0; + s->stream.opaque = (voidpf)0; + s->stream.next_in = s->inbuf = Z_NULL; + s->stream.next_out = s->outbuf = Z_NULL; + s->stream.avail_in = s->stream.avail_out = 0; + s->file = NULL; + s->z_err = Z_OK; + s->z_eof = 0; + s->crc = crc32(0L, Z_NULL, 0); + s->msg = NULL; + s->transparent = 0; + + s->path = (char*)ALLOC(strlen(path)+1); + if (s->path == NULL) { + return destroy(s), (gzFile)Z_NULL; + } + strcpy(s->path, path); /* do this early for debugging */ + + s->mode = '\0'; + do { + if (*p == 'r') s->mode = 'r'; + if (*p == 'w' || *p == 'a') s->mode = 'w'; + if (*p >= '0' && *p <= '9') { + level = *p - '0'; + } else if (*p == 'f') { + strategy = Z_FILTERED; + } else if (*p == 'h') { + strategy = Z_HUFFMAN_ONLY; + } else { + *m++ = *p; /* copy the mode */ + } + } while (*p++ && m != fmode + sizeof(fmode)); + if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL; + + if (s->mode == 'w') { +#ifdef NO_DEFLATE + err = Z_STREAM_ERROR; +#else + err = deflateInit2(&(s->stream), level, + Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy); + /* windowBits is passed < 0 to suppress zlib header */ + + s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); +#endif + if (err != Z_OK || s->outbuf == Z_NULL) { + return destroy(s), (gzFile)Z_NULL; + } + } else { + s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); + + err = inflateInit2(&(s->stream), -MAX_WBITS); + /* windowBits is passed < 0 to tell that there is no zlib header. + * Note that in this case inflate *requires* an extra "dummy" byte + * after the compressed stream in order to complete decompression and + * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are + * present after the compressed stream. + */ + if (err != Z_OK || s->inbuf == Z_NULL) { + return destroy(s), (gzFile)Z_NULL; + } + } + s->stream.avail_out = Z_BUFSIZE; + + errno = 0; + s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode); + + if (s->file == NULL) { + return destroy(s), (gzFile)Z_NULL; + } + if (s->mode == 'w') { + /* Write a very simple .gz header: + */ + fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1], + Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE); + s->startpos = 10L; + /* We use 10L instead of ftell(s->file) to because ftell causes an + * fflush on some systems. This version of the library doesn't use + * startpos anyway in write mode, so this initialization is not + * necessary. + */ + } else { + check_header(s); /* skip the .gz header */ + s->startpos = (ftell(s->file) - s->stream.avail_in); + } + + return (gzFile)s; +} + +/* =========================================================================== + Opens a gzip (.gz) file for reading or writing. +*/ +gzFile ZEXPORT gzopen (path, mode) + const char *path; + const char *mode; +{ + return gz_open (path, mode, -1); +} + +/* =========================================================================== + Associate a gzFile with the file descriptor fd. fd is not dup'ed here + to mimic the behavio(u)r of fdopen. +*/ +gzFile ZEXPORT gzdopen (fd, mode) + int fd; + const char *mode; +{ + char name[20]; + + if (fd < 0) return (gzFile)Z_NULL; + sprintf(name, "", fd); /* for debugging */ + + return gz_open (name, mode, fd); +} + +/* =========================================================================== + * Update the compression level and strategy + */ +int ZEXPORT gzsetparams (file, level, strategy) + gzFile file; + int level; + int strategy; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + /* Make room to allow flushing */ + if (s->stream.avail_out == 0) { + + s->stream.next_out = s->outbuf; + if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { + s->z_err = Z_ERRNO; + } + s->stream.avail_out = Z_BUFSIZE; + } + + return deflateParams (&(s->stream), level, strategy); +} + +/* =========================================================================== + Read a byte from a gz_stream; update next_in and avail_in. Return EOF + for end of file. + IN assertion: the stream s has been sucessfully opened for reading. +*/ +local int get_byte(s) + gz_stream *s; +{ + if (s->z_eof) return EOF; + if (s->stream.avail_in == 0) { + errno = 0; + s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file); + if (s->stream.avail_in == 0) { + s->z_eof = 1; + if (ferror(s->file)) s->z_err = Z_ERRNO; + return EOF; + } + s->stream.next_in = s->inbuf; + } + s->stream.avail_in--; + return *(s->stream.next_in)++; +} + +/* =========================================================================== + Check the gzip header of a gz_stream opened for reading. Set the stream + mode to transparent if the gzip magic header is not present; set s->err + to Z_DATA_ERROR if the magic header is present but the rest of the header + is incorrect. + IN assertion: the stream s has already been created sucessfully; + s->stream.avail_in is zero for the first time, but may be non-zero + for concatenated .gz files. +*/ +local void check_header(s) + gz_stream *s; +{ + int method; /* method byte */ + int flags; /* flags byte */ + uInt len; + int c; + + /* Check the gzip magic header */ + for (len = 0; len < 2; len++) { + c = get_byte(s); + if (c != gz_magic[len]) { + if (len != 0) s->stream.avail_in++, s->stream.next_in--; + if (c != EOF) { + s->stream.avail_in++, s->stream.next_in--; + s->transparent = 1; + } + s->z_err = s->stream.avail_in != 0 ? Z_OK : Z_STREAM_END; + return; + } + } + method = get_byte(s); + flags = get_byte(s); + if (method != Z_DEFLATED || (flags & RESERVED) != 0) { + s->z_err = Z_DATA_ERROR; + return; + } + + /* Discard time, xflags and OS code: */ + for (len = 0; len < 6; len++) (void)get_byte(s); + + if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */ + len = (uInt)get_byte(s); + len += ((uInt)get_byte(s))<<8; + /* len is garbage if EOF but the loop below will quit anyway */ + while (len-- != 0 && get_byte(s) != EOF) ; + } + if ((flags & ORIG_NAME) != 0) { /* skip the original file name */ + while ((c = get_byte(s)) != 0 && c != EOF) ; + } + if ((flags & COMMENT) != 0) { /* skip the .gz file comment */ + while ((c = get_byte(s)) != 0 && c != EOF) ; + } + if ((flags & HEAD_CRC) != 0) { /* skip the header crc */ + for (len = 0; len < 2; len++) (void)get_byte(s); + } + s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK; +} + + /* =========================================================================== + * Cleanup then free the given gz_stream. Return a zlib error code. + Try freeing in the reverse order of allocations. + */ +local int destroy (s) + gz_stream *s; +{ + int err = Z_OK; + + if (!s) return Z_STREAM_ERROR; + + TRYFREE(s->msg); + + if (s->stream.state != NULL) { + if (s->mode == 'w') { +#ifdef NO_DEFLATE + err = Z_STREAM_ERROR; +#else + err = deflateEnd(&(s->stream)); +#endif + } else if (s->mode == 'r') { + err = inflateEnd(&(s->stream)); + } + } + if (s->file != NULL && fclose(s->file)) { +#ifdef ESPIPE + if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */ +#endif + err = Z_ERRNO; + } + if (s->z_err < 0) err = s->z_err; + + TRYFREE(s->inbuf); + TRYFREE(s->outbuf); + TRYFREE(s->path); + TRYFREE(s); + return err; +} + +/* =========================================================================== + Reads the given number of uncompressed bytes from the compressed file. + gzread returns the number of bytes actually read (0 for end of file). +*/ +int ZEXPORT gzread (file, buf, len) + gzFile file; + voidp buf; + unsigned len; +{ + gz_stream *s = (gz_stream*)file; + Bytef *start = (Bytef*)buf; /* starting point for crc computation */ + Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */ + + if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR; + + if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1; + if (s->z_err == Z_STREAM_END) return 0; /* EOF */ + + next_out = (Byte*)buf; + s->stream.next_out = (Bytef*)buf; + s->stream.avail_out = len; + + while (s->stream.avail_out != 0) { + + if (s->transparent) { + /* Copy first the lookahead bytes: */ + uInt n = s->stream.avail_in; + if (n > s->stream.avail_out) n = s->stream.avail_out; + if (n > 0) { + zmemcpy(s->stream.next_out, s->stream.next_in, n); + next_out += n; + s->stream.next_out = next_out; + s->stream.next_in += n; + s->stream.avail_out -= n; + s->stream.avail_in -= n; + } + if (s->stream.avail_out > 0) { + s->stream.avail_out -= fread(next_out, 1, s->stream.avail_out, + s->file); + } + len -= s->stream.avail_out; + s->stream.total_in += (uLong)len; + s->stream.total_out += (uLong)len; + if (len == 0) s->z_eof = 1; + return (int)len; + } + if (s->stream.avail_in == 0 && !s->z_eof) { + + errno = 0; + s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file); + if (s->stream.avail_in == 0) { + s->z_eof = 1; + if (ferror(s->file)) { + s->z_err = Z_ERRNO; + break; + } + } + s->stream.next_in = s->inbuf; + } + s->z_err = inflate(&(s->stream), Z_NO_FLUSH); + + if (s->z_err == Z_STREAM_END) { + /* Check CRC and original size */ + s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); + start = s->stream.next_out; + + if (getLong(s) != s->crc) { + s->z_err = Z_DATA_ERROR; + } else { + (void)getLong(s); + /* The uncompressed length returned by above getlong() may + * be different from s->stream.total_out) in case of + * concatenated .gz files. Check for such files: + */ + check_header(s); + if (s->z_err == Z_OK) { + uLong total_in = s->stream.total_in; + uLong total_out = s->stream.total_out; + + inflateReset(&(s->stream)); + s->stream.total_in = total_in; + s->stream.total_out = total_out; + s->crc = crc32(0L, Z_NULL, 0); + } + } + } + if (s->z_err != Z_OK || s->z_eof) break; + } + s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); + + return (int)(len - s->stream.avail_out); +} + + +/* =========================================================================== + Reads one byte from the compressed file. gzgetc returns this byte + or -1 in case of end of file or error. +*/ +int ZEXPORT gzgetc(file) + gzFile file; +{ + unsigned char c; + + return gzread(file, &c, 1) == 1 ? c : -1; +} + + +/* =========================================================================== + Reads bytes from the compressed file until len-1 characters are + read, or a newline character is read and transferred to buf, or an + end-of-file condition is encountered. The string is then terminated + with a null character. + gzgets returns buf, or Z_NULL in case of error. + + The current implementation is not optimized at all. +*/ +char * ZEXPORT gzgets(file, buf, len) + gzFile file; + char *buf; + int len; +{ + char *b = buf; + if (buf == Z_NULL || len <= 0) return Z_NULL; + + while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ; + *buf = '\0'; + return b == buf && len > 0 ? Z_NULL : b; +} + + +#ifndef NO_DEFLATE +/* =========================================================================== + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of bytes actually written (0 in case of error). +*/ +int ZEXPORT gzwrite (file, buf, len) + gzFile file; + const voidp buf; + unsigned len; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + s->stream.next_in = (Bytef*)buf; + s->stream.avail_in = len; + + while (s->stream.avail_in != 0) { + + if (s->stream.avail_out == 0) { + + s->stream.next_out = s->outbuf; + if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { + s->z_err = Z_ERRNO; + break; + } + s->stream.avail_out = Z_BUFSIZE; + } + s->z_err = deflate(&(s->stream), Z_NO_FLUSH); + if (s->z_err != Z_OK) break; + } + s->crc = crc32(s->crc, (const Bytef *)buf, len); + + return (int)(len - s->stream.avail_in); +} + +/* =========================================================================== + Converts, formats, and writes the args to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written (0 in case of error). +*/ +#ifdef STDC +#include + +int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...) +{ + char buf[Z_PRINTF_BUFSIZE]; + va_list va; + int len; + + va_start(va, format); +#ifdef HAS_vsnprintf + (void)vsnprintf(buf, sizeof(buf), format, va); +#else + (void)vsprintf(buf, format, va); +#endif + va_end(va); + len = strlen(buf); /* some *sprintf don't return the nb of bytes written */ + if (len <= 0) return 0; + + return gzwrite(file, buf, (unsigned)len); +} +#else /* not ANSI C */ + +int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) + gzFile file; + const char *format; + int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; +{ + char buf[Z_PRINTF_BUFSIZE]; + int len; + +#ifdef HAS_snprintf + snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +#else + sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +#endif + len = strlen(buf); /* old sprintf doesn't return the nb of bytes written */ + if (len <= 0) return 0; + + return gzwrite(file, buf, len); +} +#endif + +/* =========================================================================== + Writes c, converted to an unsigned char, into the compressed file. + gzputc returns the value that was written, or -1 in case of error. +*/ +int ZEXPORT gzputc(file, c) + gzFile file; + int c; +{ + unsigned char cc = (unsigned char) c; /* required for big endian systems */ + + return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1; +} + + +/* =========================================================================== + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + gzputs returns the number of characters written, or -1 in case of error. +*/ +int ZEXPORT gzputs(file, s) + gzFile file; + const char *s; +{ + return gzwrite(file, (char*)s, (unsigned)strlen(s)); +} + + +/* =========================================================================== + Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. +*/ +local int do_flush (file, flush) + gzFile file; + int flush; +{ + uInt len; + int done = 0; + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + s->stream.avail_in = 0; /* should be zero already anyway */ + + for (;;) { + len = Z_BUFSIZE - s->stream.avail_out; + + if (len != 0) { + if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) { + s->z_err = Z_ERRNO; + return Z_ERRNO; + } + s->stream.next_out = s->outbuf; + s->stream.avail_out = Z_BUFSIZE; + } + if (done) break; + s->z_err = deflate(&(s->stream), flush); + + /* Ignore the second of two consecutive flushes: */ + if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK; + + /* deflate has finished flushing only when it hasn't used up + * all the available space in the output buffer: + */ + done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END); + + if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break; + } + return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; +} + +int ZEXPORT gzflush (file, flush) + gzFile file; + int flush; +{ + gz_stream *s = (gz_stream*)file; + int err = do_flush (file, flush); + + if (err) return err; + fflush(s->file); + return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; +} +#endif /* NO_DEFLATE */ + +/* =========================================================================== + Sets the starting position for the next gzread or gzwrite on the given + compressed file. The offset represents a number of bytes in the + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error. + SEEK_END is not implemented, returns error. + In this version of the library, gzseek can be extremely slow. +*/ +z_off_t ZEXPORT gzseek (file, offset, whence) + gzFile file; + z_off_t offset; + int whence; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || whence == SEEK_END || + s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) { + return -1L; + } + + if (s->mode == 'w') { +#ifdef NO_DEFLATE + return -1L; +#else + if (whence == SEEK_SET) { + offset -= s->stream.total_in; + } + if (offset < 0) return -1L; + + /* At this point, offset is the number of zero bytes to write. */ + if (s->inbuf == Z_NULL) { + s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */ + zmemzero(s->inbuf, Z_BUFSIZE); + } + while (offset > 0) { + uInt size = Z_BUFSIZE; + if (offset < Z_BUFSIZE) size = (uInt)offset; + + size = gzwrite(file, s->inbuf, size); + if (size == 0) return -1L; + + offset -= size; + } + return (z_off_t)s->stream.total_in; +#endif + } + /* Rest of function is for reading only */ + + /* compute absolute position */ + if (whence == SEEK_CUR) { + offset += s->stream.total_out; + } + if (offset < 0) return -1L; + + if (s->transparent) { + /* map to fseek */ + s->stream.avail_in = 0; + s->stream.next_in = s->inbuf; + if (fseek(s->file, offset, SEEK_SET) < 0) return -1L; + + s->stream.total_in = s->stream.total_out = (uLong)offset; + return offset; + } + + /* For a negative seek, rewind and use positive seek */ + if ((uLong)offset >= s->stream.total_out) { + offset -= s->stream.total_out; + } else if (gzrewind(file) < 0) { + return -1L; + } + /* offset is now the number of bytes to skip. */ + + if (offset != 0 && s->outbuf == Z_NULL) { + s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); + } + while (offset > 0) { + int size = Z_BUFSIZE; + if (offset < Z_BUFSIZE) size = (int)offset; + + size = gzread(file, s->outbuf, (uInt)size); + if (size <= 0) return -1L; + offset -= size; + } + return (z_off_t)s->stream.total_out; +} + +/* =========================================================================== + Rewinds input file. +*/ +int ZEXPORT gzrewind (file) + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'r') return -1; + + s->z_err = Z_OK; + s->z_eof = 0; + s->stream.avail_in = 0; + s->stream.next_in = s->inbuf; + s->crc = crc32(0L, Z_NULL, 0); + + if (s->startpos == 0) { /* not a compressed file */ + rewind(s->file); + return 0; + } + + (void) inflateReset(&s->stream); + return fseek(s->file, s->startpos, SEEK_SET); +} + +/* =========================================================================== + Returns the starting position for the next gzread or gzwrite on the + given compressed file. This position represents a number of bytes in the + uncompressed data stream. +*/ +z_off_t ZEXPORT gztell (file) + gzFile file; +{ + return gzseek(file, 0L, SEEK_CUR); +} + +/* =========================================================================== + Returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. +*/ +int ZEXPORT gzeof (file) + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + return (s == NULL || s->mode != 'r') ? 0 : s->z_eof; +} + +/* =========================================================================== + Outputs a long in LSB order to the given file +*/ +local void putLong (file, x) + FILE *file; + uLong x; +{ + int n; + for (n = 0; n < 4; n++) { + fputc((int)(x & 0xff), file); + x >>= 8; + } +} + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets z_err in case + of error. +*/ +local uLong getLong (s) + gz_stream *s; +{ + uLong x = (uLong)get_byte(s); + int c; + + x += ((uLong)get_byte(s))<<8; + x += ((uLong)get_byte(s))<<16; + c = get_byte(s); + if (c == EOF) s->z_err = Z_DATA_ERROR; + x += ((uLong)c)<<24; + return x; +} + +/* =========================================================================== + Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. +*/ +int ZEXPORT gzclose (file) + gzFile file; +{ + int err; + gz_stream *s = (gz_stream*)file; + + if (s == NULL) return Z_STREAM_ERROR; + + if (s->mode == 'w') { +#ifdef NO_DEFLATE + return Z_STREAM_ERROR; +#else + err = do_flush (file, Z_FINISH); + if (err != Z_OK) return destroy((gz_stream*)file); + + putLong (s->file, s->crc); + putLong (s->file, s->stream.total_in); +#endif + } + return destroy((gz_stream*)file); +} + +/* =========================================================================== + Returns the error message for the last error which occured on the + given compressed file. errnum is set to zlib error number. If an + error occured in the file system and not in the compression library, + errnum is set to Z_ERRNO and the application may consult errno + to get the exact error code. +*/ +const char* ZEXPORT gzerror (file, errnum) + gzFile file; + int *errnum; +{ + char *m; + gz_stream *s = (gz_stream*)file; + + if (s == NULL) { + *errnum = Z_STREAM_ERROR; + return (const char*)ERR_MSG(Z_STREAM_ERROR); + } + *errnum = s->z_err; + if (*errnum == Z_OK) return (const char*)""; + + m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg); + + if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err); + + TRYFREE(s->msg); + s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); + strcpy(s->msg, s->path); + strcat(s->msg, ": "); + strcat(s->msg, m); + return (const char*)s->msg; +} diff --git a/win32/zlib/infblock.c b/win32/zlib/infblock.c new file mode 100644 index 00000000..dd7a6d40 --- /dev/null +++ b/win32/zlib/infblock.c @@ -0,0 +1,403 @@ +/* infblock.c -- interpret and process block types to last block + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "infblock.h" +#include "inftrees.h" +#include "infcodes.h" +#include "infutil.h" + +struct inflate_codes_state {int dummy;}; /* for buggy compilers */ + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +/* Table for deflate from PKZIP's appnote.txt. */ +local const uInt border[] = { /* Order of the bit length code lengths */ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + +/* + Notes beyond the 1.93a appnote.txt: + + 1. Distance pointers never point before the beginning of the output + stream. + 2. Distance pointers can point back across blocks, up to 32k away. + 3. There is an implied maximum of 7 bits for the bit length table and + 15 bits for the actual data. + 4. If only one code exists, then it is encoded using one bit. (Zero + would be more efficient, but perhaps a little confusing.) If two + codes exist, they are coded using one bit each (0 and 1). + 5. There is no way of sending zero distance codes--a dummy must be + sent if there are none. (History: a pre 2.0 version of PKZIP would + store blocks with no distance codes, but this was discovered to be + too harsh a criterion.) Valid only for 1.93a. 2.04c does allow + zero distance codes, which is sent as one code of zero bits in + length. + 6. There are up to 286 literal/length codes. Code 256 represents the + end-of-block. Note however that the static length tree defines + 288 codes just to fill out the Huffman codes. Codes 286 and 287 + cannot be used though, since there is no length base or extra bits + defined for them. Similarily, there are up to 30 distance codes. + However, static trees define 32 codes (all 5 bits) to fill out the + Huffman codes, but the last two had better not show up in the data. + 7. Unzip can check dynamic Huffman blocks for complete code sets. + The exception is that a single code would not be complete (see #4). + 8. The five bits following the block type is really the number of + literal codes sent minus 257. + 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits + (1+6+6). Therefore, to output three times the length, you output + three codes (1+1+1), whereas to output four times the same length, + you only need two codes (1+3). Hmm. + 10. In the tree reconstruction algorithm, Code = Code + Increment + only if BitLength(i) is not zero. (Pretty obvious.) + 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) + 12. Note: length code 284 can represent 227-258, but length code 285 + really is 258. The last length deserves its own, short code + since it gets used a lot in very redundant files. The length + 258 is special since 258 - 3 (the min match length) is 255. + 13. The literal/length and distance code bit lengths are read as a + single stream of lengths. It is possible (and advantageous) for + a repeat code (16, 17, or 18) to go across the boundary between + the two sets of lengths. + */ + + +void inflate_blocks_reset(s, z, c) +inflate_blocks_statef *s; +z_streamp z; +uLongf *c; +{ + if (c != Z_NULL) + *c = s->check; + if (s->mode == BTREE || s->mode == DTREE) + ZFREE(z, s->sub.trees.blens); + if (s->mode == CODES) + inflate_codes_free(s->sub.decode.codes, z); + s->mode = TYPE; + s->bitk = 0; + s->bitb = 0; + s->read = s->write = s->window; + if (s->checkfn != Z_NULL) + z->adler = s->check = (*s->checkfn)(0L, (const Bytef *)Z_NULL, 0); + Tracev((stderr, "inflate: blocks reset\n")); +} + + +inflate_blocks_statef *inflate_blocks_new(z, c, w) +z_streamp z; +check_func c; +uInt w; +{ + inflate_blocks_statef *s; + + if ((s = (inflate_blocks_statef *)ZALLOC + (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL) + return s; + if ((s->hufts = + (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL) + { + ZFREE(z, s); + return Z_NULL; + } + if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL) + { + ZFREE(z, s->hufts); + ZFREE(z, s); + return Z_NULL; + } + s->end = s->window + w; + s->checkfn = c; + s->mode = TYPE; + Tracev((stderr, "inflate: blocks allocated\n")); + inflate_blocks_reset(s, z, Z_NULL); + return s; +} + + +int inflate_blocks(s, z, r) +inflate_blocks_statef *s; +z_streamp z; +int r; +{ + uInt t; /* temporary storage */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Bytef *p; /* input data pointer */ + uInt n; /* bytes available there */ + Bytef *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + + /* copy input/output information to locals (UPDATE macro restores) */ + LOAD + + /* process input based on current state */ + while (1) switch (s->mode) + { + case TYPE: + NEEDBITS(3) + t = (uInt)b & 7; + s->last = t & 1; + switch (t >> 1) + { + case 0: /* stored */ + Tracev((stderr, "inflate: stored block%s\n", + s->last ? " (last)" : "")); + DUMPBITS(3) + t = k & 7; /* go to byte boundary */ + DUMPBITS(t) + s->mode = LENS; /* get length of stored block */ + break; + case 1: /* fixed */ + Tracev((stderr, "inflate: fixed codes block%s\n", + s->last ? " (last)" : "")); + { + uInt bl, bd; + inflate_huft *tl, *td; + + inflate_trees_fixed(&bl, &bd, &tl, &td, z); + s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z); + if (s->sub.decode.codes == Z_NULL) + { + r = Z_MEM_ERROR; + LEAVE + } + } + DUMPBITS(3) + s->mode = CODES; + break; + case 2: /* dynamic */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + s->last ? " (last)" : "")); + DUMPBITS(3) + s->mode = TABLE; + break; + case 3: /* illegal */ + DUMPBITS(3) + s->mode = BAD; + z->msg = (char*)"invalid block type"; + r = Z_DATA_ERROR; + LEAVE + } + break; + case LENS: + NEEDBITS(32) + if ((((~b) >> 16) & 0xffff) != (b & 0xffff)) + { + s->mode = BAD; + z->msg = (char*)"invalid stored block lengths"; + r = Z_DATA_ERROR; + LEAVE + } + s->sub.left = (uInt)b & 0xffff; + b = k = 0; /* dump bits */ + Tracev((stderr, "inflate: stored length %u\n", s->sub.left)); + s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE); + break; + case STORED: + if (n == 0) + LEAVE + NEEDOUT + t = s->sub.left; + if (t > n) t = n; + if (t > m) t = m; + zmemcpy(q, p, t); + p += t; n -= t; + q += t; m -= t; + if ((s->sub.left -= t) != 0) + break; + Tracev((stderr, "inflate: stored end, %lu total out\n", + z->total_out + (q >= s->read ? q - s->read : + (s->end - s->read) + (q - s->window)))); + s->mode = s->last ? DRY : TYPE; + break; + case TABLE: + NEEDBITS(14) + s->sub.trees.table = t = (uInt)b & 0x3fff; +#ifndef PKZIP_BUG_WORKAROUND + if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) + { + s->mode = BAD; + z->msg = (char*)"too many length or distance symbols"; + r = Z_DATA_ERROR; + LEAVE + } +#endif + t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); + if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL) + { + r = Z_MEM_ERROR; + LEAVE + } + DUMPBITS(14) + s->sub.trees.index = 0; + Tracev((stderr, "inflate: table sizes ok\n")); + s->mode = BTREE; + case BTREE: + while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10)) + { + NEEDBITS(3) + s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7; + DUMPBITS(3) + } + while (s->sub.trees.index < 19) + s->sub.trees.blens[border[s->sub.trees.index++]] = 0; + s->sub.trees.bb = 7; + t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb, + &s->sub.trees.tb, s->hufts, z); + if (t != Z_OK) + { + r = t; + if (r == Z_DATA_ERROR) + { + ZFREE(z, s->sub.trees.blens); + s->mode = BAD; + } + LEAVE + } + s->sub.trees.index = 0; + Tracev((stderr, "inflate: bits tree ok\n")); + s->mode = DTREE; + case DTREE: + while (t = s->sub.trees.table, + s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) + { + inflate_huft *h; + uInt i, j, c; + + t = s->sub.trees.bb; + NEEDBITS(t) + h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]); + t = h->bits; + c = h->base; + if (c < 16) + { + DUMPBITS(t) + s->sub.trees.blens[s->sub.trees.index++] = c; + } + else /* c == 16..18 */ + { + i = c == 18 ? 7 : c - 14; + j = c == 18 ? 11 : 3; + NEEDBITS(t + i) + DUMPBITS(t) + j += (uInt)b & inflate_mask[i]; + DUMPBITS(i) + i = s->sub.trees.index; + t = s->sub.trees.table; + if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || + (c == 16 && i < 1)) + { + ZFREE(z, s->sub.trees.blens); + s->mode = BAD; + z->msg = (char*)"invalid bit length repeat"; + r = Z_DATA_ERROR; + LEAVE + } + c = c == 16 ? s->sub.trees.blens[i - 1] : 0; + do { + s->sub.trees.blens[i++] = c; + } while (--j); + s->sub.trees.index = i; + } + } + s->sub.trees.tb = Z_NULL; + { + uInt bl, bd; + inflate_huft *tl, *td; + inflate_codes_statef *c; + + bl = 9; /* must be <= 9 for lookahead assumptions */ + bd = 6; /* must be <= 9 for lookahead assumptions */ + t = s->sub.trees.table; + t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), + s->sub.trees.blens, &bl, &bd, &tl, &td, + s->hufts, z); + if (t != Z_OK) + { + if (t == (uInt)Z_DATA_ERROR) + { + ZFREE(z, s->sub.trees.blens); + s->mode = BAD; + } + r = t; + LEAVE + } + Tracev((stderr, "inflate: trees ok\n")); + if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL) + { + r = Z_MEM_ERROR; + LEAVE + } + s->sub.decode.codes = c; + } + ZFREE(z, s->sub.trees.blens); + s->mode = CODES; + case CODES: + UPDATE + if ((r = inflate_codes(s, z, r)) != Z_STREAM_END) + return inflate_flush(s, z, r); + r = Z_OK; + inflate_codes_free(s->sub.decode.codes, z); + LOAD + Tracev((stderr, "inflate: codes end, %lu total out\n", + z->total_out + (q >= s->read ? q - s->read : + (s->end - s->read) + (q - s->window)))); + if (!s->last) + { + s->mode = TYPE; + break; + } + s->mode = DRY; + case DRY: + FLUSH + if (s->read != s->write) + LEAVE + s->mode = DONE; + case DONE: + r = Z_STREAM_END; + LEAVE + case BAD: + r = Z_DATA_ERROR; + LEAVE + default: + r = Z_STREAM_ERROR; + LEAVE + } +} + + +int inflate_blocks_free(s, z) +inflate_blocks_statef *s; +z_streamp z; +{ + inflate_blocks_reset(s, z, Z_NULL); + ZFREE(z, s->window); + ZFREE(z, s->hufts); + ZFREE(z, s); + Tracev((stderr, "inflate: blocks freed\n")); + return Z_OK; +} + + +void inflate_set_dictionary(s, d, n) +inflate_blocks_statef *s; +const Bytef *d; +uInt n; +{ + zmemcpy(s->window, d, n); + s->read = s->write = s->window + n; +} + + +/* Returns true if inflate is currently at the end of a block generated + * by Z_SYNC_FLUSH or Z_FULL_FLUSH. + * IN assertion: s != Z_NULL + */ +int inflate_blocks_sync_point(s) +inflate_blocks_statef *s; +{ + return s->mode == LENS; +} diff --git a/win32/zlib/infblock.h b/win32/zlib/infblock.h new file mode 100644 index 00000000..173b2267 --- /dev/null +++ b/win32/zlib/infblock.h @@ -0,0 +1,39 @@ +/* infblock.h -- header to use infblock.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +struct inflate_blocks_state; +typedef struct inflate_blocks_state FAR inflate_blocks_statef; + +extern inflate_blocks_statef * inflate_blocks_new OF(( + z_streamp z, + check_func c, /* check function */ + uInt w)); /* window size */ + +extern int inflate_blocks OF(( + inflate_blocks_statef *, + z_streamp , + int)); /* initial return code */ + +extern void inflate_blocks_reset OF(( + inflate_blocks_statef *, + z_streamp , + uLongf *)); /* check value on output */ + +extern int inflate_blocks_free OF(( + inflate_blocks_statef *, + z_streamp)); + +extern void inflate_set_dictionary OF(( + inflate_blocks_statef *s, + const Bytef *d, /* dictionary */ + uInt n)); /* dictionary length */ + +extern int inflate_blocks_sync_point OF(( + inflate_blocks_statef *s)); diff --git a/win32/zlib/infcodes.c b/win32/zlib/infcodes.c new file mode 100644 index 00000000..9abe5412 --- /dev/null +++ b/win32/zlib/infcodes.c @@ -0,0 +1,251 @@ +/* infcodes.c -- process literals and length/distance pairs + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" +#include "infblock.h" +#include "infcodes.h" +#include "infutil.h" +#include "inffast.h" + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +typedef enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ + START, /* x: set up for LEN */ + LEN, /* i: get length/literal/eob next */ + LENEXT, /* i: getting length extra (have base) */ + DIST, /* i: get distance next */ + DISTEXT, /* i: getting distance extra */ + COPY, /* o: copying bytes in window, waiting for space */ + LIT, /* o: got literal, waiting for output space */ + WASH, /* o: got eob, possibly still output waiting */ + END, /* x: got eob and all data flushed */ + BADCODE} /* x: got error */ +inflate_codes_mode; + +/* inflate codes private state */ +struct inflate_codes_state { + + /* mode */ + inflate_codes_mode mode; /* current inflate_codes mode */ + + /* mode dependent information */ + uInt len; + union { + struct { + inflate_huft *tree; /* pointer into tree */ + uInt need; /* bits needed */ + } code; /* if LEN or DIST, where in tree */ + uInt lit; /* if LIT, literal */ + struct { + uInt get; /* bits to get for extra */ + uInt dist; /* distance back to copy from */ + } copy; /* if EXT or COPY, where and how much */ + } sub; /* submode */ + + /* mode independent information */ + Byte lbits; /* ltree bits decoded per branch */ + Byte dbits; /* dtree bits decoder per branch */ + inflate_huft *ltree; /* literal/length/eob tree */ + inflate_huft *dtree; /* distance tree */ + +}; + + +inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z) +uInt bl, bd; +inflate_huft *tl; +inflate_huft *td; /* need separate declaration for Borland C++ */ +z_streamp z; +{ + inflate_codes_statef *c; + + if ((c = (inflate_codes_statef *) + ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL) + { + c->mode = START; + c->lbits = (Byte)bl; + c->dbits = (Byte)bd; + c->ltree = tl; + c->dtree = td; + Tracev((stderr, "inflate: codes new\n")); + } + return c; +} + + +int inflate_codes(s, z, r) +inflate_blocks_statef *s; +z_streamp z; +int r; +{ + uInt j; /* temporary storage */ + inflate_huft *t; /* temporary pointer */ + uInt e; /* extra bits or operation */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Bytef *p; /* input data pointer */ + uInt n; /* bytes available there */ + Bytef *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + Bytef *f; /* pointer to copy strings from */ + inflate_codes_statef *c = s->sub.decode.codes; /* codes state */ + + /* copy input/output information to locals (UPDATE macro restores) */ + LOAD + + /* process input and output based on current state */ + while (1) switch (c->mode) + { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ + case START: /* x: set up for LEN */ +#ifndef SLOW + if (m >= 258 && n >= 10) + { + UPDATE + r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z); + LOAD + if (r != Z_OK) + { + c->mode = r == Z_STREAM_END ? WASH : BADCODE; + break; + } + } +#endif /* !SLOW */ + c->sub.code.need = c->lbits; + c->sub.code.tree = c->ltree; + c->mode = LEN; + case LEN: /* i: get length/literal/eob next */ + j = c->sub.code.need; + NEEDBITS(j) + t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); + DUMPBITS(t->bits) + e = (uInt)(t->exop); + if (e == 0) /* literal */ + { + c->sub.lit = t->base; + Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", t->base)); + c->mode = LIT; + break; + } + if (e & 16) /* length */ + { + c->sub.copy.get = e & 15; + c->len = t->base; + c->mode = LENEXT; + break; + } + if ((e & 64) == 0) /* next table */ + { + c->sub.code.need = e; + c->sub.code.tree = t + t->base; + break; + } + if (e & 32) /* end of block */ + { + Tracevv((stderr, "inflate: end of block\n")); + c->mode = WASH; + break; + } + c->mode = BADCODE; /* invalid code */ + z->msg = (char*)"invalid literal/length code"; + r = Z_DATA_ERROR; + LEAVE + case LENEXT: /* i: getting length extra (have base) */ + j = c->sub.copy.get; + NEEDBITS(j) + c->len += (uInt)b & inflate_mask[j]; + DUMPBITS(j) + c->sub.code.need = c->dbits; + c->sub.code.tree = c->dtree; + Tracevv((stderr, "inflate: length %u\n", c->len)); + c->mode = DIST; + case DIST: /* i: get distance next */ + j = c->sub.code.need; + NEEDBITS(j) + t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); + DUMPBITS(t->bits) + e = (uInt)(t->exop); + if (e & 16) /* distance */ + { + c->sub.copy.get = e & 15; + c->sub.copy.dist = t->base; + c->mode = DISTEXT; + break; + } + if ((e & 64) == 0) /* next table */ + { + c->sub.code.need = e; + c->sub.code.tree = t + t->base; + break; + } + c->mode = BADCODE; /* invalid code */ + z->msg = (char*)"invalid distance code"; + r = Z_DATA_ERROR; + LEAVE + case DISTEXT: /* i: getting distance extra */ + j = c->sub.copy.get; + NEEDBITS(j) + c->sub.copy.dist += (uInt)b & inflate_mask[j]; + DUMPBITS(j) + Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); + c->mode = COPY; + case COPY: /* o: copying bytes in window, waiting for space */ + f = q - c->sub.copy.dist; + while (f < s->window) /* modulo window size-"while" instead */ + f += s->end - s->window; /* of "if" handles invalid distances */ + while (c->len) + { + NEEDOUT + OUTBYTE(*f++) + if (f == s->end) + f = s->window; + c->len--; + } + c->mode = START; + break; + case LIT: /* o: got literal, waiting for output space */ + NEEDOUT + OUTBYTE(c->sub.lit) + c->mode = START; + break; + case WASH: /* o: got eob, possibly more output */ + if (k > 7) /* return unused byte, if any */ + { + Assert(k < 16, "inflate_codes grabbed too many bytes") + k -= 8; + n++; + p--; /* can always return one */ + } + FLUSH + if (s->read != s->write) + LEAVE + c->mode = END; + case END: + r = Z_STREAM_END; + LEAVE + case BADCODE: /* x: got error */ + r = Z_DATA_ERROR; + LEAVE + default: + r = Z_STREAM_ERROR; + LEAVE + } +#ifdef NEED_DUMMY_RETURN + return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ +#endif +} + + +void inflate_codes_free(c, z) +inflate_codes_statef *c; +z_streamp z; +{ + ZFREE(z, c); + Tracev((stderr, "inflate: codes free\n")); +} diff --git a/win32/zlib/infcodes.h b/win32/zlib/infcodes.h new file mode 100644 index 00000000..46821a02 --- /dev/null +++ b/win32/zlib/infcodes.h @@ -0,0 +1,27 @@ +/* infcodes.h -- header to use infcodes.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +struct inflate_codes_state; +typedef struct inflate_codes_state FAR inflate_codes_statef; + +extern inflate_codes_statef *inflate_codes_new OF(( + uInt, uInt, + inflate_huft *, inflate_huft *, + z_streamp )); + +extern int inflate_codes OF(( + inflate_blocks_statef *, + z_streamp , + int)); + +extern void inflate_codes_free OF(( + inflate_codes_statef *, + z_streamp )); + diff --git a/win32/zlib/inffast.c b/win32/zlib/inffast.c new file mode 100644 index 00000000..aa7f1d4d --- /dev/null +++ b/win32/zlib/inffast.c @@ -0,0 +1,183 @@ +/* inffast.c -- process literals and length/distance pairs fast + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" +#include "infblock.h" +#include "infcodes.h" +#include "infutil.h" +#include "inffast.h" + +struct inflate_codes_state {int dummy;}; /* for buggy compilers */ + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +/* macros for bit input with no checking and for returning unused bytes */ +#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<avail_in-n;c=(k>>3)>3:c;n+=c;p-=c;k-=c<<3;} + +/* Called with number of bytes left to write in window at least 258 + (the maximum string length) and number of input bytes available + at least ten. The ten bytes are six bytes for the longest length/ + distance pair plus four bytes for overloading the bit buffer. */ + +int inflate_fast(bl, bd, tl, td, s, z) +uInt bl, bd; +inflate_huft *tl; +inflate_huft *td; /* need separate declaration for Borland C++ */ +inflate_blocks_statef *s; +z_streamp z; +{ + inflate_huft *t; /* temporary pointer */ + uInt e; /* extra bits or operation */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Bytef *p; /* input data pointer */ + uInt n; /* bytes available there */ + Bytef *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + uInt ml; /* mask for literal/length tree */ + uInt md; /* mask for distance tree */ + uInt c; /* bytes to copy */ + uInt d; /* distance back to copy from */ + Bytef *r; /* copy source pointer */ + + /* load input, output, bit values */ + LOAD + + /* initialize masks */ + ml = inflate_mask[bl]; + md = inflate_mask[bd]; + + /* do until not enough input or output space for fast loop */ + do { /* assume called with m >= 258 && n >= 10 */ + /* get literal/length code */ + GRABBITS(20) /* max bits for literal/length code */ + if ((e = (t = tl + ((uInt)b & ml))->exop) == 0) + { + DUMPBITS(t->bits) + Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? + "inflate: * literal '%c'\n" : + "inflate: * literal 0x%02x\n", t->base)); + *q++ = (Byte)t->base; + m--; + continue; + } + do { + DUMPBITS(t->bits) + if (e & 16) + { + /* get extra bits for length */ + e &= 15; + c = t->base + ((uInt)b & inflate_mask[e]); + DUMPBITS(e) + Tracevv((stderr, "inflate: * length %u\n", c)); + + /* decode distance base of block to copy */ + GRABBITS(15); /* max bits for distance code */ + e = (t = td + ((uInt)b & md))->exop; + do { + DUMPBITS(t->bits) + if (e & 16) + { + /* get extra bits to add to distance base */ + e &= 15; + GRABBITS(e) /* get extra bits (up to 13) */ + d = t->base + ((uInt)b & inflate_mask[e]); + DUMPBITS(e) + Tracevv((stderr, "inflate: * distance %u\n", d)); + + /* do the copy */ + m -= c; + r = q - d; + if (r < s->window) /* wrap if needed */ + { + do { + r += s->end - s->window; /* force pointer in window */ + } while (r < s->window); /* covers invalid distances */ + e = s->end - r; + if (c > e) + { + c -= e; /* wrapped copy */ + do { + *q++ = *r++; + } while (--e); + r = s->window; + do { + *q++ = *r++; + } while (--c); + } + else /* normal copy */ + { + *q++ = *r++; c--; + *q++ = *r++; c--; + do { + *q++ = *r++; + } while (--c); + } + } + else /* normal copy */ + { + *q++ = *r++; c--; + *q++ = *r++; c--; + do { + *q++ = *r++; + } while (--c); + } + break; + } + else if ((e & 64) == 0) + { + t += t->base; + e = (t += ((uInt)b & inflate_mask[e]))->exop; + } + else + { + z->msg = (char*)"invalid distance code"; + UNGRAB + UPDATE + return Z_DATA_ERROR; + } + } while (1); + break; + } + if ((e & 64) == 0) + { + t += t->base; + if ((e = (t += ((uInt)b & inflate_mask[e]))->exop) == 0) + { + DUMPBITS(t->bits) + Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? + "inflate: * literal '%c'\n" : + "inflate: * literal 0x%02x\n", t->base)); + *q++ = (Byte)t->base; + m--; + break; + } + } + else if (e & 32) + { + Tracevv((stderr, "inflate: * end of block\n")); + UNGRAB + UPDATE + return Z_STREAM_END; + } + else + { + z->msg = (char*)"invalid literal/length code"; + UNGRAB + UPDATE + return Z_DATA_ERROR; + } + } while (1); + } while (m >= 258 && n >= 10); + + /* not enough input or output--restore pointers and return */ + UNGRAB + UPDATE + return Z_OK; +} diff --git a/win32/zlib/inffast.h b/win32/zlib/inffast.h new file mode 100644 index 00000000..a31a4bbb --- /dev/null +++ b/win32/zlib/inffast.h @@ -0,0 +1,17 @@ +/* inffast.h -- header to use inffast.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +extern int inflate_fast OF(( + uInt, + uInt, + inflate_huft *, + inflate_huft *, + inflate_blocks_statef *, + z_streamp )); diff --git a/win32/zlib/inffixed.h b/win32/zlib/inffixed.h new file mode 100644 index 00000000..77f7e763 --- /dev/null +++ b/win32/zlib/inffixed.h @@ -0,0 +1,151 @@ +/* inffixed.h -- table for decoding fixed codes + * Generated automatically by the maketree.c program + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +local uInt fixed_bl = 9; +local uInt fixed_bd = 5; +local inflate_huft fixed_tl[] = { + {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115}, + {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},192}, + {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},160}, + {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},224}, + {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},144}, + {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},208}, + {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},176}, + {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},240}, + {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227}, + {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},200}, + {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},168}, + {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},232}, + {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},152}, + {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},216}, + {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},184}, + {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},248}, + {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163}, + {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},196}, + {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},164}, + {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},228}, + {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},148}, + {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},212}, + {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},180}, + {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},244}, + {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},204}, + {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},172}, + {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},236}, + {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},156}, + {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},220}, + {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},188}, + {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},252}, + {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131}, + {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},194}, + {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},162}, + {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},226}, + {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},146}, + {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},210}, + {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},178}, + {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},242}, + {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258}, + {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},202}, + {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},170}, + {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},234}, + {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},154}, + {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},218}, + {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},186}, + {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},250}, + {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195}, + {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},198}, + {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},166}, + {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},230}, + {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},150}, + {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},214}, + {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},182}, + {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},246}, + {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},206}, + {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},174}, + {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},238}, + {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},158}, + {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},222}, + {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},190}, + {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},254}, + {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115}, + {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},193}, + {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},161}, + {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},225}, + {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},145}, + {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},209}, + {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},177}, + {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},241}, + {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227}, + {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},201}, + {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},169}, + {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},233}, + {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},153}, + {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},217}, + {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},185}, + {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},249}, + {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163}, + {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},197}, + {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},165}, + {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},229}, + {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},149}, + {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},213}, + {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},181}, + {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},245}, + {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},205}, + {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},173}, + {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},237}, + {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},157}, + {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},221}, + {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},189}, + {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},253}, + {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131}, + {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},195}, + {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},163}, + {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},227}, + {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},147}, + {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},211}, + {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},179}, + {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},243}, + {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258}, + {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},203}, + {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},171}, + {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},235}, + {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},155}, + {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},219}, + {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},187}, + {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},251}, + {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195}, + {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},199}, + {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},167}, + {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},231}, + {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},151}, + {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},215}, + {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},183}, + {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},247}, + {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0}, + {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},207}, + {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},175}, + {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},239}, + {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},159}, + {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},223}, + {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},191}, + {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},255} + }; +local inflate_huft fixed_td[] = { + {{{80,5}},1}, {{{87,5}},257}, {{{83,5}},17}, {{{91,5}},4097}, + {{{81,5}},5}, {{{89,5}},1025}, {{{85,5}},65}, {{{93,5}},16385}, + {{{80,5}},3}, {{{88,5}},513}, {{{84,5}},33}, {{{92,5}},8193}, + {{{82,5}},9}, {{{90,5}},2049}, {{{86,5}},129}, {{{192,5}},24577}, + {{{80,5}},2}, {{{87,5}},385}, {{{83,5}},25}, {{{91,5}},6145}, + {{{81,5}},7}, {{{89,5}},1537}, {{{85,5}},97}, {{{93,5}},24577}, + {{{80,5}},4}, {{{88,5}},769}, {{{84,5}},49}, {{{92,5}},12289}, + {{{82,5}},13}, {{{90,5}},3073}, {{{86,5}},193}, {{{192,5}},24577} + }; diff --git a/win32/zlib/inflate.c b/win32/zlib/inflate.c new file mode 100644 index 00000000..dfb2e867 --- /dev/null +++ b/win32/zlib/inflate.c @@ -0,0 +1,366 @@ +/* inflate.c -- zlib interface to inflate modules + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "infblock.h" + +struct inflate_blocks_state {int dummy;}; /* for buggy compilers */ + +typedef enum { + METHOD, /* waiting for method byte */ + FLAG, /* waiting for flag byte */ + DICT4, /* four dictionary check bytes to go */ + DICT3, /* three dictionary check bytes to go */ + DICT2, /* two dictionary check bytes to go */ + DICT1, /* one dictionary check byte to go */ + DICT0, /* waiting for inflateSetDictionary */ + BLOCKS, /* decompressing blocks */ + CHECK4, /* four check bytes to go */ + CHECK3, /* three check bytes to go */ + CHECK2, /* two check bytes to go */ + CHECK1, /* one check byte to go */ + DONE, /* finished check, done */ + BAD} /* got an error--stay here */ +inflate_mode; + +/* inflate private state */ +struct internal_state { + + /* mode */ + inflate_mode mode; /* current inflate mode */ + + /* mode dependent information */ + union { + uInt method; /* if FLAGS, method byte */ + struct { + uLong was; /* computed check value */ + uLong need; /* stream check value */ + } check; /* if CHECK, check values to compare */ + uInt marker; /* if BAD, inflateSync's marker bytes count */ + } sub; /* submode */ + + /* mode independent information */ + int nowrap; /* flag for no wrapper */ + uInt wbits; /* log2(window size) (8..15, defaults to 15) */ + inflate_blocks_statef + *blocks; /* current inflate_blocks state */ + +}; + + +int ZEXPORT inflateReset(z) +z_streamp z; +{ + if (z == Z_NULL || z->state == Z_NULL) + return Z_STREAM_ERROR; + z->total_in = z->total_out = 0; + z->msg = Z_NULL; + z->state->mode = z->state->nowrap ? BLOCKS : METHOD; + inflate_blocks_reset(z->state->blocks, z, Z_NULL); + Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + + +int ZEXPORT inflateEnd(z) +z_streamp z; +{ + if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL) + return Z_STREAM_ERROR; + if (z->state->blocks != Z_NULL) + inflate_blocks_free(z->state->blocks, z); + ZFREE(z, z->state); + z->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} + + +int ZEXPORT inflateInit2_(z, w, version, stream_size) +z_streamp z; +int w; +const char *version; +int stream_size; +{ + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != sizeof(z_stream)) + return Z_VERSION_ERROR; + + /* initialize state */ + if (z == Z_NULL) + return Z_STREAM_ERROR; + z->msg = Z_NULL; + if (z->zalloc == Z_NULL) + { + z->zalloc = zcalloc; + z->opaque = (voidpf)0; + } + if (z->zfree == Z_NULL) z->zfree = zcfree; + if ((z->state = (struct internal_state FAR *) + ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL) + return Z_MEM_ERROR; + z->state->blocks = Z_NULL; + + /* handle undocumented nowrap option (no zlib header or check) */ + z->state->nowrap = 0; + if (w < 0) + { + w = - w; + z->state->nowrap = 1; + } + + /* set window size */ + if (w < 8 || w > 15) + { + inflateEnd(z); + return Z_STREAM_ERROR; + } + z->state->wbits = (uInt)w; + + /* create inflate_blocks state */ + if ((z->state->blocks = + inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w)) + == Z_NULL) + { + inflateEnd(z); + return Z_MEM_ERROR; + } + Tracev((stderr, "inflate: allocated\n")); + + /* reset state */ + inflateReset(z); + return Z_OK; +} + + +int ZEXPORT inflateInit_(z, version, stream_size) +z_streamp z; +const char *version; +int stream_size; +{ + return inflateInit2_(z, DEF_WBITS, version, stream_size); +} + + +#define NEEDBYTE {if(z->avail_in==0)return r;r=f;} +#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) + +int ZEXPORT inflate(z, f) +z_streamp z; +int f; +{ + int r; + uInt b; + + if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL) + return Z_STREAM_ERROR; + f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; + r = Z_BUF_ERROR; + while (1) switch (z->state->mode) + { + case METHOD: + NEEDBYTE + if (((z->state->sub.method = NEXTBYTE) & 0xf) != Z_DEFLATED) + { + z->state->mode = BAD; + z->msg = (char*)"unknown compression method"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + if ((z->state->sub.method >> 4) + 8 > z->state->wbits) + { + z->state->mode = BAD; + z->msg = (char*)"invalid window size"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + z->state->mode = FLAG; + case FLAG: + NEEDBYTE + b = NEXTBYTE; + if (((z->state->sub.method << 8) + b) % 31) + { + z->state->mode = BAD; + z->msg = (char*)"incorrect header check"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + Tracev((stderr, "inflate: zlib header ok\n")); + if (!(b & PRESET_DICT)) + { + z->state->mode = BLOCKS; + break; + } + z->state->mode = DICT4; + case DICT4: + NEEDBYTE + z->state->sub.check.need = (uLong)NEXTBYTE << 24; + z->state->mode = DICT3; + case DICT3: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 16; + z->state->mode = DICT2; + case DICT2: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 8; + z->state->mode = DICT1; + case DICT1: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE; + z->adler = z->state->sub.check.need; + z->state->mode = DICT0; + return Z_NEED_DICT; + case DICT0: + z->state->mode = BAD; + z->msg = (char*)"need dictionary"; + z->state->sub.marker = 0; /* can try inflateSync */ + return Z_STREAM_ERROR; + case BLOCKS: + r = inflate_blocks(z->state->blocks, z, r); + if (r == Z_DATA_ERROR) + { + z->state->mode = BAD; + z->state->sub.marker = 0; /* can try inflateSync */ + break; + } + if (r == Z_OK) + r = f; + if (r != Z_STREAM_END) + return r; + r = f; + inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was); + if (z->state->nowrap) + { + z->state->mode = DONE; + break; + } + z->state->mode = CHECK4; + case CHECK4: + NEEDBYTE + z->state->sub.check.need = (uLong)NEXTBYTE << 24; + z->state->mode = CHECK3; + case CHECK3: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 16; + z->state->mode = CHECK2; + case CHECK2: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 8; + z->state->mode = CHECK1; + case CHECK1: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE; + + if (z->state->sub.check.was != z->state->sub.check.need) + { + z->state->mode = BAD; + z->msg = (char*)"incorrect data check"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + Tracev((stderr, "inflate: zlib check ok\n")); + z->state->mode = DONE; + case DONE: + return Z_STREAM_END; + case BAD: + return Z_DATA_ERROR; + default: + return Z_STREAM_ERROR; + } +#ifdef NEED_DUMMY_RETURN + return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ +#endif +} + + +int ZEXPORT inflateSetDictionary(z, dictionary, dictLength) +z_streamp z; +const Bytef *dictionary; +uInt dictLength; +{ + uInt length = dictLength; + + if (z == Z_NULL || z->state == Z_NULL || z->state->mode != DICT0) + return Z_STREAM_ERROR; + + if (adler32(1L, dictionary, dictLength) != z->adler) return Z_DATA_ERROR; + z->adler = 1L; + + if (length >= ((uInt)1<state->wbits)) + { + length = (1<state->wbits)-1; + dictionary += dictLength - length; + } + inflate_set_dictionary(z->state->blocks, dictionary, length); + z->state->mode = BLOCKS; + return Z_OK; +} + + +int ZEXPORT inflateSync(z) +z_streamp z; +{ + uInt n; /* number of bytes to look at */ + Bytef *p; /* pointer to bytes */ + uInt m; /* number of marker bytes found in a row */ + uLong r, w; /* temporaries to save total_in and total_out */ + + /* set up */ + if (z == Z_NULL || z->state == Z_NULL) + return Z_STREAM_ERROR; + if (z->state->mode != BAD) + { + z->state->mode = BAD; + z->state->sub.marker = 0; + } + if ((n = z->avail_in) == 0) + return Z_BUF_ERROR; + p = z->next_in; + m = z->state->sub.marker; + + /* search */ + while (n && m < 4) + { + static const Byte mark[4] = {0, 0, 0xff, 0xff}; + if (*p == mark[m]) + m++; + else if (*p) + m = 0; + else + m = 4 - m; + p++, n--; + } + + /* restore */ + z->total_in += p - z->next_in; + z->next_in = p; + z->avail_in = n; + z->state->sub.marker = m; + + /* return no joy or set up to restart on a new block */ + if (m != 4) + return Z_DATA_ERROR; + r = z->total_in; w = z->total_out; + inflateReset(z); + z->total_in = r; z->total_out = w; + z->state->mode = BLOCKS; + return Z_OK; +} + + +/* Returns true if inflate is currently at the end of a block generated + * by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + * implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH + * but removes the length bytes of the resulting empty stored block. When + * decompressing, PPP checks that at the end of input packet, inflate is + * waiting for these length bytes. + */ +int ZEXPORT inflateSyncPoint(z) +z_streamp z; +{ + if (z == Z_NULL || z->state == Z_NULL || z->state->blocks == Z_NULL) + return Z_STREAM_ERROR; + return inflate_blocks_sync_point(z->state->blocks); +} diff --git a/win32/zlib/inftrees.c b/win32/zlib/inftrees.c new file mode 100644 index 00000000..4c32ca30 --- /dev/null +++ b/win32/zlib/inftrees.c @@ -0,0 +1,454 @@ +/* inftrees.c -- generate Huffman trees for efficient decoding + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" + +#if !defined(BUILDFIXED) && !defined(STDC) +# define BUILDFIXED /* non ANSI compilers may not accept inffixed.h */ +#endif + +const char inflate_copyright[] = + " inflate 1.1.4 Copyright 1995-2002 Mark Adler "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ +struct internal_state {int dummy;}; /* for buggy compilers */ + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + + +local int huft_build OF(( + uIntf *, /* code lengths in bits */ + uInt, /* number of codes */ + uInt, /* number of "simple" codes */ + const uIntf *, /* list of base values for non-simple codes */ + const uIntf *, /* list of extra bits for non-simple codes */ + inflate_huft * FAR*,/* result: starting table */ + uIntf *, /* maximum lookup bits (returns actual) */ + inflate_huft *, /* space for trees */ + uInt *, /* hufts used in space */ + uIntf * )); /* space for values */ + +/* Tables for deflate from PKZIP's appnote.txt. */ +local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; + /* see note #13 above about 258 */ +local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */ +local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577}; +local const uInt cpdext[30] = { /* Extra bits for distance codes */ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, + 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, + 12, 12, 13, 13}; + +/* + Huffman code decoding is performed using a multi-level table lookup. + The fastest way to decode is to simply build a lookup table whose + size is determined by the longest code. However, the time it takes + to build this table can also be a factor if the data being decoded + is not very long. The most common codes are necessarily the + shortest codes, so those codes dominate the decoding time, and hence + the speed. The idea is you can have a shorter table that decodes the + shorter, more probable codes, and then point to subsidiary tables for + the longer codes. The time it costs to decode the longer codes is + then traded against the time it takes to make longer tables. + + This results of this trade are in the variables lbits and dbits + below. lbits is the number of bits the first level table for literal/ + length codes can decode in one step, and dbits is the same thing for + the distance codes. Subsequent tables are also less than or equal to + those sizes. These values may be adjusted either when all of the + codes are shorter than that, in which case the longest code length in + bits is used, or when the shortest code is *longer* than the requested + table size, in which case the length of the shortest code in bits is + used. + + There are two different values for the two tables, since they code a + different number of possibilities each. The literal/length table + codes 286 possible values, or in a flat code, a little over eight + bits. The distance table codes 30 possible values, or a little less + than five bits, flat. The optimum values for speed end up being + about one bit more than those, so lbits is 8+1 and dbits is 5+1. + The optimum values may differ though from machine to machine, and + possibly even between compilers. Your mileage may vary. + */ + + +/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */ +#define BMAX 15 /* maximum bit length of any code */ + +local int huft_build(b, n, s, d, e, t, m, hp, hn, v) +uIntf *b; /* code lengths in bits (all assumed <= BMAX) */ +uInt n; /* number of codes (assumed <= 288) */ +uInt s; /* number of simple-valued codes (0..s-1) */ +const uIntf *d; /* list of base values for non-simple codes */ +const uIntf *e; /* list of extra bits for non-simple codes */ +inflate_huft * FAR *t; /* result: starting table */ +uIntf *m; /* maximum lookup bits, returns actual */ +inflate_huft *hp; /* space for trees */ +uInt *hn; /* hufts used in space */ +uIntf *v; /* working area: values in order of bit length */ +/* Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR + if the given code set is incomplete (the tables are still built in this + case), or Z_DATA_ERROR if the input is invalid. */ +{ + + uInt a; /* counter for codes of length k */ + uInt c[BMAX+1]; /* bit length count table */ + uInt f; /* i repeats in table every f entries */ + int g; /* maximum code length */ + int h; /* table level */ + register uInt i; /* counter, current code */ + register uInt j; /* counter */ + register int k; /* number of bits in current code */ + int l; /* bits per table (returned in m) */ + uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */ + register uIntf *p; /* pointer into c[], b[], or v[] */ + inflate_huft *q; /* points to current table */ + struct inflate_huft_s r; /* table entry for structure assignment */ + inflate_huft *u[BMAX]; /* table stack */ + register int w; /* bits before this table == (l * h) */ + uInt x[BMAX+1]; /* bit offsets, then code stack */ + uIntf *xp; /* pointer into x */ + int y; /* number of dummy codes added */ + uInt z; /* number of entries in current table */ + + + /* Generate counts for each bit length */ + p = c; +#define C0 *p++ = 0; +#define C2 C0 C0 C0 C0 +#define C4 C2 C2 C2 C2 + C4 /* clear c[]--assume BMAX+1 is 16 */ + p = b; i = n; + do { + c[*p++]++; /* assume all entries <= BMAX */ + } while (--i); + if (c[0] == n) /* null input--all zero length codes */ + { + *t = (inflate_huft *)Z_NULL; + *m = 0; + return Z_OK; + } + + + /* Find minimum and maximum length, bound *m by those */ + l = *m; + for (j = 1; j <= BMAX; j++) + if (c[j]) + break; + k = j; /* minimum code length */ + if ((uInt)l < j) + l = j; + for (i = BMAX; i; i--) + if (c[i]) + break; + g = i; /* maximum code length */ + if ((uInt)l > i) + l = i; + *m = l; + + + /* Adjust last length count to fill out codes, if needed */ + for (y = 1 << j; j < i; j++, y <<= 1) + if ((y -= c[j]) < 0) + return Z_DATA_ERROR; + if ((y -= c[i]) < 0) + return Z_DATA_ERROR; + c[i] += y; + + + /* Generate starting offsets into the value table for each length */ + x[1] = j = 0; + p = c + 1; xp = x + 2; + while (--i) { /* note that i == g from above */ + *xp++ = (j += *p++); + } + + + /* Make a table of values in order of bit lengths */ + p = b; i = 0; + do { + if ((j = *p++) != 0) + v[x[j]++] = i; + } while (++i < n); + n = x[g]; /* set n to length of v */ + + + /* Generate the Huffman codes and for each, make the table entries */ + x[0] = i = 0; /* first Huffman code is zero */ + p = v; /* grab values in bit order */ + h = -1; /* no tables yet--level -1 */ + w = -l; /* bits decoded == (l * h) */ + u[0] = (inflate_huft *)Z_NULL; /* just to keep compilers happy */ + q = (inflate_huft *)Z_NULL; /* ditto */ + z = 0; /* ditto */ + + /* go through the bit lengths (k already is bits in shortest code) */ + for (; k <= g; k++) + { + a = c[k]; + while (a--) + { + /* here i is the Huffman code of length k bits for value *p */ + /* make tables up to required level */ + while (k > w + l) + { + h++; + w += l; /* previous table always l bits */ + + /* compute minimum size table less than or equal to l bits */ + z = g - w; + z = z > (uInt)l ? l : z; /* table size upper limit */ + if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ + { /* too few codes for k-w bit table */ + f -= a + 1; /* deduct codes from patterns left */ + xp = c + k; + if (j < z) + while (++j < z) /* try smaller tables up to z bits */ + { + if ((f <<= 1) <= *++xp) + break; /* enough codes to use up j bits */ + f -= *xp; /* else deduct codes from patterns */ + } + } + z = 1 << j; /* table entries for j-bit table */ + + /* allocate new table */ + if (*hn + z > MANY) /* (note: doesn't matter for fixed) */ + return Z_DATA_ERROR; /* overflow of MANY */ + u[h] = q = hp + *hn; + *hn += z; + + /* connect to last table, if there is one */ + if (h) + { + x[h] = i; /* save pattern for backing up */ + r.bits = (Byte)l; /* bits to dump before this table */ + r.exop = (Byte)j; /* bits in this table */ + j = i >> (w - l); + r.base = (uInt)(q - u[h-1] - j); /* offset to this table */ + u[h-1][j] = r; /* connect to last table */ + } + else + *t = q; /* first table is returned result */ + } + + /* set up table entry in r */ + r.bits = (Byte)(k - w); + if (p >= v + n) + r.exop = 128 + 64; /* out of values--invalid code */ + else if (*p < s) + { + r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); /* 256 is end-of-block */ + r.base = *p++; /* simple code is just the value */ + } + else + { + r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */ + r.base = d[*p++ - s]; + } + + /* fill code-like entries with r */ + f = 1 << (k - w); + for (j = i >> w; j < z; j += f) + q[j] = r; + + /* backwards increment the k-bit code i */ + for (j = 1 << (k - 1); i & j; j >>= 1) + i ^= j; + i ^= j; + + /* backup over finished tables */ + mask = (1 << w) - 1; /* needed on HP, cc -O bug */ + while ((i & mask) != x[h]) + { + h--; /* don't need to update q */ + w -= l; + mask = (1 << w) - 1; + } + } + } + + + /* Return Z_BUF_ERROR if we were given an incomplete table */ + return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK; +} + + +int inflate_trees_bits(c, bb, tb, hp, z) +uIntf *c; /* 19 code lengths */ +uIntf *bb; /* bits tree desired/actual depth */ +inflate_huft * FAR *tb; /* bits tree result */ +inflate_huft *hp; /* space for trees */ +z_streamp z; /* for messages */ +{ + int r; + uInt hn = 0; /* hufts used in space */ + uIntf *v; /* work area for huft_build */ + + if ((v = (uIntf*)ZALLOC(z, 19, sizeof(uInt))) == Z_NULL) + return Z_MEM_ERROR; + r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL, + tb, bb, hp, &hn, v); + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed dynamic bit lengths tree"; + else if (r == Z_BUF_ERROR || *bb == 0) + { + z->msg = (char*)"incomplete dynamic bit lengths tree"; + r = Z_DATA_ERROR; + } + ZFREE(z, v); + return r; +} + + +int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, hp, z) +uInt nl; /* number of literal/length codes */ +uInt nd; /* number of distance codes */ +uIntf *c; /* that many (total) code lengths */ +uIntf *bl; /* literal desired/actual bit depth */ +uIntf *bd; /* distance desired/actual bit depth */ +inflate_huft * FAR *tl; /* literal/length tree result */ +inflate_huft * FAR *td; /* distance tree result */ +inflate_huft *hp; /* space for trees */ +z_streamp z; /* for messages */ +{ + int r; + uInt hn = 0; /* hufts used in space */ + uIntf *v; /* work area for huft_build */ + + /* allocate work area */ + if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) + return Z_MEM_ERROR; + + /* build literal/length tree */ + r = huft_build(c, nl, 257, cplens, cplext, tl, bl, hp, &hn, v); + if (r != Z_OK || *bl == 0) + { + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed literal/length tree"; + else if (r != Z_MEM_ERROR) + { + z->msg = (char*)"incomplete literal/length tree"; + r = Z_DATA_ERROR; + } + ZFREE(z, v); + return r; + } + + /* build distance tree */ + r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, hp, &hn, v); + if (r != Z_OK || (*bd == 0 && nl > 257)) + { + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed distance tree"; + else if (r == Z_BUF_ERROR) { +#ifdef PKZIP_BUG_WORKAROUND + r = Z_OK; + } +#else + z->msg = (char*)"incomplete distance tree"; + r = Z_DATA_ERROR; + } + else if (r != Z_MEM_ERROR) + { + z->msg = (char*)"empty distance tree with lengths"; + r = Z_DATA_ERROR; + } + ZFREE(z, v); + return r; +#endif + } + + /* done */ + ZFREE(z, v); + return Z_OK; +} + + +/* build fixed tables only once--keep them here */ +#ifdef BUILDFIXED +local int fixed_built = 0; +#define FIXEDH 544 /* number of hufts used by fixed tables */ +local inflate_huft fixed_mem[FIXEDH]; +local uInt fixed_bl; +local uInt fixed_bd; +local inflate_huft *fixed_tl; +local inflate_huft *fixed_td; +#else +#include "inffixed.h" +#endif + + +int inflate_trees_fixed(bl, bd, tl, td, z) +uIntf *bl; /* literal desired/actual bit depth */ +uIntf *bd; /* distance desired/actual bit depth */ +inflate_huft * FAR *tl; /* literal/length tree result */ +inflate_huft * FAR *td; /* distance tree result */ +z_streamp z; /* for memory allocation */ +{ +#ifdef BUILDFIXED + /* build fixed tables if not already */ + if (!fixed_built) + { + int k; /* temporary variable */ + uInt f = 0; /* number of hufts used in fixed_mem */ + uIntf *c; /* length list for huft_build */ + uIntf *v; /* work area for huft_build */ + + /* allocate memory */ + if ((c = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) + return Z_MEM_ERROR; + if ((v = (uIntf*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) + { + ZFREE(z, c); + return Z_MEM_ERROR; + } + + /* literal table */ + for (k = 0; k < 144; k++) + c[k] = 8; + for (; k < 256; k++) + c[k] = 9; + for (; k < 280; k++) + c[k] = 7; + for (; k < 288; k++) + c[k] = 8; + fixed_bl = 9; + huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl, + fixed_mem, &f, v); + + /* distance table */ + for (k = 0; k < 30; k++) + c[k] = 5; + fixed_bd = 5; + huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd, + fixed_mem, &f, v); + + /* done */ + ZFREE(z, v); + ZFREE(z, c); + fixed_built = 1; + } +#endif + *bl = fixed_bl; + *bd = fixed_bd; + *tl = fixed_tl; + *td = fixed_td; + return Z_OK; +} diff --git a/win32/zlib/inftrees.h b/win32/zlib/inftrees.h new file mode 100644 index 00000000..04b73b72 --- /dev/null +++ b/win32/zlib/inftrees.h @@ -0,0 +1,58 @@ +/* inftrees.h -- header to use inftrees.c + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* Huffman code lookup table entry--this entry is four bytes for machines + that have 16-bit pointers (e.g. PC's in the small or medium model). */ + +typedef struct inflate_huft_s FAR inflate_huft; + +struct inflate_huft_s { + union { + struct { + Byte Exop; /* number of extra bits or operation */ + Byte Bits; /* number of bits in this code or subcode */ + } what; + uInt pad; /* pad structure to a power of 2 (4 bytes for */ + } word; /* 16-bit, 8 bytes for 32-bit int's) */ + uInt base; /* literal, length base, distance base, + or table offset */ +}; + +/* Maximum size of dynamic tree. The maximum found in a long but non- + exhaustive search was 1004 huft structures (850 for length/literals + and 154 for distances, the latter actually the result of an + exhaustive search). The actual maximum is not known, but the + value below is more than safe. */ +#define MANY 1440 + +extern int inflate_trees_bits OF(( + uIntf *, /* 19 code lengths */ + uIntf *, /* bits tree desired/actual depth */ + inflate_huft * FAR *, /* bits tree result */ + inflate_huft *, /* space for trees */ + z_streamp)); /* for messages */ + +extern int inflate_trees_dynamic OF(( + uInt, /* number of literal/length codes */ + uInt, /* number of distance codes */ + uIntf *, /* that many (total) code lengths */ + uIntf *, /* literal desired/actual bit depth */ + uIntf *, /* distance desired/actual bit depth */ + inflate_huft * FAR *, /* literal/length tree result */ + inflate_huft * FAR *, /* distance tree result */ + inflate_huft *, /* space for trees */ + z_streamp)); /* for messages */ + +extern int inflate_trees_fixed OF(( + uIntf *, /* literal desired/actual bit depth */ + uIntf *, /* distance desired/actual bit depth */ + inflate_huft * FAR *, /* literal/length tree result */ + inflate_huft * FAR *, /* distance tree result */ + z_streamp)); /* for memory allocation */ diff --git a/win32/zlib/infutil.c b/win32/zlib/infutil.c new file mode 100644 index 00000000..9a076221 --- /dev/null +++ b/win32/zlib/infutil.c @@ -0,0 +1,87 @@ +/* inflate_util.c -- data and routines common to blocks and codes + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "infblock.h" +#include "inftrees.h" +#include "infcodes.h" +#include "infutil.h" + +struct inflate_codes_state {int dummy;}; /* for buggy compilers */ + +/* And'ing with mask[n] masks the lower n bits */ +uInt inflate_mask[17] = { + 0x0000, + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; + + +/* copy as much as possible from the sliding window to the output area */ +int inflate_flush(s, z, r) +inflate_blocks_statef *s; +z_streamp z; +int r; +{ + uInt n; + Bytef *p; + Bytef *q; + + /* local copies of source and destination pointers */ + p = z->next_out; + q = s->read; + + /* compute number of bytes to copy as far as end of window */ + n = (uInt)((q <= s->write ? s->write : s->end) - q); + if (n > z->avail_out) n = z->avail_out; + if (n && r == Z_BUF_ERROR) r = Z_OK; + + /* update counters */ + z->avail_out -= n; + z->total_out += n; + + /* update check information */ + if (s->checkfn != Z_NULL) + z->adler = s->check = (*s->checkfn)(s->check, q, n); + + /* copy as far as end of window */ + zmemcpy(p, q, n); + p += n; + q += n; + + /* see if more to copy at beginning of window */ + if (q == s->end) + { + /* wrap pointers */ + q = s->window; + if (s->write == s->end) + s->write = s->window; + + /* compute bytes to copy */ + n = (uInt)(s->write - q); + if (n > z->avail_out) n = z->avail_out; + if (n && r == Z_BUF_ERROR) r = Z_OK; + + /* update counters */ + z->avail_out -= n; + z->total_out += n; + + /* update check information */ + if (s->checkfn != Z_NULL) + z->adler = s->check = (*s->checkfn)(s->check, q, n); + + /* copy */ + zmemcpy(p, q, n); + p += n; + q += n; + } + + /* update pointers */ + z->next_out = p; + s->read = q; + + /* done */ + return r; +} diff --git a/win32/zlib/infutil.h b/win32/zlib/infutil.h new file mode 100644 index 00000000..4401df82 --- /dev/null +++ b/win32/zlib/infutil.h @@ -0,0 +1,98 @@ +/* infutil.h -- types and macros common to blocks and codes + * Copyright (C) 1995-2002 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +#ifndef _INFUTIL_H +#define _INFUTIL_H + +typedef enum { + TYPE, /* get type bits (3, including end bit) */ + LENS, /* get lengths for stored */ + STORED, /* processing stored block */ + TABLE, /* get table lengths */ + BTREE, /* get bit lengths tree for a dynamic block */ + DTREE, /* get length, distance trees for a dynamic block */ + CODES, /* processing fixed or dynamic block */ + DRY, /* output remaining window bytes */ + DONE, /* finished last block, done */ + BAD} /* got a data error--stuck here */ +inflate_block_mode; + +/* inflate blocks semi-private state */ +struct inflate_blocks_state { + + /* mode */ + inflate_block_mode mode; /* current inflate_block mode */ + + /* mode dependent information */ + union { + uInt left; /* if STORED, bytes left to copy */ + struct { + uInt table; /* table lengths (14 bits) */ + uInt index; /* index into blens (or border) */ + uIntf *blens; /* bit lengths of codes */ + uInt bb; /* bit length tree depth */ + inflate_huft *tb; /* bit length decoding tree */ + } trees; /* if DTREE, decoding info for trees */ + struct { + inflate_codes_statef + *codes; + } decode; /* if CODES, current state */ + } sub; /* submode */ + uInt last; /* true if this block is the last block */ + + /* mode independent information */ + uInt bitk; /* bits in bit buffer */ + uLong bitb; /* bit buffer */ + inflate_huft *hufts; /* single malloc for tree space */ + Bytef *window; /* sliding window */ + Bytef *end; /* one byte after sliding window */ + Bytef *read; /* window read pointer */ + Bytef *write; /* window write pointer */ + check_func checkfn; /* check function */ + uLong check; /* check on output */ + +}; + + +/* defines for inflate input/output */ +/* update pointers and return */ +#define UPDBITS {s->bitb=b;s->bitk=k;} +#define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;} +#define UPDOUT {s->write=q;} +#define UPDATE {UPDBITS UPDIN UPDOUT} +#define LEAVE {UPDATE return inflate_flush(s,z,r);} +/* get bytes and bits */ +#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;} +#define NEEDBYTE {if(n)r=Z_OK;else LEAVE} +#define NEXTBYTE (n--,*p++) +#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<>=(j);k-=(j);} +/* output bytes */ +#define WAVAIL (uInt)(qread?s->read-q-1:s->end-q) +#define LOADOUT {q=s->write;m=(uInt)WAVAIL;} +#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}} +#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT} +#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;} +#define OUTBYTE(a) {*q++=(Byte)(a);m--;} +/* load local pointers */ +#define LOAD {LOADIN LOADOUT} + +/* masks for lower bits (size given to avoid silly warnings with Visual C++) */ +extern uInt inflate_mask[17]; + +/* copy as much as possible from the sliding window to the output area */ +extern int inflate_flush OF(( + inflate_blocks_statef *, + z_streamp , + int)); + +struct internal_state {int dummy;}; /* for buggy compilers */ + +#endif diff --git a/win32/zlib/trees.c b/win32/zlib/trees.c new file mode 100644 index 00000000..0a984056 --- /dev/null +++ b/win32/zlib/trees.c @@ -0,0 +1,1214 @@ +/* trees.c -- output deflated data using Huffman coding + * Copyright (C) 1995-2002 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * ALGORITHM + * + * The "deflation" process uses several Huffman trees. The more + * common source values are represented by shorter bit sequences. + * + * Each code tree is stored in a compressed form which is itself + * a Huffman encoding of the lengths of all the code strings (in + * ascending order by source values). The actual code strings are + * reconstructed from the lengths in the inflate process, as described + * in the deflate specification. + * + * REFERENCES + * + * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification". + * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc + * + * Storer, James A. + * Data Compression: Methods and Theory, pp. 49-50. + * Computer Science Press, 1988. ISBN 0-7167-8156-5. + * + * Sedgewick, R. + * Algorithms, p290. + * Addison-Wesley, 1983. ISBN 0-201-06672-6. + */ + +/* @(#) $Id$ */ + +/* #define GEN_TREES_H */ + +#include "deflate.h" + +#ifdef DEBUG +# include +#endif + +/* =========================================================================== + * Constants + */ + +#define MAX_BL_BITS 7 +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +#define END_BLOCK 256 +/* end of block literal code */ + +#define REP_3_6 16 +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +#define REPZ_3_10 17 +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +#define REPZ_11_138 18 +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */ + = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; + +local const int extra_dbits[D_CODES] /* extra bits for each distance code */ + = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; + +local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */ + = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; + +local const uch bl_order[BL_CODES] + = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +#define Buf_size (8 * 2*sizeof(char)) +/* Number of bits used within bi_buf. (bi_buf might be implemented on + * more than 16 bits on some systems.) + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +#define DIST_CODE_LEN 512 /* see definition of array dist_code below */ + +#if defined(GEN_TREES_H) || !defined(STDC) +/* non ANSI compilers may not accept trees.h */ + +local ct_data static_ltree[L_CODES+2]; +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +local ct_data static_dtree[D_CODES]; +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +uch _dist_code[DIST_CODE_LEN]; +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +uch _length_code[MAX_MATCH-MIN_MATCH+1]; +/* length code for each normalized match length (0 == MIN_MATCH) */ + +local int base_length[LENGTH_CODES]; +/* First normalized length for each code (0 = MIN_MATCH) */ + +local int base_dist[D_CODES]; +/* First normalized distance for each code (0 = distance of 1) */ + +#else +# include "trees.h" +#endif /* GEN_TREES_H */ + +struct static_tree_desc_s { + const ct_data *static_tree; /* static tree or NULL */ + const intf *extra_bits; /* extra bits for each code or NULL */ + int extra_base; /* base index for extra_bits */ + int elems; /* max number of elements in the tree */ + int max_length; /* max bit length for the codes */ +}; + +local static_tree_desc static_l_desc = +{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; + +local static_tree_desc static_d_desc = +{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; + +local static_tree_desc static_bl_desc = +{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; + +/* =========================================================================== + * Local (static) routines in this file. + */ + +local void tr_static_init OF((void)); +local void init_block OF((deflate_state *s)); +local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); +local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); +local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count)); +local void build_tree OF((deflate_state *s, tree_desc *desc)); +local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); +local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); +local int build_bl_tree OF((deflate_state *s)); +local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, + int blcodes)); +local void compress_block OF((deflate_state *s, ct_data *ltree, + ct_data *dtree)); +local void set_data_type OF((deflate_state *s)); +local unsigned bi_reverse OF((unsigned value, int length)); +local void bi_windup OF((deflate_state *s)); +local void bi_flush OF((deflate_state *s)); +local void copy_block OF((deflate_state *s, charf *buf, unsigned len, + int header)); + +#ifdef GEN_TREES_H +local void gen_trees_header OF((void)); +#endif + +#ifndef DEBUG +# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) + /* Send a code of the given tree. c and tree must not have side effects */ + +#else /* DEBUG */ +# define send_code(s, c, tree) \ + { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ + send_bits(s, tree[c].Code, tree[c].Len); } +#endif + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +#define put_short(s, w) { \ + put_byte(s, (uch)((w) & 0xff)); \ + put_byte(s, (uch)((ush)(w) >> 8)); \ +} + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +#ifdef DEBUG +local void send_bits OF((deflate_state *s, int value, int length)); + +local void send_bits(s, value, length) + deflate_state *s; + int value; /* value to send */ + int length; /* number of bits */ +{ + Tracevv((stderr," l %2d v %4x ", length, value)); + Assert(length > 0 && length <= 15, "invalid length"); + s->bits_sent += (ulg)length; + + /* If not enough room in bi_buf, use (valid) bits from bi_buf and + * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) + * unused bits in value. + */ + if (s->bi_valid > (int)Buf_size - length) { + s->bi_buf |= (value << s->bi_valid); + put_short(s, s->bi_buf); + s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); + s->bi_valid += length - Buf_size; + } else { + s->bi_buf |= value << s->bi_valid; + s->bi_valid += length; + } +} +#else /* !DEBUG */ + +#define send_bits(s, value, length) \ +{ int len = length;\ + if (s->bi_valid > (int)Buf_size - len) {\ + int val = value;\ + s->bi_buf |= (val << s->bi_valid);\ + put_short(s, s->bi_buf);\ + s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ + s->bi_valid += len - Buf_size;\ + } else {\ + s->bi_buf |= (value) << s->bi_valid;\ + s->bi_valid += len;\ + }\ +} +#endif /* DEBUG */ + + +#define MAX(a,b) (a >= b ? a : b) +/* the arguments must not have side effects */ + +/* =========================================================================== + * Initialize the various 'constant' tables. + */ +local void tr_static_init() +{ +#if defined(GEN_TREES_H) || !defined(STDC) + static int static_init_done = 0; + int n; /* iterates over tree elements */ + int bits; /* bit counter */ + int length; /* length value */ + int code; /* code value */ + int dist; /* distance index */ + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + if (static_init_done) return; + + /* For some embedded targets, global variables are not initialized: */ + static_l_desc.static_tree = static_ltree; + static_l_desc.extra_bits = extra_lbits; + static_d_desc.static_tree = static_dtree; + static_d_desc.extra_bits = extra_dbits; + static_bl_desc.extra_bits = extra_blbits; + + /* Initialize the mapping length (0..255) -> length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES-1; code++) { + base_length[code] = length; + for (n = 0; n < (1< dist code (0..29) */ + dist = 0; + for (code = 0 ; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ + for ( ; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { + _dist_code[256 + dist++] = (uch)code; + } + } + Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; + n = 0; + while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; + while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; + while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; + while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n].Len = 5; + static_dtree[n].Code = bi_reverse((unsigned)n, 5); + } + static_init_done = 1; + +# ifdef GEN_TREES_H + gen_trees_header(); +# endif +#endif /* defined(GEN_TREES_H) || !defined(STDC) */ +} + +/* =========================================================================== + * Genererate the file trees.h describing the static trees. + */ +#ifdef GEN_TREES_H +# ifndef DEBUG +# include +# endif + +# define SEPARATOR(i, last, width) \ + ((i) == (last)? "\n};\n\n" : \ + ((i) % (width) == (width)-1 ? ",\n" : ", ")) + +void gen_trees_header() +{ + FILE *header = fopen("trees.h", "w"); + int i; + + Assert (header != NULL, "Can't open trees.h"); + fprintf(header, + "/* header created automatically with -DGEN_TREES_H */\n\n"); + + fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); + for (i = 0; i < L_CODES+2; i++) { + fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, + static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); + } + + fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, + static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); + } + + fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n"); + for (i = 0; i < DIST_CODE_LEN; i++) { + fprintf(header, "%2u%s", _dist_code[i], + SEPARATOR(i, DIST_CODE_LEN-1, 20)); + } + + fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); + for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { + fprintf(header, "%2u%s", _length_code[i], + SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); + } + + fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); + for (i = 0; i < LENGTH_CODES; i++) { + fprintf(header, "%1u%s", base_length[i], + SEPARATOR(i, LENGTH_CODES-1, 20)); + } + + fprintf(header, "local const int base_dist[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "%5u%s", base_dist[i], + SEPARATOR(i, D_CODES-1, 10)); + } + + fclose(header); +} +#endif /* GEN_TREES_H */ + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +void _tr_init(s) + deflate_state *s; +{ + tr_static_init(); + + s->l_desc.dyn_tree = s->dyn_ltree; + s->l_desc.stat_desc = &static_l_desc; + + s->d_desc.dyn_tree = s->dyn_dtree; + s->d_desc.stat_desc = &static_d_desc; + + s->bl_desc.dyn_tree = s->bl_tree; + s->bl_desc.stat_desc = &static_bl_desc; + + s->bi_buf = 0; + s->bi_valid = 0; + s->last_eob_len = 8; /* enough lookahead for inflate */ +#ifdef DEBUG + s->compressed_len = 0L; + s->bits_sent = 0L; +#endif + + /* Initialize the first block of the first file: */ + init_block(s); +} + +/* =========================================================================== + * Initialize a new block. + */ +local void init_block(s) + deflate_state *s; +{ + int n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; + for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; + for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; + + s->dyn_ltree[END_BLOCK].Freq = 1; + s->opt_len = s->static_len = 0L; + s->last_lit = s->matches = 0; +} + +#define SMALLEST 1 +/* Index within the heap array of least frequent node in the Huffman tree */ + + +/* =========================================================================== + * Remove the smallest element from the heap and recreate the heap with + * one less element. Updates heap and heap_len. + */ +#define pqremove(s, tree, top) \ +{\ + top = s->heap[SMALLEST]; \ + s->heap[SMALLEST] = s->heap[s->heap_len--]; \ + pqdownheap(s, tree, SMALLEST); \ +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +#define smaller(tree, n, m, depth) \ + (tree[n].Freq < tree[m].Freq || \ + (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +local void pqdownheap(s, tree, k) + deflate_state *s; + ct_data *tree; /* the tree to restore */ + int k; /* node to move down */ +{ + int v = s->heap[k]; + int j = k << 1; /* left son of k */ + while (j <= s->heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s->heap_len && + smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s->heap[j], s->depth)) break; + + /* Exchange v with the smallest son */ + s->heap[k] = s->heap[j]; k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s->heap[k] = v; +} + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +local void gen_bitlen(s, desc) + deflate_state *s; + tree_desc *desc; /* the tree descriptor */ +{ + ct_data *tree = desc->dyn_tree; + int max_code = desc->max_code; + const ct_data *stree = desc->stat_desc->static_tree; + const intf *extra = desc->stat_desc->extra_bits; + int base = desc->stat_desc->extra_base; + int max_length = desc->stat_desc->max_length; + int h; /* heap index */ + int n, m; /* iterate over the tree elements */ + int bits; /* bit length */ + int xbits; /* extra bits */ + ush f; /* frequency */ + int overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ + + for (h = s->heap_max+1; h < HEAP_SIZE; h++) { + n = s->heap[h]; + bits = tree[tree[n].Dad].Len + 1; + if (bits > max_length) bits = max_length, overflow++; + tree[n].Len = (ush)bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) continue; /* not a leaf node */ + + s->bl_count[bits]++; + xbits = 0; + if (n >= base) xbits = extra[n-base]; + f = tree[n].Freq; + s->opt_len += (ulg)f * (bits + xbits); + if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits); + } + if (overflow == 0) return; + + Trace((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length-1; + while (s->bl_count[bits] == 0) bits--; + s->bl_count[bits]--; /* move one leaf down the tree */ + s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ + s->bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits != 0; bits--) { + n = s->bl_count[bits]; + while (n != 0) { + m = s->heap[--h]; + if (m > max_code) continue; + if (tree[m].Len != (unsigned) bits) { + Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s->opt_len += ((long)bits - (long)tree[m].Len) + *(long)tree[m].Freq; + tree[m].Len = (ush)bits; + } + n--; + } + } +} + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +local void gen_codes (tree, max_code, bl_count) + ct_data *tree; /* the tree to decorate */ + int max_code; /* largest code with non zero frequency */ + ushf *bl_count; /* number of codes at each bit length */ +{ + ush next_code[MAX_BITS+1]; /* next code value for each bit length */ + ush code = 0; /* running code value */ + int bits; /* bit index */ + int n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = (code + bl_count[bits-1]) << 1; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + Assert (code + bl_count[MAX_BITS]-1 == (1<dyn_tree; + const ct_data *stree = desc->stat_desc->static_tree; + int elems = desc->stat_desc->elems; + int n, m; /* iterate over heap elements */ + int max_code = -1; /* largest code with non zero frequency */ + int node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s->heap_len = 0, s->heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n].Freq != 0) { + s->heap[++(s->heap_len)] = max_code = n; + s->depth[n] = 0; + } else { + tree[n].Len = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s->heap_len < 2) { + node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); + tree[node].Freq = 1; + s->depth[node] = 0; + s->opt_len--; if (stree) s->static_len -= stree[node].Len; + /* node is 0 or 1 so it does not have extra bits */ + } + desc->max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + pqremove(s, tree, n); /* n = node of least frequency */ + m = s->heap[SMALLEST]; /* m = node of next least frequency */ + + s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ + s->heap[--(s->heap_max)] = m; + + /* Create a new node father of n and m */ + tree[node].Freq = tree[n].Freq + tree[m].Freq; + s->depth[node] = (uch) (MAX(s->depth[n], s->depth[m]) + 1); + tree[n].Dad = tree[m].Dad = (ush)node; +#ifdef DUMP_BL_TREE + if (tree == s->bl_tree) { + fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", + node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); + } +#endif + /* and insert the new node in the heap */ + s->heap[SMALLEST] = node++; + pqdownheap(s, tree, SMALLEST); + + } while (s->heap_len >= 2); + + s->heap[--(s->heap_max)] = s->heap[SMALLEST]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, (tree_desc *)desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes ((ct_data *)tree, max_code, s->bl_count); +} + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +local void scan_tree (s, tree, max_code) + deflate_state *s; + ct_data *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + if (nextlen == 0) max_count = 138, min_count = 3; + tree[max_code+1].Len = (ush)0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + s->bl_tree[curlen].Freq += count; + } else if (curlen != 0) { + if (curlen != prevlen) s->bl_tree[curlen].Freq++; + s->bl_tree[REP_3_6].Freq++; + } else if (count <= 10) { + s->bl_tree[REPZ_3_10].Freq++; + } else { + s->bl_tree[REPZ_11_138].Freq++; + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +local void send_tree (s, tree, max_code) + deflate_state *s; + ct_data *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen == 0) max_count = 138, min_count = 3; + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + do { send_code(s, curlen, s->bl_tree); } while (--count != 0); + + } else if (curlen != 0) { + if (curlen != prevlen) { + send_code(s, curlen, s->bl_tree); count--; + } + Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3); + + } else { + send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7); + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +local int build_bl_tree(s) + deflate_state *s; +{ + int max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); + scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, (tree_desc *)(&(s->bl_desc))); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { + if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; + } + /* Update opt_len to include the bit length tree and counts */ + s->opt_len += 3*(max_blindex+1) + 5+5+4; + Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + s->opt_len, s->static_len)); + + return max_blindex; +} + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +local void send_all_trees(s, lcodes, dcodes, blcodes) + deflate_state *s; + int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + int rank; /* index in bl_order */ + + Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + "too many codes"); + Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes-1, 5); + send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); + } + Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */ + Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */ + Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + +/* =========================================================================== + * Send a stored block + */ +void _tr_stored_block(s, buf, stored_len, eof) + deflate_state *s; + charf *buf; /* input block */ + ulg stored_len; /* length of input block */ + int eof; /* true if this is the last block for a file */ +{ + send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */ +#ifdef DEBUG + s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; + s->compressed_len += (stored_len + 4) << 3; +#endif + copy_block(s, buf, (unsigned)stored_len, 1); /* with header */ +} + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + * The current inflate code requires 9 bits of lookahead. If the + * last two codes for the previous block (real code plus EOB) were coded + * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode + * the last real code. In this case we send two empty static blocks instead + * of one. (There are no problems if the previous block is stored or fixed.) + * To simplify the code, we assume the worst case of last real code encoded + * on one bit only. + */ +void _tr_align(s) + deflate_state *s; +{ + send_bits(s, STATIC_TREES<<1, 3); + send_code(s, END_BLOCK, static_ltree); +#ifdef DEBUG + s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ +#endif + bi_flush(s); + /* Of the 10 bits for the empty block, we have already sent + * (10 - bi_valid) bits. The lookahead for the last real code (before + * the EOB of the previous block) was thus at least one plus the length + * of the EOB plus what we have just sent of the empty static block. + */ + if (1 + s->last_eob_len + 10 - s->bi_valid < 9) { + send_bits(s, STATIC_TREES<<1, 3); + send_code(s, END_BLOCK, static_ltree); +#ifdef DEBUG + s->compressed_len += 10L; +#endif + bi_flush(s); + } + s->last_eob_len = 7; +} + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and output the encoded block to the zip file. + */ +void _tr_flush_block(s, buf, stored_len, eof) + deflate_state *s; + charf *buf; /* input block, or NULL if too old */ + ulg stored_len; /* length of input block */ + int eof; /* true if this is the last block for a file */ +{ + ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + int max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s->level > 0) { + + /* Check if the file is ascii or binary */ + if (s->data_type == Z_UNKNOWN) set_data_type(s); + + /* Construct the literal and distance trees */ + build_tree(s, (tree_desc *)(&(s->l_desc))); + Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + + build_tree(s, (tree_desc *)(&(s->d_desc))); + Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute first the block length in bytes*/ + opt_lenb = (s->opt_len+3+7)>>3; + static_lenb = (s->static_len+3+7)>>3; + + Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + s->last_lit)); + + if (static_lenb <= opt_lenb) opt_lenb = static_lenb; + + } else { + Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + +#ifdef FORCE_STORED + if (buf != (char*)0) { /* force stored block */ +#else + if (stored_len+4 <= opt_lenb && buf != (char*)0) { + /* 4: two words for the lengths */ +#endif + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, eof); + +#ifdef FORCE_STATIC + } else if (static_lenb >= 0) { /* force static trees */ +#else + } else if (static_lenb == opt_lenb) { +#endif + send_bits(s, (STATIC_TREES<<1)+eof, 3); + compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); +#ifdef DEBUG + s->compressed_len += 3 + s->static_len; +#endif + } else { + send_bits(s, (DYN_TREES<<1)+eof, 3); + send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, + max_blindex+1); + compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); +#ifdef DEBUG + s->compressed_len += 3 + s->opt_len; +#endif + } + Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (eof) { + bi_windup(s); +#ifdef DEBUG + s->compressed_len += 7; /* align on byte boundary */ +#endif + } + Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + s->compressed_len-7*eof)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +int _tr_tally (s, dist, lc) + deflate_state *s; + unsigned dist; /* distance of matched string */ + unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + s->d_buf[s->last_lit] = (ush)dist; + s->l_buf[s->last_lit++] = (uch)lc; + if (dist == 0) { + /* lc is the unmatched char */ + s->dyn_ltree[lc].Freq++; + } else { + s->matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + Assert((ush)dist < (ush)MAX_DIST(s) && + (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++; + s->dyn_dtree[d_code(dist)].Freq++; + } + +#ifdef TRUNCATE_BLOCK + /* Try to guess if it is profitable to stop the current block here */ + if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { + /* Compute an upper bound for the compressed length */ + ulg out_length = (ulg)s->last_lit*8L; + ulg in_length = (ulg)((long)s->strstart - s->block_start); + int dcode; + for (dcode = 0; dcode < D_CODES; dcode++) { + out_length += (ulg)s->dyn_dtree[dcode].Freq * + (5L+extra_dbits[dcode]); + } + out_length >>= 3; + Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", + s->last_lit, in_length, out_length, + 100L - out_length*100L/in_length)); + if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; + } +#endif + return (s->last_lit == s->lit_bufsize-1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +local void compress_block(s, ltree, dtree) + deflate_state *s; + ct_data *ltree; /* literal tree */ + ct_data *dtree; /* distance tree */ +{ + unsigned dist; /* distance of matched string */ + int lc; /* match length or unmatched char (if dist == 0) */ + unsigned lx = 0; /* running index in l_buf */ + unsigned code; /* the code to send */ + int extra; /* number of extra bits to send */ + + if (s->last_lit != 0) do { + dist = s->d_buf[lx]; + lc = s->l_buf[lx++]; + if (dist == 0) { + send_code(s, lc, ltree); /* send a literal byte */ + Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code+LITERALS+1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra != 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra != 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + Assert(s->pending < s->lit_bufsize + 2*lx, "pendingBuf overflow"); + + } while (lx < s->last_lit); + + send_code(s, END_BLOCK, ltree); + s->last_eob_len = ltree[END_BLOCK].Len; +} + +/* =========================================================================== + * Set the data type to ASCII or BINARY, using a crude approximation: + * binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise. + * IN assertion: the fields freq of dyn_ltree are set and the total of all + * frequencies does not exceed 64K (to fit in an int on 16 bit machines). + */ +local void set_data_type(s) + deflate_state *s; +{ + int n = 0; + unsigned ascii_freq = 0; + unsigned bin_freq = 0; + while (n < 7) bin_freq += s->dyn_ltree[n++].Freq; + while (n < 128) ascii_freq += s->dyn_ltree[n++].Freq; + while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq; + s->data_type = (Byte)(bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII); +} + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +local unsigned bi_reverse(code, len) + unsigned code; /* the value to invert */ + int len; /* its bit length */ +{ + register unsigned res = 0; + do { + res |= code & 1; + code >>= 1, res <<= 1; + } while (--len > 0); + return res >> 1; +} + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +local void bi_flush(s) + deflate_state *s; +{ + if (s->bi_valid == 16) { + put_short(s, s->bi_buf); + s->bi_buf = 0; + s->bi_valid = 0; + } else if (s->bi_valid >= 8) { + put_byte(s, (Byte)s->bi_buf); + s->bi_buf >>= 8; + s->bi_valid -= 8; + } +} + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +local void bi_windup(s) + deflate_state *s; +{ + if (s->bi_valid > 8) { + put_short(s, s->bi_buf); + } else if (s->bi_valid > 0) { + put_byte(s, (Byte)s->bi_buf); + } + s->bi_buf = 0; + s->bi_valid = 0; +#ifdef DEBUG + s->bits_sent = (s->bits_sent+7) & ~7; +#endif +} + +/* =========================================================================== + * Copy a stored block, storing first the length and its + * one's complement if requested. + */ +local void copy_block(s, buf, len, header) + deflate_state *s; + charf *buf; /* the input data */ + unsigned len; /* its length */ + int header; /* true if block header must be written */ +{ + bi_windup(s); /* align on byte boundary */ + s->last_eob_len = 8; /* enough lookahead for inflate */ + + if (header) { + put_short(s, (ush)len); + put_short(s, (ush)~len); +#ifdef DEBUG + s->bits_sent += 2*16; +#endif + } +#ifdef DEBUG + s->bits_sent += (ulg)len<<3; +#endif + while (len--) { + put_byte(s, *buf++); + } +} diff --git a/win32/zlib/trees.h b/win32/zlib/trees.h new file mode 100644 index 00000000..72facf90 --- /dev/null +++ b/win32/zlib/trees.h @@ -0,0 +1,128 @@ +/* header created automatically with -DGEN_TREES_H */ + +local const ct_data static_ltree[L_CODES+2] = { +{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, +{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, +{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, +{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, +{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, +{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, +{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, +{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, +{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, +{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, +{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, +{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, +{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, +{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, +{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, +{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, +{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, +{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, +{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, +{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, +{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, +{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, +{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, +{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, +{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, +{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, +{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, +{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, +{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, +{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, +{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, +{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, +{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, +{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, +{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, +{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, +{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, +{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, +{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, +{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, +{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, +{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, +{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, +{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, +{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, +{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, +{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, +{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, +{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, +{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, +{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, +{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, +{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, +{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, +{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, +{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, +{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, +{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} +}; + +local const ct_data static_dtree[D_CODES] = { +{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, +{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, +{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, +{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, +{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, +{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} +}; + +const uch _dist_code[DIST_CODE_LEN] = { + 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, +12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, +18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 +}; + +const uch _length_code[MAX_MATCH-MIN_MATCH+1]= { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, +13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, +17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, +19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, +22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 +}; + +local const int base_length[LENGTH_CODES] = { +0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, +64, 80, 96, 112, 128, 160, 192, 224, 0 +}; + +local const int base_dist[D_CODES] = { + 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, + 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, + 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 +}; + diff --git a/win32/zlib/uncompr.c b/win32/zlib/uncompr.c new file mode 100644 index 00000000..a287714f --- /dev/null +++ b/win32/zlib/uncompr.c @@ -0,0 +1,58 @@ +/* uncompr.c -- decompress a memory buffer + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zlib.h" + +/* =========================================================================== + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer. + This function can be used to decompress a whole file at once if the + input file is mmap'ed. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted. +*/ +int ZEXPORT uncompress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; +{ + z_stream stream; + int err; + + stream.next_in = (Bytef*)source; + stream.avail_in = (uInt)sourceLen; + /* Check for source > 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; + + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; + + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + + err = inflateInit(&stream); + if (err != Z_OK) return err; + + err = inflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + inflateEnd(&stream); + return err == Z_OK ? Z_BUF_ERROR : err; + } + *destLen = stream.total_out; + + err = inflateEnd(&stream); + return err; +} diff --git a/win32/zlib/zconf.h b/win32/zlib/zconf.h new file mode 100644 index 00000000..eb0ae2e1 --- /dev/null +++ b/win32/zlib/zconf.h @@ -0,0 +1,279 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#ifndef _ZCONF_H +#define _ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + */ +#ifdef Z_PREFIX +# define deflateInit_ z_deflateInit_ +# define deflate z_deflate +# define deflateEnd z_deflateEnd +# define inflateInit_ z_inflateInit_ +# define inflate z_inflate +# define inflateEnd z_inflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateSetDictionary z_deflateSetDictionary +# define deflateCopy z_deflateCopy +# define deflateReset z_deflateReset +# define deflateParams z_deflateParams +# define inflateInit2_ z_inflateInit2_ +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateReset z_inflateReset +# define compress z_compress +# define compress2 z_compress2 +# define uncompress z_uncompress +# define adler32 z_adler32 +# define crc32 z_crc32 +# define get_crc_table z_get_crc_table + +# define Byte z_Byte +# define uInt z_uInt +# define uLong z_uLong +# define Bytef z_Bytef +# define charf z_charf +# define intf z_intf +# define uIntf z_uIntf +# define uLongf z_uLongf +# define voidpf z_voidpf +# define voidp z_voidp +#endif + +#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) +# define WIN32 +#endif +#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386) +# ifndef __32BIT__ +# define __32BIT__ +# endif +#endif +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#if defined(MSDOS) && !defined(__32BIT__) +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC) +# define STDC +#endif +#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__) +# ifndef STDC +# define STDC +# endif +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const +# endif +#endif + +/* Some Mac compilers merge all .h files incorrectly: */ +#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__) +# define NO_DUMMY_DECL +#endif + +/* Old Borland C incorrectly complains about missing returns: */ +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) +# define NEED_DUMMY_RETURN +#endif + + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +#endif +#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__)) +# ifndef __32BIT__ +# define SMALL_MEDIUM +# define FAR _far +# endif +#endif + +/* Compile with -DZLIB_DLL for Windows DLL support */ +#if defined(ZLIB_DLL) +# if defined(_WINDOWS) || defined(WINDOWS) +# ifdef FAR +# undef FAR +# endif +# include +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR _cdecl _export +# endif +# endif +# if defined (__BORLANDC__) +# if (__BORLANDC__ >= 0x0500) && defined (WIN32) +# include +# define ZEXPORT __declspec(dllexport) WINAPI +# define ZEXPORTRVA __declspec(dllexport) WINAPIV +# else +# if defined (_Windows) && defined (__DLL__) +# define ZEXPORT _export +# define ZEXPORTVA _export +# endif +# endif +# endif +#endif + +#if defined (__BEOS__) +# if defined (ZLIB_DLL) +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +#endif + +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif +#ifndef ZEXTERN +# define ZEXTERN extern +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(MACOS) && !defined(TARGET_OS_MAC) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#ifdef HAVE_UNISTD_H +# include /* for off_t */ +# include /* for SEEK_* and off_t */ +# define z_off_t off_t +#endif +#ifndef SEEK_SET +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif +#ifndef z_off_t +# define z_off_t long +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) +# pragma map(deflateInit_,"DEIN") +# pragma map(deflateInit2_,"DEIN2") +# pragma map(deflateEnd,"DEEND") +# pragma map(inflateInit_,"ININ") +# pragma map(inflateInit2_,"ININ2") +# pragma map(inflateEnd,"INEND") +# pragma map(inflateSync,"INSY") +# pragma map(inflateSetDictionary,"INSEDI") +# pragma map(inflate_blocks,"INBL") +# pragma map(inflate_blocks_new,"INBLNE") +# pragma map(inflate_blocks_free,"INBLFR") +# pragma map(inflate_blocks_reset,"INBLRE") +# pragma map(inflate_codes_free,"INCOFR") +# pragma map(inflate_codes,"INCO") +# pragma map(inflate_fast,"INFA") +# pragma map(inflate_flush,"INFLU") +# pragma map(inflate_mask,"INMA") +# pragma map(inflate_set_dictionary,"INSEDI2") +# pragma map(inflate_copyright,"INCOPY") +# pragma map(inflate_trees_bits,"INTRBI") +# pragma map(inflate_trees_dynamic,"INTRDY") +# pragma map(inflate_trees_fixed,"INTRFI") +# pragma map(inflate_trees_free,"INTRFR") +#endif + +#endif /* _ZCONF_H */ diff --git a/win32/zlib/zlib.h b/win32/zlib/zlib.h new file mode 100644 index 00000000..52cb529f --- /dev/null +++ b/win32/zlib/zlib.h @@ -0,0 +1,893 @@ +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.1.4, March 11th, 2002 + + Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt + (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). +*/ + +#ifndef _ZLIB_H +#define _ZLIB_H + +#include "zconf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZLIB_VERSION "1.1.4" + +/* + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed + data. This version of the library supports only one compression method + (deflation) but other algorithms will be added later and will have the same + stream interface. + + Compression can be done in a single step if the buffers are large + enough (for example if an input file is mmap'ed), or can be done by + repeated calls of the compression function. In the latter case, the + application must provide more input and/or consume the output + (providing more output space) before each call. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never + crash even in case of corrupted input. +*/ + +typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); +typedef void (*free_func) OF((voidpf opaque, voidpf address)); + +struct internal_state; + +typedef struct z_stream_s { + Bytef *next_in; /* next input byte */ + uInt avail_in; /* number of bytes available at next_in */ + uLong total_in; /* total nb of input bytes read so far */ + + Bytef *next_out; /* next output byte should be put there */ + uInt avail_out; /* remaining free space at next_out */ + uLong total_out; /* total nb of bytes output so far */ + + char *msg; /* last error message, NULL if no error */ + struct internal_state FAR *state; /* not visible by applications */ + + alloc_func zalloc; /* used to allocate the internal state */ + free_func zfree; /* used to free the internal state */ + voidpf opaque; /* private data object passed to zalloc and zfree */ + + int data_type; /* best guess about the data type: ascii or binary */ + uLong adler; /* adler32 value of the uncompressed data */ + uLong reserved; /* reserved for future use */ +} z_stream; + +typedef z_stream FAR *z_streamp; + +/* + The application must update next_in and avail_in when avail_in has + dropped to zero. It must update next_out and avail_out when avail_out + has dropped to zero. The application must initialize zalloc, zfree and + opaque before calling the init function. All other fields are set by the + compression library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value. + + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe. + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this + if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, + pointers returned by zalloc for objects of exactly 65536 bytes *must* + have their offset normalized to zero. The default allocation function + provided by this library ensures this (see zutil.c). To reduce memory + requirements and avoid any allocation of 64K objects, at the expense of + compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or + progress reports. After compression, total_in holds the total size of + the uncompressed data and may be saved for use in the decompressor + (particularly if the decompressor wants to decompress everything in + a single step). +*/ + + /* constants */ + +#define Z_NO_FLUSH 0 +#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ +#define Z_SYNC_FLUSH 2 +#define Z_FULL_FLUSH 3 +#define Z_FINISH 4 +/* Allowed flush values; see deflate() below for details */ + +#define Z_OK 0 +#define Z_STREAM_END 1 +#define Z_NEED_DICT 2 +#define Z_ERRNO (-1) +#define Z_STREAM_ERROR (-2) +#define Z_DATA_ERROR (-3) +#define Z_MEM_ERROR (-4) +#define Z_BUF_ERROR (-5) +#define Z_VERSION_ERROR (-6) +/* Return codes for the compression/decompression functions. Negative + * values are errors, positive values are used for special but normal events. + */ + +#define Z_NO_COMPRESSION 0 +#define Z_BEST_SPEED 1 +#define Z_BEST_COMPRESSION 9 +#define Z_DEFAULT_COMPRESSION (-1) +/* compression levels */ + +#define Z_FILTERED 1 +#define Z_HUFFMAN_ONLY 2 +#define Z_DEFAULT_STRATEGY 0 +/* compression strategy; see deflateInit2() below for details */ + +#define Z_BINARY 0 +#define Z_ASCII 1 +#define Z_UNKNOWN 2 +/* Possible values of the data_type field */ + +#define Z_DEFLATED 8 +/* The deflate compression method (the only one supported in this version) */ + +#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ + +#define zlib_version zlibVersion() +/* for compatibility with versions < 1.0.2 */ + + /* basic functions */ + +ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +/* The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is + not compatible with the zlib.h header file used by the application. + This check is automatically made by deflateInit and inflateInit. + */ + +/* +ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); + + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. + If zalloc and zfree are set to Z_NULL, deflateInit updates them to + use default allocation functions. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at + all (the input data is simply copied a block at a time). + Z_DEFAULT_COMPRESSION requests a default compromise between speed and + compression (currently equivalent to level 6). + + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if level is not a valid compression level, + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). + msg is set to null if there is no error message. deflateInit does not + perform any compression: this will be done by deflate(). +*/ + + +ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +/* + deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce some + output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. deflate performs one or both of the + following actions: + + - Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary (in interactive applications). + Some output may be provided even if flush is not set. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating avail_in or avail_out accordingly; avail_out + should never be zero before the call. The application can consume the + compressed output when it wants, for example when the output buffer is full + (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK + and with zero avail_out, it must be called again after making room in the + output buffer because there might be more output pending. + + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In particular + avail_in is zero after the call if enough output space has been provided + before the call.) Flushing may degrade compression for some compression + algorithms and so it should be used only when necessary. + + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, 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. + + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). + + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there + was enough output space; if deflate returns with Z_OK, this function must be + called again with Z_FINISH and more output space (updated avail_out) but no + more input data, until it returns with Z_STREAM_END or an error. After + deflate has returned Z_STREAM_END, the only possible operations on the + stream are deflateReset or deflateEnd. + + Z_FINISH can be used immediately after deflateInit if all the compression + is to be done in a single step. In this case, avail_out must be at least + 0.1% larger than avail_in plus 12 bytes. If deflate does not return + Z_STREAM_END, then it must be called again as described above. + + deflate() sets strm->adler to the adler32 checksum of all input read + so far (that is, total_in bytes). + + deflate() may update data_type if it can make a good guess about + the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered + binary. This field is only for information purposes and does not affect + the compression algorithm in any manner. + + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible + (for example avail_in or avail_out was zero). +*/ + + +ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, + msg may be set but then points to a static string (which must not be + deallocated). +*/ + + +/* +ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); + + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. If next_in is not Z_NULL and avail_in is large enough (the exact + value depends on the compression method), inflateInit determines the + compression method from the zlib header and allocates all data structures + accordingly; otherwise the allocation will be deferred to the first call of + inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to + use default allocation functions. + + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller. msg is set to null if there is no error + message. inflateInit does not perform any decompression apart from reading + the zlib header if present: this will be done by inflate(). (So next_in and + avail_in may be modified, but next_out and avail_out are unchanged.) +*/ + + +ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +/* + inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may some + introduce some output latency (reading input without producing any output) + except when forced to flush. + + The detailed semantics are as follows. inflate performs one or both of the + following actions: + + - Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in is updated and processing + will resume at this point for the next call of inflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there + is no more input data or no more space in the output buffer (see below + about the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating the next_* and avail_* values accordingly. + The application can consume the uncompressed output when it wants, for + example when the output buffer is full (avail_out == 0), or after each + call of inflate(). If inflate returns Z_OK and with zero avail_out, it + must be called again after making room in the output buffer because there + might be more output pending. + + If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much + output as possible to the output buffer. The flushing behavior of inflate is + not specified for values of the flush parameter other than Z_SYNC_FLUSH + and Z_FINISH, but the current implementation actually flushes as much output + as possible anyway. + + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step + (a single call of inflate), the parameter flush should be set to + Z_FINISH. In this case all pending input is processed and all pending + output is flushed; avail_out must be large enough to hold all the + uncompressed data. (The size of the uncompressed data may have been saved + by the compressor for this purpose.) The next operation on this stream must + be inflateEnd to deallocate the decompression state. The use of Z_FINISH + is never required, but can be used to inform inflate that a faster routine + may be used for the single inflate() call. + + If a preset dictionary is needed at this point (see inflateSetDictionary + below), inflate sets strm-adler to the adler32 checksum of the + dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise + it sets strm->adler to the adler32 checksum of all output produced + so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or + an error code as described below. At the end of the stream, inflate() + checks that its computed adler32 checksum is equal to that saved by the + compressor and returns Z_STREAM_END only if the checksum is correct. + + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect + adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent + (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if no progress is possible or if there was not + enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR + case, the application may then call inflateSync to look for a good + compression block. +*/ + + +ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state + was inconsistent. In the error case, msg may be set but then points to a + static string (which must not be deallocated). +*/ + + /* Advanced functions */ + +/* + The following functions are needed only in some special applications. +*/ + +/* +ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy)); + + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by + the caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but + is slow and reduces compression ratio; memLevel=9 uses maximum memory + for optimal speed. The default value is 8. See zconf.h for total memory + usage as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match). Filtered data consists mostly of small values with a + somewhat random distribution. In this case, the compression algorithm is + tuned to compress them better. The effect of Z_FILTERED is to force more + Huffman coding and less string matching; it is somewhat intermediate + between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects + the compression ratio but not the correctness of the compressed output even + if it is not set appropriately. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid + method). msg is set to null if there is no error message. deflateInit2 does + not perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the compression dictionary from the given byte sequence + without producing any compressed output. This function must be called + immediately after deflateInit, deflateInit2 or deflateReset, before any + call of deflate. The compressor and decompressor must use exactly the same + dictionary (see inflateSetDictionary). + + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy; the data can then be compressed better than + with the default empty dictionary. + + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size in + deflate or deflate2. Thus the strings most likely to be useful should be + put at the end of the dictionary, not at the front. + + Upon return of this function, strm->adler is set to the Adler32 value + of the dictionary; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The Adler32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.) + + deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if the compression method is bsort). deflateSetDictionary does not + perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and + can consume lots of memory. + + deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +/* + This function is equivalent to deflateEnd followed by deflateInit, + but does not free and reallocate all the internal compression state. + The stream will keep the same compression level and any other attributes + that may have been set by deflateInit2. + + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ + +ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, + int level, + int strategy)); +/* + Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2. This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different + strategy. If the compression level is changed, the input available so far + is compressed with the old level (and may be flushed); the new level will + take effect only at the next call of deflate(). + + Before the call of deflateParams, the stream state must be set as for + a call of deflate(), since the currently available input may have to + be compressed and flushed. In particular, strm->avail_out must be non-zero. + + deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source + stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR + if strm->avail_out was zero. +*/ + +/* +ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, + int windowBits)); + + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. If a compressed stream with a larger window size is given as + input, inflate() will return with the error code Z_DATA_ERROR instead of + trying to allocate a larger window. + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative + memLevel). msg is set to null if there is no error message. inflateInit2 + does not perform any decompression apart from reading the zlib header if + present: this will be done by inflate(). (So next_in and avail_in may be + modified, but next_out and avail_out are unchanged.) +*/ + +ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate + if this call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler32 value returned by this call of + inflate. The compressor and decompressor must use exactly the same + dictionary (see deflateSetDictionary). + + inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect Adler32 value). inflateSetDictionary does not + perform any decompression: this will be done by subsequent calls of + inflate(). +*/ + +ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); +/* + Skips invalid compressed data until a full flush point (see above the + description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR + if no more input was provided, Z_DATA_ERROR if no flush point has been found, + or Z_STREAM_ERROR if the stream structure was inconsistent. In the success + case, the application may save the current current value of total_in which + indicates where valid compressed data was found. In the error case, the + application may repeatedly call inflateSync, providing more input each time, + until success or end of the input data. +*/ + +ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +/* + This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate all the internal decompression state. + The stream will keep attributes that may have been set by inflateInit2. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ + + + /* utility functions */ + +/* + The following utility functions are implemented on top of the + basic stream-oriented functions. To simplify the interface, some + default options are assumed (compression level and memory usage, + standard memory allocation functions). The source code of these + utility functions can easily be modified if you need special options. +*/ + +ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be at least 0.1% larger than + sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the + compressed buffer. + This function can be used to compress a whole file at once if the + input file is mmap'ed. + compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ + +ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level)); +/* + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least 0.1% larger than sourceLen plus + 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ + +ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer. + This function can be used to decompress a whole file at once if the + input file is mmap'ed. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted. +*/ + + +typedef voidp gzFile; + +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); +/* + Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb") but can also include a compression level + ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for + Huffman only compression as in "wb1h". (See the description + of deflateInit2 for more information about the strategy parameter.) + + gzopen can be used to read a file which is not in gzip format; in this + case gzread will directly read from the file without decompression. + + gzopen returns NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). */ + +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +/* + gzdopen() associates a gzFile with the file descriptor fd. File + descriptors are obtained from calls like open, dup, creat, pipe or + fileno (in the file has been previously opened with fopen). + The mode parameter is as in gzopen. + The next call of gzclose on the returned gzFile will also close the + file descriptor fd, just like fclose(fdopen(fd), mode) closes the file + descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). + gzdopen returns NULL if there was insufficient memory to allocate + the (de)compression state. +*/ + +ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); +/* + Dynamically update the compression level or strategy. See the description + of deflateInit2 for the meaning of these parameters. + gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not + opened for writing. +*/ + +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +/* + Reads the given number of uncompressed bytes from the compressed file. + If the input file was not in gzip format, gzread copies the given number + of bytes into the buffer. + gzread returns the number of uncompressed bytes actually read (0 for + end of file, -1 for error). */ + +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, + const voidp buf, unsigned len)); +/* + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of uncompressed bytes actually written + (0 in case of error). +*/ + +ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); +/* + Converts, formats, and writes the args to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written (0 in case of error). +*/ + +ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +/* + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + gzputs returns the number of characters written, or -1 in case of error. +*/ + +ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +/* + Reads bytes from the compressed file until len-1 characters are read, or + a newline character is read and transferred to buf, or an end-of-file + condition is encountered. The string is then terminated with a null + character. + gzgets returns buf, or Z_NULL in case of error. +*/ + +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +/* + Writes c, converted to an unsigned char, into the compressed file. + gzputc returns the value that was written, or -1 in case of error. +*/ + +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +/* + Reads one byte from the compressed file. gzgetc returns this byte + or -1 in case of end of file or error. +*/ + +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +/* + Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. The return value is the zlib + error number (see function gzerror below). gzflush returns Z_OK if + the flush parameter is Z_FINISH and all output could be flushed. + gzflush should be called only when strictly necessary because it can + degrade compression. +*/ + +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); +/* + Sets the starting position for the next gzread or gzwrite on the + given compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. + If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported; gzseek then compresses a sequence of zeroes up to the new + starting position. + + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +*/ + +ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); +/* + Rewinds the given file. This function is supported only for reading. + + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) +*/ + +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); +/* + Returns the starting position for the next gzread or gzwrite on the + given compressed file. This position represents a number of bytes in the + uncompressed data stream. + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +/* + Returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. +*/ + +ZEXTERN int ZEXPORT gzclose OF((gzFile file)); +/* + Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. The return value is the zlib + error number (see function gzerror below). +*/ + +ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +/* + Returns the error message for the last error which occurred on the + given compressed file. errnum is set to zlib error number. If an + error occurred in the file system and not in the compression library, + errnum is set to Z_ERRNO and the application may consult errno + to get the exact error code. +*/ + + /* checksum functions */ + +/* + These functions are not related to compression but are exported + anyway because they might be useful in applications using the + compression library. +*/ + +ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); + +/* + Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. If buf is NULL, this function returns + the required initial value for the checksum. + An Adler-32 checksum is almost as reliable as a CRC32 but can be computed + much faster. Usage example: + + uLong adler = adler32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + adler = adler32(adler, buffer, length); + } + if (adler != original_adler) error(); +*/ + +ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); +/* + Update a running crc with the bytes buf[0..len-1] and return the updated + crc. If buf is NULL, this function returns the required initial value + for the crc. Pre- and post-conditioning (one's complement) is performed + within this function so it shouldn't be done by the application. + Usage example: + + uLong crc = crc32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + crc = crc32(crc, buffer, length); + } + if (crc != original_crc) error(); +*/ + + + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); +ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, + const char *version, int stream_size)); +#define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) +#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) + + +#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL) + struct internal_state {int dummy;}; /* hack for buggy compilers */ +#endif + +ZEXTERN const char * ZEXPORT zError OF((int err)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); +ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); + +#ifdef __cplusplus +} +#endif + +#endif /* _ZLIB_H */ diff --git a/win32/zlib/zutil.c b/win32/zlib/zutil.c new file mode 100644 index 00000000..dfc38ec1 --- /dev/null +++ b/win32/zlib/zutil.c @@ -0,0 +1,225 @@ +/* zutil.c -- target dependent utility functions for the compression library + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zutil.h" + +struct internal_state {int dummy;}; /* for buggy compilers */ + +#ifndef STDC +extern void exit OF((int)); +#endif + +const char *z_errmsg[10] = { +"need dictionary", /* Z_NEED_DICT 2 */ +"stream end", /* Z_STREAM_END 1 */ +"", /* Z_OK 0 */ +"file error", /* Z_ERRNO (-1) */ +"stream error", /* Z_STREAM_ERROR (-2) */ +"data error", /* Z_DATA_ERROR (-3) */ +"insufficient memory", /* Z_MEM_ERROR (-4) */ +"buffer error", /* Z_BUF_ERROR (-5) */ +"incompatible version",/* Z_VERSION_ERROR (-6) */ +""}; + + +const char * ZEXPORT zlibVersion() +{ + return ZLIB_VERSION; +} + +#ifdef DEBUG + +# ifndef verbose +# define verbose 0 +# endif +int z_verbose = verbose; + +void z_error (m) + char *m; +{ + fprintf(stderr, "%s\n", m); + exit(1); +} +#endif + +/* exported to allow conversion of error code to string for compress() and + * uncompress() + */ +const char * ZEXPORT zError(err) + int err; +{ + return ERR_MSG(err); +} + + +#ifndef HAVE_MEMCPY + +void zmemcpy(dest, source, len) + Bytef* dest; + const Bytef* source; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = *source++; /* ??? to be unrolled */ + } while (--len != 0); +} + +int zmemcmp(s1, s2, len) + const Bytef* s1; + const Bytef* s2; + uInt len; +{ + uInt j; + + for (j = 0; j < len; j++) { + if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; + } + return 0; +} + +void zmemzero(dest, len) + Bytef* dest; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = 0; /* ??? to be unrolled */ + } while (--len != 0); +} +#endif + +#ifdef __TURBOC__ +#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) && !defined(__32BIT__) +/* Small and medium model in Turbo C are for now limited to near allocation + * with reduced MAX_WBITS and MAX_MEM_LEVEL + */ +# define MY_ZCALLOC + +/* Turbo C malloc() does not allow dynamic allocation of 64K bytes + * and farmalloc(64K) returns a pointer with an offset of 8, so we + * must fix the pointer. Warning: the pointer must be put back to its + * original form in order to free it, use zcfree(). + */ + +#define MAX_PTR 10 +/* 10*64K = 640K */ + +local int next_ptr = 0; + +typedef struct ptr_table_s { + voidpf org_ptr; + voidpf new_ptr; +} ptr_table; + +local ptr_table table[MAX_PTR]; +/* This table is used to remember the original form of pointers + * to large buffers (64K). Such pointers are normalized with a zero offset. + * Since MSDOS is not a preemptive multitasking OS, this table is not + * protected from concurrent access. This hack doesn't work anyway on + * a protected system like OS/2. Use Microsoft C instead. + */ + +voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +{ + voidpf buf = opaque; /* just to make some compilers happy */ + ulg bsize = (ulg)items*size; + + /* If we allocate less than 65520 bytes, we assume that farmalloc + * will return a usable pointer which doesn't have to be normalized. + */ + if (bsize < 65520L) { + buf = farmalloc(bsize); + if (*(ush*)&buf != 0) return buf; + } else { + buf = farmalloc(bsize + 16L); + } + if (buf == NULL || next_ptr >= MAX_PTR) return NULL; + table[next_ptr].org_ptr = buf; + + /* Normalize the pointer to seg:0 */ + *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; + *(ush*)&buf = 0; + table[next_ptr++].new_ptr = buf; + return buf; +} + +void zcfree (voidpf opaque, voidpf ptr) +{ + int n; + if (*(ush*)&ptr != 0) { /* object < 64K */ + farfree(ptr); + return; + } + /* Find the original pointer */ + for (n = 0; n < next_ptr; n++) { + if (ptr != table[n].new_ptr) continue; + + farfree(table[n].org_ptr); + while (++n < next_ptr) { + table[n-1] = table[n]; + } + next_ptr--; + return; + } + ptr = opaque; /* just to make some compilers happy */ + Assert(0, "zcfree: ptr not found"); +} +#endif +#endif /* __TURBOC__ */ + + +#if defined(M_I86) && !defined(__32BIT__) +/* Microsoft C in 16-bit mode */ + +# define MY_ZCALLOC + +#if (!defined(_MSC_VER) || (_MSC_VER <= 600)) +# define _halloc halloc +# define _hfree hfree +#endif + +voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +{ + if (opaque) opaque = 0; /* to make compiler happy */ + return _halloc((long)items, size); +} + +void zcfree (voidpf opaque, voidpf ptr) +{ + if (opaque) opaque = 0; /* to make compiler happy */ + _hfree(ptr); +} + +#endif /* MSC */ + + +#ifndef MY_ZCALLOC /* Any system without a special alloc function */ + +#ifndef STDC +extern voidp calloc OF((uInt items, uInt size)); +extern void free OF((voidpf ptr)); +#endif + +voidpf zcalloc (opaque, items, size) + voidpf opaque; + unsigned items; + unsigned size; +{ + if (opaque) items += size - size; /* make compiler happy */ + return (voidpf)calloc(items, size); +} + +void zcfree (opaque, ptr) + voidpf opaque; + voidpf ptr; +{ + free(ptr); + if (opaque) return; /* make compiler happy */ +} + +#endif /* MY_ZCALLOC */ diff --git a/win32/zlib/zutil.h b/win32/zlib/zutil.h new file mode 100644 index 00000000..718ebc15 --- /dev/null +++ b/win32/zlib/zutil.h @@ -0,0 +1,220 @@ +/* zutil.h -- internal interface and configuration of the compression library + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id$ */ + +#ifndef _Z_UTIL_H +#define _Z_UTIL_H + +#include "zlib.h" + +#ifdef STDC +# include +# include +# include +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include +#endif + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + +typedef unsigned char uch; +typedef uch FAR uchf; +typedef unsigned short ush; +typedef ush FAR ushf; +typedef unsigned long ulg; + +extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ +/* (size given to avoid silly warnings with Visual C++) */ + +#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] + +#define ERR_RETURN(strm,err) \ + return (strm->msg = (char*)ERR_MSG(err), (err)) +/* To be used only when the state is known to be valid */ + + /* common constants */ + +#ifndef DEF_WBITS +# define DEF_WBITS MAX_WBITS +#endif +/* default windowBits for decompression. MAX_WBITS is for compression only */ + +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +/* default memLevel */ + +#define STORED_BLOCK 0 +#define STATIC_TREES 1 +#define DYN_TREES 2 +/* The three kinds of block type */ + +#define MIN_MATCH 3 +#define MAX_MATCH 258 +/* The minimum and maximum match lengths */ + +#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ + + /* target dependencies */ + +#ifdef MSDOS +# define OS_CODE 0x00 +# if defined(__TURBOC__) || defined(__BORLANDC__) +# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) + /* Allow compilation with ANSI keywords only enabled */ + void _Cdecl farfree( void *block ); + void *_Cdecl farmalloc( unsigned long nbytes ); +# else +# include +# endif +# else /* MSC or DJGPP */ +# include +# endif +#endif + +#ifdef OS2 +# define OS_CODE 0x06 +#endif + +#ifdef WIN32 /* Window 95 & Windows NT */ +# define OS_CODE 0x0b +#endif + +#if defined(VAXC) || defined(VMS) +# define OS_CODE 0x02 +# define F_OPEN(name, mode) \ + fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") +#endif + +#ifdef AMIGA +# define OS_CODE 0x01 +#endif + +#if defined(ATARI) || defined(atarist) +# define OS_CODE 0x05 +#endif + +#if defined(MACOS) || defined(TARGET_OS_MAC) +# define OS_CODE 0x07 +# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os +# include /* for fdopen */ +# else +# ifndef fdopen +# define fdopen(fd,mode) NULL /* No fdopen() */ +# endif +# endif +#endif + +#ifdef __50SERIES /* Prime/PRIMOS */ +# define OS_CODE 0x0F +#endif + +#ifdef TOPS20 +# define OS_CODE 0x0a +#endif + +#if defined(_BEOS_) || defined(RISCOS) +# define fdopen(fd,mode) NULL /* No fdopen() */ +#endif + +#if (defined(_MSC_VER) && (_MSC_VER > 600)) +# define fdopen(fd,type) _fdopen(fd,type) +#endif + + + /* Common defaults */ + +#ifndef OS_CODE +# define OS_CODE 0x03 /* assume Unix */ +#endif + +#ifndef F_OPEN +# define F_OPEN(name, mode) fopen((name), (mode)) +#endif + + /* functions */ + +#ifdef HAVE_STRERROR + extern char *strerror OF((int)); +# define zstrerror(errnum) strerror(errnum) +#else +# define zstrerror(errnum) "" +#endif + +#if defined(pyr) +# define NO_MEMCPY +#endif +#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) + /* Use our own functions for small and medium model with MSC <= 5.0. + * You may have to use the same strategy for Borland C (untested). + * The __SC__ check is for Symantec. + */ +# define NO_MEMCPY +#endif +#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) +# define HAVE_MEMCPY +#endif +#ifdef HAVE_MEMCPY +# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ +# define zmemcpy _fmemcpy +# define zmemcmp _fmemcmp +# define zmemzero(dest, len) _fmemset(dest, 0, len) +# else +# define zmemcpy memcpy +# define zmemcmp memcmp +# define zmemzero(dest, len) memset(dest, 0, len) +# endif +#else + extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); + extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); + extern void zmemzero OF((Bytef* dest, uInt len)); +#endif + +/* Diagnostic functions */ +#ifdef DEBUG +# include + extern int z_verbose; + extern void z_error OF((char *m)); +# define Assert(cond,msg) {if(!(cond)) z_error(msg);} +# define Trace(x) {if (z_verbose>=0) fprintf x ;} +# define Tracev(x) {if (z_verbose>0) fprintf x ;} +# define Tracevv(x) {if (z_verbose>1) fprintf x ;} +# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} +# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} +#else +# define Assert(cond,msg) +# define Trace(x) +# define Tracev(x) +# define Tracevv(x) +# define Tracec(c,x) +# define Tracecv(c,x) +#endif + + +typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf, + uInt len)); +voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); +void zcfree OF((voidpf opaque, voidpf ptr)); + +#define ZALLOC(strm, items, size) \ + (*((strm)->zalloc))((strm)->opaque, (items), (size)) +#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) +#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} + +#endif /* _Z_UTIL_H */ -- 2.39.5